@wordpress/components 19.2.1-next.33ec3857e2.0 → 19.4.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 (748) hide show
  1. package/CHANGELOG.md +54 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/LICENSE.md +1 -1
  4. package/README.md +8 -4
  5. package/build/base-control/index.js +2 -3
  6. package/build/base-control/index.js.map +1 -1
  7. package/build/base-control/styles/base-control-styles.js +23 -13
  8. package/build/base-control/styles/base-control-styles.js.map +1 -1
  9. package/build/base-field/hook.js +1 -1
  10. package/build/base-field/hook.js.map +1 -1
  11. package/build/box-control/styles/box-control-styles.js +9 -9
  12. package/build/box-control/styles/box-control-styles.js.map +1 -1
  13. package/build/button/deprecated.js +2 -1
  14. package/build/button/deprecated.js.map +1 -1
  15. package/build/button/index.js +2 -1
  16. package/build/button/index.js.map +1 -1
  17. package/build/card/card/component.js +1 -1
  18. package/build/card/card/component.js.map +1 -1
  19. package/build/card/card/hook.js +1 -1
  20. package/build/card/card/hook.js.map +1 -1
  21. package/build/card/card-body/hook.js +1 -1
  22. package/build/card/card-body/hook.js.map +1 -1
  23. package/build/card/card-divider/hook.js +1 -1
  24. package/build/card/card-divider/hook.js.map +1 -1
  25. package/build/card/card-footer/hook.js +1 -1
  26. package/build/card/card-footer/hook.js.map +1 -1
  27. package/build/card/card-header/hook.js +1 -1
  28. package/build/card/card-header/hook.js.map +1 -1
  29. package/build/card/card-media/hook.js +1 -1
  30. package/build/card/card-media/hook.js.map +1 -1
  31. package/build/circular-option-picker/index.js +2 -0
  32. package/build/circular-option-picker/index.js.map +1 -1
  33. package/build/color-indicator/index.js +2 -0
  34. package/build/color-indicator/index.js.map +1 -1
  35. package/build/color-palette/index.js +4 -7
  36. package/build/color-palette/index.js.map +1 -1
  37. package/build/color-palette/index.native.js +4 -2
  38. package/build/color-palette/index.native.js.map +1 -1
  39. package/build/color-picker/color-display.js.map +1 -1
  40. package/build/color-picker/color-input.js.map +1 -1
  41. package/build/color-picker/component.js +2 -5
  42. package/build/color-picker/component.js.map +1 -1
  43. package/build/color-picker/use-deprecated-props.js +2 -0
  44. package/build/color-picker/use-deprecated-props.js.map +1 -1
  45. package/build/confirm-dialog/component.js +10 -6
  46. package/build/confirm-dialog/component.js.map +1 -1
  47. package/build/confirm-dialog/styles.js +30 -0
  48. package/build/confirm-dialog/styles.js.map +1 -0
  49. package/build/custom-gradient-bar/control-points.js +1 -2
  50. package/build/custom-gradient-bar/control-points.js.map +1 -1
  51. package/build/custom-select-control/index.js +10 -2
  52. package/build/custom-select-control/index.js.map +1 -1
  53. package/build/date-time/time.js +1 -1
  54. package/build/date-time/time.js.map +1 -1
  55. package/build/divider/component.js.map +1 -1
  56. package/build/dropdown/index.js +3 -3
  57. package/build/dropdown/index.js.map +1 -1
  58. package/build/elevation/hook.js +5 -5
  59. package/build/elevation/hook.js.map +1 -1
  60. package/build/external-link/styles/external-link-styles.js +5 -5
  61. package/build/external-link/styles/external-link-styles.js.map +1 -1
  62. package/build/flex/flex/hook.js +4 -4
  63. package/build/flex/flex/hook.js.map +1 -1
  64. package/build/form-token-field/suggestions-list.js +75 -81
  65. package/build/form-token-field/suggestions-list.js.map +1 -1
  66. package/build/grid/hook.js +2 -2
  67. package/build/grid/hook.js.map +1 -1
  68. package/build/heading/component.js +0 -1
  69. package/build/heading/component.js.map +1 -1
  70. package/build/icon/index.js +0 -1
  71. package/build/icon/index.js.map +1 -1
  72. package/build/input-control/index.js.map +1 -1
  73. package/build/input-control/input-base.js +0 -1
  74. package/build/input-control/input-base.js.map +1 -1
  75. package/build/input-control/input-field.js.map +1 -1
  76. package/build/input-control/reducer/actions.js +0 -1
  77. package/build/input-control/reducer/actions.js.map +1 -1
  78. package/build/input-control/reducer/reducer.js.map +1 -1
  79. package/build/input-control/reducer/state.js +0 -1
  80. package/build/input-control/reducer/state.js.map +1 -1
  81. package/build/input-control/styles/input-control-styles.js +32 -30
  82. package/build/input-control/styles/input-control-styles.js.map +1 -1
  83. package/build/item-group/item/component.js +0 -1
  84. package/build/item-group/item/component.js.map +1 -1
  85. package/build/item-group/item/hook.js +1 -2
  86. package/build/item-group/item/hook.js.map +1 -1
  87. package/build/item-group/item-group/component.js +0 -1
  88. package/build/item-group/item-group/component.js.map +1 -1
  89. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +3 -1
  90. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  91. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -12
  92. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  93. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +23 -5
  94. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  95. package/build/mobile/bottom-sheet/cell.native.js +3 -5
  96. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  97. package/build/mobile/bottom-sheet/index.native.js +16 -16
  98. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  99. package/build/mobile/bottom-sheet/range-text-input.native.js +2 -3
  100. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  101. package/build/mobile/color-settings/index.native.js +2 -0
  102. package/build/mobile/color-settings/index.native.js.map +1 -1
  103. package/build/mobile/color-settings/palette.screen.native.js +5 -0
  104. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  105. package/build/mobile/color-settings/utils.native.js +9 -3
  106. package/build/mobile/color-settings/utils.native.js.map +1 -1
  107. package/build/mobile/keyboard-avoiding-view/index.ios.js +6 -8
  108. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  109. package/build/mobile/link-picker/index.native.js +3 -1
  110. package/build/mobile/link-picker/index.native.js.map +1 -1
  111. package/build/mobile/link-picker/link-picker-screen.native.js +18 -5
  112. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  113. package/build/mobile/link-settings/index.native.js +3 -1
  114. package/build/mobile/link-settings/index.native.js.map +1 -1
  115. package/build/mobile/readable-content-view/index.native.js +2 -2
  116. package/build/mobile/readable-content-view/index.native.js.map +1 -1
  117. package/build/mobile/utils/use-is-floating-keyboard.native.js +2 -2
  118. package/build/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
  119. package/build/mobile/utils/use-unit-converter-to-mobile.native.js +7 -3
  120. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  121. package/build/modal/index.js +1 -12
  122. package/build/modal/index.js.map +1 -1
  123. package/build/navigator/context.js +5 -1
  124. package/build/navigator/context.js.map +1 -1
  125. package/build/navigator/navigator-provider/component.js +42 -22
  126. package/build/navigator/navigator-provider/component.js.map +1 -1
  127. package/build/navigator/navigator-screen/component.js +57 -29
  128. package/build/navigator/navigator-screen/component.js.map +1 -1
  129. package/build/navigator/use-navigator.js +8 -8
  130. package/build/navigator/use-navigator.js.map +1 -1
  131. package/build/notice/index.native.js +2 -2
  132. package/build/notice/index.native.js.map +1 -1
  133. package/build/palette-edit/index.js +39 -30
  134. package/build/palette-edit/index.js.map +1 -1
  135. package/build/palette-edit/styles.js +11 -13
  136. package/build/palette-edit/styles.js.map +1 -1
  137. package/build/placeholder/index.js +4 -4
  138. package/build/placeholder/index.js.map +1 -1
  139. package/build/range-control/styles/range-control-styles.js +29 -29
  140. package/build/range-control/styles/range-control-styles.js.map +1 -1
  141. package/build/resizable-box/index.js.map +1 -1
  142. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  143. package/build/resizable-box/resize-tooltip/label.js +0 -1
  144. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  145. package/build/sandbox/index.native.js +5 -5
  146. package/build/sandbox/index.native.js.map +1 -1
  147. package/build/scrollable/hook.js +1 -1
  148. package/build/scrollable/hook.js.map +1 -1
  149. package/build/select-control/index.js.map +1 -1
  150. package/build/slot-fill/bubbles-virtually/fill.js +11 -2
  151. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  152. package/build/spacer/component.js +0 -1
  153. package/build/spacer/component.js.map +1 -1
  154. package/build/spinner/index.js +44 -5
  155. package/build/spinner/index.js.map +1 -1
  156. package/build/spinner/index.native.js +4 -2
  157. package/build/spinner/index.native.js.map +1 -1
  158. package/build/spinner/styles.js +56 -0
  159. package/build/spinner/styles.js.map +1 -0
  160. package/build/surface/hook.js +1 -1
  161. package/build/surface/hook.js.map +1 -1
  162. package/build/text/get-line-height.js +0 -1
  163. package/build/text/get-line-height.js.map +1 -1
  164. package/build/text/hook.js +5 -5
  165. package/build/text/hook.js.map +1 -1
  166. package/build/tip/index.js +4 -8
  167. package/build/tip/index.js.map +1 -1
  168. package/build/toggle-group-control/toggle-group-control/component.js +2 -12
  169. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  170. package/build/toggle-group-control/toggle-group-control/styles.js +3 -14
  171. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  172. package/build/toggle-group-control/toggle-group-control-option/component.js +0 -1
  173. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  174. package/build/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  175. package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  176. package/build/tools-panel/styles.js +10 -10
  177. package/build/tools-panel/styles.js.map +1 -1
  178. package/build/tools-panel/tools-panel/component.js +0 -1
  179. package/build/tools-panel/tools-panel/component.js.map +1 -1
  180. package/build/tools-panel/tools-panel/hook.js +51 -44
  181. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  182. package/build/tools-panel/tools-panel-header/component.js +0 -1
  183. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  184. package/build/tools-panel/tools-panel-header/hook.js +3 -3
  185. package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
  186. package/build/tools-panel/tools-panel-item/component.js +0 -1
  187. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  188. package/build/tools-panel/tools-panel-item/hook.js +17 -9
  189. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  190. package/build/tree-grid/index.js +19 -10
  191. package/build/tree-grid/index.js.map +1 -1
  192. package/build/truncate/hook.js +2 -2
  193. package/build/truncate/hook.js.map +1 -1
  194. package/build/ui/shortcut/component.js +0 -1
  195. package/build/ui/shortcut/component.js.map +1 -1
  196. package/build/ui/utils/font-size.js +0 -1
  197. package/build/ui/utils/font-size.js.map +1 -1
  198. package/build/ui/utils/get-valid-children.js +0 -1
  199. package/build/ui/utils/get-valid-children.js.map +1 -1
  200. package/build/unit-control/index.js +0 -1
  201. package/build/unit-control/index.js.map +1 -1
  202. package/build/unit-control/unit-select-control.js.map +1 -1
  203. package/build/utils/colors-values.js +6 -3
  204. package/build/utils/colors-values.js.map +1 -1
  205. package/build/utils/config-values.js +1 -4
  206. package/build/utils/config-values.js.map +1 -1
  207. package/build/utils/hooks/use-combined-ref.js.map +1 -1
  208. package/build/utils/hooks/use-latest-ref.js +0 -1
  209. package/build/utils/hooks/use-latest-ref.js.map +1 -1
  210. package/build/z-stack/component.js +0 -1
  211. package/build/z-stack/component.js.map +1 -1
  212. package/build-module/base-control/index.js +3 -4
  213. package/build-module/base-control/index.js.map +1 -1
  214. package/build-module/base-control/styles/base-control-styles.js +20 -12
  215. package/build-module/base-control/styles/base-control-styles.js.map +1 -1
  216. package/build-module/base-field/hook.js +1 -1
  217. package/build-module/base-field/hook.js.map +1 -1
  218. package/build-module/box-control/styles/box-control-styles.js +9 -9
  219. package/build-module/box-control/styles/box-control-styles.js.map +1 -1
  220. package/build-module/button/deprecated.js +2 -1
  221. package/build-module/button/deprecated.js.map +1 -1
  222. package/build-module/button/index.js +2 -1
  223. package/build-module/button/index.js.map +1 -1
  224. package/build-module/card/card/component.js +1 -1
  225. package/build-module/card/card/component.js.map +1 -1
  226. package/build-module/card/card/hook.js +1 -1
  227. package/build-module/card/card/hook.js.map +1 -1
  228. package/build-module/card/card-body/hook.js +1 -1
  229. package/build-module/card/card-body/hook.js.map +1 -1
  230. package/build-module/card/card-divider/hook.js +1 -1
  231. package/build-module/card/card-divider/hook.js.map +1 -1
  232. package/build-module/card/card-footer/hook.js +1 -1
  233. package/build-module/card/card-footer/hook.js.map +1 -1
  234. package/build-module/card/card-header/hook.js +1 -1
  235. package/build-module/card/card-header/hook.js.map +1 -1
  236. package/build-module/card/card-media/hook.js +1 -1
  237. package/build-module/card/card-media/hook.js.map +1 -1
  238. package/build-module/circular-option-picker/index.js +1 -0
  239. package/build-module/circular-option-picker/index.js.map +1 -1
  240. package/build-module/color-indicator/index.js +1 -0
  241. package/build-module/color-indicator/index.js.map +1 -1
  242. package/build-module/color-palette/index.js +4 -8
  243. package/build-module/color-palette/index.js.map +1 -1
  244. package/build-module/color-palette/index.native.js +4 -2
  245. package/build-module/color-palette/index.native.js.map +1 -1
  246. package/build-module/color-picker/color-display.js.map +1 -1
  247. package/build-module/color-picker/color-input.js.map +1 -1
  248. package/build-module/color-picker/component.js +2 -4
  249. package/build-module/color-picker/component.js.map +1 -1
  250. package/build-module/color-picker/use-deprecated-props.js +3 -2
  251. package/build-module/color-picker/use-deprecated-props.js.map +1 -1
  252. package/build-module/confirm-dialog/component.js +6 -3
  253. package/build-module/confirm-dialog/component.js.map +1 -1
  254. package/build-module/confirm-dialog/styles.js +25 -0
  255. package/build-module/confirm-dialog/styles.js.map +1 -0
  256. package/build-module/custom-gradient-bar/control-points.js +2 -3
  257. package/build-module/custom-gradient-bar/control-points.js.map +1 -1
  258. package/build-module/custom-select-control/index.js +11 -2
  259. package/build-module/custom-select-control/index.js.map +1 -1
  260. package/build-module/date-time/time.js +1 -1
  261. package/build-module/date-time/time.js.map +1 -1
  262. package/build-module/divider/component.js +1 -1
  263. package/build-module/divider/component.js.map +1 -1
  264. package/build-module/dropdown/index.js +3 -3
  265. package/build-module/dropdown/index.js.map +1 -1
  266. package/build-module/elevation/hook.js +5 -5
  267. package/build-module/elevation/hook.js.map +1 -1
  268. package/build-module/external-link/styles/external-link-styles.js +5 -5
  269. package/build-module/external-link/styles/external-link-styles.js.map +1 -1
  270. package/build-module/flex/flex/hook.js +4 -4
  271. package/build-module/flex/flex/hook.js.map +1 -1
  272. package/build-module/form-token-field/suggestions-list.js +73 -79
  273. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  274. package/build-module/grid/hook.js +2 -2
  275. package/build-module/grid/hook.js.map +1 -1
  276. package/build-module/heading/component.js +0 -1
  277. package/build-module/heading/component.js.map +1 -1
  278. package/build-module/icon/index.js +0 -1
  279. package/build-module/icon/index.js.map +1 -1
  280. package/build-module/input-control/index.js +1 -1
  281. package/build-module/input-control/index.js.map +1 -1
  282. package/build-module/input-control/input-base.js +0 -1
  283. package/build-module/input-control/input-base.js.map +1 -1
  284. package/build-module/input-control/input-field.js +1 -1
  285. package/build-module/input-control/input-field.js.map +1 -1
  286. package/build-module/input-control/reducer/actions.js +0 -1
  287. package/build-module/input-control/reducer/actions.js.map +1 -1
  288. package/build-module/input-control/reducer/reducer.js +1 -1
  289. package/build-module/input-control/reducer/reducer.js.map +1 -1
  290. package/build-module/input-control/reducer/state.js +0 -1
  291. package/build-module/input-control/reducer/state.js.map +1 -1
  292. package/build-module/input-control/styles/input-control-styles.js +32 -30
  293. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  294. package/build-module/item-group/item/component.js +0 -1
  295. package/build-module/item-group/item/component.js.map +1 -1
  296. package/build-module/item-group/item/hook.js +1 -2
  297. package/build-module/item-group/item/hook.js.map +1 -1
  298. package/build-module/item-group/item-group/component.js +0 -1
  299. package/build-module/item-group/item-group/component.js.map +1 -1
  300. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +3 -1
  301. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  302. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +5 -13
  303. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  304. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +23 -5
  305. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  306. package/build-module/mobile/bottom-sheet/cell.native.js +3 -3
  307. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  308. package/build-module/mobile/bottom-sheet/index.native.js +16 -13
  309. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  310. package/build-module/mobile/bottom-sheet/range-text-input.native.js +2 -2
  311. package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  312. package/build-module/mobile/color-settings/index.native.js +2 -0
  313. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  314. package/build-module/mobile/color-settings/palette.screen.native.js +5 -0
  315. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  316. package/build-module/mobile/color-settings/utils.native.js +7 -3
  317. package/build-module/mobile/color-settings/utils.native.js.map +1 -1
  318. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +6 -6
  319. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  320. package/build-module/mobile/link-picker/index.native.js +2 -1
  321. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  322. package/build-module/mobile/link-picker/link-picker-screen.native.js +13 -5
  323. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  324. package/build-module/mobile/link-settings/index.native.js +2 -1
  325. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  326. package/build-module/mobile/readable-content-view/index.native.js +2 -2
  327. package/build-module/mobile/readable-content-view/index.native.js.map +1 -1
  328. package/build-module/mobile/utils/use-is-floating-keyboard.native.js +2 -2
  329. package/build-module/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
  330. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +7 -3
  331. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  332. package/build-module/modal/index.js +1 -11
  333. package/build-module/modal/index.js.map +1 -1
  334. package/build-module/navigator/context.js +5 -1
  335. package/build-module/navigator/context.js.map +1 -1
  336. package/build-module/navigator/navigator-provider/component.js +43 -24
  337. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  338. package/build-module/navigator/navigator-screen/component.js +57 -32
  339. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  340. package/build-module/navigator/use-navigator.js +8 -8
  341. package/build-module/navigator/use-navigator.js.map +1 -1
  342. package/build-module/notice/index.native.js +2 -2
  343. package/build-module/notice/index.native.js.map +1 -1
  344. package/build-module/palette-edit/index.js +38 -30
  345. package/build-module/palette-edit/index.js.map +1 -1
  346. package/build-module/palette-edit/styles.js +11 -12
  347. package/build-module/palette-edit/styles.js.map +1 -1
  348. package/build-module/placeholder/index.js +4 -4
  349. package/build-module/placeholder/index.js.map +1 -1
  350. package/build-module/range-control/styles/range-control-styles.js +29 -29
  351. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  352. package/build-module/resizable-box/index.js.map +1 -1
  353. package/build-module/resizable-box/resize-tooltip/index.js +3 -3
  354. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  355. package/build-module/resizable-box/resize-tooltip/label.js +0 -1
  356. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  357. package/build-module/sandbox/index.native.js +5 -5
  358. package/build-module/sandbox/index.native.js.map +1 -1
  359. package/build-module/scrollable/hook.js +1 -1
  360. package/build-module/scrollable/hook.js.map +1 -1
  361. package/build-module/select-control/index.js.map +1 -1
  362. package/build-module/slot-fill/bubbles-virtually/fill.js +11 -2
  363. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  364. package/build-module/spacer/component.js +0 -1
  365. package/build-module/spacer/component.js.map +1 -1
  366. package/build-module/spinner/index.js +40 -5
  367. package/build-module/spinner/index.js.map +1 -1
  368. package/build-module/spinner/index.native.js +4 -2
  369. package/build-module/spinner/index.native.js.map +1 -1
  370. package/build-module/spinner/styles.js +49 -0
  371. package/build-module/spinner/styles.js.map +1 -0
  372. package/build-module/surface/hook.js +1 -1
  373. package/build-module/surface/hook.js.map +1 -1
  374. package/build-module/text/get-line-height.js +0 -1
  375. package/build-module/text/get-line-height.js.map +1 -1
  376. package/build-module/text/hook.js +5 -5
  377. package/build-module/text/hook.js.map +1 -1
  378. package/build-module/tip/index.js +4 -8
  379. package/build-module/tip/index.js.map +1 -1
  380. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -10
  381. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  382. package/build-module/toggle-group-control/toggle-group-control/styles.js +3 -11
  383. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  384. package/build-module/toggle-group-control/toggle-group-control-option/component.js +0 -1
  385. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  386. package/build-module/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  387. package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  388. package/build-module/tools-panel/styles.js +10 -10
  389. package/build-module/tools-panel/styles.js.map +1 -1
  390. package/build-module/tools-panel/tools-panel/component.js +0 -1
  391. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  392. package/build-module/tools-panel/tools-panel/hook.js +52 -45
  393. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  394. package/build-module/tools-panel/tools-panel-header/component.js +0 -1
  395. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  396. package/build-module/tools-panel/tools-panel-header/hook.js +3 -3
  397. package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
  398. package/build-module/tools-panel/tools-panel-item/component.js +0 -1
  399. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  400. package/build-module/tools-panel/tools-panel-item/hook.js +17 -9
  401. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  402. package/build-module/tree-grid/index.js +18 -10
  403. package/build-module/tree-grid/index.js.map +1 -1
  404. package/build-module/truncate/hook.js +2 -2
  405. package/build-module/truncate/hook.js.map +1 -1
  406. package/build-module/ui/shortcut/component.js +0 -1
  407. package/build-module/ui/shortcut/component.js.map +1 -1
  408. package/build-module/ui/utils/font-size.js +0 -1
  409. package/build-module/ui/utils/font-size.js.map +1 -1
  410. package/build-module/ui/utils/get-valid-children.js +0 -1
  411. package/build-module/ui/utils/get-valid-children.js.map +1 -1
  412. package/build-module/unit-control/index.js +0 -1
  413. package/build-module/unit-control/index.js.map +1 -1
  414. package/build-module/unit-control/unit-select-control.js +1 -2
  415. package/build-module/unit-control/unit-select-control.js.map +1 -1
  416. package/build-module/utils/colors-values.js +6 -3
  417. package/build-module/utils/colors-values.js.map +1 -1
  418. package/build-module/utils/config-values.js +1 -4
  419. package/build-module/utils/config-values.js.map +1 -1
  420. package/build-module/utils/hooks/use-combined-ref.js +0 -1
  421. package/build-module/utils/hooks/use-combined-ref.js.map +1 -1
  422. package/build-module/utils/hooks/use-latest-ref.js +0 -1
  423. package/build-module/utils/hooks/use-latest-ref.js.map +1 -1
  424. package/build-module/z-stack/component.js +0 -1
  425. package/build-module/z-stack/component.js.map +1 -1
  426. package/build-style/style-rtl.css +22 -6
  427. package/build-style/style.css +22 -6
  428. package/build-types/base-control/index.d.ts.map +1 -1
  429. package/build-types/base-control/styles/base-control-styles.d.ts +4 -0
  430. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  431. package/build-types/button/index.d.ts.map +1 -1
  432. package/build-types/card/types.d.ts.map +1 -1
  433. package/build-types/circular-option-picker/index.d.ts +31 -0
  434. package/build-types/circular-option-picker/index.d.ts.map +1 -0
  435. package/build-types/color-palette/index.d.ts +16 -0
  436. package/build-types/color-palette/index.d.ts.map +1 -0
  437. package/build-types/color-palette/styles.d.ts +8 -0
  438. package/build-types/color-palette/styles.d.ts.map +1 -0
  439. package/build-types/color-picker/color-display.d.ts +14 -0
  440. package/build-types/color-picker/color-display.d.ts.map +1 -0
  441. package/build-types/color-picker/color-input.d.ts +14 -0
  442. package/build-types/color-picker/color-input.d.ts.map +1 -0
  443. package/build-types/color-picker/component.d.ts +11 -0
  444. package/build-types/color-picker/component.d.ts.map +1 -0
  445. package/build-types/color-picker/hex-input.d.ts +13 -0
  446. package/build-types/color-picker/hex-input.d.ts.map +1 -0
  447. package/build-types/color-picker/hsl-input.d.ts +13 -0
  448. package/build-types/color-picker/hsl-input.d.ts.map +1 -0
  449. package/build-types/color-picker/index.d.ts +5 -0
  450. package/build-types/color-picker/index.d.ts.map +1 -0
  451. package/build-types/color-picker/input-with-slider.d.ts +12 -0
  452. package/build-types/color-picker/input-with-slider.d.ts.map +1 -0
  453. package/build-types/color-picker/legacy-adapter.d.ts +6 -0
  454. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -0
  455. package/build-types/color-picker/picker.d.ts +10 -0
  456. package/build-types/color-picker/picker.d.ts.map +1 -0
  457. package/build-types/color-picker/rgb-input.d.ts +13 -0
  458. package/build-types/color-picker/rgb-input.d.ts.map +1 -0
  459. package/build-types/color-picker/styles.d.ts +76 -0
  460. package/build-types/color-picker/styles.d.ts.map +1 -0
  461. package/build-types/color-picker/types.d.ts +2 -0
  462. package/build-types/color-picker/types.d.ts.map +1 -0
  463. package/build-types/color-picker/use-deprecated-props.d.ts +49 -0
  464. package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -0
  465. package/build-types/confirm-dialog/component.d.ts +11 -14
  466. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  467. package/build-types/confirm-dialog/styles.d.ts +10 -0
  468. package/build-types/confirm-dialog/styles.d.ts.map +1 -0
  469. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  470. package/build-types/divider/component.d.ts.map +1 -1
  471. package/build-types/dropdown/index.d.ts +1 -13
  472. package/build-types/dropdown/index.d.ts.map +1 -1
  473. package/build-types/elevation/hook.d.ts.map +1 -1
  474. package/build-types/elevation/types.d.ts.map +1 -1
  475. package/build-types/flex/flex/hook.d.ts.map +1 -1
  476. package/build-types/flex/types.d.ts.map +1 -1
  477. package/build-types/flyout/types.d.ts.map +1 -1
  478. package/build-types/grid/hook.d.ts.map +1 -1
  479. package/build-types/grid/types.d.ts.map +1 -1
  480. package/build-types/h-stack/hook.d.ts +1 -1
  481. package/build-types/h-stack/hook.d.ts.map +1 -1
  482. package/build-types/h-stack/types.d.ts.map +1 -1
  483. package/build-types/heading/component.d.ts.map +1 -1
  484. package/build-types/higher-order/with-focus-outside/index.d.ts +1 -1
  485. package/build-types/icon/index.d.ts.map +1 -1
  486. package/build-types/input-control/index.d.ts.map +1 -1
  487. package/build-types/input-control/input-base.d.ts.map +1 -1
  488. package/build-types/input-control/input-field.d.ts.map +1 -1
  489. package/build-types/input-control/reducer/actions.d.ts.map +1 -1
  490. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  491. package/build-types/input-control/reducer/state.d.ts.map +1 -1
  492. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  493. package/build-types/input-control/types.d.ts.map +1 -1
  494. package/build-types/item-group/item/component.d.ts.map +1 -1
  495. package/build-types/item-group/item/hook.d.ts.map +1 -1
  496. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  497. package/build-types/navigator/context.d.ts.map +1 -1
  498. package/build-types/navigator/navigator-provider/component.d.ts +16 -17
  499. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  500. package/build-types/navigator/navigator-screen/component.d.ts +16 -16
  501. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  502. package/build-types/navigator/types.d.ts +10 -9
  503. package/build-types/navigator/types.d.ts.map +1 -1
  504. package/build-types/resizable-box/index.d.ts +1 -1
  505. package/build-types/resizable-box/index.d.ts.map +1 -1
  506. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  507. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  508. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  509. package/build-types/select-control/index.d.ts +3 -2
  510. package/build-types/select-control/index.d.ts.map +1 -1
  511. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  512. package/build-types/spacer/component.d.ts.map +1 -1
  513. package/build-types/spacer/types.d.ts.map +1 -1
  514. package/build-types/spinner/index.d.ts +18 -1
  515. package/build-types/spinner/index.d.ts.map +1 -1
  516. package/build-types/spinner/styles.d.ts +13 -0
  517. package/build-types/spinner/styles.d.ts.map +1 -0
  518. package/build-types/surface/hook.d.ts.map +1 -1
  519. package/build-types/text/get-line-height.d.ts.map +1 -1
  520. package/build-types/text/hook.d.ts.map +1 -1
  521. package/build-types/text/types.d.ts.map +1 -1
  522. package/build-types/tip/index.d.ts.map +1 -1
  523. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  524. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +0 -5
  525. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  526. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  527. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
  528. package/build-types/toggle-group-control/types.d.ts +1 -7
  529. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  530. package/build-types/tools-panel/styles.d.ts.map +1 -1
  531. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  532. package/build-types/tools-panel/tools-panel/hook.d.ts +8 -4
  533. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  534. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  535. package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
  536. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  537. package/build-types/tools-panel/types.d.ts +14 -0
  538. package/build-types/tools-panel/types.d.ts.map +1 -1
  539. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  540. package/build-types/ui/control-group/types.d.ts.map +1 -1
  541. package/build-types/ui/form-group/types.d.ts.map +1 -1
  542. package/build-types/ui/shortcut/component.d.ts.map +1 -1
  543. package/build-types/ui/tooltip/types.d.ts.map +1 -1
  544. package/build-types/ui/utils/font-size.d.ts.map +1 -1
  545. package/build-types/ui/utils/get-valid-children.d.ts.map +1 -1
  546. package/build-types/unit-control/index.d.ts +3 -2
  547. package/build-types/unit-control/index.d.ts.map +1 -1
  548. package/build-types/unit-control/types.d.ts +2 -1
  549. package/build-types/unit-control/types.d.ts.map +1 -1
  550. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  551. package/build-types/utils/colors-values.d.ts +1 -0
  552. package/build-types/utils/colors-values.d.ts.map +1 -1
  553. package/build-types/utils/config-values.d.ts +1 -5
  554. package/build-types/utils/config-values.d.ts.map +1 -1
  555. package/build-types/utils/hooks/use-combined-ref.d.ts.map +1 -1
  556. package/build-types/utils/hooks/use-latest-ref.d.ts.map +1 -1
  557. package/build-types/v-stack/types.d.ts.map +1 -1
  558. package/build-types/z-stack/component.d.ts.map +1 -1
  559. package/package.json +20 -17
  560. package/src/base-control/index.js +11 -2
  561. package/src/base-control/styles/base-control-styles.js +10 -1
  562. package/src/base-field/hook.js +1 -1
  563. package/src/box-control/styles/box-control-styles.js +1 -1
  564. package/src/button/deprecated.js +1 -0
  565. package/src/button/index.js +1 -0
  566. package/src/card/card/component.js +1 -1
  567. package/src/card/card/hook.js +1 -1
  568. package/src/card/card-body/hook.js +1 -1
  569. package/src/card/card-divider/hook.js +1 -1
  570. package/src/card/card-footer/hook.js +1 -1
  571. package/src/card/card-header/hook.js +1 -1
  572. package/src/card/card-media/hook.js +1 -1
  573. package/src/card/types.ts +0 -1
  574. package/src/circular-option-picker/index.js +1 -0
  575. package/src/color-indicator/README.md +28 -0
  576. package/src/color-indicator/index.js +2 -0
  577. package/src/color-indicator/style.scss +1 -1
  578. package/src/color-palette/index.js +7 -8
  579. package/src/color-palette/index.native.js +2 -0
  580. package/src/color-palette/style.scss +11 -3
  581. package/src/color-palette/test/__snapshots__/index.js.snap +0 -1
  582. package/src/color-picker/README.md +1 -1
  583. package/src/color-picker/color-display.tsx +1 -1
  584. package/src/color-picker/color-input.tsx +1 -1
  585. package/src/color-picker/component.tsx +3 -4
  586. package/src/color-picker/use-deprecated-props.ts +2 -1
  587. package/src/combobox-control/stories/index.js +6 -2
  588. package/src/combobox-control/style.scss +2 -2
  589. package/src/confirm-dialog/component.tsx +7 -4
  590. package/src/confirm-dialog/stories/index.js +5 -2
  591. package/src/confirm-dialog/styles.ts +18 -0
  592. package/src/confirm-dialog/types.ts +0 -1
  593. package/src/custom-gradient-bar/control-points.js +2 -3
  594. package/src/custom-gradient-picker/style.scss +0 -1
  595. package/src/custom-select-control/index.js +13 -1
  596. package/src/custom-select-control/stories/index.js +27 -0
  597. package/src/custom-select-control/test/index.js +46 -0
  598. package/src/date-time/README.md +4 -4
  599. package/src/date-time/test/time.js +2 -2
  600. package/src/date-time/time.js +2 -2
  601. package/src/dimension-control/README.md +2 -0
  602. package/src/divider/component.tsx +0 -1
  603. package/src/dropdown/index.js +14 -13
  604. package/src/elevation/hook.js +1 -0
  605. package/src/elevation/types.ts +0 -1
  606. package/src/external-link/styles/external-link-styles.js +3 -3
  607. package/src/flex/flex/hook.js +1 -0
  608. package/src/flex/types.ts +0 -1
  609. package/src/flyout/types.ts +0 -1
  610. package/src/form-token-field/style.scss +1 -1
  611. package/src/form-token-field/suggestions-list.js +109 -120
  612. package/src/form-token-field/test/index.js +4 -2
  613. package/src/gradient-picker/README.md +94 -0
  614. package/src/grid/hook.js +1 -0
  615. package/src/grid/types.ts +0 -1
  616. package/src/h-stack/types.ts +0 -1
  617. package/src/heading/component.tsx +0 -1
  618. package/src/icon/index.tsx +0 -1
  619. package/src/input-control/index.tsx +0 -1
  620. package/src/input-control/input-base.tsx +0 -1
  621. package/src/input-control/input-field.tsx +0 -1
  622. package/src/input-control/reducer/actions.ts +0 -1
  623. package/src/input-control/reducer/reducer.ts +0 -1
  624. package/src/input-control/reducer/state.ts +0 -1
  625. package/src/input-control/styles/input-control-styles.tsx +7 -7
  626. package/src/input-control/types.ts +0 -1
  627. package/src/item-group/item/component.tsx +0 -1
  628. package/src/item-group/item/hook.ts +1 -2
  629. package/src/item-group/item-group/component.tsx +0 -1
  630. package/src/item-group/stories/index.js +2 -2
  631. package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +2 -0
  632. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +8 -14
  633. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +33 -3
  634. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +162 -0
  635. package/src/mobile/bottom-sheet/cell.native.js +8 -6
  636. package/src/mobile/bottom-sheet/index.native.js +24 -14
  637. package/src/mobile/bottom-sheet/link-suggestion-styles.native.scss +3 -0
  638. package/src/mobile/bottom-sheet/range-text-input.native.js +5 -2
  639. package/src/mobile/bottom-sheet/styles.native.scss +4 -0
  640. package/src/mobile/bottom-sheet/test/index.native.js +24 -0
  641. package/src/mobile/color-settings/index.native.js +2 -0
  642. package/src/mobile/color-settings/palette.screen.native.js +5 -0
  643. package/src/mobile/color-settings/utils.native.js +8 -3
  644. package/src/mobile/html-text-input/test/index.native.js +34 -35
  645. package/src/mobile/keyboard-avoiding-view/index.ios.js +12 -9
  646. package/src/mobile/link-picker/index.native.js +2 -1
  647. package/src/mobile/link-picker/link-picker-screen.native.js +13 -5
  648. package/src/mobile/link-settings/index.native.js +2 -1
  649. package/src/mobile/link-settings/test/edit.native.js +172 -236
  650. package/src/mobile/link-settings/test/link-settings-navigation.native.js +97 -0
  651. package/src/mobile/readable-content-view/index.native.js +5 -2
  652. package/src/mobile/utils/use-is-floating-keyboard.native.js +2 -5
  653. package/src/mobile/utils/use-unit-converter-to-mobile.native.js +11 -3
  654. package/src/modal/index.js +1 -10
  655. package/src/navigator/context.ts +5 -1
  656. package/src/navigator/navigator-provider/README.md +30 -20
  657. package/src/navigator/navigator-provider/component.tsx +69 -25
  658. package/src/navigator/navigator-screen/component.tsx +71 -34
  659. package/src/navigator/stories/index.js +26 -13
  660. package/src/navigator/test/index.js +167 -32
  661. package/src/navigator/types.ts +11 -11
  662. package/src/navigator/use-navigator.ts +4 -4
  663. package/src/notice/index.native.js +5 -2
  664. package/src/palette-edit/index.js +115 -75
  665. package/src/palette-edit/styles.js +22 -3
  666. package/src/placeholder/index.js +8 -6
  667. package/src/placeholder/style.scss +12 -0
  668. package/src/placeholder/test/index.js +18 -1
  669. package/src/range-control/styles/range-control-styles.js +1 -1
  670. package/src/resizable-box/index.tsx +0 -1
  671. package/src/resizable-box/resize-tooltip/index.tsx +1 -2
  672. package/src/resizable-box/resize-tooltip/label.tsx +0 -1
  673. package/src/sandbox/index.native.js +8 -5
  674. package/src/scrollable/hook.js +1 -1
  675. package/src/scrollable/stories/index.js +6 -3
  676. package/src/select-control/README.md +2 -2
  677. package/src/select-control/index.tsx +3 -2
  678. package/src/select-control/stories/index.js +1 -1
  679. package/src/slot-fill/bubbles-virtually/fill.js +12 -1
  680. package/src/spacer/component.tsx +0 -1
  681. package/src/spacer/types.ts +0 -1
  682. package/src/spinner/README.md +10 -10
  683. package/src/spinner/index.js +42 -3
  684. package/src/spinner/index.native.js +7 -2
  685. package/src/spinner/stories/index.js +36 -3
  686. package/src/spinner/styles.js +47 -0
  687. package/src/surface/hook.js +1 -0
  688. package/src/text/get-line-height.ts +0 -1
  689. package/src/text/hook.js +1 -0
  690. package/src/text/types.ts +0 -1
  691. package/src/tip/index.js +2 -4
  692. package/src/toggle-group-control/test/__snapshots__/index.js.snap +25 -27
  693. package/src/toggle-group-control/toggle-group-control/component.tsx +1 -12
  694. package/src/toggle-group-control/toggle-group-control/styles.ts +0 -14
  695. package/src/toggle-group-control/toggle-group-control-option/component.tsx +0 -1
  696. package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -3
  697. package/src/toggle-group-control/types.ts +1 -9
  698. package/src/tools-panel/stories/index.js +21 -1
  699. package/src/tools-panel/stories/tools-panel-with-item-group-slot.js +244 -0
  700. package/src/tools-panel/styles.ts +1 -3
  701. package/src/tools-panel/test/__snapshots__/index.js.snap +219 -0
  702. package/src/tools-panel/test/index.js +218 -20
  703. package/src/tools-panel/tools-panel/README.md +3 -2
  704. package/src/tools-panel/tools-panel/component.tsx +0 -1
  705. package/src/tools-panel/tools-panel/hook.ts +164 -97
  706. package/src/tools-panel/tools-panel-header/component.tsx +0 -1
  707. package/src/tools-panel/tools-panel-header/hook.ts +3 -3
  708. package/src/tools-panel/tools-panel-item/component.tsx +0 -1
  709. package/src/tools-panel/tools-panel-item/hook.ts +39 -8
  710. package/src/tools-panel/types.ts +14 -1
  711. package/src/tooltip/test/index.native.js +3 -1
  712. package/src/tree-grid/index.js +157 -126
  713. package/src/truncate/hook.js +1 -1
  714. package/src/ui/README.md +1 -1
  715. package/src/ui/context/wordpress-component.ts +0 -1
  716. package/src/ui/control-group/types.ts +0 -1
  717. package/src/ui/form-group/types.ts +0 -1
  718. package/src/ui/shortcut/component.tsx +0 -1
  719. package/src/ui/tooltip/types.ts +0 -1
  720. package/src/ui/utils/font-size.ts +0 -1
  721. package/src/ui/utils/get-valid-children.ts +0 -1
  722. package/src/unit-control/index.tsx +0 -1
  723. package/src/unit-control/types.ts +2 -2
  724. package/src/unit-control/unit-select-control.tsx +0 -1
  725. package/src/utils/colors-values.js +4 -3
  726. package/src/utils/config-values.js +1 -5
  727. package/src/utils/hooks/stories/use-cx.js +121 -44
  728. package/src/utils/hooks/use-combined-ref.ts +0 -1
  729. package/src/utils/hooks/use-latest-ref.ts +0 -1
  730. package/src/v-stack/types.ts +0 -1
  731. package/src/z-stack/component.tsx +0 -1
  732. package/tsconfig.json +3 -0
  733. package/tsconfig.tsbuildinfo +1 -1
  734. package/build/spinner/styles/spinner-styles.js +0 -40
  735. package/build/spinner/styles/spinner-styles.js.map +0 -1
  736. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -90
  737. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  738. package/build-module/spinner/styles/spinner-styles.js +0 -28
  739. package/build-module/spinner/styles/spinner-styles.js.map +0 -1
  740. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -86
  741. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  742. package/build-types/spinner/styles/spinner-styles.d.ts +0 -5
  743. package/build-types/spinner/styles/spinner-styles.d.ts.map +0 -1
  744. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts +0 -9
  745. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +0 -1
  746. package/src/spinner/styles/spinner-styles.js +0 -47
  747. package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +0 -86
  748. package/src/ui/visually-hidden/README.md +0 -21
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/grid/hook.js"],"names":["useGrid","props","align","alignment","className","columnGap","columns","gap","isInline","justify","rowGap","rows","templateColumns","templateRows","otherProps","columnsAsArray","Array","isArray","column","rowsAsArray","row","gridTemplateColumns","gridTemplateRows","cx","classes","alignmentProps","gridClasses","alignItems","display","CONFIG","gridBase","undefined","gridRowGap","gridColumnGap","justifyContent","verticalAlign"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAjBA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAOA;AACA;AACA;AACe,SAASA,OAAT,CAAkBC,KAAlB,EAA0B;AACxC,QAAM;AACLC,IAAAA,KADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,SAHK;AAILC,IAAAA,SAJK;AAKLC,IAAAA,OAAO,GAAG,CALL;AAMLC,IAAAA,GAAG,GAAG,CAND;AAOLC,IAAAA,QAAQ,GAAG,KAPN;AAQLC,IAAAA,OARK;AASLC,IAAAA,MATK;AAULC,IAAAA,IAVK;AAWLC,IAAAA,eAXK;AAYLC,IAAAA,YAZK;AAaL,OAAGC;AAbE,MAcF,+BAAkBb,KAAlB,EAAyB,MAAzB,CAdJ;AAgBA,QAAMc,cAAc,GAAGC,KAAK,CAACC,OAAN,CAAeX,OAAf,IAA2BA,OAA3B,GAAqC,C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hB;AA8BA,SAAO,EAAE,GAAGI,UAAL;AAAiBV,IAAAA,SAAS,EAAEoB;AAA5B,GAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem } from '../ui/context';\nimport { getAlignmentProps } from './utils';\nimport { useResponsiveValue } from '../ui/utils/use-responsive-value';\nimport CONFIG from '../utils/config-values';\nimport { useCx } from '../utils/hooks/use-cx';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>} props\n */\nexport default function useGrid( props ) {\n\tconst {\n\t\talign,\n\t\talignment,\n\t\tclassName,\n\t\tcolumnGap,\n\t\tcolumns = 2,\n\t\tgap = 3,\n\t\tisInline = false,\n\t\tjustify,\n\t\trowGap,\n\t\trows,\n\t\ttemplateColumns,\n\t\ttemplateRows,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Grid' );\n\n\tconst columnsAsArray = Array.isArray( columns ) ? columns : [ columns ];\n\tconst column = useResponsiveValue( columnsAsArray );\n\tconst rowsAsArray = Array.isArray( rows ) ? rows : [ rows ];\n\tconst row = useResponsiveValue( rowsAsArray );\n\n\tconst gridTemplateColumns =\n\t\ttemplateColumns || ( !! columns && `repeat( ${ column }, 1fr )` );\n\tconst gridTemplateRows =\n\t\ttemplateRows || ( !! rows && `repeat( ${ row }, 1fr )` );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst alignmentProps = getAlignmentProps( alignment );\n\n\t\tconst gridClasses = css( {\n\t\t\talignItems: align,\n\t\t\tdisplay: isInline ? 'inline-grid' : 'grid',\n\t\t\tgap: `calc( ${ CONFIG.gridBase } * ${ gap } )`,\n\t\t\tgridTemplateColumns: gridTemplateColumns || undefined,\n\t\t\tgridTemplateRows: gridTemplateRows || undefined,\n\t\t\tgridRowGap: rowGap,\n\t\t\tgridColumnGap: columnGap,\n\t\t\tjustifyContent: justify,\n\t\t\tverticalAlign: isInline ? 'middle' : undefined,\n\t\t\t...alignmentProps,\n\t\t} );\n\n\t\treturn cx( gridClasses, className );\n\t}, [\n\t\talign,\n\t\talignment,\n\t\tclassName,\n\t\tcolumnGap,\n\t\tgap,\n\t\tgridTemplateColumns,\n\t\tgridTemplateRows,\n\t\tisInline,\n\t\tjustify,\n\t\trowGap,\n\t] );\n\n\treturn { ...otherProps, className: classes };\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/grid/hook.js"],"names":["useGrid","props","align","alignment","className","columnGap","columns","gap","isInline","justify","rowGap","rows","templateColumns","templateRows","otherProps","columnsAsArray","Array","isArray","column","rowsAsArray","row","gridTemplateColumns","gridTemplateRows","cx","classes","alignmentProps","gridClasses","alignItems","display","CONFIG","gridBase","undefined","gridRowGap","gridColumnGap","justifyContent","verticalAlign"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAjBA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAOA;AACA;AACA;AACe,SAASA,OAAT,CAAkBC,KAAlB,EAA0B;AACxC,QAAM;AACLC,IAAAA,KADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,SAHK;AAILC,IAAAA,SAJK;AAKLC,IAAAA,OAAO,GAAG,CALL;AAMLC,IAAAA,GAAG,GAAG,CAND;AAOLC,IAAAA,QAAQ,GAAG,KAPN;AAQLC,IAAAA,OARK;AASLC,IAAAA,MATK;AAULC,IAAAA,IAVK;AAWLC,IAAAA,eAXK;AAYLC,IAAAA,YAZK;AAaL,OAAGC;AAbE,MAcF,+BAAkBb,KAAlB,EAAyB,MAAzB,CAdJ;AAgBA,QAAMc,cAAc,GAAGC,KAAK,CAACC,OAAN,CAAeX,OAAf,IAA2BA,OAA3B,GAAqC,CAAEA,OAAF,CAA5D;AACA,QAAMY,MAAM,GAAG,4CAAoBH,cAApB,CAAf;AACA,QAAMI,WAAW,GAAGH,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AAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem } from '../ui/context';\nimport { getAlignmentProps } from './utils';\nimport { useResponsiveValue } from '../ui/utils/use-responsive-value';\nimport CONFIG from '../utils/config-values';\nimport { useCx } from '../utils/hooks/use-cx';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>} props\n */\nexport default function useGrid( props ) {\n\tconst {\n\t\talign,\n\t\talignment,\n\t\tclassName,\n\t\tcolumnGap,\n\t\tcolumns = 2,\n\t\tgap = 3,\n\t\tisInline = false,\n\t\tjustify,\n\t\trowGap,\n\t\trows,\n\t\ttemplateColumns,\n\t\ttemplateRows,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Grid' );\n\n\tconst columnsAsArray = Array.isArray( columns ) ? columns : [ columns ];\n\tconst column = useResponsiveValue( columnsAsArray );\n\tconst rowsAsArray = Array.isArray( rows ) ? rows : [ rows ];\n\tconst row = useResponsiveValue( rowsAsArray );\n\n\tconst gridTemplateColumns =\n\t\ttemplateColumns || ( !! columns && `repeat( ${ column }, 1fr )` );\n\tconst gridTemplateRows =\n\t\ttemplateRows || ( !! rows && `repeat( ${ row }, 1fr )` );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst alignmentProps = getAlignmentProps( alignment );\n\n\t\tconst gridClasses = css( {\n\t\t\talignItems: align,\n\t\t\tdisplay: isInline ? 'inline-grid' : 'grid',\n\t\t\tgap: `calc( ${ CONFIG.gridBase } * ${ gap } )`,\n\t\t\tgridTemplateColumns: gridTemplateColumns || undefined,\n\t\t\tgridTemplateRows: gridTemplateRows || undefined,\n\t\t\tgridRowGap: rowGap,\n\t\t\tgridColumnGap: columnGap,\n\t\t\tjustifyContent: justify,\n\t\t\tverticalAlign: isInline ? 'middle' : undefined,\n\t\t\t...alignmentProps,\n\t\t} );\n\n\t\treturn cx( gridClasses, className );\n\t}, [\n\t\talign,\n\t\talignment,\n\t\tclassName,\n\t\tcolumnGap,\n\t\tcx,\n\t\tgap,\n\t\tgridTemplateColumns,\n\t\tgridTemplateRows,\n\t\tisInline,\n\t\tjustify,\n\t\trowGap,\n\t] );\n\n\treturn { ...otherProps, className: classes };\n}\n"]}
@@ -20,7 +20,6 @@ var _hook = require("./hook");
20
20
  /**
21
21
  * External dependencies
22
22
  */
23
- // eslint-disable-next-line no-restricted-imports
24
23
 
25
24
  /**
26
25
  * Internal dependencies
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/heading/component.tsx"],"names":["Heading","props","forwardedRef","headerProps","ConnectedHeading"],"mappings":";;;;;;;;;;;;;AASA;;AACA;;AACA;;AAXA;AACA;AACA;AACA;;AAGA;AACA;AACA;AAKA,SAASA,OAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,WAAW,GAAG,sBAAYF,KAAZ,CAApB;AAEA,SAAO,4BAAC,UAAD,6BAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,gBAAgB,GAAG,6BAAgBJ,OAAhB,EAAyB,SAAzB,CAAzB;eAEeI,gB","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { Ref } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useHeading, HeadingProps } from './hook';\n\nfunction Heading(\n\tprops: WordPressComponentProps< HeadingProps, 'h1' >,\n\tforwardedRef: Ref< any >\n) {\n\tconst headerProps = useHeading( props );\n\n\treturn <View { ...headerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Heading` renders headings and titles using the library's typography system.\n *\n * @example\n * ```jsx\n * import { Heading } from `@wordpress/components`\n *\n * function Example() {\n * return <Heading>Code is Poetry</Heading>;\n * }\n * ```\n */\nconst ConnectedHeading = contextConnect( Heading, 'Heading' );\n\nexport default ConnectedHeading;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/heading/component.tsx"],"names":["Heading","props","forwardedRef","headerProps","ConnectedHeading"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAKA,SAASA,OAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,WAAW,GAAG,sBAAYF,KAAZ,CAApB;AAEA,SAAO,4BAAC,UAAD,6BAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,gBAAgB,GAAG,6BAAgBJ,OAAhB,EAAyB,SAAzB,CAAzB;eAEeI,gB","sourcesContent":["/**\n * External dependencies\n */\nimport type { Ref } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useHeading, HeadingProps } from './hook';\n\nfunction Heading(\n\tprops: WordPressComponentProps< HeadingProps, 'h1' >,\n\tforwardedRef: Ref< any >\n) {\n\tconst headerProps = useHeading( props );\n\n\treturn <View { ...headerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Heading` renders headings and titles using the library's typography system.\n *\n * @example\n * ```jsx\n * import { Heading } from `@wordpress/components`\n *\n * function Example() {\n * return <Heading>Code is Poetry</Heading>;\n * }\n * ```\n */\nconst ConnectedHeading = contextConnect( Heading, 'Heading' );\n\nexport default ConnectedHeading;\n"]}
@@ -18,7 +18,6 @@ var _dashicon = _interopRequireDefault(require("../dashicon"));
18
18
  /**
19
19
  * External dependencies
20
20
  */
21
- // eslint-disable-next-line no-restricted-imports
22
21
 
23
22
  /**
24
23
  * WordPress dependencies
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/icon/index.tsx"],"names":["Icon","icon","size","additionalProps","Dashicon","type","prototype","Component","SVG","appliedProps","width","height","props"],"mappings":";;;;;;;;;;;AASA;;AAMA;;AAKA;;AApBA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;AA8BA,SAASA,IAAT,OAIgB;AAAA,MAJI;AACnBC,IAAAA,IAAI,GAAG,IADY;AAEnBC,IAAAA,IAAI,GAAG,EAFY;AAGnB,OAAGC;AAHgB,GAIJ;;AACf,MAAK,aAAa,OAAOF,IAAzB,EAAgC;AAC/B,WACC,4BAAC,iBAAD;AACC,MAAA,IAAI,EAAGA;AADR,OAEQE,eAFR,EADD;AAMA;;AAED,MAAK,6BAAgBF,IAAhB,KAA0BG,sBAAaH,IAAI,CAACI,IAAjD,EAAwD;AACvD,WAAO,2BAAcJ,IAAd,EAAoB,EAC1B,GAAGE;AADuB,KAApB,CAAP;AAGA;;AAED,MAAK,eAAe,OAAOF,IAA3B,EAAkC;AACjC,QAAKA,IAAI,CAACK,SAAL,YAA0BC,kBAA/B,EAA2C;AAC1C,aAAO,4BAAeN,IAAf,EAAuB;AAC7BC,QAAAA,IAD6B;AAE7B,WAAGC;AAF0B,OAAvB,CAAP;AAIA;;AAED,WAASF,IAAF,CAA+C;AACrDC,MAAAA,IADqD;AAErD,SAAGC;AAFkD,KAA/C,CAAP;AAIA;;AAED,MAAKF,IAAI,KAAMA,IAAI,CAACI,IAAL,KAAc,KAAd,IAAuBJ,IAAI,CAACI,IAAL,KAAcG,eAA3C,CAAT,EAA4D;AAC3D,UAAMC,YAAY,GAAG;AACpBC,MAAAA,KAAK,EAAER,IADa;AAEpBS,MAAAA,MAAM,EAAET,IAFY;AAGpB,SAAGD,IAAI,CAACW,KAHY;AAIpB,SAAGT;AAJiB,KAArB;AAOA,WAAO,4BAAC,eAAD,EAAUM,YAAV,CAAP;AACA;;AAED,MAAK,6BAAgBR,IAAhB,CAAL,EAA8B;AAC7B,WAAO,2BAAcA,IAAd,EAAoB;AAC1B;AACAC,MAAAA,IAF0B;AAG1B,SAAGC;AAHuB,KAApB,CAAP;AAKA;;AAED,SAAOF,IAAP;AACA;;eAEcD,I","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tComponent,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\ntype IconType< P > = DashiconIconKey | ComponentType< P > | JSX.Element;\n\ninterface BaseProps< P > {\n\t/**\n\t * The icon to render. Supported values are: Dashicons (specified as\n\t * strings), functions, Component instances and `null`.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType< P > | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * @default 24\n\t */\n\tsize?: number;\n}\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props< P > = BaseProps< P > & AdditionalProps< IconType< P > >;\n\nfunction Icon< P >( {\n\ticon = null,\n\tsize = 24,\n\t...additionalProps\n}: Props< P > ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\tif ( icon.prototype instanceof Component ) {\n\t\t\treturn createElement( icon, ( {\n\t\t\t\tsize,\n\t\t\t\t...additionalProps,\n\t\t\t} as unknown ) as P );\n\t\t}\n\n\t\treturn ( icon as ( ...args: any[] ) => JSX.Element )( {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...icon.props,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/icon/index.tsx"],"names":["Icon","icon","size","additionalProps","Dashicon","type","prototype","Component","SVG","appliedProps","width","height","props"],"mappings":";;;;;;;;;;;AAQA;;AAMA;;AAKA;;AAnBA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;AA8BA,SAASA,IAAT,OAIgB;AAAA,MAJI;AACnBC,IAAAA,IAAI,GAAG,IADY;AAEnBC,IAAAA,IAAI,GAAG,EAFY;AAGnB,OAAGC;AAHgB,GAIJ;;AACf,MAAK,aAAa,OAAOF,IAAzB,EAAgC;AAC/B,WACC,4BAAC,iBAAD;AACC,MAAA,IAAI,EAAGA;AADR,OAEQE,eAFR,EADD;AAMA;;AAED,MAAK,6BAAgBF,IAAhB,KAA0BG,sBAAaH,IAAI,CAACI,IAAjD,EAAwD;AACvD,WAAO,2BAAcJ,IAAd,EAAoB,EAC1B,GAAGE;AADuB,KAApB,CAAP;AAGA;;AAED,MAAK,eAAe,OAAOF,IAA3B,EAAkC;AACjC,QAAKA,IAAI,CAACK,SAAL,YAA0BC,kBAA/B,EAA2C;AAC1C,aAAO,4BAAeN,IAAf,EAAuB;AAC7BC,QAAAA,IAD6B;AAE7B,WAAGC;AAF0B,OAAvB,CAAP;AAIA;;AAED,WAASF,IAAF,CAA+C;AACrDC,MAAAA,IADqD;AAErD,SAAGC;AAFkD,KAA/C,CAAP;AAIA;;AAED,MAAKF,IAAI,KAAMA,IAAI,CAACI,IAAL,KAAc,KAAd,IAAuBJ,IAAI,CAACI,IAAL,KAAcG,eAA3C,CAAT,EAA4D;AAC3D,UAAMC,YAAY,GAAG;AACpBC,MAAAA,KAAK,EAAER,IADa;AAEpBS,MAAAA,MAAM,EAAET,IAFY;AAGpB,SAAGD,IAAI,CAACW,KAHY;AAIpB,SAAGT;AAJiB,KAArB;AAOA,WAAO,4BAAC,eAAD,EAAUM,YAAV,CAAP;AACA;;AAED,MAAK,6BAAgBR,IAAhB,CAAL,EAA8B;AAC7B,WAAO,2BAAcA,IAAd,EAAoB;AAC1B;AACAC,MAAAA,IAF0B;AAG1B,SAAGC;AAHuB,KAApB,CAAP;AAKA;;AAED,SAAOF,IAAP;AACA;;eAEcD,I","sourcesContent":["/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tComponent,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\ntype IconType< P > = DashiconIconKey | ComponentType< P > | JSX.Element;\n\ninterface BaseProps< P > {\n\t/**\n\t * The icon to render. Supported values are: Dashicons (specified as\n\t * strings), functions, Component instances and `null`.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType< P > | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * @default 24\n\t */\n\tsize?: number;\n}\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props< P > = BaseProps< P > & AdditionalProps< IconType< P > >;\n\nfunction Icon< P >( {\n\ticon = null,\n\tsize = 24,\n\t...additionalProps\n}: Props< P > ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\tif ( icon.prototype instanceof Component ) {\n\t\t\treturn createElement( icon, ( {\n\t\t\t\tsize,\n\t\t\t\t...additionalProps,\n\t\t\t} as unknown ) as P );\n\t\t}\n\n\t\treturn ( icon as ( ...args: any[] ) => JSX.Element )( {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...icon.props,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/index.tsx"],"names":["useUniqueId","idProp","instanceId","InputControl","id","ref","__unstableStateReducer","stateReducer","state","__unstableInputWidth","className","disabled","hideLabelFromVision","isPressEnterToChange","label","labelPosition","onChange","noop","onValidate","onKeyDown","prefix","size","suffix","value","props","isFocused","setIsFocused","classes","ForwardedComponent"],"mappings":";;;;;;;;;;AAYA;;;;AATA;;AACA;;AAOA;;AAMA;;AACA;;AAlBA;AACA;AACA;;AAMA;AACA;AACA;;AAIA;AACA;AACA;AAKA,SAASA,WAAT,CAAsBC,MAAtB,EAAwC;AACvC,QAAM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,MAAM,EAAGK,MAXV;AAYC,IAAA,IAAI,EAAGC,IAZR;AAaC,IAAA,MAAM,EAAGC;AAbV,KAeC,4BAAC,mBAAD,6BACME,KADN;AAEC,IAAA,SAAS,EAAC,iCAFX;AAGC,IAAA,QAAQ,EAAGb,QAHZ;AAIC,IAAA,EAAE,EAAGP,EAJN;AAKC,IAAA,SAAS,EAAGqB,SALb;AAMC,IAAA,oBAAoB,EAAGZ,oBANxB;AAOC,IAAA,QAAQ,EAAGG,QAPZ;AAQC,IAAA,SAAS,EAAGG,SARb;AASC,IAAA,UAAU,EAAGD,UATd;AAUC,IAAA,GAAG,EAAGb,GAVP;AAWC,IAAA,YAAY,EAAGqB,YAXhB;AAYC,IAAA,IAAI,EAAGL,IAZR;AAaC,IAAA,YAAY,EAAGd,YAbhB;AAcC,IAAA,KAAK,EAAGgB;AAdT,KAfD,CADD;AAkCA;;AAED,MAAMK,kBAAkB,GAAG,yBAAYzB,YAAZ,CAA3B;eAEeyB,kB","sourcesContent":["/**\n * External dependencies\n */\nimport { noop } from 'lodash';\nimport classNames from 'classnames';\n// eslint-disable-next-line no-restricted-imports\nimport type { Ref } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InputBase from './input-base';\nimport InputField from './input-field';\nimport type { InputControlProps } from './types';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputControl );\n\tconst id = `inspector-input-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nexport function InputControl(\n\t{\n\t\t__unstableStateReducer: stateReducer = ( state ) => state,\n\t\t__unstableInputWidth,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thideLabelFromVision = false,\n\t\tid: idProp,\n\t\tisPressEnterToChange = false,\n\t\tlabel,\n\t\tlabelPosition = 'top',\n\t\tonChange = noop,\n\t\tonValidate = noop,\n\t\tonKeyDown = noop,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\tvalue,\n\t\t...props\n\t}: InputControlProps,\n\tref: Ref< HTMLInputElement >\n) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst id = useUniqueId( idProp );\n\tconst classes = classNames( 'components-input-control', className );\n\n\treturn (\n\t\t<InputBase\n\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\tclassName={ classes }\n\t\t\tdisabled={ disabled }\n\t\t\tgap={ 3 }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\tisFocused={ isFocused }\n\t\t\tjustify=\"left\"\n\t\t\tlabel={ label }\n\t\t\tlabelPosition={ labelPosition }\n\t\t\tprefix={ prefix }\n\t\t\tsize={ size }\n\t\t\tsuffix={ suffix }\n\t\t>\n\t\t\t<InputField\n\t\t\t\t{ ...props }\n\t\t\t\tclassName=\"components-input-control__input\"\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tid={ id }\n\t\t\t\tisFocused={ isFocused }\n\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\tonValidate={ onValidate }\n\t\t\t\tref={ ref }\n\t\t\t\tsetIsFocused={ setIsFocused }\n\t\t\t\tsize={ size }\n\t\t\t\tstateReducer={ stateReducer }\n\t\t\t\tvalue={ value }\n\t\t\t/>\n\t\t</InputBase>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( InputControl );\n\nexport default ForwardedComponent;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/index.tsx"],"names":["useUniqueId","idProp","instanceId","InputControl","id","ref","__unstableStateReducer","stateReducer","state","__unstableInputWidth","className","disabled","hideLabelFromVision","isPressEnterToChange","label","labelPosition","onChange","noop","onValidate","onKeyDown","prefix","size","suffix","value","props","isFocused","setIsFocused","classes","ForwardedComponent"],"mappings":";;;;;;;;;;AAWA;;;;AARA;;AACA;;AA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SAAS,EAAGqB,SAPb;AAQC,IAAA,OAAO,EAAC,MART;AASC,IAAA,KAAK,EAAGX,KATT;AAUC,IAAA,aAAa,EAAGC,aAVjB;AAWC,IAAA,MAAM,EAAGK,MAXV;AAYC,IAAA,IAAI,EAAGC,IAZR;AAaC,IAAA,MAAM,EAAGC;AAbV,KAeC,4BAAC,mBAAD,6BACME,KADN;AAEC,IAAA,SAAS,EAAC,iCAFX;AAGC,IAAA,QAAQ,EAAGb,QAHZ;AAIC,IAAA,EAAE,EAAGP,EAJN;AAKC,IAAA,SAAS,EAAGqB,SALb;AAMC,IAAA,oBAAoB,EAAGZ,oBANxB;AAOC,IAAA,QAAQ,EAAGG,QAPZ;AAQC,IAAA,SAAS,EAAGG,SARb;AASC,IAAA,UAAU,EAAGD,UATd;AAUC,IAAA,GAAG,EAAGb,GAVP;AAWC,IAAA,YAAY,EAAGqB,YAXhB;AAYC,IAAA,IAAI,EAAGL,IAZR;AAaC,IAAA,YAAY,EAAGd,YAbhB;AAcC,IAAA,KAAK,EAAGgB;AAdT,KAfD,CADD;AAkCA;;AAED,MAAMK,kBAAkB,GAAG,yBAAYzB,YAAZ,CAA3B;eAEeyB,kB","sourcesContent":["/**\n * External dependencies\n */\nimport { noop } from 'lodash';\nimport classNames from 'classnames';\nimport type { Ref } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InputBase from './input-base';\nimport InputField from './input-field';\nimport type { InputControlProps } from './types';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputControl );\n\tconst id = `inspector-input-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nexport function InputControl(\n\t{\n\t\t__unstableStateReducer: stateReducer = ( state ) => state,\n\t\t__unstableInputWidth,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thideLabelFromVision = false,\n\t\tid: idProp,\n\t\tisPressEnterToChange = false,\n\t\tlabel,\n\t\tlabelPosition = 'top',\n\t\tonChange = noop,\n\t\tonValidate = noop,\n\t\tonKeyDown = noop,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\tvalue,\n\t\t...props\n\t}: InputControlProps,\n\tref: Ref< HTMLInputElement >\n) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst id = useUniqueId( idProp );\n\tconst classes = classNames( 'components-input-control', className );\n\n\treturn (\n\t\t<InputBase\n\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\tclassName={ classes }\n\t\t\tdisabled={ disabled }\n\t\t\tgap={ 3 }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\tisFocused={ isFocused }\n\t\t\tjustify=\"left\"\n\t\t\tlabel={ label }\n\t\t\tlabelPosition={ labelPosition }\n\t\t\tprefix={ prefix }\n\t\t\tsize={ size }\n\t\t\tsuffix={ suffix }\n\t\t>\n\t\t\t<InputField\n\t\t\t\t{ ...props }\n\t\t\t\tclassName=\"components-input-control__input\"\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tid={ id }\n\t\t\t\tisFocused={ isFocused }\n\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\tonValidate={ onValidate }\n\t\t\t\tref={ ref }\n\t\t\t\tsetIsFocused={ setIsFocused }\n\t\t\t\tsize={ size }\n\t\t\t\tstateReducer={ stateReducer }\n\t\t\t\tvalue={ value }\n\t\t\t/>\n\t\t</InputBase>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( InputControl );\n\nexport default ForwardedComponent;\n"]}
@@ -23,7 +23,6 @@ var _inputControlStyles = require("./styles/input-control-styles");
23
23
  /**
24
24
  * External dependencies
25
25
  */
26
- // eslint-disable-next-line no-restricted-imports
27
26
 
28
27
  /**
29
28
  * WordPress dependencies
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/input-base.tsx"],"names":["useUniqueId","idProp","instanceId","InputBase","id","getUIFlexProps","labelPosition","props","direction","gap","justify","ref","__unstableInputWidth","children","className","disabled","hideLabelFromVision","isFocused","label","prefix","size","suffix","hideLabel"],"mappings":";;;;;;;;;;AAUA;;;;AADA;;AAMA;;AACA;;AACA;;AAjBA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AAYA,SAASA,WAAT,CAAsBC,MAAtB,EAAwC;AACvC,QAAMC,UAAU,GAAG,4BAAeC,SAAf,CAAnB;AACA,QAAMC,EAAE,GAAI,sBAAsBF,UAAY,EAA9C;AAEA,SAAOD,MAAM,IAAIG,EAAjB;AACA,C,CAED;;;AACA,SAASC,cAAT,CAAyBC,aAAzB,EAAyD;AACxD,QAAMC,KAA6D,GAAG,EAAtE;;AACA,UAASD,aAAT;AACC,SAAK,KAAL;AACCC,MAAAA,KAAK,CAACC,SAAN,GAAkB,QAAlB;AACAD,MAAAA,KAAK,CAACE,GAAN,GAAY,CAAZ;AACA;;AACD,SAAK,QAAL;AACCF,MAAAA,KAAK,CAACC,SAAN,GAAkB,gBAAlB;AACAD,MAAAA,KAAK,CAACE,GAAN,GAAY,CAAZ;AACA;;AACD,SAAK,MAAL;AACCF,MAAAA,KAAK,CAACG,OAAN,GAAgB,eAAhB;AACA;AAXF;;AAcA,SAAOH,KAAP;AACA;;AAEM,SAASJ,SAAT,OAgBNQ,GAhBM,EAiBL;AAAA,MAhBD;AACCC,IAAAA,oBADD;AAECC,IAAAA,QAFD;AAGCC,IAAAA,SAHD;AAICC,IAAAA,QAAQ,GAAG,KAJZ;AAKCC,IAAAA,mBAAmB,GAAG,KALvB;AAMCV,IAAAA,aAND;AAOCF,IAAAA,EAAE,EAAEH,MAPL;AAQCgB,IAAAA,SAAS,GAAG,KARb;AASCC,IAAAA,KATD;AAUCC,IAAAA,MAVD;AAWCC,IAAAA,IAAI,GAAG,SAXR;AAYCC,IAAAA,MAZD;AAaC,OAAGd;AAbJ,GAgBC;AACD,QAAMH,EAAE,GAAGJ,WAAW,CAAEC,MAAF,CAAtB;AACA,QAAMqB,SAAS,GAAGN,mBAAmB,IAAI,CAAEE,KAA3C;AAEA,SACC;AACA,gCAAC,wBAAD,6BACMX,KADN,EAEMF,cAAc,CAAEC,aAAF,CAFpB;AAGC,MAAA,SAAS,EAAGQ,SAHb;AAIC,MAAA,SAAS,EAAGG,SAJb;AAKC,MAAA,aAAa,EAAGX,aALjB;AAMC,MAAA,GAAG,EAAGK;AANP,QAQC,4BAAC,gCAAD,QACC,4BAAC,cAAD;AACC,MAAA,SAAS,EAAC,iCADX;AAEC,MAAA,mBAAmB,EAAGK,mBAFvB;AAGC,MAAA,aAAa,EAAGV,aAHjB;AAIC,MAAA,OAAO,EAAGF,EAJX;AAKC,MAAA,IAAI,EAAGgB;AALR,OAOGF,KAPH,CADD,CARD,EAmBC,4BAAC,6BAAD;AACC,MAAA,oBAAoB,EAAGN,oBADxB;AAEC,MAAA,SAAS,EAAC,qCAFX;AAGC,MAAA,QAAQ,EAAGG,QAHZ;AAIC,MAAA,SAAS,EAAGO,SAJb;AAKC,MAAA,aAAa,EAAGhB;AALjB,OAOGa,MAAM,IACP,4BAAC,0BAAD;AAAQ,MAAA,SAAS,EAAC;AAAlB,OACGA,MADH,CARF,EAYGN,QAZH,EAaGQ,MAAM,IACP,4BAAC,0BAAD;AAAQ,MAAA,SAAS,EAAC;AAAlB,OACGA,MADH,CAdF,EAkBC,4BAAC,iBAAD;AAAU,MAAA,QAAQ,EAAGN,QAArB;AAAgC,MAAA,SAAS,EAAGE;AAA5C,MAlBD,CAnBD;AAFD;AA2CA;;eAEc,yBAAYd,SAAZ,C","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { Ref } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Backdrop from './backdrop';\nimport Label from './label';\nimport {\n\tContainer,\n\tRoot,\n\tPrefix,\n\tSuffix,\n\tLabelWrapper,\n} from './styles/input-control-styles';\nimport type { InputBaseProps, LabelPosition } from './types';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputBase );\n\tconst id = `input-base-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\n// Adapter to map props for the new ui/flex compopnent.\nfunction getUIFlexProps( labelPosition?: LabelPosition ) {\n\tconst props: { direction?: string; gap?: number; justify?: string } = {};\n\tswitch ( labelPosition ) {\n\t\tcase 'top':\n\t\t\tprops.direction = 'column';\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'bottom':\n\t\t\tprops.direction = 'column-reverse';\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'edge':\n\t\t\tprops.justify = 'space-between';\n\t\t\tbreak;\n\t}\n\n\treturn props;\n}\n\nexport function InputBase(\n\t{\n\t\t__unstableInputWidth,\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thideLabelFromVision = false,\n\t\tlabelPosition,\n\t\tid: idProp,\n\t\tisFocused = false,\n\t\tlabel,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\t...props\n\t}: InputBaseProps,\n\tref: Ref< HTMLDivElement >\n) {\n\tconst id = useUniqueId( idProp );\n\tconst hideLabel = hideLabelFromVision || ! label;\n\n\treturn (\n\t\t// @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions\n\t\t<Root\n\t\t\t{ ...props }\n\t\t\t{ ...getUIFlexProps( labelPosition ) }\n\t\t\tclassName={ className }\n\t\t\tisFocused={ isFocused }\n\t\t\tlabelPosition={ labelPosition }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<LabelWrapper>\n\t\t\t\t<Label\n\t\t\t\t\tclassName=\"components-input-control__label\"\n\t\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\tsize={ size }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</Label>\n\t\t\t</LabelWrapper>\n\t\t\t<Container\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\tclassName=\"components-input-control__container\"\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabel={ hideLabel }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t>\n\t\t\t\t{ prefix && (\n\t\t\t\t\t<Prefix className=\"components-input-control__prefix\">\n\t\t\t\t\t\t{ prefix }\n\t\t\t\t\t</Prefix>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ suffix && (\n\t\t\t\t\t<Suffix className=\"components-input-control__suffix\">\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t</Suffix>\n\t\t\t\t) }\n\t\t\t\t<Backdrop disabled={ disabled } isFocused={ isFocused } />\n\t\t\t</Container>\n\t\t</Root>\n\t);\n}\n\nexport default forwardRef( InputBase );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/input-base.tsx"],"names":["useUniqueId","idProp","instanceId","InputBase","id","getUIFlexProps","labelPosition","props","direction","gap","justify","ref","__unstableInputWidth","children","className","disabled","hideLabelFromVision","isFocused","label","prefix","size","suffix","hideLabel"],"mappings":";;;;;;;;;;AASA;;;;AADA;;AAMA;;AACA;;AACA;;AAhBA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AAYA,SAASA,WAAT,CAAsBC,MAAtB,EAAwC;AACvC,QAAMC,UAAU,GAAG,4BAAeC,SAAf,CAAnB;AACA,QAAMC,EAAE,GAAI,sBAAsBF,UAAY,EAA9C;AAEA,SAAOD,MAAM,IAAIG,EAAjB;AACA,C,CAED;;;AACA,SAASC,cAAT,CAAyBC,aAAzB,EAAyD;AACxD,QAAMC,KAA6D,GAAG,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AI,EAAGgB;AALR,OAOGF,KAPH,CADD,CARD,EAmBC,4BAAC,6BAAD;AACC,MAAA,oBAAoB,EAAGN,oBADxB;AAEC,MAAA,SAAS,EAAC,qCAFX;AAGC,MAAA,QAAQ,EAAGG,QAHZ;AAIC,MAAA,SAAS,EAAGO,SAJb;AAKC,MAAA,aAAa,EAAGhB;AALjB,OAOGa,MAAM,IACP,4BAAC,0BAAD;AAAQ,MAAA,SAAS,EAAC;AAAlB,OACGA,MADH,CARF,EAYGN,QAZH,EAaGQ,MAAM,IACP,4BAAC,0BAAD;AAAQ,MAAA,SAAS,EAAC;AAAlB,OACGA,MADH,CAdF,EAkBC,4BAAC,iBAAD;AAAU,MAAA,QAAQ,EAAGN,QAArB;AAAgC,MAAA,SAAS,EAAGE;AAA5C,MAlBD,CAnBD;AAFD;AA2CA;;eAEc,yBAAYd,SAAZ,C","sourcesContent":["/**\n * External dependencies\n */\nimport type { Ref } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Backdrop from './backdrop';\nimport Label from './label';\nimport {\n\tContainer,\n\tRoot,\n\tPrefix,\n\tSuffix,\n\tLabelWrapper,\n} from './styles/input-control-styles';\nimport type { InputBaseProps, LabelPosition } from './types';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputBase );\n\tconst id = `input-base-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\n// Adapter to map props for the new ui/flex compopnent.\nfunction getUIFlexProps( labelPosition?: LabelPosition ) {\n\tconst props: { direction?: string; gap?: number; justify?: string } = {};\n\tswitch ( labelPosition ) {\n\t\tcase 'top':\n\t\t\tprops.direction = 'column';\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'bottom':\n\t\t\tprops.direction = 'column-reverse';\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'edge':\n\t\t\tprops.justify = 'space-between';\n\t\t\tbreak;\n\t}\n\n\treturn props;\n}\n\nexport function InputBase(\n\t{\n\t\t__unstableInputWidth,\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thideLabelFromVision = false,\n\t\tlabelPosition,\n\t\tid: idProp,\n\t\tisFocused = false,\n\t\tlabel,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\t...props\n\t}: InputBaseProps,\n\tref: Ref< HTMLDivElement >\n) {\n\tconst id = useUniqueId( idProp );\n\tconst hideLabel = hideLabelFromVision || ! label;\n\n\treturn (\n\t\t// @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions\n\t\t<Root\n\t\t\t{ ...props }\n\t\t\t{ ...getUIFlexProps( labelPosition ) }\n\t\t\tclassName={ className }\n\t\t\tisFocused={ isFocused }\n\t\t\tlabelPosition={ labelPosition }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<LabelWrapper>\n\t\t\t\t<Label\n\t\t\t\t\tclassName=\"components-input-control__label\"\n\t\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\tsize={ size }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</Label>\n\t\t\t</LabelWrapper>\n\t\t\t<Container\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\tclassName=\"components-input-control__container\"\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabel={ hideLabel }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t>\n\t\t\t\t{ prefix && (\n\t\t\t\t\t<Prefix className=\"components-input-control__prefix\">\n\t\t\t\t\t\t{ prefix }\n\t\t\t\t\t</Prefix>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ suffix && (\n\t\t\t\t\t<Suffix className=\"components-input-control__suffix\">\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t</Suffix>\n\t\t\t\t) }\n\t\t\t\t<Backdrop disabled={ disabled } isFocused={ isFocused } />\n\t\t\t</Container>\n\t\t</Root>\n\t);\n}\n\nexport default forwardRef( InputBase );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/input-field.tsx"],"names":["InputField","ref","disabled","dragDirection","dragThreshold","id","isDragEnabled","isFocused","isPressEnterToChange","onBlur","noop","onChange","onDrag","onDragEnd","onDragStart","onFocus","onKeyDown","onValidate","size","setIsFocused","stateReducer","state","value","valueProp","type","props","change","commit","drag","dragEnd","dragStart","invalidate","pressDown","pressEnter","pressUp","reset","update","_event","isDragging","isDirty","wasDirtyOnBlur","dragCursor","current","event","handleOnBlur","handleOnCommit","handleOnFocus","handleOnChange","nextValue","target","currentTarget","err","handleOnKeyDown","keyCode","UP","DOWN","ENTER","preventDefault","dragGestureProps","dragProps","distance","dragging","persist","stopPropagation","threshold","enabled","handleOnMouseDown","onMouseDown","ownerDocument","activeElement","focus","ForwardedComponent"],"mappings":";;;;;;;;;AAmBA;;;;AAhBA;;AACA;;AAgBA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AA7BA;AACA;AACA;;AAcA;AACA;AACA;AAcA,SAASA,UAAT,OAwBCC,GAxBD,EAyBE;AAAA,MAxBD;AACCC,IAAAA,QAAQ,GAAG,KADZ;AAECC,IAAAA,aAAa,GAAG,GAFjB;AAGCC,IAAAA,aAAa,GAAG,EAHjB;AAICC,IAAAA,EAJD;AAKCC,IAAAA,aAAa,GAAG,KALjB;AAMCC,IAAAA,SAND;AAOCC,IAAAA,oBAAoB,GAAG,KAPxB;AAQCC,IAAAA,MAAM,GAAGC,YARV;AASCC,IAAAA,QAAQ,GAAGD,YATZ;AAUCE,IAAAA,MAAM,GAAGF,YAVV;AAWCG,IAAAA,SAAS,GAAGH,YAXb;AAYCI,IAAAA,WAAW,GAAGJ,YAZf;AAaCK,IAAAA,OAAO,GAAG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AkCA,QAAMqD,SAAS,GAAGrD,aAAa,GAAGoD,gBAAgB,EAAnB,GAAwB,EAAvD;AACA;AACD;AACA;AACA;;AACC,MAAIQ,iBAAJ;;AACA,MAAK1C,IAAI,KAAK,QAAd,EAAyB;AACxB0C,IAAAA,iBAAiB,GAAKvB,KAAF,IAA6C;AAAA;;AAChE,4BAAAlB,KAAK,CAAC0C,WAAN,+EAAA1C,KAAK,EAAgBkB,KAAhB,CAAL;;AACA,UACCA,KAAK,CAACO,aAAN,KACAP,KAAK,CAACO,aAAN,CAAoBkB,aAApB,CAAkCC,aAFnC,EAGE;AACD1B,QAAAA,KAAK,CAACO,aAAN,CAAoBoB,KAApB;AACA;AACD,KARD;AASA;;AAED,SACC,4BAAC,yBAAD,6BACM7C,KADN,EAEMkC,SAFN;AAGC,IAAA,SAAS,EAAC,iCAHX;AAIC,IAAA,QAAQ,EAAGzD,QAJZ;AAKC,IAAA,UAAU,EAAGuC,UALd;AAMC,IAAA,UAAU,EAAGH,UANd;AAOC,IAAA,EAAE,EAAGjC,EAPN;AAQC,IAAA,MAAM,EAAGuC,YARV;AASC,IAAA,QAAQ,EAAGG,cATZ;AAUC,IAAA,OAAO,EAAGD,aAVX;AAWC,IAAA,SAAS,EAAGM,eAXb;AAYC,IAAA,WAAW,EAAGc,iBAZf;AAaC,IAAA,GAAG,EAAGjE,GAbP;AAcC,IAAA,SAAS,EAAGiB,IAdb;AAeC,IAAA,KAAK,EAAGI,KAfT;AAgBC,IAAA,IAAI,EAAGE;AAhBR,KADD;AAoBA;;AAED,MAAM+C,kBAAkB,GAAG,yBAAYvE,UAAZ,CAA3B;eAEeuE,kB","sourcesContent":["/**\n * External dependencies\n */\nimport { noop } from 'lodash';\nimport { useDrag } from 'react-use-gesture';\n// eslint-disable-next-line no-restricted-imports\nimport type {\n\tSyntheticEvent,\n\tChangeEvent,\n\tKeyboardEvent,\n\tPointerEvent,\n\tFocusEvent,\n\tRef,\n\tMouseEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useRef } from '@wordpress/element';\nimport { UP, DOWN, ENTER } from '@wordpress/keycodes';\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport { useDragCursor } from './utils';\nimport { Input } from './styles/input-control-styles';\nimport { useInputControlStateReducer } from './reducer/reducer';\nimport { isValueEmpty } from '../utils/values';\nimport { useUpdateEffect } from '../utils';\nimport type { InputFieldProps } from './types';\n\nfunction InputField(\n\t{\n\t\tdisabled = false,\n\t\tdragDirection = 'n',\n\t\tdragThreshold = 10,\n\t\tid,\n\t\tisDragEnabled = false,\n\t\tisFocused,\n\t\tisPressEnterToChange = false,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonDrag = noop,\n\t\tonDragEnd = noop,\n\t\tonDragStart = noop,\n\t\tonFocus = noop,\n\t\tonKeyDown = noop,\n\t\tonValidate = noop,\n\t\tsize = 'default',\n\t\tsetIsFocused,\n\t\tstateReducer = ( state: any ) => state,\n\t\tvalue: valueProp,\n\t\ttype,\n\t\t...props\n\t}: WordPressComponentProps< InputFieldProps, 'input', false >,\n\tref: Ref< HTMLInputElement >\n) {\n\tconst {\n\t\t// State\n\t\tstate,\n\t\t// Actions\n\t\tchange,\n\t\tcommit,\n\t\tdrag,\n\t\tdragEnd,\n\t\tdragStart,\n\t\tinvalidate,\n\t\tpressDown,\n\t\tpressEnter,\n\t\tpressUp,\n\t\treset,\n\t\tupdate,\n\t} = useInputControlStateReducer( stateReducer, {\n\t\tisDragEnabled,\n\t\tvalue: valueProp,\n\t\tisPressEnterToChange,\n\t} );\n\n\tconst { _event, value, isDragging, isDirty } = state;\n\tconst wasDirtyOnBlur = useRef( false );\n\n\tconst dragCursor = useDragCursor( isDragging, dragDirection );\n\n\t/*\n\t * Handles synchronization of external and internal value state.\n\t * If not focused and did not hold a dirty value[1] on blur\n\t * updates the value from the props. Otherwise if not holding\n\t * a dirty value[1] propagates the value and event through onChange.\n\t * [1] value is only made dirty if isPressEnterToChange is true\n\t */\n\tuseUpdateEffect( () => {\n\t\tif ( valueProp === value ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( ! isFocused && ! wasDirtyOnBlur.current ) {\n\t\t\tupdate( valueProp, _event as SyntheticEvent );\n\t\t} else if ( ! isDirty ) {\n\t\t\tonChange( value, {\n\t\t\t\tevent: _event as ChangeEvent< HTMLInputElement >,\n\t\t\t} );\n\t\t\twasDirtyOnBlur.current = false;\n\t\t}\n\t}, [ value, isDirty, isFocused, valueProp ] );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused?.( false );\n\n\t\t/**\n\t\t * If isPressEnterToChange is set, this commits the value to\n\t\t * the onChange callback.\n\t\t */\n\t\tif ( isPressEnterToChange && isDirty ) {\n\t\t\twasDirtyOnBlur.current = true;\n\t\t\tif ( ! isValueEmpty( value ) ) {\n\t\t\t\thandleOnCommit( event );\n\t\t\t} else {\n\t\t\t\treset( valueProp, event );\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused?.( true );\n\t};\n\n\tconst handleOnChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.target.value;\n\t\tchange( nextValue, event );\n\t};\n\n\tconst handleOnCommit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.currentTarget.value;\n\n\t\ttry {\n\t\t\tonValidate( nextValue );\n\t\t\tcommit( nextValue, event );\n\t\t} catch ( err ) {\n\t\t\tinvalidate( err, event );\n\t\t}\n\t};\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { keyCode } = event;\n\t\tonKeyDown( event );\n\n\t\tswitch ( keyCode ) {\n\t\t\tcase UP:\n\t\t\t\tpressUp( event );\n\t\t\t\tbreak;\n\n\t\t\tcase DOWN:\n\t\t\t\tpressDown( event );\n\t\t\t\tbreak;\n\n\t\t\tcase ENTER:\n\t\t\t\tpressEnter( event );\n\n\t\t\t\tif ( isPressEnterToChange ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\thandleOnCommit( event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tconst dragGestureProps = useDrag< PointerEvent< HTMLInputElement > >(\n\t\t( dragProps ) => {\n\t\t\tconst { distance, dragging, event } = dragProps;\n\t\t\t// The event is persisted to prevent errors in components using this\n\t\t\t// to check if a modifier key was held while dragging.\n\t\t\tevent.persist();\n\n\t\t\tif ( ! distance ) return;\n\t\t\tevent.stopPropagation();\n\n\t\t\t/**\n\t\t\t * Quick return if no longer dragging.\n\t\t\t * This prevents unnecessary value calculations.\n\t\t\t */\n\t\t\tif ( ! dragging ) {\n\t\t\t\tonDragEnd( dragProps );\n\t\t\t\tdragEnd( dragProps );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonDrag( dragProps );\n\t\t\tdrag( dragProps );\n\n\t\t\tif ( ! isDragging ) {\n\t\t\t\tonDragStart( dragProps );\n\t\t\t\tdragStart( dragProps );\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tthreshold: dragThreshold,\n\t\t\tenabled: isDragEnabled,\n\t\t}\n\t);\n\n\tconst dragProps = isDragEnabled ? dragGestureProps() : {};\n\t/*\n\t * Works around the odd UA (e.g. Firefox) that does not focus inputs of\n\t * type=number when their spinner arrows are pressed.\n\t */\n\tlet handleOnMouseDown;\n\tif ( type === 'number' ) {\n\t\thandleOnMouseDown = ( event: MouseEvent< HTMLInputElement > ) => {\n\t\t\tprops.onMouseDown?.( event );\n\t\t\tif (\n\t\t\t\tevent.currentTarget !==\n\t\t\t\tevent.currentTarget.ownerDocument.activeElement\n\t\t\t) {\n\t\t\t\tevent.currentTarget.focus();\n\t\t\t}\n\t\t};\n\t}\n\n\treturn (\n\t\t<Input\n\t\t\t{ ...props }\n\t\t\t{ ...dragProps }\n\t\t\tclassName=\"components-input-control__input\"\n\t\t\tdisabled={ disabled }\n\t\t\tdragCursor={ dragCursor }\n\t\t\tisDragging={ isDragging }\n\t\t\tid={ id }\n\t\t\tonBlur={ handleOnBlur }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonFocus={ handleOnFocus }\n\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\tonMouseDown={ handleOnMouseDown }\n\t\t\tref={ ref }\n\t\t\tinputSize={ size }\n\t\t\tvalue={ value }\n\t\t\ttype={ type }\n\t\t/>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( InputField );\n\nexport default ForwardedComponent;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/input-field.tsx"],"names":["InputField","ref","disabled","dragDirection","dragThreshold","id","isDragEnabled","isFocused","isPressEnterToChange","onBlur","noop","onChange","onDrag","onDragEnd","onDragStart","onFocus","onKeyDown","onValidate","size","setIsFocused","stateReducer","state","value","valueProp","type","props","change","commit","drag","dragEnd","dragStart","invalidate","pressDown","pressEnter","pressUp","reset","update","_event","isDragging","isDirty","wasDirtyOnBlur","dragCursor","current","event","handleOnBlur","handleOnCommit","handleOnFocus","handleOnChange","nextValue","target","currentTarget","err","handleOnKeyDown","keyCode","UP","DOWN","ENTER","preventDefault","dragGestureProps","dragProps","distance","dragging","persist","stopPropagation","threshold","enabled","handleOnMouseDown","onMouseDown","ownerDocument","activeElement","focus","ForwardedComponent"],"mappings":";;;;;;;;;AAkBA;;;;AAfA;;AACA;;AAeA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AA5BA;AACA;AACA;;AAaA;AACA;AACA;AAcA,SAASA,UAAT,OAwBCC,GAxBD,EAyBE;AAAA,MAxBD;AACCC,IAAAA,QAAQ,GAAG,KADZ;AAECC,IAAAA,aAAa,GAAG,GAFjB;AAGCC,IAAAA,aAAa,GAAG,EAHjB;AAICC,IAAAA,EAJD;AAKCC,IAAAA,aAAa,GAAG,KALjB;AAMCC,IAAAA,SAND;AAOCC,IAAAA,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B","sourcesContent":["/**\n * External dependencies\n */\nimport { noop } from 'lodash';\nimport { useDrag } from 'react-use-gesture';\nimport type {\n\tSyntheticEvent,\n\tChangeEvent,\n\tKeyboardEvent,\n\tPointerEvent,\n\tFocusEvent,\n\tRef,\n\tMouseEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useRef } from '@wordpress/element';\nimport { UP, DOWN, ENTER } from '@wordpress/keycodes';\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport { useDragCursor } from './utils';\nimport { Input } from './styles/input-control-styles';\nimport { useInputControlStateReducer } from './reducer/reducer';\nimport { isValueEmpty } from '../utils/values';\nimport { useUpdateEffect } from '../utils';\nimport type { InputFieldProps } from './types';\n\nfunction InputField(\n\t{\n\t\tdisabled = false,\n\t\tdragDirection = 'n',\n\t\tdragThreshold = 10,\n\t\tid,\n\t\tisDragEnabled = false,\n\t\tisFocused,\n\t\tisPressEnterToChange = false,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonDrag = noop,\n\t\tonDragEnd = noop,\n\t\tonDragStart = noop,\n\t\tonFocus = noop,\n\t\tonKeyDown = noop,\n\t\tonValidate = noop,\n\t\tsize = 'default',\n\t\tsetIsFocused,\n\t\tstateReducer = ( state: any ) => state,\n\t\tvalue: valueProp,\n\t\ttype,\n\t\t...props\n\t}: WordPressComponentProps< InputFieldProps, 'input', false >,\n\tref: Ref< HTMLInputElement >\n) {\n\tconst {\n\t\t// State\n\t\tstate,\n\t\t// Actions\n\t\tchange,\n\t\tcommit,\n\t\tdrag,\n\t\tdragEnd,\n\t\tdragStart,\n\t\tinvalidate,\n\t\tpressDown,\n\t\tpressEnter,\n\t\tpressUp,\n\t\treset,\n\t\tupdate,\n\t} = useInputControlStateReducer( stateReducer, {\n\t\tisDragEnabled,\n\t\tvalue: valueProp,\n\t\tisPressEnterToChange,\n\t} );\n\n\tconst { _event, value, isDragging, isDirty } = state;\n\tconst wasDirtyOnBlur = useRef( false );\n\n\tconst dragCursor = useDragCursor( isDragging, dragDirection );\n\n\t/*\n\t * Handles synchronization of external and internal value state.\n\t * If not focused and did not hold a dirty value[1] on blur\n\t * updates the value from the props. Otherwise if not holding\n\t * a dirty value[1] propagates the value and event through onChange.\n\t * [1] value is only made dirty if isPressEnterToChange is true\n\t */\n\tuseUpdateEffect( () => {\n\t\tif ( valueProp === value ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( ! isFocused && ! wasDirtyOnBlur.current ) {\n\t\t\tupdate( valueProp, _event as SyntheticEvent );\n\t\t} else if ( ! isDirty ) {\n\t\t\tonChange( value, {\n\t\t\t\tevent: _event as ChangeEvent< HTMLInputElement >,\n\t\t\t} );\n\t\t\twasDirtyOnBlur.current = false;\n\t\t}\n\t}, [ value, isDirty, isFocused, valueProp ] );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused?.( false );\n\n\t\t/**\n\t\t * If isPressEnterToChange is set, this commits the value to\n\t\t * the onChange callback.\n\t\t */\n\t\tif ( isPressEnterToChange && isDirty ) {\n\t\t\twasDirtyOnBlur.current = true;\n\t\t\tif ( ! isValueEmpty( value ) ) {\n\t\t\t\thandleOnCommit( event );\n\t\t\t} else {\n\t\t\t\treset( valueProp, event );\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused?.( true );\n\t};\n\n\tconst handleOnChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.target.value;\n\t\tchange( nextValue, event );\n\t};\n\n\tconst handleOnCommit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.currentTarget.value;\n\n\t\ttry {\n\t\t\tonValidate( nextValue );\n\t\t\tcommit( nextValue, event );\n\t\t} catch ( err ) {\n\t\t\tinvalidate( err, event );\n\t\t}\n\t};\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { keyCode } = event;\n\t\tonKeyDown( event );\n\n\t\tswitch ( keyCode ) {\n\t\t\tcase UP:\n\t\t\t\tpressUp( event );\n\t\t\t\tbreak;\n\n\t\t\tcase DOWN:\n\t\t\t\tpressDown( event );\n\t\t\t\tbreak;\n\n\t\t\tcase ENTER:\n\t\t\t\tpressEnter( event );\n\n\t\t\t\tif ( isPressEnterToChange ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\thandleOnCommit( event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tconst dragGestureProps = useDrag< PointerEvent< HTMLInputElement > >(\n\t\t( dragProps ) => {\n\t\t\tconst { distance, dragging, event } = dragProps;\n\t\t\t// The event is persisted to prevent errors in components using this\n\t\t\t// to check if a modifier key was held while dragging.\n\t\t\tevent.persist();\n\n\t\t\tif ( ! distance ) return;\n\t\t\tevent.stopPropagation();\n\n\t\t\t/**\n\t\t\t * Quick return if no longer dragging.\n\t\t\t * This prevents unnecessary value calculations.\n\t\t\t */\n\t\t\tif ( ! dragging ) {\n\t\t\t\tonDragEnd( dragProps );\n\t\t\t\tdragEnd( dragProps );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonDrag( dragProps );\n\t\t\tdrag( dragProps );\n\n\t\t\tif ( ! isDragging ) {\n\t\t\t\tonDragStart( dragProps );\n\t\t\t\tdragStart( dragProps );\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tthreshold: dragThreshold,\n\t\t\tenabled: isDragEnabled,\n\t\t}\n\t);\n\n\tconst dragProps = isDragEnabled ? dragGestureProps() : {};\n\t/*\n\t * Works around the odd UA (e.g. Firefox) that does not focus inputs of\n\t * type=number when their spinner arrows are pressed.\n\t */\n\tlet handleOnMouseDown;\n\tif ( type === 'number' ) {\n\t\thandleOnMouseDown = ( event: MouseEvent< HTMLInputElement > ) => {\n\t\t\tprops.onMouseDown?.( event );\n\t\t\tif (\n\t\t\t\tevent.currentTarget !==\n\t\t\t\tevent.currentTarget.ownerDocument.activeElement\n\t\t\t) {\n\t\t\t\tevent.currentTarget.focus();\n\t\t\t}\n\t\t};\n\t}\n\n\treturn (\n\t\t<Input\n\t\t\t{ ...props }\n\t\t\t{ ...dragProps }\n\t\t\tclassName=\"components-input-control__input\"\n\t\t\tdisabled={ disabled }\n\t\t\tdragCursor={ dragCursor }\n\t\t\tisDragging={ isDragging }\n\t\t\tid={ id }\n\t\t\tonBlur={ handleOnBlur }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonFocus={ handleOnFocus }\n\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\tonMouseDown={ handleOnMouseDown }\n\t\t\tref={ ref }\n\t\t\tinputSize={ size }\n\t\t\tvalue={ value }\n\t\t\ttype={ type }\n\t\t/>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( InputField );\n\nexport default ForwardedComponent;\n"]}
@@ -8,7 +8,6 @@ exports.UPDATE = exports.RESET = exports.PRESS_UP = exports.PRESS_ENTER = export
8
8
  /**
9
9
  * External dependencies
10
10
  */
11
- // eslint-disable-next-line no-restricted-imports
12
11
 
13
12
  /**
14
13
  * Internal dependencies
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/reducer/actions.ts"],"names":["CHANGE","COMMIT","DRAG_END","DRAG_START","DRAG","INVALIDATE","PRESS_DOWN","PRESS_ENTER","PRESS_UP","RESET","UPDATE"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;;AAGA;AACA;AACA;AAGO,MAAMA,MAAM,GAAG,QAAf;;AACA,MAAMC,MAAM,GAAG,QAAf;;AACA,MAAMC,QAAQ,GAAG,UAAjB;;AACA,MAAMC,UAAU,GAAG,YAAnB;;AACA,MAAMC,IAAI,GAAG,MAAb;;AACA,MAAMC,UAAU,GAAG,YAAnB;;AACA,MAAMC,UAAU,GAAG,YAAnB;;AACA,MAAMC,WAAW,GAAG,aAApB;;AACA,MAAMC,QAAQ,GAAG,UAAjB;;AACA,MAAMC,KAAK,GAAG,OAAd;;AACA,MAAMC,MAAM,GAAG,QAAf","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { SyntheticEvent } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { DragProps } from '../types';\n\nexport const CHANGE = 'CHANGE';\nexport const COMMIT = 'COMMIT';\nexport const DRAG_END = 'DRAG_END';\nexport const DRAG_START = 'DRAG_START';\nexport const DRAG = 'DRAG';\nexport const INVALIDATE = 'INVALIDATE';\nexport const PRESS_DOWN = 'PRESS_DOWN';\nexport const PRESS_ENTER = 'PRESS_ENTER';\nexport const PRESS_UP = 'PRESS_UP';\nexport const RESET = 'RESET';\nexport const UPDATE = 'UPDATE';\n\ninterface EventPayload {\n\tevent?: SyntheticEvent;\n}\n\ninterface Action< Type, ExtraPayload = {} > {\n\ttype: Type;\n\tpayload: EventPayload & ExtraPayload;\n}\n\ninterface ValuePayload {\n\tvalue: string;\n}\n\nexport type ChangeAction = Action< typeof CHANGE, ValuePayload >;\nexport type CommitAction = Action< typeof COMMIT, ValuePayload >;\nexport type PressUpAction = Action< typeof PRESS_UP >;\nexport type PressDownAction = Action< typeof PRESS_DOWN >;\nexport type PressEnterAction = Action< typeof PRESS_ENTER >;\nexport type DragStartAction = Action< typeof DRAG_START, DragProps >;\nexport type DragEndAction = Action< typeof DRAG_END, DragProps >;\nexport type DragAction = Action< typeof DRAG, DragProps >;\nexport type ResetAction = Action< typeof RESET, Partial< ValuePayload > >;\nexport type UpdateAction = Action< typeof UPDATE, ValuePayload >;\nexport type InvalidateAction = Action< typeof INVALIDATE, { error: unknown } >;\n\nexport type ChangeEventAction =\n\t| ChangeAction\n\t| ResetAction\n\t| CommitAction\n\t| UpdateAction;\n\nexport type DragEventAction = DragStartAction | DragEndAction | DragAction;\n\nexport type KeyEventAction = PressDownAction | PressUpAction | PressEnterAction;\n\nexport type InputAction =\n\t| ChangeEventAction\n\t| KeyEventAction\n\t| DragEventAction\n\t| InvalidateAction;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/reducer/actions.ts"],"names":["CHANGE","COMMIT","DRAG_END","DRAG_START","DRAG","INVALIDATE","PRESS_DOWN","PRESS_ENTER","PRESS_UP","RESET","UPDATE"],"mappings":";;;;;;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AAGO,MAAMA,MAAM,GAAG,QAAf;;AACA,MAAMC,MAAM,GAAG,QAAf;;AACA,MAAMC,QAAQ,GAAG,UAAjB;;AACA,MAAMC,UAAU,GAAG,YAAnB;;AACA,MAAMC,IAAI,GAAG,MAAb;;AACA,MAAMC,UAAU,GAAG,YAAnB;;AACA,MAAMC,UAAU,GAAG,YAAnB;;AACA,MAAMC,WAAW,GAAG,aAApB;;AACA,MAAMC,QAAQ,GAAG,UAAjB;;AACA,MAAMC,KAAK,GAAG,OAAd;;AACA,MAAMC,MAAM,GAAG,QAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { SyntheticEvent } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { DragProps } from '../types';\n\nexport const CHANGE = 'CHANGE';\nexport const COMMIT = 'COMMIT';\nexport const DRAG_END = 'DRAG_END';\nexport const DRAG_START = 'DRAG_START';\nexport const DRAG = 'DRAG';\nexport const INVALIDATE = 'INVALIDATE';\nexport const PRESS_DOWN = 'PRESS_DOWN';\nexport const PRESS_ENTER = 'PRESS_ENTER';\nexport const PRESS_UP = 'PRESS_UP';\nexport const RESET = 'RESET';\nexport const UPDATE = 'UPDATE';\n\ninterface EventPayload {\n\tevent?: SyntheticEvent;\n}\n\ninterface Action< Type, ExtraPayload = {} > {\n\ttype: Type;\n\tpayload: EventPayload & ExtraPayload;\n}\n\ninterface ValuePayload {\n\tvalue: string;\n}\n\nexport type ChangeAction = Action< typeof CHANGE, ValuePayload >;\nexport type CommitAction = Action< typeof COMMIT, ValuePayload >;\nexport type PressUpAction = Action< typeof PRESS_UP >;\nexport type PressDownAction = Action< typeof PRESS_DOWN >;\nexport type PressEnterAction = Action< typeof PRESS_ENTER >;\nexport type DragStartAction = Action< typeof DRAG_START, DragProps >;\nexport type DragEndAction = Action< typeof DRAG_END, DragProps >;\nexport type DragAction = Action< typeof DRAG, DragProps >;\nexport type ResetAction = Action< typeof RESET, Partial< ValuePayload > >;\nexport type UpdateAction = Action< typeof UPDATE, ValuePayload >;\nexport type InvalidateAction = Action< typeof INVALIDATE, { error: unknown } >;\n\nexport type ChangeEventAction =\n\t| ChangeAction\n\t| ResetAction\n\t| CommitAction\n\t| UpdateAction;\n\nexport type DragEventAction = DragStartAction | DragEndAction | DragAction;\n\nexport type KeyEventAction = PressDownAction | PressUpAction | PressEnterAction;\n\nexport type InputAction =\n\t| ChangeEventAction\n\t| KeyEventAction\n\t| DragEventAction\n\t| InvalidateAction;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/reducer/reducer.ts"],"names":["mergeInitialState","initialState","initialInputControlState","value","initialValue","composeStateReducers","fns","args","reduceRight","state","fn","fnState","inputControlStateReducer","composedStateReducers","action","nextState","type","actions","PRESS_UP","isDirty","PRESS_DOWN","DRAG_START","isDragging","DRAG_END","CHANGE","error","payload","isPressEnterToChange","COMMIT","RESET","UPDATE","INVALIDATE","event","_event","useInputControlStateReducer","stateReducer","initialStateReducer","dispatch","createChangeEvent","nextValue","persist","createKeyEvent","createDragEvent","change","invalidate","reset","commit","update","dragStart","drag","DRAG","dragEnd","pressUp","pressDown","pressEnter","PRESS_ENTER"],"mappings":";;;;;;;;AAGA;;AAOA;;AAKA;;AAMA;;;;;;AArBA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAT,GAEc;AAAA,MADbC,YACa,uEADyBC,+BACzB;AACb,QAAM;AAAEC,IAAAA;AAAF,MAAYF,YAAlB;AAEA,SAAO,EACN,GAAGC,+BADG;AAEN,OAAGD,YAFG;AAGNG,IAAAA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,QAAMiB,MAAM,GAAGR,iBAAiB,CAAErB,OAAO,CAACW,MAAV,CAAhC;AACA,QAAMmB,MAAM,GAAGT,iBAAiB,CAAErB,OAAO,CAACa,MAAV,CAAhC;AAEA,QAAMkB,SAAS,GAAGN,eAAe,CAAEzB,OAAO,CAACI,UAAV,CAAjC;AACA,QAAM4B,IAAI,GAAGP,eAAe,CAAEzB,OAAO,CAACiC,IAAV,CAA5B;AACA,QAAMC,OAAO,GAAGT,eAAe,CAAEzB,OAAO,CAACM,QAAV,CAA/B;AAEA,QAAM6B,OAAO,GAAGX,cAAc,CAAExB,OAAO,CAACC,QAAV,CAA9B;AACA,QAAMmC,SAAS,GAAGZ,cAAc,CAAExB,OAAO,CAACG,UAAV,CAAhC;AACA,QAAMkC,UAAU,GAAGb,cAAc,CAAExB,OAAO,CAACsC,WAAV,CAAjC;AAEA,SAAO;AACNZ,IAAAA,MADM;AAENG,IAAAA,MAFM;AAGNT,IAAAA,QAHM;AAINY,IAAAA,IAJM;AAKNE,IAAAA,OALM;AAMNH,IAAAA,SANM;AAONJ,IAAAA,UAPM;AAQNS,IAAAA,SARM;AASNC,IAAAA,UATM;AAUNF,IAAAA,OAVM;AAWNP,IAAAA,KAXM;AAYNpC,IAAAA,KAZM;AAaNsC,IAAAA;AAbM,GAAP;AAeA","sourcesContent":["/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n// eslint-disable-next-line no-restricted-imports\nimport type { SyntheticEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useReducer } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tInputState,\n\tStateReducer,\n\tinitialInputControlState,\n\tinitialStateReducer,\n} from './state';\nimport * as actions from './actions';\n\n/**\n * Prepares initialState for the reducer.\n *\n * @param initialState The initial state.\n * @return Prepared initialState for the reducer\n */\nfunction mergeInitialState(\n\tinitialState: Partial< InputState > = initialInputControlState\n): InputState {\n\tconst { value } = initialState;\n\n\treturn {\n\t\t...initialInputControlState,\n\t\t...initialState,\n\t\tinitialValue: value,\n\t} as InputState;\n}\n\n/**\n * Composes multiple stateReducers into a single stateReducer, building\n * the pipeline to control the flow for state and actions.\n *\n * @param fns State reducers.\n * @return The single composed stateReducer.\n */\nexport const composeStateReducers = (\n\t...fns: StateReducer[]\n): StateReducer => {\n\treturn ( ...args ) => {\n\t\treturn fns.reduceRight( ( state, fn ) => {\n\t\t\tconst fnState = fn( ...args );\n\t\t\treturn isEmpty( fnState ) ? state : { ...state, ...fnState };\n\t\t}, {} as InputState );\n\t};\n};\n\n/**\n * Creates a reducer that opens the channel for external state subscription\n * and modification.\n *\n * This technique uses the \"stateReducer\" design pattern:\n * https://kentcdodds.com/blog/the-state-reducer-pattern/\n *\n * @param composedStateReducers A custom reducer that can subscribe and modify state.\n * @return The reducer.\n */\nfunction inputControlStateReducer(\n\tcomposedStateReducers: StateReducer\n): StateReducer {\n\treturn ( state, action ) => {\n\t\tconst nextState = { ...state };\n\n\t\tswitch ( action.type ) {\n\t\t\t/**\n\t\t\t * Keyboard events\n\t\t\t */\n\t\t\tcase actions.PRESS_UP:\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.PRESS_DOWN:\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Drag events\n\t\t\t */\n\t\t\tcase actions.DRAG_START:\n\t\t\t\tnextState.isDragging = true;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.DRAG_END:\n\t\t\t\tnextState.isDragging = false;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Input events\n\t\t\t */\n\t\t\tcase actions.CHANGE:\n\t\t\t\tnextState.error = null;\n\t\t\t\tnextState.value = action.payload.value;\n\n\t\t\t\tif ( state.isPressEnterToChange ) {\n\t\t\t\t\tnextState.isDirty = true;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase actions.COMMIT:\n\t\t\t\tnextState.value = action.payload.value;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.RESET:\n\t\t\t\tnextState.error = null;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tnextState.value = action.payload.value || state.initialValue;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.UPDATE:\n\t\t\t\tnextState.value = action.payload.value;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Validation\n\t\t\t */\n\t\t\tcase actions.INVALIDATE:\n\t\t\t\tnextState.error = action.payload.error;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( action.payload.event ) {\n\t\t\tnextState._event = action.payload.event;\n\t\t}\n\n\t\t/**\n\t\t * Send the nextState + action to the composedReducers via\n\t\t * this \"bridge\" mechanism. This allows external stateReducers\n\t\t * to hook into actions, and modify state if needed.\n\t\t */\n\t\treturn composedStateReducers( nextState, action );\n\t};\n}\n\n/**\n * A custom hook that connects and external stateReducer with an internal\n * reducer. This hook manages the internal state of InputControl.\n * However, by connecting an external stateReducer function, other\n * components can react to actions as well as modify state before it is\n * applied.\n *\n * This technique uses the \"stateReducer\" design pattern:\n * https://kentcdodds.com/blog/the-state-reducer-pattern/\n *\n * @param stateReducer An external state reducer.\n * @param initialState The initial state for the reducer.\n * @return State, dispatch, and a collection of actions.\n */\nexport function useInputControlStateReducer(\n\tstateReducer: StateReducer = initialStateReducer,\n\tinitialState: Partial< InputState > = initialInputControlState\n) {\n\tconst [ state, dispatch ] = useReducer< StateReducer >(\n\t\tinputControlStateReducer( stateReducer ),\n\t\tmergeInitialState( initialState )\n\t);\n\n\tconst createChangeEvent = ( type: actions.ChangeEventAction[ 'type' ] ) => (\n\t\tnextValue: actions.ChangeEventAction[ 'payload' ][ 'value' ],\n\t\tevent: actions.ChangeEventAction[ 'payload' ][ 'event' ]\n\t) => {\n\t\t/**\n\t\t * Persist allows for the (Synthetic) event to be used outside of\n\t\t * this function call.\n\t\t * https://reactjs.org/docs/events.html#event-pooling\n\t\t */\n\t\tif ( event && event.persist ) {\n\t\t\tevent.persist();\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype,\n\t\t\tpayload: { value: nextValue, event },\n\t\t} as actions.InputAction );\n\t};\n\n\tconst createKeyEvent = ( type: actions.KeyEventAction[ 'type' ] ) => (\n\t\tevent: actions.KeyEventAction[ 'payload' ][ 'event' ]\n\t) => {\n\t\t/**\n\t\t * Persist allows for the (Synthetic) event to be used outside of\n\t\t * this function call.\n\t\t * https://reactjs.org/docs/events.html#event-pooling\n\t\t */\n\t\tif ( event && event.persist ) {\n\t\t\tevent.persist();\n\t\t}\n\n\t\tdispatch( { type, payload: { event } } );\n\t};\n\n\tconst createDragEvent = ( type: actions.DragEventAction[ 'type' ] ) => (\n\t\tpayload: actions.DragEventAction[ 'payload' ]\n\t) => {\n\t\tdispatch( { type, payload } );\n\t};\n\n\t/**\n\t * Actions for the reducer\n\t */\n\tconst change = createChangeEvent( actions.CHANGE );\n\tconst invalidate = ( error: unknown, event: SyntheticEvent ) =>\n\t\tdispatch( { type: actions.INVALIDATE, payload: { error, event } } );\n\tconst reset = createChangeEvent( actions.RESET );\n\tconst commit = createChangeEvent( actions.COMMIT );\n\tconst update = createChangeEvent( actions.UPDATE );\n\n\tconst dragStart = createDragEvent( actions.DRAG_START );\n\tconst drag = createDragEvent( actions.DRAG );\n\tconst dragEnd = createDragEvent( actions.DRAG_END );\n\n\tconst pressUp = createKeyEvent( actions.PRESS_UP );\n\tconst pressDown = createKeyEvent( actions.PRESS_DOWN );\n\tconst pressEnter = createKeyEvent( actions.PRESS_ENTER );\n\n\treturn {\n\t\tchange,\n\t\tcommit,\n\t\tdispatch,\n\t\tdrag,\n\t\tdragEnd,\n\t\tdragStart,\n\t\tinvalidate,\n\t\tpressDown,\n\t\tpressEnter,\n\t\tpressUp,\n\t\treset,\n\t\tstate,\n\t\tupdate,\n\t} as const;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/reducer/reducer.ts"],"names":["mergeInitialState","initialState","initialInputControlState","value","initialValue","composeStateReducers","fns","args","reduceRight","state","fn","fnState","inputControlStateReducer","composedStateReducers","action","nextState","type","actions","PRESS_UP","isDirty","PRESS_DOWN","DRAG_START","isDragging","DRAG_END","CHANGE","error","payload","isPressEnterToChange","COMMIT","RESET","UPDATE","INVALIDATE","event","_event","useInputControlStateReducer","stateReducer","initialStateReducer","dispatch","createChangeEvent","nextValue","persist","createKeyEvent","createDragEvent","change","invalidate","reset","commit","update","dragStart","drag","DRAG","dragEnd","pressUp","pressDown","pressEnter","PRESS_ENTER"],"mappings":";;;;;;;;AAGA;;AAMA;;AAKA;;AAMA;;;;;;AApBA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAT,GAEc;AAAA,MADbC,YACa,uEADyBC,+BACzB;AACb,QAAM;AAAEC,IAAAA;AAAF,MAAYF,YAAlB;AAEA,SAAO,EACN,GAAGC,+BADG;AAEN,OAAGD,YAFG;AAGNG,IAAAA,YAAY,EAAED;AAHR,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,oBAAoB,GAAG,YAEjB;AAAA,oCADfC,GACe;AADfA,IAAAA,GACe;AAAA;;AAClB,SAAO,YAAe;AAAA,uCAAVC,IAAU;AAAVA,MAAAA,IAAU;AAAA;;AACrB,WAAOD,GAAG,CAACE,WAAJ,CAAiB,CAAEC,KAAF,EAASC,EAAT,KAAiB;AACxC,YAAMC,OAAO,GAAGD,EAAE,CAAE,GAAGH,IAAL,CAAlB;AACA,aAAO,qBAASI,OAAT,IAAqBF,KAArB,GAA6B,EAAE,GAAGA,KAAL;AAAY,WAAGE;AAAf,OAApC;AACA,KAHM,EAGJ,EAHI,CAAP;AAIA,GALD;AAMA,CATM;AAWP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACA,SAASC,wBAAT,CACCC,qBADD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,IAAAA,MAFM;AAGNT,IAAAA,QAHM;AAINY,IAAAA,IAJM;AAKNE,IAAAA,OALM;AAMNH,IAAAA,SANM;AAONJ,IAAAA,UAPM;AAQNS,IAAAA,SARM;AASNC,IAAAA,UATM;AAUNF,IAAAA,OAVM;AAWNP,IAAAA,KAXM;AAYNpC,IAAAA,KAZM;AAaNsC,IAAAA;AAbM,GAAP;AAeA","sourcesContent":["/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\nimport type { SyntheticEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useReducer } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tInputState,\n\tStateReducer,\n\tinitialInputControlState,\n\tinitialStateReducer,\n} from './state';\nimport * as actions from './actions';\n\n/**\n * Prepares initialState for the reducer.\n *\n * @param initialState The initial state.\n * @return Prepared initialState for the reducer\n */\nfunction mergeInitialState(\n\tinitialState: Partial< InputState > = initialInputControlState\n): InputState {\n\tconst { value } = initialState;\n\n\treturn {\n\t\t...initialInputControlState,\n\t\t...initialState,\n\t\tinitialValue: value,\n\t} as InputState;\n}\n\n/**\n * Composes multiple stateReducers into a single stateReducer, building\n * the pipeline to control the flow for state and actions.\n *\n * @param fns State reducers.\n * @return The single composed stateReducer.\n */\nexport const composeStateReducers = (\n\t...fns: StateReducer[]\n): StateReducer => {\n\treturn ( ...args ) => {\n\t\treturn fns.reduceRight( ( state, fn ) => {\n\t\t\tconst fnState = fn( ...args );\n\t\t\treturn isEmpty( fnState ) ? state : { ...state, ...fnState };\n\t\t}, {} as InputState );\n\t};\n};\n\n/**\n * Creates a reducer that opens the channel for external state subscription\n * and modification.\n *\n * This technique uses the \"stateReducer\" design pattern:\n * https://kentcdodds.com/blog/the-state-reducer-pattern/\n *\n * @param composedStateReducers A custom reducer that can subscribe and modify state.\n * @return The reducer.\n */\nfunction inputControlStateReducer(\n\tcomposedStateReducers: StateReducer\n): StateReducer {\n\treturn ( state, action ) => {\n\t\tconst nextState = { ...state };\n\n\t\tswitch ( action.type ) {\n\t\t\t/**\n\t\t\t * Keyboard events\n\t\t\t */\n\t\t\tcase actions.PRESS_UP:\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.PRESS_DOWN:\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Drag events\n\t\t\t */\n\t\t\tcase actions.DRAG_START:\n\t\t\t\tnextState.isDragging = true;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.DRAG_END:\n\t\t\t\tnextState.isDragging = false;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Input events\n\t\t\t */\n\t\t\tcase actions.CHANGE:\n\t\t\t\tnextState.error = null;\n\t\t\t\tnextState.value = action.payload.value;\n\n\t\t\t\tif ( state.isPressEnterToChange ) {\n\t\t\t\t\tnextState.isDirty = true;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase actions.COMMIT:\n\t\t\t\tnextState.value = action.payload.value;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.RESET:\n\t\t\t\tnextState.error = null;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tnextState.value = action.payload.value || state.initialValue;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.UPDATE:\n\t\t\t\tnextState.value = action.payload.value;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Validation\n\t\t\t */\n\t\t\tcase actions.INVALIDATE:\n\t\t\t\tnextState.error = action.payload.error;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( action.payload.event ) {\n\t\t\tnextState._event = action.payload.event;\n\t\t}\n\n\t\t/**\n\t\t * Send the nextState + action to the composedReducers via\n\t\t * this \"bridge\" mechanism. This allows external stateReducers\n\t\t * to hook into actions, and modify state if needed.\n\t\t */\n\t\treturn composedStateReducers( nextState, action );\n\t};\n}\n\n/**\n * A custom hook that connects and external stateReducer with an internal\n * reducer. This hook manages the internal state of InputControl.\n * However, by connecting an external stateReducer function, other\n * components can react to actions as well as modify state before it is\n * applied.\n *\n * This technique uses the \"stateReducer\" design pattern:\n * https://kentcdodds.com/blog/the-state-reducer-pattern/\n *\n * @param stateReducer An external state reducer.\n * @param initialState The initial state for the reducer.\n * @return State, dispatch, and a collection of actions.\n */\nexport function useInputControlStateReducer(\n\tstateReducer: StateReducer = initialStateReducer,\n\tinitialState: Partial< InputState > = initialInputControlState\n) {\n\tconst [ state, dispatch ] = useReducer< StateReducer >(\n\t\tinputControlStateReducer( stateReducer ),\n\t\tmergeInitialState( initialState )\n\t);\n\n\tconst createChangeEvent = ( type: actions.ChangeEventAction[ 'type' ] ) => (\n\t\tnextValue: actions.ChangeEventAction[ 'payload' ][ 'value' ],\n\t\tevent: actions.ChangeEventAction[ 'payload' ][ 'event' ]\n\t) => {\n\t\t/**\n\t\t * Persist allows for the (Synthetic) event to be used outside of\n\t\t * this function call.\n\t\t * https://reactjs.org/docs/events.html#event-pooling\n\t\t */\n\t\tif ( event && event.persist ) {\n\t\t\tevent.persist();\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype,\n\t\t\tpayload: { value: nextValue, event },\n\t\t} as actions.InputAction );\n\t};\n\n\tconst createKeyEvent = ( type: actions.KeyEventAction[ 'type' ] ) => (\n\t\tevent: actions.KeyEventAction[ 'payload' ][ 'event' ]\n\t) => {\n\t\t/**\n\t\t * Persist allows for the (Synthetic) event to be used outside of\n\t\t * this function call.\n\t\t * https://reactjs.org/docs/events.html#event-pooling\n\t\t */\n\t\tif ( event && event.persist ) {\n\t\t\tevent.persist();\n\t\t}\n\n\t\tdispatch( { type, payload: { event } } );\n\t};\n\n\tconst createDragEvent = ( type: actions.DragEventAction[ 'type' ] ) => (\n\t\tpayload: actions.DragEventAction[ 'payload' ]\n\t) => {\n\t\tdispatch( { type, payload } );\n\t};\n\n\t/**\n\t * Actions for the reducer\n\t */\n\tconst change = createChangeEvent( actions.CHANGE );\n\tconst invalidate = ( error: unknown, event: SyntheticEvent ) =>\n\t\tdispatch( { type: actions.INVALIDATE, payload: { error, event } } );\n\tconst reset = createChangeEvent( actions.RESET );\n\tconst commit = createChangeEvent( actions.COMMIT );\n\tconst update = createChangeEvent( actions.UPDATE );\n\n\tconst dragStart = createDragEvent( actions.DRAG_START );\n\tconst drag = createDragEvent( actions.DRAG );\n\tconst dragEnd = createDragEvent( actions.DRAG_END );\n\n\tconst pressUp = createKeyEvent( actions.PRESS_UP );\n\tconst pressDown = createKeyEvent( actions.PRESS_DOWN );\n\tconst pressEnter = createKeyEvent( actions.PRESS_ENTER );\n\n\treturn {\n\t\tchange,\n\t\tcommit,\n\t\tdispatch,\n\t\tdrag,\n\t\tdragEnd,\n\t\tdragStart,\n\t\tinvalidate,\n\t\tpressDown,\n\t\tpressEnter,\n\t\tpressUp,\n\t\treset,\n\t\tstate,\n\t\tupdate,\n\t} as const;\n}\n"]}
@@ -8,7 +8,6 @@ exports.initialStateReducer = exports.initialInputControlState = void 0;
8
8
  /**
9
9
  * External dependencies
10
10
  */
11
- // eslint-disable-next-line no-restricted-imports
12
11
 
13
12
  /**
14
13
  * Internal dependencies
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/reducer/state.ts"],"names":["initialStateReducer","state","initialInputControlState","_event","error","initialValue","isDirty","isDragEnabled","isDragging","isPressEnterToChange","value"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;;AAGA;AACA;AACA;AAgBO,MAAMA,mBAAiC,GAAKC,KAAF,IAAyBA,KAAnE;;;AAEA,MAAMC,wBAAoC,GAAG;AACnDC,EAAAA,MAAM,EAAE,EAD2C;AAEnDC,EAAAA,KAAK,EAAE,IAF4C;AAGnDC,EAAAA,YAAY,EAAE,EAHqC;AAInDC,EAAAA,OAAO,EAAE,KAJ0C;AAKnDC,EAAAA,aAAa,EAAE,KALoC;AAMnDC,EAAAA,UAAU,EAAE,KANuC;AAOnDC,EAAAA,oBAAoB,EAAE,KAP6B;AAQnDC,EAAAA,KAAK,EAAE;AAR4C,CAA7C","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { Reducer } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { InputAction } from './actions';\n\nexport interface InputState {\n\t_event: Event | {};\n\terror: unknown;\n\tinitialValue?: string;\n\tisDirty: boolean;\n\tisDragEnabled: boolean;\n\tisDragging: boolean;\n\tisPressEnterToChange: boolean;\n\tvalue?: string;\n}\n\nexport type StateReducer = Reducer< InputState, InputAction >;\n\nexport const initialStateReducer: StateReducer = ( state: InputState ) => state;\n\nexport const initialInputControlState: InputState = {\n\t_event: {},\n\terror: null,\n\tinitialValue: '',\n\tisDirty: false,\n\tisDragEnabled: false,\n\tisDragging: false,\n\tisPressEnterToChange: false,\n\tvalue: '',\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/reducer/state.ts"],"names":["initialStateReducer","state","initialInputControlState","_event","error","initialValue","isDirty","isDragEnabled","isDragging","isPressEnterToChange","value"],"mappings":";;;;;;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AAgBO,MAAMA,mBAAiC,GAAKC,KAAF,IAAyBA,KAAnE;;;AAEA,MAAMC,wBAAoC,GAAG;AACnDC,EAAAA,MAAM,EAAE,EAD2C;AAEnDC,EAAAA,KAAK,EAAE,IAF4C;AAGnDC,EAAAA,YAAY,EAAE,EAHqC;AAInDC,EAAAA,OAAO,EAAE,KAJ0C;AAKnDC,EAAAA,aAAa,EAAE,KALoC;AAMnDC,EAAAA,UAAU,EAAE,KANuC;AAOnDC,EAAAA,oBAAoB,EAAE,KAP6B;AAQnDC,EAAAA,KAAK,EAAE;AAR4C,CAA7C","sourcesContent":["/**\n * External dependencies\n */\nimport type { Reducer } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { InputAction } from './actions';\n\nexport interface InputState {\n\t_event: Event | {};\n\terror: unknown;\n\tinitialValue?: string;\n\tisDirty: boolean;\n\tisDragEnabled: boolean;\n\tisDragging: boolean;\n\tisPressEnterToChange: boolean;\n\tvalue?: string;\n}\n\nexport type StateReducer = Reducer< InputState, InputAction >;\n\nexport const initialStateReducer: StateReducer = ( state: InputState ) => state;\n\nexport const initialInputControlState: InputState = {\n\t_event: {},\n\terror: null,\n\tinitialValue: '',\n\tisDirty: false,\n\tisDragEnabled: false,\n\tisDragging: false,\n\tisPressEnterToChange: false,\n\tvalue: '',\n};\n"]}