@wordpress/components 19.4.0 → 19.5.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 (406) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/CONTRIBUTING.md +69 -2
  3. package/build/box-control/unit-control.js +2 -2
  4. package/build/box-control/unit-control.js.map +1 -1
  5. package/build/card/card/component.js +2 -2
  6. package/build/card/card/component.js.map +1 -1
  7. package/build/card/card-body/component.js +1 -1
  8. package/build/card/card-body/component.js.map +1 -1
  9. package/build/card/card-divider/component.js +1 -1
  10. package/build/card/card-divider/component.js.map +1 -1
  11. package/build/card/card-footer/component.js +1 -1
  12. package/build/card/card-footer/component.js.map +1 -1
  13. package/build/card/card-header/component.js +1 -1
  14. package/build/card/card-header/component.js.map +1 -1
  15. package/build/card/card-media/component.js +1 -1
  16. package/build/card/card-media/component.js.map +1 -1
  17. package/build/color-palette/index.native.js +35 -30
  18. package/build/color-palette/index.native.js.map +1 -1
  19. package/build/color-picker/component.js.map +1 -1
  20. package/build/color-picker/hex-input.js +6 -9
  21. package/build/color-picker/hex-input.js.map +1 -1
  22. package/build/confirm-dialog/component.js.map +1 -1
  23. package/build/divider/component.js.map +1 -1
  24. package/build/elevation/component.js +1 -1
  25. package/build/elevation/component.js.map +1 -1
  26. package/build/flex/flex/component.js +1 -1
  27. package/build/flex/flex/component.js.map +1 -1
  28. package/build/flex/flex-block/component.js +1 -1
  29. package/build/flex/flex-block/component.js.map +1 -1
  30. package/build/flex/flex-item/component.js +1 -1
  31. package/build/flex/flex-item/component.js.map +1 -1
  32. package/build/flyout/flyout/component.js +1 -1
  33. package/build/flyout/flyout/component.js.map +1 -1
  34. package/build/flyout/flyout-content/component.js +1 -1
  35. package/build/flyout/flyout-content/component.js.map +1 -1
  36. package/build/focal-point-picker/index.js +18 -12
  37. package/build/focal-point-picker/index.js.map +1 -1
  38. package/build/font-size-picker/index.js +0 -1
  39. package/build/font-size-picker/index.js.map +1 -1
  40. package/build/grid/component.js +1 -1
  41. package/build/grid/component.js.map +1 -1
  42. package/build/h-stack/component.js +1 -1
  43. package/build/h-stack/component.js.map +1 -1
  44. package/build/heading/component.js.map +1 -1
  45. package/build/index.js +12 -0
  46. package/build/index.js.map +1 -1
  47. package/build/index.native.js +15 -1
  48. package/build/index.native.js.map +1 -1
  49. package/build/input-control/index.js.map +1 -1
  50. package/build/input-control/input-base.js.map +1 -1
  51. package/build/input-control/input-field.js +7 -7
  52. package/build/input-control/input-field.js.map +1 -1
  53. package/build/input-control/reducer/reducer.js +3 -0
  54. package/build/input-control/reducer/reducer.js.map +1 -1
  55. package/build/item-group/item/component.js.map +1 -1
  56. package/build/item-group/item-group/component.js.map +1 -1
  57. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  58. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  59. package/build/mobile/color-settings/palette.screen.native.js +26 -9
  60. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  61. package/build/mobile/global-styles-context/utils.native.js +63 -9
  62. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  63. package/build/mobile/inserter-button/index.native.js +3 -3
  64. package/build/mobile/inserter-button/index.native.js.map +1 -1
  65. package/build/mobile/inserter-button/sparkles.js +25 -0
  66. package/build/mobile/inserter-button/sparkles.js.map +1 -0
  67. package/build/navigator/index.js +16 -0
  68. package/build/navigator/index.js.map +1 -1
  69. package/build/navigator/navigator-back-button/component.js +72 -0
  70. package/build/navigator/navigator-back-button/component.js.map +1 -0
  71. package/build/navigator/navigator-back-button/hook.js +49 -0
  72. package/build/navigator/navigator-back-button/hook.js.map +1 -0
  73. package/build/navigator/navigator-back-button/index.js +16 -0
  74. package/build/navigator/navigator-back-button/index.js.map +1 -0
  75. package/build/navigator/navigator-button/component.js +71 -0
  76. package/build/navigator/navigator-button/component.js.map +1 -0
  77. package/build/navigator/navigator-button/hook.js +59 -0
  78. package/build/navigator/navigator-button/hook.js.map +1 -0
  79. package/build/navigator/navigator-button/index.js +16 -0
  80. package/build/navigator/navigator-button/index.js.map +1 -0
  81. package/build/navigator/navigator-provider/component.js +11 -21
  82. package/build/navigator/navigator-provider/component.js.map +1 -1
  83. package/build/navigator/navigator-screen/component.js +14 -22
  84. package/build/navigator/navigator-screen/component.js.map +1 -1
  85. package/build/resizable-box/index.js.map +1 -1
  86. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  87. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  88. package/build/scrollable/component.js +1 -1
  89. package/build/scrollable/component.js.map +1 -1
  90. package/build/select-control/index.js.map +1 -1
  91. package/build/spacer/component.js.map +1 -1
  92. package/build/surface/component.js +1 -1
  93. package/build/surface/component.js.map +1 -1
  94. package/build/text/component.js +1 -1
  95. package/build/text/component.js.map +1 -1
  96. package/build/text-control/index.js +2 -2
  97. package/build/text-control/index.js.map +1 -1
  98. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  99. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  100. package/build/tools-panel/tools-panel/component.js.map +1 -1
  101. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  102. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  103. package/build/tree-grid/index.js +50 -6
  104. package/build/tree-grid/index.js.map +1 -1
  105. package/build/truncate/component.js +1 -1
  106. package/build/truncate/component.js.map +1 -1
  107. package/build/ui/control-group/component.js +1 -1
  108. package/build/ui/control-group/component.js.map +1 -1
  109. package/build/ui/control-label/component.js +1 -1
  110. package/build/ui/control-label/component.js.map +1 -1
  111. package/build/ui/form-group/form-group.js +1 -1
  112. package/build/ui/form-group/form-group.js.map +1 -1
  113. package/build/ui/shortcut/component.js.map +1 -1
  114. package/build/ui/spinner/component.js +1 -1
  115. package/build/ui/spinner/component.js.map +1 -1
  116. package/build/ui/tooltip/component.js +1 -1
  117. package/build/ui/tooltip/component.js.map +1 -1
  118. package/build/ui/tooltip/content.js +1 -1
  119. package/build/ui/tooltip/content.js.map +1 -1
  120. package/build/unit-control/index.js.map +1 -1
  121. package/build/v-stack/component.js +1 -1
  122. package/build/v-stack/component.js.map +1 -1
  123. package/build/visually-hidden/component.js +1 -1
  124. package/build/visually-hidden/component.js.map +1 -1
  125. package/build/z-stack/component.js.map +1 -1
  126. package/build-module/box-control/unit-control.js +1 -1
  127. package/build-module/box-control/unit-control.js.map +1 -1
  128. package/build-module/card/card/component.js +2 -2
  129. package/build-module/card/card/component.js.map +1 -1
  130. package/build-module/card/card-body/component.js +1 -1
  131. package/build-module/card/card-body/component.js.map +1 -1
  132. package/build-module/card/card-divider/component.js +1 -1
  133. package/build-module/card/card-divider/component.js.map +1 -1
  134. package/build-module/card/card-footer/component.js +1 -1
  135. package/build-module/card/card-footer/component.js.map +1 -1
  136. package/build-module/card/card-header/component.js +1 -1
  137. package/build-module/card/card-header/component.js.map +1 -1
  138. package/build-module/card/card-media/component.js +1 -1
  139. package/build-module/card/card-media/component.js.map +1 -1
  140. package/build-module/color-palette/index.native.js +36 -31
  141. package/build-module/color-palette/index.native.js.map +1 -1
  142. package/build-module/color-picker/component.js.map +1 -1
  143. package/build-module/color-picker/hex-input.js +6 -9
  144. package/build-module/color-picker/hex-input.js.map +1 -1
  145. package/build-module/confirm-dialog/component.js.map +1 -1
  146. package/build-module/divider/component.js.map +1 -1
  147. package/build-module/elevation/component.js +1 -1
  148. package/build-module/elevation/component.js.map +1 -1
  149. package/build-module/flex/flex/component.js +1 -1
  150. package/build-module/flex/flex/component.js.map +1 -1
  151. package/build-module/flex/flex-block/component.js +1 -1
  152. package/build-module/flex/flex-block/component.js.map +1 -1
  153. package/build-module/flex/flex-item/component.js +1 -1
  154. package/build-module/flex/flex-item/component.js.map +1 -1
  155. package/build-module/flyout/flyout/component.js +1 -1
  156. package/build-module/flyout/flyout/component.js.map +1 -1
  157. package/build-module/flyout/flyout-content/component.js +1 -1
  158. package/build-module/flyout/flyout-content/component.js.map +1 -1
  159. package/build-module/focal-point-picker/index.js +18 -12
  160. package/build-module/focal-point-picker/index.js.map +1 -1
  161. package/build-module/font-size-picker/index.js +0 -1
  162. package/build-module/font-size-picker/index.js.map +1 -1
  163. package/build-module/grid/component.js +1 -1
  164. package/build-module/grid/component.js.map +1 -1
  165. package/build-module/h-stack/component.js +1 -1
  166. package/build-module/h-stack/component.js.map +1 -1
  167. package/build-module/heading/component.js.map +1 -1
  168. package/build-module/index.js +1 -1
  169. package/build-module/index.js.map +1 -1
  170. package/build-module/index.native.js +1 -1
  171. package/build-module/index.native.js.map +1 -1
  172. package/build-module/input-control/index.js.map +1 -1
  173. package/build-module/input-control/input-base.js.map +1 -1
  174. package/build-module/input-control/input-field.js +6 -6
  175. package/build-module/input-control/input-field.js.map +1 -1
  176. package/build-module/input-control/reducer/reducer.js +3 -0
  177. package/build-module/input-control/reducer/reducer.js.map +1 -1
  178. package/build-module/item-group/item/component.js.map +1 -1
  179. package/build-module/item-group/item-group/component.js.map +1 -1
  180. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  181. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  182. package/build-module/mobile/color-settings/palette.screen.native.js +27 -10
  183. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  184. package/build-module/mobile/global-styles-context/utils.native.js +60 -10
  185. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  186. package/build-module/mobile/inserter-button/index.native.js +1 -1
  187. package/build-module/mobile/inserter-button/index.native.js.map +1 -1
  188. package/build-module/mobile/inserter-button/sparkles.js +16 -0
  189. package/build-module/mobile/inserter-button/sparkles.js.map +1 -0
  190. package/build-module/navigator/index.js +2 -0
  191. package/build-module/navigator/index.js.map +1 -1
  192. package/build-module/navigator/navigator-back-button/component.js +59 -0
  193. package/build-module/navigator/navigator-back-button/component.js.map +1 -0
  194. package/build-module/navigator/navigator-back-button/hook.js +36 -0
  195. package/build-module/navigator/navigator-back-button/hook.js.map +1 -0
  196. package/build-module/navigator/navigator-back-button/index.js +2 -0
  197. package/build-module/navigator/navigator-back-button/index.js.map +1 -0
  198. package/build-module/navigator/navigator-button/component.js +58 -0
  199. package/build-module/navigator/navigator-button/component.js.map +1 -0
  200. package/build-module/navigator/navigator-button/hook.js +46 -0
  201. package/build-module/navigator/navigator-button/hook.js.map +1 -0
  202. package/build-module/navigator/navigator-button/index.js +2 -0
  203. package/build-module/navigator/navigator-button/index.js.map +1 -0
  204. package/build-module/navigator/navigator-provider/component.js +11 -21
  205. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  206. package/build-module/navigator/navigator-screen/component.js +13 -22
  207. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  208. package/build-module/resizable-box/index.js.map +1 -1
  209. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  210. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  211. package/build-module/scrollable/component.js +1 -1
  212. package/build-module/scrollable/component.js.map +1 -1
  213. package/build-module/select-control/index.js +1 -1
  214. package/build-module/select-control/index.js.map +1 -1
  215. package/build-module/spacer/component.js.map +1 -1
  216. package/build-module/surface/component.js +1 -1
  217. package/build-module/surface/component.js.map +1 -1
  218. package/build-module/text/component.js +1 -1
  219. package/build-module/text/component.js.map +1 -1
  220. package/build-module/text-control/index.js +2 -2
  221. package/build-module/text-control/index.js.map +1 -1
  222. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  223. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  224. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  225. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  226. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  227. package/build-module/tree-grid/index.js +51 -7
  228. package/build-module/tree-grid/index.js.map +1 -1
  229. package/build-module/truncate/component.js +1 -1
  230. package/build-module/truncate/component.js.map +1 -1
  231. package/build-module/ui/control-group/component.js +1 -1
  232. package/build-module/ui/control-group/component.js.map +1 -1
  233. package/build-module/ui/control-label/component.js +1 -1
  234. package/build-module/ui/control-label/component.js.map +1 -1
  235. package/build-module/ui/form-group/form-group.js +1 -1
  236. package/build-module/ui/form-group/form-group.js.map +1 -1
  237. package/build-module/ui/shortcut/component.js.map +1 -1
  238. package/build-module/ui/spinner/component.js +1 -1
  239. package/build-module/ui/spinner/component.js.map +1 -1
  240. package/build-module/ui/tooltip/component.js +1 -1
  241. package/build-module/ui/tooltip/component.js.map +1 -1
  242. package/build-module/ui/tooltip/content.js +1 -1
  243. package/build-module/ui/tooltip/content.js.map +1 -1
  244. package/build-module/unit-control/index.js.map +1 -1
  245. package/build-module/v-stack/component.js +1 -1
  246. package/build-module/v-stack/component.js.map +1 -1
  247. package/build-module/visually-hidden/component.js +1 -1
  248. package/build-module/visually-hidden/component.js.map +1 -1
  249. package/build-module/z-stack/component.js.map +1 -1
  250. package/build-types/card/card-divider/hook.d.ts +0 -1
  251. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  252. package/build-types/color-picker/styles.d.ts +2 -4
  253. package/build-types/color-picker/styles.d.ts.map +1 -1
  254. package/build-types/confirm-dialog/component.d.ts +2 -6
  255. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  256. package/build-types/flyout/flyout/hook.d.ts +0 -1
  257. package/build-types/flyout/flyout/hook.d.ts.map +1 -1
  258. package/build-types/input-control/index.d.ts +3 -3
  259. package/build-types/input-control/index.d.ts.map +1 -1
  260. package/build-types/input-control/input-base.d.ts +2 -2
  261. package/build-types/input-control/input-base.d.ts.map +1 -1
  262. package/build-types/input-control/input-field.d.ts +1 -3
  263. package/build-types/input-control/input-field.d.ts.map +1 -1
  264. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  265. package/build-types/input-control/types.d.ts +1 -1
  266. package/build-types/input-control/types.d.ts.map +1 -1
  267. package/build-types/navigator/index.d.ts +2 -0
  268. package/build-types/navigator/index.d.ts.map +1 -1
  269. package/build-types/navigator/navigator-back-button/component.d.ts +38 -0
  270. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -0
  271. package/build-types/navigator/navigator-back-button/hook.d.ts +282 -0
  272. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -0
  273. package/build-types/navigator/navigator-back-button/index.d.ts +2 -0
  274. package/build-types/navigator/navigator-back-button/index.d.ts.map +1 -0
  275. package/build-types/navigator/navigator-button/component.d.ts +37 -0
  276. package/build-types/navigator/navigator-button/component.d.ts.map +1 -0
  277. package/build-types/navigator/navigator-button/hook.d.ts +282 -0
  278. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -0
  279. package/build-types/navigator/navigator-button/index.d.ts +2 -0
  280. package/build-types/navigator/navigator-button/index.d.ts.map +1 -0
  281. package/build-types/navigator/navigator-provider/component.d.ts +10 -20
  282. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  283. package/build-types/navigator/navigator-screen/component.d.ts +10 -20
  284. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  285. package/build-types/navigator/types.d.ts +21 -0
  286. package/build-types/navigator/types.d.ts.map +1 -1
  287. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  288. package/build-types/resizable-box/index.d.ts +2 -2
  289. package/build-types/resizable-box/index.d.ts.map +1 -1
  290. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  291. package/build-types/select-control/index.d.ts +1 -3
  292. package/build-types/select-control/index.d.ts.map +1 -1
  293. package/build-types/ui/context/wordpress-component.d.ts +2 -6
  294. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  295. package/build-types/unit-control/index.d.ts +1 -3
  296. package/build-types/unit-control/index.d.ts.map +1 -1
  297. package/build-types/z-stack/component.d.ts.map +1 -1
  298. package/package.json +8 -7
  299. package/src/alignment-matrix-control/README.md +4 -0
  300. package/src/alignment-matrix-control/stories/index.js +1 -1
  301. package/src/base-control/stories/index.js +65 -22
  302. package/src/box-control/stories/index.js +4 -1
  303. package/src/box-control/unit-control.js +1 -1
  304. package/src/card/card/component.js +1 -1
  305. package/src/card/card-body/component.js +1 -1
  306. package/src/card/card-divider/component.js +1 -1
  307. package/src/card/card-footer/component.js +1 -1
  308. package/src/card/card-header/component.js +1 -1
  309. package/src/card/card-media/component.js +1 -1
  310. package/src/color-palette/index.native.js +92 -75
  311. package/src/color-palette/style.native.scss +10 -5
  312. package/src/color-picker/component.tsx +2 -2
  313. package/src/color-picker/hex-input.tsx +9 -9
  314. package/src/confirm-dialog/component.tsx +2 -2
  315. package/src/divider/component.tsx +2 -2
  316. package/src/elevation/component.js +1 -1
  317. package/src/flex/flex/component.js +1 -1
  318. package/src/flex/flex-block/component.js +1 -1
  319. package/src/flex/flex-item/component.js +1 -1
  320. package/src/flyout/flyout/component.js +1 -1
  321. package/src/flyout/flyout-content/component.js +1 -1
  322. package/src/focal-point-picker/README.md +7 -0
  323. package/src/focal-point-picker/index.js +12 -7
  324. package/src/focal-point-picker/stories/index.js +30 -0
  325. package/src/focal-point-picker/test/index.js +44 -0
  326. package/src/font-size-picker/index.js +0 -1
  327. package/src/form-file-upload/README.md +1 -1
  328. package/src/form-file-upload/stories/index.js +51 -0
  329. package/src/grid/component.js +1 -1
  330. package/src/h-stack/component.js +1 -1
  331. package/src/heading/component.tsx +2 -2
  332. package/src/index.js +2 -0
  333. package/src/index.native.js +5 -1
  334. package/src/input-control/index.tsx +2 -2
  335. package/src/input-control/input-base.tsx +2 -2
  336. package/src/input-control/input-field.tsx +4 -6
  337. package/src/input-control/reducer/reducer.ts +3 -0
  338. package/src/input-control/stories/index.js +1 -1
  339. package/src/input-control/types.ts +1 -1
  340. package/src/item-group/item/component.tsx +2 -2
  341. package/src/item-group/item-group/component.tsx +2 -2
  342. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +10 -1
  343. package/src/mobile/color-settings/palette.screen.native.js +39 -9
  344. package/src/mobile/color-settings/style.native.scss +4 -0
  345. package/src/mobile/global-styles-context/test/fixtures/theme.native.js +27 -0
  346. package/src/mobile/global-styles-context/test/utils.native.js +2 -2
  347. package/src/mobile/global-styles-context/utils.native.js +75 -6
  348. package/src/mobile/inserter-button/index.native.js +1 -2
  349. package/src/mobile/inserter-button/sparkles.js +15 -0
  350. package/src/navigation/stories/index.js +1 -1
  351. package/src/navigator/index.ts +2 -0
  352. package/src/navigator/navigator-back-button/README.md +31 -0
  353. package/src/navigator/navigator-back-button/component.tsx +62 -0
  354. package/src/navigator/navigator-back-button/hook.ts +40 -0
  355. package/src/navigator/navigator-back-button/index.ts +1 -0
  356. package/src/navigator/navigator-button/README.md +38 -0
  357. package/src/navigator/navigator-button/component.tsx +61 -0
  358. package/src/navigator/navigator-button/hook.ts +55 -0
  359. package/src/navigator/navigator-button/index.ts +1 -0
  360. package/src/navigator/navigator-provider/README.md +20 -33
  361. package/src/navigator/navigator-provider/component.tsx +12 -22
  362. package/src/navigator/navigator-screen/README.md +1 -1
  363. package/src/navigator/navigator-screen/component.tsx +14 -23
  364. package/src/navigator/stories/index.js +24 -37
  365. package/src/navigator/test/index.js +89 -34
  366. package/src/navigator/types.ts +26 -0
  367. package/src/number-control/stories/index.js +1 -1
  368. package/src/radio/stories/index.js +1 -1
  369. package/src/radio-group/stories/index.js +4 -1
  370. package/src/resizable-box/index.tsx +2 -2
  371. package/src/resizable-box/resize-tooltip/index.tsx +2 -2
  372. package/src/resizable-box/resize-tooltip/label.tsx +2 -2
  373. package/src/scrollable/component.js +1 -1
  374. package/src/select-control/index.tsx +2 -3
  375. package/src/spacer/component.tsx +2 -2
  376. package/src/surface/component.js +1 -1
  377. package/src/text/component.js +1 -1
  378. package/src/text-control/index.js +2 -2
  379. package/src/toggle-group-control/stories/index.js +1 -1
  380. package/src/toggle-group-control/toggle-group-control/component.tsx +2 -2
  381. package/src/toggle-group-control/toggle-group-control-option/component.tsx +2 -2
  382. package/src/tools-panel/stories/index.js +0 -1
  383. package/src/tools-panel/tools-panel/component.tsx +2 -2
  384. package/src/tools-panel/tools-panel-header/component.tsx +2 -2
  385. package/src/tools-panel/tools-panel-item/component.tsx +2 -2
  386. package/src/tree-grid/README.md +24 -1
  387. package/src/tree-grid/index.js +66 -7
  388. package/src/tree-grid/stories/index.js +4 -1
  389. package/src/tree-grid/test/__snapshots__/index.js.snap +1 -14
  390. package/src/tree-grid/test/index.js +226 -7
  391. package/src/truncate/component.js +1 -1
  392. package/src/ui/context/wordpress-component.ts +2 -2
  393. package/src/ui/control-group/component.js +1 -1
  394. package/src/ui/control-label/component.js +1 -1
  395. package/src/ui/form-group/form-group.js +1 -1
  396. package/src/ui/shortcut/component.tsx +2 -2
  397. package/src/ui/spinner/component.js +1 -1
  398. package/src/ui/tooltip/component.js +1 -1
  399. package/src/ui/tooltip/content.js +1 -1
  400. package/src/unit-control/index.tsx +2 -2
  401. package/src/unit-control/stories/index.js +1 -1
  402. package/src/v-stack/component.js +1 -1
  403. package/src/visually-hidden/component.js +1 -1
  404. package/src/z-stack/component.tsx +2 -2
  405. package/tsconfig.tsbuildinfo +1 -1
  406. package/src/tools-panel/stories/typography-panel.js +0 -215
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/tree-grid/index.js"],"names":["includes","focus","forwardRef","useCallback","UP","DOWN","LEFT","RIGHT","RovingTabIndexContainer","getRowFocusables","rowElement","focusablesInRow","focusable","find","sequential","length","filter","closest","TreeGrid","ref","children","onExpandRow","onCollapseRow","props","onKeyDown","event","keyCode","metaKey","ctrlKey","altKey","shiftKey","hasModifierKeyPressed","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,QAAT,QAAyB,QAAzB;AAEA;AACA;AACA;;AACA,SAASC,KAAT,QAAsB,gBAA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;;AACA,YAAMJ,SAAS,GAAGC,IAAI,CAACE,GAAL,CACjBR,kBADiB,EAEjBqB,mBAAmB,CAAC7C,MAApB,GAA6B,CAFZ,CAAlB;AAIA6C,MAAAA,mBAAmB,CAAEhB,SAAF,CAAnB,CAAiC3C,KAAjC,GA7C+C,CA+C/C;AACA;;AACAwB,MAAAA,KAAK,CAACuB,cAAN;AACA;AACD,GAzK2B,EA0K5B,CAAE3B,WAAF,EAAeC,aAAf,CA1K4B,CAA7B;AA6KA;;AACA;;AACA,SACC,cAAC,uBAAD,QACC,oCACMC,KADN;AAEC,IAAA,IAAI,EAAC,UAFN;AAGC,IAAA,SAAS,EAAGC,SAHb;AAIC,IAAA,GAAG,EAAGL;AAJP,MAMC,6BAASC,QAAT,CAND,CADD,CADD;AAYA;AACA;;AAED,eAAelB,UAAU,CAAEgB,QAAF,CAAzB;AACA,SAAS2C,OAAO,IAAIC,WAApB,QAAuC,OAAvC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,QAAxC;AACA,SAASF,OAAO,IAAIG,YAApB,QAAwC,QAAxC","sourcesContent":["/**\n * External dependencies\n */\nimport { includes } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { forwardRef, useCallback } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT } 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 {Object} ref A ref to the underlying DOM table element.\n */\nfunction TreeGrid(\n\t{ children, onExpandRow = () => {}, onCollapseRow = () => {}, ...props },\n\tref\n) {\n\tconst onKeyDown = useCallback(\n\t\t( event ) => {\n\t\t\tconst { keyCode, metaKey, ctrlKey, altKey, shiftKey } = event;\n\n\t\t\tconst hasModifierKeyPressed =\n\t\t\t\tmetaKey || ctrlKey || altKey || shiftKey;\n\n\t\t\tif (\n\t\t\t\thasModifierKeyPressed ||\n\t\t\t\t! includes( [ UP, DOWN, LEFT, RIGHT ], 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 ( includes( [ LEFT, RIGHT ], 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 ( includes( [ UP, DOWN ], 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// 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 ]\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<table\n\t\t\t\t{ ...props }\n\t\t\t\trole=\"treegrid\"\n\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\tref={ ref }\n\t\t\t>\n\t\t\t\t<tbody>{ children }</tbody>\n\t\t\t</table>\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":["includes","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","props","onKeyDown","event","keyCode","metaKey","ctrlKey","altKey","hasModifierKeyPressed","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,QAAT,QAAyB,QAAzB;AAEA;AACA;AACA;;AACA,SAASC,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;A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MAAAA,KAAK,CAACsB,cAAN;AACA;AACD,GA7N2B,EA8N5B,CAAE3B,WAAF,EAAeC,aAAf,EAA8BC,UAA9B,CA9N4B,CAA7B;AAiOA;;AACA;;AACA,SACC,cAAC,uBAAD,QACC,oCACMC,KADN;AAEC,IAAA,IAAI,EAAC,UAFN;AAGC,IAAA,SAAS,EAAGC,SAHb;AAIC,IAAA,GAAG,EAAGN;AAJP,MAMC,6BAASC,QAAT,CAND,CADD,CADD;AAYA;AACA;;AAED,eAAepB,UAAU,CAAEkB,QAAF,CAAzB;AACA,SAAS2C,OAAO,IAAIC,WAApB,QAAuC,OAAvC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,QAAxC;AACA,SAASF,OAAO,IAAIG,YAApB,QAAwC,QAAxC","sourcesContent":["/**\n * External dependencies\n */\nimport { includes } from 'lodash';\n\n/**\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 {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\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! includes( [ UP, DOWN, LEFT, RIGHT, HOME, END ], 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 ( includes( [ LEFT, RIGHT ], 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 ( includes( [ UP, DOWN ], 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 ( includes( [ HOME, END ], 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// 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<table\n\t\t\t\t{ ...props }\n\t\t\t\trole=\"treegrid\"\n\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\tref={ ref }\n\t\t\t>\n\t\t\t\t<tbody>{ children }</tbody>\n\t\t\t</table>\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"]}
@@ -9,7 +9,7 @@ import { View } from '../view';
9
9
  import useTruncate from './hook';
10
10
  /**
11
11
  * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'span'>} props
12
- * @param {import('react').Ref<any>} forwardedRef
12
+ * @param {import('react').ForwardedRef<any>} forwardedRef
13
13
  */
14
14
 
15
15
  function Truncate(props, forwardedRef) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/truncate/component.js"],"names":["contextConnect","View","useTruncate","Truncate","props","forwardedRef","truncateProps","ConnectedTruncate"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,eAA/B;AACA,SAASC,IAAT,QAAqB,SAArB;AACA,OAAOC,WAAP,MAAwB,QAAxB;AAEA;AACA;AACA;AACA;;AACA,SAASC,QAAT,CAAmBC,KAAnB,EAA0BC,YAA1B,EAAyC;AACxC,QAAMC,aAAa,GAAGJ,WAAW,CAAEE,KAAF,CAAjC;AAEA,SAAO,cAAC,IAAD;AAAM,IAAA,EAAE,EAAC;AAAT,KAAqBE,aAArB;AAAqC,IAAA,GAAG,EAAGD;AAA3C,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,iBAAiB,GAAGP,cAAc,CAAEG,QAAF,EAAY,UAAZ,CAAxC;AAEA,eAAeI,iBAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { contextConnect } from '../ui/context';\nimport { View } from '../view';\nimport useTruncate from './hook';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'span'>} props\n * @param {import('react').Ref<any>} forwardedRef\n */\nfunction Truncate( props, forwardedRef ) {\n\tconst truncateProps = useTruncate( props );\n\n\treturn <View as=\"span\" { ...truncateProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Truncate` is a typography primitive that trims text content.\n * For almost all cases, it is recommended that `Text`, `Heading`, or\n * `Subheading` is used to render text content. However,`Truncate` is\n * available for custom implementations.\n *\n * @example\n * ```jsx\n * import { __experimentalTruncate as Truncate } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Truncate>\n * \t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ex\n * \t\t\tneque, vulputate a diam et, luctus convallis lacus. Vestibulum ac\n * \t\t\tmollis mi. Morbi id elementum massa.\n * \t\t</Truncate>\n * \t);\n * }\n * ```\n */\nconst ConnectedTruncate = contextConnect( Truncate, 'Truncate' );\n\nexport default ConnectedTruncate;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/truncate/component.js"],"names":["contextConnect","View","useTruncate","Truncate","props","forwardedRef","truncateProps","ConnectedTruncate"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,eAA/B;AACA,SAASC,IAAT,QAAqB,SAArB;AACA,OAAOC,WAAP,MAAwB,QAAxB;AAEA;AACA;AACA;AACA;;AACA,SAASC,QAAT,CAAmBC,KAAnB,EAA0BC,YAA1B,EAAyC;AACxC,QAAMC,aAAa,GAAGJ,WAAW,CAAEE,KAAF,CAAjC;AAEA,SAAO,cAAC,IAAD;AAAM,IAAA,EAAE,EAAC;AAAT,KAAqBE,aAArB;AAAqC,IAAA,GAAG,EAAGD;AAA3C,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,iBAAiB,GAAGP,cAAc,CAAEG,QAAF,EAAY,UAAZ,CAAxC;AAEA,eAAeI,iBAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { contextConnect } from '../ui/context';\nimport { View } from '../view';\nimport useTruncate from './hook';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'span'>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef\n */\nfunction Truncate( props, forwardedRef ) {\n\tconst truncateProps = useTruncate( props );\n\n\treturn <View as=\"span\" { ...truncateProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Truncate` is a typography primitive that trims text content.\n * For almost all cases, it is recommended that `Text`, `Heading`, or\n * `Subheading` is used to render text content. However,`Truncate` is\n * available for custom implementations.\n *\n * @example\n * ```jsx\n * import { __experimentalTruncate as Truncate } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Truncate>\n * \t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ex\n * \t\t\tneque, vulputate a diam et, luctus convallis lacus. Vestibulum ac\n * \t\t\tmollis mi. Morbi id elementum massa.\n * \t\t</Truncate>\n * \t);\n * }\n * ```\n */\nconst ConnectedTruncate = contextConnect( Truncate, 'Truncate' );\n\nexport default ConnectedTruncate;\n"]}
@@ -14,7 +14,7 @@ import { useControlGroup } from './hook';
14
14
  import { contextConnect } from '../context';
15
15
  /**
16
16
  * @param {import('../context').WordPressComponentProps<import('./types').Props, 'div'>} props
17
- * @param {import('react').Ref<any>} forwardedRef
17
+ * @param {import('react').ForwardedRef<any>} forwardedRef
18
18
  */
19
19
 
20
20
  function ControlGroup(props, forwardedRef) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/control-group/component.js"],"names":["Flex","Grid","useControlGroup","contextConnect","ControlGroup","props","forwardedRef","children","direction","templateColumns","otherProps","isGrid","ConnectedControlGroup"],"mappings":";;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,YAArB;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,eAAT,QAAgC,QAAhC;AACA,SAASC,cAAT,QAA+B,YAA/B;AAEA;AACA;AACA;AACA;;AACA,SAASC,YAAT,CAAuBC,KAAvB,EAA8BC,YAA9B,EAA6C;AAC5C,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,SAAS,GAAG,KAFP;AAGLC,IAAAA,eAHK;AAIL,OAAGC;AAJE,MAKFR,eAAe,CAAEG,KAAF,CALnB;AAOA,QAAMM,MAAM,GAAG,CAAC,CAAEF,eAAlB;;AAEA,MAAKE,MAAL,EAAc;AACb,WACC,cAAC,IAAD;AACC,MAAA,GAAG,EAAG,CADP;AAEC,MAAA,eAAe,EAAGF;AAFnB,OAGMC,UAHN;AAIC,MAAA,GAAG,EAAGJ;AAJP,QAMGC,QANH,CADD;AAUA;;AAED,SACC,cAAC,IAAD;AACC,IAAA,SAAS,EAAGC,SADb;AAEC,IAAA,GAAG,EAAI;AAFR,KAGME,UAHN;AAIC,IAAA,GAAG,EAAGJ;AAJP,MAMGC,QANH,CADD;AAUA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMK,qBAAqB,GAAGT,cAAc,CAAEC,YAAF,EAAgB,cAAhB,CAA5C;AAEA,eAAeQ,qBAAf","sourcesContent":["/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../../flex';\nimport { Grid } from '../../grid';\nimport { useControlGroup } from './hook';\nimport { contextConnect } from '../context';\n\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').Props, 'div'>} props\n * @param {import('react').Ref<any>} forwardedRef\n */\nfunction ControlGroup( props, forwardedRef ) {\n\tconst {\n\t\tchildren,\n\t\tdirection = 'row',\n\t\ttemplateColumns,\n\t\t...otherProps\n\t} = useControlGroup( props );\n\n\tconst isGrid = !! templateColumns;\n\n\tif ( isGrid ) {\n\t\treturn (\n\t\t\t<Grid\n\t\t\t\tgap={ 0 }\n\t\t\t\ttemplateColumns={ templateColumns }\n\t\t\t\t{ ...otherProps }\n\t\t\t\tref={ forwardedRef }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</Grid>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Flex\n\t\t\tdirection={ direction }\n\t\t\tgap={ `-1px` }\n\t\t\t{ ...otherProps }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ children }\n\t\t</Flex>\n\t);\n}\n\n/**\n * `ControlGroup` is a layout-based component for rendering a group of\n * control-based components, such as `Button`, `Select` or `TextInput`.\n * Control components that render within `ControlGroup` automatically\n * have their borders offset and border-radii rounded.\n *\n * @example\n * ```jsx\n * import { Button, ControlGroup, Select, TextInput } from `@wordpress/components/ui`;\n *\n * function Example() {\n * return (\n * <ControlGroup templateColumns=\"auto 1fr auto\">\n * <Select />\n * <TextInput placeholder=\"First name\" />\n * <Button variant=\"primary\" />\n * </ControlGroup>\n * );\n * }\n * ```\n */\nconst ConnectedControlGroup = contextConnect( ControlGroup, 'ControlGroup' );\n\nexport default ConnectedControlGroup;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/control-group/component.js"],"names":["Flex","Grid","useControlGroup","contextConnect","ControlGroup","props","forwardedRef","children","direction","templateColumns","otherProps","isGrid","ConnectedControlGroup"],"mappings":";;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,YAArB;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,eAAT,QAAgC,QAAhC;AACA,SAASC,cAAT,QAA+B,YAA/B;AAEA;AACA;AACA;AACA;;AACA,SAASC,YAAT,CAAuBC,KAAvB,EAA8BC,YAA9B,EAA6C;AAC5C,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,SAAS,GAAG,KAFP;AAGLC,IAAAA,eAHK;AAIL,OAAGC;AAJE,MAKFR,eAAe,CAAEG,KAAF,CALnB;AAOA,QAAMM,MAAM,GAAG,CAAC,CAAEF,eAAlB;;AAEA,MAAKE,MAAL,EAAc;AACb,WACC,cAAC,IAAD;AACC,MAAA,GAAG,EAAG,CADP;AAEC,MAAA,eAAe,EAAGF;AAFnB,OAGMC,UAHN;AAIC,MAAA,GAAG,EAAGJ;AAJP,QAMGC,QANH,CADD;AAUA;;AAED,SACC,cAAC,IAAD;AACC,IAAA,SAAS,EAAGC,SADb;AAEC,IAAA,GAAG,EAAI;AAFR,KAGME,UAHN;AAIC,IAAA,GAAG,EAAGJ;AAJP,MAMGC,QANH,CADD;AAUA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMK,qBAAqB,GAAGT,cAAc,CAAEC,YAAF,EAAgB,cAAhB,CAA5C;AAEA,eAAeQ,qBAAf","sourcesContent":["/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../../flex';\nimport { Grid } from '../../grid';\nimport { useControlGroup } from './hook';\nimport { contextConnect } from '../context';\n\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').Props, 'div'>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef\n */\nfunction ControlGroup( props, forwardedRef ) {\n\tconst {\n\t\tchildren,\n\t\tdirection = 'row',\n\t\ttemplateColumns,\n\t\t...otherProps\n\t} = useControlGroup( props );\n\n\tconst isGrid = !! templateColumns;\n\n\tif ( isGrid ) {\n\t\treturn (\n\t\t\t<Grid\n\t\t\t\tgap={ 0 }\n\t\t\t\ttemplateColumns={ templateColumns }\n\t\t\t\t{ ...otherProps }\n\t\t\t\tref={ forwardedRef }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</Grid>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Flex\n\t\t\tdirection={ direction }\n\t\t\tgap={ `-1px` }\n\t\t\t{ ...otherProps }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ children }\n\t\t</Flex>\n\t);\n}\n\n/**\n * `ControlGroup` is a layout-based component for rendering a group of\n * control-based components, such as `Button`, `Select` or `TextInput`.\n * Control components that render within `ControlGroup` automatically\n * have their borders offset and border-radii rounded.\n *\n * @example\n * ```jsx\n * import { Button, ControlGroup, Select, TextInput } from `@wordpress/components/ui`;\n *\n * function Example() {\n * return (\n * <ControlGroup templateColumns=\"auto 1fr auto\">\n * <Select />\n * <TextInput placeholder=\"First name\" />\n * <Button variant=\"primary\" />\n * </ControlGroup>\n * );\n * }\n * ```\n */\nconst ConnectedControlGroup = contextConnect( ControlGroup, 'ControlGroup' );\n\nexport default ConnectedControlGroup;\n"]}
@@ -9,7 +9,7 @@ import { View } from '../../view';
9
9
  import { useControlLabel } from './hook';
10
10
  /**
11
11
  * @param {import('../context').WordPressComponentProps<import('./types').Props, 'label', false>} props
12
- * @param {import('react').Ref<any>} forwardedRef
12
+ * @param {import('react').ForwardedRef<any>} forwardedRef
13
13
  */
14
14
 
15
15
  function ControlLabel(props, forwardedRef) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/control-label/component.js"],"names":["contextConnect","View","useControlLabel","ControlLabel","props","forwardedRef","controlLabelProps","ConnectedControlLabel"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,YAA/B;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,eAAT,QAAgC,QAAhC;AAEA;AACA;AACA;AACA;;AACA,SAASC,YAAT,CAAuBC,KAAvB,EAA8BC,YAA9B,EAA6C;AAC5C,QAAMC,iBAAiB,GAAGJ,eAAe,CAAEE,KAAF,CAAzC;AAEA,SAAO,cAAC,IAAD;AAAM,IAAA,EAAE,EAAC;AAAT,KAAsBE,iBAAtB;AAA0C,IAAA,GAAG,EAAGD;AAAhD,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,qBAAqB,GAAGP,cAAc,CAAEG,YAAF,EAAgB,cAAhB,CAA5C;AAEA,eAAeI,qBAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { contextConnect } from '../context';\nimport { View } from '../../view';\nimport { useControlLabel } from './hook';\n\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').Props, 'label', false>} props\n * @param {import('react').Ref<any>} forwardedRef\n */\nfunction ControlLabel( props, forwardedRef ) {\n\tconst controlLabelProps = useControlLabel( props );\n\n\treturn <View as=\"label\" { ...controlLabelProps } ref={ forwardedRef } />;\n}\n\n/**\n * `ControlLabel` is a form component that works with `FormGroup` to provide a\n * label for form elements (e.g. `Switch` or `TextInput`).\n *\n * ```jsx\n * import { ControlLabel, FormGroup, TextInput } from '@wordpress/components/ui';\n *\n * function Example() {\n * \treturn (\n * \t\t<FormGroup>\n * \t\t\t<ControlLabel>First Name</ControlLabel>\n * \t\t\t<TextInput />\n * \t\t</FormGroup>\n * \t);\n * }\n * ```\n */\nconst ConnectedControlLabel = contextConnect( ControlLabel, 'ControlLabel' );\n\nexport default ConnectedControlLabel;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/control-label/component.js"],"names":["contextConnect","View","useControlLabel","ControlLabel","props","forwardedRef","controlLabelProps","ConnectedControlLabel"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,YAA/B;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,eAAT,QAAgC,QAAhC;AAEA;AACA;AACA;AACA;;AACA,SAASC,YAAT,CAAuBC,KAAvB,EAA8BC,YAA9B,EAA6C;AAC5C,QAAMC,iBAAiB,GAAGJ,eAAe,CAAEE,KAAF,CAAzC;AAEA,SAAO,cAAC,IAAD;AAAM,IAAA,EAAE,EAAC;AAAT,KAAsBE,iBAAtB;AAA0C,IAAA,GAAG,EAAGD;AAAhD,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,qBAAqB,GAAGP,cAAc,CAAEG,YAAF,EAAgB,cAAhB,CAA5C;AAEA,eAAeI,qBAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { contextConnect } from '../context';\nimport { View } from '../../view';\nimport { useControlLabel } from './hook';\n\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').Props, 'label', false>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef\n */\nfunction ControlLabel( props, forwardedRef ) {\n\tconst controlLabelProps = useControlLabel( props );\n\n\treturn <View as=\"label\" { ...controlLabelProps } ref={ forwardedRef } />;\n}\n\n/**\n * `ControlLabel` is a form component that works with `FormGroup` to provide a\n * label for form elements (e.g. `Switch` or `TextInput`).\n *\n * ```jsx\n * import { ControlLabel, FormGroup, TextInput } from '@wordpress/components/ui';\n *\n * function Example() {\n * \treturn (\n * \t\t<FormGroup>\n * \t\t\t<ControlLabel>First Name</ControlLabel>\n * \t\t\t<TextInput />\n * \t\t</FormGroup>\n * \t);\n * }\n * ```\n */\nconst ConnectedControlLabel = contextConnect( ControlLabel, 'ControlLabel' );\n\nexport default ConnectedControlLabel;\n"]}
@@ -11,7 +11,7 @@ import FormGroupContent from './form-group-content';
11
11
  import { useFormGroup } from './use-form-group';
12
12
  /**
13
13
  * @param {import('../context').WordPressComponentProps<import('./types').FormGroupProps, 'div'>} props
14
- * @param {import('react').Ref<any>} forwardedRef
14
+ * @param {import('react').ForwardedRef<any>} forwardedRef
15
15
  */
16
16
 
17
17
  function FormGroup(props, forwardedRef) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/form-group/form-group.js"],"names":["contextConnect","Grid","View","FormGroupContent","useFormGroup","FormGroup","props","forwardedRef","contentProps","horizontal","otherProps","ConnectedFormGroup"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,YAA/B;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,SAASC,YAAT,QAA6B,kBAA7B;AAEA;AACA;AACA;AACA;;AACA,SAASC,SAAT,CAAoBC,KAApB,EAA2BC,YAA3B,EAA0C;AACzC,QAAM;AAAEC,IAAAA,YAAF;AAAgBC,IAAAA,UAAhB;AAA4B,OAAGC;AAA/B,MAA8CN,YAAY,CAAEE,KAAF,CAAhE;;AAEA,MAAKG,UAAL,EAAkB;AACjB,WACC,cAAC,IAAD;AACC,MAAA,eAAe,EAAC;AADjB,OAEMC,UAFN;AAGC,MAAA,GAAG,EAAGH;AAHP,QAKC,cAAC,gBAAD,EAAuBC,YAAvB,CALD,CADD;AASA;;AAED,SACC,cAAC,IAAD,eAAWE,UAAX;AAAwB,IAAA,GAAG,EAAGH;AAA9B,MACC,cAAC,gBAAD,EAAuBC,YAAvB,CADD,CADD;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMG,kBAAkB,GAAGX,cAAc,CAAEK,SAAF,EAAa,WAAb,CAAzC;AAEA,eAAeM,kBAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { contextConnect } from '../context';\nimport { Grid } from '../../grid';\nimport { View } from '../../view';\nimport FormGroupContent from './form-group-content';\nimport { useFormGroup } from './use-form-group';\n\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').FormGroupProps, 'div'>} props\n * @param {import('react').Ref<any>} forwardedRef\n */\nfunction FormGroup( props, forwardedRef ) {\n\tconst { contentProps, horizontal, ...otherProps } = useFormGroup( props );\n\n\tif ( horizontal ) {\n\t\treturn (\n\t\t\t<Grid\n\t\t\t\ttemplateColumns=\"minmax(0, 1fr) 2fr\"\n\t\t\t\t{ ...otherProps }\n\t\t\t\tref={ forwardedRef }\n\t\t\t>\n\t\t\t\t<FormGroupContent { ...contentProps } />\n\t\t\t</Grid>\n\t\t);\n\t}\n\n\treturn (\n\t\t<View { ...otherProps } ref={ forwardedRef }>\n\t\t\t<FormGroupContent { ...contentProps } />\n\t\t</View>\n\t);\n}\n\n/**\n * `FormGroup` is a form component that groups a label with a form element (e.g. `Switch` or `TextInput`).\n *\n * @example\n * ```jsx\n * import { FormGroup, TextInput } from `@wordpress/components/ui`;\n *\n * function Example() {\n * \treturn (\n * \t\t<FormGroup label=\"First name\">\n * \t\t\t<TextInput />\n * \t\t</FormGroup>\n * \t);\n * }\n * ```\n */\nconst ConnectedFormGroup = contextConnect( FormGroup, 'FormGroup' );\n\nexport default ConnectedFormGroup;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/form-group/form-group.js"],"names":["contextConnect","Grid","View","FormGroupContent","useFormGroup","FormGroup","props","forwardedRef","contentProps","horizontal","otherProps","ConnectedFormGroup"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,YAA/B;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,SAASC,YAAT,QAA6B,kBAA7B;AAEA;AACA;AACA;AACA;;AACA,SAASC,SAAT,CAAoBC,KAApB,EAA2BC,YAA3B,EAA0C;AACzC,QAAM;AAAEC,IAAAA,YAAF;AAAgBC,IAAAA,UAAhB;AAA4B,OAAGC;AAA/B,MAA8CN,YAAY,CAAEE,KAAF,CAAhE;;AAEA,MAAKG,UAAL,EAAkB;AACjB,WACC,cAAC,IAAD;AACC,MAAA,eAAe,EAAC;AADjB,OAEMC,UAFN;AAGC,MAAA,GAAG,EAAGH;AAHP,QAKC,cAAC,gBAAD,EAAuBC,YAAvB,CALD,CADD;AASA;;AAED,SACC,cAAC,IAAD,eAAWE,UAAX;AAAwB,IAAA,GAAG,EAAGH;AAA9B,MACC,cAAC,gBAAD,EAAuBC,YAAvB,CADD,CADD;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMG,kBAAkB,GAAGX,cAAc,CAAEK,SAAF,EAAa,WAAb,CAAzC;AAEA,eAAeM,kBAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { contextConnect } from '../context';\nimport { Grid } from '../../grid';\nimport { View } from '../../view';\nimport FormGroupContent from './form-group-content';\nimport { useFormGroup } from './use-form-group';\n\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').FormGroupProps, 'div'>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef\n */\nfunction FormGroup( props, forwardedRef ) {\n\tconst { contentProps, horizontal, ...otherProps } = useFormGroup( props );\n\n\tif ( horizontal ) {\n\t\treturn (\n\t\t\t<Grid\n\t\t\t\ttemplateColumns=\"minmax(0, 1fr) 2fr\"\n\t\t\t\t{ ...otherProps }\n\t\t\t\tref={ forwardedRef }\n\t\t\t>\n\t\t\t\t<FormGroupContent { ...contentProps } />\n\t\t\t</Grid>\n\t\t);\n\t}\n\n\treturn (\n\t\t<View { ...otherProps } ref={ forwardedRef }>\n\t\t\t<FormGroupContent { ...contentProps } />\n\t\t</View>\n\t);\n}\n\n/**\n * `FormGroup` is a form component that groups a label with a form element (e.g. `Switch` or `TextInput`).\n *\n * @example\n * ```jsx\n * import { FormGroup, TextInput } from `@wordpress/components/ui`;\n *\n * function Example() {\n * \treturn (\n * \t\t<FormGroup label=\"First name\">\n * \t\t\t<TextInput />\n * \t\t</FormGroup>\n * \t);\n * }\n * ```\n */\nconst ConnectedFormGroup = contextConnect( FormGroup, 'FormGroup' );\n\nexport default ConnectedFormGroup;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/shortcut/component.tsx"],"names":["useContextSystem","contextConnect","View","Shortcut","props","forwardedRef","as","asProp","shortcut","className","otherProps","displayText","ariaLabel","display","ConnectedShortcut"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,gBADD,EAECC,cAFD,QAIO,YAJP;AAKA,SAASC,IAAT,QAAqB,YAArB;;AAYA,SAASC,QAAT,CACCC,KADD,EAECC,YAFD,EAGsB;AACrB,QAAM;AACLC,IAAAA,EAAE,EAAEC,MAAM,GAAG,MADR;AAELC,IAAAA,QAFK;AAGLC,IAAAA,SAHK;AAIL,OAAGC;AAJE,MAKFV,gBAAgB,CAAEI,KAAF,EAAS,UAAT,CALpB;;AAMA,MAAK,CAAEI,QAAP,EAAkB;AACjB,WAAO,IAAP;AACA;;AAED,MAAIG,WAAJ;AACA,MAAIC,SAAJ;;AAEA,MAAK,OAAOJ,QAAP,KAAoB,QAAzB,EAAoC;AACnCG,IAAAA,WAAW,GAAGH,QAAd;AACA,GAFD,MAEO;AACNG,IAAAA,WAAW,GAAGH,QAAQ,CAACK,OAAvB;AACAD,IAAAA,SAAS,GAAGJ,QAAQ,CAACI,SAArB;AACA;;AAED,SACC,cAAC,IAAD;AACC,IAAA,EAAE,EAAGL,MADN;AAEC,IAAA,SAAS,EAAGE,SAFb;AAGC,kBAAaG,SAHd;AAIC,IAAA,GAAG,EAAGP;AAJP,KAKMK,UALN,GAOGC,WAPH,CADD;AAWA;;AAED,MAAMG,iBAAiB,GAAGb,cAAc,CAAEE,QAAF,EAAY,UAAZ,CAAxC;AAEA,eAAeW,iBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { Ref } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseContextSystem,\n\tcontextConnect,\n\tWordPressComponentProps,\n} from '../context';\nimport { View } from '../../view';\n\nexport interface ShortcutDescription {\n\tdisplay: string;\n\tariaLabel: string;\n}\n\nexport interface Props {\n\tshortcut?: ShortcutDescription | string;\n\tclassName?: string;\n}\n\nfunction Shortcut(\n\tprops: WordPressComponentProps< Props, 'span' >,\n\tforwardedRef: Ref< any >\n): JSX.Element | null {\n\tconst {\n\t\tas: asProp = 'span',\n\t\tshortcut,\n\t\tclassName,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Shortcut' );\n\tif ( ! shortcut ) {\n\t\treturn null;\n\t}\n\n\tlet displayText: string;\n\tlet ariaLabel: string | undefined;\n\n\tif ( typeof shortcut === 'string' ) {\n\t\tdisplayText = shortcut;\n\t} else {\n\t\tdisplayText = shortcut.display;\n\t\tariaLabel = shortcut.ariaLabel;\n\t}\n\n\treturn (\n\t\t<View\n\t\t\tas={ asProp }\n\t\t\tclassName={ className }\n\t\t\taria-label={ ariaLabel }\n\t\t\tref={ forwardedRef }\n\t\t\t{ ...otherProps }\n\t\t>\n\t\t\t{ displayText }\n\t\t</View>\n\t);\n}\n\nconst ConnectedShortcut = contextConnect( Shortcut, 'Shortcut' );\n\nexport default ConnectedShortcut;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/shortcut/component.tsx"],"names":["useContextSystem","contextConnect","View","Shortcut","props","forwardedRef","as","asProp","shortcut","className","otherProps","displayText","ariaLabel","display","ConnectedShortcut"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,gBADD,EAECC,cAFD,QAIO,YAJP;AAKA,SAASC,IAAT,QAAqB,YAArB;;AAYA,SAASC,QAAT,CACCC,KADD,EAECC,YAFD,EAGsB;AACrB,QAAM;AACLC,IAAAA,EAAE,EAAEC,MAAM,GAAG,MADR;AAELC,IAAAA,QAFK;AAGLC,IAAAA,SAHK;AAIL,OAAGC;AAJE,MAKFV,gBAAgB,CAAEI,KAAF,EAAS,UAAT,CALpB;;AAMA,MAAK,CAAEI,QAAP,EAAkB;AACjB,WAAO,IAAP;AACA;;AAED,MAAIG,WAAJ;AACA,MAAIC,SAAJ;;AAEA,MAAK,OAAOJ,QAAP,KAAoB,QAAzB,EAAoC;AACnCG,IAAAA,WAAW,GAAGH,QAAd;AACA,GAFD,MAEO;AACNG,IAAAA,WAAW,GAAGH,QAAQ,CAACK,OAAvB;AACAD,IAAAA,SAAS,GAAGJ,QAAQ,CAACI,SAArB;AACA;;AAED,SACC,cAAC,IAAD;AACC,IAAA,EAAE,EAAGL,MADN;AAEC,IAAA,SAAS,EAAGE,SAFb;AAGC,kBAAaG,SAHd;AAIC,IAAA,GAAG,EAAGP;AAJP,KAKMK,UALN,GAOGC,WAPH,CADD;AAWA;;AAED,MAAMG,iBAAiB,GAAGb,cAAc,CAAEE,QAAF,EAAY,UAAZ,CAAxC;AAEA,eAAeW,iBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseContextSystem,\n\tcontextConnect,\n\tWordPressComponentProps,\n} from '../context';\nimport { View } from '../../view';\n\nexport interface ShortcutDescription {\n\tdisplay: string;\n\tariaLabel: string;\n}\n\nexport interface Props {\n\tshortcut?: ShortcutDescription | string;\n\tclassName?: string;\n}\n\nfunction Shortcut(\n\tprops: WordPressComponentProps< Props, 'span' >,\n\tforwardedRef: ForwardedRef< any >\n): JSX.Element | null {\n\tconst {\n\t\tas: asProp = 'span',\n\t\tshortcut,\n\t\tclassName,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Shortcut' );\n\tif ( ! shortcut ) {\n\t\treturn null;\n\t}\n\n\tlet displayText: string;\n\tlet ariaLabel: string | undefined;\n\n\tif ( typeof shortcut === 'string' ) {\n\t\tdisplayText = shortcut;\n\t} else {\n\t\tdisplayText = shortcut.display;\n\t\tariaLabel = shortcut.ariaLabel;\n\t}\n\n\treturn (\n\t\t<View\n\t\t\tas={ asProp }\n\t\t\tclassName={ className }\n\t\t\taria-label={ ariaLabel }\n\t\t\tref={ forwardedRef }\n\t\t\t{ ...otherProps }\n\t\t>\n\t\t\t{ displayText }\n\t\t</View>\n\t);\n}\n\nconst ConnectedShortcut = contextConnect( Shortcut, 'Shortcut' );\n\nexport default ConnectedShortcut;\n"]}
@@ -21,7 +21,7 @@ import { COLORS } from '../../utils/colors-values';
21
21
  /**
22
22
  *
23
23
  * @param {import('../context').WordPressComponentProps<Props, 'div'>} props
24
- * @param {import('react').Ref<any>} forwardedRef
24
+ * @param {import('react').ForwardedRef<any>} forwardedRef
25
25
  */
26
26
 
27
27
  function Spinner(props, forwardedRef) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/spinner/component.js"],"names":["BarsView","BarsWrapperView","ContainerView","BASE_SIZE","WRAPPER_SIZE","contextConnect","useContextSystem","COLORS","Spinner","props","forwardedRef","color","black","size","otherProps","ratio","scale","transform","styles","height","width"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,eAAnB,EAAoCC,aAApC,QAAyD,UAAzD;AACA,SAASC,SAAT,EAAoBC,YAApB,QAAwC,SAAxC;AACA,SAASC,cAAT,EAAyBC,gBAAzB,QAAiD,YAAjD;AACA,SAASC,MAAT,QAAuB,2BAAvB;AAEA;;AACA;AACA;AACA;AACA;AACA;;AACA;;AAEA;AACA;AACA;AACA;AACA;;AACA,SAASC,OAAT,CAAkBC,KAAlB,EAAyBC,YAAzB,EAAwC;AACvC,QAAM;AACLC,IAAAA,KAAK,GAAGJ,MAAM,CAACK,KADV;AAELC,IAAAA,IAAI,GAAGV,SAFF;AAGL,OAAGW;AAHE,MAIFR,gBAAgB,CAAEG,KAAF,EAAS,SAAT,CAJpB;AAKA,QAAMM,KAAK,GAAGF,IAAI,GAAGV,SAArB;AACA,QAAMa,KAAK,GAAKD,KAAK,GAAGZ,SAAV,GAAwBC,YAAtC;AACA,QAAMa,SAAS,GAAI,SAASD,KAAO,GAAnC;AAEA,QAAME,MAAM,GAAG;AAAED,IAAAA;AAAF,GAAf;AAEA,SACC,cAAC,aAAD,eACMH,UADN;AAEC,iBAAY,IAFb;AAGC,IAAA,GAAG,EAAGJ,YAHP;AAIC,IAAA,KAAK,EAAG;AAAES,MAAAA,MAAM,EAAEN,IAAV;AAAgBO,MAAAA,KAAK,EAAEP;AAAvB;AAJT,MAMC,cAAC,eAAD;AAAiB,mBAAc,IAA/B;AAAsC,IAAA,KAAK,EAAGK;AAA9C,KACC,cAAC,QAAD;AAAU,IAAA,KAAK,EAAG;AAAEP,MAAAA;AAAF;AAAlB,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,IADD,EAEC;AAAK,IAAA,SAAS,EAAC;AAAf,IAFD,EAGC;AAAK,IAAA,SAAS,EAAC;AAAf,IAHD,EAIC;AAAK,IAAA,SAAS,EAAC;AAAf,IAJD,EAKC;AAAK,IAAA,SAAS,EAAC;AAAf,IALD,EAMC;AAAK,IAAA,SAAS,EAAC;AAAf,IAND,EAOC;AAAK,IAAA,SAAS,EAAC;AAAf,IAPD,EAQC;AAAK,IAAA,SAAS,EAAC;AAAf,IARD,EASC;AAAK,IAAA,SAAS,EAAC;AAAf,IATD,EAUC;AAAK,IAAA,SAAS,EAAC;AAAf,IAVD,EAWC;AAAK,IAAA,SAAS,EAAC;AAAf,IAXD,EAYC;AAAK,IAAA,SAAS,EAAC;AAAf,IAZD,CADD,CAND,CADD;AAyBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,eAAeN,cAAc,CAAEG,OAAF,EAAW,SAAX,CAA7B","sourcesContent":["/**\n * Internal dependencies\n */\nimport { BarsView, BarsWrapperView, ContainerView } from './styles';\nimport { BASE_SIZE, WRAPPER_SIZE } from './utils';\nimport { contextConnect, useContextSystem } from '../context';\nimport { COLORS } from '../../utils/colors-values';\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * @typedef Props\n * @property {import('react').CSSProperties['color']} [color] Color of `Spinner`.\n * @property {number} [size=16] Size of `Spinner`.\n */\n/* eslint-enable jsdoc/valid-types */\n\n/**\n *\n * @param {import('../context').WordPressComponentProps<Props, 'div'>} props\n * @param {import('react').Ref<any>} forwardedRef\n */\nfunction Spinner( props, forwardedRef ) {\n\tconst {\n\t\tcolor = COLORS.black,\n\t\tsize = BASE_SIZE,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Spinner' );\n\tconst ratio = size / BASE_SIZE;\n\tconst scale = ( ratio * BASE_SIZE ) / WRAPPER_SIZE;\n\tconst transform = `scale(${ scale })`;\n\n\tconst styles = { transform };\n\n\treturn (\n\t\t<ContainerView\n\t\t\t{ ...otherProps }\n\t\t\taria-busy={ true }\n\t\t\tref={ forwardedRef }\n\t\t\tstyle={ { height: size, width: size } }\n\t\t>\n\t\t\t<BarsWrapperView aria-hidden={ true } style={ styles }>\n\t\t\t\t<BarsView style={ { color } }>\n\t\t\t\t\t<div className=\"InnerBar1\" />\n\t\t\t\t\t<div className=\"InnerBar2\" />\n\t\t\t\t\t<div className=\"InnerBar3\" />\n\t\t\t\t\t<div className=\"InnerBar4\" />\n\t\t\t\t\t<div className=\"InnerBar5\" />\n\t\t\t\t\t<div className=\"InnerBar6\" />\n\t\t\t\t\t<div className=\"InnerBar7\" />\n\t\t\t\t\t<div className=\"InnerBar8\" />\n\t\t\t\t\t<div className=\"InnerBar9\" />\n\t\t\t\t\t<div className=\"InnerBar10\" />\n\t\t\t\t\t<div className=\"InnerBar11\" />\n\t\t\t\t\t<div className=\"InnerBar12\" />\n\t\t\t\t</BarsView>\n\t\t\t</BarsWrapperView>\n\t\t</ContainerView>\n\t);\n}\n\n/**\n * `Spinner` is a component that notify users that their action is being processed.\n *\n * @example\n * ```jsx\n * import { Spinner } from `@wordpress/components/ui`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Spinner />\n * \t);\n * }\n * ```\n */\nexport default contextConnect( Spinner, 'Spinner' );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/spinner/component.js"],"names":["BarsView","BarsWrapperView","ContainerView","BASE_SIZE","WRAPPER_SIZE","contextConnect","useContextSystem","COLORS","Spinner","props","forwardedRef","color","black","size","otherProps","ratio","scale","transform","styles","height","width"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,QAA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AK,IAAA,SAAS,EAAC;AAAf,IAPD,EAQC;AAAK,IAAA,SAAS,EAAC;AAAf,IARD,EASC;AAAK,IAAA,SAAS,EAAC;AAAf,IATD,EAUC;AAAK,IAAA,SAAS,EAAC;AAAf,IAVD,EAWC;AAAK,IAAA,SAAS,EAAC;AAAf,IAXD,EAYC;AAAK,IAAA,SAAS,EAAC;AAAf,IAZD,CADD,CAND,CADD;AAyBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,eAAeN,cAAc,CAAEG,OAAF,EAAW,SAAX,CAA7B","sourcesContent":["/**\n * Internal dependencies\n */\nimport { BarsView, BarsWrapperView, ContainerView } from './styles';\nimport { BASE_SIZE, WRAPPER_SIZE } from './utils';\nimport { contextConnect, useContextSystem } from '../context';\nimport { COLORS } from '../../utils/colors-values';\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * @typedef Props\n * @property {import('react').CSSProperties['color']} [color] Color of `Spinner`.\n * @property {number} [size=16] Size of `Spinner`.\n */\n/* eslint-enable jsdoc/valid-types */\n\n/**\n *\n * @param {import('../context').WordPressComponentProps<Props, 'div'>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef\n */\nfunction Spinner( props, forwardedRef ) {\n\tconst {\n\t\tcolor = COLORS.black,\n\t\tsize = BASE_SIZE,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Spinner' );\n\tconst ratio = size / BASE_SIZE;\n\tconst scale = ( ratio * BASE_SIZE ) / WRAPPER_SIZE;\n\tconst transform = `scale(${ scale })`;\n\n\tconst styles = { transform };\n\n\treturn (\n\t\t<ContainerView\n\t\t\t{ ...otherProps }\n\t\t\taria-busy={ true }\n\t\t\tref={ forwardedRef }\n\t\t\tstyle={ { height: size, width: size } }\n\t\t>\n\t\t\t<BarsWrapperView aria-hidden={ true } style={ styles }>\n\t\t\t\t<BarsView style={ { color } }>\n\t\t\t\t\t<div className=\"InnerBar1\" />\n\t\t\t\t\t<div className=\"InnerBar2\" />\n\t\t\t\t\t<div className=\"InnerBar3\" />\n\t\t\t\t\t<div className=\"InnerBar4\" />\n\t\t\t\t\t<div className=\"InnerBar5\" />\n\t\t\t\t\t<div className=\"InnerBar6\" />\n\t\t\t\t\t<div className=\"InnerBar7\" />\n\t\t\t\t\t<div className=\"InnerBar8\" />\n\t\t\t\t\t<div className=\"InnerBar9\" />\n\t\t\t\t\t<div className=\"InnerBar10\" />\n\t\t\t\t\t<div className=\"InnerBar11\" />\n\t\t\t\t\t<div className=\"InnerBar12\" />\n\t\t\t\t</BarsView>\n\t\t\t</BarsWrapperView>\n\t\t</ContainerView>\n\t);\n}\n\n/**\n * `Spinner` is a component that notify users that their action is being processed.\n *\n * @example\n * ```jsx\n * import { Spinner } from `@wordpress/components/ui`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Spinner />\n * \t);\n * }\n * ```\n */\nexport default contextConnect( Spinner, 'Spinner' );\n"]}
@@ -21,7 +21,7 @@ import TooltipContent from './content';
21
21
  import { TooltipShortcut } from './styles';
22
22
  /**
23
23
  * @param {import('../context').WordPressComponentProps<import('./types').Props, 'div'>} props
24
- * @param {import('react').Ref<any>} forwardedRef
24
+ * @param {import('react').ForwardedRef<any>} forwardedRef
25
25
  */
26
26
 
27
27
  function Tooltip(props, forwardedRef) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/tooltip/component.js"],"names":["TooltipReference","useTooltipState","useMemo","cloneElement","contextConnect","useContextSystem","TooltipContext","TooltipContent","TooltipShortcut","Tooltip","props","forwardedRef","animated","animationDuration","baseId","children","content","focusable","gutter","id","modal","placement","visible","shortcut","otherProps","tooltip","undefined","contextProps","ref","referenceProps","tabIndex","ConnectedTooltip"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,eAA3B,QAAkD,QAAlD;AAEA;AACA;AACA;;AACA,SAASC,OAAT,EAAkBC,YAAlB,QAAsC,oBAAtC;AAEA;AACA;AACA;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Ff,CAFF,EAOGR,QAAQ,IACT,cAAC,gBAAD,eACMU,OADN,EAEMV,QAAQ,CAACL,KAFf;AAGC;AACA,IAAA,GAAG,EAAGK,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAEa;AAJjB,MAMKC,cAAF,IAAsB;AACvB,QAAK,CAAEZ,SAAP,EAAmB;AAClBY,MAAAA,cAAc,CAACC,QAAf,GAA0BJ,SAA1B;AACA;;AACD,WAAOvB,YAAY,CAAEY,QAAF,EAAYc,cAAZ,CAAnB;AACA,GAXF,CARF,CADD;AAyBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,gBAAgB,GAAG3B,cAAc,CAAEK,OAAF,EAAW,SAAX,CAAvC;AAEA,eAAesB,gBAAf","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { TooltipReference, useTooltipState } from 'reakit';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, cloneElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, useContextSystem } from '../context';\nimport { TooltipContext } from './context';\nimport TooltipContent from './content';\nimport { TooltipShortcut } from './styles';\n\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').Props, 'div'>} props\n * @param {import('react').Ref<any>} forwardedRef\n */\nfunction Tooltip( props, forwardedRef ) {\n\tconst {\n\t\tanimated = true,\n\t\tanimationDuration = 160,\n\t\tbaseId,\n\t\tchildren,\n\t\tcontent,\n\t\tfocusable = true,\n\t\tgutter = 4,\n\t\tid,\n\t\tmodal = true,\n\t\tplacement,\n\t\tvisible = false,\n\t\tshortcut,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Tooltip' );\n\n\tconst tooltip = useTooltipState( {\n\t\tanimated: animated ? animationDuration : undefined,\n\t\tbaseId: baseId || id,\n\t\tgutter,\n\t\tplacement,\n\t\tvisible,\n\t\t...otherProps,\n\t} );\n\n\tconst contextProps = useMemo(\n\t\t() => ( {\n\t\t\ttooltip,\n\t\t} ),\n\t\t[ tooltip ]\n\t);\n\n\treturn (\n\t\t<TooltipContext.Provider value={ contextProps }>\n\t\t\t{ content && (\n\t\t\t\t<TooltipContent unstable_portal={ modal } ref={ forwardedRef }>\n\t\t\t\t\t{ content }\n\t\t\t\t\t{ shortcut && <TooltipShortcut shortcut={ shortcut } /> }\n\t\t\t\t</TooltipContent>\n\t\t\t) }\n\t\t\t{ children && (\n\t\t\t\t<TooltipReference\n\t\t\t\t\t{ ...tooltip }\n\t\t\t\t\t{ ...children.props }\n\t\t\t\t\t// @ts-ignore If ref doesn't exist that's fine with us, it'll just be undefined, but it can exist on ReactElement and there's no reason to try to scope this (it'll just overcomplicate things)\n\t\t\t\t\tref={ children?.ref }\n\t\t\t\t>\n\t\t\t\t\t{ ( referenceProps ) => {\n\t\t\t\t\t\tif ( ! focusable ) {\n\t\t\t\t\t\t\treferenceProps.tabIndex = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn cloneElement( children, referenceProps );\n\t\t\t\t\t} }\n\t\t\t\t</TooltipReference>\n\t\t\t) }\n\t\t</TooltipContext.Provider>\n\t);\n}\n\n/**\n * `Tooltip` is a component that provides context for a user interface element.\n *\n * @example\n * ```jsx\n * import { Tooltip, Text } from `@wordpress/components/ui`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Tooltip content=\"Code is Poetry\">\n * \t\t\t<Text>WordPress.org</Text>\n * \t\t</Tooltip>\n * \t)\n * }\n * ```\n */\nconst ConnectedTooltip = contextConnect( Tooltip, 'Tooltip' );\n\nexport default ConnectedTooltip;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/tooltip/component.js"],"names":["TooltipReference","useTooltipState","useMemo","cloneElement","contextConnect","useContextSystem","TooltipContext","TooltipContent","TooltipShortcut","Tooltip","props","forwardedRef","animated","animationDuration","baseId","children","content","focusable","gutter","id","modal","placement","visible","shortcut","otherProps","tooltip","undefined","contextProps","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AGE;AAAjC,KACGX,OAAO,IACR,cAAC,cAAD;AAAgB,IAAA,eAAe,EAAGI,KAAlC;AAA0C,IAAA,GAAG,EAAGT;AAAhD,KACGK,OADH,EAEGO,QAAQ,IAAI,cAAC,eAAD;AAAiB,IAAA,QAAQ,EAAGA;AAA5B,IAFf,CAFF,EAOGR,QAAQ,IACT,cAAC,gBAAD,eACMU,OADN,EAEMV,QAAQ,CAACL,KAFf;AAGC;AACA,IAAA,GAAG,EAAGK,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAEa;AAJjB,MAMKC,cAAF,IAAsB;AACvB,QAAK,CAAEZ,SAAP,EAAmB;AAClBY,MAAAA,cAAc,CAACC,QAAf,GAA0BJ,SAA1B;AACA;;AACD,WAAOvB,YAAY,CAAEY,QAAF,EAAYc,cAAZ,CAAnB;AACA,GAXF,CARF,CADD;AAyBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,gBAAgB,GAAG3B,cAAc,CAAEK,OAAF,EAAW,SAAX,CAAvC;AAEA,eAAesB,gBAAf","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { TooltipReference, useTooltipState } from 'reakit';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, cloneElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, useContextSystem } from '../context';\nimport { TooltipContext } from './context';\nimport TooltipContent from './content';\nimport { TooltipShortcut } from './styles';\n\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').Props, 'div'>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef\n */\nfunction Tooltip( props, forwardedRef ) {\n\tconst {\n\t\tanimated = true,\n\t\tanimationDuration = 160,\n\t\tbaseId,\n\t\tchildren,\n\t\tcontent,\n\t\tfocusable = true,\n\t\tgutter = 4,\n\t\tid,\n\t\tmodal = true,\n\t\tplacement,\n\t\tvisible = false,\n\t\tshortcut,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Tooltip' );\n\n\tconst tooltip = useTooltipState( {\n\t\tanimated: animated ? animationDuration : undefined,\n\t\tbaseId: baseId || id,\n\t\tgutter,\n\t\tplacement,\n\t\tvisible,\n\t\t...otherProps,\n\t} );\n\n\tconst contextProps = useMemo(\n\t\t() => ( {\n\t\t\ttooltip,\n\t\t} ),\n\t\t[ tooltip ]\n\t);\n\n\treturn (\n\t\t<TooltipContext.Provider value={ contextProps }>\n\t\t\t{ content && (\n\t\t\t\t<TooltipContent unstable_portal={ modal } ref={ forwardedRef }>\n\t\t\t\t\t{ content }\n\t\t\t\t\t{ shortcut && <TooltipShortcut shortcut={ shortcut } /> }\n\t\t\t\t</TooltipContent>\n\t\t\t) }\n\t\t\t{ children && (\n\t\t\t\t<TooltipReference\n\t\t\t\t\t{ ...tooltip }\n\t\t\t\t\t{ ...children.props }\n\t\t\t\t\t// @ts-ignore If ref doesn't exist that's fine with us, it'll just be undefined, but it can exist on ReactElement and there's no reason to try to scope this (it'll just overcomplicate things)\n\t\t\t\t\tref={ children?.ref }\n\t\t\t\t>\n\t\t\t\t\t{ ( referenceProps ) => {\n\t\t\t\t\t\tif ( ! focusable ) {\n\t\t\t\t\t\t\treferenceProps.tabIndex = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn cloneElement( children, referenceProps );\n\t\t\t\t\t} }\n\t\t\t\t</TooltipReference>\n\t\t\t) }\n\t\t</TooltipContext.Provider>\n\t);\n}\n\n/**\n * `Tooltip` is a component that provides context for a user interface element.\n *\n * @example\n * ```jsx\n * import { Tooltip, Text } from `@wordpress/components/ui`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Tooltip content=\"Code is Poetry\">\n * \t\t\t<Text>WordPress.org</Text>\n * \t\t</Tooltip>\n * \t)\n * }\n * ```\n */\nconst ConnectedTooltip = contextConnect( Tooltip, 'Tooltip' );\n\nexport default ConnectedTooltip;\n"]}
@@ -21,7 +21,7 @@ const {
21
21
  /**
22
22
  *
23
23
  * @param {import('../context').WordPressComponentProps<import('./types').ContentProps, 'div'>} props
24
- * @param {import('react').Ref<any>} forwardedRef
24
+ * @param {import('react').ForwardedRef<any>} forwardedRef
25
25
  */
26
26
 
27
27
  function TooltipContent(props, forwardedRef) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/tooltip/content.js"],"names":["Tooltip","ReakitTooltip","contextConnect","useContextSystem","View","useTooltipContext","styles","useCx","TooltipPopoverView","TooltipContent","props","forwardedRef","children","className","otherProps","tooltip","cx","classes"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,aAApB,QAAyC,QAAzC;AAEA;AACA;AACA;;AACA,SAASC,cAAT,EAAyBC,gBAAzB,QAAiD,YAAjD;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,iBAAT,QAAkC,WAAlC;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,SAASC,KAAT,QAAsB,0BAAtB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAyBF,MAA/B;AAEA;AACA;AACA;AACA;AACA;;AACA,SAASG,cAAT,CAAyBC,KAAzB,EAAgCC,YAAhC,EAA+C;AAC9C,QAAM;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,SAAZ;AAAuB,OAAGC;AAA1B,MAAyCX,gBAAgB,CAC9DO,KAD8D,EAE9D,gBAF8D,CAA/D;AAIA,QAAM;AAAEK,IAAAA;AAAF,MAAcV,iBAAiB,EAArC;AACA,QAAMW,EAAE,GAAGT,KAAK,EAAhB;AACA,QAAMU,OAAO,GAAGD,EAAE,CAAEV,MAAM,CAACG,cAAT,EAAyBI,SAAzB,CAAlB;AAEA,SACC,cAAC,aAAD;AACC,IAAA,EAAE,EAAGT;AADN,KAEMU,UAFN,EAGMC,OAHN;AAIC,IAAA,SAAS,EAAGE,OAJb;AAKC,IAAA,GAAG,EAAGN;AALP,MAOC,cAAC,kBAAD,QAAsBC,QAAtB,CAPD,CADD;AAWA;;AAED,eAAeV,cAAc,CAAEO,cAAF,EAAkB,gBAAlB,CAA7B","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { Tooltip as ReakitTooltip } from 'reakit';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, useContextSystem } from '../context';\nimport { View } from '../../view';\nimport { useTooltipContext } from './context';\nimport * as styles from './styles';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nconst { TooltipPopoverView } = styles;\n\n/**\n *\n * @param {import('../context').WordPressComponentProps<import('./types').ContentProps, 'div'>} props\n * @param {import('react').Ref<any>} forwardedRef\n */\nfunction TooltipContent( props, forwardedRef ) {\n\tconst { children, className, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'TooltipContent'\n\t);\n\tconst { tooltip } = useTooltipContext();\n\tconst cx = useCx();\n\tconst classes = cx( styles.TooltipContent, className );\n\n\treturn (\n\t\t<ReakitTooltip\n\t\t\tas={ View }\n\t\t\t{ ...otherProps }\n\t\t\t{ ...tooltip }\n\t\t\tclassName={ classes }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t<TooltipPopoverView>{ children }</TooltipPopoverView>\n\t\t</ReakitTooltip>\n\t);\n}\n\nexport default contextConnect( TooltipContent, 'TooltipContent' );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/ui/tooltip/content.js"],"names":["Tooltip","ReakitTooltip","contextConnect","useContextSystem","View","useTooltipContext","styles","useCx","TooltipPopoverView","TooltipContent","props","forwardedRef","children","className","otherProps","tooltip","cx","classes"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,aAApB,QAAyC,QAAzC;AAEA;AACA;AACA;;AACA,SAASC,cAAT,EAAyBC,gBAAzB,QAAiD,YAAjD;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,iBAAT,QAAkC,WAAlC;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,SAASC,KAAT,QAAsB,0BAAtB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAyBF,MAA/B;AAEA;AACA;AACA;AACA;AACA;;AACA,SAASG,cAAT,CAAyBC,KAAzB,EAAgCC,YAAhC,EAA+C;AAC9C,QAAM;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,SAAZ;AAAuB,OAAGC;AAA1B,MAAyCX,gBAAgB,CAC9DO,KAD8D,EAE9D,gBAF8D,CAA/D;AAIA,QAAM;AAAEK,IAAAA;AAAF,MAAcV,iBAAiB,EAArC;AACA,QAAMW,EAAE,GAAGT,KAAK,EAAhB;AACA,QAAMU,OAAO,GAAGD,EAAE,CAAEV,MAAM,CAACG,cAAT,EAAyBI,SAAzB,CAAlB;AAEA,SACC,cAAC,aAAD;AACC,IAAA,EAAE,EAAGT;AADN,KAEMU,UAFN,EAGMC,OAHN;AAIC,IAAA,SAAS,EAAGE,OAJb;AAKC,IAAA,GAAG,EAAGN;AALP,MAOC,cAAC,kBAAD,QAAsBC,QAAtB,CAPD,CADD;AAWA;;AAED,eAAeV,cAAc,CAAEO,cAAF,EAAkB,gBAAlB,CAA7B","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { Tooltip as ReakitTooltip } from 'reakit';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, useContextSystem } from '../context';\nimport { View } from '../../view';\nimport { useTooltipContext } from './context';\nimport * as styles from './styles';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nconst { TooltipPopoverView } = styles;\n\n/**\n *\n * @param {import('../context').WordPressComponentProps<import('./types').ContentProps, 'div'>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef\n */\nfunction TooltipContent( props, forwardedRef ) {\n\tconst { children, className, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'TooltipContent'\n\t);\n\tconst { tooltip } = useTooltipContext();\n\tconst cx = useCx();\n\tconst classes = cx( styles.TooltipContent, className );\n\n\treturn (\n\t\t<ReakitTooltip\n\t\t\tas={ View }\n\t\t\t{ ...otherProps }\n\t\t\t{ ...tooltip }\n\t\t\tclassName={ classes }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t<TooltipPopoverView>{ children }</TooltipPopoverView>\n\t\t</ReakitTooltip>\n\t);\n}\n\nexport default contextConnect( TooltipContent, 'TooltipContent' );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/unit-control/index.tsx"],"names":["noop","omit","classnames","forwardRef","useMemo","useRef","__","ENTER","inputControlActionTypes","composeStateReducers","Root","ValueInput","UnitSelectControl","CSS_UNITS","getParsedValue","getUnitsWithCurrentUnit","getValidParsedUnit","useControlledState","UnitControl","forwardedRef","__unstableStateReducer","stateReducer","state","autoComplete","className","disabled","disableUnits","isPressEnterToChange","isResetValueOnUnitChange","isUnitSelectTabbable","label","onChange","onUnitChange","size","style","unit","unitProp","units","unitsProp","value","valueProp","props","initialUnit","setUnit","initial","fallback","refParsedValue","classes","handleOnChange","next","changeProps","join","handleOnUnitChange","data","nextValue","default","undefined","mayUpdateUnit","event","isNaN","Number","currentTarget","current","parsedValue","parsedUnit","toString","Array","isArray","find","option","handleOnBlur","handleOnKeyDown","keyCode","unitControlStateReducer","action","type","COMMIT","inputSuffix","step","activeUnit","ForwardedUnitControl","parseUnit","useCustomUnits"],"mappings":";;;AAAA;AACA;AACA;AAOA,SAASA,IAAT,EAAeC,IAAf,QAA2B,QAA3B;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,OAArB,EAA8BC,MAA9B,QAA4C,oBAA5C;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,KAAT,QAAsB,qBAAtB;AAEA;AACA;AACA;;AAEA,OAAO,KAAKC,uBAAZ,MAAyC,kCAAzC;AACA,SAASC,oBAAT,QAAqC,kCAArC;AACA,SAASC,IAAT,EAAeC,UAAf,QAAiC,8BAAjC;AACA,OAAOC,iBAAP,MAA8B,uB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SAAS,EAAGC,eAXb;AAYC,IAAA,QAAQ,EAAGvB,cAZZ;AAaC,IAAA,GAAG,EAAG7B,YAbP;AAcC,IAAA,IAAI,EAAGc,IAdR;AAeC,IAAA,MAAM,EAAG4C,WAfV;AAgBC,IAAA,KAAK,EAAGtC,KAhBT;AAiBC,IAAA,IAAI,EAAGuC,IAjBR;AAkBC,IAAA,sBAAsB,EAAGrE,oBAAoB,CAC5CgE,uBAD4C,EAE5CpD,YAF4C;AAlB9C,KADD,CADD;AA2BA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAM2D,oBAAoB,GAAG7E,UAAU,CAAEe,WAAF,CAAvC;AAEA,SAAS+D,SAAT,EAAoBC,cAApB,QAA0C,SAA1C;AACA,eAAeF,oBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tFocusEventHandler,\n\tKeyboardEvent,\n\tRef,\n\tSyntheticEvent,\n} from 'react';\nimport { noop, omit } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useMemo, useRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { ENTER } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { composeStateReducers } from '../input-control/reducer/reducer';\nimport { Root, ValueInput } from './styles/unit-control-styles';\nimport UnitSelectControl from './unit-select-control';\nimport {\n\tCSS_UNITS,\n\tgetParsedValue,\n\tgetUnitsWithCurrentUnit,\n\tgetValidParsedUnit,\n} from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport type { UnitControlProps, UnitControlOnChangeCallback } from './types';\nimport type { StateReducer } from '../input-control/reducer/state';\n\nfunction UnitControl(\n\t{\n\t\t__unstableStateReducer: stateReducer = ( state ) => state,\n\t\tautoComplete = 'off',\n\t\tclassName,\n\t\tdisabled = false,\n\t\tdisableUnits = false,\n\t\tisPressEnterToChange = false,\n\t\tisResetValueOnUnitChange = false,\n\t\tisUnitSelectTabbable = true,\n\t\tlabel,\n\t\tonChange = noop,\n\t\tonUnitChange = noop,\n\t\tsize = 'default',\n\t\tstyle,\n\t\tunit: unitProp,\n\t\tunits: unitsProp = CSS_UNITS,\n\t\tvalue: valueProp,\n\t\t...props\n\t}: WordPressComponentProps< UnitControlProps, 'input', false >,\n\tforwardedRef: Ref< any >\n) {\n\tconst units = useMemo(\n\t\t() => getUnitsWithCurrentUnit( valueProp, unitProp, unitsProp ),\n\t\t[ valueProp, unitProp, unitsProp ]\n\t);\n\tconst [ value, initialUnit ] = getParsedValue( valueProp, unitProp, units );\n\tconst [ unit, setUnit ] = useControlledState< string | undefined >(\n\t\tunitProp,\n\t\t{\n\t\t\tinitial: initialUnit,\n\t\t\tfallback: '',\n\t\t}\n\t);\n\n\t// Stores parsed value for hand-off in state reducer\n\tconst refParsedValue = useRef< string | null >( null );\n\n\tconst classes = classnames( 'components-unit-control', className );\n\n\tconst handleOnChange: UnitControlOnChangeCallback = (\n\t\tnext,\n\t\tchangeProps\n\t) => {\n\t\tif ( next === '' ) {\n\t\t\tonChange( '', changeProps );\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Customizing the onChange callback.\n\t\t * This allows as to broadcast a combined value+unit to onChange.\n\t\t */\n\t\tnext = getValidParsedUnit( next, units, value, unit ).join( '' );\n\n\t\tonChange( next, changeProps );\n\t};\n\n\tconst handleOnUnitChange: UnitControlOnChangeCallback = (\n\t\tnext,\n\t\tchangeProps\n\t) => {\n\t\tconst { data } = changeProps;\n\n\t\tlet nextValue = `${ value }${ next }`;\n\n\t\tif ( isResetValueOnUnitChange && data?.default !== undefined ) {\n\t\t\tnextValue = `${ data.default }${ next }`;\n\t\t}\n\n\t\tonChange( nextValue, changeProps );\n\t\tonUnitChange( next, changeProps );\n\n\t\tsetUnit( next );\n\t};\n\n\tconst mayUpdateUnit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tif ( ! isNaN( Number( event.currentTarget.value ) ) ) {\n\t\t\trefParsedValue.current = null;\n\t\t\treturn;\n\t\t}\n\t\tconst [ parsedValue, parsedUnit ] = getValidParsedUnit(\n\t\t\tevent.currentTarget.value,\n\t\t\tunits,\n\t\t\tvalue,\n\t\t\tunit\n\t\t);\n\n\t\trefParsedValue.current = parsedValue.toString();\n\n\t\tif ( isPressEnterToChange && parsedUnit !== unit ) {\n\t\t\tconst data = Array.isArray( units )\n\t\t\t\t? units.find( ( option ) => option.value === parsedUnit )\n\t\t\t\t: undefined;\n\t\t\tconst changeProps = { event, data };\n\n\t\t\tonChange( `${ parsedValue }${ parsedUnit }`, changeProps );\n\t\t\tonUnitChange( parsedUnit, changeProps );\n\n\t\t\tsetUnit( parsedUnit );\n\t\t}\n\t};\n\n\tconst handleOnBlur: FocusEventHandler< HTMLInputElement > = mayUpdateUnit;\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { keyCode } = event;\n\t\tif ( keyCode === ENTER ) {\n\t\t\tmayUpdateUnit( event );\n\t\t}\n\t};\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @param state State from InputControl\n\t * @param action Action triggering state change\n\t * @return The updated state to apply to InputControl\n\t */\n\tconst unitControlStateReducer: StateReducer = ( state, action ) => {\n\t\t/*\n\t\t * On commits (when pressing ENTER and on blur if\n\t\t * isPressEnterToChange is true), if a parse has been performed\n\t\t * then use that result to update the state.\n\t\t */\n\t\tif ( action.type === inputControlActionTypes.COMMIT ) {\n\t\t\tif ( refParsedValue.current !== null ) {\n\t\t\t\tstate.value = refParsedValue.current;\n\t\t\t\trefParsedValue.current = null;\n\t\t\t}\n\t\t}\n\n\t\treturn state;\n\t};\n\n\tconst inputSuffix = ! disableUnits ? (\n\t\t<UnitSelectControl\n\t\t\taria-label={ __( 'Select unit' ) }\n\t\t\tdisabled={ disabled }\n\t\t\tisUnitSelectTabbable={ isUnitSelectTabbable }\n\t\t\tonChange={ handleOnUnitChange }\n\t\t\tsize={ size }\n\t\t\tunit={ unit }\n\t\t\tunits={ units }\n\t\t/>\n\t) : null;\n\n\tlet step = props.step;\n\n\t/*\n\t * If no step prop has been passed, lookup the active unit and\n\t * try to get step from `units`, or default to a value of `1`\n\t */\n\tif ( ! step && units ) {\n\t\tconst activeUnit = units.find( ( option ) => option.value === unit );\n\t\tstep = activeUnit?.step ?? 1;\n\t}\n\n\treturn (\n\t\t<Root className=\"components-unit-control-wrapper\" style={ style }>\n\t\t\t<ValueInput\n\t\t\t\taria-label={ label }\n\t\t\t\ttype={ isPressEnterToChange ? 'text' : 'number' }\n\t\t\t\t{ ...omit( props, [ 'children' ] ) }\n\t\t\t\tautoComplete={ autoComplete }\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tdisableUnits={ disableUnits }\n\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\tlabel={ label }\n\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\t\tonChange={ handleOnChange }\n\t\t\t\tref={ forwardedRef }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ inputSuffix }\n\t\t\t\tvalue={ value }\n\t\t\t\tstep={ step }\n\t\t\t\t__unstableStateReducer={ composeStateReducers(\n\t\t\t\t\tunitControlStateReducer,\n\t\t\t\t\tstateReducer\n\t\t\t\t) }\n\t\t\t/>\n\t\t</Root>\n\t);\n}\n\n/**\n * `UnitControl` allows the user to set a value as well as a unit (e.g. `px`).\n *\n *\n * @example\n * ```jsx\n * import { __experimentalUnitControl as UnitControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '10px' );\n *\n * return <UnitControl onChange={ setValue } value={ value } />;\n * };\n * ```\n */\nconst ForwardedUnitControl = forwardRef( UnitControl );\n\nexport { parseUnit, useCustomUnits } from './utils';\nexport default ForwardedUnitControl;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/unit-control/index.tsx"],"names":["noop","omit","classnames","forwardRef","useMemo","useRef","__","ENTER","inputControlActionTypes","composeStateReducers","Root","ValueInput","UnitSelectControl","CSS_UNITS","getParsedValue","getUnitsWithCurrentUnit","getValidParsedUnit","useControlledState","UnitControl","forwardedRef","__unstableStateReducer","stateReducer","state","autoComplete","className","disabled","disableUnits","isPressEnterToChange","isResetValueOnUnitChange","isUnitSelectTabbable","label","onChange","onUnitChange","size","style","unit","unitProp","units","unitsProp","value","valueProp","props","initialUnit","setUnit","initial","fallback","refParsedValue","classes","handleOnChange","next","changeProps","join","handleOnUnitChange","data","nextValue","default","undefined","mayUpdateUnit","event","isNaN","Number","currentTarget","current","parsedValue","parsedUnit","toString","Array","isArray","find","option","handleOnBlur","handleOnKeyDown","keyCode","unitControlStateReducer","action","type","COMMIT","inputSuffix","step","activeUnit","ForwardedUnitControl","parseUnit","useCustomUnits"],"mappings":";;;AAAA;AACA;AACA;AAOA,SAASA,IAAT,EAAeC,IAAf,QAA2B,QAA3B;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,OAArB,EAA8BC,MAA9B,QAA4C,oBAA5C;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,KAAT,QAAsB,qBAAtB;AAEA;AACA;AACA;;AAEA,OAAO,KAAKC,uBAAZ,MAAyC,kCAAzC;AACA,SAASC,oBAAT,QAAqC,kCAArC;AACA,SAASC,IAAT,EAAeC,UAAf,QAAiC,8BAAjC;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,SACCC,SADD,EAECC,cAFD,EAGCC,uBAHD,EAICC,kBAJD,QAKO,SALP;AAMA,SAASC,kBAAT,QAAmC,gBAAnC;;AAIA,SAASC,WAAT,OAoBCC,YApBD,E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C,WAfV;AAgBC,IAAA,KAAK,EAAGtC,KAhBT;AAiBC,IAAA,IAAI,EAAGuC,IAjBR;AAkBC,IAAA,sBAAsB,EAAGrE,oBAAoB,CAC5CgE,uBAD4C,EAE5CpD,YAF4C;AAlB9C,KADD,CADD;AA2BA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAM2D,oBAAoB,GAAG7E,UAAU,CAAEe,WAAF,CAAvC;AAEA,SAAS+D,SAAT,EAAoBC,cAApB,QAA0C,SAA1C;AACA,eAAeF,oBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tFocusEventHandler,\n\tKeyboardEvent,\n\tForwardedRef,\n\tSyntheticEvent,\n} from 'react';\nimport { noop, omit } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useMemo, useRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { ENTER } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { composeStateReducers } from '../input-control/reducer/reducer';\nimport { Root, ValueInput } from './styles/unit-control-styles';\nimport UnitSelectControl from './unit-select-control';\nimport {\n\tCSS_UNITS,\n\tgetParsedValue,\n\tgetUnitsWithCurrentUnit,\n\tgetValidParsedUnit,\n} from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport type { UnitControlProps, UnitControlOnChangeCallback } from './types';\nimport type { StateReducer } from '../input-control/reducer/state';\n\nfunction UnitControl(\n\t{\n\t\t__unstableStateReducer: stateReducer = ( state ) => state,\n\t\tautoComplete = 'off',\n\t\tclassName,\n\t\tdisabled = false,\n\t\tdisableUnits = false,\n\t\tisPressEnterToChange = false,\n\t\tisResetValueOnUnitChange = false,\n\t\tisUnitSelectTabbable = true,\n\t\tlabel,\n\t\tonChange = noop,\n\t\tonUnitChange = noop,\n\t\tsize = 'default',\n\t\tstyle,\n\t\tunit: unitProp,\n\t\tunits: unitsProp = CSS_UNITS,\n\t\tvalue: valueProp,\n\t\t...props\n\t}: WordPressComponentProps< UnitControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst units = useMemo(\n\t\t() => getUnitsWithCurrentUnit( valueProp, unitProp, unitsProp ),\n\t\t[ valueProp, unitProp, unitsProp ]\n\t);\n\tconst [ value, initialUnit ] = getParsedValue( valueProp, unitProp, units );\n\tconst [ unit, setUnit ] = useControlledState< string | undefined >(\n\t\tunitProp,\n\t\t{\n\t\t\tinitial: initialUnit,\n\t\t\tfallback: '',\n\t\t}\n\t);\n\n\t// Stores parsed value for hand-off in state reducer\n\tconst refParsedValue = useRef< string | null >( null );\n\n\tconst classes = classnames( 'components-unit-control', className );\n\n\tconst handleOnChange: UnitControlOnChangeCallback = (\n\t\tnext,\n\t\tchangeProps\n\t) => {\n\t\tif ( next === '' ) {\n\t\t\tonChange( '', changeProps );\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Customizing the onChange callback.\n\t\t * This allows as to broadcast a combined value+unit to onChange.\n\t\t */\n\t\tnext = getValidParsedUnit( next, units, value, unit ).join( '' );\n\n\t\tonChange( next, changeProps );\n\t};\n\n\tconst handleOnUnitChange: UnitControlOnChangeCallback = (\n\t\tnext,\n\t\tchangeProps\n\t) => {\n\t\tconst { data } = changeProps;\n\n\t\tlet nextValue = `${ value }${ next }`;\n\n\t\tif ( isResetValueOnUnitChange && data?.default !== undefined ) {\n\t\t\tnextValue = `${ data.default }${ next }`;\n\t\t}\n\n\t\tonChange( nextValue, changeProps );\n\t\tonUnitChange( next, changeProps );\n\n\t\tsetUnit( next );\n\t};\n\n\tconst mayUpdateUnit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tif ( ! isNaN( Number( event.currentTarget.value ) ) ) {\n\t\t\trefParsedValue.current = null;\n\t\t\treturn;\n\t\t}\n\t\tconst [ parsedValue, parsedUnit ] = getValidParsedUnit(\n\t\t\tevent.currentTarget.value,\n\t\t\tunits,\n\t\t\tvalue,\n\t\t\tunit\n\t\t);\n\n\t\trefParsedValue.current = parsedValue.toString();\n\n\t\tif ( isPressEnterToChange && parsedUnit !== unit ) {\n\t\t\tconst data = Array.isArray( units )\n\t\t\t\t? units.find( ( option ) => option.value === parsedUnit )\n\t\t\t\t: undefined;\n\t\t\tconst changeProps = { event, data };\n\n\t\t\tonChange( `${ parsedValue }${ parsedUnit }`, changeProps );\n\t\t\tonUnitChange( parsedUnit, changeProps );\n\n\t\t\tsetUnit( parsedUnit );\n\t\t}\n\t};\n\n\tconst handleOnBlur: FocusEventHandler< HTMLInputElement > = mayUpdateUnit;\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { keyCode } = event;\n\t\tif ( keyCode === ENTER ) {\n\t\t\tmayUpdateUnit( event );\n\t\t}\n\t};\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @param state State from InputControl\n\t * @param action Action triggering state change\n\t * @return The updated state to apply to InputControl\n\t */\n\tconst unitControlStateReducer: StateReducer = ( state, action ) => {\n\t\t/*\n\t\t * On commits (when pressing ENTER and on blur if\n\t\t * isPressEnterToChange is true), if a parse has been performed\n\t\t * then use that result to update the state.\n\t\t */\n\t\tif ( action.type === inputControlActionTypes.COMMIT ) {\n\t\t\tif ( refParsedValue.current !== null ) {\n\t\t\t\tstate.value = refParsedValue.current;\n\t\t\t\trefParsedValue.current = null;\n\t\t\t}\n\t\t}\n\n\t\treturn state;\n\t};\n\n\tconst inputSuffix = ! disableUnits ? (\n\t\t<UnitSelectControl\n\t\t\taria-label={ __( 'Select unit' ) }\n\t\t\tdisabled={ disabled }\n\t\t\tisUnitSelectTabbable={ isUnitSelectTabbable }\n\t\t\tonChange={ handleOnUnitChange }\n\t\t\tsize={ size }\n\t\t\tunit={ unit }\n\t\t\tunits={ units }\n\t\t/>\n\t) : null;\n\n\tlet step = props.step;\n\n\t/*\n\t * If no step prop has been passed, lookup the active unit and\n\t * try to get step from `units`, or default to a value of `1`\n\t */\n\tif ( ! step && units ) {\n\t\tconst activeUnit = units.find( ( option ) => option.value === unit );\n\t\tstep = activeUnit?.step ?? 1;\n\t}\n\n\treturn (\n\t\t<Root className=\"components-unit-control-wrapper\" style={ style }>\n\t\t\t<ValueInput\n\t\t\t\taria-label={ label }\n\t\t\t\ttype={ isPressEnterToChange ? 'text' : 'number' }\n\t\t\t\t{ ...omit( props, [ 'children' ] ) }\n\t\t\t\tautoComplete={ autoComplete }\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tdisableUnits={ disableUnits }\n\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\tlabel={ label }\n\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\t\tonChange={ handleOnChange }\n\t\t\t\tref={ forwardedRef }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ inputSuffix }\n\t\t\t\tvalue={ value }\n\t\t\t\tstep={ step }\n\t\t\t\t__unstableStateReducer={ composeStateReducers(\n\t\t\t\t\tunitControlStateReducer,\n\t\t\t\t\tstateReducer\n\t\t\t\t) }\n\t\t\t/>\n\t\t</Root>\n\t);\n}\n\n/**\n * `UnitControl` allows the user to set a value as well as a unit (e.g. `px`).\n *\n *\n * @example\n * ```jsx\n * import { __experimentalUnitControl as UnitControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '10px' );\n *\n * return <UnitControl onChange={ setValue } value={ value } />;\n * };\n * ```\n */\nconst ForwardedUnitControl = forwardRef( UnitControl );\n\nexport { parseUnit, useCustomUnits } from './utils';\nexport default ForwardedUnitControl;\n"]}
@@ -9,7 +9,7 @@ import { View } from '../view';
9
9
  import { useVStack } from './hook';
10
10
  /**
11
11
  * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>} props
12
- * @param {import('react').Ref<any>} forwardedRef
12
+ * @param {import('react').ForwardedRef<any>} forwardedRef
13
13
  */
14
14
 
15
15
  function VStack(props, forwardedRef) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/v-stack/component.js"],"names":["contextConnect","View","useVStack","VStack","props","forwardedRef","vStackProps","ConnectedVStack"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,eAA/B;AACA,SAASC,IAAT,QAAqB,SAArB;AACA,SAASC,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;AACA;;AACA,SAASC,MAAT,CAAiBC,KAAjB,EAAwBC,YAAxB,EAAuC;AACtC,QAAMC,WAAW,GAAGJ,SAAS,CAAEE,KAAF,CAA7B;AAEA,SAAO,cAAC,IAAD,eAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,eAAe,GAAGP,cAAc,CAAEG,MAAF,EAAU,QAAV,CAAtC;AAEA,eAAeI,eAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { contextConnect } from '../ui/context';\nimport { View } from '../view';\nimport { useVStack } from './hook';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>} props\n * @param {import('react').Ref<any>} forwardedRef\n */\nfunction VStack( props, forwardedRef ) {\n\tconst vStackProps = useVStack( props );\n\n\treturn <View { ...vStackProps } ref={ forwardedRef } />;\n}\n\n/**\n * `VStack` (or Vertical Stack) is a layout component that arranges child elements in a vertical line.\n *\n * `VStack` can render anything inside.\n *\n * @example\n * ```jsx\n * import {\n * \t__experimentalText as Text,\n * \t__experimentalVStack as VStack,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VStack>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</VStack>\n * \t);\n * }\n * ```\n */\nconst ConnectedVStack = contextConnect( VStack, 'VStack' );\n\nexport default ConnectedVStack;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/v-stack/component.js"],"names":["contextConnect","View","useVStack","VStack","props","forwardedRef","vStackProps","ConnectedVStack"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,eAA/B;AACA,SAASC,IAAT,QAAqB,SAArB;AACA,SAASC,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;AACA;;AACA,SAASC,MAAT,CAAiBC,KAAjB,EAAwBC,YAAxB,EAAuC;AACtC,QAAMC,WAAW,GAAGJ,SAAS,CAAEE,KAAF,CAA7B;AAEA,SAAO,cAAC,IAAD,eAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,eAAe,GAAGP,cAAc,CAAEG,MAAF,EAAU,QAAV,CAAtC;AAEA,eAAeI,eAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { contextConnect } from '../ui/context';\nimport { View } from '../view';\nimport { useVStack } from './hook';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef\n */\nfunction VStack( props, forwardedRef ) {\n\tconst vStackProps = useVStack( props );\n\n\treturn <View { ...vStackProps } ref={ forwardedRef } />;\n}\n\n/**\n * `VStack` (or Vertical Stack) is a layout component that arranges child elements in a vertical line.\n *\n * `VStack` can render anything inside.\n *\n * @example\n * ```jsx\n * import {\n * \t__experimentalText as Text,\n * \t__experimentalVStack as VStack,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VStack>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</VStack>\n * \t);\n * }\n * ```\n */\nconst ConnectedVStack = contextConnect( VStack, 'VStack' );\n\nexport default ConnectedVStack;\n"]}
@@ -9,7 +9,7 @@ import { visuallyHidden } from './styles';
9
9
  import { View } from '../view';
10
10
  /**
11
11
  * @param {import('../ui/context').WordPressComponentProps<{ children: import('react').ReactNode }, 'div'>} props
12
- * @param {import('react').Ref<any>} forwardedRef
12
+ * @param {import('react').ForwardedRef<any>} forwardedRef
13
13
  */
14
14
 
15
15
  function VisuallyHidden(props, forwardedRef) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/visually-hidden/component.js"],"names":["useContextSystem","contextConnect","visuallyHidden","View","VisuallyHidden","props","forwardedRef","style","styleProp","contextProps","ConnectedVisuallyHidden"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,cAA3B,QAAiD,eAAjD;AACA,SAASC,cAAT,QAA+B,UAA/B;AACA,SAASC,IAAT,QAAqB,SAArB;AAEA;AACA;AACA;AACA;;AACA,SAASC,cAAT,CAAyBC,KAAzB,EAAgCC,YAAhC,EAA+C;AAC9C,QAAM;AAAEC,IAAAA,KAAK,EAAEC,SAAT;AAAoB,OAAGC;AAAvB,MAAwCT,gBAAgB,CAC7DK,KAD6D,EAE7D,gBAF6D,CAA9D;AAIA,SACC,cAAC,IAAD;AACC,IAAA,GAAG,EAAGC;AADP,KAEMG,YAFN;AAGC,IAAA,KAAK,EAAG,EAAE,GAAGP,cAAL;AAAqB,UAAKM,SAAS,IAAI,EAAlB;AAArB;AAHT,KADD;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,uBAAuB,GAAGT,cAAc,CAC7CG,cAD6C,EAE7C,gBAF6C,CAA9C;AAKA,eAAeM,uBAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { useContextSystem, contextConnect } from '../ui/context';\nimport { visuallyHidden } from './styles';\nimport { View } from '../view';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<{ children: import('react').ReactNode }, 'div'>} props\n * @param {import('react').Ref<any>} forwardedRef\n */\nfunction VisuallyHidden( props, forwardedRef ) {\n\tconst { style: styleProp, ...contextProps } = useContextSystem(\n\t\tprops,\n\t\t'VisuallyHidden'\n\t);\n\treturn (\n\t\t<View\n\t\t\tref={ forwardedRef }\n\t\t\t{ ...contextProps }\n\t\t\tstyle={ { ...visuallyHidden, ...( styleProp || {} ) } }\n\t\t/>\n\t);\n}\n\n/**\n * `VisuallyHidden` is a component used to render text intended to be visually\n * hidden, but will show for alternate devices, for example a screen reader.\n *\n * @example\n * ```jsx\n * import { VisuallyHidden } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VisuallyHidden>\n * \t\t\t<label>Code is Poetry</label>\n * \t\t</VisuallyHidden>\n * \t);\n * }\n * ```\n */\nconst ConnectedVisuallyHidden = contextConnect(\n\tVisuallyHidden,\n\t'VisuallyHidden'\n);\n\nexport default ConnectedVisuallyHidden;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/visually-hidden/component.js"],"names":["useContextSystem","contextConnect","visuallyHidden","View","VisuallyHidden","props","forwardedRef","style","styleProp","contextProps","ConnectedVisuallyHidden"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,cAA3B,QAAiD,eAAjD;AACA,SAASC,cAAT,QAA+B,UAA/B;AACA,SAASC,IAAT,QAAqB,SAArB;AAEA;AACA;AACA;AACA;;AACA,SAASC,cAAT,CAAyBC,KAAzB,EAAgCC,YAAhC,EAA+C;AAC9C,QAAM;AAAEC,IAAAA,KAAK,EAAEC,SAAT;AAAoB,OAAGC;AAAvB,MAAwCT,gBAAgB,CAC7DK,KAD6D,EAE7D,gBAF6D,CAA9D;AAIA,SACC,cAAC,IAAD;AACC,IAAA,GAAG,EAAGC;AADP,KAEMG,YAFN;AAGC,IAAA,KAAK,EAAG,EAAE,GAAGP,cAAL;AAAqB,UAAKM,SAAS,IAAI,EAAlB;AAArB;AAHT,KADD;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,uBAAuB,GAAGT,cAAc,CAC7CG,cAD6C,EAE7C,gBAF6C,CAA9C;AAKA,eAAeM,uBAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { useContextSystem, contextConnect } from '../ui/context';\nimport { visuallyHidden } from './styles';\nimport { View } from '../view';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<{ children: import('react').ReactNode }, 'div'>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef\n */\nfunction VisuallyHidden( props, forwardedRef ) {\n\tconst { style: styleProp, ...contextProps } = useContextSystem(\n\t\tprops,\n\t\t'VisuallyHidden'\n\t);\n\treturn (\n\t\t<View\n\t\t\tref={ forwardedRef }\n\t\t\t{ ...contextProps }\n\t\t\tstyle={ { ...visuallyHidden, ...( styleProp || {} ) } }\n\t\t/>\n\t);\n}\n\n/**\n * `VisuallyHidden` is a component used to render text intended to be visually\n * hidden, but will show for alternate devices, for example a screen reader.\n *\n * @example\n * ```jsx\n * import { VisuallyHidden } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VisuallyHidden>\n * \t\t\t<label>Code is Poetry</label>\n * \t\t</VisuallyHidden>\n * \t);\n * }\n * ```\n */\nconst ConnectedVisuallyHidden = contextConnect(\n\tVisuallyHidden,\n\t'VisuallyHidden'\n);\n\nexport default ConnectedVisuallyHidden;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/z-stack/component.tsx"],"names":["isValidElement","getValidChildren","contextConnect","useContextSystem","ZStackView","ZStackChildView","ZStack","props","forwardedRef","children","className","isLayered","isReversed","offset","otherProps","validChildren","childrenLastIndex","length","clonedChildren","map","child","index","zIndex","offsetAmount","key"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,oBAA/B;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAAiC,gCAAjC;AACA,SAASC,cAAT,EAAyBC,gBAAzB,QAAiD,eAAjD;AAEA,SAASC,UAAT,EAAqBC,eAArB,QAA4C,UAA5C;;AA2BA,SAASC,MAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,SAAS,GAAG,IAHP;AAILC,IAAAA,UAAU,GAAG,KAJR;AAKLC,IAAAA,MAAM,GAAG,CALJ;AAML,OAAGC;AANE,MAOFX,gBAAgB,CAAEI,KAAF,EAAS,QAAT,CAPpB;AASA,QAAMQ,aAAa,GAAGd,gBAAgB,CAAEQ,QAAF,CAAtC;AACA,QAAMO,iBAAiB,GAAGD,aAAa,CAACE,MAAd,GAAuB,CAAjD;AAEA,QAAMC,cAAc,GAAGH,aAAa,CAACI,GAAd,CAAmB,CAAEC,KAAF,EAASC,KAAT,KAAoB;AAC7D,UAAMC,MAAM,GAAGV,UAAU,GAAGI,iBAAiB,GAAGK,KAAvB,GAA+BA,KAAxD;AACA,UAAME,YAAY,GAAGV,MAAM,GAAGQ,KAA9B;AAEA,UAAMG,GAAG,GAAGxB,cAAc,CAAEoB,KAAF,CAAd,GAA0BA,KAAK,CAACI,GAAhC,GAAsCH,KAAlD;AAEA,WACC,cAAC,eAAD;AACC,MAAA,SAAS,EAAGV,SADb;AAEC,MAAA,YAAY,EAAGY,YAFhB;AAGC,MAAA,MAAM,EAAGD,MAHV;AAIC,MAAA,GAAG,EAAGE;AAJP,OAMGJ,KANH,CADD;AAUA,GAhBsB,CAAvB;AAkBA,SACC,cAAC,UAAD,eACMN,UADN;AAEC,IAAA,SAAS,EAAGJ,SAFb;AAGC,IAAA,GAAG,EAAGF;AAHP,MAKGU,cALH,CADD;AASA;;AAED,eAAehB,cAAc,CAAEI,MAAF,EAAU,QAAV,CAA7B","sourcesContent":["/**\n * External dependencies\n */\nimport type { Ref, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { isValidElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValidChildren } from '../ui/utils/get-valid-children';\nimport { contextConnect, useContextSystem } from '../ui/context';\nimport type { WordPressComponentProps } from '../ui/context';\nimport { ZStackView, ZStackChildView } from './styles';\n\nexport interface ZStackProps {\n\t/**\n\t * Layers children elements on top of each other (first: highest z-index, last: lowest z-index).\n\t *\n\t * @default true\n\t */\n\tisLayered?: boolean;\n\t/**\n\t * Reverse the layer ordering (first: lowest z-index, last: highest z-index).\n\t *\n\t * @default false\n\t */\n\tisReversed?: boolean;\n\t/**\n\t * The amount of offset between each child element. The amount of space between each child element. Defaults to `0`. Its value is automatically inverted (i.e. from positive to negative, and viceversa) when switching from LTR to RTL.\n\t *\n\t * @default 0\n\t */\n\toffset?: number;\n\t/**\n\t * Child elements.\n\t */\n\tchildren: ReactNode;\n}\n\nfunction ZStack(\n\tprops: WordPressComponentProps< ZStackProps, 'div' >,\n\tforwardedRef: Ref< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tisLayered = true,\n\t\tisReversed = false,\n\t\toffset = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ZStack' );\n\n\tconst validChildren = getValidChildren( children );\n\tconst childrenLastIndex = validChildren.length - 1;\n\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst zIndex = isReversed ? childrenLastIndex - index : index;\n\t\tconst offsetAmount = offset * index;\n\n\t\tconst key = isValidElement( child ) ? child.key : index;\n\n\t\treturn (\n\t\t\t<ZStackChildView\n\t\t\t\tisLayered={ isLayered }\n\t\t\t\toffsetAmount={ offsetAmount }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t\tkey={ key }\n\t\t\t>\n\t\t\t\t{ child }\n\t\t\t</ZStackChildView>\n\t\t);\n\t} );\n\n\treturn (\n\t\t<ZStackView\n\t\t\t{ ...otherProps }\n\t\t\tclassName={ className }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ clonedChildren }\n\t\t</ZStackView>\n\t);\n}\n\nexport default contextConnect( ZStack, 'ZStack' );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/z-stack/component.tsx"],"names":["isValidElement","getValidChildren","contextConnect","useContextSystem","ZStackView","ZStackChildView","ZStack","props","forwardedRef","children","className","isLayered","isReversed","offset","otherProps","validChildren","childrenLastIndex","length","clonedChildren","map","child","index","zIndex","offsetAmount","key"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,oBAA/B;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAAiC,gCAAjC;AACA,SAASC,cAAT,EAAyBC,gBAAzB,QAAiD,eAAjD;AAEA,SAASC,UAAT,EAAqBC,eAArB,QAA4C,UAA5C;;AA2BA,SAASC,MAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,SAAS,GAAG,IAHP;AAILC,IAAAA,UAAU,GAAG,KAJR;AAKLC,IAAAA,MAAM,GAAG,CALJ;AAML,OAAGC;AANE,MAOFX,gBAAgB,CAAEI,KAAF,EAAS,QAAT,CAPpB;AASA,QAAMQ,aAAa,GAAGd,gBAAgB,CAAEQ,QAAF,CAAtC;AACA,QAAMO,iBAAiB,GAAGD,aAAa,CAACE,MAAd,GAAuB,CAAjD;AAEA,QAAMC,cAAc,GAAGH,aAAa,CAACI,GAAd,CAAmB,CAAEC,KAAF,EAASC,KAAT,KAAoB;AAC7D,UAAMC,MAAM,GAAGV,UAAU,GAAGI,iBAAiB,GAAGK,KAAvB,GAA+BA,KAAxD;AACA,UAAME,YAAY,GAAGV,MAAM,GAAGQ,KAA9B;AAEA,UAAMG,GAAG,GAAGxB,cAAc,CAAEoB,KAAF,CAAd,GAA0BA,KAAK,CAACI,GAAhC,GAAsCH,KAAlD;AAEA,WACC,cAAC,eAAD;AACC,MAAA,SAAS,EAAGV,SADb;AAEC,MAAA,YAAY,EAAGY,YAFhB;AAGC,MAAA,MAAM,EAAGD,MAHV;AAIC,MAAA,GAAG,EAAGE;AAJP,OAMGJ,KANH,CADD;AAUA,GAhBsB,CAAvB;AAkBA,SACC,cAAC,UAAD,eACMN,UADN;AAEC,IAAA,SAAS,EAAGJ,SAFb;AAGC,IAAA,GAAG,EAAGF;AAHP,MAKGU,cALH,CADD;AASA;;AAED,eAAehB,cAAc,CAAEI,MAAF,EAAU,QAAV,CAA7B","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { isValidElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValidChildren } from '../ui/utils/get-valid-children';\nimport { contextConnect, useContextSystem } from '../ui/context';\nimport type { WordPressComponentProps } from '../ui/context';\nimport { ZStackView, ZStackChildView } from './styles';\n\nexport interface ZStackProps {\n\t/**\n\t * Layers children elements on top of each other (first: highest z-index, last: lowest z-index).\n\t *\n\t * @default true\n\t */\n\tisLayered?: boolean;\n\t/**\n\t * Reverse the layer ordering (first: lowest z-index, last: highest z-index).\n\t *\n\t * @default false\n\t */\n\tisReversed?: boolean;\n\t/**\n\t * The amount of offset between each child element. The amount of space between each child element. Defaults to `0`. Its value is automatically inverted (i.e. from positive to negative, and viceversa) when switching from LTR to RTL.\n\t *\n\t * @default 0\n\t */\n\toffset?: number;\n\t/**\n\t * Child elements.\n\t */\n\tchildren: ReactNode;\n}\n\nfunction ZStack(\n\tprops: WordPressComponentProps< ZStackProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tisLayered = true,\n\t\tisReversed = false,\n\t\toffset = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ZStack' );\n\n\tconst validChildren = getValidChildren( children );\n\tconst childrenLastIndex = validChildren.length - 1;\n\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst zIndex = isReversed ? childrenLastIndex - index : index;\n\t\tconst offsetAmount = offset * index;\n\n\t\tconst key = isValidElement( child ) ? child.key : index;\n\n\t\treturn (\n\t\t\t<ZStackChildView\n\t\t\t\tisLayered={ isLayered }\n\t\t\t\toffsetAmount={ offsetAmount }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t\tkey={ key }\n\t\t\t>\n\t\t\t\t{ child }\n\t\t\t</ZStackChildView>\n\t\t);\n\t} );\n\n\treturn (\n\t\t<ZStackView\n\t\t\t{ ...otherProps }\n\t\t\tclassName={ className }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ clonedChildren }\n\t\t</ZStackView>\n\t);\n}\n\nexport default contextConnect( ZStack, 'ZStack' );\n"]}
@@ -265,6 +265,5 @@ export function useCardDivider(props: import('../../ui/context').WordPressCompon
265
265
  margin?: import("../../ui/utils/space").SpaceInput | undefined;
266
266
  marginStart?: import("../../ui/utils/space").SpaceInput | undefined;
267
267
  marginEnd?: import("../../ui/utils/space").SpaceInput | undefined;
268
- as?: undefined;
269
268
  };
270
269
  //# sourceMappingURL=hook.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/card/card-divider/hook.js"],"names":[],"mappings":"AAYA;;GAEG;AACH,sCAFW,OAAO,kBAAkB,EAAE,uBAAuB,CAAC,OAAO,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B/G"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/card/card-divider/hook.js"],"names":[],"mappings":"AAYA;;GAEG;AACH,sCAFW,OAAO,kBAAkB,EAAE,uBAAuB,CAAC,OAAO,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B/G"}
@@ -20,9 +20,7 @@ export declare const NumberControlWrapper: import("@emotion/styled").StyledCompo
20
20
  }, {}, {}>;
21
21
  export declare const SelectControl: import("@emotion/styled").StyledComponent<Pick<import("../select-control").SelectControlProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "key" | keyof import("react").SelectHTMLAttributes<HTMLSelectElement>> & {
22
22
  ref?: ((instance: HTMLSelectElement | null) => void) | import("react").RefObject<HTMLSelectElement> | null | undefined;
23
- }, "as" | keyof import("../select-control").SelectControlProps> & {
24
- as?: undefined;
25
- }, "form" | "slot" | "style" | "title" | "as" | "key" | "color" | "lang" | "name" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "autoComplete" | "required" | keyof import("../select-control").SelectControlProps> & import("react").RefAttributes<HTMLSelectElement> & {
23
+ }, "as" | keyof import("../select-control").SelectControlProps>, "form" | "slot" | "style" | "title" | "key" | "color" | "lang" | "name" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "autoComplete" | "required" | keyof import("../select-control").SelectControlProps> & import("react").RefAttributes<HTMLSelectElement> & {
26
24
  theme?: import("@emotion/react").Theme | undefined;
27
25
  }, {}, {}>;
28
26
  export declare const RangeControl: import("@emotion/styled").StyledComponent<Pick<{
@@ -70,7 +68,7 @@ export declare const ColorfulWrapper: import("@emotion/styled").StyledComponent<
70
68
  export declare const DetailsControlButton: import("@emotion/styled").StyledComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any> & {
71
69
  theme?: import("@emotion/react").Theme | undefined;
72
70
  }, {}, {}>;
73
- export declare const ColorHexInputControl: import("@emotion/styled").StyledComponent<Pick<import("../input-control/types").InputControlProps, "type" | "value" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "as" | "key" | "className" | "color" | "height" | "id" | "lang" | "max" | "min" | "name" | "width" | "role" | "tabIndex" | "crossOrigin" | "direction" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "alt" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "checked" | "enterKeyHint" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "step" | "align" | "justify" | "wrap" | "gap" | "expanded" | "hideLabelFromVision" | "isReversed" | "suffix" | "__unstableInputWidth" | "labelPosition" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer"> & import("react").RefAttributes<HTMLInputElement> & {
71
+ export declare const ColorHexInputControl: import("@emotion/styled").StyledComponent<Pick<import("../input-control/types").InputControlProps, "type" | "value" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "key" | "className" | "color" | "height" | "id" | "lang" | "max" | "min" | "name" | "width" | "role" | "tabIndex" | "crossOrigin" | "direction" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "alt" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "checked" | "enterKeyHint" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "step" | "align" | "justify" | "wrap" | "gap" | "expanded" | "hideLabelFromVision" | "isReversed" | "suffix" | "__unstableInputWidth" | "labelPosition" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer"> & import("react").RefAttributes<HTMLInputElement> & {
74
72
  theme?: import("@emotion/react").Theme | undefined;
75
73
  }, {}, {}>;
76
74
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAMxB,CAAC;AAiBF,eAAO,MAAM,6BAA6B;;;yGAEzC,CAAC;AAEF,eAAO,MAAM,eAAe;;;yGAgD3B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;UAKhC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;UAEhC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAMxB,CAAC;AAiBF,eAAO,MAAM,6BAA6B;;;yGAEzC,CAAC;AAEF,eAAO,MAAM,eAAe;;;yGAgD3B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;UAKhC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;UAEhC,CAAC"}