@wordpress/components 27.6.0 → 28.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 (1734) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/build/alignment-matrix-control/cell.js +16 -12
  3. package/build/alignment-matrix-control/cell.js.map +1 -1
  4. package/build/alignment-matrix-control/icon.js +12 -11
  5. package/build/alignment-matrix-control/icon.js.map +1 -1
  6. package/build/alignment-matrix-control/index.js +18 -18
  7. package/build/alignment-matrix-control/index.js.map +1 -1
  8. package/build/angle-picker-control/angle-circle.js +14 -12
  9. package/build/angle-picker-control/angle-circle.js.map +1 -1
  10. package/build/angle-picker-control/index.js +30 -24
  11. package/build/angle-picker-control/index.js.map +1 -1
  12. package/build/animate/index.js +1 -1
  13. package/build/animate/index.js.map +1 -1
  14. package/build/autocomplete/autocompleter-ui.js +56 -30
  15. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  16. package/build/autocomplete/autocompleter-ui.native.js +50 -40
  17. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  18. package/build/autocomplete/background-view.android.js +5 -4
  19. package/build/autocomplete/background-view.android.js.map +1 -1
  20. package/build/autocomplete/background-view.ios.js +5 -4
  21. package/build/autocomplete/background-view.ios.js.map +1 -1
  22. package/build/autocomplete/index.js +5 -3
  23. package/build/autocomplete/index.js.map +1 -1
  24. package/build/base-control/index.js +33 -24
  25. package/build/base-control/index.js.map +1 -1
  26. package/build/base-control/index.native.js +9 -4
  27. package/build/base-control/index.native.js.map +1 -1
  28. package/build/border-box-control/border-box-control/component.js +49 -44
  29. package/build/border-box-control/border-box-control/component.js.map +1 -1
  30. package/build/border-box-control/border-box-control-linked-button/component.js +15 -13
  31. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  32. package/build/border-box-control/border-box-control-split-controls/component.js +39 -38
  33. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  34. package/build/border-box-control/border-box-control-visualizer/component.js +2 -2
  35. package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  36. package/build/border-control/border-control/component.js +56 -52
  37. package/build/border-control/border-control/component.js.map +1 -1
  38. package/build/border-control/border-control-dropdown/component.js +55 -43
  39. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  40. package/build/border-control/border-control-style-picker/component.js +9 -9
  41. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  42. package/build/box-control/all-input-control.js +30 -28
  43. package/build/box-control/all-input-control.js.map +1 -1
  44. package/build/box-control/axial-input-controls.js +45 -41
  45. package/build/box-control/axial-input-controls.js.map +1 -1
  46. package/build/box-control/icon.js +15 -12
  47. package/build/box-control/icon.js.map +1 -1
  48. package/build/box-control/index.js +31 -24
  49. package/build/box-control/index.js.map +1 -1
  50. package/build/box-control/input-controls.js +46 -43
  51. package/build/box-control/input-controls.js.map +1 -1
  52. package/build/box-control/linked-button.js +12 -11
  53. package/build/box-control/linked-button.js.map +1 -1
  54. package/build/button/deprecated.js +2 -2
  55. package/build/button/deprecated.js.map +1 -1
  56. package/build/button/index.js +34 -19
  57. package/build/button/index.js.map +1 -1
  58. package/build/button/index.native.js +27 -21
  59. package/build/button/index.native.js.map +1 -1
  60. package/build/button-group/index.js +2 -2
  61. package/build/button-group/index.js.map +1 -1
  62. package/build/card/card/component.js +22 -19
  63. package/build/card/card/component.js.map +1 -1
  64. package/build/card/card-body/component.js +3 -3
  65. package/build/card/card-body/component.js.map +1 -1
  66. package/build/card/card-divider/component.js +2 -2
  67. package/build/card/card-divider/component.js.map +1 -1
  68. package/build/card/card-footer/component.js +2 -2
  69. package/build/card/card-footer/component.js.map +1 -1
  70. package/build/card/card-header/component.js +2 -2
  71. package/build/card/card-header/component.js.map +1 -1
  72. package/build/card/card-media/component.js +2 -2
  73. package/build/card/card-media/component.js.map +1 -1
  74. package/build/checkbox-control/index.js +39 -34
  75. package/build/checkbox-control/index.js.map +1 -1
  76. package/build/circular-option-picker/circular-option-picker-actions.js +10 -8
  77. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  78. package/build/circular-option-picker/circular-option-picker-option-group.js +5 -4
  79. package/build/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
  80. package/build/circular-option-picker/circular-option-picker-option.js +16 -14
  81. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  82. package/build/circular-option-picker/circular-option-picker.js +36 -30
  83. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  84. package/build/clipboard-button/index.js +5 -4
  85. package/build/clipboard-button/index.js.map +1 -1
  86. package/build/color-control/index.native.js +2 -2
  87. package/build/color-control/index.native.js.map +1 -1
  88. package/build/color-indicator/index.js +2 -2
  89. package/build/color-indicator/index.js.map +1 -1
  90. package/build/color-indicator/index.native.js +39 -36
  91. package/build/color-indicator/index.native.js.map +1 -1
  92. package/build/color-palette/index.js +90 -82
  93. package/build/color-palette/index.js.map +1 -1
  94. package/build/color-palette/index.native.js +75 -65
  95. package/build/color-palette/index.native.js.map +1 -1
  96. package/build/color-picker/color-copy-button.js +10 -9
  97. package/build/color-picker/color-copy-button.js.map +1 -1
  98. package/build/color-picker/color-input.js +4 -4
  99. package/build/color-picker/color-input.js.map +1 -1
  100. package/build/color-picker/component.js +36 -30
  101. package/build/color-picker/component.js.map +1 -1
  102. package/build/color-picker/hex-input.js +6 -5
  103. package/build/color-picker/hex-input.js.map +1 -1
  104. package/build/color-picker/hsl-input.js +48 -46
  105. package/build/color-picker/hsl-input.js.map +1 -1
  106. package/build/color-picker/hsv-color-picker.native.js +32 -31
  107. package/build/color-picker/hsv-color-picker.native.js.map +1 -1
  108. package/build/color-picker/hue-picker.native.js +33 -31
  109. package/build/color-picker/hue-picker.native.js.map +1 -1
  110. package/build/color-picker/index.native.js +67 -54
  111. package/build/color-picker/index.native.js.map +1 -1
  112. package/build/color-picker/input-with-slider.js +33 -31
  113. package/build/color-picker/input-with-slider.js.map +1 -1
  114. package/build/color-picker/legacy-adapter.js +2 -2
  115. package/build/color-picker/legacy-adapter.js.map +1 -1
  116. package/build/color-picker/picker.js +2 -2
  117. package/build/color-picker/picker.js.map +1 -1
  118. package/build/color-picker/rgb-input.js +52 -50
  119. package/build/color-picker/rgb-input.js.map +1 -1
  120. package/build/color-picker/saturation-picker.native.js +44 -41
  121. package/build/color-picker/saturation-picker.native.js.map +1 -1
  122. package/build/combobox-control/index.js +67 -52
  123. package/build/combobox-control/index.js.map +1 -1
  124. package/build/combobox-control/types.js.map +1 -1
  125. package/build/composite/legacy/index.js +3 -3
  126. package/build/composite/legacy/index.js.map +1 -1
  127. package/build/confirm-dialog/component.js +35 -26
  128. package/build/confirm-dialog/component.js.map +1 -1
  129. package/build/context/context-connect.js +1 -1
  130. package/build/context/context-connect.js.map +1 -1
  131. package/build/context/context-system-provider.js +6 -5
  132. package/build/context/context-system-provider.js.map +1 -1
  133. package/build/context/use-context-system.js +1 -1
  134. package/build/context/use-context-system.js.map +1 -1
  135. package/build/css.d.js +6 -0
  136. package/build/css.d.js.map +1 -0
  137. package/build/custom-gradient-picker/gradient-bar/control-points.js +114 -107
  138. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  139. package/build/custom-gradient-picker/gradient-bar/index.js +49 -47
  140. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  141. package/build/custom-gradient-picker/index.js +31 -25
  142. package/build/custom-gradient-picker/index.js.map +1 -1
  143. package/build/custom-gradient-picker/index.native.js +23 -17
  144. package/build/custom-gradient-picker/index.native.js.map +1 -1
  145. package/build/custom-select-control/index.js +72 -59
  146. package/build/custom-select-control/index.js.map +1 -1
  147. package/build/custom-select-control-v2/custom-select.js +48 -35
  148. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  149. package/build/custom-select-control-v2/default-component/index.js +2 -2
  150. package/build/custom-select-control-v2/default-component/index.js.map +1 -1
  151. package/build/custom-select-control-v2/item.js +9 -6
  152. package/build/custom-select-control-v2/item.js.map +1 -1
  153. package/build/custom-select-control-v2/legacy-component/index.js +32 -44
  154. package/build/custom-select-control-v2/legacy-component/index.js.map +1 -1
  155. package/build/custom-select-control-v2/styles.js +9 -9
  156. package/build/custom-select-control-v2/styles.js.map +1 -1
  157. package/build/custom-select-control-v2/types.js.map +1 -1
  158. package/build/dashicon/index.js +2 -2
  159. package/build/dashicon/index.js.map +1 -1
  160. package/build/dashicon/index.native.js +3 -3
  161. package/build/dashicon/index.native.js.map +1 -1
  162. package/build/date-time/date/index.js +92 -85
  163. package/build/date-time/date/index.js.map +1 -1
  164. package/build/date-time/date-time/index.js +18 -15
  165. package/build/date-time/date-time/index.js.map +1 -1
  166. package/build/date-time/time/index.js +162 -135
  167. package/build/date-time/time/index.js.map +1 -1
  168. package/build/date-time/time/timezone.js +12 -10
  169. package/build/date-time/time/timezone.js.map +1 -1
  170. package/build/dimension-control/index.js +7 -5
  171. package/build/dimension-control/index.js.map +1 -1
  172. package/build/disabled/index.js +11 -9
  173. package/build/disabled/index.js.map +1 -1
  174. package/build/disabled/index.native.js +5 -4
  175. package/build/disabled/index.native.js.map +1 -1
  176. package/build/disclosure/index.js +5 -4
  177. package/build/disclosure/index.js.map +1 -1
  178. package/build/divider/component.js +3 -3
  179. package/build/divider/component.js.map +1 -1
  180. package/build/draggable/index.js +14 -11
  181. package/build/draggable/index.js.map +1 -1
  182. package/build/draggable/index.native.js +15 -11
  183. package/build/draggable/index.native.js.map +1 -1
  184. package/build/drop-zone/index.js +23 -17
  185. package/build/drop-zone/index.js.map +1 -1
  186. package/build/dropdown/dropdown-content-wrapper.js +2 -2
  187. package/build/dropdown/dropdown-content-wrapper.js.map +1 -1
  188. package/build/dropdown/index.js +21 -19
  189. package/build/dropdown/index.js.map +1 -1
  190. package/build/dropdown/index.native.js +4 -2
  191. package/build/dropdown/index.native.js.map +1 -1
  192. package/build/dropdown-menu/index.js +29 -27
  193. package/build/dropdown-menu/index.js.map +1 -1
  194. package/build/dropdown-menu/index.native.js +32 -29
  195. package/build/dropdown-menu/index.native.js.map +1 -1
  196. package/build/dropdown-menu-v2/index.js +108 -76
  197. package/build/dropdown-menu-v2/index.js.map +1 -1
  198. package/build/duotone-picker/color-list-picker/index.js +52 -46
  199. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  200. package/build/duotone-picker/custom-duotone-bar.js +2 -2
  201. package/build/duotone-picker/custom-duotone-bar.js.map +1 -1
  202. package/build/duotone-picker/duotone-picker.js +40 -38
  203. package/build/duotone-picker/duotone-picker.js.map +1 -1
  204. package/build/duotone-picker/duotone-swatch.js +3 -3
  205. package/build/duotone-picker/duotone-swatch.js.map +1 -1
  206. package/build/elevation/component.js +2 -2
  207. package/build/elevation/component.js.map +1 -1
  208. package/build/external-link/index.js +16 -11
  209. package/build/external-link/index.js.map +1 -1
  210. package/build/external-link/index.native.js +9 -6
  211. package/build/external-link/index.native.js.map +1 -1
  212. package/build/flex/flex/component.js +9 -7
  213. package/build/flex/flex/component.js.map +1 -1
  214. package/build/flex/flex-block/component.js +2 -2
  215. package/build/flex/flex-block/component.js.map +1 -1
  216. package/build/flex/flex-item/component.js +2 -2
  217. package/build/flex/flex-item/component.js.map +1 -1
  218. package/build/focal-point-picker/controls.js +20 -19
  219. package/build/focal-point-picker/controls.js.map +1 -1
  220. package/build/focal-point-picker/focal-point.js +3 -6
  221. package/build/focal-point-picker/focal-point.js.map +1 -1
  222. package/build/focal-point-picker/focal-point.native.js +11 -10
  223. package/build/focal-point-picker/focal-point.native.js.map +1 -1
  224. package/build/focal-point-picker/grid.js +21 -20
  225. package/build/focal-point-picker/grid.js.map +1 -1
  226. package/build/focal-point-picker/index.js +42 -39
  227. package/build/focal-point-picker/index.js.map +1 -1
  228. package/build/focal-point-picker/index.native.js +66 -62
  229. package/build/focal-point-picker/index.native.js.map +1 -1
  230. package/build/focal-point-picker/media.js +4 -4
  231. package/build/focal-point-picker/media.js.map +1 -1
  232. package/build/focal-point-picker/styles/focal-point-style.js +2 -7
  233. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  234. package/build/focal-point-picker/tooltip/index.native.js +32 -27
  235. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  236. package/build/focusable-iframe/index.js +2 -2
  237. package/build/focusable-iframe/index.js.map +1 -1
  238. package/build/font-size-picker/font-size-picker-select.js +2 -2
  239. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  240. package/build/font-size-picker/font-size-picker-toggle-group.js +10 -10
  241. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  242. package/build/font-size-picker/index.js +119 -103
  243. package/build/font-size-picker/index.js.map +1 -1
  244. package/build/font-size-picker/index.native.js +77 -64
  245. package/build/font-size-picker/index.native.js.map +1 -1
  246. package/build/footer-message-control/index.native.js +2 -2
  247. package/build/footer-message-control/index.native.js.map +1 -1
  248. package/build/form-file-upload/index.js +20 -18
  249. package/build/form-file-upload/index.js.map +1 -1
  250. package/build/form-toggle/index.js +18 -17
  251. package/build/form-toggle/index.js.map +1 -1
  252. package/build/form-token-field/index.js +59 -55
  253. package/build/form-token-field/index.js.map +1 -1
  254. package/build/form-token-field/suggestions-list.js +41 -38
  255. package/build/form-token-field/suggestions-list.js.map +1 -1
  256. package/build/form-token-field/token-input.js +2 -2
  257. package/build/form-token-field/token-input.js.map +1 -1
  258. package/build/form-token-field/token.js +22 -18
  259. package/build/form-token-field/token.js.map +1 -1
  260. package/build/gradient-picker/index.js +50 -47
  261. package/build/gradient-picker/index.js.map +1 -1
  262. package/build/grid/component.js +2 -2
  263. package/build/grid/component.js.map +1 -1
  264. package/build/guide/icons.js +9 -8
  265. package/build/guide/icons.js.map +1 -1
  266. package/build/guide/index.js +33 -26
  267. package/build/guide/index.js.map +1 -1
  268. package/build/guide/page-control.js +16 -17
  269. package/build/guide/page-control.js.map +1 -1
  270. package/build/guide/page.js +2 -2
  271. package/build/guide/page.js.map +1 -1
  272. package/build/h-stack/component.js +2 -2
  273. package/build/h-stack/component.js.map +1 -1
  274. package/build/h-stack/hook.js +3 -4
  275. package/build/h-stack/hook.js.map +1 -1
  276. package/build/heading/component.js +2 -2
  277. package/build/heading/component.js.map +1 -1
  278. package/build/higher-order/navigate-regions/index.js +7 -6
  279. package/build/higher-order/navigate-regions/index.js.map +1 -1
  280. package/build/higher-order/with-constrained-tabbing/index.js +8 -8
  281. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  282. package/build/higher-order/with-fallback-styles/index.js +6 -5
  283. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  284. package/build/higher-order/with-filters/index.js +2 -2
  285. package/build/higher-order/with-filters/index.js.map +1 -1
  286. package/build/higher-order/with-focus-outside/index.js +8 -7
  287. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  288. package/build/higher-order/with-focus-outside/index.native.js +8 -7
  289. package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
  290. package/build/higher-order/with-focus-return/index.js +8 -8
  291. package/build/higher-order/with-focus-return/index.js.map +1 -1
  292. package/build/higher-order/with-notices/index.js +4 -4
  293. package/build/higher-order/with-notices/index.js.map +1 -1
  294. package/build/higher-order/with-spoken-messages/index.js +2 -2
  295. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  296. package/build/icon/index.js +3 -2
  297. package/build/icon/index.js.map +1 -1
  298. package/build/index.js +7 -0
  299. package/build/index.js.map +1 -1
  300. package/build/index.native.js +0 -66
  301. package/build/index.native.js.map +1 -1
  302. package/build/input-control/backdrop.js +2 -2
  303. package/build/input-control/backdrop.js.map +1 -1
  304. package/build/input-control/index.js +36 -34
  305. package/build/input-control/index.js.map +1 -1
  306. package/build/input-control/input-base.js +36 -25
  307. package/build/input-control/input-base.js.map +1 -1
  308. package/build/input-control/input-field.js +4 -4
  309. package/build/input-control/input-field.js.map +1 -1
  310. package/build/input-control/input-prefix-wrapper.js +2 -2
  311. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  312. package/build/input-control/input-suffix-wrapper.js +2 -2
  313. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  314. package/build/input-control/label.js +12 -8
  315. package/build/input-control/label.js.map +1 -1
  316. package/build/input-control/styles/input-control-styles.js +27 -27
  317. package/build/input-control/styles/input-control-styles.js.map +1 -1
  318. package/build/isolated-event-container/index.js +2 -2
  319. package/build/isolated-event-container/index.js.map +1 -1
  320. package/build/item-group/item/component.js +8 -7
  321. package/build/item-group/item/component.js.map +1 -1
  322. package/build/item-group/item-group/component.js +8 -7
  323. package/build/item-group/item-group/component.js.map +1 -1
  324. package/build/keyboard-shortcuts/index.js +10 -8
  325. package/build/keyboard-shortcuts/index.js.map +1 -1
  326. package/build/menu-group/index.js +14 -11
  327. package/build/menu-group/index.js.map +1 -1
  328. package/build/menu-item/index.js +23 -18
  329. package/build/menu-item/index.js.map +1 -1
  330. package/build/menu-items-choice/index.js +24 -22
  331. package/build/menu-items-choice/index.js.map +1 -1
  332. package/build/mobile/autocompletion-items.native.js +3 -3
  333. package/build/mobile/autocompletion-items.native.js.map +1 -1
  334. package/build/mobile/badge/index.native.js +10 -6
  335. package/build/mobile/badge/index.native.js.map +1 -1
  336. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +23 -18
  337. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  338. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +21 -17
  339. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  340. package/build/mobile/bottom-sheet/button.native.js +17 -14
  341. package/build/mobile/bottom-sheet/button.native.js.map +1 -1
  342. package/build/mobile/bottom-sheet/cell.native.js +69 -53
  343. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  344. package/build/mobile/bottom-sheet/chevron-back.native.js +7 -6
  345. package/build/mobile/bottom-sheet/chevron-back.native.js.map +1 -1
  346. package/build/mobile/bottom-sheet/color-cell.native.js +12 -11
  347. package/build/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  348. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js +2 -2
  349. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  350. package/build/mobile/bottom-sheet/footer-message-cell.native.js +4 -4
  351. package/build/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  352. package/build/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js +5 -4
  353. package/build/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js.map +1 -1
  354. package/build/mobile/bottom-sheet/index.native.js +72 -56
  355. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  356. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +6 -6
  357. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  358. package/build/mobile/bottom-sheet/link-cell.native.js +7 -6
  359. package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  360. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +19 -15
  361. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  362. package/build/mobile/bottom-sheet/lock-icon/index.native.js +2 -2
  363. package/build/mobile/bottom-sheet/lock-icon/index.native.js.map +1 -1
  364. package/build/mobile/bottom-sheet/nav-bar/action-button.native.js +9 -7
  365. package/build/mobile/bottom-sheet/nav-bar/action-button.native.js.map +1 -1
  366. package/build/mobile/bottom-sheet/nav-bar/apply-button.native.js +18 -15
  367. package/build/mobile/bottom-sheet/nav-bar/apply-button.native.js.map +1 -1
  368. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js +19 -16
  369. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  370. package/build/mobile/bottom-sheet/nav-bar/heading.native.js +5 -4
  371. package/build/mobile/bottom-sheet/nav-bar/heading.native.js.map +1 -1
  372. package/build/mobile/bottom-sheet/nav-bar/index.native.js +5 -4
  373. package/build/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -1
  374. package/build/mobile/bottom-sheet/picker-cell.native.js +11 -10
  375. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  376. package/build/mobile/bottom-sheet/radio-cell.native.js +10 -9
  377. package/build/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  378. package/build/mobile/bottom-sheet/range-cell.native.js +50 -45
  379. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  380. package/build/mobile/bottom-sheet/range-text-input.native.js +28 -25
  381. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  382. package/build/mobile/bottom-sheet/ripple.native.js +12 -9
  383. package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
  384. package/build/mobile/bottom-sheet/stepper-cell/index.native.js +41 -35
  385. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  386. package/build/mobile/bottom-sheet/stepper-cell/stepper.android.js +33 -29
  387. package/build/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
  388. package/build/mobile/bottom-sheet/stepper-cell/stepper.ios.js +33 -29
  389. package/build/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
  390. package/build/mobile/bottom-sheet/sub-sheet/index.native.js +16 -5
  391. package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  392. package/build/mobile/bottom-sheet/switch-cell.native.js +11 -10
  393. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  394. package/build/mobile/bottom-sheet-select-control/index.native.js +40 -31
  395. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  396. package/build/mobile/bottom-sheet-text-control/index.native.js +41 -29
  397. package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  398. package/build/mobile/color-settings/gradient-picker-screen.native.js +14 -8
  399. package/build/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
  400. package/build/mobile/color-settings/index.native.js +27 -21
  401. package/build/mobile/color-settings/index.native.js.map +1 -1
  402. package/build/mobile/color-settings/palette.screen.native.js +84 -64
  403. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  404. package/build/mobile/color-settings/picker-screen.native.js +4 -4
  405. package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
  406. package/build/mobile/cycle-select-control/index.native.js +2 -2
  407. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  408. package/build/mobile/dashicons/index.native.js +8 -7
  409. package/build/mobile/dashicons/index.native.js.map +1 -1
  410. package/build/mobile/focal-point-settings-panel/index.native.js +22 -16
  411. package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  412. package/build/mobile/gradient/index.native.js +37 -30
  413. package/build/mobile/gradient/index.native.js.map +1 -1
  414. package/build/mobile/gridicons/index.native.js +8 -7
  415. package/build/mobile/gridicons/index.native.js.map +1 -1
  416. package/build/mobile/html-text-input/index.native.js +36 -34
  417. package/build/mobile/html-text-input/index.native.js.map +1 -1
  418. package/build/mobile/image/icon-customize.native.js +8 -7
  419. package/build/mobile/image/icon-customize.native.js.map +1 -1
  420. package/build/mobile/image/icon-retry.native.js +11 -10
  421. package/build/mobile/image/icon-retry.native.js.map +1 -1
  422. package/build/mobile/image/image-editing-button.native.js +18 -15
  423. package/build/mobile/image/image-editing-button.native.js.map +1 -1
  424. package/build/mobile/image/index.native.js +83 -72
  425. package/build/mobile/image/index.native.js.map +1 -1
  426. package/build/mobile/keyboard-avoiding-view/index.ios.js +10 -8
  427. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  428. package/build/mobile/keyboard-aware-flat-list/index.android.js +15 -14
  429. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  430. package/build/mobile/keyboard-aware-flat-list/index.ios.js +16 -15
  431. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  432. package/build/mobile/link-picker/index.native.js +55 -46
  433. package/build/mobile/link-picker/index.native.js.map +1 -1
  434. package/build/mobile/link-picker/link-picker-results.native.js +33 -29
  435. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  436. package/build/mobile/link-picker/link-picker-screen.native.js +2 -2
  437. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  438. package/build/mobile/link-settings/index.native.js +58 -50
  439. package/build/mobile/link-settings/index.native.js.map +1 -1
  440. package/build/mobile/link-settings/link-rel.native.js +8 -7
  441. package/build/mobile/link-settings/link-rel.native.js.map +1 -1
  442. package/build/mobile/link-settings/link-settings-navigation.native.js +23 -19
  443. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  444. package/build/mobile/link-settings/link-settings-screen.native.js +2 -2
  445. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  446. package/build/mobile/media-edit/index.native.js +8 -3
  447. package/build/mobile/media-edit/index.native.js.map +1 -1
  448. package/build/mobile/picker/index.android.js +27 -24
  449. package/build/mobile/picker/index.android.js.map +1 -1
  450. package/build/mobile/picker/index.ios.js +4 -4
  451. package/build/mobile/picker/index.ios.js.map +1 -1
  452. package/build/mobile/segmented-control/index.native.js +49 -42
  453. package/build/mobile/segmented-control/index.native.js.map +1 -1
  454. package/build/mobile/utils/use-unit-converter-to-mobile.native.js +1 -10
  455. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  456. package/build/modal/index.js +57 -46
  457. package/build/modal/index.js.map +1 -1
  458. package/build/navigable-container/container.js +6 -5
  459. package/build/navigable-container/container.js.map +1 -1
  460. package/build/navigable-container/menu.js +2 -2
  461. package/build/navigable-container/menu.js.map +1 -1
  462. package/build/navigable-container/tabbable.js +2 -2
  463. package/build/navigable-container/tabbable.js.map +1 -1
  464. package/build/navigation/back-button/index.js +7 -6
  465. package/build/navigation/back-button/index.js.map +1 -1
  466. package/build/navigation/group/index.js +21 -16
  467. package/build/navigation/group/index.js.map +1 -1
  468. package/build/navigation/index.js +13 -11
  469. package/build/navigation/index.js.map +1 -1
  470. package/build/navigation/item/base-content.js +11 -7
  471. package/build/navigation/item/base-content.js.map +1 -1
  472. package/build/navigation/item/base.js +5 -4
  473. package/build/navigation/item/base.js.map +1 -1
  474. package/build/navigation/item/index.js +17 -13
  475. package/build/navigation/item/index.js.map +1 -1
  476. package/build/navigation/menu/index.js +29 -23
  477. package/build/navigation/menu/index.js.map +1 -1
  478. package/build/navigation/menu/menu-title-search.js +14 -12
  479. package/build/navigation/menu/menu-title-search.js.map +1 -1
  480. package/build/navigation/menu/menu-title.js +35 -28
  481. package/build/navigation/menu/menu-title.js.map +1 -1
  482. package/build/navigation/menu/search-no-results-found.js +6 -2
  483. package/build/navigation/menu/search-no-results-found.js.map +1 -1
  484. package/build/navigator/navigator-back-button/component.js +2 -2
  485. package/build/navigator/navigator-back-button/component.js.map +1 -1
  486. package/build/navigator/navigator-button/component.js +2 -2
  487. package/build/navigator/navigator-button/component.js.map +1 -1
  488. package/build/navigator/navigator-provider/component.js +8 -6
  489. package/build/navigator/navigator-provider/component.js.map +1 -1
  490. package/build/navigator/navigator-screen/component.js +5 -4
  491. package/build/navigator/navigator-screen/component.js.map +1 -1
  492. package/build/navigator/navigator-to-parent-button/component.js +2 -2
  493. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  494. package/build/notice/index.js +44 -37
  495. package/build/notice/index.js.map +1 -1
  496. package/build/notice/index.native.js +21 -15
  497. package/build/notice/index.native.js.map +1 -1
  498. package/build/notice/list.js +16 -14
  499. package/build/notice/list.js.map +1 -1
  500. package/build/notice/list.native.js +12 -10
  501. package/build/notice/list.native.js.map +1 -1
  502. package/build/number-control/index.js +24 -20
  503. package/build/number-control/index.js.map +1 -1
  504. package/build/palette-edit/index.js +226 -196
  505. package/build/palette-edit/index.js.map +1 -1
  506. package/build/panel/actions.native.js +9 -9
  507. package/build/panel/actions.native.js.map +1 -1
  508. package/build/panel/body.js +33 -29
  509. package/build/panel/body.js.map +1 -1
  510. package/build/panel/body.native.js +9 -7
  511. package/build/panel/body.native.js.map +1 -1
  512. package/build/panel/bottom-separator-cover.native.js +2 -2
  513. package/build/panel/bottom-separator-cover.native.js.map +1 -1
  514. package/build/panel/header.js +7 -4
  515. package/build/panel/header.js.map +1 -1
  516. package/build/panel/index.js +7 -6
  517. package/build/panel/index.js.map +1 -1
  518. package/build/panel/row.js +5 -4
  519. package/build/panel/row.js.map +1 -1
  520. package/build/placeholder/index.js +26 -20
  521. package/build/placeholder/index.js.map +1 -1
  522. package/build/popover/index.js +52 -42
  523. package/build/popover/index.js.map +1 -1
  524. package/build/private-apis.js +0 -2
  525. package/build/private-apis.js.map +1 -1
  526. package/build/progress-bar/index.js +32 -15
  527. package/build/progress-bar/index.js.map +1 -1
  528. package/build/progress-bar/styles.js +4 -4
  529. package/build/progress-bar/styles.js.map +1 -1
  530. package/build/query-controls/author-select.js +2 -2
  531. package/build/query-controls/author-select.js.map +1 -1
  532. package/build/query-controls/category-select.js +2 -2
  533. package/build/query-controls/category-select.js.map +1 -1
  534. package/build/query-controls/index.js +74 -78
  535. package/build/query-controls/index.js.map +1 -1
  536. package/build/query-controls/index.native.js +27 -24
  537. package/build/query-controls/index.native.js.map +1 -1
  538. package/build/radio-control/index.js +25 -22
  539. package/build/radio-control/index.js.map +1 -1
  540. package/build/radio-control/index.native.js +11 -10
  541. package/build/radio-control/index.native.js.map +1 -1
  542. package/build/radio-group/index.js +13 -10
  543. package/build/radio-group/index.js.map +1 -1
  544. package/build/radio-group/radio.js +6 -5
  545. package/build/radio-group/radio.js.map +1 -1
  546. package/build/range-control/index.js +100 -89
  547. package/build/range-control/index.js.map +1 -1
  548. package/build/range-control/index.native.js +3 -3
  549. package/build/range-control/index.native.js.map +1 -1
  550. package/build/range-control/input-range.js +2 -2
  551. package/build/range-control/input-range.js.map +1 -1
  552. package/build/range-control/mark.js +16 -13
  553. package/build/range-control/mark.js.map +1 -1
  554. package/build/range-control/rail.js +24 -20
  555. package/build/range-control/rail.js.map +1 -1
  556. package/build/range-control/tooltip.js +5 -4
  557. package/build/range-control/tooltip.js.map +1 -1
  558. package/build/resizable-box/index.js +7 -6
  559. package/build/resizable-box/index.js.map +1 -1
  560. package/build/resizable-box/index.native.js +2 -2
  561. package/build/resizable-box/index.native.js.map +1 -1
  562. package/build/resizable-box/resize-tooltip/index.js +11 -10
  563. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  564. package/build/resizable-box/resize-tooltip/label.js +12 -9
  565. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  566. package/build/responsive-wrapper/index.js +13 -10
  567. package/build/responsive-wrapper/index.js.map +1 -1
  568. package/build/sandbox/index.js +33 -29
  569. package/build/sandbox/index.js.map +1 -1
  570. package/build/sandbox/index.native.js +32 -29
  571. package/build/sandbox/index.native.js.map +1 -1
  572. package/build/scrollable/component.js +2 -2
  573. package/build/scrollable/component.js.map +1 -1
  574. package/build/search-control/index.js +30 -28
  575. package/build/search-control/index.js.map +1 -1
  576. package/build/search-control/index.native.js +46 -38
  577. package/build/search-control/index.native.js.map +1 -1
  578. package/build/select-control/chevron-down.js +9 -5
  579. package/build/select-control/chevron-down.js.map +1 -1
  580. package/build/select-control/index.js +38 -35
  581. package/build/select-control/index.js.map +1 -1
  582. package/build/select-control/index.native.js +2 -2
  583. package/build/select-control/index.native.js.map +1 -1
  584. package/build/shortcut/index.js +5 -4
  585. package/build/shortcut/index.js.map +1 -1
  586. package/build/slot-fill/bubbles-virtually/fill.js +5 -4
  587. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  588. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +1 -1
  589. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  590. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +6 -5
  591. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  592. package/build/slot-fill/bubbles-virtually/slot.js +2 -2
  593. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  594. package/build/slot-fill/index.js +20 -12
  595. package/build/slot-fill/index.js.map +1 -1
  596. package/build/slot-fill/index.native.js +4 -4
  597. package/build/slot-fill/index.native.js.map +1 -1
  598. package/build/slot-fill/provider.js +6 -5
  599. package/build/slot-fill/provider.js.map +1 -1
  600. package/build/slot-fill/slot.js +16 -12
  601. package/build/slot-fill/slot.js.map +1 -1
  602. package/build/snackbar/index.js +32 -28
  603. package/build/snackbar/index.js.map +1 -1
  604. package/build/snackbar/list.js +29 -24
  605. package/build/snackbar/list.js.map +1 -1
  606. package/build/spacer/component.js +2 -2
  607. package/build/spacer/component.js.map +1 -1
  608. package/build/spinner/index.js +13 -12
  609. package/build/spinner/index.js.map +1 -1
  610. package/build/spinner/index.native.js +2 -2
  611. package/build/spinner/index.native.js.map +1 -1
  612. package/build/style-provider/index.js +6 -5
  613. package/build/style-provider/index.js.map +1 -1
  614. package/build/surface/component.js +2 -2
  615. package/build/surface/component.js.map +1 -1
  616. package/build/tab-panel/index.js +29 -26
  617. package/build/tab-panel/index.js.map +1 -1
  618. package/build/tabs/index.js +5 -4
  619. package/build/tabs/index.js.map +1 -1
  620. package/build/tabs/styles.js +9 -14
  621. package/build/tabs/styles.js.map +1 -1
  622. package/build/tabs/tab.js +6 -5
  623. package/build/tabs/tab.js.map +1 -1
  624. package/build/tabs/tablist.js +101 -7
  625. package/build/tabs/tablist.js.map +1 -1
  626. package/build/tabs/tabpanel.js +6 -5
  627. package/build/tabs/tabpanel.js.map +1 -1
  628. package/build/text/component.js +2 -2
  629. package/build/text/component.js.map +1 -1
  630. package/build/text-control/index.js +16 -15
  631. package/build/text-control/index.js.map +1 -1
  632. package/build/text-control/index.native.js +2 -2
  633. package/build/text-control/index.native.js.map +1 -1
  634. package/build/text-highlight/index.js +5 -3
  635. package/build/text-highlight/index.js.map +1 -1
  636. package/build/textarea-control/index.js +14 -13
  637. package/build/textarea-control/index.js.map +1 -1
  638. package/build/textarea-control/index.native.js +16 -15
  639. package/build/textarea-control/index.native.js.map +1 -1
  640. package/build/theme/color-algorithms.js +2 -2
  641. package/build/theme/color-algorithms.js.map +1 -1
  642. package/build/theme/index.js +3 -4
  643. package/build/theme/index.js.map +1 -1
  644. package/build/tip/index.js +9 -6
  645. package/build/tip/index.js.map +1 -1
  646. package/build/toggle-control/index.js +23 -20
  647. package/build/toggle-control/index.js.map +1 -1
  648. package/build/toggle-control/index.native.js +2 -2
  649. package/build/toggle-control/index.native.js.map +1 -1
  650. package/build/toggle-group-control/toggle-group-control/as-button-group.js +11 -9
  651. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  652. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +13 -11
  653. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  654. package/build/toggle-group-control/toggle-group-control/component.js +22 -15
  655. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  656. package/build/toggle-group-control/toggle-group-control-option/component.js +5 -4
  657. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  658. package/build/toggle-group-control/toggle-group-control-option-base/component.js +50 -38
  659. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  660. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +7 -6
  661. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  662. package/build/toolbar/toolbar/index.js +11 -10
  663. package/build/toolbar/toolbar/index.js.map +1 -1
  664. package/build/toolbar/toolbar/toolbar-container.js +11 -9
  665. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  666. package/build/toolbar/toolbar/toolbar-container.native.js +4 -2
  667. package/build/toolbar/toolbar/toolbar-container.native.js.map +1 -1
  668. package/build/toolbar/toolbar-button/index.js +35 -31
  669. package/build/toolbar/toolbar-button/index.js.map +1 -1
  670. package/build/toolbar/toolbar-button/toolbar-button-container.js +5 -4
  671. package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
  672. package/build/toolbar/toolbar-button/toolbar-button-container.native.js +4 -2
  673. package/build/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
  674. package/build/toolbar/toolbar-dropdown-menu/index.js +12 -11
  675. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  676. package/build/toolbar/toolbar-group/index.js +9 -9
  677. package/build/toolbar/toolbar-group/index.js.map +1 -1
  678. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -5
  679. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  680. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js +8 -7
  681. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  682. package/build/toolbar/toolbar-group/toolbar-group-container.js +5 -4
  683. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  684. package/build/toolbar/toolbar-group/toolbar-group-container.native.js +5 -4
  685. package/build/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
  686. package/build/toolbar/toolbar-item/index.js +10 -7
  687. package/build/toolbar/toolbar-item/index.js.map +1 -1
  688. package/build/toolbar/toolbar-item/index.native.js +1 -1
  689. package/build/toolbar/toolbar-item/index.native.js.map +1 -1
  690. package/build/tools-panel/tools-panel/component.js +14 -12
  691. package/build/tools-panel/tools-panel/component.js.map +1 -1
  692. package/build/tools-panel/tools-panel-header/component.js +108 -94
  693. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  694. package/build/tools-panel/tools-panel-item/component.js +6 -5
  695. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  696. package/build/tooltip/index.js +25 -26
  697. package/build/tooltip/index.js.map +1 -1
  698. package/build/tooltip/index.native.js +33 -24
  699. package/build/tooltip/index.native.js.map +1 -1
  700. package/build/tree-grid/cell.js +10 -6
  701. package/build/tree-grid/cell.js.map +1 -1
  702. package/build/tree-grid/index.js +16 -10
  703. package/build/tree-grid/index.js.map +1 -1
  704. package/build/tree-grid/item.js +5 -4
  705. package/build/tree-grid/item.js.map +1 -1
  706. package/build/tree-grid/roving-tab-index-item.js +5 -4
  707. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  708. package/build/tree-grid/roving-tab-index.js +6 -6
  709. package/build/tree-grid/roving-tab-index.js.map +1 -1
  710. package/build/tree-grid/row.js +5 -4
  711. package/build/tree-grid/row.js.map +1 -1
  712. package/build/tree-select/index.js +2 -2
  713. package/build/tree-select/index.js.map +1 -1
  714. package/build/truncate/component.js +2 -2
  715. package/build/truncate/component.js.map +1 -1
  716. package/build/unit-control/index.js +3 -3
  717. package/build/unit-control/index.js.map +1 -1
  718. package/build/unit-control/index.native.js +56 -48
  719. package/build/unit-control/index.native.js.map +1 -1
  720. package/build/unit-control/unit-select-control.js +12 -10
  721. package/build/unit-control/unit-select-control.js.map +1 -1
  722. package/build/utils/style-mixins.js +0 -7
  723. package/build/utils/style-mixins.js.map +1 -1
  724. package/build/v-stack/component.js +2 -2
  725. package/build/v-stack/component.js.map +1 -1
  726. package/build/view/component.js +2 -2
  727. package/build/view/component.js.map +1 -1
  728. package/build/visually-hidden/component.js +2 -2
  729. package/build/visually-hidden/component.js.map +1 -1
  730. package/build/z-stack/component.js +8 -7
  731. package/build/z-stack/component.js.map +1 -1
  732. package/build-module/alignment-matrix-control/cell.js +17 -12
  733. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  734. package/build-module/alignment-matrix-control/icon.js +12 -11
  735. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  736. package/build-module/alignment-matrix-control/index.js +18 -18
  737. package/build-module/alignment-matrix-control/index.js.map +1 -1
  738. package/build-module/angle-picker-control/angle-circle.js +14 -12
  739. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  740. package/build-module/angle-picker-control/index.js +31 -24
  741. package/build-module/angle-picker-control/index.js.map +1 -1
  742. package/build-module/animate/index.js +1 -1
  743. package/build-module/animate/index.js.map +1 -1
  744. package/build-module/autocomplete/autocompleter-ui.js +58 -30
  745. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  746. package/build-module/autocomplete/autocompleter-ui.native.js +51 -40
  747. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  748. package/build-module/autocomplete/background-view.android.js +5 -4
  749. package/build-module/autocomplete/background-view.android.js.map +1 -1
  750. package/build-module/autocomplete/background-view.ios.js +5 -4
  751. package/build-module/autocomplete/background-view.ios.js.map +1 -1
  752. package/build-module/autocomplete/index.js +7 -3
  753. package/build-module/autocomplete/index.js.map +1 -1
  754. package/build-module/base-control/index.js +34 -24
  755. package/build-module/base-control/index.js.map +1 -1
  756. package/build-module/base-control/index.native.js +10 -4
  757. package/build-module/base-control/index.native.js.map +1 -1
  758. package/build-module/border-box-control/border-box-control/component.js +50 -44
  759. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  760. package/build-module/border-box-control/border-box-control-linked-button/component.js +15 -13
  761. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  762. package/build-module/border-box-control/border-box-control-split-controls/component.js +40 -38
  763. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  764. package/build-module/border-box-control/border-box-control-visualizer/component.js +2 -2
  765. package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  766. package/build-module/border-control/border-control/component.js +57 -52
  767. package/build-module/border-control/border-control/component.js.map +1 -1
  768. package/build-module/border-control/border-control-dropdown/component.js +57 -43
  769. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  770. package/build-module/border-control/border-control-style-picker/component.js +9 -9
  771. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  772. package/build-module/box-control/all-input-control.js +31 -28
  773. package/build-module/box-control/all-input-control.js.map +1 -1
  774. package/build-module/box-control/axial-input-controls.js +47 -41
  775. package/build-module/box-control/axial-input-controls.js.map +1 -1
  776. package/build-module/box-control/icon.js +16 -12
  777. package/build-module/box-control/icon.js.map +1 -1
  778. package/build-module/box-control/index.js +32 -24
  779. package/build-module/box-control/index.js.map +1 -1
  780. package/build-module/box-control/input-controls.js +48 -43
  781. package/build-module/box-control/input-controls.js.map +1 -1
  782. package/build-module/box-control/linked-button.js +12 -11
  783. package/build-module/box-control/linked-button.js.map +1 -1
  784. package/build-module/button/deprecated.js +2 -2
  785. package/build-module/button/deprecated.js.map +1 -1
  786. package/build-module/button/index.js +36 -19
  787. package/build-module/button/index.js.map +1 -1
  788. package/build-module/button/index.native.js +28 -21
  789. package/build-module/button/index.native.js.map +1 -1
  790. package/build-module/button-group/index.js +2 -3
  791. package/build-module/button-group/index.js.map +1 -1
  792. package/build-module/card/card/component.js +21 -17
  793. package/build-module/card/card/component.js.map +1 -1
  794. package/build-module/card/card-body/component.js +3 -3
  795. package/build-module/card/card-body/component.js.map +1 -1
  796. package/build-module/card/card-divider/component.js +2 -2
  797. package/build-module/card/card-divider/component.js.map +1 -1
  798. package/build-module/card/card-footer/component.js +2 -2
  799. package/build-module/card/card-footer/component.js.map +1 -1
  800. package/build-module/card/card-header/component.js +2 -2
  801. package/build-module/card/card-header/component.js.map +1 -1
  802. package/build-module/card/card-media/component.js +2 -2
  803. package/build-module/card/card-media/component.js.map +1 -1
  804. package/build-module/checkbox-control/index.js +40 -34
  805. package/build-module/checkbox-control/index.js.map +1 -1
  806. package/build-module/circular-option-picker/circular-option-picker-actions.js +10 -8
  807. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  808. package/build-module/circular-option-picker/circular-option-picker-option-group.js +5 -5
  809. package/build-module/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
  810. package/build-module/circular-option-picker/circular-option-picker-option.js +17 -14
  811. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  812. package/build-module/circular-option-picker/circular-option-picker.js +36 -28
  813. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  814. package/build-module/clipboard-button/index.js +5 -4
  815. package/build-module/clipboard-button/index.js.map +1 -1
  816. package/build-module/color-control/index.native.js +2 -2
  817. package/build-module/color-control/index.native.js.map +1 -1
  818. package/build-module/color-indicator/index.js +2 -3
  819. package/build-module/color-indicator/index.js.map +1 -1
  820. package/build-module/color-indicator/index.native.js +40 -36
  821. package/build-module/color-indicator/index.native.js.map +1 -1
  822. package/build-module/color-palette/index.js +91 -82
  823. package/build-module/color-palette/index.js.map +1 -1
  824. package/build-module/color-palette/index.native.js +77 -65
  825. package/build-module/color-palette/index.native.js.map +1 -1
  826. package/build-module/color-picker/color-copy-button.js +10 -9
  827. package/build-module/color-picker/color-copy-button.js.map +1 -1
  828. package/build-module/color-picker/color-input.js +4 -4
  829. package/build-module/color-picker/color-input.js.map +1 -1
  830. package/build-module/color-picker/component.js +37 -30
  831. package/build-module/color-picker/component.js.map +1 -1
  832. package/build-module/color-picker/hex-input.js +6 -5
  833. package/build-module/color-picker/hex-input.js.map +1 -1
  834. package/build-module/color-picker/hsl-input.js +50 -46
  835. package/build-module/color-picker/hsl-input.js.map +1 -1
  836. package/build-module/color-picker/hsv-color-picker.native.js +33 -31
  837. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -1
  838. package/build-module/color-picker/hue-picker.native.js +34 -31
  839. package/build-module/color-picker/hue-picker.native.js.map +1 -1
  840. package/build-module/color-picker/index.native.js +68 -53
  841. package/build-module/color-picker/index.native.js.map +1 -1
  842. package/build-module/color-picker/input-with-slider.js +34 -31
  843. package/build-module/color-picker/input-with-slider.js.map +1 -1
  844. package/build-module/color-picker/legacy-adapter.js +2 -2
  845. package/build-module/color-picker/legacy-adapter.js.map +1 -1
  846. package/build-module/color-picker/picker.js +2 -3
  847. package/build-module/color-picker/picker.js.map +1 -1
  848. package/build-module/color-picker/rgb-input.js +54 -50
  849. package/build-module/color-picker/rgb-input.js.map +1 -1
  850. package/build-module/color-picker/saturation-picker.native.js +45 -41
  851. package/build-module/color-picker/saturation-picker.native.js.map +1 -1
  852. package/build-module/combobox-control/index.js +68 -52
  853. package/build-module/combobox-control/index.js.map +1 -1
  854. package/build-module/combobox-control/types.js.map +1 -1
  855. package/build-module/composite/legacy/index.js +3 -4
  856. package/build-module/composite/legacy/index.js.map +1 -1
  857. package/build-module/confirm-dialog/component.js +37 -26
  858. package/build-module/confirm-dialog/component.js.map +1 -1
  859. package/build-module/context/context-connect.js +1 -1
  860. package/build-module/context/context-connect.js.map +1 -1
  861. package/build-module/context/context-system-provider.js +6 -5
  862. package/build-module/context/context-system-provider.js.map +1 -1
  863. package/build-module/context/use-context-system.js +1 -1
  864. package/build-module/context/use-context-system.js.map +1 -1
  865. package/build-module/css.d.js +2 -0
  866. package/build-module/css.d.js.map +1 -0
  867. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +116 -107
  868. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  869. package/build-module/custom-gradient-picker/gradient-bar/index.js +50 -47
  870. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  871. package/build-module/custom-gradient-picker/index.js +32 -25
  872. package/build-module/custom-gradient-picker/index.js.map +1 -1
  873. package/build-module/custom-gradient-picker/index.native.js +25 -17
  874. package/build-module/custom-gradient-picker/index.native.js.map +1 -1
  875. package/build-module/custom-select-control/index.js +73 -59
  876. package/build-module/custom-select-control/index.js.map +1 -1
  877. package/build-module/custom-select-control-v2/custom-select.js +49 -35
  878. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  879. package/build-module/custom-select-control-v2/default-component/index.js +2 -2
  880. package/build-module/custom-select-control-v2/default-component/index.js.map +1 -1
  881. package/build-module/custom-select-control-v2/item.js +10 -6
  882. package/build-module/custom-select-control-v2/item.js.map +1 -1
  883. package/build-module/custom-select-control-v2/legacy-component/index.js +35 -43
  884. package/build-module/custom-select-control-v2/legacy-component/index.js.map +1 -1
  885. package/build-module/custom-select-control-v2/styles.js +9 -9
  886. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  887. package/build-module/custom-select-control-v2/types.js.map +1 -1
  888. package/build-module/dashicon/index.js +2 -2
  889. package/build-module/dashicon/index.js.map +1 -1
  890. package/build-module/dashicon/index.native.js +3 -3
  891. package/build-module/dashicon/index.native.js.map +1 -1
  892. package/build-module/date-time/date/index.js +93 -85
  893. package/build-module/date-time/date/index.js.map +1 -1
  894. package/build-module/date-time/date-time/index.js +20 -15
  895. package/build-module/date-time/date-time/index.js.map +1 -1
  896. package/build-module/date-time/time/index.js +164 -135
  897. package/build-module/date-time/time/index.js.map +1 -1
  898. package/build-module/date-time/time/timezone.js +11 -8
  899. package/build-module/date-time/time/timezone.js.map +1 -1
  900. package/build-module/dimension-control/index.js +9 -5
  901. package/build-module/dimension-control/index.js.map +1 -1
  902. package/build-module/disabled/index.js +11 -9
  903. package/build-module/disabled/index.js.map +1 -1
  904. package/build-module/disabled/index.native.js +5 -4
  905. package/build-module/disabled/index.native.js.map +1 -1
  906. package/build-module/disclosure/index.js +5 -5
  907. package/build-module/disclosure/index.js.map +1 -1
  908. package/build-module/divider/component.js +3 -3
  909. package/build-module/divider/component.js.map +1 -1
  910. package/build-module/draggable/index.js +16 -12
  911. package/build-module/draggable/index.js.map +1 -1
  912. package/build-module/draggable/index.native.js +15 -11
  913. package/build-module/draggable/index.native.js.map +1 -1
  914. package/build-module/drop-zone/index.js +24 -17
  915. package/build-module/drop-zone/index.js.map +1 -1
  916. package/build-module/dropdown/dropdown-content-wrapper.js +2 -2
  917. package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -1
  918. package/build-module/dropdown/index.js +22 -19
  919. package/build-module/dropdown/index.js.map +1 -1
  920. package/build-module/dropdown/index.native.js +5 -2
  921. package/build-module/dropdown/index.native.js.map +1 -1
  922. package/build-module/dropdown-menu/index.js +30 -27
  923. package/build-module/dropdown-menu/index.js.map +1 -1
  924. package/build-module/dropdown-menu/index.native.js +33 -29
  925. package/build-module/dropdown-menu/index.native.js.map +1 -1
  926. package/build-module/dropdown-menu-v2/index.js +110 -76
  927. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  928. package/build-module/duotone-picker/color-list-picker/index.js +54 -46
  929. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  930. package/build-module/duotone-picker/custom-duotone-bar.js +2 -2
  931. package/build-module/duotone-picker/custom-duotone-bar.js.map +1 -1
  932. package/build-module/duotone-picker/duotone-picker.js +41 -38
  933. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  934. package/build-module/duotone-picker/duotone-swatch.js +3 -3
  935. package/build-module/duotone-picker/duotone-swatch.js.map +1 -1
  936. package/build-module/elevation/component.js +2 -2
  937. package/build-module/elevation/component.js.map +1 -1
  938. package/build-module/external-link/index.js +17 -12
  939. package/build-module/external-link/index.js.map +1 -1
  940. package/build-module/external-link/index.native.js +10 -6
  941. package/build-module/external-link/index.native.js.map +1 -1
  942. package/build-module/flex/flex/component.js +9 -7
  943. package/build-module/flex/flex/component.js.map +1 -1
  944. package/build-module/flex/flex-block/component.js +2 -2
  945. package/build-module/flex/flex-block/component.js.map +1 -1
  946. package/build-module/flex/flex-item/component.js +2 -2
  947. package/build-module/flex/flex-item/component.js.map +1 -1
  948. package/build-module/focal-point-picker/controls.js +21 -19
  949. package/build-module/focal-point-picker/controls.js.map +1 -1
  950. package/build-module/focal-point-picker/focal-point.js +3 -5
  951. package/build-module/focal-point-picker/focal-point.js.map +1 -1
  952. package/build-module/focal-point-picker/focal-point.native.js +12 -10
  953. package/build-module/focal-point-picker/focal-point.native.js.map +1 -1
  954. package/build-module/focal-point-picker/grid.js +22 -20
  955. package/build-module/focal-point-picker/grid.js.map +1 -1
  956. package/build-module/focal-point-picker/index.js +43 -39
  957. package/build-module/focal-point-picker/index.js.map +1 -1
  958. package/build-module/focal-point-picker/index.native.js +67 -62
  959. package/build-module/focal-point-picker/index.native.js.map +1 -1
  960. package/build-module/focal-point-picker/media.js +4 -4
  961. package/build-module/focal-point-picker/media.js.map +1 -1
  962. package/build-module/focal-point-picker/styles/focal-point-style.js +2 -6
  963. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  964. package/build-module/focal-point-picker/tooltip/index.native.js +33 -27
  965. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  966. package/build-module/focusable-iframe/index.js +2 -3
  967. package/build-module/focusable-iframe/index.js.map +1 -1
  968. package/build-module/font-size-picker/font-size-picker-select.js +2 -2
  969. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  970. package/build-module/font-size-picker/font-size-picker-toggle-group.js +10 -10
  971. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  972. package/build-module/font-size-picker/index.js +120 -103
  973. package/build-module/font-size-picker/index.js.map +1 -1
  974. package/build-module/font-size-picker/index.native.js +78 -63
  975. package/build-module/font-size-picker/index.native.js.map +1 -1
  976. package/build-module/footer-message-control/index.native.js +2 -2
  977. package/build-module/footer-message-control/index.native.js.map +1 -1
  978. package/build-module/form-file-upload/index.js +21 -18
  979. package/build-module/form-file-upload/index.js.map +1 -1
  980. package/build-module/form-toggle/index.js +19 -18
  981. package/build-module/form-toggle/index.js.map +1 -1
  982. package/build-module/form-token-field/index.js +60 -55
  983. package/build-module/form-token-field/index.js.map +1 -1
  984. package/build-module/form-token-field/suggestions-list.js +42 -39
  985. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  986. package/build-module/form-token-field/token-input.js +2 -3
  987. package/build-module/form-token-field/token-input.js.map +1 -1
  988. package/build-module/form-token-field/token.js +23 -18
  989. package/build-module/form-token-field/token.js.map +1 -1
  990. package/build-module/gradient-picker/index.js +51 -47
  991. package/build-module/gradient-picker/index.js.map +1 -1
  992. package/build-module/grid/component.js +2 -2
  993. package/build-module/grid/component.js.map +1 -1
  994. package/build-module/guide/icons.js +9 -8
  995. package/build-module/guide/icons.js.map +1 -1
  996. package/build-module/guide/index.js +34 -26
  997. package/build-module/guide/index.js.map +1 -1
  998. package/build-module/guide/page-control.js +16 -17
  999. package/build-module/guide/page-control.js.map +1 -1
  1000. package/build-module/guide/page.js +2 -3
  1001. package/build-module/guide/page.js.map +1 -1
  1002. package/build-module/h-stack/component.js +2 -2
  1003. package/build-module/h-stack/component.js.map +1 -1
  1004. package/build-module/h-stack/hook.js +3 -4
  1005. package/build-module/h-stack/hook.js.map +1 -1
  1006. package/build-module/heading/component.js +2 -2
  1007. package/build-module/heading/component.js.map +1 -1
  1008. package/build-module/higher-order/navigate-regions/index.js +7 -6
  1009. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  1010. package/build-module/higher-order/with-constrained-tabbing/index.js +7 -6
  1011. package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
  1012. package/build-module/higher-order/with-fallback-styles/index.js +7 -5
  1013. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  1014. package/build-module/higher-order/with-filters/index.js +2 -2
  1015. package/build-module/higher-order/with-filters/index.js.map +1 -1
  1016. package/build-module/higher-order/with-focus-outside/index.js +8 -7
  1017. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  1018. package/build-module/higher-order/with-focus-outside/index.native.js +8 -7
  1019. package/build-module/higher-order/with-focus-outside/index.native.js.map +1 -1
  1020. package/build-module/higher-order/with-focus-return/index.js +7 -6
  1021. package/build-module/higher-order/with-focus-return/index.js.map +1 -1
  1022. package/build-module/higher-order/with-notices/index.js +4 -4
  1023. package/build-module/higher-order/with-notices/index.js.map +1 -1
  1024. package/build-module/higher-order/with-spoken-messages/index.js +2 -2
  1025. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  1026. package/build-module/icon/index.js +3 -2
  1027. package/build-module/icon/index.js.map +1 -1
  1028. package/build-module/index.js +1 -0
  1029. package/build-module/index.js.map +1 -1
  1030. package/build-module/index.native.js +0 -3
  1031. package/build-module/index.native.js.map +1 -1
  1032. package/build-module/input-control/backdrop.js +2 -2
  1033. package/build-module/input-control/backdrop.js.map +1 -1
  1034. package/build-module/input-control/index.js +36 -34
  1035. package/build-module/input-control/index.js.map +1 -1
  1036. package/build-module/input-control/input-base.js +38 -25
  1037. package/build-module/input-control/input-base.js.map +1 -1
  1038. package/build-module/input-control/input-field.js +2 -2
  1039. package/build-module/input-control/input-field.js.map +1 -1
  1040. package/build-module/input-control/input-prefix-wrapper.js +2 -2
  1041. package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
  1042. package/build-module/input-control/input-suffix-wrapper.js +2 -2
  1043. package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
  1044. package/build-module/input-control/label.js +12 -8
  1045. package/build-module/input-control/label.js.map +1 -1
  1046. package/build-module/input-control/styles/input-control-styles.js +21 -21
  1047. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  1048. package/build-module/isolated-event-container/index.js +2 -2
  1049. package/build-module/isolated-event-container/index.js.map +1 -1
  1050. package/build-module/item-group/item/component.js +8 -7
  1051. package/build-module/item-group/item/component.js.map +1 -1
  1052. package/build-module/item-group/item-group/component.js +8 -7
  1053. package/build-module/item-group/item-group/component.js.map +1 -1
  1054. package/build-module/keyboard-shortcuts/index.js +12 -9
  1055. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  1056. package/build-module/menu-group/index.js +15 -12
  1057. package/build-module/menu-group/index.js.map +1 -1
  1058. package/build-module/menu-item/index.js +24 -18
  1059. package/build-module/menu-item/index.js.map +1 -1
  1060. package/build-module/menu-items-choice/index.js +25 -22
  1061. package/build-module/menu-items-choice/index.js.map +1 -1
  1062. package/build-module/mobile/autocompletion-items.native.js +2 -2
  1063. package/build-module/mobile/autocompletion-items.native.js.map +1 -1
  1064. package/build-module/mobile/badge/index.native.js +12 -6
  1065. package/build-module/mobile/badge/index.native.js.map +1 -1
  1066. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +23 -18
  1067. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  1068. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +22 -16
  1069. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  1070. package/build-module/mobile/bottom-sheet/button.native.js +17 -14
  1071. package/build-module/mobile/bottom-sheet/button.native.js.map +1 -1
  1072. package/build-module/mobile/bottom-sheet/cell.native.js +70 -53
  1073. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  1074. package/build-module/mobile/bottom-sheet/chevron-back.native.js +7 -6
  1075. package/build-module/mobile/bottom-sheet/chevron-back.native.js.map +1 -1
  1076. package/build-module/mobile/bottom-sheet/color-cell.native.js +14 -11
  1077. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  1078. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js +2 -2
  1079. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  1080. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js +4 -4
  1081. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  1082. package/build-module/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js +5 -4
  1083. package/build-module/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js.map +1 -1
  1084. package/build-module/mobile/bottom-sheet/index.native.js +74 -56
  1085. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  1086. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +5 -4
  1087. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  1088. package/build-module/mobile/bottom-sheet/link-cell.native.js +7 -6
  1089. package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  1090. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +20 -15
  1091. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  1092. package/build-module/mobile/bottom-sheet/lock-icon/index.native.js +2 -2
  1093. package/build-module/mobile/bottom-sheet/lock-icon/index.native.js.map +1 -1
  1094. package/build-module/mobile/bottom-sheet/nav-bar/action-button.native.js +9 -7
  1095. package/build-module/mobile/bottom-sheet/nav-bar/action-button.native.js.map +1 -1
  1096. package/build-module/mobile/bottom-sheet/nav-bar/apply-button.native.js +18 -15
  1097. package/build-module/mobile/bottom-sheet/nav-bar/apply-button.native.js.map +1 -1
  1098. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +20 -16
  1099. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  1100. package/build-module/mobile/bottom-sheet/nav-bar/heading.native.js +5 -4
  1101. package/build-module/mobile/bottom-sheet/nav-bar/heading.native.js.map +1 -1
  1102. package/build-module/mobile/bottom-sheet/nav-bar/index.native.js +5 -4
  1103. package/build-module/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -1
  1104. package/build-module/mobile/bottom-sheet/picker-cell.native.js +11 -10
  1105. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  1106. package/build-module/mobile/bottom-sheet/radio-cell.native.js +10 -9
  1107. package/build-module/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  1108. package/build-module/mobile/bottom-sheet/range-cell.native.js +51 -45
  1109. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  1110. package/build-module/mobile/bottom-sheet/range-text-input.native.js +29 -25
  1111. package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  1112. package/build-module/mobile/bottom-sheet/ripple.native.js +12 -9
  1113. package/build-module/mobile/bottom-sheet/ripple.native.js.map +1 -1
  1114. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +42 -35
  1115. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  1116. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js +34 -29
  1117. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
  1118. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js +34 -29
  1119. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
  1120. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +16 -3
  1121. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  1122. package/build-module/mobile/bottom-sheet/switch-cell.native.js +11 -10
  1123. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  1124. package/build-module/mobile/bottom-sheet-select-control/index.native.js +42 -30
  1125. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  1126. package/build-module/mobile/bottom-sheet-text-control/index.native.js +42 -28
  1127. package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  1128. package/build-module/mobile/color-settings/gradient-picker-screen.native.js +15 -8
  1129. package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
  1130. package/build-module/mobile/color-settings/index.native.js +27 -20
  1131. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  1132. package/build-module/mobile/color-settings/palette.screen.native.js +85 -63
  1133. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  1134. package/build-module/mobile/color-settings/picker-screen.native.js +3 -3
  1135. package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
  1136. package/build-module/mobile/cycle-select-control/index.native.js +2 -2
  1137. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  1138. package/build-module/mobile/dashicons/index.native.js +8 -7
  1139. package/build-module/mobile/dashicons/index.native.js.map +1 -1
  1140. package/build-module/mobile/focal-point-settings-panel/index.native.js +22 -15
  1141. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  1142. package/build-module/mobile/gradient/index.native.js +37 -29
  1143. package/build-module/mobile/gradient/index.native.js.map +1 -1
  1144. package/build-module/mobile/gridicons/index.native.js +8 -7
  1145. package/build-module/mobile/gridicons/index.native.js.map +1 -1
  1146. package/build-module/mobile/html-text-input/index.native.js +37 -34
  1147. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  1148. package/build-module/mobile/image/icon-customize.native.js +8 -7
  1149. package/build-module/mobile/image/icon-customize.native.js.map +1 -1
  1150. package/build-module/mobile/image/icon-retry.native.js +12 -10
  1151. package/build-module/mobile/image/icon-retry.native.js.map +1 -1
  1152. package/build-module/mobile/image/image-editing-button.native.js +19 -15
  1153. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  1154. package/build-module/mobile/image/index.native.js +85 -72
  1155. package/build-module/mobile/image/index.native.js.map +1 -1
  1156. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +11 -8
  1157. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  1158. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +15 -14
  1159. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  1160. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +16 -15
  1161. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  1162. package/build-module/mobile/link-picker/index.native.js +56 -46
  1163. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  1164. package/build-module/mobile/link-picker/link-picker-results.native.js +33 -29
  1165. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  1166. package/build-module/mobile/link-picker/link-picker-screen.native.js +2 -2
  1167. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  1168. package/build-module/mobile/link-settings/index.native.js +60 -50
  1169. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  1170. package/build-module/mobile/link-settings/link-rel.native.js +8 -7
  1171. package/build-module/mobile/link-settings/link-rel.native.js.map +1 -1
  1172. package/build-module/mobile/link-settings/link-settings-navigation.native.js +24 -19
  1173. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  1174. package/build-module/mobile/link-settings/link-settings-screen.native.js +2 -2
  1175. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  1176. package/build-module/mobile/media-edit/index.native.js +7 -3
  1177. package/build-module/mobile/media-edit/index.native.js.map +1 -1
  1178. package/build-module/mobile/picker/index.android.js +28 -24
  1179. package/build-module/mobile/picker/index.android.js.map +1 -1
  1180. package/build-module/mobile/picker/index.ios.js +3 -3
  1181. package/build-module/mobile/picker/index.ios.js.map +1 -1
  1182. package/build-module/mobile/segmented-control/index.native.js +50 -42
  1183. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  1184. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +2 -10
  1185. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  1186. package/build-module/modal/index.js +58 -46
  1187. package/build-module/modal/index.js.map +1 -1
  1188. package/build-module/navigable-container/container.js +6 -6
  1189. package/build-module/navigable-container/container.js.map +1 -1
  1190. package/build-module/navigable-container/menu.js +2 -2
  1191. package/build-module/navigable-container/menu.js.map +1 -1
  1192. package/build-module/navigable-container/tabbable.js +2 -2
  1193. package/build-module/navigable-container/tabbable.js.map +1 -1
  1194. package/build-module/navigation/back-button/index.js +8 -6
  1195. package/build-module/navigation/back-button/index.js.map +1 -1
  1196. package/build-module/navigation/group/index.js +22 -16
  1197. package/build-module/navigation/group/index.js.map +1 -1
  1198. package/build-module/navigation/index.js +13 -11
  1199. package/build-module/navigation/index.js.map +1 -1
  1200. package/build-module/navigation/item/base-content.js +13 -7
  1201. package/build-module/navigation/item/base-content.js.map +1 -1
  1202. package/build-module/navigation/item/base.js +5 -4
  1203. package/build-module/navigation/item/base.js.map +1 -1
  1204. package/build-module/navigation/item/index.js +18 -13
  1205. package/build-module/navigation/item/index.js.map +1 -1
  1206. package/build-module/navigation/menu/index.js +30 -23
  1207. package/build-module/navigation/menu/index.js.map +1 -1
  1208. package/build-module/navigation/menu/menu-title-search.js +14 -12
  1209. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  1210. package/build-module/navigation/menu/menu-title.js +36 -28
  1211. package/build-module/navigation/menu/menu-title.js.map +1 -1
  1212. package/build-module/navigation/menu/search-no-results-found.js +7 -2
  1213. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  1214. package/build-module/navigator/navigator-back-button/component.js +2 -2
  1215. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  1216. package/build-module/navigator/navigator-button/component.js +2 -2
  1217. package/build-module/navigator/navigator-button/component.js.map +1 -1
  1218. package/build-module/navigator/navigator-provider/component.js +8 -6
  1219. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  1220. package/build-module/navigator/navigator-screen/component.js +5 -4
  1221. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  1222. package/build-module/navigator/navigator-to-parent-button/component.js +2 -2
  1223. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  1224. package/build-module/notice/index.js +45 -37
  1225. package/build-module/notice/index.js.map +1 -1
  1226. package/build-module/notice/index.native.js +23 -15
  1227. package/build-module/notice/index.native.js.map +1 -1
  1228. package/build-module/notice/list.js +16 -14
  1229. package/build-module/notice/list.js.map +1 -1
  1230. package/build-module/notice/list.native.js +12 -10
  1231. package/build-module/notice/list.native.js.map +1 -1
  1232. package/build-module/number-control/index.js +26 -20
  1233. package/build-module/number-control/index.js.map +1 -1
  1234. package/build-module/palette-edit/index.js +228 -196
  1235. package/build-module/palette-edit/index.js.map +1 -1
  1236. package/build-module/panel/actions.native.js +10 -9
  1237. package/build-module/panel/actions.native.js.map +1 -1
  1238. package/build-module/panel/body.js +34 -29
  1239. package/build-module/panel/body.js.map +1 -1
  1240. package/build-module/panel/body.native.js +10 -7
  1241. package/build-module/panel/body.native.js.map +1 -1
  1242. package/build-module/panel/bottom-separator-cover.native.js +2 -2
  1243. package/build-module/panel/bottom-separator-cover.native.js.map +1 -1
  1244. package/build-module/panel/header.js +8 -4
  1245. package/build-module/panel/header.js.map +1 -1
  1246. package/build-module/panel/index.js +8 -6
  1247. package/build-module/panel/index.js.map +1 -1
  1248. package/build-module/panel/row.js +5 -5
  1249. package/build-module/panel/row.js.map +1 -1
  1250. package/build-module/placeholder/index.js +27 -20
  1251. package/build-module/placeholder/index.js.map +1 -1
  1252. package/build-module/popover/index.js +54 -42
  1253. package/build-module/popover/index.js.map +1 -1
  1254. package/build-module/private-apis.js +0 -2
  1255. package/build-module/private-apis.js.map +1 -1
  1256. package/build-module/progress-bar/index.js +33 -15
  1257. package/build-module/progress-bar/index.js.map +1 -1
  1258. package/build-module/progress-bar/styles.js +4 -4
  1259. package/build-module/progress-bar/styles.js.map +1 -1
  1260. package/build-module/query-controls/author-select.js +2 -2
  1261. package/build-module/query-controls/author-select.js.map +1 -1
  1262. package/build-module/query-controls/category-select.js +2 -2
  1263. package/build-module/query-controls/category-select.js.map +1 -1
  1264. package/build-module/query-controls/index.js +74 -78
  1265. package/build-module/query-controls/index.js.map +1 -1
  1266. package/build-module/query-controls/index.native.js +29 -24
  1267. package/build-module/query-controls/index.native.js.map +1 -1
  1268. package/build-module/radio-control/index.js +26 -22
  1269. package/build-module/radio-control/index.js.map +1 -1
  1270. package/build-module/radio-control/index.native.js +12 -10
  1271. package/build-module/radio-control/index.native.js.map +1 -1
  1272. package/build-module/radio-group/index.js +13 -10
  1273. package/build-module/radio-group/index.js.map +1 -1
  1274. package/build-module/radio-group/radio.js +6 -5
  1275. package/build-module/radio-group/radio.js.map +1 -1
  1276. package/build-module/range-control/index.js +101 -89
  1277. package/build-module/range-control/index.js.map +1 -1
  1278. package/build-module/range-control/index.native.js +3 -3
  1279. package/build-module/range-control/index.native.js.map +1 -1
  1280. package/build-module/range-control/input-range.js +2 -2
  1281. package/build-module/range-control/input-range.js.map +1 -1
  1282. package/build-module/range-control/mark.js +18 -13
  1283. package/build-module/range-control/mark.js.map +1 -1
  1284. package/build-module/range-control/rail.js +26 -20
  1285. package/build-module/range-control/rail.js.map +1 -1
  1286. package/build-module/range-control/tooltip.js +5 -4
  1287. package/build-module/range-control/tooltip.js.map +1 -1
  1288. package/build-module/resizable-box/index.js +8 -6
  1289. package/build-module/resizable-box/index.js.map +1 -1
  1290. package/build-module/resizable-box/index.native.js +2 -2
  1291. package/build-module/resizable-box/index.native.js.map +1 -1
  1292. package/build-module/resizable-box/resize-tooltip/index.js +12 -10
  1293. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  1294. package/build-module/resizable-box/resize-tooltip/label.js +12 -9
  1295. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  1296. package/build-module/responsive-wrapper/index.js +13 -11
  1297. package/build-module/responsive-wrapper/index.js.map +1 -1
  1298. package/build-module/sandbox/index.js +34 -30
  1299. package/build-module/sandbox/index.js.map +1 -1
  1300. package/build-module/sandbox/index.native.js +33 -29
  1301. package/build-module/sandbox/index.native.js.map +1 -1
  1302. package/build-module/scrollable/component.js +2 -2
  1303. package/build-module/scrollable/component.js.map +1 -1
  1304. package/build-module/search-control/index.js +30 -28
  1305. package/build-module/search-control/index.js.map +1 -1
  1306. package/build-module/search-control/index.native.js +46 -37
  1307. package/build-module/search-control/index.native.js.map +1 -1
  1308. package/build-module/select-control/chevron-down.js +9 -5
  1309. package/build-module/select-control/chevron-down.js.map +1 -1
  1310. package/build-module/select-control/index.js +38 -35
  1311. package/build-module/select-control/index.js.map +1 -1
  1312. package/build-module/select-control/index.native.js +2 -2
  1313. package/build-module/select-control/index.native.js.map +1 -1
  1314. package/build-module/shortcut/index.js +5 -4
  1315. package/build-module/shortcut/index.js.map +1 -1
  1316. package/build-module/slot-fill/bubbles-virtually/fill.js +5 -4
  1317. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  1318. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +1 -1
  1319. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  1320. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -6
  1321. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  1322. package/build-module/slot-fill/bubbles-virtually/slot.js +2 -2
  1323. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  1324. package/build-module/slot-fill/index.js +22 -12
  1325. package/build-module/slot-fill/index.js.map +1 -1
  1326. package/build-module/slot-fill/index.native.js +4 -4
  1327. package/build-module/slot-fill/index.native.js.map +1 -1
  1328. package/build-module/slot-fill/provider.js +7 -6
  1329. package/build-module/slot-fill/provider.js.map +1 -1
  1330. package/build-module/slot-fill/slot.js +17 -12
  1331. package/build-module/slot-fill/slot.js.map +1 -1
  1332. package/build-module/snackbar/index.js +33 -28
  1333. package/build-module/snackbar/index.js.map +1 -1
  1334. package/build-module/snackbar/list.js +30 -24
  1335. package/build-module/snackbar/list.js.map +1 -1
  1336. package/build-module/spacer/component.js +2 -2
  1337. package/build-module/spacer/component.js.map +1 -1
  1338. package/build-module/spinner/index.js +14 -12
  1339. package/build-module/spinner/index.js.map +1 -1
  1340. package/build-module/spinner/index.native.js +2 -2
  1341. package/build-module/spinner/index.native.js.map +1 -1
  1342. package/build-module/style-provider/index.js +5 -5
  1343. package/build-module/style-provider/index.js.map +1 -1
  1344. package/build-module/surface/component.js +2 -2
  1345. package/build-module/surface/component.js.map +1 -1
  1346. package/build-module/tab-panel/index.js +30 -26
  1347. package/build-module/tab-panel/index.js.map +1 -1
  1348. package/build-module/tabs/index.js +5 -4
  1349. package/build-module/tabs/index.js.map +1 -1
  1350. package/build-module/tabs/styles.js +3 -13
  1351. package/build-module/tabs/styles.js.map +1 -1
  1352. package/build-module/tabs/tab.js +6 -5
  1353. package/build-module/tabs/tab.js.map +1 -1
  1354. package/build-module/tabs/tablist.js +102 -8
  1355. package/build-module/tabs/tablist.js.map +1 -1
  1356. package/build-module/tabs/tabpanel.js +6 -5
  1357. package/build-module/tabs/tabpanel.js.map +1 -1
  1358. package/build-module/text/component.js +2 -2
  1359. package/build-module/text/component.js.map +1 -1
  1360. package/build-module/text-control/index.js +16 -15
  1361. package/build-module/text-control/index.js.map +1 -1
  1362. package/build-module/text-control/index.native.js +2 -2
  1363. package/build-module/text-control/index.native.js.map +1 -1
  1364. package/build-module/text-highlight/index.js +6 -3
  1365. package/build-module/text-highlight/index.js.map +1 -1
  1366. package/build-module/textarea-control/index.js +14 -13
  1367. package/build-module/textarea-control/index.js.map +1 -1
  1368. package/build-module/textarea-control/index.native.js +16 -15
  1369. package/build-module/textarea-control/index.native.js.map +1 -1
  1370. package/build-module/theme/color-algorithms.js +2 -2
  1371. package/build-module/theme/color-algorithms.js.map +1 -1
  1372. package/build-module/theme/index.js +2 -2
  1373. package/build-module/theme/index.js.map +1 -1
  1374. package/build-module/tip/index.js +10 -7
  1375. package/build-module/tip/index.js.map +1 -1
  1376. package/build-module/toggle-control/index.js +22 -18
  1377. package/build-module/toggle-control/index.js.map +1 -1
  1378. package/build-module/toggle-control/index.native.js +2 -2
  1379. package/build-module/toggle-control/index.native.js.map +1 -1
  1380. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +11 -9
  1381. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  1382. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +13 -11
  1383. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  1384. package/build-module/toggle-group-control/toggle-group-control/component.js +23 -15
  1385. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  1386. package/build-module/toggle-group-control/toggle-group-control-option/component.js +5 -4
  1387. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  1388. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +52 -38
  1389. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  1390. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +7 -6
  1391. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  1392. package/build-module/toolbar/toolbar/index.js +11 -10
  1393. package/build-module/toolbar/toolbar/index.js.map +1 -1
  1394. package/build-module/toolbar/toolbar/toolbar-container.js +11 -9
  1395. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  1396. package/build-module/toolbar/toolbar/toolbar-container.native.js +4 -2
  1397. package/build-module/toolbar/toolbar/toolbar-container.native.js.map +1 -1
  1398. package/build-module/toolbar/toolbar-button/index.js +35 -31
  1399. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  1400. package/build-module/toolbar/toolbar-button/toolbar-button-container.js +5 -4
  1401. package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
  1402. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js +4 -2
  1403. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
  1404. package/build-module/toolbar/toolbar-dropdown-menu/index.js +12 -11
  1405. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  1406. package/build-module/toolbar/toolbar-group/index.js +10 -9
  1407. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  1408. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -5
  1409. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  1410. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js +8 -7
  1411. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  1412. package/build-module/toolbar/toolbar-group/toolbar-group-container.js +5 -4
  1413. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  1414. package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js +5 -4
  1415. package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
  1416. package/build-module/toolbar/toolbar-item/index.js +10 -7
  1417. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  1418. package/build-module/toolbar/toolbar-item/index.native.js +1 -1
  1419. package/build-module/toolbar/toolbar-item/index.native.js.map +1 -1
  1420. package/build-module/tools-panel/tools-panel/component.js +15 -12
  1421. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  1422. package/build-module/tools-panel/tools-panel-header/component.js +110 -94
  1423. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  1424. package/build-module/tools-panel/tools-panel-item/component.js +6 -5
  1425. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  1426. package/build-module/tooltip/index.js +26 -26
  1427. package/build-module/tooltip/index.js.map +1 -1
  1428. package/build-module/tooltip/index.native.js +35 -24
  1429. package/build-module/tooltip/index.native.js.map +1 -1
  1430. package/build-module/tree-grid/cell.js +11 -6
  1431. package/build-module/tree-grid/cell.js.map +1 -1
  1432. package/build-module/tree-grid/index.js +16 -10
  1433. package/build-module/tree-grid/index.js.map +1 -1
  1434. package/build-module/tree-grid/item.js +5 -4
  1435. package/build-module/tree-grid/item.js.map +1 -1
  1436. package/build-module/tree-grid/roving-tab-index-item.js +5 -4
  1437. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  1438. package/build-module/tree-grid/roving-tab-index.js +5 -4
  1439. package/build-module/tree-grid/roving-tab-index.js.map +1 -1
  1440. package/build-module/tree-grid/row.js +5 -5
  1441. package/build-module/tree-grid/row.js.map +1 -1
  1442. package/build-module/tree-select/index.js +2 -2
  1443. package/build-module/tree-select/index.js.map +1 -1
  1444. package/build-module/truncate/component.js +2 -2
  1445. package/build-module/truncate/component.js.map +1 -1
  1446. package/build-module/unit-control/index.js +3 -3
  1447. package/build-module/unit-control/index.js.map +1 -1
  1448. package/build-module/unit-control/index.native.js +58 -48
  1449. package/build-module/unit-control/index.native.js.map +1 -1
  1450. package/build-module/unit-control/unit-select-control.js +12 -10
  1451. package/build-module/unit-control/unit-select-control.js.map +1 -1
  1452. package/build-module/utils/style-mixins.js +0 -1
  1453. package/build-module/utils/style-mixins.js.map +1 -1
  1454. package/build-module/v-stack/component.js +2 -2
  1455. package/build-module/v-stack/component.js.map +1 -1
  1456. package/build-module/view/component.js +2 -3
  1457. package/build-module/view/component.js.map +1 -1
  1458. package/build-module/visually-hidden/component.js +2 -2
  1459. package/build-module/visually-hidden/component.js.map +1 -1
  1460. package/build-module/z-stack/component.js +8 -7
  1461. package/build-module/z-stack/component.js.map +1 -1
  1462. package/build-style/style-rtl.css +11 -0
  1463. package/build-style/style.css +11 -0
  1464. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  1465. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  1466. package/build-types/base-control/hooks.d.ts +1 -1
  1467. package/build-types/border-box-control/border-box-control/component.d.ts +1 -1
  1468. package/build-types/border-box-control/border-box-control/hook.d.ts +15 -15
  1469. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +17 -17
  1470. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
  1471. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +15 -15
  1472. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +14 -14
  1473. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  1474. package/build-types/border-control/border-control/hook.d.ts +14 -14
  1475. package/build-types/border-control/border-control-dropdown/hook.d.ts +14 -14
  1476. package/build-types/border-control/stories/index.story.d.ts +6 -6
  1477. package/build-types/box-control/stories/index.story.d.ts +180 -180
  1478. package/build-types/box-control/styles/box-control-styles.d.ts +4 -4
  1479. package/build-types/button/deprecated.d.ts +9 -9
  1480. package/build-types/button/index.d.ts.map +1 -1
  1481. package/build-types/card/card/hook.d.ts +14 -14
  1482. package/build-types/card/card-body/hook.d.ts +14 -14
  1483. package/build-types/card/card-divider/component.d.ts +1 -1
  1484. package/build-types/card/card-divider/hook.d.ts +15 -15
  1485. package/build-types/card/card-footer/hook.d.ts +14 -14
  1486. package/build-types/card/card-header/hook.d.ts +14 -14
  1487. package/build-types/card/card-media/hook.d.ts +14 -14
  1488. package/build-types/card/stories/index.story.d.ts +2 -2
  1489. package/build-types/color-palette/stories/index.story.d.ts +3 -0
  1490. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  1491. package/build-types/color-palette/styles.d.ts +1 -1
  1492. package/build-types/color-picker/component.d.ts +1 -1
  1493. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  1494. package/build-types/color-picker/styles.d.ts +5 -5
  1495. package/build-types/combobox-control/index.d.ts.map +1 -1
  1496. package/build-types/combobox-control/stories/index.story.d.ts +27 -3
  1497. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  1498. package/build-types/combobox-control/types.d.ts +7 -0
  1499. package/build-types/combobox-control/types.d.ts.map +1 -1
  1500. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -2
  1501. package/build-types/custom-select-control/index.d.ts.map +1 -1
  1502. package/build-types/custom-select-control-v2/custom-select.d.ts +2 -2
  1503. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  1504. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +1 -1
  1505. package/build-types/custom-select-control-v2/stories/default.story.d.ts +18 -6
  1506. package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +1 -1
  1507. package/build-types/custom-select-control-v2/styles.d.ts +2 -2
  1508. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  1509. package/build-types/custom-select-control-v2/types.d.ts +11 -15
  1510. package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
  1511. package/build-types/date-time/date/styles.d.ts +3 -3
  1512. package/build-types/date-time/date-time/styles.d.ts +2 -2
  1513. package/build-types/date-time/time/styles.d.ts +8 -8
  1514. package/build-types/dimension-control/stories/index.story.d.ts +10 -2
  1515. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  1516. package/build-types/divider/component.d.ts +1 -1
  1517. package/build-types/divider/styles.d.ts +1 -1
  1518. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  1519. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  1520. package/build-types/elevation/hook.d.ts +14 -14
  1521. package/build-types/flex/flex/hook.d.ts +16 -16
  1522. package/build-types/flex/flex-block/hook.d.ts +14 -14
  1523. package/build-types/flex/flex-item/hook.d.ts +14 -14
  1524. package/build-types/focal-point-picker/focal-point.d.ts +3 -0
  1525. package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
  1526. package/build-types/focal-point-picker/stories/index.story.d.ts +4 -4
  1527. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
  1528. package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
  1529. package/build-types/font-size-picker/styles.d.ts +2 -2
  1530. package/build-types/grid/hook.d.ts +14 -14
  1531. package/build-types/h-stack/component.d.ts +1 -1
  1532. package/build-types/h-stack/hook.d.ts +16 -16
  1533. package/build-types/heading/hook.d.ts +13 -13
  1534. package/build-types/index.d.ts +1 -0
  1535. package/build-types/index.d.ts.map +1 -1
  1536. package/build-types/input-control/input-base.d.ts +4 -5
  1537. package/build-types/input-control/input-base.d.ts.map +1 -1
  1538. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  1539. package/build-types/item-group/item/hook.d.ts +13 -13
  1540. package/build-types/item-group/item-group/hook.d.ts +14 -14
  1541. package/build-types/menu-item/index.d.ts +1 -1
  1542. package/build-types/menu-item/stories/index.story.d.ts +4 -4
  1543. package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
  1544. package/build-types/navigator/navigator-back-button/component.d.ts +2 -2
  1545. package/build-types/navigator/navigator-back-button/hook.d.ts +19 -19
  1546. package/build-types/navigator/navigator-button/component.d.ts +2 -2
  1547. package/build-types/navigator/navigator-button/hook.d.ts +19 -19
  1548. package/build-types/navigator/navigator-to-parent-button/component.d.ts +2 -2
  1549. package/build-types/number-control/index.d.ts +2 -2
  1550. package/build-types/number-control/stories/index.story.d.ts +2 -2
  1551. package/build-types/palette-edit/styles.d.ts +629 -629
  1552. package/build-types/popover/index.d.ts +1 -1
  1553. package/build-types/popover/overlay-middlewares.d.ts +2 -2
  1554. package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
  1555. package/build-types/private-apis.d.ts.map +1 -1
  1556. package/build-types/progress-bar/index.d.ts +15 -0
  1557. package/build-types/progress-bar/index.d.ts.map +1 -1
  1558. package/build-types/progress-bar/stories/index.story.d.ts +18 -0
  1559. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  1560. package/build-types/progress-bar/styles.d.ts.map +1 -1
  1561. package/build-types/range-control/index.d.ts +1 -1
  1562. package/build-types/range-control/styles/range-control-styles.d.ts +2 -2
  1563. package/build-types/scrollable/hook.d.ts +14 -14
  1564. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -1
  1565. package/build-types/snackbar/index.d.ts +1 -1
  1566. package/build-types/spacer/hook.d.ts +14 -14
  1567. package/build-types/surface/hook.d.ts +14 -14
  1568. package/build-types/tabs/stories/index.story.d.ts +1 -0
  1569. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  1570. package/build-types/tabs/styles.d.ts.map +1 -1
  1571. package/build-types/tabs/tablist.d.ts.map +1 -1
  1572. package/build-types/text/hook.d.ts +14 -14
  1573. package/build-types/text-control/index.d.ts +3 -3
  1574. package/build-types/textarea-control/index.d.ts +1 -1
  1575. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  1576. package/build-types/toggle-control/index.d.ts +1 -1
  1577. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  1578. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +1 -1
  1579. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +1 -1
  1580. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
  1581. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  1582. package/build-types/toolbar/toolbar-button/index.d.ts +9 -9
  1583. package/build-types/tools-panel/tools-panel/hook.d.ts +14 -14
  1584. package/build-types/tools-panel/tools-panel-header/hook.d.ts +14 -14
  1585. package/build-types/tools-panel/tools-panel-item/hook.d.ts +14 -14
  1586. package/build-types/tooltip/index.d.ts.map +1 -1
  1587. package/build-types/truncate/hook.d.ts +14 -14
  1588. package/build-types/unit-control/index.d.ts +1 -1
  1589. package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -2
  1590. package/build-types/utils/style-mixins.d.ts +0 -1
  1591. package/build-types/v-stack/component.d.ts +1 -1
  1592. package/build-types/v-stack/hook.d.ts +16 -16
  1593. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  1594. package/build-types/view/component.d.ts +157 -157
  1595. package/package.json +21 -20
  1596. package/src/animate/index.tsx +1 -1
  1597. package/src/animate/stories/index.story.tsx +6 -1
  1598. package/src/autocomplete/autocompleter-ui.native.js +2 -4
  1599. package/src/autocomplete/autocompleter-ui.tsx +68 -38
  1600. package/src/autocomplete/test/index.tsx +3 -3
  1601. package/src/button/index.native.js +1 -1
  1602. package/src/button/index.tsx +6 -2
  1603. package/src/circular-option-picker/circular-option-picker.tsx +2 -2
  1604. package/src/circular-option-picker/stories/index.story.tsx +1 -1
  1605. package/src/circular-option-picker/test/index.tsx +3 -9
  1606. package/src/color-indicator/index.native.js +1 -1
  1607. package/src/color-palette/index.native.js +2 -2
  1608. package/src/color-palette/stories/index.story.tsx +5 -8
  1609. package/src/color-picker/index.native.js +1 -1
  1610. package/src/combobox-control/README.md +9 -0
  1611. package/src/combobox-control/index.tsx +10 -1
  1612. package/src/combobox-control/stories/index.story.tsx +14 -0
  1613. package/src/combobox-control/types.ts +7 -0
  1614. package/src/composite/current/stories/index.story.tsx +1 -1
  1615. package/src/css.d.ts +9 -0
  1616. package/src/custom-gradient-picker/index.native.js +3 -1
  1617. package/src/custom-select-control/index.js +7 -4
  1618. package/src/custom-select-control-v2/custom-select.tsx +37 -36
  1619. package/src/custom-select-control-v2/legacy-component/index.tsx +22 -31
  1620. package/src/custom-select-control-v2/stories/default.story.tsx +0 -1
  1621. package/src/custom-select-control-v2/stories/legacy.story.tsx +1 -1
  1622. package/src/custom-select-control-v2/styles.ts +10 -8
  1623. package/src/custom-select-control-v2/types.ts +16 -15
  1624. package/src/dashicon/index.native.js +1 -1
  1625. package/src/dimension-control/stories/index.story.tsx +3 -2
  1626. package/src/dimension-control/test/__snapshots__/index.test.js.snap +0 -16
  1627. package/src/dimension-control/test/index.test.js +7 -10
  1628. package/src/draggable/test/index.native.js +2 -2
  1629. package/src/dropdown/stories/index.story.tsx +6 -2
  1630. package/src/dropdown-menu/index.native.js +2 -1
  1631. package/src/dropdown-menu-v2/stories/index.story.tsx +1 -2
  1632. package/src/dropdown-menu-v2/test/index.tsx +8 -3
  1633. package/src/focal-point-picker/focal-point.tsx +7 -4
  1634. package/src/focal-point-picker/index.native.js +2 -1
  1635. package/src/focal-point-picker/styles/focal-point-style.ts +3 -7
  1636. package/src/font-size-picker/index.native.js +6 -6
  1637. package/src/font-size-picker/index.tsx +2 -2
  1638. package/src/form-token-field/index.tsx +1 -1
  1639. package/src/index.native.js +0 -14
  1640. package/src/index.ts +1 -0
  1641. package/src/input-control/input-base.tsx +5 -1
  1642. package/src/input-control/styles/input-control-styles.tsx +0 -2
  1643. package/src/keyboard-shortcuts/stories/index.story.tsx +3 -1
  1644. package/src/menu-group/stories/index.story.tsx +1 -1
  1645. package/src/mobile/autocompletion-items.native.js +2 -2
  1646. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  1647. package/src/mobile/bottom-sheet/cell.native.js +3 -3
  1648. package/src/mobile/bottom-sheet/color-cell.native.js +3 -2
  1649. package/src/mobile/bottom-sheet/footer-message-cell.native.js +2 -2
  1650. package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +3 -3
  1651. package/src/mobile/bottom-sheet/nav-bar/action-button.native.js +1 -1
  1652. package/src/mobile/bottom-sheet/radio-cell.native.js +2 -2
  1653. package/src/mobile/bottom-sheet/stepper-cell/stepper.android.js +1 -1
  1654. package/src/mobile/bottom-sheet/stepper-cell/stepper.ios.js +1 -1
  1655. package/src/mobile/bottom-sheet/sub-sheet/index.native.js +6 -1
  1656. package/src/mobile/bottom-sheet/switch-cell.native.js +2 -2
  1657. package/src/mobile/bottom-sheet-select-control/index.native.js +4 -3
  1658. package/src/mobile/bottom-sheet-text-control/index.native.js +5 -7
  1659. package/src/mobile/color-settings/index.native.js +2 -1
  1660. package/src/mobile/color-settings/palette.screen.native.js +4 -7
  1661. package/src/mobile/color-settings/picker-screen.native.js +1 -1
  1662. package/src/mobile/focal-point-settings-panel/index.native.js +2 -1
  1663. package/src/mobile/gradient/index.native.js +1 -1
  1664. package/src/mobile/image/icon-customize.native.js +1 -1
  1665. package/src/mobile/image/icon-retry.native.js +2 -2
  1666. package/src/mobile/image/image-editing-button.native.js +2 -2
  1667. package/src/mobile/image/index.native.js +2 -2
  1668. package/src/mobile/link-picker/index.native.js +2 -1
  1669. package/src/mobile/link-picker/link-picker-results.native.js +2 -1
  1670. package/src/mobile/link-settings/link-rel.native.js +1 -1
  1671. package/src/mobile/media-edit/index.native.js +5 -1
  1672. package/src/mobile/picker/index.android.js +4 -3
  1673. package/src/mobile/picker/index.ios.js +1 -1
  1674. package/src/mobile/segmented-control/index.native.js +1 -1
  1675. package/src/mobile/utils/use-unit-converter-to-mobile.native.js +2 -14
  1676. package/src/notice/stories/index.story.tsx +1 -1
  1677. package/src/palette-edit/test/index.tsx +15 -11
  1678. package/src/panel/actions.native.js +1 -1
  1679. package/src/popover/index.tsx +1 -1
  1680. package/src/private-apis.ts +0 -2
  1681. package/src/progress-bar/README.md +39 -5
  1682. package/src/progress-bar/index.tsx +21 -8
  1683. package/src/progress-bar/stories/index.story.tsx +36 -3
  1684. package/src/progress-bar/styles.ts +4 -2
  1685. package/src/query-controls/index.native.js +2 -1
  1686. package/src/search-control/index.native.js +3 -2
  1687. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +2 -2
  1688. package/src/slot-fill/provider.tsx +2 -2
  1689. package/src/snackbar/list.tsx +3 -3
  1690. package/src/tab-panel/index.tsx +1 -1
  1691. package/src/tab-panel/style.scss +16 -0
  1692. package/src/tabs/stories/index.story.tsx +39 -31
  1693. package/src/tabs/styles.ts +43 -34
  1694. package/src/tabs/tablist.tsx +130 -3
  1695. package/src/theme/stories/index.story.tsx +0 -1
  1696. package/src/tools-panel/stories/index.story.tsx +1 -1
  1697. package/src/tools-panel/tools-panel-header/component.tsx +1 -1
  1698. package/src/tooltip/index.tsx +1 -4
  1699. package/src/tooltip/test/index.native.js +1 -5
  1700. package/src/unit-control/test/index.tsx +12 -12
  1701. package/src/utils/style-mixins.js +0 -1
  1702. package/tsconfig.json +1 -4
  1703. package/tsconfig.tsbuildinfo +1 -1
  1704. package/build/mobile/audio-player/audio-url-parser.native.js +0 -24
  1705. package/build/mobile/audio-player/audio-url-parser.native.js.map +0 -1
  1706. package/build/mobile/audio-player/index.native.js +0 -163
  1707. package/build/mobile/audio-player/index.native.js.map +0 -1
  1708. package/build/mobile/global-styles-context/index.native.js +0 -68
  1709. package/build/mobile/global-styles-context/index.native.js.map +0 -1
  1710. package/build/mobile/global-styles-context/utils.native.js +0 -405
  1711. package/build/mobile/global-styles-context/utils.native.js.map +0 -1
  1712. package/build/utils/reduce-motion.js +0 -38
  1713. package/build/utils/reduce-motion.js.map +0 -1
  1714. package/build-module/mobile/audio-player/audio-url-parser.native.js +0 -16
  1715. package/build-module/mobile/audio-player/audio-url-parser.native.js.map +0 -1
  1716. package/build-module/mobile/audio-player/index.native.js +0 -155
  1717. package/build-module/mobile/audio-player/index.native.js.map +0 -1
  1718. package/build-module/mobile/global-styles-context/index.native.js +0 -58
  1719. package/build-module/mobile/global-styles-context/index.native.js.map +0 -1
  1720. package/build-module/mobile/global-styles-context/utils.native.js +0 -387
  1721. package/build-module/mobile/global-styles-context/utils.native.js.map +0 -1
  1722. package/build-module/utils/reduce-motion.js +0 -32
  1723. package/build-module/utils/reduce-motion.js.map +0 -1
  1724. package/build-types/utils/reduce-motion.d.ts +0 -12
  1725. package/build-types/utils/reduce-motion.d.ts.map +0 -1
  1726. package/src/mobile/audio-player/audio-url-parser.native.js +0 -20
  1727. package/src/mobile/audio-player/index.native.js +0 -220
  1728. package/src/mobile/audio-player/styles.scss +0 -114
  1729. package/src/mobile/audio-player/test/audio-url-parser.native.js +0 -53
  1730. package/src/mobile/global-styles-context/index.native.js +0 -103
  1731. package/src/mobile/global-styles-context/test/fixtures/theme.native.js +0 -274
  1732. package/src/mobile/global-styles-context/test/utils.native.js +0 -168
  1733. package/src/mobile/global-styles-context/utils.native.js +0 -510
  1734. package/src/utils/reduce-motion.js +0 -35
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -27,6 +26,8 @@ import { useControlledValue } from '../utils/hooks';
27
26
  import { normalizeTextString } from '../utils/strings';
28
27
  import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';
29
28
  import { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';
29
+ import { jsx as _jsx } from "react/jsx-runtime";
30
+ import { jsxs as _jsxs } from "react/jsx-runtime";
30
31
  const noop = () => {};
31
32
  const DetectOutside = withFocusOutside(class extends Component {
32
33
  handleFocusOutside(event) {
@@ -103,7 +104,8 @@ function ComboboxControl(props) {
103
104
  messages = {
104
105
  selected: __('Item selected.')
105
106
  },
106
- __experimentalRenderItem
107
+ __experimentalRenderItem,
108
+ expandOnFocus = true
107
109
  } = useDeprecated36pxDefaultSizeProp(props);
108
110
  const [value, setValue] = useControlledValue({
109
111
  value: valueProp,
@@ -192,10 +194,15 @@ function ComboboxControl(props) {
192
194
  };
193
195
  const onFocus = () => {
194
196
  setInputHasFocus(true);
195
- setIsExpanded(true);
197
+ if (expandOnFocus) {
198
+ setIsExpanded(true);
199
+ }
196
200
  onFilterValueChange('');
197
201
  setInputValue('');
198
202
  };
203
+ const onClick = () => {
204
+ setIsExpanded(true);
205
+ };
199
206
  const onFocusOutside = () => {
200
207
  setIsExpanded(false);
201
208
  };
@@ -236,55 +243,64 @@ function ComboboxControl(props) {
236
243
  // input container intended accessible usability.
237
244
  // TODO: Refactor click detection to use blur to stop propagation.
238
245
  /* eslint-disable jsx-a11y/no-static-element-interactions */
239
- return createElement(DetectOutside, {
240
- onFocusOutside: onFocusOutside
241
- }, createElement(BaseControl, {
242
- __nextHasNoMarginBottom: __nextHasNoMarginBottom,
243
- className: clsx(className, 'components-combobox-control'),
244
- label: label,
245
- id: `components-form-token-input-${instanceId}`,
246
- hideLabelFromVision: hideLabelFromVision,
247
- help: help
248
- }, createElement("div", {
249
- className: "components-combobox-control__suggestions-container",
250
- tabIndex: -1,
251
- onKeyDown: onKeyDown
252
- }, createElement(InputWrapperFlex, {
253
- __next40pxDefaultSize: __next40pxDefaultSize
254
- }, createElement(FlexBlock, null, createElement(TokenInput, {
255
- className: "components-combobox-control__input",
256
- instanceId: instanceId,
257
- ref: inputContainer,
258
- value: isExpanded ? inputValue : currentLabel,
259
- onFocus: onFocus,
260
- onBlur: onBlur,
261
- isExpanded: isExpanded,
262
- selectedSuggestionIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),
263
- onChange: onInputChange
264
- })), allowReset && createElement(FlexItem, null, createElement(Button, {
265
- className: "components-combobox-control__reset",
266
- icon: closeSmall,
267
- disabled: !value,
268
- onClick: handleOnReset,
269
- label: __('Reset')
270
- }))), isExpanded && createElement(SuggestionsList, {
271
- instanceId: instanceId
272
- // The empty string for `value` here is not actually used, but is
273
- // just a quick way to satisfy the TypeScript requirements of SuggestionsList.
274
- // See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330
275
- ,
276
- match: {
277
- label: inputValue,
278
- value: ''
279
- },
280
- displayTransform: suggestion => suggestion.label,
281
- suggestions: matchingSuggestions,
282
- selectedIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),
283
- onHover: setSelectedSuggestion,
284
- onSelect: onSuggestionSelected,
285
- scrollIntoView: true,
286
- __experimentalRenderItem: __experimentalRenderItem
287
- }))));
246
+ return /*#__PURE__*/_jsx(DetectOutside, {
247
+ onFocusOutside: onFocusOutside,
248
+ children: /*#__PURE__*/_jsx(BaseControl, {
249
+ __nextHasNoMarginBottom: __nextHasNoMarginBottom,
250
+ className: clsx(className, 'components-combobox-control'),
251
+ label: label,
252
+ id: `components-form-token-input-${instanceId}`,
253
+ hideLabelFromVision: hideLabelFromVision,
254
+ help: help,
255
+ children: /*#__PURE__*/_jsxs("div", {
256
+ className: "components-combobox-control__suggestions-container",
257
+ tabIndex: -1,
258
+ onKeyDown: onKeyDown,
259
+ children: [/*#__PURE__*/_jsxs(InputWrapperFlex, {
260
+ __next40pxDefaultSize: __next40pxDefaultSize,
261
+ children: [/*#__PURE__*/_jsx(FlexBlock, {
262
+ children: /*#__PURE__*/_jsx(TokenInput, {
263
+ className: "components-combobox-control__input",
264
+ instanceId: instanceId,
265
+ ref: inputContainer,
266
+ value: isExpanded ? inputValue : currentLabel,
267
+ onFocus: onFocus,
268
+ onBlur: onBlur,
269
+ onClick: onClick,
270
+ isExpanded: isExpanded,
271
+ selectedSuggestionIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),
272
+ onChange: onInputChange
273
+ })
274
+ }), allowReset && /*#__PURE__*/_jsx(FlexItem, {
275
+ children: /*#__PURE__*/_jsx(Button, {
276
+ className: "components-combobox-control__reset",
277
+ icon: closeSmall,
278
+ disabled: !value,
279
+ onClick: handleOnReset,
280
+ label: __('Reset')
281
+ })
282
+ })]
283
+ }), isExpanded && /*#__PURE__*/_jsx(SuggestionsList, {
284
+ instanceId: instanceId
285
+ // The empty string for `value` here is not actually used, but is
286
+ // just a quick way to satisfy the TypeScript requirements of SuggestionsList.
287
+ // See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330
288
+ ,
289
+ match: {
290
+ label: inputValue,
291
+ value: ''
292
+ },
293
+ displayTransform: suggestion => suggestion.label,
294
+ suggestions: matchingSuggestions,
295
+ selectedIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),
296
+ onHover: setSelectedSuggestion,
297
+ onSelect: onSuggestionSelected,
298
+ scrollIntoView: true,
299
+ __experimentalRenderItem: __experimentalRenderItem
300
+ })]
301
+ })
302
+ })
303
+ });
288
304
  /* eslint-enable jsx-a11y/no-static-element-interactions */
289
305
  }
290
306
  export default ComboboxControl;
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","_n","sprintf","Component","useState","useMemo","useRef","useEffect","useInstanceId","speak","closeSmall","InputWrapperFlex","TokenInput","SuggestionsList","BaseControl","Button","FlexBlock","FlexItem","withFocusOutside","useControlledValue","normalizeTextString","useDeprecated36pxDefaultSizeProp","withIgnoreIMEEvents","noop","DetectOutside","handleFocusOutside","event","props","onFocusOutside","render","children","getIndexOfMatchingSuggestion","selectedSuggestion","matchingSuggestions","indexOf","ComboboxControl","_currentOption$label","__nextHasNoMarginBottom","__next40pxDefaultSize","value","valueProp","label","options","onChange","onChangeProp","onFilterValueChange","hideLabelFromVision","help","allowReset","className","messages","selected","__experimentalRenderItem","setValue","currentOption","find","option","currentLabel","instanceId","setSelectedSuggestion","isExpanded","setIsExpanded","inputHasFocus","setInputHasFocus","inputValue","setInputValue","inputContainer","startsWithMatch","containsMatch","match","forEach","index","push","concat","onSuggestionSelected","newSelectedSuggestion","disabled","handleArrowNavigation","offset","nextIndex","length","onKeyDown","preventDefault","defaultPrevented","code","onBlur","onFocus","onInputChange","text","handleOnReset","current","focus","hasMatchingSuggestions","hasSelectedMatchingSuggestions","message","createElement","id","tabIndex","ref","selectedSuggestionIndex","icon","onClick","displayTransform","suggestion","suggestions","selectedIndex","onHover","onSelect","scrollIntoView"],"sources":["@wordpress/components/src/combobox-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tComponent,\n\tuseState,\n\tuseMemo,\n\tuseRef,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock, FlexItem } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport type { ComboboxControlOption, ComboboxControlProps } from './types';\nimport type { TokenInputProps } from '../form-token-field/types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\nconst noop = () => {};\n\ninterface DetectOutsideComponentProps {\n\tonFocusOutside: ( event: React.FocusEvent ) => void;\n\tchildren?: React.ReactNode;\n}\n\nconst DetectOutside = withFocusOutside(\n\tclass extends Component< DetectOutsideComponentProps > {\n\t\thandleFocusOutside( event: React.FocusEvent ) {\n\t\t\tthis.props.onFocusOutside( event );\n\t\t}\n\n\t\trender() {\n\t\t\treturn this.props.children;\n\t\t}\n\t}\n);\n\nconst getIndexOfMatchingSuggestion = (\n\tselectedSuggestion: ComboboxControlOption | null,\n\tmatchingSuggestions: ComboboxControlOption[]\n) =>\n\tselectedSuggestion === null\n\t\t? -1\n\t\t: matchingSuggestions.indexOf( selectedSuggestion );\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl( props: ComboboxControlProps ) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\tvalue: valueProp,\n\t\tlabel,\n\t\toptions,\n\t\tonChange: onChangeProp,\n\t\tonFilterValueChange = noop,\n\t\thideLabelFromVision,\n\t\thelp,\n\t\tallowReset = true,\n\t\tclassName,\n\t\tmessages = {\n\t\t\tselected: __( 'Item selected.' ),\n\t\t},\n\t\t__experimentalRenderItem,\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst [ value, setValue ] = useControlledValue( {\n\t\tvalue: valueProp,\n\t\tonChange: onChangeProp,\n\t} );\n\n\tconst currentOption = options.find( ( option ) => option.value === value );\n\tconst currentLabel = currentOption?.label ?? '';\n\t// Use a custom prefix when generating the `instanceId` to avoid having\n\t// duplicate input IDs when rendering this component and `FormTokenField`\n\t// in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n\tconst instanceId = useInstanceId( ComboboxControl, 'combobox-control' );\n\tconst [ selectedSuggestion, setSelectedSuggestion ] = useState(\n\t\tcurrentOption || null\n\t);\n\tconst [ isExpanded, setIsExpanded ] = useState( false );\n\tconst [ inputHasFocus, setInputHasFocus ] = useState( false );\n\tconst [ inputValue, setInputValue ] = useState( '' );\n\tconst inputContainer = useRef< HTMLInputElement >( null );\n\n\tconst matchingSuggestions = useMemo( () => {\n\t\tconst startsWithMatch: ComboboxControlOption[] = [];\n\t\tconst containsMatch: ComboboxControlOption[] = [];\n\t\tconst match = normalizeTextString( inputValue );\n\t\toptions.forEach( ( option ) => {\n\t\t\tconst index = normalizeTextString( option.label ).indexOf( match );\n\t\t\tif ( index === 0 ) {\n\t\t\t\tstartsWithMatch.push( option );\n\t\t\t} else if ( index > 0 ) {\n\t\t\t\tcontainsMatch.push( option );\n\t\t\t}\n\t\t} );\n\n\t\treturn startsWithMatch.concat( containsMatch );\n\t}, [ inputValue, options ] );\n\n\tconst onSuggestionSelected = (\n\t\tnewSelectedSuggestion: ComboboxControlOption\n\t) => {\n\t\tif ( newSelectedSuggestion.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetValue( newSelectedSuggestion.value );\n\t\tspeak( messages.selected, 'assertive' );\n\t\tsetSelectedSuggestion( newSelectedSuggestion );\n\t\tsetInputValue( '' );\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst handleArrowNavigation = ( offset = 1 ) => {\n\t\tconst index = getIndexOfMatchingSuggestion(\n\t\t\tselectedSuggestion,\n\t\t\tmatchingSuggestions\n\t\t);\n\t\tlet nextIndex = index + offset;\n\t\tif ( nextIndex < 0 ) {\n\t\t\tnextIndex = matchingSuggestions.length - 1;\n\t\t} else if ( nextIndex >= matchingSuggestions.length ) {\n\t\t\tnextIndex = 0;\n\t\t}\n\t\tsetSelectedSuggestion( matchingSuggestions[ nextIndex ] );\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onKeyDown: React.KeyboardEventHandler< HTMLDivElement > =\n\t\twithIgnoreIMEEvents( ( event ) => {\n\t\t\tlet preventDefault = false;\n\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tswitch ( event.code ) {\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tif ( selectedSuggestion ) {\n\t\t\t\t\t\tonSuggestionSelected( selectedSuggestion );\n\t\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\thandleArrowNavigation( -1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\thandleArrowNavigation( 1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tsetIsExpanded( false );\n\t\t\t\t\tsetSelectedSuggestion( null );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\n\tconst onBlur = () => {\n\t\tsetInputHasFocus( false );\n\t};\n\n\tconst onFocus = () => {\n\t\tsetInputHasFocus( true );\n\t\tsetIsExpanded( true );\n\t\tonFilterValueChange( '' );\n\t\tsetInputValue( '' );\n\t};\n\n\tconst onFocusOutside = () => {\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst onInputChange: TokenInputProps[ 'onChange' ] = ( event ) => {\n\t\tconst text = event.value;\n\t\tsetInputValue( text );\n\t\tonFilterValueChange( text );\n\t\tif ( inputHasFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tsetValue( null );\n\t\tinputContainer.current?.focus();\n\t};\n\n\t// Update current selections when the filter input changes.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tconst hasSelectedMatchingSuggestions =\n\t\t\tgetIndexOfMatchingSuggestion(\n\t\t\t\tselectedSuggestion,\n\t\t\t\tmatchingSuggestions\n\t\t\t) > 0;\n\n\t\tif ( hasMatchingSuggestions && ! hasSelectedMatchingSuggestions ) {\n\t\t\t// If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n\t\t\tsetSelectedSuggestion( matchingSuggestions[ 0 ] );\n\t\t}\n\t}, [ matchingSuggestions, selectedSuggestion ] );\n\n\t// Announcements.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tif ( isExpanded ) {\n\t\t\tconst message = hasMatchingSuggestions\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t_n(\n\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'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t )\n\t\t\t\t: __( 'No results.' );\n\n\t\t\tspeak( message, 'polite' );\n\t\t}\n\t}, [ matchingSuggestions, isExpanded ] );\n\n\t// Disable reason: There is no appropriate role which describes the\n\t// input container intended accessible usability.\n\t// TODO: Refactor click detection to use blur to stop propagation.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<DetectOutside onFocusOutside={ onFocusOutside }>\n\t\t\t<BaseControl\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\tclassName={ clsx( className, 'components-combobox-control' ) }\n\t\t\t\tlabel={ label }\n\t\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\thelp={ help }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-combobox-control__suggestions-container\"\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<InputWrapperFlex\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexBlock>\n\t\t\t\t\t\t\t<TokenInput\n\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__input\"\n\t\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t\tref={ inputContainer }\n\t\t\t\t\t\t\t\tvalue={ isExpanded ? inputValue : currentLabel }\n\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tselectedSuggestionIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t\t{ allowReset && (\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__reset\"\n\t\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\t\tdisabled={ ! value }\n\t\t\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Reset' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</InputWrapperFlex>\n\t\t\t\t\t{ isExpanded && (\n\t\t\t\t\t\t<SuggestionsList\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t// The empty string for `value` here is not actually used, but is\n\t\t\t\t\t\t\t// just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n\t\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n\t\t\t\t\t\t\tmatch={ { label: inputValue, value: '' } }\n\t\t\t\t\t\t\tdisplayTransform={ ( suggestion ) =>\n\t\t\t\t\t\t\t\tsuggestion.label\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ matchingSuggestions }\n\t\t\t\t\t\t\tselectedIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonHover={ setSelectedSuggestion }\n\t\t\t\t\t\t\tonSelect={ onSuggestionSelected }\n\t\t\t\t\t\t\tscrollIntoView\n\t\t\t\t\t\t\t__experimentalRenderItem={\n\t\t\t\t\t\t\t\t__experimentalRenderItem\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</BaseControl>\n\t\t</DetectOutside>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n}\n\nexport default ComboboxControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SACCC,SAAS,EACTC,QAAQ,EACRC,OAAO,EACPC,MAA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AAA;IACAW,KAAK,EAAG;MAAE5B,KAAK,EAAEuB,UAAU;MAAEzB,KAAK,EAAE;IAAG,CAAG;IAC1C+D,gBAAgB,EAAKC,UAAU,IAC9BA,UAAU,CAAC9D,KACX;IACD+D,WAAW,EAAGvE,mBAAqB;IACnCwE,aAAa,EAAG1E,4BAA4B,CAC3CC,kBAAkB,EAClBC,mBACD,CAAG;IACHyE,OAAO,EAAG/C,qBAAuB;IACjCgD,QAAQ,EAAGjC,oBAAsB;IACjCkC,cAAc;IACdxD,wBAAwB,EACvBA;EACA,CACD,CAEE,CACO,CACC,CAAC;EAEjB;AACD;AAEA,eAAejB,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","_n","sprintf","Component","useState","useMemo","useRef","useEffect","useInstanceId","speak","closeSmall","InputWrapperFlex","TokenInput","SuggestionsList","BaseControl","Button","FlexBlock","FlexItem","withFocusOutside","useControlledValue","normalizeTextString","useDeprecated36pxDefaultSizeProp","withIgnoreIMEEvents","jsx","_jsx","jsxs","_jsxs","noop","DetectOutside","handleFocusOutside","event","props","onFocusOutside","render","children","getIndexOfMatchingSuggestion","selectedSuggestion","matchingSuggestions","indexOf","ComboboxControl","_currentOption$label","__nextHasNoMarginBottom","__next40pxDefaultSize","value","valueProp","label","options","onChange","onChangeProp","onFilterValueChange","hideLabelFromVision","help","allowReset","className","messages","selected","__experimentalRenderItem","expandOnFocus","setValue","currentOption","find","option","currentLabel","instanceId","setSelectedSuggestion","isExpanded","setIsExpanded","inputHasFocus","setInputHasFocus","inputValue","setInputValue","inputContainer","startsWithMatch","containsMatch","match","forEach","index","push","concat","onSuggestionSelected","newSelectedSuggestion","disabled","handleArrowNavigation","offset","nextIndex","length","onKeyDown","preventDefault","defaultPrevented","code","onBlur","onFocus","onClick","onInputChange","text","handleOnReset","current","focus","hasMatchingSuggestions","hasSelectedMatchingSuggestions","message","id","tabIndex","ref","selectedSuggestionIndex","icon","displayTransform","suggestion","suggestions","selectedIndex","onHover","onSelect","scrollIntoView"],"sources":["@wordpress/components/src/combobox-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tComponent,\n\tuseState,\n\tuseMemo,\n\tuseRef,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock, FlexItem } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport type { ComboboxControlOption, ComboboxControlProps } from './types';\nimport type { TokenInputProps } from '../form-token-field/types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\nconst noop = () => {};\n\ninterface DetectOutsideComponentProps {\n\tonFocusOutside: ( event: React.FocusEvent ) => void;\n\tchildren?: React.ReactNode;\n}\n\nconst DetectOutside = withFocusOutside(\n\tclass extends Component< DetectOutsideComponentProps > {\n\t\thandleFocusOutside( event: React.FocusEvent ) {\n\t\t\tthis.props.onFocusOutside( event );\n\t\t}\n\n\t\trender() {\n\t\t\treturn this.props.children;\n\t\t}\n\t}\n);\n\nconst getIndexOfMatchingSuggestion = (\n\tselectedSuggestion: ComboboxControlOption | null,\n\tmatchingSuggestions: ComboboxControlOption[]\n) =>\n\tselectedSuggestion === null\n\t\t? -1\n\t\t: matchingSuggestions.indexOf( selectedSuggestion );\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl( props: ComboboxControlProps ) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\tvalue: valueProp,\n\t\tlabel,\n\t\toptions,\n\t\tonChange: onChangeProp,\n\t\tonFilterValueChange = noop,\n\t\thideLabelFromVision,\n\t\thelp,\n\t\tallowReset = true,\n\t\tclassName,\n\t\tmessages = {\n\t\t\tselected: __( 'Item selected.' ),\n\t\t},\n\t\t__experimentalRenderItem,\n\t\texpandOnFocus = true,\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst [ value, setValue ] = useControlledValue( {\n\t\tvalue: valueProp,\n\t\tonChange: onChangeProp,\n\t} );\n\n\tconst currentOption = options.find( ( option ) => option.value === value );\n\tconst currentLabel = currentOption?.label ?? '';\n\t// Use a custom prefix when generating the `instanceId` to avoid having\n\t// duplicate input IDs when rendering this component and `FormTokenField`\n\t// in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n\tconst instanceId = useInstanceId( ComboboxControl, 'combobox-control' );\n\tconst [ selectedSuggestion, setSelectedSuggestion ] = useState(\n\t\tcurrentOption || null\n\t);\n\tconst [ isExpanded, setIsExpanded ] = useState( false );\n\tconst [ inputHasFocus, setInputHasFocus ] = useState( false );\n\tconst [ inputValue, setInputValue ] = useState( '' );\n\tconst inputContainer = useRef< HTMLInputElement >( null );\n\n\tconst matchingSuggestions = useMemo( () => {\n\t\tconst startsWithMatch: ComboboxControlOption[] = [];\n\t\tconst containsMatch: ComboboxControlOption[] = [];\n\t\tconst match = normalizeTextString( inputValue );\n\t\toptions.forEach( ( option ) => {\n\t\t\tconst index = normalizeTextString( option.label ).indexOf( match );\n\t\t\tif ( index === 0 ) {\n\t\t\t\tstartsWithMatch.push( option );\n\t\t\t} else if ( index > 0 ) {\n\t\t\t\tcontainsMatch.push( option );\n\t\t\t}\n\t\t} );\n\n\t\treturn startsWithMatch.concat( containsMatch );\n\t}, [ inputValue, options ] );\n\n\tconst onSuggestionSelected = (\n\t\tnewSelectedSuggestion: ComboboxControlOption\n\t) => {\n\t\tif ( newSelectedSuggestion.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetValue( newSelectedSuggestion.value );\n\t\tspeak( messages.selected, 'assertive' );\n\t\tsetSelectedSuggestion( newSelectedSuggestion );\n\t\tsetInputValue( '' );\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst handleArrowNavigation = ( offset = 1 ) => {\n\t\tconst index = getIndexOfMatchingSuggestion(\n\t\t\tselectedSuggestion,\n\t\t\tmatchingSuggestions\n\t\t);\n\t\tlet nextIndex = index + offset;\n\t\tif ( nextIndex < 0 ) {\n\t\t\tnextIndex = matchingSuggestions.length - 1;\n\t\t} else if ( nextIndex >= matchingSuggestions.length ) {\n\t\t\tnextIndex = 0;\n\t\t}\n\t\tsetSelectedSuggestion( matchingSuggestions[ nextIndex ] );\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onKeyDown: React.KeyboardEventHandler< HTMLDivElement > =\n\t\twithIgnoreIMEEvents( ( event ) => {\n\t\t\tlet preventDefault = false;\n\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tswitch ( event.code ) {\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tif ( selectedSuggestion ) {\n\t\t\t\t\t\tonSuggestionSelected( selectedSuggestion );\n\t\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\thandleArrowNavigation( -1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\thandleArrowNavigation( 1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tsetIsExpanded( false );\n\t\t\t\t\tsetSelectedSuggestion( null );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\n\tconst onBlur = () => {\n\t\tsetInputHasFocus( false );\n\t};\n\n\tconst onFocus = () => {\n\t\tsetInputHasFocus( true );\n\t\tif ( expandOnFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\n\t\tonFilterValueChange( '' );\n\t\tsetInputValue( '' );\n\t};\n\n\tconst onClick = () => {\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onFocusOutside = () => {\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst onInputChange: TokenInputProps[ 'onChange' ] = ( event ) => {\n\t\tconst text = event.value;\n\t\tsetInputValue( text );\n\t\tonFilterValueChange( text );\n\t\tif ( inputHasFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tsetValue( null );\n\t\tinputContainer.current?.focus();\n\t};\n\n\t// Update current selections when the filter input changes.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tconst hasSelectedMatchingSuggestions =\n\t\t\tgetIndexOfMatchingSuggestion(\n\t\t\t\tselectedSuggestion,\n\t\t\t\tmatchingSuggestions\n\t\t\t) > 0;\n\n\t\tif ( hasMatchingSuggestions && ! hasSelectedMatchingSuggestions ) {\n\t\t\t// If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n\t\t\tsetSelectedSuggestion( matchingSuggestions[ 0 ] );\n\t\t}\n\t}, [ matchingSuggestions, selectedSuggestion ] );\n\n\t// Announcements.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tif ( isExpanded ) {\n\t\t\tconst message = hasMatchingSuggestions\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t_n(\n\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'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t )\n\t\t\t\t: __( 'No results.' );\n\n\t\t\tspeak( message, 'polite' );\n\t\t}\n\t}, [ matchingSuggestions, isExpanded ] );\n\n\t// Disable reason: There is no appropriate role which describes the\n\t// input container intended accessible usability.\n\t// TODO: Refactor click detection to use blur to stop propagation.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<DetectOutside onFocusOutside={ onFocusOutside }>\n\t\t\t<BaseControl\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\tclassName={ clsx( className, 'components-combobox-control' ) }\n\t\t\t\tlabel={ label }\n\t\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\thelp={ help }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-combobox-control__suggestions-container\"\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<InputWrapperFlex\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexBlock>\n\t\t\t\t\t\t\t<TokenInput\n\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__input\"\n\t\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t\tref={ inputContainer }\n\t\t\t\t\t\t\t\tvalue={ isExpanded ? inputValue : currentLabel }\n\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tselectedSuggestionIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t\t{ allowReset && (\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__reset\"\n\t\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\t\tdisabled={ ! value }\n\t\t\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Reset' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</InputWrapperFlex>\n\t\t\t\t\t{ isExpanded && (\n\t\t\t\t\t\t<SuggestionsList\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t// The empty string for `value` here is not actually used, but is\n\t\t\t\t\t\t\t// just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n\t\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n\t\t\t\t\t\t\tmatch={ { label: inputValue, value: '' } }\n\t\t\t\t\t\t\tdisplayTransform={ ( suggestion ) =>\n\t\t\t\t\t\t\t\tsuggestion.label\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ matchingSuggestions }\n\t\t\t\t\t\t\tselectedIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonHover={ setSelectedSuggestion }\n\t\t\t\t\t\t\tonSelect={ onSuggestionSelected }\n\t\t\t\t\t\t\tscrollIntoView\n\t\t\t\t\t\t\t__experimentalRenderItem={\n\t\t\t\t\t\t\t\t__experimentalRenderItem\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</BaseControl>\n\t\t</DetectOutside>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n}\n\nexport default ComboboxControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SACCC,SAAS,EACTC,QAAQ,EACRC,OAAO,EACPC,MAAM,EACNC,SAAS,QACH,oBAAoB;AAC3B,SAASC,aAAa,QAAQ,oBAAoB;AAClD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cAC9CoD,IAAI,EAAG/F,UAAY;cACnBuE,QAAQ,EAAG,CAAEtC,KAAO;cACpBiD,OAAO,EAAGG,aAAe;cACzBlD,KAAK,EAAG7C,EAAE,CAAE,OAAQ;YAAG,CACvB;UAAC,CACO,CACV;QAAA,CACgB,CAAC,EACjBiE,UAAU,iBACXzC,IAAA,CAACX,eAAe;UACfkD,UAAU,EAAGA;UACb;UACA;UACA;UAAA;UACAW,KAAK,EAAG;YAAE7B,KAAK,EAAEwB,UAAU;YAAE1B,KAAK,EAAE;UAAG,CAAG;UAC1C+D,gBAAgB,EAAKC,UAAU,IAC9BA,UAAU,CAAC9D,KACX;UACD+D,WAAW,EAAGvE,mBAAqB;UACnCwE,aAAa,EAAG1E,4BAA4B,CAC3CC,kBAAkB,EAClBC,mBACD,CAAG;UACHyE,OAAO,EAAG9C,qBAAuB;UACjC+C,QAAQ,EAAGhC,oBAAsB;UACjCiC,cAAc;UACdxD,wBAAwB,EACvBA;QACA,CACD,CACD;MAAA,CACG;IAAC,CACM;EAAC,CACA,CAAC;EAEjB;AACD;AAEA,eAAejB,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/combobox-control/types.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { BaseControlProps } from '../base-control/types';\n\nexport type ComboboxControlOption = {\n\tlabel: string;\n\tvalue: string;\n\tdisabled?: boolean;\n\t[ key: string ]: any;\n};\n\nexport type ComboboxControlProps = Pick<\n\tBaseControlProps,\n\t| '__nextHasNoMarginBottom'\n\t| 'className'\n\t| 'label'\n\t| 'hideLabelFromVision'\n\t| 'help'\n> & {\n\t/**\n\t * Custom renderer invoked for each option in the suggestion list.\n\t * The render prop receives as its argument an object containing, under the `item` key,\n\t * the single option's data (directly from the array of data passed to the `options` prop).\n\t */\n\t__experimentalRenderItem?: ( args: {\n\t\titem: ComboboxControlOption;\n\t} ) => React.ReactNode;\n\t/**\n\t * Deprecated. Use `__next40pxDefaultSize` instead.\n\t *\n\t * @default false\n\t * @deprecated\n\t */\n\t__next36pxDefaultSize?: boolean;\n\t/**\n\t * Start opting into the larger default height that will become the default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n\t/**\n\t * Show a reset button to clear the input.\n\t *\n\t * @default true\n\t */\n\tallowReset?: boolean;\n\t/**\n\t * Customizable UI messages.\n\t */\n\tmessages?: {\n\t\t/**\n\t\t * The message to announce to screen readers when a suggestion is selected.\n\t\t *\n\t\t * @default `__( 'Item selected.' )`\n\t\t */\n\t\tselected: string;\n\t};\n\t/**\n\t * Function called with the selected value changes.\n\t */\n\tonChange?: ( value: ComboboxControlProps[ 'value' ] ) => void;\n\t/**\n\t * Function called when the control's search input value changes. The argument contains the next input value.\n\t *\n\t * @default noop\n\t */\n\tonFilterValueChange?: ( value: string ) => void;\n\t/**\n\t * The options that can be chosen from.\n\t */\n\toptions: ComboboxControlOption[];\n\t/**\n\t * The current value of the control.\n\t */\n\tvalue?: string | null;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/combobox-control/types.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { BaseControlProps } from '../base-control/types';\n\nexport type ComboboxControlOption = {\n\tlabel: string;\n\tvalue: string;\n\tdisabled?: boolean;\n\t[ key: string ]: any;\n};\n\nexport type ComboboxControlProps = Pick<\n\tBaseControlProps,\n\t| '__nextHasNoMarginBottom'\n\t| 'className'\n\t| 'label'\n\t| 'hideLabelFromVision'\n\t| 'help'\n> & {\n\t/**\n\t * Custom renderer invoked for each option in the suggestion list.\n\t * The render prop receives as its argument an object containing, under the `item` key,\n\t * the single option's data (directly from the array of data passed to the `options` prop).\n\t */\n\t__experimentalRenderItem?: ( args: {\n\t\titem: ComboboxControlOption;\n\t} ) => React.ReactNode;\n\t/**\n\t * Deprecated. Use `__next40pxDefaultSize` instead.\n\t *\n\t * @default false\n\t * @deprecated\n\t */\n\t__next36pxDefaultSize?: boolean;\n\t/**\n\t * Start opting into the larger default height that will become the default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n\t/**\n\t * Show a reset button to clear the input.\n\t *\n\t * @default true\n\t */\n\tallowReset?: boolean;\n\t/**\n\t * Automatically expand the dropdown when the control is focused.\n\t * If the control is clicked, the dropdown will expand regardless of this prop.\n\t *\n\t * @default true\n\t */\n\texpandOnFocus?: boolean;\n\t/**\n\t * Customizable UI messages.\n\t */\n\tmessages?: {\n\t\t/**\n\t\t * The message to announce to screen readers when a suggestion is selected.\n\t\t *\n\t\t * @default `__( 'Item selected.' )`\n\t\t */\n\t\tselected: string;\n\t};\n\t/**\n\t * Function called with the selected value changes.\n\t */\n\tonChange?: ( value: ComboboxControlProps[ 'value' ] ) => void;\n\t/**\n\t * Function called when the control's search input value changes. The argument contains the next input value.\n\t *\n\t * @default noop\n\t */\n\tonFilterValueChange?: ( value: string ) => void;\n\t/**\n\t * The options that can be chosen from.\n\t */\n\toptions: ComboboxControlOption[];\n\t/**\n\t * The current value of the control.\n\t */\n\tvalue?: string | null;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * Composite is a component that may contain navigable items represented by
4
3
  * CompositeItem. It's inspired by the WAI-ARIA Composite Role and implements
@@ -24,7 +23,7 @@ import { useInstanceId } from '@wordpress/compose';
24
23
  // single `state` prop, or via individual props, usually through
25
24
  // spreading the state generated by `useCompositeState`.
26
25
  // That is, `<Composite* { ...state }>`.
27
-
26
+ import { jsx as _jsx } from "react/jsx-runtime";
28
27
  function mapLegacyStatePropsToComponentProps(legacyProps) {
29
28
  // If a `state` prop is provided, we unpack that; otherwise,
30
29
  // the necessary props are provided directly in `legacyProps`.
@@ -63,7 +62,7 @@ function proxyComposite(ProxiedComponent, propMap = {}) {
63
62
  }
64
63
  });
65
64
  delete props.baseId;
66
- return createElement(ProxiedComponent, {
65
+ return /*#__PURE__*/_jsx(ProxiedComponent, {
67
66
  ...props,
68
67
  store: store
69
68
  });
@@ -81,7 +80,7 @@ const unproxiedCompositeGroup = forwardRef(({
81
80
  ...props
82
81
  }, ref) => {
83
82
  const Component = role === 'row' ? Current.CompositeRow : Current.CompositeGroup;
84
- return createElement(Component, {
83
+ return /*#__PURE__*/_jsx(Component, {
85
84
  ref: ref,
86
85
  role: role,
87
86
  ...props
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","Current","useInstanceId","mapLegacyStatePropsToComponentProps","legacyProps","state","rest","store","props","proxyComposite","ProxiedComponent","propMap","displayName","Component","id","baseId","Object","entries","forEach","from","to","hasOwnProperty","assign","createElement","unproxiedCompositeGroup","role","ref","CompositeRow","CompositeGroup","Composite","CompositeItem","focusable","useCompositeState","legacyStateOptions","currentId","defaultActiveId","orientation","rtl","loop","focusLoop","wrap","focusWrap","shift","focusShift","unstable_virtual","virtualFocus","useCompositeStore"],"sources":["@wordpress/components/src/composite/legacy/index.tsx"],"sourcesContent":["/**\n * Composite is a component that may contain navigable items represented by\n * CompositeItem. It's inspired by the WAI-ARIA Composite Role and implements\n * all the keyboard navigation mechanisms to ensure that there's only one\n * tab stop for the whole Composite element. This means that it can behave as\n * a roving tabindex or aria-activedescendant container.\n *\n * @see https://ariakit.org/components/composite\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as Current from '../current';\nimport { useInstanceId } from '@wordpress/compose';\n\ntype Orientation = 'horizontal' | 'vertical';\n\nexport interface LegacyStateOptions {\n\t/**\n\t * ID that will serve as a base for all the items IDs.\n\t */\n\tbaseId?: string;\n\t/**\n\t * Determines how next and previous functions will behave. If `rtl` is set\n\t * to `true`, they will be inverted. This only affects the composite widget\n\t * behavior. You still need to set `dir=\"rtl\"` on HTML/CSS.\n\t *\n\t * @default false\n\t */\n\trtl?: boolean;\n\t/**\n\t * Defines the orientation of the composite widget. If the composite has a\n\t * single row or column (one-dimensional), the orientation value determines\n\t * which arrow keys can be used to move focus.\n\t */\n\torientation?: Orientation;\n\t/**\n\t * The current focused item `id`.\n\t */\n\tcurrentId?: string;\n\t/**\n\t * Determines how focus moves from the start and end of rows and columns.\n\t *\n\t * @default false\n\t */\n\tloop?: boolean | Orientation;\n\t/**\n\t * If enabled, moving to the next item from the last one in a row or column\n\t * will focus the first item in the next row or column and vice-versa.\n\t *\n\t * ** Has effect only on two-dimensional composites. **\n\t *\n\t * @default false\n\t */\n\twrap?: boolean | Orientation;\n\t/**\n\t * If enabled, moving up or down when there's no next item or the next item\n\t * is disabled will shift to the item right before it.\n\t *\n\t * ** Has effect only on two-dimensional composites. **\n\t *\n\t * @default false\n\t */\n\tshift?: boolean;\n\tunstable_virtual?: boolean;\n}\n\ntype Component = React.FunctionComponent< any >;\n\ntype CompositeStore = ReturnType< typeof Current.useCompositeStore >;\ntype CompositeStoreState = { store: CompositeStore };\nexport type CompositeState = CompositeStoreState &\n\tRequired< Pick< LegacyStateOptions, 'baseId' > >;\n\n// Legacy composite components can either provide state through a\n// single `state` prop, or via individual props, usually through\n// spreading the state generated by `useCompositeState`.\n// That is, `<Composite* { ...state }>`.\nexport type CompositeStateProps =\n\t| { state: CompositeState }\n\t| ( CompositeState & { state?: never } );\ntype ComponentProps< C extends Component > = React.ComponentPropsWithRef< C >;\nexport type CompositeProps< C extends Component > = ComponentProps< C > &\n\tCompositeStateProps;\ntype CompositeComponent< C extends Component > = (\n\tprops: CompositeProps< C >\n) => React.ReactElement;\ntype CompositeComponentProps = CompositeState &\n\t(\n\t\t| ComponentProps< typeof Current.CompositeGroup >\n\t\t| ComponentProps< typeof Current.CompositeItem >\n\t\t| ComponentProps< typeof Current.CompositeRow >\n\t);\n\nfunction mapLegacyStatePropsToComponentProps(\n\tlegacyProps: CompositeStateProps\n): CompositeComponentProps {\n\t// If a `state` prop is provided, we unpack that; otherwise,\n\t// the necessary props are provided directly in `legacyProps`.\n\tif ( legacyProps.state ) {\n\t\tconst { state, ...rest } = legacyProps;\n\t\tconst { store, ...props } =\n\t\t\tmapLegacyStatePropsToComponentProps( state );\n\t\treturn { ...rest, ...props, store };\n\t}\n\n\treturn legacyProps;\n}\n\nfunction proxyComposite< C extends Component >(\n\tProxiedComponent: C | React.ForwardRefExoticComponent< C >,\n\tpropMap: Record< string, string > = {}\n): CompositeComponent< C > {\n\tconst displayName = ProxiedComponent.displayName;\n\tconst Component = ( legacyProps: CompositeStateProps ) => {\n\t\tconst { store, ...rest } =\n\t\t\tmapLegacyStatePropsToComponentProps( legacyProps );\n\t\tconst props = rest as ComponentProps< C >;\n\t\tprops.id = useInstanceId( store, props.baseId, props.id );\n\n\t\tObject.entries( propMap ).forEach( ( [ from, to ] ) => {\n\t\t\tif ( props.hasOwnProperty( from ) ) {\n\t\t\t\tObject.assign( props, { [ to ]: props[ from ] } );\n\t\t\t\tdelete props[ from ];\n\t\t\t}\n\t\t} );\n\n\t\tdelete props.baseId;\n\n\t\treturn <ProxiedComponent { ...props } store={ store } />;\n\t};\n\tComponent.displayName = displayName;\n\treturn Component;\n}\n\n// The old `CompositeGroup` used to behave more like the current\n// `CompositeRow`, but this has been split into two different\n// components. We handle that difference by checking on the\n// provided role, and returning the appropriate component.\nconst unproxiedCompositeGroup = forwardRef<\n\tany,\n\tReact.ComponentPropsWithoutRef<\n\t\ttypeof Current.CompositeGroup | typeof Current.CompositeRow\n\t>\n>( ( { role, ...props }, ref ) => {\n\tconst Component =\n\t\trole === 'row' ? Current.CompositeRow : Current.CompositeGroup;\n\treturn <Component ref={ ref } role={ role } { ...props } />;\n} );\nunproxiedCompositeGroup.displayName = 'CompositeGroup';\n\nexport const Composite = proxyComposite( Current.Composite, { baseId: 'id' } );\nexport const CompositeGroup = proxyComposite( unproxiedCompositeGroup );\nexport const CompositeItem = proxyComposite( Current.CompositeItem, {\n\tfocusable: 'accessibleWhenDisabled',\n} );\n\nexport function useCompositeState(\n\tlegacyStateOptions: LegacyStateOptions = {}\n): CompositeState {\n\tconst {\n\t\tbaseId,\n\t\tcurrentId: defaultActiveId,\n\t\torientation,\n\t\trtl = false,\n\t\tloop: focusLoop = false,\n\t\twrap: focusWrap = false,\n\t\tshift: focusShift = false,\n\t\t// eslint-disable-next-line camelcase\n\t\tunstable_virtual: virtualFocus,\n\t} = legacyStateOptions;\n\n\treturn {\n\t\tbaseId: useInstanceId( Composite, 'composite', baseId ),\n\t\tstore: Current.useCompositeStore( {\n\t\t\tdefaultActiveId,\n\t\t\trtl,\n\t\t\torientation,\n\t\t\tfocusLoop,\n\t\t\tfocusShift,\n\t\t\tfocusWrap,\n\t\t\tvirtualFocus,\n\t\t} ),\n\t};\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAO,KAAKC,OAAO,MAAM,YAAY;AACrC,SAASC,aAAa,QAAQ,oBAAoB;;AA6DlD;AACA;AACA;AACA;;AAiBA,SAASC,mCAAmCA,CAC3CC,WAAgC,EACN;EAC1B;EACA;EACA,IAAKA,WAAW,CAACC,KAAK,EAAG;IACxB,MAAM;MAAEA,KAAK;MAAE,GAAGC;IAAK,CAAC,GAAGF,WAAW;IACtC,MAAM;MAAEG,KAAK;MAAE,GAAGC;IAAM,CAAC,GACxBL,mCAAmC,CAAEE,KAAM,CAAC;IAC7C,OAAO;MAAE,GAAGC,IAAI;MAAE,GAAGE,KAAK;MAAED;IAAM,CAAC;EACpC;EAEA,OAAOH,WAAW;AACnB;AAEA,SAASK,cAAcA,CACtBC,gBAA0D,EAC1DC,OAAiC,GAAG,CAAC,CAAC,EACZ;EAC1B,MAAMC,WAAW,GAAGF,gBAAgB,CAACE,WAAW;EAChD,MAAMC,SAAS,GAAKT,WAAgC,IAAM;IACzD,MAAM;MAAEG,KAAK;MAAE,GAAGD;IAAK,CAAC,GACvBH,mCAAmC,CAAEC,WAAY,CAAC;IACnD,MAAMI,KA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Ee,uBAAwB,CAAC;AACvE,OAAO,MAAMM,aAAa,GAAGrB,cAAc,CAAER,OAAO,CAAC6B,aAAa,EAAE;EACnEC,SAAS,EAAE;AACZ,CAAE,CAAC;AAEH,OAAO,SAASC,iBAAiBA,CAChCC,kBAAsC,GAAG,CAAC,CAAC,EAC1B;EACjB,MAAM;IACLlB,MAAM;IACNmB,SAAS,EAAEC,eAAe;IAC1BC,WAAW;IACXC,GAAG,GAAG,KAAK;IACXC,IAAI,EAAEC,SAAS,GAAG,KAAK;IACvBC,IAAI,EAAEC,SAAS,GAAG,KAAK;IACvBC,KAAK,EAAEC,UAAU,GAAG,KAAK;IACzB;IACAC,gBAAgB,EAAEC;EACnB,CAAC,GAAGZ,kBAAkB;EAEtB,OAAO;IACNlB,MAAM,EAAEb,aAAa,CAAE2B,SAAS,EAAE,WAAW,EAAEd,MAAO,CAAC;IACvDR,KAAK,EAAEN,OAAO,CAAC6C,iBAAiB,CAAE;MACjCX,eAAe;MACfE,GAAG;MACHD,WAAW;MACXG,SAAS;MACTI,UAAU;MACVF,SAAS;MACTI;IACD,CAAE;EACH,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","Current","useInstanceId","jsx","_jsx","mapLegacyStatePropsToComponentProps","legacyProps","state","rest","store","props","proxyComposite","ProxiedComponent","propMap","displayName","Component","id","baseId","Object","entries","forEach","from","to","hasOwnProperty","assign","unproxiedCompositeGroup","role","ref","CompositeRow","CompositeGroup","Composite","CompositeItem","focusable","useCompositeState","legacyStateOptions","currentId","defaultActiveId","orientation","rtl","loop","focusLoop","wrap","focusWrap","shift","focusShift","unstable_virtual","virtualFocus","useCompositeStore"],"sources":["@wordpress/components/src/composite/legacy/index.tsx"],"sourcesContent":["/**\n * Composite is a component that may contain navigable items represented by\n * CompositeItem. It's inspired by the WAI-ARIA Composite Role and implements\n * all the keyboard navigation mechanisms to ensure that there's only one\n * tab stop for the whole Composite element. This means that it can behave as\n * a roving tabindex or aria-activedescendant container.\n *\n * @see https://ariakit.org/components/composite\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as Current from '../current';\nimport { useInstanceId } from '@wordpress/compose';\n\ntype Orientation = 'horizontal' | 'vertical';\n\nexport interface LegacyStateOptions {\n\t/**\n\t * ID that will serve as a base for all the items IDs.\n\t */\n\tbaseId?: string;\n\t/**\n\t * Determines how next and previous functions will behave. If `rtl` is set\n\t * to `true`, they will be inverted. This only affects the composite widget\n\t * behavior. You still need to set `dir=\"rtl\"` on HTML/CSS.\n\t *\n\t * @default false\n\t */\n\trtl?: boolean;\n\t/**\n\t * Defines the orientation of the composite widget. If the composite has a\n\t * single row or column (one-dimensional), the orientation value determines\n\t * which arrow keys can be used to move focus.\n\t */\n\torientation?: Orientation;\n\t/**\n\t * The current focused item `id`.\n\t */\n\tcurrentId?: string;\n\t/**\n\t * Determines how focus moves from the start and end of rows and columns.\n\t *\n\t * @default false\n\t */\n\tloop?: boolean | Orientation;\n\t/**\n\t * If enabled, moving to the next item from the last one in a row or column\n\t * will focus the first item in the next row or column and vice-versa.\n\t *\n\t * ** Has effect only on two-dimensional composites. **\n\t *\n\t * @default false\n\t */\n\twrap?: boolean | Orientation;\n\t/**\n\t * If enabled, moving up or down when there's no next item or the next item\n\t * is disabled will shift to the item right before it.\n\t *\n\t * ** Has effect only on two-dimensional composites. **\n\t *\n\t * @default false\n\t */\n\tshift?: boolean;\n\tunstable_virtual?: boolean;\n}\n\ntype Component = React.FunctionComponent< any >;\n\ntype CompositeStore = ReturnType< typeof Current.useCompositeStore >;\ntype CompositeStoreState = { store: CompositeStore };\nexport type CompositeState = CompositeStoreState &\n\tRequired< Pick< LegacyStateOptions, 'baseId' > >;\n\n// Legacy composite components can either provide state through a\n// single `state` prop, or via individual props, usually through\n// spreading the state generated by `useCompositeState`.\n// That is, `<Composite* { ...state }>`.\nexport type CompositeStateProps =\n\t| { state: CompositeState }\n\t| ( CompositeState & { state?: never } );\ntype ComponentProps< C extends Component > = React.ComponentPropsWithRef< C >;\nexport type CompositeProps< C extends Component > = ComponentProps< C > &\n\tCompositeStateProps;\ntype CompositeComponent< C extends Component > = (\n\tprops: CompositeProps< C >\n) => React.ReactElement;\ntype CompositeComponentProps = CompositeState &\n\t(\n\t\t| ComponentProps< typeof Current.CompositeGroup >\n\t\t| ComponentProps< typeof Current.CompositeItem >\n\t\t| ComponentProps< typeof Current.CompositeRow >\n\t);\n\nfunction mapLegacyStatePropsToComponentProps(\n\tlegacyProps: CompositeStateProps\n): CompositeComponentProps {\n\t// If a `state` prop is provided, we unpack that; otherwise,\n\t// the necessary props are provided directly in `legacyProps`.\n\tif ( legacyProps.state ) {\n\t\tconst { state, ...rest } = legacyProps;\n\t\tconst { store, ...props } =\n\t\t\tmapLegacyStatePropsToComponentProps( state );\n\t\treturn { ...rest, ...props, store };\n\t}\n\n\treturn legacyProps;\n}\n\nfunction proxyComposite< C extends Component >(\n\tProxiedComponent: C | React.ForwardRefExoticComponent< C >,\n\tpropMap: Record< string, string > = {}\n): CompositeComponent< C > {\n\tconst displayName = ProxiedComponent.displayName;\n\tconst Component = ( legacyProps: CompositeStateProps ) => {\n\t\tconst { store, ...rest } =\n\t\t\tmapLegacyStatePropsToComponentProps( legacyProps );\n\t\tconst props = rest as ComponentProps< C >;\n\t\tprops.id = useInstanceId( store, props.baseId, props.id );\n\n\t\tObject.entries( propMap ).forEach( ( [ from, to ] ) => {\n\t\t\tif ( props.hasOwnProperty( from ) ) {\n\t\t\t\tObject.assign( props, { [ to ]: props[ from ] } );\n\t\t\t\tdelete props[ from ];\n\t\t\t}\n\t\t} );\n\n\t\tdelete props.baseId;\n\n\t\treturn <ProxiedComponent { ...props } store={ store } />;\n\t};\n\tComponent.displayName = displayName;\n\treturn Component;\n}\n\n// The old `CompositeGroup` used to behave more like the current\n// `CompositeRow`, but this has been split into two different\n// components. We handle that difference by checking on the\n// provided role, and returning the appropriate component.\nconst unproxiedCompositeGroup = forwardRef<\n\tany,\n\tReact.ComponentPropsWithoutRef<\n\t\ttypeof Current.CompositeGroup | typeof Current.CompositeRow\n\t>\n>( ( { role, ...props }, ref ) => {\n\tconst Component =\n\t\trole === 'row' ? Current.CompositeRow : Current.CompositeGroup;\n\treturn <Component ref={ ref } role={ role } { ...props } />;\n} );\nunproxiedCompositeGroup.displayName = 'CompositeGroup';\n\nexport const Composite = proxyComposite( Current.Composite, { baseId: 'id' } );\nexport const CompositeGroup = proxyComposite( unproxiedCompositeGroup );\nexport const CompositeItem = proxyComposite( Current.CompositeItem, {\n\tfocusable: 'accessibleWhenDisabled',\n} );\n\nexport function useCompositeState(\n\tlegacyStateOptions: LegacyStateOptions = {}\n): CompositeState {\n\tconst {\n\t\tbaseId,\n\t\tcurrentId: defaultActiveId,\n\t\torientation,\n\t\trtl = false,\n\t\tloop: focusLoop = false,\n\t\twrap: focusWrap = false,\n\t\tshift: focusShift = false,\n\t\t// eslint-disable-next-line camelcase\n\t\tunstable_virtual: virtualFocus,\n\t} = legacyStateOptions;\n\n\treturn {\n\t\tbaseId: useInstanceId( Composite, 'composite', baseId ),\n\t\tstore: Current.useCompositeStore( {\n\t\t\tdefaultActiveId,\n\t\t\trtl,\n\t\t\torientation,\n\t\t\tfocusLoop,\n\t\t\tfocusShift,\n\t\t\tfocusWrap,\n\t\t\tvirtualFocus,\n\t\t} ),\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAO,KAAKC,OAAO,MAAM,YAAY;AACrC,SAASC,aAAa,QAAQ,oBAAoB;;AA6DlD;AACA;AACA;AACA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAiBA,SAASC,mCAAmCA,CAC3CC,WAAgC,EACN;EAC1B;EACA;EACA,IAAKA,WAAW,CAACC,KAAK,EAAG;IACxB,MAAM;MAAEA,KAAK;MAAE,GAA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
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -16,6 +15,9 @@ import { Text } from '../text';
16
15
  import { VStack } from '../v-stack';
17
16
  import * as styles from './styles';
18
17
  import { useCx } from '../utils/hooks/use-cx';
18
+ import { jsx as _jsx } from "react/jsx-runtime";
19
+ import { jsxs as _jsxs } from "react/jsx-runtime";
20
+ import { Fragment as _Fragment } from "react/jsx-runtime";
19
21
  const UnconnectedConfirmDialog = (props, forwardedRef) => {
20
22
  const {
21
23
  isOpen: isOpenProp,
@@ -57,31 +59,40 @@ const UnconnectedConfirmDialog = (props, forwardedRef) => {
57
59
  }, [handleEvent, onConfirm]);
58
60
  const cancelLabel = cancelButtonText !== null && cancelButtonText !== void 0 ? cancelButtonText : __('Cancel');
59
61
  const confirmLabel = confirmButtonText !== null && confirmButtonText !== void 0 ? confirmButtonText : __('OK');
60
- return createElement(Fragment, null, isOpen && createElement(Modal, {
61
- onRequestClose: handleEvent(onCancel),
62
- onKeyDown: handleEnter,
63
- closeButtonLabel: cancelLabel,
64
- isDismissible: true,
65
- ref: forwardedRef,
66
- overlayClassName: wrapperClassName,
67
- __experimentalHideHeader: true,
68
- ...otherProps
69
- }, createElement(VStack, {
70
- spacing: 8
71
- }, createElement(Text, null, children), createElement(Flex, {
72
- direction: "row",
73
- justify: "flex-end"
74
- }, createElement(Button, {
75
- __next40pxDefaultSize: true,
76
- ref: cancelButtonRef,
77
- variant: "tertiary",
78
- onClick: handleEvent(onCancel)
79
- }, cancelLabel), createElement(Button, {
80
- __next40pxDefaultSize: true,
81
- ref: confirmButtonRef,
82
- variant: "primary",
83
- onClick: handleEvent(onConfirm)
84
- }, confirmLabel)))));
62
+ return /*#__PURE__*/_jsx(_Fragment, {
63
+ children: isOpen && /*#__PURE__*/_jsx(Modal, {
64
+ onRequestClose: handleEvent(onCancel),
65
+ onKeyDown: handleEnter,
66
+ closeButtonLabel: cancelLabel,
67
+ isDismissible: true,
68
+ ref: forwardedRef,
69
+ overlayClassName: wrapperClassName,
70
+ __experimentalHideHeader: true,
71
+ ...otherProps,
72
+ children: /*#__PURE__*/_jsxs(VStack, {
73
+ spacing: 8,
74
+ children: [/*#__PURE__*/_jsx(Text, {
75
+ children: children
76
+ }), /*#__PURE__*/_jsxs(Flex, {
77
+ direction: "row",
78
+ justify: "flex-end",
79
+ children: [/*#__PURE__*/_jsx(Button, {
80
+ __next40pxDefaultSize: true,
81
+ ref: cancelButtonRef,
82
+ variant: "tertiary",
83
+ onClick: handleEvent(onCancel),
84
+ children: cancelLabel
85
+ }), /*#__PURE__*/_jsx(Button, {
86
+ __next40pxDefaultSize: true,
87
+ ref: confirmButtonRef,
88
+ variant: "primary",
89
+ onClick: handleEvent(onConfirm),
90
+ children: confirmLabel
91
+ })]
92
+ })]
93
+ })
94
+ })
95
+ });
85
96
  };
86
97
 
87
98
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["__","useCallback","useEffect","useRef","useState","Modal","useContextSystem","contextConnect","Flex","Button","Text","VStack","styles","useCx","UnconnectedConfirmDialog","props","forwardedRef","isOpen","isOpenProp","onConfirm","onCancel","children","confirmButtonText","cancelButtonText","otherProps","cx","wrapperClassName","wrapper","cancelButtonRef","confirmButtonRef","setIsOpen","shouldSelfClose","setShouldSelfClose","isIsOpenSet","handleEvent","callback","event","handleEnter","isConfirmOrCancelButton","target","current","key","cancelLabel","confirmLabel","createElement","Fragment","onRequestClose","onKeyDown","closeButtonLabel","isDismissible","ref","overlayClassName","__experimentalHideHeader","spacing","direction","justify","__next40pxDefaultSize","variant","onClick","ConfirmDialog"],"sources":["@wordpress/components/src/confirm-dialog/component.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useCallback, useEffect, useRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Modal from '../modal';\nimport type { ConfirmDialogProps, DialogInputEvent } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem, contextConnect } from '../context';\nimport { Flex } from '../flex';\nimport Button from '../button';\nimport { Text } from '../text';\nimport { VStack } from '../v-stack';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\n\nconst UnconnectedConfirmDialog = (\n\tprops: WordPressComponentProps< ConfirmDialogProps, 'div', false >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tisOpen: isOpenProp,\n\t\tonConfirm,\n\t\tonCancel,\n\t\tchildren,\n\t\tconfirmButtonText,\n\t\tcancelButtonText,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ConfirmDialog' );\n\n\tconst cx = useCx();\n\tconst wrapperClassName = cx( styles.wrapper );\n\tconst cancelButtonRef = useRef();\n\tconst confirmButtonRef = useRef();\n\n\tconst [ isOpen, setIsOpen ] = useState< boolean >();\n\tconst [ shouldSelfClose, setShouldSelfClose ] = useState< boolean >();\n\n\tuseEffect( () => {\n\t\t// We only allow the dialog to close itself if `isOpenProp` is *not* set.\n\t\t// If `isOpenProp` is set, then it (probably) means it's controlled by a\n\t\t// parent component. In that case, `shouldSelfClose` might do more harm than\n\t\t// good, so we disable it.\n\t\tconst isIsOpenSet = typeof isOpenProp !== 'undefined';\n\t\tsetIsOpen( isIsOpenSet ? isOpenProp : true );\n\t\tsetShouldSelfClose( ! isIsOpenSet );\n\t}, [ isOpenProp ] );\n\n\tconst handleEvent = useCallback(\n\t\t( callback?: ( event: DialogInputEvent ) => void ) =>\n\t\t\t( event: DialogInputEvent ) => {\n\t\t\t\tcallback?.( event );\n\t\t\t\tif ( shouldSelfClose ) {\n\t\t\t\t\tsetIsOpen( false );\n\t\t\t\t}\n\t\t\t},\n\t\t[ shouldSelfClose, setIsOpen ]\n\t);\n\n\tconst handleEnter = useCallback(\n\t\t( event: React.KeyboardEvent< HTMLDivElement > ) => {\n\t\t\t// Avoid triggering the 'confirm' action when a button is focused,\n\t\t\t// as this can cause a double submission.\n\t\t\tconst isConfirmOrCancelButton =\n\t\t\t\tevent.target === cancelButtonRef.current ||\n\t\t\t\tevent.target === confirmButtonRef.current;\n\n\t\t\tif ( ! isConfirmOrCancelButton && event.key === 'Enter' ) {\n\t\t\t\thandleEvent( onConfirm )( event );\n\t\t\t}\n\t\t},\n\t\t[ handleEvent, onConfirm ]\n\t);\n\n\tconst cancelLabel = cancelButtonText ?? __( 'Cancel' );\n\tconst confirmLabel = confirmButtonText ?? __( 'OK' );\n\n\treturn (\n\t\t<>\n\t\t\t{ isOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\tonRequestClose={ handleEvent( onCancel ) }\n\t\t\t\t\tonKeyDown={ handleEnter }\n\t\t\t\t\tcloseButtonLabel={ cancelLabel }\n\t\t\t\t\tisDismissible\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t\toverlayClassName={ wrapperClassName }\n\t\t\t\t\t__experimentalHideHeader\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t>\n\t\t\t\t\t<VStack spacing={ 8 }>\n\t\t\t\t\t\t<Text>{ children }</Text>\n\t\t\t\t\t\t<Flex direction=\"row\" justify=\"flex-end\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tref={ cancelButtonRef }\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\tonClick={ handleEvent( onCancel ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ cancelLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tref={ confirmButtonRef }\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tonClick={ handleEvent( onConfirm ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ confirmLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</VStack>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\n/**\n * `ConfirmDialog` is built of top of [`Modal`](/packages/components/src/modal/README.md)\n * and displays a confirmation dialog, with _confirm_ and _cancel_ buttons.\n * The dialog is confirmed by clicking the _confirm_ button or by pressing the `Enter` key.\n * It is cancelled (closed) by clicking the _cancel_ button, by pressing the `ESC` key, or by\n * clicking outside the dialog focus (i.e, the overlay).\n *\n * `ConfirmDialog` has two main implicit modes: controlled and uncontrolled.\n *\n * UnControlled:\n *\n * Allows the component to be used standalone, just by declaring it as part of another React's component render method:\n * - It will be automatically open (displayed) upon mounting;\n * - It will be automatically closed when clicking the _cancel_ button, by pressing the `ESC` key, or by clicking outside the dialog focus (i.e, the overlay);\n * - `onCancel` is not mandatory but can be passed. Even if passed, the dialog will still be able to close itself.\n *\n * Activating this mode is as simple as omitting the `isOpen` prop. The only mandatory prop, in this case, is the `onConfirm` callback. The message is passed as the `children`. You can pass any JSX you'd like, which allows to further format the message or include sub-component if you'd like:\n *\n * ```jsx\n * import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n *\n * function Example() {\n * \treturn (\n * \t\t<ConfirmDialog onConfirm={ () => console.debug( ' Confirmed! ' ) }>\n * \t\t\tAre you sure? <strong>This action cannot be undone!</strong>\n * \t\t</ConfirmDialog>\n * \t);\n * }\n * ```\n *\n *\n * Controlled mode:\n * Let the parent component control when the dialog is open/closed. It's activated when a\n * boolean value is passed to `isOpen`:\n * - It will not be automatically closed. You need to let it know when to open/close by updating the value of the `isOpen` prop;\n * - Both `onConfirm` and the `onCancel` callbacks are mandatory props in this mode;\n * - You'll want to update the state that controls `isOpen` by updating it from the `onCancel` and `onConfirm` callbacks.\n *\n *```jsx\n * import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function Example() {\n * \tconst [ isOpen, setIsOpen ] = useState( true );\n *\n * \tconst handleConfirm = () => {\n * \t\tconsole.debug( 'Confirmed!' );\n * \t\tsetIsOpen( false );\n * \t};\n *\n * \tconst handleCancel = () => {\n * \t\tconsole.debug( 'Cancelled!' );\n * \t\tsetIsOpen( false );\n * \t};\n *\n * \treturn (\n * \t\t<ConfirmDialog\n * \t\t\tisOpen={ isOpen }\n * \t\t\tonConfirm={ handleConfirm }\n * \t\t\tonCancel={ handleCancel }\n * \t\t>\n * \t\t\tAre you sure? <strong>This action cannot be undone!</strong>\n * \t\t</ConfirmDialog>\n * \t);\n * }\n * ```\n */\nexport const ConfirmDialog = contextConnect(\n\tUnconnectedConfirmDialog,\n\t'ConfirmDialog'\n);\nexport default ConfirmDialog;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,oBAAoB;;AAE7E;AACA;AACA;AACA,OAAOC,KAAK,MAAM,UAAU;AAG5B,SAASC,gBAAgB,EAAEC,cAAc,QAAQ,YAAY;AAC7D,SAASC,IAAI,QAAQ,SAAS;AAC9B,OAAOC,MAAM,MAAM,WAAW;AAC9B,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,MAAM,QAAQ,YAAY;AACnC,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,SAASC,KAAK,QAAQ,uBAAuB;AAE7C,MAAMC,wBAAwB,GAAGA,CAChCC,KAAkE,EAClEC,YAAuC,KACnC;EACJ,MAAM;IACLC,MAAM,EAAEC,UAAU;IAClBC,SAAS;IACTC,QAAQ;IACRC,QAAQ;IACRC,iBAAiB;IACjBC,gBAAgB;IAChB,GAAGC;EACJ,CAAC,GAAGlB,gBAAgB,CAAES,KAAK,EAAE,eAAgB,CAAC;EAE9C,MAAMU,EAAE,GAAGZ,KAAK,CAAC,CAAC;EAClB,MAAMa,gBAAgB,GAAGD,EAAE,CAAEb,MAAM,CAACe,OAAQ,CAAC;EAC7C,MAAMC,eAAe,GAAGzB,MAAM,CAAC,CAAC;EAChC,MAAM0B,gBAAgB,GAAG1B,MA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,CAAAC,QAAA,QACG5B,MAAM,IACP2B,aAAA,CAACvC,KAAK;IACLyC,cAAc,EAAGZ,WAAW,CAAEd,QAAS,CAAG;IAC1C2B,SAAS,EAAGV,WAAa;IACzBW,gBAAgB,EAAGN,WAAa;IAChCO,aAAa;IACbC,GAAG,EAAGlC,YAAc;IACpBmC,gBAAgB,EAAGzB,gBAAkB;IACrC0B,wBAAwB;IAAA,GACnB5B;EAAU,GAEfoB,aAAA,CAACjC,MAAM;IAAC0C,OAAO,EAAG;EAAG,GACpBT,aAAA,CAAClC,IAAI,QAAGW,QAAgB,CAAC,EACzBuB,aAAA,CAACpC,IAAI;IAAC8C,SAAS,EAAC,KAAK;IAACC,OAAO,EAAC;EAAU,GACvCX,aAAA,CAACnC,MAAM;IACN+C,qBAAqB;IACrBN,GAAG,EAAGtB,eAAiB;IACvB6B,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGxB,WAAW,CAAEd,QAAS;EAAG,GAEjCsB,WACK,CAAC,EACTE,aAAA,CAACnC,MAAM;IACN+C,qBAAqB;IACrBN,GAAG,EAAGrB,gBAAkB;IACxB4B,OAAO,EAAC,SAAS;IACjBC,OAAO,EAAGxB,WAAW,CAAEf,SAAU;EAAG,GAElCwB,YACK,CACH,CACC,CACF,CAEP,CAAC;AAEL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMgB,aAAa,GAAGpD,cAAc,CAC1CO,wBAAwB,EACxB,eACD,CAAC;AACD,eAAe6C,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["__","useCallback","useEffect","useRef","useState","Modal","useContextSystem","contextConnect","Flex","Button","Text","VStack","styles","useCx","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","UnconnectedConfirmDialog","props","forwardedRef","isOpen","isOpenProp","onConfirm","onCancel","children","confirmButtonText","cancelButtonText","otherProps","cx","wrapperClassName","wrapper","cancelButtonRef","confirmButtonRef","setIsOpen","shouldSelfClose","setShouldSelfClose","isIsOpenSet","handleEvent","callback","event","handleEnter","isConfirmOrCancelButton","target","current","key","cancelLabel","confirmLabel","onRequestClose","onKeyDown","closeButtonLabel","isDismissible","ref","overlayClassName","__experimentalHideHeader","spacing","direction","justify","__next40pxDefaultSize","variant","onClick","ConfirmDialog"],"sources":["@wordpress/components/src/confirm-dialog/component.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useCallback, useEffect, useRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Modal from '../modal';\nimport type { ConfirmDialogProps, DialogInputEvent } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem, contextConnect } from '../context';\nimport { Flex } from '../flex';\nimport Button from '../button';\nimport { Text } from '../text';\nimport { VStack } from '../v-stack';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\n\nconst UnconnectedConfirmDialog = (\n\tprops: WordPressComponentProps< ConfirmDialogProps, 'div', false >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tisOpen: isOpenProp,\n\t\tonConfirm,\n\t\tonCancel,\n\t\tchildren,\n\t\tconfirmButtonText,\n\t\tcancelButtonText,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ConfirmDialog' );\n\n\tconst cx = useCx();\n\tconst wrapperClassName = cx( styles.wrapper );\n\tconst cancelButtonRef = useRef();\n\tconst confirmButtonRef = useRef();\n\n\tconst [ isOpen, setIsOpen ] = useState< boolean >();\n\tconst [ shouldSelfClose, setShouldSelfClose ] = useState< boolean >();\n\n\tuseEffect( () => {\n\t\t// We only allow the dialog to close itself if `isOpenProp` is *not* set.\n\t\t// If `isOpenProp` is set, then it (probably) means it's controlled by a\n\t\t// parent component. In that case, `shouldSelfClose` might do more harm than\n\t\t// good, so we disable it.\n\t\tconst isIsOpenSet = typeof isOpenProp !== 'undefined';\n\t\tsetIsOpen( isIsOpenSet ? isOpenProp : true );\n\t\tsetShouldSelfClose( ! isIsOpenSet );\n\t}, [ isOpenProp ] );\n\n\tconst handleEvent = useCallback(\n\t\t( callback?: ( event: DialogInputEvent ) => void ) =>\n\t\t\t( event: DialogInputEvent ) => {\n\t\t\t\tcallback?.( event );\n\t\t\t\tif ( shouldSelfClose ) {\n\t\t\t\t\tsetIsOpen( false );\n\t\t\t\t}\n\t\t\t},\n\t\t[ shouldSelfClose, setIsOpen ]\n\t);\n\n\tconst handleEnter = useCallback(\n\t\t( event: React.KeyboardEvent< HTMLDivElement > ) => {\n\t\t\t// Avoid triggering the 'confirm' action when a button is focused,\n\t\t\t// as this can cause a double submission.\n\t\t\tconst isConfirmOrCancelButton =\n\t\t\t\tevent.target === cancelButtonRef.current ||\n\t\t\t\tevent.target === confirmButtonRef.current;\n\n\t\t\tif ( ! isConfirmOrCancelButton && event.key === 'Enter' ) {\n\t\t\t\thandleEvent( onConfirm )( event );\n\t\t\t}\n\t\t},\n\t\t[ handleEvent, onConfirm ]\n\t);\n\n\tconst cancelLabel = cancelButtonText ?? __( 'Cancel' );\n\tconst confirmLabel = confirmButtonText ?? __( 'OK' );\n\n\treturn (\n\t\t<>\n\t\t\t{ isOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\tonRequestClose={ handleEvent( onCancel ) }\n\t\t\t\t\tonKeyDown={ handleEnter }\n\t\t\t\t\tcloseButtonLabel={ cancelLabel }\n\t\t\t\t\tisDismissible\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t\toverlayClassName={ wrapperClassName }\n\t\t\t\t\t__experimentalHideHeader\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t>\n\t\t\t\t\t<VStack spacing={ 8 }>\n\t\t\t\t\t\t<Text>{ children }</Text>\n\t\t\t\t\t\t<Flex direction=\"row\" justify=\"flex-end\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tref={ cancelButtonRef }\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\tonClick={ handleEvent( onCancel ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ cancelLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tref={ confirmButtonRef }\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tonClick={ handleEvent( onConfirm ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ confirmLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</VStack>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\n/**\n * `ConfirmDialog` is built of top of [`Modal`](/packages/components/src/modal/README.md)\n * and displays a confirmation dialog, with _confirm_ and _cancel_ buttons.\n * The dialog is confirmed by clicking the _confirm_ button or by pressing the `Enter` key.\n * It is cancelled (closed) by clicking the _cancel_ button, by pressing the `ESC` key, or by\n * clicking outside the dialog focus (i.e, the overlay).\n *\n * `ConfirmDialog` has two main implicit modes: controlled and uncontrolled.\n *\n * UnControlled:\n *\n * Allows the component to be used standalone, just by declaring it as part of another React's component render method:\n * - It will be automatically open (displayed) upon mounting;\n * - It will be automatically closed when clicking the _cancel_ button, by pressing the `ESC` key, or by clicking outside the dialog focus (i.e, the overlay);\n * - `onCancel` is not mandatory but can be passed. Even if passed, the dialog will still be able to close itself.\n *\n * Activating this mode is as simple as omitting the `isOpen` prop. The only mandatory prop, in this case, is the `onConfirm` callback. The message is passed as the `children`. You can pass any JSX you'd like, which allows to further format the message or include sub-component if you'd like:\n *\n * ```jsx\n * import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n *\n * function Example() {\n * \treturn (\n * \t\t<ConfirmDialog onConfirm={ () => console.debug( ' Confirmed! ' ) }>\n * \t\t\tAre you sure? <strong>This action cannot be undone!</strong>\n * \t\t</ConfirmDialog>\n * \t);\n * }\n * ```\n *\n *\n * Controlled mode:\n * Let the parent component control when the dialog is open/closed. It's activated when a\n * boolean value is passed to `isOpen`:\n * - It will not be automatically closed. You need to let it know when to open/close by updating the value of the `isOpen` prop;\n * - Both `onConfirm` and the `onCancel` callbacks are mandatory props in this mode;\n * - You'll want to update the state that controls `isOpen` by updating it from the `onCancel` and `onConfirm` callbacks.\n *\n *```jsx\n * import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function Example() {\n * \tconst [ isOpen, setIsOpen ] = useState( true );\n *\n * \tconst handleConfirm = () => {\n * \t\tconsole.debug( 'Confirmed!' );\n * \t\tsetIsOpen( false );\n * \t};\n *\n * \tconst handleCancel = () => {\n * \t\tconsole.debug( 'Cancelled!' );\n * \t\tsetIsOpen( false );\n * \t};\n *\n * \treturn (\n * \t\t<ConfirmDialog\n * \t\t\tisOpen={ isOpen }\n * \t\t\tonConfirm={ handleConfirm }\n * \t\t\tonCancel={ handleCancel }\n * \t\t>\n * \t\t\tAre you sure? <strong>This action cannot be undone!</strong>\n * \t\t</ConfirmDialog>\n * \t);\n * }\n * ```\n */\nexport const ConfirmDialog = contextConnect(\n\tUnconnectedConfirmDialog,\n\t'ConfirmDialog'\n);\nexport default ConfirmDialog;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,oBAAoB;;AAE7E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,QAAA,EAAGA;QAAQ,CAAQ,CAAC,eACzBV,KAAA,CAACT,IAAI;UAACkD,SAAS,EAAC,KAAK;UAACC,OAAO,EAAC,UAAU;UAAAhC,QAAA,gBACvCZ,IAAA,CAACN,MAAM;YACNmD,qBAAqB;YACrBN,GAAG,EAAGpB,eAAiB;YACvB2B,OAAO,EAAC,UAAU;YAClBC,OAAO,EAAGtB,WAAW,CAAEd,QAAS,CAAG;YAAAC,QAAA,EAEjCqB;UAAW,CACN,CAAC,eACTjC,IAAA,CAACN,MAAM;YACNmD,qBAAqB;YACrBN,GAAG,EAAGnB,gBAAkB;YACxB0B,OAAO,EAAC,SAAS;YACjBC,OAAO,EAAGtB,WAAW,CAAEf,SAAU,CAAG;YAAAE,QAAA,EAElCsB;UAAY,CACP,CAAC;QAAA,CACJ,CAAC;MAAA,CACA;IAAC,CACH;EACP,CACA,CAAC;AAEL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMc,aAAa,GAAGxD,cAAc,CAC1Ca,wBAAwB,EACxB,eACD,CAAC;AACD,eAAe2C,aAAa","ignoreList":[]}
@@ -45,7 +45,7 @@ export function contextConnectWithoutRef(Component, namespace) {
45
45
  function _contextConnect(Component, namespace, options) {
46
46
  const WrappedComponent = options?.forwardsRef ? forwardRef(Component) : Component;
47
47
  if (typeof namespace === 'undefined') {
48
- typeof SCRIPT_DEBUG !== "undefined" && SCRIPT_DEBUG === true ? warn('contextConnect: Please provide a namespace') : void 0;
48
+ globalThis.SCRIPT_DEBUG === true ? warn('contextConnect: Please provide a namespace') : void 0;
49
49
  }
50
50
 
51
51
  // @ts-expect-error internal property
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","warn","CONNECT_STATIC_NAMESPACE","getStyledClassNameFromKey","contextConnect","Component","namespace","_contextConnect","forwardsRef","contextConnectWithoutRef","options","WrappedComponent","SCRIPT_DEBUG","mergedNamespace","Array","isArray","Object","assign","Set","displayName","selector","getConnectNamespace","namespaces","type","hasConnectNamespace","match","includes","some","result"],"sources":["@wordpress/components/src/context/context-connect.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, ReactChild, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { CONNECT_STATIC_NAMESPACE } from './constants';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport type { WordPressComponentFromProps } from '.';\n\ntype AcceptsTwoArgs<\n\tF extends ( ...args: any ) => any,\n\tErrorMessage = never,\n> = Parameters< F >[ 'length' ] extends 2 ? {} : ErrorMessage;\n\ntype ContextConnectOptions = {\n\tforwardsRef?: boolean;\n};\n\n/**\n * Forwards ref (React.ForwardRef) and \"Connects\" (or registers) a component\n * within the Context system under a specified namespace.\n *\n * @param Component The component to register into the Context system.\n * @param namespace The namespace to register the component under.\n * @return The connected WordPressComponent\n */\nexport function contextConnect<\n\tC extends ( props: any, ref: ForwardedRef< any > ) => JSX.Element | null,\n>(\n\tComponent: C &\n\t\tAcceptsTwoArgs<\n\t\t\tC,\n\t\t\t'Warning: Your component function does not take a ref as the second argument. Did you mean to use `contextConnectWithoutRef`?'\n\t\t>,\n\tnamespace: string\n) {\n\treturn _contextConnect( Component, namespace, { forwardsRef: true } );\n}\n\n/**\n * \"Connects\" (or registers) a component within the Context system under a specified namespace.\n * Does not forward a ref.\n *\n * @param Component The component to register into the Context system.\n * @param namespace The namespace to register the component under.\n * @return The connected WordPressComponent\n */\nexport function contextConnectWithoutRef< P >(\n\tComponent: ( props: P ) => JSX.Element | null,\n\tnamespace: string\n) {\n\treturn _contextConnect( Component, namespace );\n}\n\n// This is an (experimental) evolution of the initial connect() HOC.\n// The hope is that we can improve render performance by removing functional\n// component wrappers.\nfunction _contextConnect<\n\tC extends ( props: any, ref: ForwardedRef< any > ) => JSX.Element | null,\n\tO extends ContextConnectOptions,\n>(\n\tComponent: C,\n\tnamespace: string,\n\toptions?: O\n): WordPressComponentFromProps<\n\tParameters< C >[ 0 ],\n\tO[ 'forwardsRef' ] extends true ? true : false\n> {\n\tconst WrappedComponent = options?.forwardsRef\n\t\t? forwardRef< any, Parameters< C >[ 0 ] >( Component )\n\t\t: Component;\n\n\tif ( typeof namespace === 'undefined' ) {\n\t\twarn( 'contextConnect: Please provide a namespace' );\n\t}\n\n\t// @ts-expect-error internal property\n\tlet mergedNamespace = WrappedComponent[ CONNECT_STATIC_NAMESPACE ] || [\n\t\tnamespace,\n\t];\n\n\t/**\n\t * Consolidate (merge) namespaces before attaching it to the WrappedComponent.\n\t */\n\tif ( Array.isArray( namespace ) ) {\n\t\tmergedNamespace = [ ...mergedNamespace, ...namespace ];\n\t}\n\tif ( typeof namespace === 'string' ) {\n\t\tmergedNamespace = [ ...mergedNamespace, namespace ];\n\t}\n\n\t// @ts-expect-error We can't rely on inferred types here because of the\n\t// `as` prop polymorphism we're handling in https://github.com/WordPress/gutenberg/blob/4f3a11243c365f94892e479bff0b922ccc4ccda3/packages/components/src/context/wordpress-component.ts#L32-L33\n\treturn Object.assign( WrappedComponent, {\n\t\t[ CONNECT_STATIC_NAMESPACE ]: [ ...new Set( mergedNamespace ) ],\n\t\tdisplayName: namespace,\n\t\tselector: `.${ getStyledClassNameFromKey( namespace ) }`,\n\t} );\n}\n\n/**\n * Attempts to retrieve the connected namespace from a component.\n *\n * @param Component The component to retrieve a namespace from.\n * @return The connected namespaces.\n */\nexport function getConnectNamespace(\n\tComponent: ReactChild | undefined | {}\n): string[] {\n\tif ( ! Component ) {\n\t\treturn [];\n\t}\n\n\tlet namespaces = [];\n\n\t// @ts-ignore internal property\n\tif ( Component[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore internal property\n\t\tnamespaces = Component[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\t// @ts-ignore\n\tif ( Component.type && Component.type[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore\n\t\tnamespaces = Component.type[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\treturn namespaces;\n}\n\n/**\n * Checks to see if a component is connected within the Context system.\n *\n * @param Component The component to retrieve a namespace from.\n * @param match The namespace to check.\n */\nexport function hasConnectNamespace(\n\tComponent: ReactNode,\n\tmatch: string[] | string\n): boolean {\n\tif ( ! Component ) {\n\t\treturn false;\n\t}\n\n\tif ( typeof match === 'string' ) {\n\t\treturn getConnectNamespace( Component ).includes( match );\n\t}\n\tif ( Array.isArray( match ) ) {\n\t\treturn match.some( ( result ) =>\n\t\t\tgetConnectNamespace( Component ).includes( result )\n\t\t);\n\t}\n\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;AAC/C,OAAOC,IAAI,MAAM,oBAAoB;;AAErC;AACA;AACA;AACA,SAASC,wBAAwB,QAAQ,aAAa;AACtD,SAASC,yBAAyB,QAAQ,kCAAkC;AAY5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAG7BC,SAIE,EACFC,SAAiB,EAChB;EACD,OAAOC,eAAe,CAAEF,SAAS,EAAEC,SAAS,EAAE;IAAEE,WAAW,EAAE;EAAK,CAAE,CAAC;AACtE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CACvCJ,SAA6C,EAC7CC,SAAiB,EAChB;EACD,OAAOC,eAAe,CAAEF,SAAS,EAAEC,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S,CAACkB,IAAI,CAAErB,wBAAwB,CAAE,EAAG;IACnE;IACAoB,UAAU,GAAGjB,SAAS,CAACkB,IAAI,CAAErB,wBAAwB,CAAE;EACxD;EAEA,OAAOoB,UAAU;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,mBAAmBA,CAClCnB,SAAoB,EACpBoB,KAAwB,EACd;EACV,IAAK,CAAEpB,SAAS,EAAG;IAClB,OAAO,KAAK;EACb;EAEA,IAAK,OAAOoB,KAAK,KAAK,QAAQ,EAAG;IAChC,OAAOJ,mBAAmB,CAAEhB,SAAU,CAAC,CAACqB,QAAQ,CAAED,KAAM,CAAC;EAC1D;EACA,IAAKX,KAAK,CAACC,OAAO,CAAEU,KAAM,CAAC,EAAG;IAC7B,OAAOA,KAAK,CAACE,IAAI,CAAIC,MAAM,IAC1BP,mBAAmB,CAAEhB,SAAU,CAAC,CAACqB,QAAQ,CAAEE,MAAO,CACnD,CAAC;EACF;EAEA,OAAO,KAAK;AACb","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","warn","CONNECT_STATIC_NAMESPACE","getStyledClassNameFromKey","contextConnect","Component","namespace","_contextConnect","forwardsRef","contextConnectWithoutRef","options","WrappedComponent","globalThis","SCRIPT_DEBUG","mergedNamespace","Array","isArray","Object","assign","Set","displayName","selector","getConnectNamespace","namespaces","type","hasConnectNamespace","match","includes","some","result"],"sources":["@wordpress/components/src/context/context-connect.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, ReactChild, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { CONNECT_STATIC_NAMESPACE } from './constants';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport type { WordPressComponentFromProps } from '.';\n\ntype AcceptsTwoArgs<\n\tF extends ( ...args: any ) => any,\n\tErrorMessage = never,\n> = Parameters< F >[ 'length' ] extends 2 ? {} : ErrorMessage;\n\ntype ContextConnectOptions = {\n\tforwardsRef?: boolean;\n};\n\n/**\n * Forwards ref (React.ForwardRef) and \"Connects\" (or registers) a component\n * within the Context system under a specified namespace.\n *\n * @param Component The component to register into the Context system.\n * @param namespace The namespace to register the component under.\n * @return The connected WordPressComponent\n */\nexport function contextConnect<\n\tC extends ( props: any, ref: ForwardedRef< any > ) => JSX.Element | null,\n>(\n\tComponent: C &\n\t\tAcceptsTwoArgs<\n\t\t\tC,\n\t\t\t'Warning: Your component function does not take a ref as the second argument. Did you mean to use `contextConnectWithoutRef`?'\n\t\t>,\n\tnamespace: string\n) {\n\treturn _contextConnect( Component, namespace, { forwardsRef: true } );\n}\n\n/**\n * \"Connects\" (or registers) a component within the Context system under a specified namespace.\n * Does not forward a ref.\n *\n * @param Component The component to register into the Context system.\n * @param namespace The namespace to register the component under.\n * @return The connected WordPressComponent\n */\nexport function contextConnectWithoutRef< P >(\n\tComponent: ( props: P ) => JSX.Element | null,\n\tnamespace: string\n) {\n\treturn _contextConnect( Component, namespace );\n}\n\n// This is an (experimental) evolution of the initial connect() HOC.\n// The hope is that we can improve render performance by removing functional\n// component wrappers.\nfunction _contextConnect<\n\tC extends ( props: any, ref: ForwardedRef< any > ) => JSX.Element | null,\n\tO extends ContextConnectOptions,\n>(\n\tComponent: C,\n\tnamespace: string,\n\toptions?: O\n): WordPressComponentFromProps<\n\tParameters< C >[ 0 ],\n\tO[ 'forwardsRef' ] extends true ? true : false\n> {\n\tconst WrappedComponent = options?.forwardsRef\n\t\t? forwardRef< any, Parameters< C >[ 0 ] >( Component )\n\t\t: Component;\n\n\tif ( typeof namespace === 'undefined' ) {\n\t\twarn( 'contextConnect: Please provide a namespace' );\n\t}\n\n\t// @ts-expect-error internal property\n\tlet mergedNamespace = WrappedComponent[ CONNECT_STATIC_NAMESPACE ] || [\n\t\tnamespace,\n\t];\n\n\t/**\n\t * Consolidate (merge) namespaces before attaching it to the WrappedComponent.\n\t */\n\tif ( Array.isArray( namespace ) ) {\n\t\tmergedNamespace = [ ...mergedNamespace, ...namespace ];\n\t}\n\tif ( typeof namespace === 'string' ) {\n\t\tmergedNamespace = [ ...mergedNamespace, namespace ];\n\t}\n\n\t// @ts-expect-error We can't rely on inferred types here because of the\n\t// `as` prop polymorphism we're handling in https://github.com/WordPress/gutenberg/blob/4f3a11243c365f94892e479bff0b922ccc4ccda3/packages/components/src/context/wordpress-component.ts#L32-L33\n\treturn Object.assign( WrappedComponent, {\n\t\t[ CONNECT_STATIC_NAMESPACE ]: [ ...new Set( mergedNamespace ) ],\n\t\tdisplayName: namespace,\n\t\tselector: `.${ getStyledClassNameFromKey( namespace ) }`,\n\t} );\n}\n\n/**\n * Attempts to retrieve the connected namespace from a component.\n *\n * @param Component The component to retrieve a namespace from.\n * @return The connected namespaces.\n */\nexport function getConnectNamespace(\n\tComponent: ReactChild | undefined | {}\n): string[] {\n\tif ( ! Component ) {\n\t\treturn [];\n\t}\n\n\tlet namespaces = [];\n\n\t// @ts-ignore internal property\n\tif ( Component[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore internal property\n\t\tnamespaces = Component[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\t// @ts-ignore\n\tif ( Component.type && Component.type[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore\n\t\tnamespaces = Component.type[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\treturn namespaces;\n}\n\n/**\n * Checks to see if a component is connected within the Context system.\n *\n * @param Component The component to retrieve a namespace from.\n * @param match The namespace to check.\n */\nexport function hasConnectNamespace(\n\tComponent: ReactNode,\n\tmatch: string[] | string\n): boolean {\n\tif ( ! Component ) {\n\t\treturn false;\n\t}\n\n\tif ( typeof match === 'string' ) {\n\t\treturn getConnectNamespace( Component ).includes( match );\n\t}\n\tif ( Array.isArray( match ) ) {\n\t\treturn match.some( ( result ) =>\n\t\t\tgetConnectNamespace( Component ).includes( result )\n\t\t);\n\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
3
2
  * External dependencies
4
3
  */
@@ -16,6 +15,7 @@ import warn from '@wordpress/warning';
16
15
  * Internal dependencies
17
16
  */
18
17
  import { useUpdateEffect } from '../utils';
18
+ import { jsx as _jsx } from "react/jsx-runtime";
19
19
  export const ComponentsContext = createContext( /** @type {Record<string, any>} */{});
20
20
  export const useComponentsContext = () => useContext(ComponentsContext);
21
21
 
@@ -39,7 +39,7 @@ function useContextSystemBridge({
39
39
  fastDeepEqual(valueRef.current, value) &&
40
40
  // But not the same reference.
41
41
  valueRef.current !== value) {
42
- typeof SCRIPT_DEBUG !== "undefined" && SCRIPT_DEBUG === true ? warn(`Please memoize your context: ${JSON.stringify(value)}`) : void 0;
42
+ globalThis.SCRIPT_DEBUG === true ? warn(`Please memoize your context: ${JSON.stringify(value)}`) : void 0;
43
43
  }
44
44
  }, [value]);
45
45
 
@@ -88,9 +88,10 @@ const BaseContextSystemProvider = ({
88
88
  const contextValue = useContextSystemBridge({
89
89
  value
90
90
  });
91
- return createElement(ComponentsContext.Provider, {
92
- value: contextValue
93
- }, children);
91
+ return /*#__PURE__*/_jsx(ComponentsContext.Provider, {
92
+ value: contextValue,
93
+ children: children
94
+ });
94
95
  };
95
96
  export const ContextSystemProvider = memo(BaseContextSystemProvider);
96
97
  //# sourceMappingURL=context-system-provider.js.map