@wordpress/components 28.13.1-next.082ed6819.0 → 29.0.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 (1020) hide show
  1. package/CHANGELOG.md +53 -2
  2. package/CONTRIBUTING.md +16 -16
  3. package/build/alignment-matrix-control/icon.js +1 -0
  4. package/build/alignment-matrix-control/icon.js.map +1 -1
  5. package/build/alignment-matrix-control/index.js +1 -0
  6. package/build/alignment-matrix-control/index.js.map +1 -1
  7. package/build/angle-picker-control/index.js +1 -1
  8. package/build/angle-picker-control/index.js.map +1 -1
  9. package/build/animation/index.js +0 -6
  10. package/build/animation/index.js.map +1 -1
  11. package/build/autocomplete/autocompleter-ui.js +1 -0
  12. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  13. package/build/autocomplete/autocompleter-ui.native.js +1 -0
  14. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  15. package/build/autocomplete/get-default-use-items.js +1 -0
  16. package/build/autocomplete/get-default-use-items.js.map +1 -1
  17. package/build/border-box-control/border-box-control-split-controls/component.js +1 -1
  18. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  19. package/build/border-box-control/utils.js +1 -0
  20. package/build/border-box-control/utils.js.map +1 -1
  21. package/build/border-control/border-control/component.js +2 -0
  22. package/build/border-control/border-control/component.js.map +1 -1
  23. package/build/border-control/border-control-dropdown/component.js +1 -0
  24. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  25. package/build/border-control/border-control-style-picker/component.js +1 -0
  26. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  27. package/build/box-control/index.js +35 -28
  28. package/build/box-control/index.js.map +1 -1
  29. package/build/box-control/input-control.js +161 -0
  30. package/build/box-control/input-control.js.map +1 -0
  31. package/build/box-control/types.js.map +1 -1
  32. package/build/box-control/utils.js +51 -48
  33. package/build/box-control/utils.js.map +1 -1
  34. package/build/button/index.native.js +1 -0
  35. package/build/button/index.native.js.map +1 -1
  36. package/build/button/types.js.map +1 -1
  37. package/build/circular-option-picker/circular-option-picker-actions.js +1 -0
  38. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  39. package/build/circular-option-picker/circular-option-picker-option.js +1 -0
  40. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  41. package/build/clipboard-button/index.js +5 -3
  42. package/build/clipboard-button/index.js.map +1 -1
  43. package/build/color-indicator/index.native.js +1 -0
  44. package/build/color-indicator/index.native.js.map +1 -1
  45. package/build/color-palette/index.js +1 -0
  46. package/build/color-palette/index.js.map +1 -1
  47. package/build/color-palette/utils.js +1 -0
  48. package/build/color-palette/utils.js.map +1 -1
  49. package/build/color-picker/input-with-slider.js +2 -2
  50. package/build/color-picker/input-with-slider.js.map +1 -1
  51. package/build/combobox-control/index.js +1 -0
  52. package/build/combobox-control/index.js.map +1 -1
  53. package/build/composite/item.js +0 -9
  54. package/build/composite/item.js.map +1 -1
  55. package/build/composite/legacy/index.js +1 -0
  56. package/build/composite/legacy/index.js.map +1 -1
  57. package/build/custom-gradient-picker/gradient-bar/control-points.js +3 -0
  58. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  59. package/build/custom-gradient-picker/gradient-bar/index.js +1 -0
  60. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  61. package/build/custom-gradient-picker/gradient-bar/utils.js +1 -0
  62. package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  63. package/build/custom-gradient-picker/index.js +3 -0
  64. package/build/custom-gradient-picker/index.js.map +1 -1
  65. package/build/custom-gradient-picker/serializer.js +1 -0
  66. package/build/custom-gradient-picker/serializer.js.map +1 -1
  67. package/build/custom-gradient-picker/types.js.map +1 -1
  68. package/build/custom-gradient-picker/utils.js +1 -0
  69. package/build/custom-gradient-picker/utils.js.map +1 -1
  70. package/build/custom-select-control/index.js +11 -2
  71. package/build/custom-select-control/index.js.map +1 -1
  72. package/build/custom-select-control/types.js.map +1 -1
  73. package/build/dashicon/index.js +1 -0
  74. package/build/dashicon/index.js.map +1 -1
  75. package/build/date-time/date/index.js +1 -0
  76. package/build/date-time/date/index.js.map +1 -1
  77. package/build/date-time/date/use-lilius/index.js +1 -0
  78. package/build/date-time/date/use-lilius/index.js.map +1 -1
  79. package/build/date-time/time/index.js +1 -0
  80. package/build/date-time/time/index.js.map +1 -1
  81. package/build/dimension-control/index.js +1 -0
  82. package/build/dimension-control/index.js.map +1 -1
  83. package/build/dimension-control/sizes.js +1 -0
  84. package/build/dimension-control/sizes.js.map +1 -1
  85. package/build/draggable/index.js +1 -0
  86. package/build/draggable/index.js.map +1 -1
  87. package/build/draggable/index.native.js +1 -0
  88. package/build/draggable/index.native.js.map +1 -1
  89. package/build/drop-zone/index.js +19 -13
  90. package/build/drop-zone/index.js.map +1 -1
  91. package/build/drop-zone/types.js.map +1 -1
  92. package/build/dropdown-menu/index.js +2 -0
  93. package/build/dropdown-menu/index.js.map +1 -1
  94. package/build/dropdown-menu/index.native.js +1 -0
  95. package/build/dropdown-menu/index.native.js.map +1 -1
  96. package/build/duotone-picker/color-list-picker/index.js +10 -14
  97. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  98. package/build/duotone-picker/duotone-picker.js +1 -0
  99. package/build/duotone-picker/duotone-picker.js.map +1 -1
  100. package/build/duotone-picker/utils.js +1 -0
  101. package/build/duotone-picker/utils.js.map +1 -1
  102. package/build/font-size-picker/font-size-picker-select.js +2 -0
  103. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  104. package/build/font-size-picker/font-size-picker-toggle-group.js +1 -0
  105. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  106. package/build/font-size-picker/index.js +2 -0
  107. package/build/font-size-picker/index.js.map +1 -1
  108. package/build/font-size-picker/index.native.js +1 -0
  109. package/build/font-size-picker/index.native.js.map +1 -1
  110. package/build/font-size-picker/utils.js +1 -0
  111. package/build/font-size-picker/utils.js.map +1 -1
  112. package/build/form-file-upload/index.js +11 -1
  113. package/build/form-file-upload/index.js.map +1 -1
  114. package/build/form-file-upload/types.js.map +1 -1
  115. package/build/form-token-field/index.js +6 -0
  116. package/build/form-token-field/index.js.map +1 -1
  117. package/build/form-token-field/suggestions-list.js +1 -0
  118. package/build/form-token-field/suggestions-list.js.map +1 -1
  119. package/build/gradient-picker/index.js +3 -0
  120. package/build/gradient-picker/index.js.map +1 -1
  121. package/build/gradient-picker/types.js.map +1 -1
  122. package/build/guide/index.js +1 -0
  123. package/build/guide/index.js.map +1 -1
  124. package/build/guide/page-control.js +1 -0
  125. package/build/guide/page-control.js.map +1 -1
  126. package/build/h-stack/hook.js +1 -0
  127. package/build/h-stack/hook.js.map +1 -1
  128. package/build/higher-order/navigate-regions/index.js +1 -0
  129. package/build/higher-order/navigate-regions/index.js.map +1 -1
  130. package/build/higher-order/with-fallback-styles/index.js +1 -0
  131. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  132. package/build/higher-order/with-filters/index.js +1 -0
  133. package/build/higher-order/with-filters/index.js.map +1 -1
  134. package/build/higher-order/with-notices/index.js +1 -0
  135. package/build/higher-order/with-notices/index.js.map +1 -1
  136. package/build/icon/index.js +9 -0
  137. package/build/icon/index.js.map +1 -1
  138. package/build/index.js +0 -6
  139. package/build/index.js.map +1 -1
  140. package/build/keyboard-shortcuts/index.js +1 -0
  141. package/build/keyboard-shortcuts/index.js.map +1 -1
  142. package/build/menu/checkbox-item.js +5 -9
  143. package/build/menu/checkbox-item.js.map +1 -1
  144. package/build/menu/group-label.js +4 -1
  145. package/build/menu/group-label.js.map +1 -1
  146. package/build/menu/group.js +4 -1
  147. package/build/menu/group.js.map +1 -1
  148. package/build/menu/item-help-text.js +5 -0
  149. package/build/menu/item-help-text.js.map +1 -1
  150. package/build/menu/item-label.js +5 -0
  151. package/build/menu/item-label.js.map +1 -1
  152. package/build/menu/item.js +4 -8
  153. package/build/menu/item.js.map +1 -1
  154. package/build/menu/radio-item.js +5 -9
  155. package/build/menu/radio-item.js.map +1 -1
  156. package/build/menu/separator.js +5 -2
  157. package/build/menu/separator.js.map +1 -1
  158. package/build/menu/styles.js +16 -16
  159. package/build/menu/styles.js.map +1 -1
  160. package/build/menu-items-choice/index.js +1 -0
  161. package/build/menu-items-choice/index.js.map +1 -1
  162. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -0
  163. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  164. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +1 -0
  165. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  166. package/build/mobile/bottom-sheet/picker-cell.native.js +1 -0
  167. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  168. package/build/mobile/bottom-sheet-select-control/index.native.js +1 -0
  169. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  170. package/build/mobile/color-settings/palette.screen.native.js +1 -0
  171. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  172. package/build/mobile/gradient/index.native.js +1 -0
  173. package/build/mobile/gradient/index.native.js.map +1 -1
  174. package/build/mobile/media-edit/index.native.js +1 -0
  175. package/build/mobile/media-edit/index.native.js.map +1 -1
  176. package/build/mobile/picker/index.android.js +1 -0
  177. package/build/mobile/picker/index.android.js.map +1 -1
  178. package/build/mobile/picker/index.ios.js +1 -0
  179. package/build/mobile/picker/index.ios.js.map +1 -1
  180. package/build/mobile/segmented-control/index.native.js +1 -0
  181. package/build/mobile/segmented-control/index.native.js.map +1 -1
  182. package/build/mobile/utils/get-px-from-css-unit.native.js +1 -0
  183. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  184. package/build/modal/aria-helper.js +0 -1
  185. package/build/modal/aria-helper.js.map +1 -1
  186. package/build/modal/index.js +0 -1
  187. package/build/modal/index.js.map +1 -1
  188. package/build/navigable-container/container.js +1 -0
  189. package/build/navigable-container/container.js.map +1 -1
  190. package/build/navigation/group/index.js +1 -0
  191. package/build/navigation/group/index.js.map +1 -1
  192. package/build/navigation/menu/menu-title-search.js +1 -0
  193. package/build/navigation/menu/menu-title-search.js.map +1 -1
  194. package/build/navigation/menu/search-no-results-found.js +1 -0
  195. package/build/navigation/menu/search-no-results-found.js.map +1 -1
  196. package/build/navigation/styles/navigation-styles.js +12 -12
  197. package/build/navigation/styles/navigation-styles.js.map +1 -1
  198. package/build/navigator/navigator/component.js +1 -0
  199. package/build/navigator/navigator/component.js.map +1 -1
  200. package/build/navigator/navigator-screen/component.js +1 -0
  201. package/build/navigator/navigator-screen/component.js.map +1 -1
  202. package/build/navigator/utils/router.js +1 -0
  203. package/build/navigator/utils/router.js.map +1 -1
  204. package/build/notice/index.js +1 -0
  205. package/build/notice/index.js.map +1 -1
  206. package/build/notice/list.js +1 -0
  207. package/build/notice/list.js.map +1 -1
  208. package/build/notice/list.native.js +1 -0
  209. package/build/notice/list.native.js.map +1 -1
  210. package/build/number-control/index.js +8 -0
  211. package/build/number-control/index.js.map +1 -1
  212. package/build/number-control/types.js.map +1 -1
  213. package/build/palette-edit/index.js +1 -0
  214. package/build/palette-edit/index.js.map +1 -1
  215. package/build/panel/actions.native.js +1 -0
  216. package/build/panel/actions.native.js.map +1 -1
  217. package/build/query-controls/index.js +1 -0
  218. package/build/query-controls/index.js.map +1 -1
  219. package/build/query-controls/terms.js +1 -0
  220. package/build/query-controls/terms.js.map +1 -1
  221. package/build/radio-control/index.js +1 -0
  222. package/build/radio-control/index.js.map +1 -1
  223. package/build/radio-control/index.native.js +1 -0
  224. package/build/radio-control/index.native.js.map +1 -1
  225. package/build/range-control/index.js +2 -1
  226. package/build/range-control/index.js.map +1 -1
  227. package/build/range-control/mark.js +0 -1
  228. package/build/range-control/mark.js.map +1 -1
  229. package/build/range-control/rail.js +1 -0
  230. package/build/range-control/rail.js.map +1 -1
  231. package/build/range-control/styles/range-control-styles.js +33 -45
  232. package/build/range-control/styles/range-control-styles.js.map +1 -1
  233. package/build/resizable-box/index.js +10 -1
  234. package/build/resizable-box/index.js.map +1 -1
  235. package/build/sandbox/index.js +1 -0
  236. package/build/sandbox/index.js.map +1 -1
  237. package/build/sandbox/index.native.js +1 -0
  238. package/build/sandbox/index.native.js.map +1 -1
  239. package/build/search-control/index.native.js +1 -0
  240. package/build/search-control/index.native.js.map +1 -1
  241. package/build/select-control/index.js +1 -0
  242. package/build/select-control/index.js.map +1 -1
  243. package/build/slot-fill/bubbles-virtually/fill.js +8 -12
  244. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  245. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -10
  246. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  247. package/build/slot-fill/bubbles-virtually/slot.js +4 -10
  248. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  249. package/build/slot-fill/provider.js +1 -0
  250. package/build/slot-fill/provider.js.map +1 -1
  251. package/build/slot-fill/slot.js +1 -0
  252. package/build/slot-fill/slot.js.map +1 -1
  253. package/build/slot-fill/types.js.map +1 -1
  254. package/build/snackbar/index.js +1 -0
  255. package/build/snackbar/index.js.map +1 -1
  256. package/build/snackbar/list.js +1 -0
  257. package/build/snackbar/list.js.map +1 -1
  258. package/build/style-provider/index.js +0 -1
  259. package/build/style-provider/index.js.map +1 -1
  260. package/build/tab-panel/index.js +1 -0
  261. package/build/tab-panel/index.js.map +1 -1
  262. package/build/tabs/index.js +1 -0
  263. package/build/tabs/index.js.map +1 -1
  264. package/build/tabs/tab.js +0 -17
  265. package/build/tabs/tab.js.map +1 -1
  266. package/build/text/utils.js +1 -0
  267. package/build/text/utils.js.map +1 -1
  268. package/build/theme/color-algorithms.js +1 -0
  269. package/build/theme/color-algorithms.js.map +1 -1
  270. package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
  271. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  272. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
  273. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  274. package/build/toolbar/toolbar-button/index.js +2 -0
  275. package/build/toolbar/toolbar-button/index.js.map +1 -1
  276. package/build/toolbar/toolbar-group/index.js +1 -0
  277. package/build/toolbar/toolbar-group/index.js.map +1 -1
  278. package/build/tools-panel/tools-panel/component.js +2 -0
  279. package/build/tools-panel/tools-panel/component.js.map +1 -1
  280. package/build/tools-panel/tools-panel/hook.js +1 -0
  281. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  282. package/build/tools-panel/tools-panel-header/component.js +1 -0
  283. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  284. package/build/tree-grid/cell.js +4 -1
  285. package/build/tree-grid/cell.js.map +1 -1
  286. package/build/tree-grid/index.js +1 -0
  287. package/build/tree-grid/index.js.map +1 -1
  288. package/build/tree-grid/types.js.map +1 -1
  289. package/build/tree-select/index.js +1 -0
  290. package/build/tree-select/index.js.map +1 -1
  291. package/build/unit-control/index.js +11 -1
  292. package/build/unit-control/index.js.map +1 -1
  293. package/build/unit-control/index.native.js +1 -0
  294. package/build/unit-control/index.native.js.map +1 -1
  295. package/build/unit-control/types.js.map +1 -1
  296. package/build/unit-control/unit-select-control.js +1 -0
  297. package/build/unit-control/unit-select-control.js.map +1 -1
  298. package/build/unit-control/utils.js +1 -0
  299. package/build/unit-control/utils.js.map +1 -1
  300. package/build/utils/colors-values.js +3 -0
  301. package/build/utils/colors-values.js.map +1 -1
  302. package/build/utils/config-values.js +0 -1
  303. package/build/utils/config-values.js.map +1 -1
  304. package/build/utils/get-valid-children.js +1 -0
  305. package/build/utils/get-valid-children.js.map +1 -1
  306. package/build/utils/hooks/use-animated-offset-rect.js +1 -0
  307. package/build/utils/hooks/use-animated-offset-rect.js.map +1 -1
  308. package/build/utils/hooks/use-cx.js +1 -0
  309. package/build/utils/hooks/use-cx.js.map +1 -1
  310. package/build/utils/math.js +1 -0
  311. package/build/utils/math.js.map +1 -1
  312. package/build/utils/rtl.js +1 -0
  313. package/build/utils/rtl.js.map +1 -1
  314. package/build/utils/values.js +1 -0
  315. package/build/utils/values.js.map +1 -1
  316. package/build/z-stack/component.js +1 -0
  317. package/build/z-stack/component.js.map +1 -1
  318. package/build-module/alignment-matrix-control/icon.js +1 -0
  319. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  320. package/build-module/alignment-matrix-control/index.js +1 -0
  321. package/build-module/alignment-matrix-control/index.js.map +1 -1
  322. package/build-module/angle-picker-control/index.js +1 -1
  323. package/build-module/angle-picker-control/index.js.map +1 -1
  324. package/build-module/animation/index.js +1 -1
  325. package/build-module/animation/index.js.map +1 -1
  326. package/build-module/autocomplete/autocompleter-ui.js +1 -0
  327. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  328. package/build-module/autocomplete/autocompleter-ui.native.js +1 -0
  329. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  330. package/build-module/autocomplete/get-default-use-items.js +1 -0
  331. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  332. package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -1
  333. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  334. package/build-module/border-box-control/utils.js +1 -0
  335. package/build-module/border-box-control/utils.js.map +1 -1
  336. package/build-module/border-control/border-control/component.js +2 -0
  337. package/build-module/border-control/border-control/component.js.map +1 -1
  338. package/build-module/border-control/border-control-dropdown/component.js +1 -0
  339. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  340. package/build-module/border-control/border-control-style-picker/component.js +1 -0
  341. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  342. package/build-module/box-control/index.js +37 -30
  343. package/build-module/box-control/index.js.map +1 -1
  344. package/build-module/box-control/input-control.js +153 -0
  345. package/build-module/box-control/input-control.js.map +1 -0
  346. package/build-module/box-control/types.js.map +1 -1
  347. package/build-module/box-control/utils.js +48 -46
  348. package/build-module/box-control/utils.js.map +1 -1
  349. package/build-module/button/index.native.js +1 -0
  350. package/build-module/button/index.native.js.map +1 -1
  351. package/build-module/button/types.js.map +1 -1
  352. package/build-module/circular-option-picker/circular-option-picker-actions.js +1 -0
  353. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  354. package/build-module/circular-option-picker/circular-option-picker-option.js +1 -0
  355. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  356. package/build-module/clipboard-button/index.js +5 -3
  357. package/build-module/clipboard-button/index.js.map +1 -1
  358. package/build-module/color-indicator/index.native.js +1 -0
  359. package/build-module/color-indicator/index.native.js.map +1 -1
  360. package/build-module/color-palette/index.js +1 -0
  361. package/build-module/color-palette/index.js.map +1 -1
  362. package/build-module/color-palette/utils.js +1 -0
  363. package/build-module/color-palette/utils.js.map +1 -1
  364. package/build-module/color-picker/input-with-slider.js +2 -2
  365. package/build-module/color-picker/input-with-slider.js.map +1 -1
  366. package/build-module/combobox-control/index.js +1 -0
  367. package/build-module/combobox-control/index.js.map +1 -1
  368. package/build-module/composite/item.js +0 -9
  369. package/build-module/composite/item.js.map +1 -1
  370. package/build-module/composite/legacy/index.js +1 -0
  371. package/build-module/composite/legacy/index.js.map +1 -1
  372. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +3 -0
  373. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  374. package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -0
  375. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  376. package/build-module/custom-gradient-picker/gradient-bar/utils.js +1 -0
  377. package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  378. package/build-module/custom-gradient-picker/index.js +3 -0
  379. package/build-module/custom-gradient-picker/index.js.map +1 -1
  380. package/build-module/custom-gradient-picker/serializer.js +1 -0
  381. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  382. package/build-module/custom-gradient-picker/types.js.map +1 -1
  383. package/build-module/custom-gradient-picker/utils.js +1 -0
  384. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  385. package/build-module/custom-select-control/index.js +11 -2
  386. package/build-module/custom-select-control/index.js.map +1 -1
  387. package/build-module/custom-select-control/types.js.map +1 -1
  388. package/build-module/dashicon/index.js +1 -0
  389. package/build-module/dashicon/index.js.map +1 -1
  390. package/build-module/date-time/date/index.js +1 -0
  391. package/build-module/date-time/date/index.js.map +1 -1
  392. package/build-module/date-time/date/use-lilius/index.js +1 -0
  393. package/build-module/date-time/date/use-lilius/index.js.map +1 -1
  394. package/build-module/date-time/time/index.js +1 -0
  395. package/build-module/date-time/time/index.js.map +1 -1
  396. package/build-module/dimension-control/index.js +1 -0
  397. package/build-module/dimension-control/index.js.map +1 -1
  398. package/build-module/dimension-control/sizes.js +1 -0
  399. package/build-module/dimension-control/sizes.js.map +1 -1
  400. package/build-module/draggable/index.js +1 -0
  401. package/build-module/draggable/index.js.map +1 -1
  402. package/build-module/draggable/index.native.js +1 -0
  403. package/build-module/draggable/index.native.js.map +1 -1
  404. package/build-module/drop-zone/index.js +19 -13
  405. package/build-module/drop-zone/index.js.map +1 -1
  406. package/build-module/drop-zone/types.js.map +1 -1
  407. package/build-module/dropdown-menu/index.js +2 -0
  408. package/build-module/dropdown-menu/index.js.map +1 -1
  409. package/build-module/dropdown-menu/index.native.js +1 -0
  410. package/build-module/dropdown-menu/index.native.js.map +1 -1
  411. package/build-module/duotone-picker/color-list-picker/index.js +11 -15
  412. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  413. package/build-module/duotone-picker/duotone-picker.js +1 -0
  414. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  415. package/build-module/duotone-picker/utils.js +1 -0
  416. package/build-module/duotone-picker/utils.js.map +1 -1
  417. package/build-module/font-size-picker/font-size-picker-select.js +2 -0
  418. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  419. package/build-module/font-size-picker/font-size-picker-toggle-group.js +1 -0
  420. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  421. package/build-module/font-size-picker/index.js +2 -0
  422. package/build-module/font-size-picker/index.js.map +1 -1
  423. package/build-module/font-size-picker/index.native.js +1 -0
  424. package/build-module/font-size-picker/index.native.js.map +1 -1
  425. package/build-module/font-size-picker/utils.js +1 -0
  426. package/build-module/font-size-picker/utils.js.map +1 -1
  427. package/build-module/form-file-upload/index.js +13 -2
  428. package/build-module/form-file-upload/index.js.map +1 -1
  429. package/build-module/form-file-upload/types.js.map +1 -1
  430. package/build-module/form-token-field/index.js +6 -0
  431. package/build-module/form-token-field/index.js.map +1 -1
  432. package/build-module/form-token-field/suggestions-list.js +1 -0
  433. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  434. package/build-module/gradient-picker/index.js +3 -0
  435. package/build-module/gradient-picker/index.js.map +1 -1
  436. package/build-module/gradient-picker/types.js.map +1 -1
  437. package/build-module/guide/index.js +1 -0
  438. package/build-module/guide/index.js.map +1 -1
  439. package/build-module/guide/page-control.js +1 -0
  440. package/build-module/guide/page-control.js.map +1 -1
  441. package/build-module/h-stack/hook.js +1 -0
  442. package/build-module/h-stack/hook.js.map +1 -1
  443. package/build-module/higher-order/navigate-regions/index.js +1 -0
  444. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  445. package/build-module/higher-order/with-fallback-styles/index.js +1 -0
  446. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  447. package/build-module/higher-order/with-filters/index.js +1 -0
  448. package/build-module/higher-order/with-filters/index.js.map +1 -1
  449. package/build-module/higher-order/with-notices/index.js +1 -0
  450. package/build-module/higher-order/with-notices/index.js.map +1 -1
  451. package/build-module/icon/index.js +9 -0
  452. package/build-module/icon/index.js.map +1 -1
  453. package/build-module/index.js +1 -1
  454. package/build-module/index.js.map +1 -1
  455. package/build-module/keyboard-shortcuts/index.js +1 -0
  456. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  457. package/build-module/menu/checkbox-item.js +5 -9
  458. package/build-module/menu/checkbox-item.js.map +1 -1
  459. package/build-module/menu/group-label.js +4 -1
  460. package/build-module/menu/group-label.js.map +1 -1
  461. package/build-module/menu/group.js +4 -1
  462. package/build-module/menu/group.js.map +1 -1
  463. package/build-module/menu/item-help-text.js +6 -1
  464. package/build-module/menu/item-help-text.js.map +1 -1
  465. package/build-module/menu/item-label.js +6 -1
  466. package/build-module/menu/item-label.js.map +1 -1
  467. package/build-module/menu/item.js +4 -8
  468. package/build-module/menu/item.js.map +1 -1
  469. package/build-module/menu/radio-item.js +5 -9
  470. package/build-module/menu/radio-item.js.map +1 -1
  471. package/build-module/menu/separator.js +5 -2
  472. package/build-module/menu/separator.js.map +1 -1
  473. package/build-module/menu/styles.js +16 -16
  474. package/build-module/menu/styles.js.map +1 -1
  475. package/build-module/menu-items-choice/index.js +1 -0
  476. package/build-module/menu-items-choice/index.js.map +1 -1
  477. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -0
  478. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  479. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +1 -0
  480. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  481. package/build-module/mobile/bottom-sheet/picker-cell.native.js +1 -0
  482. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  483. package/build-module/mobile/bottom-sheet-select-control/index.native.js +1 -0
  484. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  485. package/build-module/mobile/color-settings/palette.screen.native.js +1 -0
  486. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  487. package/build-module/mobile/gradient/index.native.js +1 -0
  488. package/build-module/mobile/gradient/index.native.js.map +1 -1
  489. package/build-module/mobile/media-edit/index.native.js +1 -0
  490. package/build-module/mobile/media-edit/index.native.js.map +1 -1
  491. package/build-module/mobile/picker/index.android.js +1 -0
  492. package/build-module/mobile/picker/index.android.js.map +1 -1
  493. package/build-module/mobile/picker/index.ios.js +1 -0
  494. package/build-module/mobile/picker/index.ios.js.map +1 -1
  495. package/build-module/mobile/segmented-control/index.native.js +1 -0
  496. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  497. package/build-module/mobile/utils/get-px-from-css-unit.native.js +1 -0
  498. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  499. package/build-module/modal/aria-helper.js +0 -1
  500. package/build-module/modal/aria-helper.js.map +1 -1
  501. package/build-module/modal/index.js +0 -1
  502. package/build-module/modal/index.js.map +1 -1
  503. package/build-module/navigable-container/container.js +1 -0
  504. package/build-module/navigable-container/container.js.map +1 -1
  505. package/build-module/navigation/group/index.js +1 -0
  506. package/build-module/navigation/group/index.js.map +1 -1
  507. package/build-module/navigation/menu/menu-title-search.js +1 -0
  508. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  509. package/build-module/navigation/menu/search-no-results-found.js +1 -0
  510. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  511. package/build-module/navigation/styles/navigation-styles.js +12 -12
  512. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  513. package/build-module/navigator/navigator/component.js +1 -0
  514. package/build-module/navigator/navigator/component.js.map +1 -1
  515. package/build-module/navigator/navigator-screen/component.js +1 -0
  516. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  517. package/build-module/navigator/utils/router.js +1 -0
  518. package/build-module/navigator/utils/router.js.map +1 -1
  519. package/build-module/notice/index.js +1 -0
  520. package/build-module/notice/index.js.map +1 -1
  521. package/build-module/notice/list.js +1 -0
  522. package/build-module/notice/list.js.map +1 -1
  523. package/build-module/notice/list.native.js +1 -0
  524. package/build-module/notice/list.native.js.map +1 -1
  525. package/build-module/number-control/index.js +8 -0
  526. package/build-module/number-control/index.js.map +1 -1
  527. package/build-module/number-control/types.js.map +1 -1
  528. package/build-module/palette-edit/index.js +1 -0
  529. package/build-module/palette-edit/index.js.map +1 -1
  530. package/build-module/panel/actions.native.js +1 -0
  531. package/build-module/panel/actions.native.js.map +1 -1
  532. package/build-module/query-controls/index.js +1 -0
  533. package/build-module/query-controls/index.js.map +1 -1
  534. package/build-module/query-controls/terms.js +1 -0
  535. package/build-module/query-controls/terms.js.map +1 -1
  536. package/build-module/radio-control/index.js +1 -0
  537. package/build-module/radio-control/index.js.map +1 -1
  538. package/build-module/radio-control/index.native.js +1 -0
  539. package/build-module/radio-control/index.native.js.map +1 -1
  540. package/build-module/range-control/index.js +2 -1
  541. package/build-module/range-control/index.js.map +1 -1
  542. package/build-module/range-control/mark.js +0 -1
  543. package/build-module/range-control/mark.js.map +1 -1
  544. package/build-module/range-control/rail.js +1 -0
  545. package/build-module/range-control/rail.js.map +1 -1
  546. package/build-module/range-control/styles/range-control-styles.js +33 -45
  547. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  548. package/build-module/resizable-box/index.js +10 -1
  549. package/build-module/resizable-box/index.js.map +1 -1
  550. package/build-module/sandbox/index.js +1 -0
  551. package/build-module/sandbox/index.js.map +1 -1
  552. package/build-module/sandbox/index.native.js +1 -0
  553. package/build-module/sandbox/index.native.js.map +1 -1
  554. package/build-module/search-control/index.native.js +1 -0
  555. package/build-module/search-control/index.native.js.map +1 -1
  556. package/build-module/select-control/index.js +1 -0
  557. package/build-module/select-control/index.js.map +1 -1
  558. package/build-module/slot-fill/bubbles-virtually/fill.js +9 -13
  559. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  560. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -10
  561. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  562. package/build-module/slot-fill/bubbles-virtually/slot.js +4 -10
  563. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  564. package/build-module/slot-fill/provider.js +1 -0
  565. package/build-module/slot-fill/provider.js.map +1 -1
  566. package/build-module/slot-fill/slot.js +1 -0
  567. package/build-module/slot-fill/slot.js.map +1 -1
  568. package/build-module/slot-fill/types.js.map +1 -1
  569. package/build-module/snackbar/index.js +1 -0
  570. package/build-module/snackbar/index.js.map +1 -1
  571. package/build-module/snackbar/list.js +1 -0
  572. package/build-module/snackbar/list.js.map +1 -1
  573. package/build-module/style-provider/index.js +0 -1
  574. package/build-module/style-provider/index.js.map +1 -1
  575. package/build-module/tab-panel/index.js +1 -0
  576. package/build-module/tab-panel/index.js.map +1 -1
  577. package/build-module/tabs/index.js +1 -0
  578. package/build-module/tabs/index.js.map +1 -1
  579. package/build-module/tabs/tab.js +0 -15
  580. package/build-module/tabs/tab.js.map +1 -1
  581. package/build-module/text/utils.js +1 -0
  582. package/build-module/text/utils.js.map +1 -1
  583. package/build-module/theme/color-algorithms.js +1 -0
  584. package/build-module/theme/color-algorithms.js.map +1 -1
  585. package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
  586. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  587. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
  588. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  589. package/build-module/toolbar/toolbar-button/index.js +2 -0
  590. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  591. package/build-module/toolbar/toolbar-group/index.js +1 -0
  592. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  593. package/build-module/tools-panel/tools-panel/component.js +2 -0
  594. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  595. package/build-module/tools-panel/tools-panel/hook.js +1 -0
  596. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  597. package/build-module/tools-panel/tools-panel-header/component.js +1 -0
  598. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  599. package/build-module/tree-grid/cell.js +4 -1
  600. package/build-module/tree-grid/cell.js.map +1 -1
  601. package/build-module/tree-grid/index.js +1 -0
  602. package/build-module/tree-grid/index.js.map +1 -1
  603. package/build-module/tree-grid/types.js.map +1 -1
  604. package/build-module/tree-select/index.js +1 -0
  605. package/build-module/tree-select/index.js.map +1 -1
  606. package/build-module/unit-control/index.js +11 -1
  607. package/build-module/unit-control/index.js.map +1 -1
  608. package/build-module/unit-control/index.native.js +1 -0
  609. package/build-module/unit-control/index.native.js.map +1 -1
  610. package/build-module/unit-control/types.js.map +1 -1
  611. package/build-module/unit-control/unit-select-control.js +1 -0
  612. package/build-module/unit-control/unit-select-control.js.map +1 -1
  613. package/build-module/unit-control/utils.js +1 -0
  614. package/build-module/unit-control/utils.js.map +1 -1
  615. package/build-module/utils/colors-values.js +3 -0
  616. package/build-module/utils/colors-values.js.map +1 -1
  617. package/build-module/utils/config-values.js +0 -1
  618. package/build-module/utils/config-values.js.map +1 -1
  619. package/build-module/utils/get-valid-children.js +1 -0
  620. package/build-module/utils/get-valid-children.js.map +1 -1
  621. package/build-module/utils/hooks/use-animated-offset-rect.js +1 -0
  622. package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -1
  623. package/build-module/utils/hooks/use-cx.js +1 -0
  624. package/build-module/utils/hooks/use-cx.js.map +1 -1
  625. package/build-module/utils/math.js +1 -0
  626. package/build-module/utils/math.js.map +1 -1
  627. package/build-module/utils/rtl.js +1 -0
  628. package/build-module/utils/rtl.js.map +1 -1
  629. package/build-module/utils/values.js +1 -0
  630. package/build-module/utils/values.js.map +1 -1
  631. package/build-module/z-stack/component.js +1 -0
  632. package/build-module/z-stack/component.js.map +1 -1
  633. package/build-style/style-rtl.css +15 -11
  634. package/build-style/style.css +15 -11
  635. package/build-types/alignment-matrix-control/styles.d.ts.map +1 -1
  636. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  637. package/build-types/animation/index.d.ts +1 -1
  638. package/build-types/animation/index.d.ts.map +1 -1
  639. package/build-types/base-control/hooks.d.ts +4 -4
  640. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  641. package/build-types/border-box-control/border-box-control/hook.d.ts +83 -83
  642. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +93 -93
  643. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +83 -83
  644. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +83 -83
  645. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  646. package/build-types/border-control/border-control/hook.d.ts +83 -83
  647. package/build-types/border-control/border-control-dropdown/hook.d.ts +83 -83
  648. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  649. package/build-types/box-control/index.d.ts +14 -13
  650. package/build-types/box-control/index.d.ts.map +1 -1
  651. package/build-types/box-control/input-control.d.ts +3 -0
  652. package/build-types/box-control/input-control.d.ts.map +1 -0
  653. package/build-types/box-control/stories/index.story.d.ts +852 -816
  654. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  655. package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
  656. package/build-types/box-control/styles/box-control-styles.d.ts +3 -2
  657. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  658. package/build-types/box-control/types.d.ts +25 -3
  659. package/build-types/box-control/types.d.ts.map +1 -1
  660. package/build-types/box-control/utils.d.ts +23 -15
  661. package/build-types/box-control/utils.d.ts.map +1 -1
  662. package/build-types/button/stories/index.story.d.ts +18 -0
  663. package/build-types/button/stories/index.story.d.ts.map +1 -1
  664. package/build-types/button/types.d.ts +6 -4
  665. package/build-types/button/types.d.ts.map +1 -1
  666. package/build-types/card/card/hook.d.ts +83 -83
  667. package/build-types/card/card-body/hook.d.ts +83 -83
  668. package/build-types/card/card-divider/hook.d.ts +84 -84
  669. package/build-types/card/card-footer/hook.d.ts +83 -83
  670. package/build-types/card/card-header/hook.d.ts +83 -83
  671. package/build-types/card/card-media/hook.d.ts +83 -83
  672. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  673. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  674. package/build-types/clipboard-button/index.d.ts.map +1 -1
  675. package/build-types/color-picker/styles.d.ts +3 -2
  676. package/build-types/color-picker/styles.d.ts.map +1 -1
  677. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  678. package/build-types/composite/index.d.ts.map +1 -1
  679. package/build-types/composite/item.d.ts.map +1 -1
  680. package/build-types/context/constants.d.ts.map +1 -1
  681. package/build-types/context/get-styled-class-name-from-key.d.ts +1 -9
  682. package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
  683. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  684. package/build-types/custom-gradient-picker/index.d.ts +1 -1
  685. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  686. package/build-types/custom-gradient-picker/types.d.ts +6 -0
  687. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  688. package/build-types/custom-select-control/index.d.ts.map +1 -1
  689. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  690. package/build-types/custom-select-control/types.d.ts +7 -0
  691. package/build-types/custom-select-control/types.d.ts.map +1 -1
  692. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  693. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  694. package/build-types/date-time/date/styles.d.ts.map +1 -1
  695. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  696. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  697. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  698. package/build-types/date-time/time/styles.d.ts +8 -4
  699. package/build-types/date-time/time/styles.d.ts.map +1 -1
  700. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  701. package/build-types/drop-zone/index.d.ts +1 -1
  702. package/build-types/drop-zone/index.d.ts.map +1 -1
  703. package/build-types/drop-zone/types.d.ts +5 -0
  704. package/build-types/drop-zone/types.d.ts.map +1 -1
  705. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  706. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  707. package/build-types/elevation/hook.d.ts +83 -83
  708. package/build-types/flex/flex/hook.d.ts +83 -83
  709. package/build-types/flex/flex-block/hook.d.ts +83 -83
  710. package/build-types/flex/flex-item/hook.d.ts +83 -83
  711. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  712. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -1
  713. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  714. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  715. package/build-types/font-size-picker/index.d.ts.map +1 -1
  716. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  717. package/build-types/form-file-upload/index.d.ts +2 -1
  718. package/build-types/form-file-upload/index.d.ts.map +1 -1
  719. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  720. package/build-types/form-file-upload/types.d.ts +10 -8
  721. package/build-types/form-file-upload/types.d.ts.map +1 -1
  722. package/build-types/form-token-field/index.d.ts.map +1 -1
  723. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  724. package/build-types/gradient-picker/index.d.ts +1 -1
  725. package/build-types/gradient-picker/index.d.ts.map +1 -1
  726. package/build-types/gradient-picker/types.d.ts +6 -0
  727. package/build-types/gradient-picker/types.d.ts.map +1 -1
  728. package/build-types/grid/hook.d.ts +83 -83
  729. package/build-types/h-stack/hook.d.ts +83 -83
  730. package/build-types/heading/hook.d.ts +82 -82
  731. package/build-types/higher-order/with-fallback-styles/index.d.ts +2 -2
  732. package/build-types/higher-order/with-filters/index.d.ts +4 -4
  733. package/build-types/icon/index.d.ts +23 -7
  734. package/build-types/icon/index.d.ts.map +1 -1
  735. package/build-types/icon/stories/index.story.d.ts +7 -1
  736. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  737. package/build-types/index.d.ts +1 -1
  738. package/build-types/index.d.ts.map +1 -1
  739. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  740. package/build-types/item-group/item/hook.d.ts +83 -83
  741. package/build-types/item-group/item-group/hook.d.ts +83 -83
  742. package/build-types/lock-unlock.d.ts +2 -2
  743. package/build-types/menu/checkbox-item.d.ts.map +1 -1
  744. package/build-types/menu/group-label.d.ts.map +1 -1
  745. package/build-types/menu/group.d.ts.map +1 -1
  746. package/build-types/menu/index.d.ts.map +1 -1
  747. package/build-types/menu/item-help-text.d.ts.map +1 -1
  748. package/build-types/menu/item-label.d.ts.map +1 -1
  749. package/build-types/menu/item.d.ts.map +1 -1
  750. package/build-types/menu/radio-item.d.ts.map +1 -1
  751. package/build-types/menu/separator.d.ts.map +1 -1
  752. package/build-types/menu/styles.d.ts.map +1 -1
  753. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  754. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  755. package/build-types/navigator/navigator-back-button/hook.d.ts +92 -92
  756. package/build-types/navigator/navigator-button/hook.d.ts +92 -92
  757. package/build-types/number-control/index.d.ts +2 -1
  758. package/build-types/number-control/index.d.ts.map +1 -1
  759. package/build-types/number-control/stories/index.story.d.ts +2 -1
  760. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  761. package/build-types/number-control/types.d.ts +7 -0
  762. package/build-types/number-control/types.d.ts.map +1 -1
  763. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  764. package/build-types/progress-bar/styles.d.ts.map +1 -1
  765. package/build-types/range-control/index.d.ts +1 -1
  766. package/build-types/range-control/index.d.ts.map +1 -1
  767. package/build-types/range-control/mark.d.ts.map +1 -1
  768. package/build-types/range-control/styles/range-control-styles.d.ts +4 -3
  769. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  770. package/build-types/resizable-box/index.d.ts.map +1 -1
  771. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  772. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  773. package/build-types/scrollable/hook.d.ts +83 -83
  774. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  775. package/build-types/select-control/index.d.ts.map +1 -1
  776. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  777. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  778. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  779. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  780. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  781. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
  782. package/build-types/slot-fill/types.d.ts +4 -3
  783. package/build-types/slot-fill/types.d.ts.map +1 -1
  784. package/build-types/spacer/hook.d.ts +83 -83
  785. package/build-types/spinner/styles.d.ts.map +1 -1
  786. package/build-types/surface/hook.d.ts +83 -83
  787. package/build-types/tabs/tab.d.ts +3 -0
  788. package/build-types/tabs/tab.d.ts.map +1 -1
  789. package/build-types/text/hook.d.ts +83 -83
  790. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  791. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  792. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  793. package/build-types/tools-panel/tools-panel/component.d.ts +2 -0
  794. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  795. package/build-types/tools-panel/tools-panel/hook.d.ts +83 -83
  796. package/build-types/tools-panel/tools-panel-header/hook.d.ts +83 -83
  797. package/build-types/tools-panel/tools-panel-item/hook.d.ts +83 -83
  798. package/build-types/tree-grid/cell.d.ts.map +1 -1
  799. package/build-types/tree-grid/types.d.ts +1 -1
  800. package/build-types/tree-grid/types.d.ts.map +1 -1
  801. package/build-types/truncate/hook.d.ts +83 -83
  802. package/build-types/unit-control/index.d.ts +3 -2
  803. package/build-types/unit-control/index.d.ts.map +1 -1
  804. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  805. package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -1
  806. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  807. package/build-types/unit-control/types.d.ts +7 -0
  808. package/build-types/unit-control/types.d.ts.map +1 -1
  809. package/build-types/utils/colors-values.d.ts +3 -0
  810. package/build-types/utils/colors-values.d.ts.map +1 -1
  811. package/build-types/utils/config-values.d.ts +0 -1
  812. package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
  813. package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
  814. package/build-types/utils/rtl.d.ts +1 -1
  815. package/build-types/utils/rtl.d.ts.map +1 -1
  816. package/build-types/v-stack/hook.d.ts +83 -83
  817. package/build-types/z-stack/styles.d.ts.map +1 -1
  818. package/package.json +20 -20
  819. package/src/alignment-matrix-control/stories/index.story.tsx +2 -2
  820. package/src/angle-picker-control/index.tsx +1 -1
  821. package/src/angle-picker-control/stories/index.story.tsx +2 -2
  822. package/src/animation/index.tsx +0 -1
  823. package/src/base-control/stories/index.story.tsx +1 -1
  824. package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -1
  825. package/src/border-box-control/stories/index.story.tsx +1 -1
  826. package/src/border-control/border-control/component.tsx +2 -0
  827. package/src/border-control/stories/index.story.tsx +1 -1
  828. package/src/box-control/README.md +80 -60
  829. package/src/box-control/docs-manifest.json +5 -0
  830. package/src/box-control/index.tsx +47 -29
  831. package/src/box-control/input-control.tsx +197 -0
  832. package/src/box-control/stories/index.story.tsx +2 -1
  833. package/src/box-control/test/index.tsx +33 -26
  834. package/src/box-control/types.ts +80 -55
  835. package/src/box-control/utils.ts +62 -60
  836. package/src/button/README.md +108 -219
  837. package/src/button/docs-manifest.json +5 -0
  838. package/src/button/stories/best-practices.mdx +31 -0
  839. package/src/button/stories/index.story.tsx +18 -0
  840. package/src/button/types.ts +6 -4
  841. package/src/button-group/stories/index.story.tsx +1 -1
  842. package/src/card/stories/index.story.tsx +2 -2
  843. package/src/checkbox-control/stories/index.story.tsx +1 -1
  844. package/src/circular-option-picker/circular-option-picker-actions.tsx +1 -0
  845. package/src/circular-option-picker/circular-option-picker-option.tsx +1 -0
  846. package/src/circular-option-picker/stories/index.story.tsx +2 -2
  847. package/src/circular-option-picker/style.scss +2 -2
  848. package/src/clipboard-button/index.tsx +5 -3
  849. package/src/color-palette/stories/index.story.tsx +3 -3
  850. package/src/color-picker/input-with-slider.tsx +1 -1
  851. package/src/color-picker/stories/index.story.tsx +2 -2
  852. package/src/combobox-control/stories/index.story.tsx +1 -1
  853. package/src/composite/item.tsx +1 -19
  854. package/src/composite/stories/index.story.tsx +3 -3
  855. package/src/confirm-dialog/stories/index.story.tsx +1 -1
  856. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +2 -0
  857. package/src/custom-gradient-picker/index.tsx +2 -0
  858. package/src/custom-gradient-picker/style.scss +1 -1
  859. package/src/custom-gradient-picker/types.ts +6 -0
  860. package/src/custom-select-control/README.md +2 -0
  861. package/src/custom-select-control/index.tsx +11 -2
  862. package/src/custom-select-control/stories/index.story.tsx +3 -2
  863. package/src/custom-select-control/test/index.tsx +13 -9
  864. package/src/custom-select-control/types.ts +7 -0
  865. package/src/custom-select-control-v2/stories/index.story.tsx +2 -2
  866. package/src/date-time/stories/date-time.story.tsx +4 -1
  867. package/src/date-time/stories/date.story.tsx +4 -1
  868. package/src/date-time/stories/time.story.tsx +4 -1
  869. package/src/dimension-control/stories/index.story.tsx +1 -1
  870. package/src/disabled/stories/index.story.tsx +3 -3
  871. package/src/divider/stories/index.story.tsx +1 -1
  872. package/src/draggable/stories/index.story.tsx +2 -2
  873. package/src/drop-zone/index.tsx +21 -24
  874. package/src/drop-zone/types.ts +5 -0
  875. package/src/dropdown/stories/index.story.tsx +7 -7
  876. package/src/dropdown-menu/index.tsx +4 -1
  877. package/src/dropdown-menu/stories/index.story.tsx +3 -3
  878. package/src/dropdown-menu/style.scss +1 -1
  879. package/src/duotone-picker/color-list-picker/index.tsx +8 -8
  880. package/src/duotone-picker/color-list-picker/style.scss +0 -6
  881. package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
  882. package/src/flex/stories/index.story.tsx +1 -1
  883. package/src/font-size-picker/font-size-picker-select.tsx +1 -0
  884. package/src/font-size-picker/index.tsx +1 -0
  885. package/src/font-size-picker/stories/index.story.tsx +1 -1
  886. package/src/form-file-upload/README.md +58 -48
  887. package/src/form-file-upload/docs-manifest.json +5 -0
  888. package/src/form-file-upload/index.tsx +12 -1
  889. package/src/form-file-upload/stories/index.story.tsx +4 -3
  890. package/src/form-file-upload/test/index.tsx +5 -1
  891. package/src/form-file-upload/types.ts +10 -8
  892. package/src/form-token-field/README.md +1 -0
  893. package/src/form-token-field/index.tsx +7 -0
  894. package/src/form-token-field/stories/index.story.tsx +4 -2
  895. package/src/form-token-field/test/index.tsx +5 -1
  896. package/src/gradient-picker/README.md +8 -0
  897. package/src/gradient-picker/index.tsx +2 -0
  898. package/src/gradient-picker/stories/index.story.tsx +1 -1
  899. package/src/gradient-picker/types.ts +6 -0
  900. package/src/grid/stories/index.story.tsx +1 -1
  901. package/src/h-stack/stories/index.story.tsx +2 -2
  902. package/src/icon/README.md +22 -65
  903. package/src/icon/docs-manifest.json +5 -0
  904. package/src/icon/index.tsx +28 -13
  905. package/src/icon/stories/index.story.tsx +50 -8
  906. package/src/index.ts +1 -5
  907. package/src/input-control/stories/index.story.tsx +4 -4
  908. package/src/item-group/stories/index.story.tsx +2 -2
  909. package/src/menu/checkbox-item.tsx +9 -7
  910. package/src/menu/group-label.tsx +8 -1
  911. package/src/menu/group.tsx +8 -1
  912. package/src/menu/item-help-text.tsx +10 -1
  913. package/src/menu/item-label.tsx +10 -1
  914. package/src/menu/item.tsx +8 -6
  915. package/src/menu/radio-item.tsx +9 -7
  916. package/src/menu/separator.tsx +9 -2
  917. package/src/menu/stories/index.story.tsx +2 -2
  918. package/src/menu/styles.ts +1 -1
  919. package/src/menu-group/stories/index.story.tsx +1 -1
  920. package/src/menu-item/stories/index.story.tsx +1 -1
  921. package/src/menu-items-choice/stories/index.story.tsx +1 -1
  922. package/src/menu-items-choice/style.scss +1 -0
  923. package/src/modal/stories/index.story.tsx +2 -2
  924. package/src/modal/test/index.tsx +2 -1
  925. package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
  926. package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
  927. package/src/navigation/stories/index.story.tsx +4 -4
  928. package/src/navigation/styles/navigation-styles.tsx +3 -2
  929. package/src/navigator/stories/index.story.tsx +3 -3
  930. package/src/number-control/README.md +2 -1
  931. package/src/number-control/index.tsx +9 -0
  932. package/src/number-control/stories/index.story.tsx +2 -1
  933. package/src/number-control/test/index.tsx +5 -1
  934. package/src/number-control/types.ts +7 -0
  935. package/src/panel/stories/index.story.tsx +1 -1
  936. package/src/placeholder/stories/index.story.tsx +3 -3
  937. package/src/popover/stories/index.story.tsx +11 -9
  938. package/src/query-controls/stories/index.story.tsx +6 -6
  939. package/src/radio-control/stories/index.story.tsx +1 -1
  940. package/src/radio-group/stories/index.story.tsx +3 -3
  941. package/src/range-control/index.tsx +1 -0
  942. package/src/range-control/mark.tsx +0 -1
  943. package/src/range-control/stories/index.story.tsx +7 -7
  944. package/src/range-control/styles/range-control-styles.ts +18 -19
  945. package/src/resizable-box/index.tsx +10 -0
  946. package/src/resizable-box/stories/index.story.tsx +1 -1
  947. package/src/resizable-box/style.scss +8 -0
  948. package/src/responsive-wrapper/stories/index.story.tsx +1 -1
  949. package/src/sandbox/stories/index.story.tsx +1 -1
  950. package/src/scrollable/stories/index.story.tsx +2 -1
  951. package/src/search-control/stories/index.story.tsx +1 -1
  952. package/src/select-control/stories/index.story.tsx +1 -1
  953. package/src/slot-fill/bubbles-virtually/fill.tsx +7 -11
  954. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +2 -13
  955. package/src/slot-fill/bubbles-virtually/slot.tsx +4 -7
  956. package/src/slot-fill/stories/index.story.tsx +2 -2
  957. package/src/slot-fill/types.ts +4 -3
  958. package/src/snackbar/stories/index.story.tsx +4 -4
  959. package/src/snackbar/stories/list.story.tsx +2 -2
  960. package/src/surface/stories/index.story.tsx +1 -1
  961. package/src/tabs/tab.tsx +0 -18
  962. package/src/tabs/test/index.tsx +1492 -947
  963. package/src/text-control/stories/index.story.tsx +1 -1
  964. package/src/textarea-control/stories/index.story.tsx +1 -1
  965. package/src/theme/stories/index.story.tsx +1 -1
  966. package/src/toggle-control/stories/index.story.tsx +1 -1
  967. package/src/toggle-group-control/stories/index.story.tsx +1 -1
  968. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +22 -22
  969. package/src/toggle-group-control/toggle-group-control/styles.ts +1 -1
  970. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +6 -6
  971. package/src/toolbar/stories/index.story.tsx +1 -1
  972. package/src/toolbar/toolbar-button/index.tsx +2 -0
  973. package/src/tools-panel/stories/index.story.tsx +15 -3
  974. package/src/tools-panel/test/index.tsx +0 -17
  975. package/src/tools-panel/tools-panel/README.md +4 -0
  976. package/src/tools-panel/tools-panel/component.tsx +2 -0
  977. package/src/tooltip/stories/index.story.tsx +1 -1
  978. package/src/tree-grid/cell.tsx +5 -1
  979. package/src/tree-grid/stories/index.story.tsx +1 -1
  980. package/src/tree-grid/types.ts +1 -1
  981. package/src/tree-select/stories/index.story.tsx +1 -1
  982. package/src/unit-control/README.md +3 -3
  983. package/src/unit-control/index.tsx +11 -1
  984. package/src/unit-control/stories/index.story.tsx +5 -4
  985. package/src/unit-control/test/index.tsx +5 -1
  986. package/src/unit-control/types.ts +7 -0
  987. package/src/utils/colors-values.js +3 -0
  988. package/src/utils/config-values.js +0 -1
  989. package/src/view/stories/index.story.tsx +1 -1
  990. package/src/visually-hidden/stories/index.story.tsx +1 -1
  991. package/src/z-stack/stories/index.story.tsx +1 -1
  992. package/tsconfig.tsbuildinfo +1 -1
  993. package/build/box-control/all-input-control.js +0 -90
  994. package/build/box-control/all-input-control.js.map +0 -1
  995. package/build/box-control/axial-input-controls.js +0 -124
  996. package/build/box-control/axial-input-controls.js.map +0 -1
  997. package/build/box-control/input-controls.js +0 -132
  998. package/build/box-control/input-controls.js.map +0 -1
  999. package/build/menu/use-temporary-focus-visible-fix.js +0 -27
  1000. package/build/menu/use-temporary-focus-visible-fix.js.map +0 -1
  1001. package/build-module/box-control/all-input-control.js +0 -83
  1002. package/build-module/box-control/all-input-control.js.map +0 -1
  1003. package/build-module/box-control/axial-input-controls.js +0 -115
  1004. package/build-module/box-control/axial-input-controls.js.map +0 -1
  1005. package/build-module/box-control/input-controls.js +0 -123
  1006. package/build-module/box-control/input-controls.js.map +0 -1
  1007. package/build-module/menu/use-temporary-focus-visible-fix.js +0 -20
  1008. package/build-module/menu/use-temporary-focus-visible-fix.js.map +0 -1
  1009. package/build-types/box-control/all-input-control.d.ts +0 -3
  1010. package/build-types/box-control/all-input-control.d.ts.map +0 -1
  1011. package/build-types/box-control/axial-input-controls.d.ts +0 -3
  1012. package/build-types/box-control/axial-input-controls.d.ts.map +0 -1
  1013. package/build-types/box-control/input-controls.d.ts +0 -3
  1014. package/build-types/box-control/input-controls.d.ts.map +0 -1
  1015. package/build-types/menu/use-temporary-focus-visible-fix.d.ts +0 -8
  1016. package/build-types/menu/use-temporary-focus-visible-fix.d.ts.map +0 -1
  1017. package/src/box-control/all-input-control.tsx +0 -109
  1018. package/src/box-control/axial-input-controls.tsx +0 -164
  1019. package/src/box-control/input-controls.tsx +0 -166
  1020. package/src/menu/use-temporary-focus-visible-fix.ts +0 -22
package/CHANGELOG.md CHANGED
@@ -2,7 +2,54 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 28.13.0-next.0 (2024-11-26)
5
+ ## 29.0.0 (2024-12-11)
6
+
7
+ ### Breaking Changes
8
+
9
+ - Removed the unused `__unstableMotionContext` export ([#67623](https://github.com/WordPress/gutenberg/pull/67623)).
10
+
11
+ ### Enhancements
12
+
13
+ - `GradientPicker`: Add `enableAlpha` prop ([#66974](https://github.com/WordPress/gutenberg/pull/66974))
14
+ - `CustomGradientPicker`: Add `enableAlpha` prop ([#66974](https://github.com/WordPress/gutenberg/pull/66974))
15
+ - `Menu`: Replace hardcoded white color with theme-ready variable ([#67649](https://github.com/WordPress/gutenberg/pull/67649)).
16
+ - `Navigation` (deprecated): Replace hardcoded white color with theme-ready variable ([#67649](https://github.com/WordPress/gutenberg/pull/67649)).
17
+ - `ToggleGroupControl`: Replace hardcoded white color with theme-ready variable ([#67649](https://github.com/WordPress/gutenberg/pull/67649)).
18
+ - `RangeControl`: Update the design of the range control marks ([#67611](https://github.com/WordPress/gutenberg/pull/67611))
19
+ - `BorderBoxControl`: Reduce gap value when unlinked ([#67049](https://github.com/WordPress/gutenberg/pull/67049)).
20
+ - `DropdownMenu`: Increase option height to 40px ([#67435](https://github.com/WordPress/gutenberg/pull/67435)).
21
+ - `MenuItem`: Increase height to 40px ([#67435](https://github.com/WordPress/gutenberg/pull/67435)).
22
+ - `MenuItemsChoice`: Increase option height to 40px ([#67435](https://github.com/WordPress/gutenberg/pull/67435)).
23
+ - `Navigation`: Fix active item hover color ([#67732](https://github.com/WordPress/gutenberg/pull/67732)).
24
+
25
+ ### Deprecations
26
+
27
+ - `BoxControl`: Passive deprecate `onMouseOver`/`onMouseOut`. Pass to the `inputProps` prop instead ([#67332](https://github.com/WordPress/gutenberg/pull/67332)).
28
+ - `BoxControl`: Deprecate 36px default size ([#66704](https://github.com/WordPress/gutenberg/pull/66704)).
29
+ - `CustomSelectControl`: Deprecate 36px default size ([#67441](https://github.com/WordPress/gutenberg/pull/67441)).
30
+ - `NumberControl`: Deprecate 36px default size ([#66730](https://github.com/WordPress/gutenberg/pull/66730)).
31
+ - `UnitControl`: Deprecate 36px default size ([#66791](https://github.com/WordPress/gutenberg/pull/66791)).
32
+ - `FormFileUpload`: Deprecate 36px default size ([#67438](https://github.com/WordPress/gutenberg/pull/67438)).
33
+ - `FormTokenField`: Deprecate 36px default size ([#67454](https://github.com/WordPress/gutenberg/pull/67454)).
34
+
35
+ ### Experimental
36
+
37
+ - `Menu`: throw when subcomponents are not rendered inside top level `Menu` ([#67411](https://github.com/WordPress/gutenberg/pull/67411)).
38
+
39
+ ### Internal
40
+
41
+ - Upgraded `@ariakit/react` (v0.4.13) and `@ariakit/test` (v0.4.5) ([#65907](https://github.com/WordPress/gutenberg/pull/65907)).
42
+ - Upgraded `@ariakit/react` (v0.4.15) and `@ariakit/test` (v0.4.7) ([#67404](https://github.com/WordPress/gutenberg/pull/67404)).
43
+ - `ToolbarButton`: Set size to "compact" ([#67440](https://github.com/WordPress/gutenberg/pull/67440)).
44
+ - `SlotFill`: remove manual rerenders from the portal `Fill` component ([#67471](https://github.com/WordPress/gutenberg/pull/67471)).
45
+ - `BoxControl`: Refactor internals to unify the different combinations of sides ([#67626](https://github.com/WordPress/gutenberg/pull/67626)).
46
+
47
+ ### Bug Fixes
48
+
49
+ - `ResizableBox`: Make drag handles focusable ([#67305](https://github.com/WordPress/gutenberg/pull/67305)).
50
+ - `CustomSelectControl`: Update correctly when `showSelectedHint` is enabled ([#67733](https://github.com/WordPress/gutenberg/pull/67733)).
51
+
52
+ ## 28.13.0 (2024-11-27)
6
53
 
7
54
  ### Deprecations
8
55
 
@@ -11,7 +58,7 @@
11
58
  - `FontSizePicker`: Deprecate 36px default size ([#66920](https://github.com/WordPress/gutenberg/pull/66920)).
12
59
  - `ComboboxControl`: Deprecate 36px default size ([#66900](https://github.com/WordPress/gutenberg/pull/66900)).
13
60
  - `ToggleGroupControl`: Deprecate 36px default size ([#66747](https://github.com/WordPress/gutenberg/pull/66747)).
14
- - `RangeControl`: Deprecate 36px default size ([#66721](https://github.com/WordPress/gutenberg/pull/66721)).
61
+ - `RangeControl`: Deprecate 36px default size ([#66721](https://github.com/WordPress/gutenberg/pull/66721)).
15
62
 
16
63
  ### Bug Fixes
17
64
 
@@ -32,6 +79,9 @@
32
79
  - `ColorPicker`: Update sizes of color format select and copy button ([#67093](https://github.com/WordPress/gutenberg/pull/67093)).
33
80
  - `ComboboxControl`: Update reset button size ([#67215](https://github.com/WordPress/gutenberg/pull/67215)).
34
81
  - `Autocomplete`: Increase option height ([#67214](https://github.com/WordPress/gutenberg/pull/67214)).
82
+ - `DropZone`: Add `isEligible` prop to allow customizing whether the drop zone should activate ([#67317](https://github.com/WordPress/gutenberg/pull/67317)).
83
+ - `CircularOptionPicker`: Update `Button` sizes to be ready for 40px default size ([#67285](https://github.com/WordPress/gutenberg/pull/67285)).
84
+ - `DuotonePicker`: Simplify Button styles ([#66641](https://github.com/WordPress/gutenberg/pull/66641)).
35
85
 
36
86
  ### Experimental
37
87
 
@@ -44,6 +94,7 @@
44
94
  - `SlotFill`: rewrite the `Slot` component from class component to functional ([#67153](https://github.com/WordPress/gutenberg/pull/67153)).
45
95
  - `Menu.ItemHelpText`: Fix text wrapping to prevent unintended word breaks ([#67011](https://github.com/WordPress/gutenberg/pull/67011)).
46
96
  - `BorderBoxControl`: Suppress redundant warnings for deprecated 36px size ([#67213](https://github.com/WordPress/gutenberg/pull/67213)).
97
+ - `CustomGradientPicker`: Prepare `Button`s for 40px default size ([#67286](https://github.com/WordPress/gutenberg/pull/67286)).
47
98
 
48
99
  ## 28.12.0 (2024-11-16)
49
100
 
package/CONTRIBUTING.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Thank you for taking the time to contribute.
4
4
 
5
- The following is a set of guidelines for contributing to the `@wordpress/components` package to be considered in addition to the general ones described in our [Contributing Policy](/CONTRIBUTING.md).
5
+ The following is a set of guidelines for contributing to the `@wordpress/components` package to be considered in addition to the general ones described in our [Contributing Policy](https://github.com/WordPress/gutenberg/blob/HEAD/CONTRIBUTING.md).
6
6
 
7
7
  This set of guidelines should apply especially to newly introduced components. In fact, while these guidelines should also be retroactively applied to existing components, it is sometimes impossible to do so for legacy/compatibility reasons.
8
8
 
@@ -36,7 +36,7 @@ To determine if a component should be added, ask yourself:
36
36
 
37
37
  Here’s a flowchart that can help determine if a new component is necessary:
38
38
 
39
- [![New component flowchart](https://wordpress.org/gutenberg/files/2019/07/New_component_flowchart.png)](https://coggle.it/diagram/WtUSrld3uAYZHsn-/t/new-ui-component/992b38cbe685d897b4aec6d0dd93cc4b47c06e0d4484eeb0d7d9a47fb2c48d94)
39
+ ![New component flowchart](https://wordpress.org/gutenberg/files/2019/07/New_component_flowchart.png)
40
40
 
41
41
  ### First steps
42
42
 
@@ -95,12 +95,12 @@ In these situations, one possible approach is to "soft-deprecate" a given legacy
95
95
  2. Updating all places in Gutenberg that use that API.
96
96
  3. Adding deprecation warnings (only after the previous point is completed, otherwise the Browser Console will be polluted by all those warnings and some e2e tests may fail).
97
97
 
98
- When adding new components or new props to existing components, it's recommended to create a [private version](/packages/private-apis/README.md)) of the component until the changes are stable enough to be exposed as part of the public API.
98
+ When adding new components or new props to existing components, it's recommended to create a [private version](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-private-apis/) of the component until the changes are stable enough to be exposed as part of the public API.
99
99
 
100
100
  ### Learn more
101
101
 
102
- - [How to preserve backward compatibility for a React Component](/docs/contributors/code/backward-compatibility.md#how-to-preserve-backward-compatibility-for-a-react-component)
103
- - [Experimental and Unstable APIs](/docs/contributors/code/coding-guidelines.md#legacy-experimental-apis-plugin-only-apis-and-private-apis)
102
+ - [How to preserve backward compatibility for a React Component](https://developer.wordpress.org/block-editor/contributors/code/backward-compatibility/#how-to-preserve-backward-compatibility-for-a-react-component)
103
+ - [Experimental and Unstable APIs](https://developer.wordpress.org/block-editor/contributors/code/coding-guidelines/#legacy-experimental-apis-plugin-only-apis-and-private-apis)
104
104
  - [Deprecating styles](#deprecating-styles)
105
105
 
106
106
  <!-- ## Polymorphic Components (i.e. the `as` prop)
@@ -216,8 +216,8 @@ function Example(
216
216
 
217
217
  A couple of good examples of how hooks are used for composition are:
218
218
 
219
- - the `Card` component, which builds on top of the `Surface` component by [calling the `useSurface` hook inside its own hook](/packages/components/src/card/card/hook.ts);
220
- - the `HStack` component, which builds on top of the `Flex` component and [calls the `useFlex` hook inside its own hook](/packages/components/src/h-stack/hook.tsx).
219
+ - the `Card` component, which builds on top of the `Surface` component by [calling the `useSurface` hook inside its own hook](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/card/card/hook.ts);
220
+ - the `HStack` component, which builds on top of the `Flex` component and [calls the `useFlex` hook inside its own hook](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/h-stack/hook.tsx).
221
221
 
222
222
  <!-- ## API Consinstency
223
223
 
@@ -418,7 +418,7 @@ On the component's main named export, add a JSDoc comment that includes the main
418
418
 
419
419
  All new component should be styled using [Emotion](https://emotion.sh/docs/introduction).
420
420
 
421
- Note: Instead of using Emotion's standard `cx` function, the custom [`useCx` hook](/packages/components/src/utils/hooks/use-cx.ts) should be used instead.
421
+ Note: Instead of using Emotion's standard `cx` function, the custom [`useCx` hook](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/utils/hooks/use-cx.ts) should be used instead.
422
422
 
423
423
  ### Deprecating styles
424
424
 
@@ -462,7 +462,7 @@ export const Wrapper = styled.div`
462
462
 
463
463
  Once deprecated, code examples in docs/stories should include the opt-in prop set to `true` so that new consumers are encouraged to adopt it from the start.
464
464
 
465
- Remember to [add a **Needs Dev Note** label](/docs/contributors/code/backward-compatibility.md##dev-notes) to the pull request so third-party developers can be informed of the deprecation.
465
+ Remember to [add a **Needs Dev Note** label](https://developer.wordpress.org/block-editor/contributors/code/backward-compatibility/#dev-notes) to the pull request so third-party developers can be informed of the deprecation.
466
466
 
467
467
  When the grace period is over and the deprecation version arrives, the `__next*` prop, deprecation notice, and deprecated styles should all be completely removed from the codebase.
468
468
 
@@ -491,7 +491,7 @@ Components can use this system via a couple of functions:
491
491
  - they can connect to the Context via `contextConnect`
492
492
  - they can read the "computed" values from the context via `useContextSystem`
493
493
 
494
- An example of how this is used can be found in the [`Card` component family](/packages/components/src/card). For example, this is how the `Card` component injects the `size` and `isBorderless` props down to its `CardBody` subcomponent — which makes it use the correct spacing and border settings "auto-magically".
494
+ An example of how this is used can be found in the [`Card` component family](https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/card). For example, this is how the `Card` component injects the `size` and `isBorderless` props down to its `CardBody` subcomponent — which makes it use the correct spacing and border settings "auto-magically".
495
495
 
496
496
  ```jsx
497
497
  //=========================================================================
@@ -564,7 +564,7 @@ export function useCardBody( props ) {
564
564
 
565
565
  ## Unit tests
566
566
 
567
- Please refer to the [JavaScript Testing Overview docs](/docs/contributors/code/testing-overview.md#snapshot-testing).
567
+ Please refer to the [JavaScript Testing Overview docs](https://developer.wordpress.org/block-editor/contributors/code/testing-overview/#snapshot-testing).
568
568
 
569
569
  ## Storybook
570
570
 
@@ -596,13 +596,13 @@ Primary.args = {
596
596
 
597
597
  A great tool to use when writing stories is the [Storybook Controls addon](https://storybook.js.org/addons/@storybook/addon-controls). Ideally props should be exposed by using this addon, which provides a graphical UI to interact dynamically with the component without needing to write code. Historically, we used [Knobs](https://storybook.js.org/addons/@storybook/addon-knobs), but it was deprecated and later removed in [#47152](https://github.com/WordPress/gutenberg/pull/47152).
598
598
 
599
- The default value of each control should coincide with the default value of the props (i.e. it should be `undefined` if a prop is not required). A story should, therefore, also explicitly show how values from the Context System are applied to (sub)components. A good example of how this may look like is the [`Card` story](https://wordpress.github.io/gutenberg/?path=/story/components-card--default) (code [here](/packages/components/src/card/stories/index.tsx)).
599
+ The default value of each control should coincide with the default value of the props (i.e. it should be `undefined` if a prop is not required). A story should, therefore, also explicitly show how values from the Context System are applied to (sub)components. A good example of how this may look like is the [`Card` story](https://wordpress.github.io/gutenberg/?path=/story/components-card--default) (code [here](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/card/stories/index.story.tsx)).
600
600
 
601
601
  Storybook can be started on a local machine by running `npm run storybook:dev`. Alternatively, the components' catalogue (up to date with the latest code on `trunk`) can be found at [wordpress.github.io/gutenberg/](https://wordpress.github.io/gutenberg/).
602
602
 
603
603
  ## Documentation
604
604
 
605
- All components, in addition to being typed, should be using JSDoc when necessary — as explained in the [Coding Guidelines](/docs/contributors/code/coding-guidelines.md#javascript-documentation-using-jsdoc).
605
+ All components, in addition to being typed, should be using JSDoc when necessary — as explained in the [Coding Guidelines](https://developer.wordpress.org/block-editor/contributors/code/coding-guidelines/#javascript-documentation-using-jsdoc).
606
606
 
607
607
  Each component that is exported from the `@wordpress/components` package should include a `README.md` file, explaining how to use the component, showing examples, and documenting all the props.
608
608
 
@@ -625,7 +625,7 @@ Description of the component.
625
625
 
626
626
  ## Usage
627
627
 
628
- Code example using correct markdown syntax and formatted using project's formatting rules. See [ItemGroup](/packages/components/src/item-group/item-group/README.md#usage) for a real-world example.
628
+ Code example using correct markdown syntax and formatted using project's formatting rules. See [ItemGroup](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/item-group/item-group/README.md) for a real-world example.
629
629
 
630
630
  ```jsx
631
631
  import { ExampleComponent } from '@wordpress/components';
@@ -653,13 +653,13 @@ Prop description. With a new line before and after the description and before an
653
653
 
654
654
  ### Inherited props
655
655
 
656
- Add this section when there are props that are drilled down into an internal component. See [ClipboardButton](/packages/components/src/clipboard-button/README.md) for an example.
656
+ Add this section when there are props that are drilled down into an internal component. See [ClipboardButton](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/clipboard-button/README.md) for an example.
657
657
 
658
658
  <!-- Only add the next section if the component relies on the [Context System](#context-system) -->
659
659
 
660
660
  ## Context
661
661
 
662
- See examples for this section for the [ItemGroup](/packages/components/src/item-group/item-group/README.md#context) and [`Card`](/packages/components/src/card/card/README.md#context) components.
662
+ See examples for this section for the [ItemGroup](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/item-group/item-group/README.md#context) and [`Card`](https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/card/card#context) components.
663
663
  ````
664
664
 
665
665
  ## Folder structure
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_primitives","_utils","_jsxRuntime","BASE_SIZE","GRID_CELL_SIZE","GRID_PADDING","DOT_SIZE","DOT_SIZE_SELECTED","AlignmentMatrixControlIcon","className","disablePointerEvents","size","width","height","style","value","props","_ref","_ref2","jsx","SVG","xmlns","viewBox","role","clsx","pointerEvents","undefined","children","ALIGNMENTS","map","align","index","dotSize","getAlignmentIndex","Rect","x","y","Math","floor","fill","_default","exports","default"],"sources":["@wordpress/components/src/alignment-matrix-control/icon.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Rect, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENTS, getAlignmentIndex } from './utils';\nimport type { AlignmentMatrixControlIconProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst BASE_SIZE = 24;\nconst GRID_CELL_SIZE = 7;\nconst GRID_PADDING = ( BASE_SIZE - 3 * GRID_CELL_SIZE ) / 2;\nconst DOT_SIZE = 2;\nconst DOT_SIZE_SELECTED = 4;\n\nfunction AlignmentMatrixControlIcon( {\n\tclassName,\n\tdisablePointerEvents = true,\n\tsize,\n\twidth,\n\theight,\n\tstyle = {},\n\tvalue = 'center',\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlIconProps, 'svg', false > ) {\n\treturn (\n\t\t<SVG\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox={ `0 0 ${ BASE_SIZE } ${ BASE_SIZE }` }\n\t\t\twidth={ size ?? width ?? BASE_SIZE }\n\t\t\theight={ size ?? height ?? BASE_SIZE }\n\t\t\trole=\"presentation\"\n\t\t\tclassName={ clsx(\n\t\t\t\t'component-alignment-matrix-control-icon',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tstyle={ {\n\t\t\t\tpointerEvents: disablePointerEvents ? 'none' : undefined,\n\t\t\t\t...style,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ALIGNMENTS.map( ( align, index ) => {\n\t\t\t\tconst dotSize =\n\t\t\t\t\tgetAlignmentIndex( value ) === index\n\t\t\t\t\t\t? DOT_SIZE_SELECTED\n\t\t\t\t\t\t: DOT_SIZE;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Rect\n\t\t\t\t\t\tkey={ align }\n\t\t\t\t\t\tx={\n\t\t\t\t\t\t\tGRID_PADDING +\n\t\t\t\t\t\t\t( index % 3 ) * GRID_CELL_SIZE +\n\t\t\t\t\t\t\t( GRID_CELL_SIZE - dotSize ) / 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty={\n\t\t\t\t\t\t\tGRID_PADDING +\n\t\t\t\t\t\t\tMath.floor( index / 3 ) * GRID_CELL_SIZE +\n\t\t\t\t\t\t\t( GRID_CELL_SIZE - dotSize ) / 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\twidth={ dotSize }\n\t\t\t\t\t\theight={ dotSize }\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</SVG>\n\t);\n}\n\nexport default AlignmentMatrixControlIcon;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAAwD,IAAAG,WAAA,GAAAH,OAAA;AAbxD;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAKA,MAAMI,SAAS,GAAG,EAAE;AACpB,MAAMC,cAAc,GAAG,CAAC;AACxB,MAAMC,YAAY,GAAG,CAAEF,SAAS,GAAG,CAAC,GAAGC,cAAc,IAAK,CAAC;AAC3D,MAAME,QAAQ,GAAG,CAAC;AAClB,MAAMC,iBAAiB,GAAG,CAAC;AAE3B,SAASC,0BAA0BA,CAAE;EACpCC,SAAS;EACTC,oBAAoB,GAAG,IAAI;EAC3BC,IAAI;EACJC,KAAK;EACLC,MAAM;EACNC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK,GAAG,QAAQ;EAChB,GAAGC;AACsE,CAAC,EAAG;EAAA,IAAAC,IAAA,EAAAC,KAAA;EAC7E,oBACC,IAAAhB,WAAA,CAAAiB,GAAA,EAACnB,WAAA,CAAAoB,GAAG;IACHC,KAAK,EAAC,4BAA4B;IAClCC,OAAO,EAAG,OAAQnB,SAAS,IAAMA,SAAS,EAAK;IAC/CS,KAAK,GAAAK,IAAA,GAAGN,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAIC,KAAK,cAAAK,IAAA,cAAAA,IAAA,GAAId,SAAW;IACpCU,MAAM,GAAAK,KAAA,GAAGP,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAIE,MAAM,cAAAK,KAAA,cAAAA,KAAA,GAAIf,SAAW;IACtCoB,IAAI,EAAC,cAAc;IACnBd,SAAS,EAAG,IAAAe,aAAI,EACf,yCAAyC,EACzCf,SACD,CAAG;IACHK,KAAK,EAAG;MACPW,aAAa,EAAEf,oBAAoB,GAAG,MAAM,GAAGgB,SAAS;MACxD,GAAGZ;IACJ,CAAG;IAAA,GACEE,KAAK;IAAAW,QAAA,EAERC,iBAAU,CAACC,GAAG,CAAE,CAAEC,KAAK,EAAEC,KAAK,KAAM;MACrC,MAAMC,OAAO,GACZ,IAAAC,wBAAiB,EAAElB,KAAM,CAAC,KAAKgB,KAAK,GACjCxB,iBAAiB,GACjBD,QAAQ;MAEZ,oBACC,IAAAJ,WAAA,CAAAiB,GAAA,EAACnB,WAAA,CAAAkC,IAAI;QAEJC,CAAC,EACA9B,YAAY,GACV0B,KAAK,GAAG,CAAC,GAAK3B,cAAc,GAC9B,CAAEA,cAAc,GAAG4B,OAAO,IAAK,CAC/B;QACDI,CAAC,EACA/B,YAAY,GACZgC,IAAI,CAACC,KAAK,CAAEP,KAAK,GAAG,CAAE,CAAC,GAAG3B,cAAc,GACxC,CAAEA,cAAc,GAAG4B,OAAO,IAAK,CAC/B;QACDpB,KAAK,EAAGoB,OAAS;QACjBnB,MAAM,EAAGmB,OAAS;QAClBO,IAAI,EAAC;MAAc,GAbbT,KAcN,CAAC;IAEJ,CAAE;EAAC,CACC,CAAC;AAER;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEclC,0BAA0B","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_primitives","_utils","_jsxRuntime","BASE_SIZE","GRID_CELL_SIZE","GRID_PADDING","DOT_SIZE","DOT_SIZE_SELECTED","AlignmentMatrixControlIcon","className","disablePointerEvents","size","width","height","style","value","props","_ref","_ref2","jsx","SVG","xmlns","viewBox","role","clsx","pointerEvents","undefined","children","ALIGNMENTS","map","align","index","dotSize","getAlignmentIndex","Rect","x","y","Math","floor","fill","_default","exports","default"],"sources":["@wordpress/components/src/alignment-matrix-control/icon.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Rect, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENTS, getAlignmentIndex } from './utils';\nimport type { AlignmentMatrixControlIconProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst BASE_SIZE = 24;\nconst GRID_CELL_SIZE = 7;\nconst GRID_PADDING = ( BASE_SIZE - 3 * GRID_CELL_SIZE ) / 2;\nconst DOT_SIZE = 2;\nconst DOT_SIZE_SELECTED = 4;\n\nfunction AlignmentMatrixControlIcon( {\n\tclassName,\n\tdisablePointerEvents = true,\n\tsize,\n\twidth,\n\theight,\n\tstyle = {},\n\tvalue = 'center',\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlIconProps, 'svg', false > ) {\n\treturn (\n\t\t<SVG\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox={ `0 0 ${ BASE_SIZE } ${ BASE_SIZE }` }\n\t\t\twidth={ size ?? width ?? BASE_SIZE }\n\t\t\theight={ size ?? height ?? BASE_SIZE }\n\t\t\trole=\"presentation\"\n\t\t\tclassName={ clsx(\n\t\t\t\t'component-alignment-matrix-control-icon',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tstyle={ {\n\t\t\t\tpointerEvents: disablePointerEvents ? 'none' : undefined,\n\t\t\t\t...style,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ALIGNMENTS.map( ( align, index ) => {\n\t\t\t\tconst dotSize =\n\t\t\t\t\tgetAlignmentIndex( value ) === index\n\t\t\t\t\t\t? DOT_SIZE_SELECTED\n\t\t\t\t\t\t: DOT_SIZE;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Rect\n\t\t\t\t\t\tkey={ align }\n\t\t\t\t\t\tx={\n\t\t\t\t\t\t\tGRID_PADDING +\n\t\t\t\t\t\t\t( index % 3 ) * GRID_CELL_SIZE +\n\t\t\t\t\t\t\t( GRID_CELL_SIZE - dotSize ) / 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty={\n\t\t\t\t\t\t\tGRID_PADDING +\n\t\t\t\t\t\t\tMath.floor( index / 3 ) * GRID_CELL_SIZE +\n\t\t\t\t\t\t\t( GRID_CELL_SIZE - dotSize ) / 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\twidth={ dotSize }\n\t\t\t\t\t\theight={ dotSize }\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</SVG>\n\t);\n}\n\nexport default AlignmentMatrixControlIcon;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAAwD,IAAAG,WAAA,GAAAH,OAAA;AAbxD;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAKA,MAAMI,SAAS,GAAG,EAAE;AACpB,MAAMC,cAAc,GAAG,CAAC;AACxB,MAAMC,YAAY,GAAG,CAAEF,SAAS,GAAG,CAAC,GAAGC,cAAc,IAAK,CAAC;AAC3D,MAAME,QAAQ,GAAG,CAAC;AAClB,MAAMC,iBAAiB,GAAG,CAAC;AAE3B,SAASC,0BAA0BA,CAAE;EACpCC,SAAS;EACTC,oBAAoB,GAAG,IAAI;EAC3BC,IAAI;EACJC,KAAK;EACLC,MAAM;EACNC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK,GAAG,QAAQ;EAChB,GAAGC;AACsE,CA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bT,KAcN,CAAC;IAEJ,CAAE;EAAC,CACC,CAAC;AAER;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEclC,0BAA0B","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_compose","_element","_cell","_composite","_styles","_icon","_utils","_jsxRuntime","UnforwardedAlignmentMatrixControl","className","id","label","__","defaultValue","value","onChange","width","props","baseId","useInstanceId","setActiveId","useCallback","nextActiveId","nextValue","getItemValue","classes","clsx","jsx","Composite","defaultActiveId","getItemId","activeId","rtl","isRTL","render","GridContainer","role","size","children","GRID","map","cells","index","Row","GridRow","cell","default","AlignmentMatrixControl","exports","Object","assign","Icon","AlignmentMatrixControlIcon","displayName","_default"],"sources":["@wordpress/components/src/alignment-matrix-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Cell from './cell';\nimport { Composite } from '../composite';\nimport { GridContainer, GridRow } from './styles';\nimport AlignmentMatrixControlIcon from './icon';\nimport { GRID, getItemId, getItemValue } from './utils';\nimport type { WordPressComponentProps } from '../context';\nimport type { AlignmentMatrixControlProps } from './types';\n\nfunction UnforwardedAlignmentMatrixControl( {\n\tclassName,\n\tid,\n\tlabel = __( 'Alignment Matrix Control' ),\n\tdefaultValue = 'center center',\n\tvalue,\n\tonChange,\n\twidth = 92,\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlProps, 'div', false > ) {\n\tconst baseId = useInstanceId(\n\t\tUnforwardedAlignmentMatrixControl,\n\t\t'alignment-matrix-control',\n\t\tid\n\t);\n\n\tconst setActiveId = useCallback<\n\t\tNonNullable< React.ComponentProps< typeof Composite >[ 'setActiveId' ] >\n\t>(\n\t\t( nextActiveId ) => {\n\t\t\tconst nextValue = getItemValue( baseId, nextActiveId );\n\t\t\tif ( nextValue ) {\n\t\t\t\tonChange?.( nextValue );\n\t\t\t}\n\t\t},\n\t\t[ baseId, onChange ]\n\t);\n\n\tconst classes = clsx( 'component-alignment-matrix-control', className );\n\n\treturn (\n\t\t<Composite\n\t\t\tdefaultActiveId={ getItemId( baseId, defaultValue ) }\n\t\t\tactiveId={ getItemId( baseId, value ) }\n\t\t\tsetActiveId={ setActiveId }\n\t\t\trtl={ isRTL() }\n\t\t\trender={\n\t\t\t\t<GridContainer\n\t\t\t\t\t{ ...props }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tclassName={ classes }\n\t\t\t\t\tid={ baseId }\n\t\t\t\t\trole=\"grid\"\n\t\t\t\t\tsize={ width }\n\t\t\t\t/>\n\t\t\t}\n\t\t>\n\t\t\t{ GRID.map( ( cells, index ) => (\n\t\t\t\t<Composite.Row render={ <GridRow role=\"row\" /> } key={ index }>\n\t\t\t\t\t{ cells.map( ( cell ) => (\n\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\tid={ getItemId( baseId, cell ) }\n\t\t\t\t\t\t\tkey={ cell }\n\t\t\t\t\t\t\tvalue={ cell }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</Composite.Row>\n\t\t\t) ) }\n\t\t</Composite>\n\t);\n}\n\n/**\n * AlignmentMatrixControl components enable adjustments to horizontal and vertical alignments for UI.\n *\n * ```jsx\n * import { AlignmentMatrixControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ alignment, setAlignment ] = useState( 'center center' );\n *\n * \treturn (\n * \t\t<AlignmentMatrixControl\n * \t\t\tvalue={ alignment }\n * \t\t\tonChange={ setAlignment }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const AlignmentMatrixControl = Object.assign(\n\tUnforwardedAlignmentMatrixControl,\n\t{\n\t\t/**\n\t\t * Render an alignment matrix as an icon.\n\t\t *\n\t\t * ```jsx\n\t\t * import { AlignmentMatrixControl } from '@wordpress/components';\n\t\t *\n\t\t * <Icon icon={<AlignmentMatrixControl.Icon value=\"top left\" />} />\n\t\t * ```\n\t\t */\n\t\tIcon: Object.assign( AlignmentMatrixControlIcon, {\n\t\t\tdisplayName: 'AlignmentMatrixControl.Icon',\n\t\t} ),\n\t}\n);\n\nexport default AlignmentMatrixControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAAwD,IAAAS,WAAA,GAAAT,OAAA;AAnBxD;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AASA,SAASU,iCAAiCA,CAAE;EAC3CC,SAAS;EACTC,EAAE;EACFC,KAAK,GAAG,IAAAC,QAAE,EAAE,0BAA2B,CAAC;EACxCC,YAAY,GAAG,eAAe;EAC9BC,KAAK;EACLC,QAAQ;EACRC,KAAK,GAAG,EAAE;EACV,GAAGC;AACkE,CAAC,EAAG;EACzE,MAAMC,MAAM,GAAG,IAAAC,sBAAa,EAC3BX,iCAAiC,EACjC,0BAA0B,EAC1BE,EACD,CAAC;EAED,MAAMU,WAAW,GAAG,IAAAC,oBAAW,EAG5BC,YAAY,IAAM;IACnB,MAAMC,SAAS,GAAG,IAAAC,mBAAY,EAAEN,MAAM,EAAEI,YAAa,CAAC;IACtD,IAAKC,SAAS,E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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAGE,MAAM,CAACC,MAAM,CAClD1C,iCAAiC,EACjC;EACC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE2C,IAAI,EAAEF,MAAM,CAACC,MAAM,CAAEE,aAA0B,EAAE;IAChDC,WAAW,EAAE;EACd,CAAE;AACH,CACD,CAAC;AAAC,IAAAC,QAAA,GAAAN,OAAA,CAAAF,OAAA,GAEaC,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_compose","_element","_cell","_composite","_styles","_icon","_utils","_jsxRuntime","UnforwardedAlignmentMatrixControl","className","id","label","__","defaultValue","value","onChange","width","props","baseId","useInstanceId","setActiveId","useCallback","nextActiveId","nextValue","getItemValue","classes","clsx","jsx","Composite","defaultActiveId","getItemId","activeId","rtl","isRTL","render","GridContainer","role","size","children","GRID","map","cells","index","Row","GridRow","cell","default","AlignmentMatrixControl","exports","Object","assign","Icon","AlignmentMatrixControlIcon","displayName","_default"],"sources":["@wordpress/components/src/alignment-matrix-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Cell from './cell';\nimport { Composite } from '../composite';\nimport { GridContainer, GridRow } from './styles';\nimport AlignmentMatrixControlIcon from './icon';\nimport { GRID, getItemId, getItemValue } from './utils';\nimport type { WordPressComponentProps } from '../context';\nimport type { AlignmentMatrixControlProps } from './types';\n\nfunction UnforwardedAlignmentMatrixControl( {\n\tclassName,\n\tid,\n\tlabel = __( 'Alignment Matrix Control' ),\n\tdefaultValue = 'center center',\n\tvalue,\n\tonChange,\n\twidth = 92,\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlProps, 'div', false > ) {\n\tconst baseId = useInstanceId(\n\t\tUnforwardedAlignmentMatrixControl,\n\t\t'alignment-matrix-control',\n\t\tid\n\t);\n\n\tconst setActiveId = useCallback<\n\t\tNonNullable< React.ComponentProps< typeof Composite >[ 'setActiveId' ] >\n\t>(\n\t\t( nextActiveId ) => {\n\t\t\tconst nextValue = getItemValue( baseId, nextActiveId );\n\t\t\tif ( nextValue ) {\n\t\t\t\tonChange?.( nextValue );\n\t\t\t}\n\t\t},\n\t\t[ baseId, onChange ]\n\t);\n\n\tconst classes = clsx( 'component-alignment-matrix-control', className );\n\n\treturn (\n\t\t<Composite\n\t\t\tdefaultActiveId={ getItemId( baseId, defaultValue ) }\n\t\t\tactiveId={ getItemId( baseId, value ) }\n\t\t\tsetActiveId={ setActiveId }\n\t\t\trtl={ isRTL() }\n\t\t\trender={\n\t\t\t\t<GridContainer\n\t\t\t\t\t{ ...props }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tclassName={ classes }\n\t\t\t\t\tid={ baseId }\n\t\t\t\t\trole=\"grid\"\n\t\t\t\t\tsize={ width }\n\t\t\t\t/>\n\t\t\t}\n\t\t>\n\t\t\t{ GRID.map( ( cells, index ) => (\n\t\t\t\t<Composite.Row render={ <GridRow role=\"row\" /> } key={ index }>\n\t\t\t\t\t{ cells.map( ( cell ) => (\n\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\tid={ getItemId( baseId, cell ) }\n\t\t\t\t\t\t\tkey={ cell }\n\t\t\t\t\t\t\tvalue={ cell }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</Composite.Row>\n\t\t\t) ) }\n\t\t</Composite>\n\t);\n}\n\n/**\n * AlignmentMatrixControl components enable adjustments to horizontal and vertical alignments for UI.\n *\n * ```jsx\n * import { AlignmentMatrixControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ alignment, setAlignment ] = useState( 'center center' );\n *\n * \treturn (\n * \t\t<AlignmentMatrixControl\n * \t\t\tvalue={ alignment }\n * \t\t\tonChange={ setAlignment }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const AlignmentMatrixControl = Object.assign(\n\tUnforwardedAlignmentMatrixControl,\n\t{\n\t\t/**\n\t\t * Render an alignment matrix as an icon.\n\t\t *\n\t\t * ```jsx\n\t\t * import { AlignmentMatrixControl } from '@wordpress/components';\n\t\t *\n\t\t * <Icon icon={<AlignmentMatrixControl.Icon value=\"top left\" />} />\n\t\t * ```\n\t\t */\n\t\tIcon: Object.assign( AlignmentMatrixControlIcon, {\n\t\t\tdisplayName: 'AlignmentMatrixControl.Icon',\n\t\t} ),\n\t}\n);\n\nexport default AlignmentMatrixControl;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAAwD,IAAAS,WAAA,GAAAT,OAAA;AAnBxD;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AASA,SAASU,iCAAiCA,CAAE;EAC3CC,SAAS;EACTC,EAAE;EACFC,KAAK,GAAG,IAAAC,QAAE,EAAE,0BAA2B,CAAC;EACxCC,YAAY,GAAG,eAAe;EAC9BC,KAAK;EACLC,QAAQ;EACRC,KAAK,GAAG,EAAE;EACV,GAAGC;AACkE,CAAC,EAAG;EACzE,MAAMC,MAAM,GAAG,IAAAC,sBAAa,EAC3BX,iCAAiC,EACjC,0BAA0B,EAC1BE,EACD,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AAAoB,gBAAS,EAAEZ,MAAM,EAAE2B,IAAK,CAAG;QAEhC/B,KAAK,EAAG+B;MAAM,GADRA,IAEN,CACA;IAAC,GAPmDH,KAQxC,CACd;EAAC,CACO,CAAC;AAEd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAGE,MAAM,CAACC,MAAM,CAClD1C,iCAAiC,EACjC;EACC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE2C,IAAI,EAAEF,MAAM,CAACC,MAAM,CAAEE,aAA0B,EAAE;IAChDC,WAAW,EAAE;EACd,CAAE;AACH,CACD,CAAC;AAAC,IAAAC,QAAA,GAAAN,OAAA,CAAAF,OAAA,GAEaC,sBAAsB","ignoreList":[]}
@@ -53,12 +53,12 @@ function UnforwardedAnglePickerControl(props, ref) {
53
53
  gap: 2,
54
54
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_flex.FlexBlock, {
55
55
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_numberControl.default, {
56
+ __next40pxDefaultSize: true,
56
57
  label: label,
57
58
  className: "components-angle-picker-control__input-field",
58
59
  max: 360,
59
60
  min: 0,
60
61
  onChange: handleOnNumberChange,
61
- size: "__unstable-large",
62
62
  step: "1",
63
63
  value: value,
64
64
  spinControls: "none",
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_i18n","_flex","_spacer","_numberControl","_angleCircle","_anglePickerControlStyles","_jsxRuntime","UnforwardedAnglePickerControl","props","ref","className","label","__","onChange","value","restProps","handleOnNumberChange","unprocessedValue","undefined","inputValue","parseInt","classes","clsx","unitText","jsx","UnitText","children","prefixedUnitText","suffixedUnitText","isRTL","jsxs","Flex","gap","FlexBlock","default","max","min","size","step","spinControls","prefix","suffix","Spacer","marginBottom","marginTop","AnglePickerControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/angle-picker-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Flex, FlexBlock } from '../flex';\nimport { Spacer } from '../spacer';\nimport NumberControl from '../number-control';\nimport AngleCircle from './angle-circle';\nimport { UnitText } from './styles/angle-picker-control-styles';\n\nimport type { WordPressComponentProps } from '../context';\nimport type { AnglePickerControlProps } from './types';\n\nfunction UnforwardedAnglePickerControl(\n\tprops: WordPressComponentProps< AnglePickerControlProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\tclassName,\n\t\tlabel = __( 'Angle' ),\n\t\tonChange,\n\t\tvalue,\n\t\t...restProps\n\t} = props;\n\n\tconst handleOnNumberChange = ( unprocessedValue: string | undefined ) => {\n\t\tif ( onChange === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== undefined && unprocessedValue !== ''\n\t\t\t\t? parseInt( unprocessedValue, 10 )\n\t\t\t\t: 0;\n\t\tonChange( inputValue );\n\t};\n\n\tconst classes = clsx( 'components-angle-picker-control', className );\n\n\tconst unitText = <UnitText>°</UnitText>;\n\tconst [ prefixedUnitText, suffixedUnitText ] = isRTL()\n\t\t? [ unitText, null ]\n\t\t: [ null, unitText ];\n\n\treturn (\n\t\t<Flex { ...restProps } ref={ ref } className={ classes } gap={ 2 }>\n\t\t\t<FlexBlock>\n\t\t\t\t<NumberControl\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tclassName=\"components-angle-picker-control__input-field\"\n\t\t\t\t\tmax={ 360 }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ handleOnNumberChange }\n\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\tstep=\"1\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\tprefix={ prefixedUnitText }\n\t\t\t\t\tsuffix={ suffixedUnitText }\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t\t<Spacer marginBottom=\"1\" marginTop=\"auto\">\n\t\t\t\t<AngleCircle\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</Spacer>\n\t\t</Flex>\n\t);\n}\n\n/**\n * `AnglePickerControl` is a React component to render a UI that allows users to\n * pick an angle. Users can choose an angle in a visual UI with the mouse by\n * dragging an angle indicator inside a circle or by directly inserting the\n * desired angle in a text field.\n *\n * ```jsx\n * import { useState } from '@wordpress/element';\n * import { AnglePickerControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ angle, setAngle ] = useState( 0 );\n * return (\n * <AnglePickerControl\n * value={ angle }\n * onChange={ setAngle }\n * </>\n * );\n * }\n * ```\n */\nexport const AnglePickerControl = forwardRef( UnforwardedAnglePickerControl );\n\nexport default AnglePickerControl;\n"],"mappings":";;;;;;;AAIA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,yBAAA,GAAAP,OAAA;AAAgE,IAAAQ,WAAA,GAAAR,OAAA;AAnBhE;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;;AAUA,SAASS,6BAA6BA,CACrCC,KAAgE,EAChEC,GAAwB,EACvB;EACD,MAAM;IACLC,SAAS;IACTC,KAAK,GAAG,IAAAC,QAAE,EAAE,OAAQ,CAAC;I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Y,EAAC,MAAM;QACnBC,MAAM,EAAGb,gBAAkB;QAC3Bc,MAAM,EAAGb;MAAkB,CAC3B;IAAC,CACQ,CAAC,eACZ,IAAAtB,WAAA,CAAAkB,GAAA,EAACtB,OAAA,CAAAwC,MAAM;MAACC,YAAY,EAAC,GAAG;MAACC,SAAS,EAAC,MAAM;MAAAlB,QAAA,eACxC,IAAApB,WAAA,CAAAkB,GAAA,EAACpB,YAAA,CAAA8B,OAAW;QACX,eAAY,MAAM;QAClBpB,KAAK,EAAGA,KAAO;QACfD,QAAQ,EAAGA;MAAU,CACrB;IAAC,CACK,CAAC;EAAA,CACJ,CAAC;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMgC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,mBAAU,EAAExC,6BAA8B,CAAC;AAAC,IAAAyC,QAAA,GAAAF,OAAA,CAAAZ,OAAA,GAE/DW,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_i18n","_flex","_spacer","_numberControl","_angleCircle","_anglePickerControlStyles","_jsxRuntime","UnforwardedAnglePickerControl","props","ref","className","label","__","onChange","value","restProps","handleOnNumberChange","unprocessedValue","undefined","inputValue","parseInt","classes","clsx","unitText","jsx","UnitText","children","prefixedUnitText","suffixedUnitText","isRTL","jsxs","Flex","gap","FlexBlock","default","__next40pxDefaultSize","max","min","step","spinControls","prefix","suffix","Spacer","marginBottom","marginTop","AnglePickerControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/angle-picker-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Flex, FlexBlock } from '../flex';\nimport { Spacer } from '../spacer';\nimport NumberControl from '../number-control';\nimport AngleCircle from './angle-circle';\nimport { UnitText } from './styles/angle-picker-control-styles';\n\nimport type { WordPressComponentProps } from '../context';\nimport type { AnglePickerControlProps } from './types';\n\nfunction UnforwardedAnglePickerControl(\n\tprops: WordPressComponentProps< AnglePickerControlProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\tclassName,\n\t\tlabel = __( 'Angle' ),\n\t\tonChange,\n\t\tvalue,\n\t\t...restProps\n\t} = props;\n\n\tconst handleOnNumberChange = ( unprocessedValue: string | undefined ) => {\n\t\tif ( onChange === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== undefined && unprocessedValue !== ''\n\t\t\t\t? parseInt( unprocessedValue, 10 )\n\t\t\t\t: 0;\n\t\tonChange( inputValue );\n\t};\n\n\tconst classes = clsx( 'components-angle-picker-control', className );\n\n\tconst unitText = <UnitText>°</UnitText>;\n\tconst [ prefixedUnitText, suffixedUnitText ] = isRTL()\n\t\t? [ unitText, null ]\n\t\t: [ null, unitText ];\n\n\treturn (\n\t\t<Flex { ...restProps } ref={ ref } className={ classes } gap={ 2 }>\n\t\t\t<FlexBlock>\n\t\t\t\t<NumberControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tclassName=\"components-angle-picker-control__input-field\"\n\t\t\t\t\tmax={ 360 }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ handleOnNumberChange }\n\t\t\t\t\tstep=\"1\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\tprefix={ prefixedUnitText }\n\t\t\t\t\tsuffix={ suffixedUnitText }\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t\t<Spacer marginBottom=\"1\" marginTop=\"auto\">\n\t\t\t\t<AngleCircle\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</Spacer>\n\t\t</Flex>\n\t);\n}\n\n/**\n * `AnglePickerControl` is a React component to render a UI that allows users to\n * pick an angle. Users can choose an angle in a visual UI with the mouse by\n * dragging an angle indicator inside a circle or by directly inserting the\n * desired angle in a text field.\n *\n * ```jsx\n * import { useState } from '@wordpress/element';\n * import { AnglePickerControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ angle, setAngle ] = useState( 0 );\n * return (\n * <AnglePickerControl\n * value={ angle }\n * onChange={ setAngle }\n * </>\n * );\n * }\n * ```\n */\nexport const AnglePickerControl = forwardRef( UnforwardedAnglePickerControl );\n\nexport default AnglePickerControl;\n"],"mappings":";;;;;;;AAIA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,yBAAA,GAAAP,OAAA;AAAgE,IAAAQ,WAAA,GAAAR,OAAA;AAnBhE;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;;AAUA,SAASS,6BAA6BA,CACrCC,KAAgE,EAChEC,GAAwB,EACvB;EACD,MAAM;IACLC,SAAS;IACTC,KAAK,GAAG,IAAAC,QAAE,EAAE,OAAQ,CAAC;IACrBC,QAAQ;IACRC,KAAK;IACL,GAAGC;EACJ,CAAC,GAAGP,KAAK;EAET,MAAMQ,oBAAoB,GAAKC,gBAAoC,IAAM;IACxE,IAAKJ,QAAQ,KAAKK,SAAS,EAAG;MAC7B;IACD;IAEA,MAAMC,UAAU,GACfF,gBAAgB,KAAKC,SAAS,IAAID,gBAAgB,KAAK,EAAE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CAAAkB,GAAA,EAACpB,YAAA,CAAA8B,OAAW;QACX,eAAY,MAAM;QAClBpB,KAAK,EAAGA,KAAO;QACfD,QAAQ,EAAGA;MAAU,CACrB;IAAC,CACK,CAAC;EAAA,CACJ,CAAC;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMgC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,mBAAU,EAAExC,6BAA8B,CAAC;AAAC,IAAAyC,QAAA,GAAAF,OAAA,CAAAZ,OAAA,GAE/DW,kBAAkB","ignoreList":[]}
@@ -15,11 +15,5 @@ Object.defineProperty(exports, "__unstableMotion", {
15
15
  return _framerMotion.motion;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "__unstableMotionContext", {
19
- enumerable: true,
20
- get: function () {
21
- return _framerMotion.MotionContext;
22
- }
23
- });
24
18
  var _framerMotion = require("framer-motion");
25
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_framerMotion","require"],"sources":["@wordpress/components/src/animation/index.tsx"],"sourcesContent":["/**\n * Framer Motion is used to create animated, interactive interfaces. The package is roughly ~30kb so\n * this should ideally be loaded once across all Gutenberg packages. To give ourselves more flexibility\n * in trying animation options, we avoid making this public API.\n *\n * @see https://www.framer.com/docs/animation/\n */\n\nexport {\n\tmotion as __unstableMotion,\n\tAnimatePresence as __unstableAnimatePresence,\n\tMotionContext as __unstableMotionContext,\n} from 'framer-motion';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAAA,aAAA,GAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_framerMotion","require"],"sources":["@wordpress/components/src/animation/index.tsx"],"sourcesContent":["/**\n * Framer Motion is used to create animated, interactive interfaces. The package is roughly ~30kb so\n * this should ideally be loaded once across all Gutenberg packages. To give ourselves more flexibility\n * in trying animation options, we avoid making this public API.\n *\n * @see https://www.framer.com/docs/animation/\n */\n\nexport {\n\tmotion as __unstableMotion,\n\tAnimatePresence as __unstableAnimatePresence,\n} from 'framer-motion';\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,IAAAA,aAAA,GAAAC,OAAA","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_richText","_compose","_a11y","_i18n","_getDefaultUseItems","_button","_popover","_visuallyHidden","_reactDom","_jsxRuntime","ListBox","items","onSelect","selectedIndex","instanceId","listBoxId","className","Component","jsx","id","role","children","map","option","index","default","key","__next40pxDefaultSize","accessibleWhenDisabled","disabled","isDisabled","clsx","variant","undefined","onClick","label","getAutoCompleterUI","autocompleter","_autocompleter$useIte","useItems","getDefaultUseItems","AutocompleterUI","filterValue","onChangeOptions","onReset","reset","contentRef","popoverAnchor","useAnchor","editableContentElement","current","needsA11yCompat","setNeedsA11yCompat","useState","popoverRef","useRef","popoverRefs","useMergeRefs","useRefEffect","node","ownerDocument","useOnClickOutside","debouncedSpeak","useDebounce","speak","announce","options","length","sprintf","_n","__","useLayoutEffect","jsxs","Fragment","focusOnMount","onClose","placement","anchor","ref","createPortal","VisuallyHidden","body","handler","useEffect","listener","event","contains","target","document","addEventListener","removeEventListener"],"sources":["@wordpress/components/src/autocomplete/autocompleter-ui.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseRef,\n\tuseEffect,\n\tuseState,\n} from '@wordpress/element';\nimport { useAnchor } from '@wordpress/rich-text';\nimport { useDebounce, useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { __, _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport getDefaultUseItems from './get-default-use-items';\nimport Button from '../button';\nimport Popover from '../popover';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { createPortal } from 'react-dom';\nimport type { AutocompleterUIProps, KeyedOption, WPCompleter } from './types';\n\ntype ListBoxProps = {\n\titems: KeyedOption[];\n\tonSelect: ( option: KeyedOption ) => void;\n\tselectedIndex: number;\n\tinstanceId: number;\n\tlistBoxId: string | undefined;\n\tclassName?: string;\n\tComponent?: React.ElementType;\n};\n\nfunction ListBox( {\n\titems,\n\tonSelect,\n\tselectedIndex,\n\tinstanceId,\n\tlistBoxId,\n\tclassName,\n\tComponent = 'div',\n}: ListBoxProps ) {\n\treturn (\n\t\t<Component\n\t\t\tid={ listBoxId }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"components-autocomplete__results\"\n\t\t>\n\t\t\t{ items.map( ( option, index ) => (\n\t\t\t\t<Button\n\t\t\t\t\tkey={ option.key }\n\t\t\t\t\tid={ `components-autocomplete-item-${ instanceId }-${ option.key }` }\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\taria-selected={ index === selectedIndex }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ option.isDisabled }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-autocomplete__result',\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Unused, for backwards compatibility.\n\t\t\t\t\t\t\t'is-selected': index === selectedIndex,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tvariant={ index === selectedIndex ? 'primary' : undefined }\n\t\t\t\t\tonClick={ () => onSelect( option ) }\n\t\t\t\t>\n\t\t\t\t\t{ option.label }\n\t\t\t\t</Button>\n\t\t\t) ) }\n\t\t</Component>\n\t);\n}\n\nexport function getAutoCompleterUI( autocompleter: WPCompleter ) {\n\tconst useItems =\n\t\tautocompleter.useItems ?? getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tinstanceId,\n\t\tlistBoxId,\n\t\tclassName,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tonReset,\n\t\treset,\n\t\tcontentRef,\n\t}: AutocompleterUIProps ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst popoverAnchor = useAnchor( {\n\t\t\teditableContentElement: contentRef.current,\n\t\t} );\n\n\t\tconst [ needsA11yCompat, setNeedsA11yCompat ] = useState( false );\n\t\tconst popoverRef = useRef< HTMLElement >( null );\n\t\tconst popoverRefs = useMergeRefs( [\n\t\t\tpopoverRef,\n\t\t\tuseRefEffect(\n\t\t\t\t( node ) => {\n\t\t\t\t\tif ( ! contentRef.current ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the popover is rendered in a different document than\n\t\t\t\t\t// the content, we need to duplicate the options list in the\n\t\t\t\t\t// content document so that it's available to the screen\n\t\t\t\t\t// readers, which check the DOM ID based aria-* attributes.\n\t\t\t\t\tsetNeedsA11yCompat(\n\t\t\t\t\t\tnode.ownerDocument !== contentRef.current.ownerDocument\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t[ contentRef ]\n\t\t\t),\n\t\t] );\n\n\t\tuseOnClickOutside( popoverRef, reset );\n\n\t\tconst debouncedSpeak = useDebounce( speak, 500 );\n\n\t\tfunction announce( options: Array< KeyedOption > ) {\n\t\t\tif ( ! debouncedSpeak ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !! options.length ) {\n\t\t\t\tif ( filterValue ) {\n\t\t\t\t\tdebouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tdebouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdebouncedSpeak( __( 'No results.' ), 'assertive' );\n\t\t\t}\n\t\t}\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tannounce( items );\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t}, [ items ] );\n\n\t\tif ( items.length === 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Popover\n\t\t\t\t\tfocusOnMount={ false }\n\t\t\t\t\tonClose={ onReset }\n\t\t\t\t\tplacement=\"top-start\"\n\t\t\t\t\tclassName=\"components-autocomplete__popover\"\n\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\tref={ popoverRefs }\n\t\t\t\t>\n\t\t\t\t\t<ListBox\n\t\t\t\t\t\titems={ items }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t/>\n\t\t\t\t</Popover>\n\t\t\t\t{ contentRef.current &&\n\t\t\t\t\tneedsA11yCompat &&\n\t\t\t\t\tcreatePortal(\n\t\t\t\t\t\t<ListBox\n\t\t\t\t\t\t\titems={ items }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tComponent={ VisuallyHidden }\n\t\t\t\t\t\t/>,\n\t\t\t\t\t\tcontentRef.current.ownerDocument.body\n\t\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nfunction useOnClickOutside(\n\tref: React.RefObject< HTMLElement >,\n\thandler: AutocompleterUIProps[ 'reset' ]\n) {\n\tuseEffect( () => {\n\t\tconst listener = ( event: MouseEvent | TouchEvent ) => {\n\t\t\t// Do nothing if clicking ref's element or descendent elements, or if the ref is not referencing an element\n\t\t\tif (\n\t\t\t\t! ref.current ||\n\t\t\t\tref.current.contains( event.target as Node )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\thandler( event );\n\t\t};\n\t\tdocument.addEventListener( 'mousedown', listener );\n\t\tdocument.addEventListener( 'touchstart', listener );\n\t\treturn () => {\n\t\t\tdocument.removeEventListener( 'mousedown', listener );\n\t\t\tdocument.removeEventListener( 'touchstart', listener );\n\t\t};\n\t}, [ handler, ref ] );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAMA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAKA,IAAAM,mBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,OAAA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AY,eACX,IAAAtE,WAAA,CAAAS,GAAA,EAACR,OAAO;QACPC,KAAK,EAAGA,KAAO;QACfC,QAAQ,EAAGA,QAAU;QACrBC,aAAa,EAAGA,aAAe;QAC/BC,UAAU,EAAGA,UAAY;QACzBC,SAAS,EAAGA,SAAW;QACvBC,SAAS,EAAGA,SAAW;QACvBC,SAAS,EAAG+D;MAAgB,CAC5B,CAAC,EACFlC,UAAU,CAACI,OAAO,CAACU,aAAa,CAACqB,IAClC,CAAC;IAAA,CACD,CAAC;EAEL;EAEA,OAAOxC,eAAe;AACvB;AAEA,SAASoB,iBAAiBA,CACzBiB,GAAmC,EACnCI,OAAwC,EACvC;EACD,IAAAC,kBAAS,EAAE,MAAM;IAChB,MAAMC,QAAQ,GAAKC,KAA8B,IAAM;MACtD;MACA,IACC,CAAEP,GAAG,CAAC5B,OAAO,IACb4B,GAAG,CAAC5B,OAAO,CAACoC,QAAQ,CAAED,KAAK,CAACE,MAAe,CAAC,EAC3C;QACD;MACD;MACAL,OAAO,CAAEG,KAAM,CAAC;IACjB,CAAC;IACDG,QAAQ,CAACC,gBAAgB,CAAE,WAAW,EAAEL,QAAS,CAAC;IAClDI,QAAQ,CAACC,gBAAgB,CAAE,YAAY,EAAEL,QAAS,CAAC;IACnD,OAAO,MAAM;MACZI,QAAQ,CAACE,mBAAmB,CAAE,WAAW,EAAEN,QAAS,CAAC;MACrDI,QAAQ,CAACE,mBAAmB,CAAE,YAAY,EAAEN,QAAS,CAAC;IACvD,CAAC;EACF,CAAC,EAAE,CAAEF,OAAO,EAAEJ,GAAG,CAAG,CAAC;AACtB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_richText","_compose","_a11y","_i18n","_getDefaultUseItems","_button","_popover","_visuallyHidden","_reactDom","_jsxRuntime","ListBox","items","onSelect","selectedIndex","instanceId","listBoxId","className","Component","jsx","id","role","children","map","option","index","default","key","__next40pxDefaultSize","accessibleWhenDisabled","disabled","isDisabled","clsx","variant","undefined","onClick","label","getAutoCompleterUI","autocompleter","_autocompleter$useIte","useItems","getDefaultUseItems","AutocompleterUI","filterValue","onChangeOptions","onReset","reset","contentRef","popoverAnchor","useAnchor","editableContentElement","current","needsA11yCompat","setNeedsA11yCompat","useState","popoverRef","useRef","popoverRefs","useMergeRefs","useRefEffect","node","ownerDocument","useOnClickOutside","debouncedSpeak","useDebounce","speak","announce","options","length","sprintf","_n","__","useLayoutEffect","jsxs","Fragment","focusOnMount","onClose","placement","anchor","ref","createPortal","VisuallyHidden","body","handler","useEffect","listener","event","contains","target","document","addEventListener","removeEventListener"],"sources":["@wordpress/components/src/autocomplete/autocompleter-ui.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseRef,\n\tuseEffect,\n\tuseState,\n} from '@wordpress/element';\nimport { useAnchor } from '@wordpress/rich-text';\nimport { useDebounce, useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { __, _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport getDefaultUseItems from './get-default-use-items';\nimport Button from '../button';\nimport Popover from '../popover';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { createPortal } from 'react-dom';\nimport type { AutocompleterUIProps, KeyedOption, WPCompleter } from './types';\n\ntype ListBoxProps = {\n\titems: KeyedOption[];\n\tonSelect: ( option: KeyedOption ) => void;\n\tselectedIndex: number;\n\tinstanceId: number;\n\tlistBoxId: string | undefined;\n\tclassName?: string;\n\tComponent?: React.ElementType;\n};\n\nfunction ListBox( {\n\titems,\n\tonSelect,\n\tselectedIndex,\n\tinstanceId,\n\tlistBoxId,\n\tclassName,\n\tComponent = 'div',\n}: ListBoxProps ) {\n\treturn (\n\t\t<Component\n\t\t\tid={ listBoxId }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"components-autocomplete__results\"\n\t\t>\n\t\t\t{ items.map( ( option, index ) => (\n\t\t\t\t<Button\n\t\t\t\t\tkey={ option.key }\n\t\t\t\t\tid={ `components-autocomplete-item-${ instanceId }-${ option.key }` }\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\taria-selected={ index === selectedIndex }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ option.isDisabled }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-autocomplete__result',\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Unused, for backwards compatibility.\n\t\t\t\t\t\t\t'is-selected': index === selectedIndex,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tvariant={ index === selectedIndex ? 'primary' : undefined }\n\t\t\t\t\tonClick={ () => onSelect( option ) }\n\t\t\t\t>\n\t\t\t\t\t{ option.label }\n\t\t\t\t</Button>\n\t\t\t) ) }\n\t\t</Component>\n\t);\n}\n\nexport function getAutoCompleterUI( autocompleter: WPCompleter ) {\n\tconst useItems =\n\t\tautocompleter.useItems ?? getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tinstanceId,\n\t\tlistBoxId,\n\t\tclassName,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tonReset,\n\t\treset,\n\t\tcontentRef,\n\t}: AutocompleterUIProps ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst popoverAnchor = useAnchor( {\n\t\t\teditableContentElement: contentRef.current,\n\t\t} );\n\n\t\tconst [ needsA11yCompat, setNeedsA11yCompat ] = useState( false );\n\t\tconst popoverRef = useRef< HTMLElement >( null );\n\t\tconst popoverRefs = useMergeRefs( [\n\t\t\tpopoverRef,\n\t\t\tuseRefEffect(\n\t\t\t\t( node ) => {\n\t\t\t\t\tif ( ! contentRef.current ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the popover is rendered in a different document than\n\t\t\t\t\t// the content, we need to duplicate the options list in the\n\t\t\t\t\t// content document so that it's available to the screen\n\t\t\t\t\t// readers, which check the DOM ID based aria-* attributes.\n\t\t\t\t\tsetNeedsA11yCompat(\n\t\t\t\t\t\tnode.ownerDocument !== contentRef.current.ownerDocument\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t[ contentRef ]\n\t\t\t),\n\t\t] );\n\n\t\tuseOnClickOutside( popoverRef, reset );\n\n\t\tconst debouncedSpeak = useDebounce( speak, 500 );\n\n\t\tfunction announce( options: Array< KeyedOption > ) {\n\t\t\tif ( ! debouncedSpeak ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !! options.length ) {\n\t\t\t\tif ( filterValue ) {\n\t\t\t\t\tdebouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tdebouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdebouncedSpeak( __( 'No results.' ), 'assertive' );\n\t\t\t}\n\t\t}\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tannounce( items );\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t}, [ items ] );\n\n\t\tif ( items.length === 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Popover\n\t\t\t\t\tfocusOnMount={ false }\n\t\t\t\t\tonClose={ onReset }\n\t\t\t\t\tplacement=\"top-start\"\n\t\t\t\t\tclassName=\"components-autocomplete__popover\"\n\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\tref={ popoverRefs }\n\t\t\t\t>\n\t\t\t\t\t<ListBox\n\t\t\t\t\t\titems={ items }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t/>\n\t\t\t\t</Popover>\n\t\t\t\t{ contentRef.current &&\n\t\t\t\t\tneedsA11yCompat &&\n\t\t\t\t\tcreatePortal(\n\t\t\t\t\t\t<ListBox\n\t\t\t\t\t\t\titems={ items }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tComponent={ VisuallyHidden }\n\t\t\t\t\t\t/>,\n\t\t\t\t\t\tcontentRef.current.ownerDocument.body\n\t\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nfunction useOnClickOutside(\n\tref: React.RefObject< HTMLElement >,\n\thandler: AutocompleterUIProps[ 'reset' ]\n) {\n\tuseEffect( () => {\n\t\tconst listener = ( event: MouseEvent | TouchEvent ) => {\n\t\t\t// Do nothing if clicking ref's element or descendent elements, or if the ref is not referencing an element\n\t\t\tif (\n\t\t\t\t! ref.current ||\n\t\t\t\tref.current.contains( event.target as Node )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\thandler( event );\n\t\t};\n\t\tdocument.addEventListener( 'mousedown', listener );\n\t\tdocument.addEventListener( 'touchstart', listener );\n\t\treturn () => {\n\t\t\tdocument.removeEventListener( 'mousedown', listener );\n\t\t\tdocument.removeEventListener( 'touchstart', listener );\n\t\t};\n\t}, [ handler, ref ] );\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAMA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAKA,IAAAM,mBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,OAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,QAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAAyC,IAAAW,WAAA,GAAAX,OAAA;AA1BzC;AACA;AACA;;AAGA;AACA;AACA;;AAYA;AACA;AACA;;AAkBA,SAASY,OAAOA,CAAE;EACjBC,KAAK;EACLC,QAAQ;EACRC,aAAa;EACbC,UAAU;EACVC,SAAS;EACTC,SAAS;EACTC,SAAS,GAAG;AACC,CAAC,EAAG;EACjB,oBACC,IAAAR,WAAA,CAAAS,GAAA,EAACD,SAAS;IACTE,EAAE,EAAGJ,SAAW;IAChBK,IAAI,EAAC,SAAS;IACdJ,SAAS,EAAC,kCAAkC;IAAAK,QAAA,EAE1CV,KAAK,CAACW,GAAG,CAA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B,GAAG,CAAC5B,OAAO,CAACoC,QAAQ,CAAED,KAAK,CAACE,MAAe,CAAC,EAC3C;QACD;MACD;MACAL,OAAO,CAAEG,KAAM,CAAC;IACjB,CAAC;IACDG,QAAQ,CAACC,gBAAgB,CAAE,WAAW,EAAEL,QAAS,CAAC;IAClDI,QAAQ,CAACC,gBAAgB,CAAE,YAAY,EAAEL,QAAS,CAAC;IACnD,OAAO,MAAM;MACZI,QAAQ,CAACE,mBAAmB,CAAE,WAAW,EAAEN,QAAS,CAAC;MACrDI,QAAQ,CAACE,mBAAmB,CAAE,YAAY,EAAEN,QAAS,CAAC;IACvD,CAAC;EACF,CAAC,EAAE,CAAEF,OAAO,EAAEJ,GAAG,CAAG,CAAC;AACtB","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_element","_i18n","_compose","_backgroundView","_interopRequireDefault","_getDefaultUseItems","_style","_icon","_autocompletionItems","_jsxRuntime","compose","stylesCompose","StyleSheet","getAutoCompleterUI","autocompleter","useItems","getDefaultUseItems","AutocompleterUI","filterValue","selectedIndex","onChangeOptions","onSelect","value","reset","items","filteredItems","filter","item","isDisabled","scrollViewRef","useRef","animationValue","Animated","Value","current","isVisible","setIsVisible","useState","text","useEffect","length","useLayoutEffect","scrollTo","x","animated","startAnimation","activeItemStyles","usePreferredColorSchemeStyle","styles","iconStyles","activeIconStyles","textStyles","activeTextStyles","useCallback","show","timing","toValue","duration","useNativeDriver","start","finished","contentStyles","transform","translateY","interpolate","inputRange","outputRange","height","jsx","__unstableAutocompletionItemsFill","children","View","style","default","ScrollView","testID","ref","horizontal","contentContainerStyle","showsHorizontalScrollIndicator","keyboardShouldPersistTaps","accessibilityLabel","__","map","option","index","isActive","itemStyle","textStyle","iconStyle","iconSource","icon","src","jsxs","TouchableOpacity","activeOpacity","onPress","sprintf","title","size","Text","_default","exports"],"sources":["@wordpress/components/src/autocomplete/autocompleter-ui.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tView,\n\tAnimated,\n\tStyleSheet,\n\tText,\n\tTouchableOpacity,\n\tScrollView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tuseCallback,\n} from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackgroundView from './background-view';\nimport getDefaultUseItems from './get-default-use-items';\nimport styles from './style.scss';\nimport Icon from '../icon';\nimport { __unstableAutocompletionItemsFill as AutocompletionItemsFill } from '../mobile/autocompletion-items';\n\nconst { compose: stylesCompose } = StyleSheet;\n\nexport function getAutoCompleterUI( autocompleter ) {\n\tconst useItems = autocompleter.useItems\n\t\t? autocompleter.useItems\n\t\t: getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tvalue,\n\t\treset,\n\t} ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst filteredItems = items.filter( ( item ) => ! item.isDisabled );\n\t\tconst scrollViewRef = useRef();\n\t\tconst animationValue = useRef( new Animated.Value( 0 ) ).current;\n\t\tconst [ isVisible, setIsVisible ] = useState( false );\n\t\tconst { text } = value;\n\n\t\tuseEffect( () => {\n\t\t\tif ( ! isVisible && text.length > 0 ) {\n\t\t\t\tsetIsVisible( true );\n\t\t\t}\n\t\t}, [ isVisible, text ] );\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tscrollViewRef.current?.scrollTo( { x: 0, animated: false } );\n\n\t\t\tif ( isVisible && text.length > 0 ) {\n\t\t\t\tstartAnimation( true );\n\t\t\t} else if ( isVisible && text.length === 0 ) {\n\t\t\t\tstartAnimation( false );\n\t\t\t}\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t}, [ items, isVisible, text ] );\n\n\t\tconst activeItemStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__item-active' ],\n\t\t\tstyles[ 'components-autocomplete__item-active-dark' ]\n\t\t);\n\n\t\tconst iconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst activeIconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon-active ' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst textStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text' ],\n\t\t\tstyles[ 'components-autocomplete__text-dark' ]\n\t\t);\n\n\t\tconst activeTextStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text-active' ],\n\t\t\tstyles[ 'components-autocomplete__text-active-dark' ]\n\t\t);\n\n\t\tconst startAnimation = useCallback(\n\t\t\t( show ) => {\n\t\t\t\tAnimated.timing( animationValue, {\n\t\t\t\t\ttoValue: show ? 1 : 0,\n\t\t\t\t\tduration: show ? 200 : 100,\n\t\t\t\t\tuseNativeDriver: true,\n\t\t\t\t} ).start( ( { finished } ) => {\n\t\t\t\t\tif ( finished && ! show && isVisible ) {\n\t\t\t\t\t\tsetIsVisible( false );\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t\t[ isVisible ]\n\t\t);\n\n\t\tconst contentStyles = {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateY: animationValue.interpolate( {\n\t\t\t\t\t\tinputRange: [ 0, 1 ],\n\t\t\t\t\t\toutputRange: [\n\t\t\t\t\t\t\tstyles[ 'components-autocomplete' ].height,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t],\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\n\t\tif ( ! filteredItems.length > 0 || ! isVisible ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<AutocompletionItemsFill>\n\t\t\t\t<View style={ styles[ 'components-autocomplete' ] }>\n\t\t\t\t\t<Animated.View style={ contentStyles }>\n\t\t\t\t\t\t<BackgroundView>\n\t\t\t\t\t\t\t<ScrollView\n\t\t\t\t\t\t\t\ttestID=\"autocompleter\"\n\t\t\t\t\t\t\t\tref={ scrollViewRef }\n\t\t\t\t\t\t\t\thorizontal\n\t\t\t\t\t\t\t\tcontentContainerStyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'components-autocomplete__content' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\t\t\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\t\t\t\t\t\taccessibilityLabel={\n\t\t\t\t\t\t\t\t\t// translators: Slash inserter autocomplete results\n\t\t\t\t\t\t\t\t\t__( 'Slash inserter results' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ filteredItems.map( ( option, index ) => {\n\t\t\t\t\t\t\t\t\tconst isActive = index === selectedIndex;\n\t\t\t\t\t\t\t\t\tconst itemStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__item'\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\tisActive && activeItemStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst textStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ttextStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeTextStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ticonStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeIconStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconSource =\n\t\t\t\t\t\t\t\t\t\toption?.value?.icon?.src ||\n\t\t\t\t\t\t\t\t\t\toption?.value?.icon;\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\t\t\tactiveOpacity={ 0.5 }\n\t\t\t\t\t\t\t\t\t\t\tstyle={ itemStyle }\n\t\t\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\t\t\tonPress={ () => onSelect( option ) }\n\t\t\t\t\t\t\t\t\t\t\taccessibilityLabel={ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t// translators: %s: Block name e.g. \"Image block\"\n\t\t\t\t\t\t\t\t\t\t\t\t__( '%s block' ),\n\t\t\t\t\t\t\t\t\t\t\t\toption?.value?.title\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__icon'\n\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ iconSource }\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t\t\t\t<Text style={ textStyle }>\n\t\t\t\t\t\t\t\t\t\t\t\t{ option?.value?.title }\n\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t</ScrollView>\n\t\t\t\t\t\t</BackgroundView>\n\t\t\t\t\t</Animated.View>\n\t\t\t\t</View>\n\t\t\t</AutocompletionItemsFill>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nexport default getAutoCompleterUI;\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAYA,IAAAC,QAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,eAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,KAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,oBAAA,GAAAT,OAAA;AAA8G,IAAAU,WAAA,GAAAV,OAAA;AAhC9G;AACA;AACA;;AAUA;AACA;AACA;;AAWA;AACA;AACA;;AAOA,MAAM;EAAEW,OAAO,EAAEC;AAAc,CAAC,GAAGC,uBAAU;AAEtC,SAASC,kBAAkBA,CAAEC,aAAa,EAAG;EACnD,MAAMC,QAAQ,GAAGD,aAAa,CAACC,QAAQ,GACpCD,aAAa,CAACC,QAAQ,GACtB,IAAAC,2BAAkB,EAAEF,aAAc,CAAC;EAEtC,SAASG,eAAeA,CAAE;IACzBC,WAAW;IACXC,aAAa;IACbC,eAAe;IACfC,QAAQ;IACRC,KAAK;IACLC;EACD,CAAC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,EAAEqE,IAAI,EAAEC,GAAG,IACxBR,MAAM,EAAE9D,KAAK,EAAEqE,IAAI;gBAEpB,oBACC,IAAAlF,WAAA,CAAAoF,IAAA,EAAC/F,YAAA,CAAAgG,gBAAgB;kBAChBC,aAAa,EAAG,GAAK;kBACrBvB,KAAK,EAAGe,SAAW;kBAEnBS,OAAO,EAAGA,CAAA,KAAM3E,QAAQ,CAAE+D,MAAO,CAAG;kBACpCH,kBAAkB,EAAG,IAAAgB,aAAO;kBAC3B;kBACA,IAAAf,QAAE,EAAE,UAAW,CAAC,EAChBE,MAAM,EAAE9D,KAAK,EAAE4E,KAChB,CAAG;kBAAA5B,QAAA,gBAEH,IAAA7D,WAAA,CAAA2D,GAAA,EAACtE,YAAA,CAAAyE,IAAI;oBACJC,KAAK,EACJxB,cAAM,CACL,+BAA+B,CAEhC;oBAAAsB,QAAA,eAED,IAAA7D,WAAA,CAAA2D,GAAA,EAAC7D,KAAA,CAAAkE,OAAI;sBACJkB,IAAI,EAAGD,UAAY;sBACnBS,IAAI,EAAG,EAAI;sBACX3B,KAAK,EAAGiB;oBAAW,CACnB;kBAAC,CACG,CAAC,eACP,IAAAhF,WAAA,CAAA2D,GAAA,EAACtE,YAAA,CAAAsG,IAAI;oBAAC5B,KAAK,EAAGgB,SAAW;oBAAAlB,QAAA,EACtBc,MAAM,EAAE9D,KAAK,EAAE4E;kBAAK,CACjB,CAAC;gBAAA,GAvBDb,KAwBW,CAAC;cAErB,CAAE;YAAC,CACQ;UAAC,CACE;QAAC,CACH;MAAC,CACX;IAAC,CACiB,CAAC;EAE5B;EAEA,OAAOpE,eAAe;AACvB;AAAC,IAAAoF,QAAA,GAAAC,OAAA,CAAA7B,OAAA,GAEc5D,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_element","_i18n","_compose","_backgroundView","_interopRequireDefault","_getDefaultUseItems","_style","_icon","_autocompletionItems","_jsxRuntime","compose","stylesCompose","StyleSheet","getAutoCompleterUI","autocompleter","useItems","getDefaultUseItems","AutocompleterUI","filterValue","selectedIndex","onChangeOptions","onSelect","value","reset","items","filteredItems","filter","item","isDisabled","scrollViewRef","useRef","animationValue","Animated","Value","current","isVisible","setIsVisible","useState","text","useEffect","length","useLayoutEffect","scrollTo","x","animated","startAnimation","activeItemStyles","usePreferredColorSchemeStyle","styles","iconStyles","activeIconStyles","textStyles","activeTextStyles","useCallback","show","timing","toValue","duration","useNativeDriver","start","finished","contentStyles","transform","translateY","interpolate","inputRange","outputRange","height","jsx","__unstableAutocompletionItemsFill","children","View","style","default","ScrollView","testID","ref","horizontal","contentContainerStyle","showsHorizontalScrollIndicator","keyboardShouldPersistTaps","accessibilityLabel","__","map","option","index","isActive","itemStyle","textStyle","iconStyle","iconSource","icon","src","jsxs","TouchableOpacity","activeOpacity","onPress","sprintf","title","size","Text","_default","exports"],"sources":["@wordpress/components/src/autocomplete/autocompleter-ui.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tView,\n\tAnimated,\n\tStyleSheet,\n\tText,\n\tTouchableOpacity,\n\tScrollView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tuseCallback,\n} from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackgroundView from './background-view';\nimport getDefaultUseItems from './get-default-use-items';\nimport styles from './style.scss';\nimport Icon from '../icon';\nimport { __unstableAutocompletionItemsFill as AutocompletionItemsFill } from '../mobile/autocompletion-items';\n\nconst { compose: stylesCompose } = StyleSheet;\n\nexport function getAutoCompleterUI( autocompleter ) {\n\tconst useItems = autocompleter.useItems\n\t\t? autocompleter.useItems\n\t\t: getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tvalue,\n\t\treset,\n\t} ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst filteredItems = items.filter( ( item ) => ! item.isDisabled );\n\t\tconst scrollViewRef = useRef();\n\t\tconst animationValue = useRef( new Animated.Value( 0 ) ).current;\n\t\tconst [ isVisible, setIsVisible ] = useState( false );\n\t\tconst { text } = value;\n\n\t\tuseEffect( () => {\n\t\t\tif ( ! isVisible && text.length > 0 ) {\n\t\t\t\tsetIsVisible( true );\n\t\t\t}\n\t\t}, [ isVisible, text ] );\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tscrollViewRef.current?.scrollTo( { x: 0, animated: false } );\n\n\t\t\tif ( isVisible && text.length > 0 ) {\n\t\t\t\tstartAnimation( true );\n\t\t\t} else if ( isVisible && text.length === 0 ) {\n\t\t\t\tstartAnimation( false );\n\t\t\t}\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t}, [ items, isVisible, text ] );\n\n\t\tconst activeItemStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__item-active' ],\n\t\t\tstyles[ 'components-autocomplete__item-active-dark' ]\n\t\t);\n\n\t\tconst iconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst activeIconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon-active ' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst textStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text' ],\n\t\t\tstyles[ 'components-autocomplete__text-dark' ]\n\t\t);\n\n\t\tconst activeTextStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text-active' ],\n\t\t\tstyles[ 'components-autocomplete__text-active-dark' ]\n\t\t);\n\n\t\tconst startAnimation = useCallback(\n\t\t\t( show ) => {\n\t\t\t\tAnimated.timing( animationValue, {\n\t\t\t\t\ttoValue: show ? 1 : 0,\n\t\t\t\t\tduration: show ? 200 : 100,\n\t\t\t\t\tuseNativeDriver: true,\n\t\t\t\t} ).start( ( { finished } ) => {\n\t\t\t\t\tif ( finished && ! show && isVisible ) {\n\t\t\t\t\t\tsetIsVisible( false );\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t\t[ isVisible ]\n\t\t);\n\n\t\tconst contentStyles = {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateY: animationValue.interpolate( {\n\t\t\t\t\t\tinputRange: [ 0, 1 ],\n\t\t\t\t\t\toutputRange: [\n\t\t\t\t\t\t\tstyles[ 'components-autocomplete' ].height,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t],\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\n\t\tif ( ! filteredItems.length > 0 || ! isVisible ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<AutocompletionItemsFill>\n\t\t\t\t<View style={ styles[ 'components-autocomplete' ] }>\n\t\t\t\t\t<Animated.View style={ contentStyles }>\n\t\t\t\t\t\t<BackgroundView>\n\t\t\t\t\t\t\t<ScrollView\n\t\t\t\t\t\t\t\ttestID=\"autocompleter\"\n\t\t\t\t\t\t\t\tref={ scrollViewRef }\n\t\t\t\t\t\t\t\thorizontal\n\t\t\t\t\t\t\t\tcontentContainerStyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'components-autocomplete__content' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\t\t\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\t\t\t\t\t\taccessibilityLabel={\n\t\t\t\t\t\t\t\t\t// translators: Slash inserter autocomplete results\n\t\t\t\t\t\t\t\t\t__( 'Slash inserter results' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ filteredItems.map( ( option, index ) => {\n\t\t\t\t\t\t\t\t\tconst isActive = index === selectedIndex;\n\t\t\t\t\t\t\t\t\tconst itemStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__item'\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\tisActive && activeItemStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst textStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ttextStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeTextStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ticonStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeIconStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconSource =\n\t\t\t\t\t\t\t\t\t\toption?.value?.icon?.src ||\n\t\t\t\t\t\t\t\t\t\toption?.value?.icon;\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\t\t\tactiveOpacity={ 0.5 }\n\t\t\t\t\t\t\t\t\t\t\tstyle={ itemStyle }\n\t\t\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\t\t\tonPress={ () => onSelect( option ) }\n\t\t\t\t\t\t\t\t\t\t\taccessibilityLabel={ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t// translators: %s: Block name e.g. \"Image block\"\n\t\t\t\t\t\t\t\t\t\t\t\t__( '%s block' ),\n\t\t\t\t\t\t\t\t\t\t\t\toption?.value?.title\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__icon'\n\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ iconSource }\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t\t\t\t<Text style={ textStyle }>\n\t\t\t\t\t\t\t\t\t\t\t\t{ option?.value?.title }\n\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t</ScrollView>\n\t\t\t\t\t\t</BackgroundView>\n\t\t\t\t\t</Animated.View>\n\t\t\t\t</View>\n\t\t\t</AutocompletionItemsFill>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nexport default getAutoCompleterUI;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAYA,IAAAC,QAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,eAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAF,sBAAA,C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2D,GAAA,EAACtE,YAAA,CAAAsG,IAAI;oBAAC5B,KAAK,EAAGgB,SAAW;oBAAAlB,QAAA,EACtBc,MAAM,EAAE9D,KAAK,EAAE4E;kBAAK,CACjB,CAAC;gBAAA,GAvBDb,KAwBW,CAAC;cAErB,CAAE;YAAC,CACQ;UAAC,CACE;QAAC,CACH;MAAC,CACX;IAAC,CACiB,CAAC;EAE5B;EAEA,OAAOpE,eAAe;AACvB;AAAC,IAAAoF,QAAA,GAAAC,OAAA,CAAA7B,OAAA,GAEc5D,kBAAkB","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_removeAccents","_interopRequireDefault","require","_compose","_element","_strings","filterOptions","search","options","maxResults","filtered","i","length","option","keywords","label","isMatch","some","keyword","test","removeAccents","push","getDefaultUseItems","autocompleter","filterValue","items","setItems","useState","useLayoutEffect","isDebounced","loadOptions","debounce","promise","Promise","resolve","then","optionsData","canceled","keyedOptions","map","optionData","optionIndex","key","name","value","getOptionLabel","getOptionKeywords","isDisabled","isOptionDisabled","RegExp","escapeRegExp","cancel"],"sources":["@wordpress/components/src/autocomplete/get-default-use-items.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { debounce } from '@wordpress/compose';\nimport { useLayoutEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { escapeRegExp } from '../utils/strings';\nimport type { CancelablePromise, KeyedOption, WPCompleter } from './types';\n\nfunction filterOptions(\n\tsearch: RegExp,\n\toptions: Array< KeyedOption > = [],\n\tmaxResults = 10\n) {\n\tconst filtered = [];\n\tfor ( let i = 0; i < options.length; i++ ) {\n\t\tconst option = options[ i ];\n\n\t\t// Merge label into keywords.\n\t\tlet { keywords = [] } = option;\n\t\tif ( 'string' === typeof option.label ) {\n\t\t\tkeywords = [ ...keywords, option.label ];\n\t\t}\n\n\t\tconst isMatch = keywords.some( ( keyword ) =>\n\t\t\tsearch.test( removeAccents( keyword ) )\n\t\t);\n\t\tif ( ! isMatch ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfiltered.push( option );\n\n\t\t// Abort early if max reached.\n\t\tif ( filtered.length === maxResults ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn filtered;\n}\n\nexport default function getDefaultUseItems( autocompleter: WPCompleter ) {\n\treturn ( filterValue: string ) => {\n\t\tconst [ items, setItems ] = useState< Array< KeyedOption > >( [] );\n\t\t/*\n\t\t * We support both synchronous and asynchronous retrieval of completer options\n\t\t * but internally treat all as async so we maintain a single, consistent code path.\n\t\t *\n\t\t * Because networks can be slow, and the internet is wonderfully unpredictable,\n\t\t * we don't want two promises updating the state at once. This ensures that only\n\t\t * the most recent promise will act on `optionsData`. This doesn't use the state\n\t\t * because `setState` is batched, and so there's no guarantee that setting\n\t\t * `activePromise` in the state would result in it actually being in `this.state`\n\t\t * before the promise resolves and we check to see if this is the active promise or not.\n\t\t */\n\t\tuseLayoutEffect( () => {\n\t\t\tconst { options, isDebounced } = autocompleter;\n\t\t\tconst loadOptions = debounce(\n\t\t\t\t() => {\n\t\t\t\t\tconst promise: CancelablePromise = Promise.resolve(\n\t\t\t\t\t\ttypeof options === 'function'\n\t\t\t\t\t\t\t? options( filterValue )\n\t\t\t\t\t\t\t: options\n\t\t\t\t\t).then( ( optionsData ) => {\n\t\t\t\t\t\tif ( promise.canceled ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst keyedOptions = optionsData.map(\n\t\t\t\t\t\t\t( optionData, optionIndex ) => ( {\n\t\t\t\t\t\t\t\tkey: `${ autocompleter.name }-${ optionIndex }`,\n\t\t\t\t\t\t\t\tvalue: optionData,\n\t\t\t\t\t\t\t\tlabel: autocompleter.getOptionLabel(\n\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tkeywords: autocompleter.getOptionKeywords\n\t\t\t\t\t\t\t\t\t? autocompleter.getOptionKeywords(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: [],\n\t\t\t\t\t\t\t\tisDisabled: autocompleter.isOptionDisabled\n\t\t\t\t\t\t\t\t\t? autocompleter.isOptionDisabled(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: false,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Create a regular expression to filter the options.\n\t\t\t\t\t\tconst search = new RegExp(\n\t\t\t\t\t\t\t'(?:\\\\b|\\\\s|^)' + escapeRegExp( filterValue ),\n\t\t\t\t\t\t\t'i'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsetItems( filterOptions( search, keyedOptions ) );\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn promise;\n\t\t\t\t},\n\t\t\t\tisDebounced ? 250 : 0\n\t\t\t);\n\n\t\t\tconst promise = loadOptions();\n\n\t\t\treturn () => {\n\t\t\t\tloadOptions.cancel();\n\t\t\t\tif ( promise ) {\n\t\t\t\t\tpromise.canceled = true;\n\t\t\t\t}\n\t\t\t};\n\t\t}, [ filterValue ] );\n\n\t\treturn [ items ] as const;\n\t};\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,SAASI,aAAaA,CACrBC,MAAc,EACdC,OAA6B,GAAG,EAAE,EAClCC,UAAU,GAAG,EAAE,EACd;EACD,MAAMC,QAAQ,GA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,QAAQ,EAAG;YACvB;UACD;UACA,MAAMC,YAAY,GAAGF,WAAW,CAACG,GAAG,CACnC,CAAEC,UAAU,EAAEC,WAAW,MAAQ;YAChCC,GAAG,EAAE,GAAInB,aAAa,CAACoB,IAAI,IAAMF,WAAW,EAAG;YAC/CG,KAAK,EAAEJ,UAAU;YACjBzB,KAAK,EAAEQ,aAAa,CAACsB,cAAc,CAClCL,UACD,CAAC;YACD1B,QAAQ,EAAES,aAAa,CAACuB,iBAAiB,GACtCvB,aAAa,CAACuB,iBAAiB,CAC/BN,UACA,CAAC,GACD,EAAE;YACLO,UAAU,EAAExB,aAAa,CAACyB,gBAAgB,GACvCzB,aAAa,CAACyB,gBAAgB,CAC9BR,UACA,CAAC,GACD;UACJ,CAAC,CACF,CAAC;;UAED;UACA,MAAMjC,MAAM,GAAG,IAAI0C,MAAM,CACxB,eAAe,GAAG,IAAAC,qBAAY,EAAE1B,WAAY,CAAC,EAC7C,GACD,CAAC;UACDE,QAAQ,CAAEpB,aAAa,CAAEC,MAAM,EAAE+B,YAAa,CAAE,CAAC;QAClD,CAAE,CAAC;QAEH,OAAON,OAAO;MACf,CAAC,EACDH,WAAW,GAAG,GAAG,GAAG,CACrB,CAAC;MAED,MAAMG,OAAO,GAAGF,WAAW,CAAC,CAAC;MAE7B,OAAO,MAAM;QACZA,WAAW,CAACqB,MAAM,CAAC,CAAC;QACpB,IAAKnB,OAAO,EAAG;UACdA,OAAO,CAACK,QAAQ,GAAG,IAAI;QACxB;MACD,CAAC;IACF,CAAC,EAAE,CAAEb,WAAW,CAAG,CAAC;IAEpB,OAAO,CAAEC,KAAK,CAAE;EACjB,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_removeAccents","_interopRequireDefault","require","_compose","_element","_strings","filterOptions","search","options","maxResults","filtered","i","length","option","keywords","label","isMatch","some","keyword","test","removeAccents","push","getDefaultUseItems","autocompleter","filterValue","items","setItems","useState","useLayoutEffect","isDebounced","loadOptions","debounce","promise","Promise","resolve","then","optionsData","canceled","keyedOptions","map","optionData","optionIndex","key","name","value","getOptionLabel","getOptionKeywords","isDisabled","isOptionDisabled","RegExp","escapeRegExp","cancel"],"sources":["@wordpress/components/src/autocomplete/get-default-use-items.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { debounce } from '@wordpress/compose';\nimport { useLayoutEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { escapeRegExp } from '../utils/strings';\nimport type { CancelablePromise, KeyedOption, WPCompleter } from './types';\n\nfunction filterOptions(\n\tsearch: RegExp,\n\toptions: Array< KeyedOption > = [],\n\tmaxResults = 10\n) {\n\tconst filtered = [];\n\tfor ( let i = 0; i < options.length; i++ ) {\n\t\tconst option = options[ i ];\n\n\t\t// Merge label into keywords.\n\t\tlet { keywords = [] } = option;\n\t\tif ( 'string' === typeof option.label ) {\n\t\t\tkeywords = [ ...keywords, option.label ];\n\t\t}\n\n\t\tconst isMatch = keywords.some( ( keyword ) =>\n\t\t\tsearch.test( removeAccents( keyword ) )\n\t\t);\n\t\tif ( ! isMatch ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfiltered.push( option );\n\n\t\t// Abort early if max reached.\n\t\tif ( filtered.length === maxResults ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn filtered;\n}\n\nexport default function getDefaultUseItems( autocompleter: WPCompleter ) {\n\treturn ( filterValue: string ) => {\n\t\tconst [ items, setItems ] = useState< Array< KeyedOption > >( [] );\n\t\t/*\n\t\t * We support both synchronous and asynchronous retrieval of completer options\n\t\t * but internally treat all as async so we maintain a single, consistent code path.\n\t\t *\n\t\t * Because networks can be slow, and the internet is wonderfully unpredictable,\n\t\t * we don't want two promises updating the state at once. This ensures that only\n\t\t * the most recent promise will act on `optionsData`. This doesn't use the state\n\t\t * because `setState` is batched, and so there's no guarantee that setting\n\t\t * `activePromise` in the state would result in it actually being in `this.state`\n\t\t * before the promise resolves and we check to see if this is the active promise or not.\n\t\t */\n\t\tuseLayoutEffect( () => {\n\t\t\tconst { options, isDebounced } = autocompleter;\n\t\t\tconst loadOptions = debounce(\n\t\t\t\t() => {\n\t\t\t\t\tconst promise: CancelablePromise = Promise.resolve(\n\t\t\t\t\t\ttypeof options === 'function'\n\t\t\t\t\t\t\t? options( filterValue )\n\t\t\t\t\t\t\t: options\n\t\t\t\t\t).then( ( optionsData ) => {\n\t\t\t\t\t\tif ( promise.canceled ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst keyedOptions = optionsData.map(\n\t\t\t\t\t\t\t( optionData, optionIndex ) => ( {\n\t\t\t\t\t\t\t\tkey: `${ autocompleter.name }-${ optionIndex }`,\n\t\t\t\t\t\t\t\tvalue: optionData,\n\t\t\t\t\t\t\t\tlabel: autocompleter.getOptionLabel(\n\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tkeywords: autocompleter.getOptionKeywords\n\t\t\t\t\t\t\t\t\t? autocompleter.getOptionKeywords(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: [],\n\t\t\t\t\t\t\t\tisDisabled: autocompleter.isOptionDisabled\n\t\t\t\t\t\t\t\t\t? autocompleter.isOptionDisabled(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: false,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Create a regular expression to filter the options.\n\t\t\t\t\t\tconst search = new RegExp(\n\t\t\t\t\t\t\t'(?:\\\\b|\\\\s|^)' + escapeRegExp( filterValue ),\n\t\t\t\t\t\t\t'i'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsetItems( filterOptions( search, keyedOptions ) );\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn promise;\n\t\t\t\t},\n\t\t\t\tisDebounced ? 250 : 0\n\t\t\t);\n\n\t\t\tconst promise = loadOptions();\n\n\t\t\treturn () => {\n\t\t\t\tloadOptions.cancel();\n\t\t\t\tif ( promise ) {\n\t\t\t\t\tpromise.canceled = true;\n\t\t\t\t}\n\t\t\t};\n\t\t}, [ filterValue ] );\n\n\t\treturn [ items ] as const;\n\t};\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,SAASI,aAAaA,CACrBC,MAAc,EACdC,OAA6B,GAAG,EAAE,EAClCC,UAAU,GAAG,EAAE,EACd;EACD,MAAMC,QAAQ,GAAG,EAAE;EACnB,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,OAAO,CAACI,MAAM,EAAED,CAAC,EAAE,EAAG;IAC1C,MAAME,MAAM,GAAGL,OAAO,CAAEG,CAAC,CAAE;;IAE3B;IACA,IAAI;MAAEG,QAAQ,GAAG;IAAG,CAAC,GAAGD,MAAM;IAC9B,IAAK,QAAQ,KAAK,OAAOA,MAAM,CAACE,KAAK,EAAG;MACvCD,QAAQ,GAAG,CAAE,GAAGA,QAAQ,EAAED,MAAM,CAACE,KAAK,CAAE;IACzC;IAEA,MAAMC,OAAO,GAAGF,QAAQ,CAACG,IAAI,CAAIC,OAAO,IACvCX,MAAM,CAACY,IAAI,CAAE,IAAAC,sBAAa,EAAEF,OAAQ,CAAE,CACvC,CAAC;IACD,IAAK,CAAEF,OAAO,EAAG;MAChB;IACD;IAEAN,QAAQ,CAACW,IAAI,CAAER,MAAO,CAAC;;IAEvB;IACA,IAAKH,QAAQ,CAACE,MAAM,KAAKH,UAAU,EAAG;MACrC;IACD;EACD;EAEA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AC;QAClD,CAAE,CAAC;QAEH,OAAON,OAAO;MACf,CAAC,EACDH,WAAW,GAAG,GAAG,GAAG,CACrB,CAAC;MAED,MAAMG,OAAO,GAAGF,WAAW,CAAC,CAAC;MAE7B,OAAO,MAAM;QACZA,WAAW,CAACqB,MAAM,CAAC,CAAC;QACpB,IAAKnB,OAAO,EAAG;UACdA,OAAO,CAACK,QAAQ,GAAG,IAAI;QACxB;MACD,CAAC;IACF,CAAC,EAAE,CAAEb,WAAW,CAAG,CAAC;IAEpB,OAAO,CAAEC,KAAK,CAAE;EACjB,CAAC;AACF","ignoreList":[]}
@@ -64,7 +64,7 @@ const BorderBoxControlSplitControls = (props, forwardedRef) => {
64
64
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_grid.Grid, {
65
65
  ...otherProps,
66
66
  ref: mergedRef,
67
- gap: 4,
67
+ gap: 3,
68
68
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_borderBoxControlVisualizer.default, {
69
69
  value: value,
70
70
  size: size