@wordpress/components 25.1.0 → 25.1.2

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 (1049) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/README.md +1 -1
  3. package/build/alignment-matrix-control/cell.js +4 -5
  4. package/build/alignment-matrix-control/cell.js.map +1 -1
  5. package/build/alignment-matrix-control/icon.js +2 -4
  6. package/build/alignment-matrix-control/icon.js.map +1 -1
  7. package/build/alignment-matrix-control/index.js +6 -7
  8. package/build/alignment-matrix-control/index.js.map +1 -1
  9. package/build/angle-picker-control/angle-circle.js +4 -7
  10. package/build/angle-picker-control/angle-circle.js.map +1 -1
  11. package/build/angle-picker-control/index.js +2 -4
  12. package/build/angle-picker-control/index.js.map +1 -1
  13. package/build/autocomplete/autocompleter-ui.js +28 -1
  14. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  15. package/build/autocomplete/index.js +0 -20
  16. package/build/autocomplete/index.js.map +1 -1
  17. package/build/base-control/index.js +2 -4
  18. package/build/base-control/index.js.map +1 -1
  19. package/build/border-box-control/border-box-control/component.js +4 -6
  20. package/build/border-box-control/border-box-control/component.js.map +1 -1
  21. package/build/border-box-control/border-box-control-linked-button/component.js +2 -4
  22. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  23. package/build/border-box-control/border-box-control-split-controls/component.js +15 -13
  24. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  25. package/build/border-box-control/border-box-control-visualizer/component.js +2 -6
  26. package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  27. package/build/border-control/border-control/component.js +4 -6
  28. package/build/border-control/border-control/component.js.map +1 -1
  29. package/build/border-control/border-control-dropdown/component.js +4 -6
  30. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  31. package/build/border-control/border-control-style-picker/component.js +2 -4
  32. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  33. package/build/box-control/all-input-control.js +2 -4
  34. package/build/box-control/all-input-control.js.map +1 -1
  35. package/build/box-control/axial-input-controls.js +2 -4
  36. package/build/box-control/axial-input-controls.js.map +1 -1
  37. package/build/box-control/icon.js +4 -7
  38. package/build/box-control/icon.js.map +1 -1
  39. package/build/box-control/index.js +7 -6
  40. package/build/box-control/index.js.map +1 -1
  41. package/build/box-control/input-controls.js +2 -4
  42. package/build/box-control/input-controls.js.map +1 -1
  43. package/build/box-control/linked-button.js +2 -4
  44. package/build/box-control/linked-button.js.map +1 -1
  45. package/build/box-control/unit-control.js +6 -6
  46. package/build/box-control/unit-control.js.map +1 -1
  47. package/build/button/deprecated.js +2 -4
  48. package/build/button/deprecated.js.map +1 -1
  49. package/build/button/index.js +20 -7
  50. package/build/button/index.js.map +1 -1
  51. package/build/button-group/index.js +4 -5
  52. package/build/button-group/index.js.map +1 -1
  53. package/build/card/card/component.js +2 -4
  54. package/build/card/card/component.js.map +1 -1
  55. package/build/card/card-body/component.js +4 -8
  56. package/build/card/card-body/component.js.map +1 -1
  57. package/build/card/card-divider/component.js +2 -6
  58. package/build/card/card-divider/component.js.map +1 -1
  59. package/build/card/card-footer/component.js +2 -6
  60. package/build/card/card-footer/component.js.map +1 -1
  61. package/build/card/card-header/component.js +2 -6
  62. package/build/card/card-header/component.js.map +1 -1
  63. package/build/card/card-media/component.js +2 -6
  64. package/build/card/card-media/component.js.map +1 -1
  65. package/build/checkbox-control/index.js +4 -5
  66. package/build/checkbox-control/index.js.map +1 -1
  67. package/build/circular-option-picker/index.js +19 -16
  68. package/build/circular-option-picker/index.js.map +1 -1
  69. package/build/clipboard-button/index.js +9 -20
  70. package/build/clipboard-button/index.js.map +1 -1
  71. package/build/clipboard-button/types.js +6 -0
  72. package/build/clipboard-button/types.js.map +1 -0
  73. package/build/color-control/index.native.js +4 -5
  74. package/build/color-control/index.native.js.map +1 -1
  75. package/build/color-indicator/index.js +4 -5
  76. package/build/color-indicator/index.js.map +1 -1
  77. package/build/color-palette/index.js +11 -11
  78. package/build/color-palette/index.js.map +1 -1
  79. package/build/color-picker/color-input.js +6 -3
  80. package/build/color-picker/color-input.js.map +1 -1
  81. package/build/color-picker/component.js +4 -5
  82. package/build/color-picker/component.js.map +1 -1
  83. package/build/color-picker/legacy-adapter.js +2 -1
  84. package/build/color-picker/legacy-adapter.js.map +1 -1
  85. package/build/confirm-dialog/component.js +13 -6
  86. package/build/confirm-dialog/component.js.map +1 -1
  87. package/build/custom-gradient-picker/gradient-bar/control-points.js +8 -8
  88. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  89. package/build/custom-select-control/index.js +34 -32
  90. package/build/custom-select-control/index.js.map +1 -1
  91. package/build/dashicon/index.js +4 -7
  92. package/build/dashicon/index.js.map +1 -1
  93. package/build/dashicon/index.native.js +4 -7
  94. package/build/dashicon/index.native.js.map +1 -1
  95. package/build/disabled/index.js +4 -7
  96. package/build/disabled/index.js.map +1 -1
  97. package/build/divider/component.js +4 -8
  98. package/build/divider/component.js.map +1 -1
  99. package/build/drop-zone/index.js +2 -4
  100. package/build/drop-zone/index.js.map +1 -1
  101. package/build/dropdown/dropdown-content-wrapper.js +2 -6
  102. package/build/dropdown/dropdown-content-wrapper.js.map +1 -1
  103. package/build/dropdown/index.js +29 -24
  104. package/build/dropdown/index.js.map +1 -1
  105. package/build/dropdown-menu/index.js +98 -93
  106. package/build/dropdown-menu/index.js.map +1 -1
  107. package/build/dropdown-menu/index.native.js +2 -4
  108. package/build/dropdown-menu/index.native.js.map +1 -1
  109. package/build/dropdown-menu-v2/index.js +14 -12
  110. package/build/dropdown-menu-v2/index.js.map +1 -1
  111. package/build/dropdown-menu-v2/styles.js +16 -16
  112. package/build/dropdown-menu-v2/styles.js.map +1 -1
  113. package/build/elevation/component.js +2 -6
  114. package/build/elevation/component.js.map +1 -1
  115. package/build/external-link/index.js +2 -4
  116. package/build/external-link/index.js.map +1 -1
  117. package/build/flex/flex/component.js +2 -6
  118. package/build/flex/flex/component.js.map +1 -1
  119. package/build/flex/flex-block/component.js +2 -6
  120. package/build/flex/flex-block/component.js.map +1 -1
  121. package/build/flex/flex-item/component.js +2 -6
  122. package/build/flex/flex-item/component.js.map +1 -1
  123. package/build/focal-point-picker/controls.js +4 -7
  124. package/build/focal-point-picker/controls.js.map +1 -1
  125. package/build/focal-point-picker/focal-point.js +2 -4
  126. package/build/focal-point-picker/focal-point.js.map +1 -1
  127. package/build/focal-point-picker/grid.js +2 -6
  128. package/build/focal-point-picker/grid.js.map +1 -1
  129. package/build/focal-point-picker/index.js +4 -6
  130. package/build/focal-point-picker/index.js.map +1 -1
  131. package/build/focal-point-picker/index.native.js +2 -4
  132. package/build/focal-point-picker/index.native.js.map +1 -1
  133. package/build/focal-point-picker/media.js +7 -10
  134. package/build/focal-point-picker/media.js.map +1 -1
  135. package/build/focal-point-picker/tooltip/index.native.js +2 -4
  136. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  137. package/build/focusable-iframe/index.js +4 -5
  138. package/build/focusable-iframe/index.js.map +1 -1
  139. package/build/font-size-picker/index.js +5 -3
  140. package/build/font-size-picker/index.js.map +1 -1
  141. package/build/font-size-picker/styles.js +19 -26
  142. package/build/font-size-picker/styles.js.map +1 -1
  143. package/build/footer-message-control/index.native.js +2 -1
  144. package/build/footer-message-control/index.native.js.map +1 -1
  145. package/build/form-file-upload/index.js +4 -5
  146. package/build/form-file-upload/index.js.map +1 -1
  147. package/build/form-toggle/index.js +4 -5
  148. package/build/form-toggle/index.js.map +1 -1
  149. package/build/form-token-field/index.js +4 -5
  150. package/build/form-token-field/index.js.map +1 -1
  151. package/build/form-token-field/token-input.js +4 -6
  152. package/build/form-token-field/token-input.js.map +1 -1
  153. package/build/gradient-picker/index.js +14 -12
  154. package/build/gradient-picker/index.js.map +1 -1
  155. package/build/grid/component.js +2 -4
  156. package/build/grid/component.js.map +1 -1
  157. package/build/guide/page.js +2 -1
  158. package/build/guide/page.js.map +1 -1
  159. package/build/h-stack/component.js +2 -6
  160. package/build/h-stack/component.js.map +1 -1
  161. package/build/h-stack/hook.js +4 -7
  162. package/build/h-stack/hook.js.map +1 -1
  163. package/build/heading/component.js +2 -6
  164. package/build/heading/component.js.map +1 -1
  165. package/build/higher-order/navigate-regions/index.js +3 -1
  166. package/build/higher-order/navigate-regions/index.js.map +1 -1
  167. package/build/higher-order/with-constrained-tabbing/index.js +2 -1
  168. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  169. package/build/higher-order/with-fallback-styles/index.js +3 -3
  170. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  171. package/build/higher-order/with-filters/index.js +2 -1
  172. package/build/higher-order/with-filters/index.js.map +1 -1
  173. package/build/higher-order/with-focus-outside/index.js +5 -7
  174. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  175. package/build/higher-order/with-focus-outside/index.native.js +5 -7
  176. package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
  177. package/build/higher-order/with-focus-return/index.js +2 -1
  178. package/build/higher-order/with-focus-return/index.js.map +1 -1
  179. package/build/higher-order/with-notices/index.js +3 -4
  180. package/build/higher-order/with-notices/index.js.map +1 -1
  181. package/build/higher-order/with-spoken-messages/index.js +2 -6
  182. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  183. package/build/icon/index.js +6 -6
  184. package/build/icon/index.js.map +1 -1
  185. package/build/input-control/index.js +5 -5
  186. package/build/input-control/index.js.map +1 -1
  187. package/build/input-control/input-base.js +3 -4
  188. package/build/input-control/input-base.js.map +1 -1
  189. package/build/input-control/input-field.js +3 -6
  190. package/build/input-control/input-field.js.map +1 -1
  191. package/build/input-control/input-prefix-wrapper.js +4 -8
  192. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  193. package/build/input-control/input-suffix-wrapper.js +4 -8
  194. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  195. package/build/input-control/label.js +4 -7
  196. package/build/input-control/label.js.map +1 -1
  197. package/build/input-control/styles/input-control-styles.js +2 -4
  198. package/build/input-control/styles/input-control-styles.js.map +1 -1
  199. package/build/isolated-event-container/index.js +2 -4
  200. package/build/isolated-event-container/index.js.map +1 -1
  201. package/build/item-group/item/component.js +2 -6
  202. package/build/item-group/item/component.js.map +1 -1
  203. package/build/item-group/item-group/component.js +2 -6
  204. package/build/item-group/item-group/component.js.map +1 -1
  205. package/build/item-group/styles.js +10 -10
  206. package/build/item-group/styles.js.map +1 -1
  207. package/build/menu-item/index.js +4 -5
  208. package/build/menu-item/index.js.map +1 -1
  209. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -6
  210. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  211. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  212. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  213. package/build/mobile/bottom-sheet/cell.native.js +5 -6
  214. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  215. package/build/mobile/bottom-sheet/color-cell.native.js +2 -4
  216. package/build/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  217. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -5
  218. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  219. package/build/mobile/bottom-sheet/footer-message-cell.native.js +2 -4
  220. package/build/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  221. package/build/mobile/bottom-sheet/index.native.js +8 -8
  222. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  223. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -7
  224. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  225. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -4
  226. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  227. package/build/mobile/bottom-sheet/picker-cell.native.js +4 -5
  228. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  229. package/build/mobile/bottom-sheet/radio-cell.native.js +2 -4
  230. package/build/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  231. package/build/mobile/bottom-sheet/range-cell.native.js +2 -4
  232. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  233. package/build/mobile/bottom-sheet/ripple.native.js +4 -6
  234. package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
  235. package/build/mobile/bottom-sheet/switch-cell.native.js +2 -4
  236. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  237. package/build/mobile/color-settings/index.native.js +5 -5
  238. package/build/mobile/color-settings/index.native.js.map +1 -1
  239. package/build/mobile/cycle-select-control/index.native.js +4 -5
  240. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  241. package/build/mobile/focal-point-settings-panel/index.native.js +5 -5
  242. package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  243. package/build/mobile/global-styles-context/index.native.js +2 -6
  244. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  245. package/build/mobile/gradient/index.native.js +4 -5
  246. package/build/mobile/gradient/index.native.js.map +1 -1
  247. package/build/mobile/image/image-editing-button.native.js +4 -5
  248. package/build/mobile/image/image-editing-button.native.js.map +1 -1
  249. package/build/mobile/image/index.native.js +15 -15
  250. package/build/mobile/image/index.native.js.map +1 -1
  251. package/build/mobile/keyboard-avoiding-view/index.ios.js +2 -4
  252. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  253. package/build/mobile/keyboard-aware-flat-list/index.android.js +4 -5
  254. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  255. package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
  256. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  257. package/build/mobile/link-picker/link-picker-results.native.js +4 -6
  258. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  259. package/build/mobile/link-settings/link-settings-navigation.native.js +4 -5
  260. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  261. package/build/mobile/link-settings/link-settings-screen.native.js +2 -4
  262. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  263. package/build/mobile/picker/index.ios.js +4 -6
  264. package/build/mobile/picker/index.ios.js.map +1 -1
  265. package/build/mobile/segmented-control/index.native.js +4 -5
  266. package/build/mobile/segmented-control/index.native.js.map +1 -1
  267. package/build/modal/index.js +4 -6
  268. package/build/modal/index.js.map +1 -1
  269. package/build/navigable-container/container.js +6 -9
  270. package/build/navigable-container/container.js.map +1 -1
  271. package/build/navigable-container/menu.js +4 -5
  272. package/build/navigable-container/menu.js.map +1 -1
  273. package/build/navigable-container/tabbable.js +4 -5
  274. package/build/navigable-container/tabbable.js.map +1 -1
  275. package/build/navigation/item/base.js +4 -5
  276. package/build/navigation/item/base.js.map +1 -1
  277. package/build/navigation/item/index.js +3 -4
  278. package/build/navigation/item/index.js.map +1 -1
  279. package/build/navigator/navigator-back-button/component.js +4 -7
  280. package/build/navigator/navigator-back-button/component.js.map +1 -1
  281. package/build/navigator/navigator-button/component.js +4 -7
  282. package/build/navigator/navigator-button/component.js.map +1 -1
  283. package/build/navigator/navigator-provider/component.js +4 -5
  284. package/build/navigator/navigator-provider/component.js.map +1 -1
  285. package/build/navigator/navigator-screen/component.js +9 -10
  286. package/build/navigator/navigator-screen/component.js.map +1 -1
  287. package/build/navigator/navigator-to-parent-button/component.js +4 -7
  288. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  289. package/build/notice/list.js +2 -4
  290. package/build/notice/list.js.map +1 -1
  291. package/build/notice/list.native.js +2 -4
  292. package/build/notice/list.native.js.map +1 -1
  293. package/build/number-control/index.js +12 -10
  294. package/build/number-control/index.js.map +1 -1
  295. package/build/number-control/styles/number-control-styles.js +9 -15
  296. package/build/number-control/styles/number-control-styles.js.map +1 -1
  297. package/build/palette-edit/index.js +11 -12
  298. package/build/palette-edit/index.js.map +1 -1
  299. package/build/panel/body.js +8 -8
  300. package/build/panel/body.js.map +1 -1
  301. package/build/placeholder/index.js +2 -4
  302. package/build/placeholder/index.js.map +1 -1
  303. package/build/popover/index.js +11 -12
  304. package/build/popover/index.js.map +1 -1
  305. package/build/popover/utils.js +15 -1
  306. package/build/popover/utils.js.map +1 -1
  307. package/build/query-controls/category-select.js +4 -6
  308. package/build/query-controls/category-select.js.map +1 -1
  309. package/build/radio-control/index.js +4 -5
  310. package/build/radio-control/index.js.map +1 -1
  311. package/build/radio-control/index.native.js +4 -5
  312. package/build/radio-control/index.native.js.map +1 -1
  313. package/build/radio-group/index.js +5 -5
  314. package/build/radio-group/index.js.map +1 -1
  315. package/build/radio-group/radio/index.js +5 -5
  316. package/build/radio-group/radio/index.js.map +1 -1
  317. package/build/range-control/index.js +2 -4
  318. package/build/range-control/index.js.map +1 -1
  319. package/build/range-control/index.native.js +4 -5
  320. package/build/range-control/index.native.js.map +1 -1
  321. package/build/range-control/input-range.js +2 -6
  322. package/build/range-control/input-range.js.map +1 -1
  323. package/build/range-control/mark.js +2 -4
  324. package/build/range-control/mark.js.map +1 -1
  325. package/build/range-control/rail.js +6 -7
  326. package/build/range-control/rail.js.map +1 -1
  327. package/build/range-control/tooltip.js +2 -4
  328. package/build/range-control/tooltip.js.map +1 -1
  329. package/build/resizable-box/index.js +5 -5
  330. package/build/resizable-box/index.js.map +1 -1
  331. package/build/resizable-box/resize-tooltip/index.js +4 -5
  332. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  333. package/build/resizable-box/resize-tooltip/label.js +4 -7
  334. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  335. package/build/scrollable/component.js +2 -6
  336. package/build/scrollable/component.js.map +1 -1
  337. package/build/search-control/index.js +2 -4
  338. package/build/search-control/index.js.map +1 -1
  339. package/build/select-control/index.js +4 -5
  340. package/build/select-control/index.js.map +1 -1
  341. package/build/select-control/index.native.js +4 -5
  342. package/build/select-control/index.native.js.map +1 -1
  343. package/build/slot-fill/bubbles-virtually/slot.js +4 -5
  344. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  345. package/build/slot-fill/index.js +17 -13
  346. package/build/slot-fill/index.js.map +1 -1
  347. package/build/slot-fill/index.native.js +10 -9
  348. package/build/slot-fill/index.native.js.map +1 -1
  349. package/build/slot-fill/slot.js +2 -4
  350. package/build/slot-fill/slot.js.map +1 -1
  351. package/build/snackbar/list.js +2 -4
  352. package/build/snackbar/list.js.map +1 -1
  353. package/build/spacer/component.js +2 -6
  354. package/build/spacer/component.js.map +1 -1
  355. package/build/spinner/index.js +4 -6
  356. package/build/spinner/index.js.map +1 -1
  357. package/build/surface/component.js +2 -6
  358. package/build/surface/component.js.map +1 -1
  359. package/build/tab-panel/index.js +4 -5
  360. package/build/tab-panel/index.js.map +1 -1
  361. package/build/text/component.js +4 -6
  362. package/build/text/component.js.map +1 -1
  363. package/build/text-control/index.js +4 -5
  364. package/build/text-control/index.js.map +1 -1
  365. package/build/text-control/index.native.js +4 -5
  366. package/build/text-control/index.native.js.map +1 -1
  367. package/build/textarea-control/index.js +4 -5
  368. package/build/textarea-control/index.js.map +1 -1
  369. package/build/theme/index.js +4 -7
  370. package/build/theme/index.js.map +1 -1
  371. package/build/toggle-control/index.native.js +4 -5
  372. package/build/toggle-control/index.native.js.map +1 -1
  373. package/build/toggle-group-control/toggle-group-control/as-button-group.js +4 -6
  374. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  375. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +4 -6
  376. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  377. package/build/toggle-group-control/toggle-group-control/component.js +2 -4
  378. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  379. package/build/toggle-group-control/toggle-group-control-option/component.js +2 -6
  380. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  381. package/build/toggle-group-control/toggle-group-control-option-base/component.js +6 -7
  382. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  383. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +2 -4
  384. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  385. package/build/toolbar/toolbar/index.js +9 -13
  386. package/build/toolbar/toolbar/index.js.map +1 -1
  387. package/build/toolbar/toolbar/toolbar-container.js +9 -13
  388. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  389. package/build/toolbar/toolbar-button/index.js +13 -11
  390. package/build/toolbar/toolbar-button/index.js.map +1 -1
  391. package/build/toolbar/toolbar-context/index.js.map +1 -1
  392. package/build/toolbar/toolbar-dropdown-menu/index.js +8 -10
  393. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  394. package/build/toolbar/toolbar-group/index.js +11 -10
  395. package/build/toolbar/toolbar-group/index.js.map +1 -1
  396. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -6
  397. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  398. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -5
  399. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  400. package/build/toolbar/toolbar-group/toolbar-group-container.js +4 -7
  401. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  402. package/build/toolbar/toolbar-item/index.js +13 -11
  403. package/build/toolbar/toolbar-item/index.js.map +1 -1
  404. package/build/toolbar/toolbar-item/types.js +6 -0
  405. package/build/toolbar/toolbar-item/types.js.map +1 -0
  406. package/build/tools-panel/tools-panel/component.js +2 -4
  407. package/build/tools-panel/tools-panel/component.js.map +1 -1
  408. package/build/tools-panel/tools-panel-header/component.js +2 -4
  409. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  410. package/build/tools-panel/tools-panel-item/component.js +4 -8
  411. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  412. package/build/tooltip/index.js +4 -5
  413. package/build/tooltip/index.js.map +1 -1
  414. package/build/tooltip/index.native.js +2 -1
  415. package/build/tooltip/index.native.js.map +1 -1
  416. package/build/tree-grid/cell.js +2 -4
  417. package/build/tree-grid/cell.js.map +1 -1
  418. package/build/tree-grid/index.js +2 -4
  419. package/build/tree-grid/index.js.map +1 -1
  420. package/build/tree-grid/item.js +4 -5
  421. package/build/tree-grid/item.js.map +1 -1
  422. package/build/tree-grid/roving-tab-index-item.js +2 -1
  423. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  424. package/build/tree-grid/row.js +2 -6
  425. package/build/tree-grid/row.js.map +1 -1
  426. package/build/tree-select/index.js +4 -7
  427. package/build/tree-select/index.js.map +1 -1
  428. package/build/truncate/component.js +4 -6
  429. package/build/truncate/component.js.map +1 -1
  430. package/build/ui/control-group/component.js +8 -12
  431. package/build/ui/control-group/component.js.map +1 -1
  432. package/build/ui/control-label/component.js +4 -8
  433. package/build/ui/control-label/component.js.map +1 -1
  434. package/build/ui/form-group/form-group-content.js +4 -5
  435. package/build/ui/form-group/form-group-content.js.map +1 -1
  436. package/build/ui/form-group/form-group-label.js +2 -1
  437. package/build/ui/form-group/form-group-label.js.map +1 -1
  438. package/build/ui/form-group/form-group.js +8 -8
  439. package/build/ui/form-group/form-group.js.map +1 -1
  440. package/build/ui/shortcut/component.js +4 -7
  441. package/build/ui/shortcut/component.js.map +1 -1
  442. package/build/ui/spinner/component.js +2 -6
  443. package/build/ui/spinner/component.js.map +1 -1
  444. package/build/ui/tooltip/component.js +3 -4
  445. package/build/ui/tooltip/component.js.map +1 -1
  446. package/build/ui/tooltip/content.js +5 -8
  447. package/build/ui/tooltip/content.js.map +1 -1
  448. package/build/unit-control/index.js +31 -94
  449. package/build/unit-control/index.js.map +1 -1
  450. package/build/unit-control/index.native.js +7 -7
  451. package/build/unit-control/index.native.js.map +1 -1
  452. package/build/unit-control/unit-select-control.js +15 -7
  453. package/build/unit-control/unit-select-control.js.map +1 -1
  454. package/build/v-stack/component.js +2 -6
  455. package/build/v-stack/component.js.map +1 -1
  456. package/build/visually-hidden/component.js +4 -8
  457. package/build/visually-hidden/component.js.map +1 -1
  458. package/build/z-stack/component.js +7 -9
  459. package/build/z-stack/component.js.map +1 -1
  460. package/build/z-stack/styles.js +23 -42
  461. package/build/z-stack/styles.js.map +1 -1
  462. package/build-module/alignment-matrix-control/cell.js +4 -4
  463. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  464. package/build-module/alignment-matrix-control/icon.js +2 -3
  465. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  466. package/build-module/alignment-matrix-control/index.js +6 -6
  467. package/build-module/alignment-matrix-control/index.js.map +1 -1
  468. package/build-module/angle-picker-control/angle-circle.js +4 -4
  469. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  470. package/build-module/angle-picker-control/index.js +2 -3
  471. package/build-module/angle-picker-control/index.js.map +1 -1
  472. package/build-module/autocomplete/autocompleter-ui.js +27 -2
  473. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  474. package/build-module/autocomplete/index.js +1 -19
  475. package/build-module/autocomplete/index.js.map +1 -1
  476. package/build-module/base-control/index.js +2 -3
  477. package/build-module/base-control/index.js.map +1 -1
  478. package/build-module/border-box-control/border-box-control/component.js +4 -5
  479. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  480. package/build-module/border-box-control/border-box-control-linked-button/component.js +2 -3
  481. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  482. package/build-module/border-box-control/border-box-control-split-controls/component.js +15 -12
  483. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  484. package/build-module/border-box-control/border-box-control-visualizer/component.js +2 -3
  485. package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  486. package/build-module/border-control/border-control/component.js +4 -5
  487. package/build-module/border-control/border-control/component.js.map +1 -1
  488. package/build-module/border-control/border-control-dropdown/component.js +4 -5
  489. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  490. package/build-module/border-control/border-control-style-picker/component.js +2 -3
  491. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  492. package/build-module/box-control/all-input-control.js +2 -3
  493. package/build-module/box-control/all-input-control.js.map +1 -1
  494. package/build-module/box-control/axial-input-controls.js +2 -3
  495. package/build-module/box-control/axial-input-controls.js.map +1 -1
  496. package/build-module/box-control/icon.js +4 -4
  497. package/build-module/box-control/icon.js.map +1 -1
  498. package/build-module/box-control/index.js +7 -5
  499. package/build-module/box-control/index.js.map +1 -1
  500. package/build-module/box-control/input-controls.js +2 -3
  501. package/build-module/box-control/input-controls.js.map +1 -1
  502. package/build-module/box-control/linked-button.js +2 -3
  503. package/build-module/box-control/linked-button.js.map +1 -1
  504. package/build-module/box-control/unit-control.js +6 -5
  505. package/build-module/box-control/unit-control.js.map +1 -1
  506. package/build-module/button/deprecated.js +2 -3
  507. package/build-module/button/deprecated.js.map +1 -1
  508. package/build-module/button/index.js +20 -6
  509. package/build-module/button/index.js.map +1 -1
  510. package/build-module/button-group/index.js +4 -4
  511. package/build-module/button-group/index.js.map +1 -1
  512. package/build-module/card/card/component.js +2 -3
  513. package/build-module/card/card/component.js.map +1 -1
  514. package/build-module/card/card-body/component.js +4 -5
  515. package/build-module/card/card-body/component.js.map +1 -1
  516. package/build-module/card/card-divider/component.js +2 -3
  517. package/build-module/card/card-divider/component.js.map +1 -1
  518. package/build-module/card/card-footer/component.js +2 -3
  519. package/build-module/card/card-footer/component.js.map +1 -1
  520. package/build-module/card/card-header/component.js +2 -3
  521. package/build-module/card/card-header/component.js.map +1 -1
  522. package/build-module/card/card-media/component.js +2 -3
  523. package/build-module/card/card-media/component.js.map +1 -1
  524. package/build-module/checkbox-control/index.js +4 -4
  525. package/build-module/checkbox-control/index.js.map +1 -1
  526. package/build-module/circular-option-picker/index.js +19 -15
  527. package/build-module/circular-option-picker/index.js.map +1 -1
  528. package/build-module/clipboard-button/index.js +9 -20
  529. package/build-module/clipboard-button/index.js.map +1 -1
  530. package/build-module/clipboard-button/types.js +2 -0
  531. package/build-module/clipboard-button/types.js.map +1 -0
  532. package/build-module/color-control/index.native.js +4 -4
  533. package/build-module/color-control/index.native.js.map +1 -1
  534. package/build-module/color-indicator/index.js +4 -4
  535. package/build-module/color-indicator/index.js.map +1 -1
  536. package/build-module/color-palette/index.js +11 -10
  537. package/build-module/color-palette/index.js.map +1 -1
  538. package/build-module/color-picker/color-input.js +6 -3
  539. package/build-module/color-picker/color-input.js.map +1 -1
  540. package/build-module/color-picker/component.js +4 -4
  541. package/build-module/color-picker/component.js.map +1 -1
  542. package/build-module/color-picker/legacy-adapter.js +2 -1
  543. package/build-module/color-picker/legacy-adapter.js.map +1 -1
  544. package/build-module/confirm-dialog/component.js +14 -6
  545. package/build-module/confirm-dialog/component.js.map +1 -1
  546. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +8 -7
  547. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  548. package/build-module/custom-select-control/index.js +34 -31
  549. package/build-module/custom-select-control/index.js.map +1 -1
  550. package/build-module/dashicon/index.js +4 -4
  551. package/build-module/dashicon/index.js.map +1 -1
  552. package/build-module/dashicon/index.native.js +4 -4
  553. package/build-module/dashicon/index.native.js.map +1 -1
  554. package/build-module/disabled/index.js +4 -4
  555. package/build-module/disabled/index.js.map +1 -1
  556. package/build-module/divider/component.js +4 -5
  557. package/build-module/divider/component.js.map +1 -1
  558. package/build-module/drop-zone/index.js +2 -3
  559. package/build-module/drop-zone/index.js.map +1 -1
  560. package/build-module/dropdown/dropdown-content-wrapper.js +2 -3
  561. package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -1
  562. package/build-module/dropdown/index.js +29 -24
  563. package/build-module/dropdown/index.js.map +1 -1
  564. package/build-module/dropdown-menu/index.js +95 -91
  565. package/build-module/dropdown-menu/index.js.map +1 -1
  566. package/build-module/dropdown-menu/index.native.js +2 -3
  567. package/build-module/dropdown-menu/index.native.js.map +1 -1
  568. package/build-module/dropdown-menu-v2/index.js +14 -11
  569. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  570. package/build-module/dropdown-menu-v2/styles.js +16 -16
  571. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  572. package/build-module/elevation/component.js +2 -3
  573. package/build-module/elevation/component.js.map +1 -1
  574. package/build-module/external-link/index.js +2 -3
  575. package/build-module/external-link/index.js.map +1 -1
  576. package/build-module/flex/flex/component.js +2 -3
  577. package/build-module/flex/flex/component.js.map +1 -1
  578. package/build-module/flex/flex-block/component.js +2 -3
  579. package/build-module/flex/flex-block/component.js.map +1 -1
  580. package/build-module/flex/flex-item/component.js +2 -3
  581. package/build-module/flex/flex-item/component.js.map +1 -1
  582. package/build-module/focal-point-picker/controls.js +4 -4
  583. package/build-module/focal-point-picker/controls.js.map +1 -1
  584. package/build-module/focal-point-picker/focal-point.js +2 -3
  585. package/build-module/focal-point-picker/focal-point.js.map +1 -1
  586. package/build-module/focal-point-picker/grid.js +2 -3
  587. package/build-module/focal-point-picker/grid.js.map +1 -1
  588. package/build-module/focal-point-picker/index.js +4 -5
  589. package/build-module/focal-point-picker/index.js.map +1 -1
  590. package/build-module/focal-point-picker/index.native.js +2 -3
  591. package/build-module/focal-point-picker/index.native.js.map +1 -1
  592. package/build-module/focal-point-picker/media.js +7 -7
  593. package/build-module/focal-point-picker/media.js.map +1 -1
  594. package/build-module/focal-point-picker/tooltip/index.native.js +2 -3
  595. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  596. package/build-module/focusable-iframe/index.js +4 -4
  597. package/build-module/focusable-iframe/index.js.map +1 -1
  598. package/build-module/font-size-picker/index.js +5 -4
  599. package/build-module/font-size-picker/index.js.map +1 -1
  600. package/build-module/font-size-picker/styles.js +17 -23
  601. package/build-module/font-size-picker/styles.js.map +1 -1
  602. package/build-module/footer-message-control/index.native.js +2 -1
  603. package/build-module/footer-message-control/index.native.js.map +1 -1
  604. package/build-module/form-file-upload/index.js +4 -4
  605. package/build-module/form-file-upload/index.js.map +1 -1
  606. package/build-module/form-toggle/index.js +4 -4
  607. package/build-module/form-toggle/index.js.map +1 -1
  608. package/build-module/form-token-field/index.js +4 -4
  609. package/build-module/form-token-field/index.js.map +1 -1
  610. package/build-module/form-token-field/token-input.js +4 -5
  611. package/build-module/form-token-field/token-input.js.map +1 -1
  612. package/build-module/gradient-picker/index.js +14 -11
  613. package/build-module/gradient-picker/index.js.map +1 -1
  614. package/build-module/grid/component.js +2 -3
  615. package/build-module/grid/component.js.map +1 -1
  616. package/build-module/guide/page.js +2 -1
  617. package/build-module/guide/page.js.map +1 -1
  618. package/build-module/h-stack/component.js +2 -3
  619. package/build-module/h-stack/component.js.map +1 -1
  620. package/build-module/h-stack/hook.js +4 -4
  621. package/build-module/h-stack/hook.js.map +1 -1
  622. package/build-module/heading/component.js +2 -3
  623. package/build-module/heading/component.js.map +1 -1
  624. package/build-module/higher-order/navigate-regions/index.js +3 -1
  625. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  626. package/build-module/higher-order/with-constrained-tabbing/index.js +2 -1
  627. package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
  628. package/build-module/higher-order/with-fallback-styles/index.js +3 -2
  629. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  630. package/build-module/higher-order/with-filters/index.js +2 -1
  631. package/build-module/higher-order/with-filters/index.js.map +1 -1
  632. package/build-module/higher-order/with-focus-outside/index.js +5 -4
  633. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  634. package/build-module/higher-order/with-focus-outside/index.native.js +5 -4
  635. package/build-module/higher-order/with-focus-outside/index.native.js.map +1 -1
  636. package/build-module/higher-order/with-focus-return/index.js +2 -1
  637. package/build-module/higher-order/with-focus-return/index.js.map +1 -1
  638. package/build-module/higher-order/with-notices/index.js +3 -3
  639. package/build-module/higher-order/with-notices/index.js.map +1 -1
  640. package/build-module/higher-order/with-spoken-messages/index.js +2 -3
  641. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  642. package/build-module/icon/index.js +6 -6
  643. package/build-module/icon/index.js.map +1 -1
  644. package/build-module/input-control/index.js +5 -4
  645. package/build-module/input-control/index.js.map +1 -1
  646. package/build-module/input-control/input-base.js +3 -3
  647. package/build-module/input-control/input-base.js.map +1 -1
  648. package/build-module/input-control/input-field.js +3 -3
  649. package/build-module/input-control/input-field.js.map +1 -1
  650. package/build-module/input-control/input-prefix-wrapper.js +4 -5
  651. package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
  652. package/build-module/input-control/input-suffix-wrapper.js +4 -5
  653. package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
  654. package/build-module/input-control/label.js +4 -4
  655. package/build-module/input-control/label.js.map +1 -1
  656. package/build-module/input-control/styles/input-control-styles.js +2 -3
  657. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  658. package/build-module/isolated-event-container/index.js +2 -3
  659. package/build-module/isolated-event-container/index.js.map +1 -1
  660. package/build-module/item-group/item/component.js +2 -3
  661. package/build-module/item-group/item/component.js.map +1 -1
  662. package/build-module/item-group/item-group/component.js +2 -3
  663. package/build-module/item-group/item-group/component.js.map +1 -1
  664. package/build-module/item-group/styles.js +10 -10
  665. package/build-module/item-group/styles.js.map +1 -1
  666. package/build-module/menu-item/index.js +4 -4
  667. package/build-module/menu-item/index.js.map +1 -1
  668. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -5
  669. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  670. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  671. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  672. package/build-module/mobile/bottom-sheet/cell.native.js +5 -5
  673. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  674. package/build-module/mobile/bottom-sheet/color-cell.native.js +2 -3
  675. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  676. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -4
  677. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  678. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js +2 -3
  679. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  680. package/build-module/mobile/bottom-sheet/index.native.js +8 -7
  681. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  682. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -4
  683. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  684. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -3
  685. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  686. package/build-module/mobile/bottom-sheet/picker-cell.native.js +4 -4
  687. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  688. package/build-module/mobile/bottom-sheet/radio-cell.native.js +2 -3
  689. package/build-module/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  690. package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
  691. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  692. package/build-module/mobile/bottom-sheet/ripple.native.js +4 -5
  693. package/build-module/mobile/bottom-sheet/ripple.native.js.map +1 -1
  694. package/build-module/mobile/bottom-sheet/switch-cell.native.js +2 -3
  695. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  696. package/build-module/mobile/color-settings/index.native.js +5 -4
  697. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  698. package/build-module/mobile/cycle-select-control/index.native.js +4 -4
  699. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  700. package/build-module/mobile/focal-point-settings-panel/index.native.js +5 -4
  701. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  702. package/build-module/mobile/global-styles-context/index.native.js +2 -3
  703. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  704. package/build-module/mobile/gradient/index.native.js +4 -4
  705. package/build-module/mobile/gradient/index.native.js.map +1 -1
  706. package/build-module/mobile/image/image-editing-button.native.js +4 -4
  707. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  708. package/build-module/mobile/image/index.native.js +15 -14
  709. package/build-module/mobile/image/index.native.js.map +1 -1
  710. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +2 -3
  711. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  712. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +4 -4
  713. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  714. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
  715. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  716. package/build-module/mobile/link-picker/link-picker-results.native.js +4 -5
  717. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  718. package/build-module/mobile/link-settings/link-settings-navigation.native.js +4 -4
  719. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  720. package/build-module/mobile/link-settings/link-settings-screen.native.js +2 -3
  721. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  722. package/build-module/mobile/picker/index.ios.js +4 -5
  723. package/build-module/mobile/picker/index.ios.js.map +1 -1
  724. package/build-module/mobile/segmented-control/index.native.js +4 -4
  725. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  726. package/build-module/modal/index.js +4 -5
  727. package/build-module/modal/index.js.map +1 -1
  728. package/build-module/navigable-container/container.js +6 -6
  729. package/build-module/navigable-container/container.js.map +1 -1
  730. package/build-module/navigable-container/menu.js +4 -4
  731. package/build-module/navigable-container/menu.js.map +1 -1
  732. package/build-module/navigable-container/tabbable.js +4 -4
  733. package/build-module/navigable-container/tabbable.js.map +1 -1
  734. package/build-module/navigation/item/base.js +4 -4
  735. package/build-module/navigation/item/base.js.map +1 -1
  736. package/build-module/navigation/item/index.js +3 -3
  737. package/build-module/navigation/item/index.js.map +1 -1
  738. package/build-module/navigator/navigator-back-button/component.js +4 -4
  739. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  740. package/build-module/navigator/navigator-button/component.js +4 -4
  741. package/build-module/navigator/navigator-button/component.js.map +1 -1
  742. package/build-module/navigator/navigator-provider/component.js +4 -4
  743. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  744. package/build-module/navigator/navigator-screen/component.js +9 -7
  745. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  746. package/build-module/navigator/navigator-to-parent-button/component.js +4 -4
  747. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  748. package/build-module/notice/list.js +2 -3
  749. package/build-module/notice/list.js.map +1 -1
  750. package/build-module/notice/list.native.js +2 -3
  751. package/build-module/notice/list.native.js.map +1 -1
  752. package/build-module/number-control/index.js +12 -10
  753. package/build-module/number-control/index.js.map +1 -1
  754. package/build-module/number-control/styles/number-control-styles.js +7 -14
  755. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  756. package/build-module/palette-edit/index.js +11 -11
  757. package/build-module/palette-edit/index.js.map +1 -1
  758. package/build-module/panel/body.js +8 -7
  759. package/build-module/panel/body.js.map +1 -1
  760. package/build-module/placeholder/index.js +2 -3
  761. package/build-module/placeholder/index.js.map +1 -1
  762. package/build-module/popover/index.js +12 -12
  763. package/build-module/popover/index.js.map +1 -1
  764. package/build-module/popover/utils.js +11 -0
  765. package/build-module/popover/utils.js.map +1 -1
  766. package/build-module/query-controls/category-select.js +4 -5
  767. package/build-module/query-controls/category-select.js.map +1 -1
  768. package/build-module/radio-control/index.js +4 -4
  769. package/build-module/radio-control/index.js.map +1 -1
  770. package/build-module/radio-control/index.native.js +4 -4
  771. package/build-module/radio-control/index.native.js.map +1 -1
  772. package/build-module/radio-group/index.js +5 -4
  773. package/build-module/radio-group/index.js.map +1 -1
  774. package/build-module/radio-group/radio/index.js +5 -4
  775. package/build-module/radio-group/radio/index.js.map +1 -1
  776. package/build-module/range-control/index.js +2 -3
  777. package/build-module/range-control/index.js.map +1 -1
  778. package/build-module/range-control/index.native.js +4 -4
  779. package/build-module/range-control/index.native.js.map +1 -1
  780. package/build-module/range-control/input-range.js +2 -3
  781. package/build-module/range-control/input-range.js.map +1 -1
  782. package/build-module/range-control/mark.js +2 -3
  783. package/build-module/range-control/mark.js.map +1 -1
  784. package/build-module/range-control/rail.js +6 -6
  785. package/build-module/range-control/rail.js.map +1 -1
  786. package/build-module/range-control/tooltip.js +2 -3
  787. package/build-module/range-control/tooltip.js.map +1 -1
  788. package/build-module/resizable-box/index.js +5 -4
  789. package/build-module/resizable-box/index.js.map +1 -1
  790. package/build-module/resizable-box/resize-tooltip/index.js +4 -4
  791. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  792. package/build-module/resizable-box/resize-tooltip/label.js +4 -4
  793. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  794. package/build-module/scrollable/component.js +2 -3
  795. package/build-module/scrollable/component.js.map +1 -1
  796. package/build-module/search-control/index.js +2 -3
  797. package/build-module/search-control/index.js.map +1 -1
  798. package/build-module/select-control/index.js +4 -4
  799. package/build-module/select-control/index.js.map +1 -1
  800. package/build-module/select-control/index.native.js +4 -4
  801. package/build-module/select-control/index.native.js.map +1 -1
  802. package/build-module/slot-fill/bubbles-virtually/slot.js +4 -4
  803. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  804. package/build-module/slot-fill/index.js +17 -12
  805. package/build-module/slot-fill/index.js.map +1 -1
  806. package/build-module/slot-fill/index.native.js +10 -8
  807. package/build-module/slot-fill/index.native.js.map +1 -1
  808. package/build-module/slot-fill/slot.js +2 -3
  809. package/build-module/slot-fill/slot.js.map +1 -1
  810. package/build-module/snackbar/list.js +2 -3
  811. package/build-module/snackbar/list.js.map +1 -1
  812. package/build-module/spacer/component.js +2 -3
  813. package/build-module/spacer/component.js.map +1 -1
  814. package/build-module/spinner/index.js +4 -5
  815. package/build-module/spinner/index.js.map +1 -1
  816. package/build-module/surface/component.js +2 -3
  817. package/build-module/surface/component.js.map +1 -1
  818. package/build-module/tab-panel/index.js +4 -4
  819. package/build-module/tab-panel/index.js.map +1 -1
  820. package/build-module/text/component.js +4 -5
  821. package/build-module/text/component.js.map +1 -1
  822. package/build-module/text-control/index.js +4 -4
  823. package/build-module/text-control/index.js.map +1 -1
  824. package/build-module/text-control/index.native.js +4 -4
  825. package/build-module/text-control/index.native.js.map +1 -1
  826. package/build-module/textarea-control/index.js +4 -4
  827. package/build-module/textarea-control/index.js.map +1 -1
  828. package/build-module/theme/index.js +4 -4
  829. package/build-module/theme/index.js.map +1 -1
  830. package/build-module/toggle-control/index.native.js +4 -4
  831. package/build-module/toggle-control/index.native.js.map +1 -1
  832. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +4 -5
  833. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  834. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +4 -5
  835. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  836. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -3
  837. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  838. package/build-module/toggle-group-control/toggle-group-control-option/component.js +2 -3
  839. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  840. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +6 -6
  841. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  842. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +2 -3
  843. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  844. package/build-module/toolbar/toolbar/index.js +10 -13
  845. package/build-module/toolbar/toolbar/index.js.map +1 -1
  846. package/build-module/toolbar/toolbar/toolbar-container.js +9 -12
  847. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  848. package/build-module/toolbar/toolbar-button/index.js +13 -10
  849. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  850. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  851. package/build-module/toolbar/toolbar-dropdown-menu/index.js +8 -9
  852. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  853. package/build-module/toolbar/toolbar-group/index.js +11 -9
  854. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  855. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -5
  856. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  857. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -4
  858. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  859. package/build-module/toolbar/toolbar-group/toolbar-group-container.js +4 -4
  860. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  861. package/build-module/toolbar/toolbar-item/index.js +13 -10
  862. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  863. package/build-module/toolbar/toolbar-item/types.js +2 -0
  864. package/build-module/toolbar/toolbar-item/types.js.map +1 -0
  865. package/build-module/tools-panel/tools-panel/component.js +2 -3
  866. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  867. package/build-module/tools-panel/tools-panel-header/component.js +2 -3
  868. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  869. package/build-module/tools-panel/tools-panel-item/component.js +4 -5
  870. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  871. package/build-module/tooltip/index.js +4 -4
  872. package/build-module/tooltip/index.js.map +1 -1
  873. package/build-module/tooltip/index.native.js +2 -1
  874. package/build-module/tooltip/index.native.js.map +1 -1
  875. package/build-module/tree-grid/cell.js +2 -3
  876. package/build-module/tree-grid/cell.js.map +1 -1
  877. package/build-module/tree-grid/index.js +2 -3
  878. package/build-module/tree-grid/index.js.map +1 -1
  879. package/build-module/tree-grid/item.js +4 -4
  880. package/build-module/tree-grid/item.js.map +1 -1
  881. package/build-module/tree-grid/roving-tab-index-item.js +2 -1
  882. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  883. package/build-module/tree-grid/row.js +2 -3
  884. package/build-module/tree-grid/row.js.map +1 -1
  885. package/build-module/tree-select/index.js +4 -4
  886. package/build-module/tree-select/index.js.map +1 -1
  887. package/build-module/truncate/component.js +4 -5
  888. package/build-module/truncate/component.js.map +1 -1
  889. package/build-module/ui/control-group/component.js +8 -9
  890. package/build-module/ui/control-group/component.js.map +1 -1
  891. package/build-module/ui/control-label/component.js +4 -5
  892. package/build-module/ui/control-label/component.js.map +1 -1
  893. package/build-module/ui/form-group/form-group-content.js +4 -4
  894. package/build-module/ui/form-group/form-group-content.js.map +1 -1
  895. package/build-module/ui/form-group/form-group-label.js +2 -1
  896. package/build-module/ui/form-group/form-group-label.js.map +1 -1
  897. package/build-module/ui/form-group/form-group.js +8 -7
  898. package/build-module/ui/form-group/form-group.js.map +1 -1
  899. package/build-module/ui/shortcut/component.js +4 -4
  900. package/build-module/ui/shortcut/component.js.map +1 -1
  901. package/build-module/ui/spinner/component.js +2 -3
  902. package/build-module/ui/spinner/component.js.map +1 -1
  903. package/build-module/ui/tooltip/component.js +3 -3
  904. package/build-module/ui/tooltip/component.js.map +1 -1
  905. package/build-module/ui/tooltip/content.js +5 -5
  906. package/build-module/ui/tooltip/content.js.map +1 -1
  907. package/build-module/unit-control/index.js +31 -88
  908. package/build-module/unit-control/index.js.map +1 -1
  909. package/build-module/unit-control/index.native.js +7 -6
  910. package/build-module/unit-control/index.native.js.map +1 -1
  911. package/build-module/unit-control/unit-select-control.js +19 -6
  912. package/build-module/unit-control/unit-select-control.js.map +1 -1
  913. package/build-module/v-stack/component.js +2 -3
  914. package/build-module/v-stack/component.js.map +1 -1
  915. package/build-module/visually-hidden/component.js +4 -5
  916. package/build-module/visually-hidden/component.js.map +1 -1
  917. package/build-module/z-stack/component.js +7 -6
  918. package/build-module/z-stack/component.js.map +1 -1
  919. package/build-module/z-stack/styles.js +22 -44
  920. package/build-module/z-stack/styles.js.map +1 -1
  921. package/build-style/style-rtl.css +16 -21
  922. package/build-style/style.css +16 -21
  923. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  924. package/build-types/autocomplete/index.d.ts.map +1 -1
  925. package/build-types/button/deprecated.d.ts +6 -6
  926. package/build-types/button/index.d.ts.map +1 -1
  927. package/build-types/button/stories/e2e/index.d.ts +1 -0
  928. package/build-types/button/stories/e2e/index.d.ts.map +1 -1
  929. package/build-types/button/types.d.ts +16 -9
  930. package/build-types/button/types.d.ts.map +1 -1
  931. package/build-types/circular-option-picker/types.d.ts +2 -2
  932. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  933. package/build-types/clipboard-button/index.d.ts +4 -15
  934. package/build-types/clipboard-button/index.d.ts.map +1 -1
  935. package/build-types/clipboard-button/types.d.ts +11 -0
  936. package/build-types/clipboard-button/types.d.ts.map +1 -0
  937. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  938. package/build-types/dropdown/index.d.ts +1 -1
  939. package/build-types/dropdown/index.d.ts.map +1 -1
  940. package/build-types/dropdown/types.d.ts +7 -0
  941. package/build-types/dropdown/types.d.ts.map +1 -1
  942. package/build-types/dropdown-menu/index.d.ts +1 -1
  943. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  944. package/build-types/dropdown-menu/stories/index.d.ts +4 -3
  945. package/build-types/dropdown-menu/stories/index.d.ts.map +1 -1
  946. package/build-types/dropdown-menu/types.d.ts +7 -0
  947. package/build-types/dropdown-menu/types.d.ts.map +1 -1
  948. package/build-types/dropdown-menu-v2/styles.d.ts +4 -4
  949. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  950. package/build-types/dropdown-menu-v2/types.d.ts +2 -2
  951. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  952. package/build-types/font-size-picker/index.d.ts.map +1 -1
  953. package/build-types/font-size-picker/styles.d.ts +0 -6
  954. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  955. package/build-types/item-group/styles.d.ts.map +1 -1
  956. package/build-types/navigator/navigator-back-button/component.d.ts +1 -1
  957. package/build-types/navigator/navigator-back-button/hook.d.ts +1 -1
  958. package/build-types/navigator/navigator-button/component.d.ts +1 -1
  959. package/build-types/navigator/navigator-button/hook.d.ts +1 -1
  960. package/build-types/navigator/navigator-to-parent-button/component.d.ts +1 -1
  961. package/build-types/number-control/index.d.ts.map +1 -1
  962. package/build-types/number-control/styles/number-control-styles.d.ts +5 -3
  963. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  964. package/build-types/popover/index.d.ts.map +1 -1
  965. package/build-types/popover/stories/index.d.ts +0 -1
  966. package/build-types/popover/stories/index.d.ts.map +1 -1
  967. package/build-types/popover/utils.d.ts +10 -0
  968. package/build-types/popover/utils.d.ts.map +1 -1
  969. package/build-types/select-control/index.d.ts.map +1 -1
  970. package/build-types/select-control/types.d.ts +6 -0
  971. package/build-types/select-control/types.d.ts.map +1 -1
  972. package/build-types/toolbar/stories/index.d.ts.map +1 -1
  973. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  974. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  975. package/build-types/toolbar/toolbar-button/index.d.ts +6 -6
  976. package/build-types/toolbar/toolbar-context/index.d.ts +2 -2
  977. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  978. package/build-types/toolbar/toolbar-item/index.d.ts +4 -6
  979. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  980. package/build-types/toolbar/toolbar-item/types.d.ts +17 -0
  981. package/build-types/toolbar/toolbar-item/types.d.ts.map +1 -0
  982. package/build-types/unit-control/index.d.ts +3 -6
  983. package/build-types/unit-control/index.d.ts.map +1 -1
  984. package/build-types/unit-control/stories/index.d.ts.map +1 -1
  985. package/build-types/unit-control/unit-select-control.d.ts +7 -6
  986. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  987. package/build-types/z-stack/component.d.ts.map +1 -1
  988. package/build-types/z-stack/stories/index.d.ts.map +1 -1
  989. package/build-types/z-stack/styles.d.ts +5 -4
  990. package/build-types/z-stack/styles.d.ts.map +1 -1
  991. package/package.json +21 -20
  992. package/src/autocomplete/autocompleter-ui.tsx +44 -2
  993. package/src/autocomplete/index.tsx +2 -32
  994. package/src/box-control/test/index.tsx +28 -60
  995. package/src/button/README.md +15 -0
  996. package/src/button/index.tsx +11 -4
  997. package/src/button/stories/e2e/index.tsx +22 -0
  998. package/src/button/style.scss +18 -25
  999. package/src/button/test/index.tsx +13 -0
  1000. package/src/button/types.ts +17 -9
  1001. package/src/circular-option-picker/types.ts +2 -5
  1002. package/src/clipboard-button/{index.js → index.tsx} +11 -17
  1003. package/src/clipboard-button/types.ts +11 -0
  1004. package/src/confirm-dialog/component.tsx +12 -2
  1005. package/src/confirm-dialog/stories/index.js +8 -15
  1006. package/src/confirm-dialog/test/index.js +42 -0
  1007. package/src/dropdown/index.tsx +20 -10
  1008. package/src/dropdown/types.ts +8 -0
  1009. package/src/dropdown-menu/index.tsx +101 -85
  1010. package/src/dropdown-menu/stories/index.tsx +1 -1
  1011. package/src/dropdown-menu/types.ts +8 -0
  1012. package/src/dropdown-menu-v2/index.tsx +2 -2
  1013. package/src/dropdown-menu-v2/styles.ts +7 -5
  1014. package/src/dropdown-menu-v2/types.ts +2 -2
  1015. package/src/font-size-picker/index.tsx +9 -5
  1016. package/src/font-size-picker/styles.ts +0 -10
  1017. package/src/item-group/styles.ts +13 -5
  1018. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +16 -29
  1019. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  1020. package/src/mobile/html-text-input/test/__snapshots__/index.native.js.snap +46 -0
  1021. package/src/mobile/html-text-input/test/index.native.js +2 -2
  1022. package/src/mobile/image/index.native.js +1 -1
  1023. package/src/mobile/link-settings/test/link-settings-navigation.native.js +5 -16
  1024. package/src/modal/style.scss +2 -2
  1025. package/src/number-control/index.tsx +6 -3
  1026. package/src/number-control/styles/number-control-styles.ts +8 -16
  1027. package/src/popover/index.tsx +3 -2
  1028. package/src/popover/stories/index.tsx +0 -13
  1029. package/src/popover/test/index.tsx +22 -1
  1030. package/src/popover/utils.ts +12 -0
  1031. package/src/search-control/README.md +7 -1
  1032. package/src/select-control/index.tsx +1 -0
  1033. package/src/select-control/types.ts +6 -0
  1034. package/src/toolbar/stories/index.tsx +0 -3
  1035. package/src/toolbar/toolbar/index.tsx +3 -6
  1036. package/src/toolbar/toolbar/toolbar-container.tsx +5 -9
  1037. package/src/toolbar/toolbar-context/index.ts +2 -4
  1038. package/src/toolbar/toolbar-dropdown-menu/index.js +0 -1
  1039. package/src/toolbar/toolbar-item/index.tsx +13 -15
  1040. package/src/toolbar/toolbar-item/types.ts +27 -0
  1041. package/src/tooltip/test/index.native.js +1 -3
  1042. package/src/unit-control/index.tsx +29 -95
  1043. package/src/unit-control/stories/index.tsx +0 -4
  1044. package/src/unit-control/test/index.tsx +151 -223
  1045. package/src/unit-control/unit-select-control.tsx +20 -10
  1046. package/src/z-stack/component.tsx +4 -2
  1047. package/src/z-stack/stories/index.tsx +6 -13
  1048. package/src/z-stack/styles.ts +23 -24
  1049. package/tsconfig.tsbuildinfo +1 -1
@@ -15,8 +15,6 @@ Object.defineProperty(exports, "useBaseControlProps", {
15
15
 
16
16
  var _element = require("@wordpress/element");
17
17
 
18
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
19
-
20
18
  var _classnames = _interopRequireDefault(require("classnames"));
21
19
 
22
20
  var _visuallyHidden = require("../visually-hidden");
@@ -111,9 +109,9 @@ const VisualLabel = ({
111
109
  children,
112
110
  ...props
113
111
  }) => {
114
- return (0, _element.createElement)(_baseControlStyles.StyledVisualLabel, (0, _extends2.default)({}, props, {
112
+ return (0, _element.createElement)(_baseControlStyles.StyledVisualLabel, { ...props,
115
113
  className: (0, _classnames.default)('components-base-control__label', className)
116
- }), children);
114
+ }, children);
117
115
  };
118
116
 
119
117
  exports.VisualLabel = VisualLabel;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/base-control/index.tsx"],"names":["BaseControl","__nextHasNoMarginBottom","id","label","hideLabelFromVision","help","className","children","undefined","VisualLabel","props"],"mappings":";;;;;;;;;;;;;;;;;;;AAGA;;AAKA;;AAEA;;AASA;;AAnBA;AACA;AACA;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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACO,MAAMI,WAAW,GAAG,CAAE;AAC5BH,EAAAA,SAD4B;AAE5BC,EAAAA,QAF4B;AAG5B,KAAGG;AAHyB,CAAF,KAI4C;AACtE,SACC,4BAAC,oCAAD,6BACMA,KADN;AAEC,IAAA,SAAS,EAAG,yBACX,gCADW,EAEXJ,SAFW;AAFb,MAOGC,QAPH,CADD;AAWA,CAhBM;;;AAiBPP,WAAW,CAACS,WAAZ,GAA0BA,WAA1B;eAEeT,W","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { BaseControlProps, BaseControlVisualLabelProps } from './types';\nimport {\n\tWrapper,\n\tStyledField,\n\tStyledLabel,\n\tStyledHelp,\n\tStyledVisualLabel,\n} from './styles/base-control-styles';\nimport type { WordPressComponentProps } from '../ui/context';\n\nexport { useBaseControlProps } from './hooks';\n\n/**\n * `BaseControl` is a component used to generate labels and help text for components handling user inputs.\n *\n * ```jsx\n * import { BaseControl, useBaseControlProps } from '@wordpress/components';\n *\n * // Render a `BaseControl` for a textarea input\n * const MyCustomTextareaControl = ({ children, ...baseProps }) => (\n * \t// `useBaseControlProps` is a convenience hook to get the props for the `BaseControl`\n * \t// and the inner control itself. Namely, it takes care of generating a unique `id`,\n * \t// properly associating it with the `label` and `help` elements.\n * \tconst { baseControlProps, controlProps } = useBaseControlProps( baseProps );\n *\n * \treturn (\n * \t\t<BaseControl { ...baseControlProps } __nextHasNoMarginBottom={ true }>\n * \t\t\t<textarea { ...controlProps }>\n * \t\t\t { children }\n * \t\t\t</textarea>\n * \t\t</BaseControl>\n * \t);\n * );\n * ```\n */\nexport const BaseControl = ( {\n\t__nextHasNoMarginBottom = false,\n\tid,\n\tlabel,\n\thideLabelFromVision = false,\n\thelp,\n\tclassName,\n\tchildren,\n}: BaseControlProps ) => {\n\treturn (\n\t\t<Wrapper\n\t\t\tclassName={ classnames( 'components-base-control', className ) }\n\t\t>\n\t\t\t<StyledField\n\t\t\t\tclassName=\"components-base-control__field\"\n\t\t\t\t// TODO: Official deprecation for this should start after all internal usages have been migrated\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t>\n\t\t\t\t{ label &&\n\t\t\t\t\tid &&\n\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t<VisuallyHidden as=\"label\" htmlFor={ id }>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<StyledLabel\n\t\t\t\t\t\t\tclassName=\"components-base-control__label\"\n\t\t\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</StyledLabel>\n\t\t\t\t\t) ) }\n\t\t\t\t{ label &&\n\t\t\t\t\t! id &&\n\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t) ) }\n\t\t\t\t{ children }\n\t\t\t</StyledField>\n\t\t\t{ !! help && (\n\t\t\t\t<StyledHelp\n\t\t\t\t\tid={ id ? id + '__help' : undefined }\n\t\t\t\t\tclassName=\"components-base-control__help\"\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t>\n\t\t\t\t\t{ help }\n\t\t\t\t</StyledHelp>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n};\n\n/**\n * `BaseControl.VisualLabel` is used to render a purely visual label inside a `BaseControl` component.\n *\n * It should only be used in cases where the children being rendered inside `BaseControl` are already accessibly labeled,\n * e.g., a button, but we want an additional visual label for that section equivalent to the labels `BaseControl` would\n * otherwise use if the `label` prop was passed.\n *\n * @example\n * import { BaseControl } from '@wordpress/components';\n *\n * const MyBaseControl = () => (\n * \t<BaseControl help=\"This button is already accessibly labeled.\">\n * \t\t<BaseControl.VisualLabel>Author</BaseControl.VisualLabel>\n * \t\t<Button>Select an author</Button>\n * \t</BaseControl>\n * );\n */\nexport const VisualLabel = ( {\n\tclassName,\n\tchildren,\n\t...props\n}: WordPressComponentProps< BaseControlVisualLabelProps, 'span' > ) => {\n\treturn (\n\t\t<StyledVisualLabel\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-base-control__label',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</StyledVisualLabel>\n\t);\n};\nBaseControl.VisualLabel = VisualLabel;\n\nexport default BaseControl;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/base-control/index.tsx"],"names":["BaseControl","__nextHasNoMarginBottom","id","label","hideLabelFromVision","help","className","children","undefined","VisualLabel","props"],"mappings":";;;;;;;;;;;;;;;;;AAGA;;AAKA;;AAEA;;AASA;;AAnBA;AACA;AACA;;AAGA;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;AACO,MAAMA,WAAW,GAAG,CAAE;AAC5BC,EAAAA,uBAAuB,GAAG,KADE;AAE5BC,EAAAA,EAF4B;AAG5BC,EAAAA,KAH4B;AAI5BC,EAAAA,mBAAmB,GAAG,KAJM;AAK5BC,EAAAA,IAL4B;AAM5BC,EAAAA,SAN4B;AAO5BC,EAAAA;AAP4B,CAAF,KAQF;AACxB,SACC,4BAAC,0BAAD;AACC,IAAA,SAAS,EAAG,yBAAY,yBAAZ,EAAuCD,SAAvC;AADb,KAGC,4BAAC,8BAAD;AACC,IAAA,SAAS,EAAC,gCADX,CAEC;AAFD;AAGC,IAAA,uBAAuB,EAAGL;AAH3B,KAKGE,KAAK,IACND,EADC,KAECE,mBAAmB,GACpB,4BAAC,8BAAD;AAAgB,IAAA,EAAE,EAAC,OAAnB;AAA2B,IAAA,OAAO,EAAGF;AAArC,KACGC,KADH,CADoB,GAKpB,4BAAC,8BAAD;AACC,IAAA,SAAS,EAAC,gCADX;AAEC,IAAA,OAAO,EAAGD;AAFX,KAIGC,KAJH,CAPA,CALH,EAmBGA,KAAK,IACN,CAAED,EADD,KAECE,mBAAmB,GACpB,4BAAC,8BAAD;AAAgB,IAAA,EAAE,EAAC;AAAnB,KAA6BD,KAA7B,CADoB,GAGpB,4BAAC,WAAD,CAAa,WAAb,QACGA,KADH,CALA,CAnBH,EA4BGI,QA5BH,CAHD,EAiCG,CAAC,CAAEF,IAAH,IACD,4BAAC,6BAAD;AACC,IAAA,EAAE,EAAGH,EAAE,GAAGA,EAAE,GAAG,QAAR,GAAmBM,SAD3B;AAEC,IAAA,SAAS,EAAC,+BAFX;AAGC,IAAA,uBAAuB,EAAGP;AAH3B,KAKGI,IALH,CAlCF,CADD;AA6CA,CAtDM;AAwDP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACO,MAAMI,WAAW,GAAG,CAAE;AAC5BH,EAAAA,SAD4B;AAE5BC,EAAAA,QAF4B;AAG5B,KAAGG;AAHyB,CAAF,KAI4C;AACtE,SACC,4BAAC,oCAAD,OACMA,KADN;AAEC,IAAA,SAAS,EAAG,yBACX,gCADW,EAEXJ,SAFW;AAFb,KAOGC,QAPH,CADD;AAWA,CAhBM;;;AAiBPP,WAAW,CAACS,WAAZ,GAA0BA,WAA1B;eAEeT,W","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { BaseControlProps, BaseControlVisualLabelProps } from './types';\nimport {\n\tWrapper,\n\tStyledField,\n\tStyledLabel,\n\tStyledHelp,\n\tStyledVisualLabel,\n} from './styles/base-control-styles';\nimport type { WordPressComponentProps } from '../ui/context';\n\nexport { useBaseControlProps } from './hooks';\n\n/**\n * `BaseControl` is a component used to generate labels and help text for components handling user inputs.\n *\n * ```jsx\n * import { BaseControl, useBaseControlProps } from '@wordpress/components';\n *\n * // Render a `BaseControl` for a textarea input\n * const MyCustomTextareaControl = ({ children, ...baseProps }) => (\n * \t// `useBaseControlProps` is a convenience hook to get the props for the `BaseControl`\n * \t// and the inner control itself. Namely, it takes care of generating a unique `id`,\n * \t// properly associating it with the `label` and `help` elements.\n * \tconst { baseControlProps, controlProps } = useBaseControlProps( baseProps );\n *\n * \treturn (\n * \t\t<BaseControl { ...baseControlProps } __nextHasNoMarginBottom={ true }>\n * \t\t\t<textarea { ...controlProps }>\n * \t\t\t { children }\n * \t\t\t</textarea>\n * \t\t</BaseControl>\n * \t);\n * );\n * ```\n */\nexport const BaseControl = ( {\n\t__nextHasNoMarginBottom = false,\n\tid,\n\tlabel,\n\thideLabelFromVision = false,\n\thelp,\n\tclassName,\n\tchildren,\n}: BaseControlProps ) => {\n\treturn (\n\t\t<Wrapper\n\t\t\tclassName={ classnames( 'components-base-control', className ) }\n\t\t>\n\t\t\t<StyledField\n\t\t\t\tclassName=\"components-base-control__field\"\n\t\t\t\t// TODO: Official deprecation for this should start after all internal usages have been migrated\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t>\n\t\t\t\t{ label &&\n\t\t\t\t\tid &&\n\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t<VisuallyHidden as=\"label\" htmlFor={ id }>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<StyledLabel\n\t\t\t\t\t\t\tclassName=\"components-base-control__label\"\n\t\t\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</StyledLabel>\n\t\t\t\t\t) ) }\n\t\t\t\t{ label &&\n\t\t\t\t\t! id &&\n\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t) ) }\n\t\t\t\t{ children }\n\t\t\t</StyledField>\n\t\t\t{ !! help && (\n\t\t\t\t<StyledHelp\n\t\t\t\t\tid={ id ? id + '__help' : undefined }\n\t\t\t\t\tclassName=\"components-base-control__help\"\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t>\n\t\t\t\t\t{ help }\n\t\t\t\t</StyledHelp>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n};\n\n/**\n * `BaseControl.VisualLabel` is used to render a purely visual label inside a `BaseControl` component.\n *\n * It should only be used in cases where the children being rendered inside `BaseControl` are already accessibly labeled,\n * e.g., a button, but we want an additional visual label for that section equivalent to the labels `BaseControl` would\n * otherwise use if the `label` prop was passed.\n *\n * @example\n * import { BaseControl } from '@wordpress/components';\n *\n * const MyBaseControl = () => (\n * \t<BaseControl help=\"This button is already accessibly labeled.\">\n * \t\t<BaseControl.VisualLabel>Author</BaseControl.VisualLabel>\n * \t\t<Button>Select an author</Button>\n * \t</BaseControl>\n * );\n */\nexport const VisualLabel = ( {\n\tclassName,\n\tchildren,\n\t...props\n}: WordPressComponentProps< BaseControlVisualLabelProps, 'span' > ) => {\n\treturn (\n\t\t<StyledVisualLabel\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-base-control__label',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</StyledVisualLabel>\n\t);\n};\nBaseControl.VisualLabel = VisualLabel;\n\nexport default BaseControl;\n"]}
@@ -9,8 +9,6 @@ exports.default = exports.BorderBoxControl = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _i18n = require("@wordpress/i18n");
15
13
 
16
14
  var _compose = require("@wordpress/compose");
@@ -89,11 +87,11 @@ const UnconnectedBorderBoxControl = (props, forwardedRef) => {
89
87
  shift: true
90
88
  } : undefined, [popoverPlacement, popoverOffset, popoverAnchor]);
91
89
  const mergedRef = (0, _compose.useMergeRefs)([setPopoverAnchor, forwardedRef]);
92
- return (0, _element.createElement)(_view.View, (0, _extends2.default)({
93
- className: className
94
- }, otherProps, {
90
+ return (0, _element.createElement)(_view.View, {
91
+ className: className,
92
+ ...otherProps,
95
93
  ref: mergedRef
96
- }), (0, _element.createElement)(BorderLabel, {
94
+ }, (0, _element.createElement)(BorderLabel, {
97
95
  label: label,
98
96
  hideLabelFromVision: hideLabelFromVision
99
97
  }), (0, _element.createElement)(_view.View, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/border-box-control/border-box-control/component.tsx"],"names":["BorderLabel","props","label","hideLabelFromVision","UnconnectedBorderBoxControl","forwardedRef","className","colors","disableCustomColors","disableUnits","enableAlpha","enableStyle","hasMixedBorders","isLinked","linkedControlClassName","linkedValue","onLinkedChange","onSplitChange","popoverPlacement","popoverOffset","size","splitValue","toggleLinked","wrapperClassName","__experimentalIsRenderedInSidebar","otherProps","popoverAnchor","setPopoverAnchor","popoverProps","placement","offset","anchor","shift","undefined","mergedRef","BorderBoxControl"],"mappings":";;;;;;;;;AAIA;;;;AADA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAjBA;AACA;AACA;;AAKA;AACA;AACA;AAgBA,MAAMA,WAAW,GAAKC,KAAF,IAAyB;AAC5C,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAAiCF,KAAvC;;AAEA,MAAK,CAAEC,KAAP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EC,IAAA,QAAQ,EAAGT,QAFZ;AAGC,IAAA,IAAI,EAAGO;AAHR,IAzCD,CALD,CADD;AAuDA,CA3GD;AA6GA;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;;;AACO,MAAMe,gBAAgB,GAAG,6BAC/B/B,2BAD+B,EAE/B,kBAF+B,CAAzB;;eAKQ+B,gB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BorderBoxControlLinkedButton from '../border-box-control-linked-button';\nimport BorderBoxControlSplitControls from '../border-box-control-split-controls';\nimport { BorderControl } from '../../border-control';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControl } from './hook';\n\nimport type { BorderBoxControlProps } from '../types';\nimport type {\n\tLabelProps,\n\tBorderControlProps,\n} from '../../border-control/types';\n\nconst BorderLabel = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel>{ label }</StyledLabel>\n\t);\n};\n\nconst UnconnectedBorderBoxControl = (\n\tprops: WordPressComponentProps< BorderBoxControlProps, 'div', false >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tclassName,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tdisableUnits,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\thasMixedBorders,\n\t\thideLabelFromVision,\n\t\tisLinked,\n\t\tlabel,\n\t\tlinkedControlClassName,\n\t\tlinkedValue,\n\t\tonLinkedChange,\n\t\tonSplitChange,\n\t\tpopoverPlacement,\n\t\tpopoverOffset,\n\t\tsize,\n\t\tsplitValue,\n\t\ttoggleLinked,\n\t\twrapperClassName,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t...otherProps\n\t} = useBorderBoxControl( props );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState< Element | null >(\n\t\tnull\n\t);\n\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps: BorderControlProps[ '__unstablePopoverProps' ] =\n\t\tuseMemo(\n\t\t\t() =>\n\t\t\t\tpopoverPlacement\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tplacement: popoverPlacement,\n\t\t\t\t\t\t\toffset: popoverOffset,\n\t\t\t\t\t\t\tanchor: popoverAnchor,\n\t\t\t\t\t\t\tshift: true,\n\t\t\t\t\t }\n\t\t\t\t\t: undefined,\n\t\t\t[ popoverPlacement, popoverOffset, popoverAnchor ]\n\t\t);\n\n\tconst mergedRef = useMergeRefs( [ setPopoverAnchor, forwardedRef ] );\n\n\treturn (\n\t\t<View className={ className } { ...otherProps } ref={ mergedRef }>\n\t\t\t<BorderLabel\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<View className={ wrapperClassName }>\n\t\t\t\t{ isLinked ? (\n\t\t\t\t\t<BorderControl\n\t\t\t\t\t\tclassName={ linkedControlClassName }\n\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\tdisableUnits={ disableUnits }\n\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\tonChange={ onLinkedChange }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\thasMixedBorders ? __( 'Mixed' ) : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\t\t\tshouldSanitizeBorder={ false } // This component will handle that.\n\t\t\t\t\t\tvalue={ linkedValue }\n\t\t\t\t\t\twithSlider={ true }\n\t\t\t\t\t\twidth={\n\t\t\t\t\t\t\tsize === '__unstable-large' ? '116px' : '110px'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<BorderBoxControlSplitControls\n\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\tonChange={ onSplitChange }\n\t\t\t\t\t\tpopoverPlacement={ popoverPlacement }\n\t\t\t\t\t\tpopoverOffset={ popoverOffset }\n\t\t\t\t\t\tvalue={ splitValue }\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<BorderBoxControlLinkedButton\n\t\t\t\t\tonClick={ toggleLinked }\n\t\t\t\t\tisLinked={ isLinked }\n\t\t\t\t\tsize={ size }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</View>\n\t);\n};\n\n/**\n * The `BorderBoxControl` effectively has two view states. The first, a \"linked\"\n * view, allows configuration of a flat border via a single `BorderControl`.\n * The second, a \"split\" view, contains a `BorderControl` for each side\n * as well as a visualizer for the currently selected borders. Each view also\n * contains a button to toggle between the two.\n *\n * When switching from the \"split\" view to \"linked\", if the individual side\n * borders are not consistent, the \"linked\" view will display any border\n * properties selections that are consistent while showing a mixed state for\n * those that aren't. For example, if all borders had the same color and style\n * but different widths, then the border dropdown in the \"linked\" view's\n * `BorderControl` would show that consistent color and style but the \"linked\"\n * view's width input would show \"Mixed\" placeholder text.\n *\n * ```jsx\n * import { __experimentalBorderBoxControl as BorderBoxControl } from '@wordpress/components';\n * import { __ } from '@wordpress/i18n';\n *\n * const colors = [\n * \t{ name: 'Blue 20', color: '#72aee6' },\n * \t// ...\n * ];\n *\n * const MyBorderBoxControl = () => {\n * \tconst defaultBorder = {\n * \t\tcolor: '#72aee6',\n * \t\tstyle: 'dashed',\n * \t\twidth: '1px',\n * \t};\n * \tconst [ borders, setBorders ] = useState( {\n * \t\ttop: defaultBorder,\n * \t\tright: defaultBorder,\n * \t\tbottom: defaultBorder,\n * \t\tleft: defaultBorder,\n * \t} );\n * \tconst onChange = ( newBorders ) => setBorders( newBorders );\n *\n * \treturn (\n * \t\t<BorderBoxControl\n * \t\t\tcolors={ colors }\n * \t\t\tlabel={ __( 'Borders' ) }\n * \t\t\tonChange={ onChange }\n * \t\t\tvalue={ borders }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const BorderBoxControl = contextConnect(\n\tUnconnectedBorderBoxControl,\n\t'BorderBoxControl'\n);\n\nexport default BorderBoxControl;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/border-box-control/border-box-control/component.tsx"],"names":["BorderLabel","props","label","hideLabelFromVision","UnconnectedBorderBoxControl","forwardedRef","className","colors","disableCustomColors","disableUnits","enableAlpha","enableStyle","hasMixedBorders","isLinked","linkedControlClassName","linkedValue","onLinkedChange","onSplitChange","popoverPlacement","popoverOffset","size","splitValue","toggleLinked","wrapperClassName","__experimentalIsRenderedInSidebar","otherProps","popoverAnchor","setPopoverAnchor","popoverProps","placement","offset","anchor","shift","undefined","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IAAA,WAAW,EAAGC,WAJf;AAKC,IAAA,QAAQ,EAAGM,aALZ;AAMC,IAAA,gBAAgB,EAAGC,gBANpB;AAOC,IAAA,aAAa,EAAGC,aAPjB;AAQC,IAAA,KAAK,EAAGE,UART;AASC,IAAA,iCAAiC,EAChCG,iCAVF;AAYC,IAAA,IAAI,EAAGJ;AAZR,IA1BF,EAyCC,4BAAC,qCAAD;AACC,IAAA,OAAO,EAAGE,YADX;AAEC,IAAA,QAAQ,EAAGT,QAFZ;AAGC,IAAA,IAAI,EAAGO;AAHR,IAzCD,CALD,CADD;AAuDA,CA3GD;AA6GA;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;;;AACO,MAAMe,gBAAgB,GAAG,6BAC/B/B,2BAD+B,EAE/B,kBAF+B,CAAzB;;eAKQ+B,gB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BorderBoxControlLinkedButton from '../border-box-control-linked-button';\nimport BorderBoxControlSplitControls from '../border-box-control-split-controls';\nimport { BorderControl } from '../../border-control';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControl } from './hook';\n\nimport type { BorderBoxControlProps } from '../types';\nimport type {\n\tLabelProps,\n\tBorderControlProps,\n} from '../../border-control/types';\n\nconst BorderLabel = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel>{ label }</StyledLabel>\n\t);\n};\n\nconst UnconnectedBorderBoxControl = (\n\tprops: WordPressComponentProps< BorderBoxControlProps, 'div', false >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tclassName,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tdisableUnits,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\thasMixedBorders,\n\t\thideLabelFromVision,\n\t\tisLinked,\n\t\tlabel,\n\t\tlinkedControlClassName,\n\t\tlinkedValue,\n\t\tonLinkedChange,\n\t\tonSplitChange,\n\t\tpopoverPlacement,\n\t\tpopoverOffset,\n\t\tsize,\n\t\tsplitValue,\n\t\ttoggleLinked,\n\t\twrapperClassName,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t...otherProps\n\t} = useBorderBoxControl( props );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState< Element | null >(\n\t\tnull\n\t);\n\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps: BorderControlProps[ '__unstablePopoverProps' ] =\n\t\tuseMemo(\n\t\t\t() =>\n\t\t\t\tpopoverPlacement\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tplacement: popoverPlacement,\n\t\t\t\t\t\t\toffset: popoverOffset,\n\t\t\t\t\t\t\tanchor: popoverAnchor,\n\t\t\t\t\t\t\tshift: true,\n\t\t\t\t\t }\n\t\t\t\t\t: undefined,\n\t\t\t[ popoverPlacement, popoverOffset, popoverAnchor ]\n\t\t);\n\n\tconst mergedRef = useMergeRefs( [ setPopoverAnchor, forwardedRef ] );\n\n\treturn (\n\t\t<View className={ className } { ...otherProps } ref={ mergedRef }>\n\t\t\t<BorderLabel\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<View className={ wrapperClassName }>\n\t\t\t\t{ isLinked ? (\n\t\t\t\t\t<BorderControl\n\t\t\t\t\t\tclassName={ linkedControlClassName }\n\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\tdisableUnits={ disableUnits }\n\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\tonChange={ onLinkedChange }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\thasMixedBorders ? __( 'Mixed' ) : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\t\t\tshouldSanitizeBorder={ false } // This component will handle that.\n\t\t\t\t\t\tvalue={ linkedValue }\n\t\t\t\t\t\twithSlider={ true }\n\t\t\t\t\t\twidth={\n\t\t\t\t\t\t\tsize === '__unstable-large' ? '116px' : '110px'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<BorderBoxControlSplitControls\n\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\tonChange={ onSplitChange }\n\t\t\t\t\t\tpopoverPlacement={ popoverPlacement }\n\t\t\t\t\t\tpopoverOffset={ popoverOffset }\n\t\t\t\t\t\tvalue={ splitValue }\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<BorderBoxControlLinkedButton\n\t\t\t\t\tonClick={ toggleLinked }\n\t\t\t\t\tisLinked={ isLinked }\n\t\t\t\t\tsize={ size }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</View>\n\t);\n};\n\n/**\n * The `BorderBoxControl` effectively has two view states. The first, a \"linked\"\n * view, allows configuration of a flat border via a single `BorderControl`.\n * The second, a \"split\" view, contains a `BorderControl` for each side\n * as well as a visualizer for the currently selected borders. Each view also\n * contains a button to toggle between the two.\n *\n * When switching from the \"split\" view to \"linked\", if the individual side\n * borders are not consistent, the \"linked\" view will display any border\n * properties selections that are consistent while showing a mixed state for\n * those that aren't. For example, if all borders had the same color and style\n * but different widths, then the border dropdown in the \"linked\" view's\n * `BorderControl` would show that consistent color and style but the \"linked\"\n * view's width input would show \"Mixed\" placeholder text.\n *\n * ```jsx\n * import { __experimentalBorderBoxControl as BorderBoxControl } from '@wordpress/components';\n * import { __ } from '@wordpress/i18n';\n *\n * const colors = [\n * \t{ name: 'Blue 20', color: '#72aee6' },\n * \t// ...\n * ];\n *\n * const MyBorderBoxControl = () => {\n * \tconst defaultBorder = {\n * \t\tcolor: '#72aee6',\n * \t\tstyle: 'dashed',\n * \t\twidth: '1px',\n * \t};\n * \tconst [ borders, setBorders ] = useState( {\n * \t\ttop: defaultBorder,\n * \t\tright: defaultBorder,\n * \t\tbottom: defaultBorder,\n * \t\tleft: defaultBorder,\n * \t} );\n * \tconst onChange = ( newBorders ) => setBorders( newBorders );\n *\n * \treturn (\n * \t\t<BorderBoxControl\n * \t\t\tcolors={ colors }\n * \t\t\tlabel={ __( 'Borders' ) }\n * \t\t\tonChange={ onChange }\n * \t\t\tvalue={ borders }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const BorderBoxControl = contextConnect(\n\tUnconnectedBorderBoxControl,\n\t'BorderBoxControl'\n);\n\nexport default BorderBoxControl;\n"]}
@@ -9,8 +9,6 @@ exports.default = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _icons = require("@wordpress/icons");
15
13
 
16
14
  var _i18n = require("@wordpress/i18n");
@@ -43,13 +41,13 @@ const BorderBoxControlLinkedButton = (props, forwardedRef) => {
43
41
  text: label
44
42
  }, (0, _element.createElement)(_view.View, {
45
43
  className: className
46
- }, (0, _element.createElement)(_button.default, (0, _extends2.default)({}, buttonProps, {
44
+ }, (0, _element.createElement)(_button.default, { ...buttonProps,
47
45
  isSmall: true,
48
46
  icon: isLinked ? _icons.link : _icons.linkOff,
49
47
  iconSize: 24,
50
48
  "aria-label": label,
51
49
  ref: forwardedRef
52
- }))));
50
+ })));
53
51
  };
54
52
 
55
53
  const ConnectedBorderBoxControlLinkedButton = (0, _context.contextConnect)(BorderBoxControlLinkedButton, 'BorderBoxControlLinkedButton');
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/border-box-control/border-box-control-linked-button/component.tsx"],"names":["BorderBoxControlLinkedButton","props","forwardedRef","className","isLinked","buttonProps","label","link","linkOff","ConnectedBorderBoxControlLinkedButton"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAbA;AACA;AACA;;AAIA;AACA;AACA;AASA,MAAMA,4BAA4B,GAAG,CACpCC,KADoC,EAEpCC,YAFoC,KAGhC;AACJ,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuB,OAAGC;AAA1B,MACL,2CAAiCJ,KAAjC,CADD;AAEA,QAAMK,KAAK,GAAGF,QAAQ,GAAG,cAAI,cAAJ,CAAH,GAA0B,cAAI,YAAJ,CAAhD;AAEA,SACC,4BAAC,gBAAD;AAAS,IAAA,IAAI,EAAGE;AAAhB,KACC,4BAAC,UAAD;AAAM,IAAA,SAAS,EAAGH;AAAlB,KACC,4BAAC,eAAD,6BACME,WADN;AAEC,IAAA,OAAO,MAFR;AAGC,IAAA,IAAI,EAAGD,QAAQ,GAAGG,WAAH,GAAUC,cAH1B;AAIC,IAAA,QAAQ,EAAG,EAJZ;AAKC,kBAAaF,KALd;AAMC,IAAA,GAAG,EAAGJ;AANP,KADD,CADD,CADD;AAcA,CAtBD;;AAwBA,MAAMO,qCAAqC,GAAG,6BAC7CT,4BAD6C,EAE7C,8BAF6C,CAA9C;eAIeS,qC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { link, linkOff } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport Tooltip from '../../tooltip';\nimport { View } from '../../view';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControlLinkedButton } from './hook';\n\nimport type { LinkedButtonProps } from '../types';\n\nconst BorderBoxControlLinkedButton = (\n\tprops: WordPressComponentProps< LinkedButtonProps, 'button' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst { className, isLinked, ...buttonProps } =\n\t\tuseBorderBoxControlLinkedButton( props );\n\tconst label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' );\n\n\treturn (\n\t\t<Tooltip text={ label }>\n\t\t\t<View className={ className }>\n\t\t\t\t<Button\n\t\t\t\t\t{ ...buttonProps }\n\t\t\t\t\tisSmall\n\t\t\t\t\ticon={ isLinked ? link : linkOff }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</Tooltip>\n\t);\n};\n\nconst ConnectedBorderBoxControlLinkedButton = contextConnect(\n\tBorderBoxControlLinkedButton,\n\t'BorderBoxControlLinkedButton'\n);\nexport default ConnectedBorderBoxControlLinkedButton;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/border-box-control/border-box-control-linked-button/component.tsx"],"names":["BorderBoxControlLinkedButton","props","forwardedRef","className","isLinked","buttonProps","label","link","linkOff","ConnectedBorderBoxControlLinkedButton"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAbA;AACA;AACA;;AAIA;AACA;AACA;AASA,MAAMA,4BAA4B,GAAG,CACpCC,KADoC,EAEpCC,YAFoC,KAGhC;AACJ,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuB,OAAGC;AAA1B,MACL,2CAAiCJ,KAAjC,CADD;AAEA,QAAMK,KAAK,GAAGF,QAAQ,GAAG,cAAI,cAAJ,CAAH,GAA0B,cAAI,YAAJ,CAAhD;AAEA,SACC,4BAAC,gBAAD;AAAS,IAAA,IAAI,EAAGE;AAAhB,KACC,4BAAC,UAAD;AAAM,IAAA,SAAS,EAAGH;AAAlB,KACC,4BAAC,eAAD,OACME,WADN;AAEC,IAAA,OAAO,MAFR;AAGC,IAAA,IAAI,EAAGD,QAAQ,GAAGG,WAAH,GAAUC,cAH1B;AAIC,IAAA,QAAQ,EAAG,EAJZ;AAKC,kBAAaF,KALd;AAMC,IAAA,GAAG,EAAGJ;AANP,IADD,CADD,CADD;AAcA,CAtBD;;AAwBA,MAAMO,qCAAqC,GAAG,6BAC7CT,4BAD6C,EAE7C,8BAF6C,CAA9C;eAIeS,qC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { link, linkOff } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport Tooltip from '../../tooltip';\nimport { View } from '../../view';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControlLinkedButton } from './hook';\n\nimport type { LinkedButtonProps } from '../types';\n\nconst BorderBoxControlLinkedButton = (\n\tprops: WordPressComponentProps< LinkedButtonProps, 'button' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst { className, isLinked, ...buttonProps } =\n\t\tuseBorderBoxControlLinkedButton( props );\n\tconst label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' );\n\n\treturn (\n\t\t<Tooltip text={ label }>\n\t\t\t<View className={ className }>\n\t\t\t\t<Button\n\t\t\t\t\t{ ...buttonProps }\n\t\t\t\t\tisSmall\n\t\t\t\t\ticon={ isLinked ? link : linkOff }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</Tooltip>\n\t);\n};\n\nconst ConnectedBorderBoxControlLinkedButton = contextConnect(\n\tBorderBoxControlLinkedButton,\n\t'BorderBoxControlLinkedButton'\n);\nexport default ConnectedBorderBoxControlLinkedButton;\n"]}
@@ -9,8 +9,6 @@ exports.default = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _i18n = require("@wordpress/i18n");
15
13
 
16
14
  var _compose = require("@wordpress/compose");
@@ -68,40 +66,44 @@ const BorderBoxControlSplitControls = (props, forwardedRef) => {
68
66
  size
69
67
  };
70
68
  const mergedRef = (0, _compose.useMergeRefs)([setPopoverAnchor, forwardedRef]);
71
- return (0, _element.createElement)(_grid.Grid, (0, _extends2.default)({}, otherProps, {
69
+ return (0, _element.createElement)(_grid.Grid, { ...otherProps,
72
70
  ref: mergedRef,
73
71
  gap: 4
74
- }), (0, _element.createElement)(_borderBoxControlVisualizer.default, {
72
+ }, (0, _element.createElement)(_borderBoxControlVisualizer.default, {
75
73
  value: value,
76
74
  size: size
77
- }), (0, _element.createElement)(_borderControl.BorderControl, (0, _extends2.default)({
75
+ }), (0, _element.createElement)(_borderControl.BorderControl, {
78
76
  className: centeredClassName,
79
77
  hideLabelFromVision: true,
80
78
  label: (0, _i18n.__)('Top border'),
81
79
  onChange: newBorder => onChange(newBorder, 'top'),
82
80
  __unstablePopoverProps: popoverProps,
83
- value: value?.top
84
- }, sharedBorderControlProps)), (0, _element.createElement)(_borderControl.BorderControl, (0, _extends2.default)({
81
+ value: value?.top,
82
+ ...sharedBorderControlProps
83
+ }), (0, _element.createElement)(_borderControl.BorderControl, {
85
84
  hideLabelFromVision: true,
86
85
  label: (0, _i18n.__)('Left border'),
87
86
  onChange: newBorder => onChange(newBorder, 'left'),
88
87
  __unstablePopoverProps: popoverProps,
89
- value: value?.left
90
- }, sharedBorderControlProps)), (0, _element.createElement)(_borderControl.BorderControl, (0, _extends2.default)({
88
+ value: value?.left,
89
+ ...sharedBorderControlProps
90
+ }), (0, _element.createElement)(_borderControl.BorderControl, {
91
91
  className: rightAlignedClassName,
92
92
  hideLabelFromVision: true,
93
93
  label: (0, _i18n.__)('Right border'),
94
94
  onChange: newBorder => onChange(newBorder, 'right'),
95
95
  __unstablePopoverProps: popoverProps,
96
- value: value?.right
97
- }, sharedBorderControlProps)), (0, _element.createElement)(_borderControl.BorderControl, (0, _extends2.default)({
96
+ value: value?.right,
97
+ ...sharedBorderControlProps
98
+ }), (0, _element.createElement)(_borderControl.BorderControl, {
98
99
  className: centeredClassName,
99
100
  hideLabelFromVision: true,
100
101
  label: (0, _i18n.__)('Bottom border'),
101
102
  onChange: newBorder => onChange(newBorder, 'bottom'),
102
103
  __unstablePopoverProps: popoverProps,
103
- value: value?.bottom
104
- }, sharedBorderControlProps)));
104
+ value: value?.bottom,
105
+ ...sharedBorderControlProps
106
+ }));
105
107
  };
106
108
 
107
109
  const ConnectedBorderBoxControlSplitControls = (0, _context.contextConnect)(BorderBoxControlSplitControls, 'BorderBoxControlSplitControls');
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/border-box-control/border-box-control-split-controls/component.tsx"],"names":["BorderBoxControlSplitControls","props","forwardedRef","centeredClassName","colors","disableCustomColors","enableAlpha","enableStyle","onChange","popoverPlacement","popoverOffset","rightAlignedClassName","size","value","__experimentalIsRenderedInSidebar","otherProps","popoverAnchor","setPopoverAnchor","popoverProps","placement","offset","anchor","shift","undefined","sharedBorderControlProps","isCompact","mergedRef","newBorder","top","left","right","bott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JrC;AAKC,IAAA,sBAAsB,EAAGT,YAL1B;AAMC,IAAA,KAAK,EAAGL,KAAK,EAAEkB;AANhB,KAOMP,wBAPN,EA5BD,CADD;AAwCA,CA7FD;;AA+FA,MAAMQ,sCAAsC,GAAG,6BAC9ChC,6BAD8C,EAE9C,+BAF8C,CAA/C;eAIegC,sC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BorderBoxControlVisualizer from '../border-box-control-visualizer';\nimport { BorderControl } from '../../border-control';\nimport { Grid } from '../../grid';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControlSplitControls } from './hook';\n\nimport type { BorderControlProps } from '../../border-control/types';\nimport type { SplitControlsProps } from '../types';\n\nconst BorderBoxControlSplitControls = (\n\tprops: WordPressComponentProps< SplitControlsProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tcenteredClassName,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tonChange,\n\t\tpopoverPlacement,\n\t\tpopoverOffset,\n\t\trightAlignedClassName,\n\t\tsize = 'default',\n\t\tvalue,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t...otherProps\n\t} = useBorderBoxControlSplitControls( props );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState< Element | null >(\n\t\tnull\n\t);\n\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps: BorderControlProps[ '__unstablePopoverProps' ] =\n\t\tuseMemo(\n\t\t\t() =>\n\t\t\t\tpopoverPlacement\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tplacement: popoverPlacement,\n\t\t\t\t\t\t\toffset: popoverOffset,\n\t\t\t\t\t\t\tanchor: popoverAnchor,\n\t\t\t\t\t\t\tshift: true,\n\t\t\t\t\t }\n\t\t\t\t\t: undefined,\n\t\t\t[ popoverPlacement, popoverOffset, popoverAnchor ]\n\t\t);\n\n\tconst sharedBorderControlProps = {\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tisCompact: true,\n\t\t__experimentalIsRenderedInSidebar,\n\t\tsize,\n\t};\n\n\tconst mergedRef = useMergeRefs( [ setPopoverAnchor, forwardedRef ] );\n\n\treturn (\n\t\t<Grid { ...otherProps } ref={ mergedRef } gap={ 4 }>\n\t\t\t<BorderBoxControlVisualizer value={ value } size={ size } />\n\t\t\t<BorderControl\n\t\t\t\tclassName={ centeredClassName }\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Top border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'top' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.top }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Left border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'left' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.left }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\tclassName={ rightAlignedClassName }\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Right border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'right' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.right }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\tclassName={ centeredClassName }\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Bottom border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'bottom' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.bottom }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t</Grid>\n\t);\n};\n\nconst ConnectedBorderBoxControlSplitControls = contextConnect(\n\tBorderBoxControlSplitControls,\n\t'BorderBoxControlSplitControls'\n);\nexport default ConnectedBorderBoxControlSplitControls;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/border-box-control/border-box-control-split-controls/component.tsx"],"names":["BorderBoxControlSplitControls","props","forwardedRef","centeredClassName","colors","disableCustomColors","enableAlpha","enableStyle","onChange","popoverPlacement","popoverOffset","rightAlignedClassName","size","value","__experimentalIsRenderedInSidebar","otherProps","popoverAnchor","setPopoverAnchor","popoverProps","placement","offset","anchor","shift","undefined","sharedBorderControlProps","isCompact","mergedRef","newBorder","top","left","right","bottom","ConnectedBorderBoxControlSplitControls"],"mappings":";;;;;;;;;AAIA;;AADA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAdA;AACA;AACA;;AAKA;AACA;AACA;AAUA,MAAMA,6BAA6B,GAAG,CACrCC,KADqC,EAErCC,YAFqC,KAGjC;AACJ,QAAM;AACLC,IAAAA,iBADK;AAELC,IAAAA,MAFK;AAGLC,IAAAA,mBAHK;AAILC,IAAAA,WAJK;AAKLC,IAAAA,WALK;AAMLC,IAAAA,QANK;AAOLC,IAAAA,gBAPK;AAQLC,IAAAA,aARK;AASLC,IAAAA,qBATK;AAULC,IAAAA,IAAI,GAAG,SAVF;AAWLC,IAAAA,KAXK;AAYLC,IAAAA,iCAZK;AAaL,OAAGC;AAbE,MAcF,4CAAkCd,KAAlC,CAdJ,CADI,CAiBJ;AACA;;AACA,QAAM,CAAEe,aAAF,EAAiBC,gBAAjB,IAAsC,uBAC3C,IAD2C,CAA5C,CAnBI,CAuBJ;;AACA,QAAMC,YAA4D,GACjE,sBAC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J1B;AAKC,IAAA,KAAK,EAAGL,KAAK,EAAEgB,IALhB;AAAA,OAMML;AANN,IAXD,EAmBC,4BAAC,4BAAD;AACC,IAAA,SAAS,EAAGb,qBADb;AAEC,IAAA,mBAAmB,EAAG,IAFvB;AAGC,IAAA,KAAK,EAAG,cAAI,cAAJ,CAHT;AAIC,IAAA,QAAQ,EAAKgB,SAAF,IAAiBnB,QAAQ,CAAEmB,SAAF,EAAa,OAAb,CAJrC;AAKC,IAAA,sBAAsB,EAAGT,YAL1B;AAMC,IAAA,KAAK,EAAGL,KAAK,EAAEiB,KANhB;AAAA,OAOMN;AAPN,IAnBD,EA4BC,4BAAC,4BAAD;AACC,IAAA,SAAS,EAAGrB,iBADb;AAEC,IAAA,mBAAmB,EAAG,IAFvB;AAGC,IAAA,KAAK,EAAG,cAAI,eAAJ,CAHT;AAIC,IAAA,QAAQ,EAAKwB,SAAF,IAAiBnB,QAAQ,CAAEmB,SAAF,EAAa,QAAb,CAJrC;AAKC,IAAA,sBAAsB,EAAGT,YAL1B;AAMC,IAAA,KAAK,EAAGL,KAAK,EAAEkB,MANhB;AAAA,OAOMP;AAPN,IA5BD,CADD;AAwCA,CA7FD;;AA+FA,MAAMQ,sCAAsC,GAAG,6BAC9ChC,6BAD8C,EAE9C,+BAF8C,CAA/C;eAIegC,sC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BorderBoxControlVisualizer from '../border-box-control-visualizer';\nimport { BorderControl } from '../../border-control';\nimport { Grid } from '../../grid';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControlSplitControls } from './hook';\n\nimport type { BorderControlProps } from '../../border-control/types';\nimport type { SplitControlsProps } from '../types';\n\nconst BorderBoxControlSplitControls = (\n\tprops: WordPressComponentProps< SplitControlsProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tcenteredClassName,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tonChange,\n\t\tpopoverPlacement,\n\t\tpopoverOffset,\n\t\trightAlignedClassName,\n\t\tsize = 'default',\n\t\tvalue,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t...otherProps\n\t} = useBorderBoxControlSplitControls( props );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState< Element | null >(\n\t\tnull\n\t);\n\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps: BorderControlProps[ '__unstablePopoverProps' ] =\n\t\tuseMemo(\n\t\t\t() =>\n\t\t\t\tpopoverPlacement\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tplacement: popoverPlacement,\n\t\t\t\t\t\t\toffset: popoverOffset,\n\t\t\t\t\t\t\tanchor: popoverAnchor,\n\t\t\t\t\t\t\tshift: true,\n\t\t\t\t\t }\n\t\t\t\t\t: undefined,\n\t\t\t[ popoverPlacement, popoverOffset, popoverAnchor ]\n\t\t);\n\n\tconst sharedBorderControlProps = {\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tisCompact: true,\n\t\t__experimentalIsRenderedInSidebar,\n\t\tsize,\n\t};\n\n\tconst mergedRef = useMergeRefs( [ setPopoverAnchor, forwardedRef ] );\n\n\treturn (\n\t\t<Grid { ...otherProps } ref={ mergedRef } gap={ 4 }>\n\t\t\t<BorderBoxControlVisualizer value={ value } size={ size } />\n\t\t\t<BorderControl\n\t\t\t\tclassName={ centeredClassName }\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Top border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'top' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.top }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Left border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'left' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.left }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\tclassName={ rightAlignedClassName }\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Right border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'right' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.right }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\tclassName={ centeredClassName }\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Bottom border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'bottom' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.bottom }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t</Grid>\n\t);\n};\n\nconst ConnectedBorderBoxControlSplitControls = contextConnect(\n\tBorderBoxControlSplitControls,\n\t'BorderBoxControlSplitControls'\n);\nexport default ConnectedBorderBoxControlSplitControls;\n"]}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,8 +7,6 @@ exports.default = void 0;
9
7
 
10
8
  var _element = require("@wordpress/element");
11
9
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _view = require("../../view");
15
11
 
16
12
  var _context = require("../../ui/context");
@@ -29,9 +25,9 @@ const BorderBoxControlVisualizer = (props, forwardedRef) => {
29
25
  value,
30
26
  ...otherProps
31
27
  } = (0, _hook.useBorderBoxControlVisualizer)(props);
32
- return (0, _element.createElement)(_view.View, (0, _extends2.default)({}, otherProps, {
28
+ return (0, _element.createElement)(_view.View, { ...otherProps,
33
29
  ref: forwardedRef
34
- }));
30
+ });
35
31
  };
36
32
 
37
33
  const ConnectedBorderBoxControlVisualizer = (0, _context.contextConnect)(BorderBoxControlVisualizer, 'BorderBoxControlVisualizer');
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/border-box-control/border-box-control-visualizer/component.tsx"],"names":["BorderBoxControlVisualizer","props","forwardedRef","value","otherProps","ConnectedBorderBoxControlVisualizer"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAOA,MAAMA,0BAA0B,GAAG,CAClCC,KADkC,EAElCC,YAFkC,KAG9B;AACJ,QAAM;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,MAA2B,yCAA+BH,KAA/B,CAAjC;AAEA,SAAO,4BAAC,UAAD,6BAAWG,UAAX;AAAwB,IAAA,GAAG,EAAGF;AAA9B,KAAP;AACA,CAPD;;AASA,MAAMG,mCAAmC,GAAG,6BAC3CL,0BAD2C,EAE3C,4BAF2C,CAA5C;eAIeK,mC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControlVisualizer } from './hook';\n\nimport type { VisualizerProps } from '../types';\n\nconst BorderBoxControlVisualizer = (\n\tprops: WordPressComponentProps< VisualizerProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst { value, ...otherProps } = useBorderBoxControlVisualizer( props );\n\n\treturn <View { ...otherProps } ref={ forwardedRef } />;\n};\n\nconst ConnectedBorderBoxControlVisualizer = contextConnect(\n\tBorderBoxControlVisualizer,\n\t'BorderBoxControlVisualizer'\n);\nexport default ConnectedBorderBoxControlVisualizer;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/border-box-control/border-box-control-visualizer/component.tsx"],"names":["BorderBoxControlVisualizer","props","forwardedRef","value","otherProps","ConnectedBorderBoxControlVisualizer"],"mappings":";;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAOA,MAAMA,0BAA0B,GAAG,CAClCC,KADkC,EAElCC,YAFkC,KAG9B;AACJ,QAAM;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,MAA2B,yCAA+BH,KAA/B,CAAjC;AAEA,SAAO,4BAAC,UAAD,OAAWG,UAAX;AAAwB,IAAA,GAAG,EAAGF;AAA9B,IAAP;AACA,CAPD;;AASA,MAAMG,mCAAmC,GAAG,6BAC3CL,0BAD2C,EAE3C,4BAF2C,CAA5C;eAIeK,mC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControlVisualizer } from './hook';\n\nimport type { VisualizerProps } from '../types';\n\nconst BorderBoxControlVisualizer = (\n\tprops: WordPressComponentProps< VisualizerProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst { value, ...otherProps } = useBorderBoxControlVisualizer( props );\n\n\treturn <View { ...otherProps } ref={ forwardedRef } />;\n};\n\nconst ConnectedBorderBoxControlVisualizer = contextConnect(\n\tBorderBoxControlVisualizer,\n\t'BorderBoxControlVisualizer'\n);\nexport default ConnectedBorderBoxControlVisualizer;\n"]}
@@ -9,8 +9,6 @@ exports.default = exports.BorderControl = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _i18n = require("@wordpress/i18n");
15
13
 
16
14
  var _borderControlDropdown = _interopRequireDefault(require("../border-control-dropdown"));
@@ -82,11 +80,11 @@ const UnconnectedBorderControl = (props, forwardedRef) => {
82
80
  __experimentalIsRenderedInSidebar,
83
81
  ...otherProps
84
82
  } = (0, _hook.useBorderControl)(props);
85
- return (0, _element.createElement)(_view.View, (0, _extends2.default)({
86
- as: "fieldset"
87
- }, otherProps, {
83
+ return (0, _element.createElement)(_view.View, {
84
+ as: "fieldset",
85
+ ...otherProps,
88
86
  ref: forwardedRef
89
- }), (0, _element.createElement)(BorderLabel, {
87
+ }, (0, _element.createElement)(BorderLabel, {
90
88
  label: label,
91
89
  hideLabelFromVision: hideLabelFromVision
92
90
  }), (0, _element.createElement)(_hStack.HStack, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/border-control/border-control/component.tsx"],"names":["BorderLabel","props","label","hideLabelFromVision","UnconnectedBorderControl","forwardedRef","colors","disableCustomColors","disableUnits","enableAlpha","enableStyle","innerWrapperClassName","inputWidth","onBorderChange","onSliderChange","onWidthChange","placeholder","__unstablePopoverProps","previousStyleSelection","showDropdownHeader","size","sliderClassName","value","border","widthUnit","widthValue","withSlider","__experimentalIsRenderedInSidebar","otherProps","width","includes","undefined","BorderControl"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAhBA;AACA;AACA;;AAGA;AACA;AACA;AAaA,MAAMA,WAAW,GAAKC,KAAF,IAAyB;AAC5C,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAAiCF,KAAvC;;AAEA,MAAK,CAAEC,KAAP,EAAe;AACd,WAAO,IAAP;AACA;;AAED,SAAOC,mBAAmB,GACzB,4BAAC,8BAAD;AAAgB,IAAA,EAAE,EAAC;AAAnB,KAA8BD,KAA9B,CADyB,GAGzB,4BAAC,8BAAD;AAAa,IAAA,EAAE,EAAC;AAAhB,KAA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ent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BorderControlDropdown from '../border-control-dropdown';\nimport UnitControl from '../../unit-control';\nimport RangeControl from '../../range-control';\nimport { HStack } from '../../h-stack';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderControl } from './hook';\n\nimport type { BorderControlProps, LabelProps } from '../types';\n\nconst BorderLabel = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"legend\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel as=\"legend\">{ label }</StyledLabel>\n\t);\n};\n\nconst UnconnectedBorderControl = (\n\tprops: WordPressComponentProps< BorderControlProps, 'div', false >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tdisableUnits,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\thideLabelFromVision,\n\t\tinnerWrapperClassName,\n\t\tinputWidth,\n\t\tlabel,\n\t\tonBorderChange,\n\t\tonSliderChange,\n\t\tonWidthChange,\n\t\tplaceholder,\n\t\t__unstablePopoverProps,\n\t\tpreviousStyleSelection,\n\t\tshowDropdownHeader,\n\t\tsize,\n\t\tsliderClassName,\n\t\tvalue: border,\n\t\twidthUnit,\n\t\twidthValue,\n\t\twithSlider,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t...otherProps\n\t} = useBorderControl( props );\n\n\treturn (\n\t\t<View as=\"fieldset\" { ...otherProps } ref={ forwardedRef }>\n\t\t\t<BorderLabel\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<HStack spacing={ 4 } className={ innerWrapperClassName }>\n\t\t\t\t<UnitControl\n\t\t\t\t\tprefix={\n\t\t\t\t\t\t<BorderControlDropdown\n\t\t\t\t\t\t\tborder={ border }\n\t\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\t\t__unstablePopoverProps={ __unstablePopoverProps }\n\t\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\t\tonChange={ onBorderChange }\n\t\t\t\t\t\t\tpreviousStyleSelection={ previousStyleSelection }\n\t\t\t\t\t\t\tshowDropdownHeader={ showDropdownHeader }\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\tlabel={ __( 'Border width' ) }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ onWidthChange }\n\t\t\t\t\tvalue={ border?.width || '' }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tdisableUnits={ disableUnits }\n\t\t\t\t\t__unstableInputWidth={ inputWidth }\n\t\t\t\t\tsize={ size }\n\t\t\t\t/>\n\t\t\t\t{ withSlider && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Border width' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tclassName={ sliderClassName }\n\t\t\t\t\t\tinitialPosition={ 0 }\n\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tonChange={ onSliderChange }\n\t\t\t\t\t\tstep={ [ 'px', '%' ].includes( widthUnit ) ? 1 : 0.1 }\n\t\t\t\t\t\tvalue={ widthValue || undefined }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</View>\n\t);\n};\n\n/**\n * The `BorderControl` brings together internal sub-components which allow users to\n * set the various properties of a border. The first sub-component, a\n * `BorderDropdown` contains options representing border color and style. The\n * border width is controlled via a `UnitControl` and an optional `RangeControl`.\n *\n * Border radius is not covered by this control as it may be desired separate to\n * color, style, and width. For example, the border radius may be absorbed under\n * a \"shape\" abstraction.\n *\n * ```jsx\n * import { __experimentalBorderControl as BorderControl } from '@wordpress/components';\n * import { __ } from '@wordpress/i18n';\n *\n * const colors = [\n * \t{ name: 'Blue 20', color: '#72aee6' },\n * \t// ...\n * ];\n *\n * const MyBorderControl = () => {\n * \tconst [ border, setBorder ] = useState();\n * \tconst onChange = ( newBorder ) => setBorder( newBorder );\n *\n * \treturn (\n * \t\t<BorderControl\n * \t\t\tcolors={ colors }\n * \t\t\tlabel={ __( 'Border' ) }\n * \t\t\tonChange={ onChange }\n * \t\t\tvalue={ border }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const BorderControl = contextConnect(\n\tUnconnectedBorderControl,\n\t'BorderControl'\n);\n\nexport default BorderControl;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/border-control/border-control/component.tsx"],"names":["BorderLabel","props","label","hideLabelFromVision","UnconnectedBorderControl","forwardedRef","colors","disableCustomColors","disableUnits","enableAlpha","enableStyle","innerWrapperClassName","inputWidth","onBorderChange","onSliderChange","onWidthChange","placeholder","__unstablePopoverProps","previousStyleSelection","showDropdownHeader","size","sliderClassName","value","border","widthUnit","widthValue","withSlider","__experimentalIsRenderedInSidebar","otherProps","width","includes","undefined","BorderControl"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAhBA;AACA;AACA;;AAGA;AACA;AACA;AAaA,MAAMA,WAAW,GAAKC,KAAF,IAAyB;AAC5C,QAAM;AAAEC,IAA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ApFD;AAsFA;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;;;AACO,MAAMC,aAAa,GAAG,6BAC5B5B,wBAD4B,EAE5B,eAF4B,CAAtB;;eAKQ4B,a","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BorderControlDropdown from '../border-control-dropdown';\nimport UnitControl from '../../unit-control';\nimport RangeControl from '../../range-control';\nimport { HStack } from '../../h-stack';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderControl } from './hook';\n\nimport type { BorderControlProps, LabelProps } from '../types';\n\nconst BorderLabel = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"legend\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel as=\"legend\">{ label }</StyledLabel>\n\t);\n};\n\nconst UnconnectedBorderControl = (\n\tprops: WordPressComponentProps< BorderControlProps, 'div', false >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tdisableUnits,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\thideLabelFromVision,\n\t\tinnerWrapperClassName,\n\t\tinputWidth,\n\t\tlabel,\n\t\tonBorderChange,\n\t\tonSliderChange,\n\t\tonWidthChange,\n\t\tplaceholder,\n\t\t__unstablePopoverProps,\n\t\tpreviousStyleSelection,\n\t\tshowDropdownHeader,\n\t\tsize,\n\t\tsliderClassName,\n\t\tvalue: border,\n\t\twidthUnit,\n\t\twidthValue,\n\t\twithSlider,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t...otherProps\n\t} = useBorderControl( props );\n\n\treturn (\n\t\t<View as=\"fieldset\" { ...otherProps } ref={ forwardedRef }>\n\t\t\t<BorderLabel\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<HStack spacing={ 4 } className={ innerWrapperClassName }>\n\t\t\t\t<UnitControl\n\t\t\t\t\tprefix={\n\t\t\t\t\t\t<BorderControlDropdown\n\t\t\t\t\t\t\tborder={ border }\n\t\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\t\t__unstablePopoverProps={ __unstablePopoverProps }\n\t\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\t\tonChange={ onBorderChange }\n\t\t\t\t\t\t\tpreviousStyleSelection={ previousStyleSelection }\n\t\t\t\t\t\t\tshowDropdownHeader={ showDropdownHeader }\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\tlabel={ __( 'Border width' ) }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ onWidthChange }\n\t\t\t\t\tvalue={ border?.width || '' }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tdisableUnits={ disableUnits }\n\t\t\t\t\t__unstableInputWidth={ inputWidth }\n\t\t\t\t\tsize={ size }\n\t\t\t\t/>\n\t\t\t\t{ withSlider && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Border width' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tclassName={ sliderClassName }\n\t\t\t\t\t\tinitialPosition={ 0 }\n\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tonChange={ onSliderChange }\n\t\t\t\t\t\tstep={ [ 'px', '%' ].includes( widthUnit ) ? 1 : 0.1 }\n\t\t\t\t\t\tvalue={ widthValue || undefined }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</View>\n\t);\n};\n\n/**\n * The `BorderControl` brings together internal sub-components which allow users to\n * set the various properties of a border. The first sub-component, a\n * `BorderDropdown` contains options representing border color and style. The\n * border width is controlled via a `UnitControl` and an optional `RangeControl`.\n *\n * Border radius is not covered by this control as it may be desired separate to\n * color, style, and width. For example, the border radius may be absorbed under\n * a \"shape\" abstraction.\n *\n * ```jsx\n * import { __experimentalBorderControl as BorderControl } from '@wordpress/components';\n * import { __ } from '@wordpress/i18n';\n *\n * const colors = [\n * \t{ name: 'Blue 20', color: '#72aee6' },\n * \t// ...\n * ];\n *\n * const MyBorderControl = () => {\n * \tconst [ border, setBorder ] = useState();\n * \tconst onChange = ( newBorder ) => setBorder( newBorder );\n *\n * \treturn (\n * \t\t<BorderControl\n * \t\t\tcolors={ colors }\n * \t\t\tlabel={ __( 'Border' ) }\n * \t\t\tonChange={ onChange }\n * \t\t\tvalue={ border }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const BorderControl = contextConnect(\n\tUnconnectedBorderControl,\n\t'BorderControl'\n);\n\nexport default BorderControl;\n"]}
@@ -9,8 +9,6 @@ exports.default = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _i18n = require("@wordpress/i18n");
15
13
 
16
14
  var _icons = require("@wordpress/icons");
@@ -193,14 +191,14 @@ const BorderControlDropdown = (props, forwardedRef) => {
193
191
  }
194
192
  }, (0, _i18n.__)('Reset to default'))));
195
193
 
196
- return (0, _element.createElement)(_dropdown.default, (0, _extends2.default)({
194
+ return (0, _element.createElement)(_dropdown.default, {
197
195
  renderToggle: renderToggle,
198
196
  renderContent: renderContent,
199
197
  popoverProps: { ...__unstablePopoverProps
200
- }
201
- }, otherProps, {
198
+ },
199
+ ...otherProps,
202
200
  ref: forwardedRef
203
- }));
201
+ });
204
202
  };
205
203
 
206
204
  const ConnectedBorderControlDropdown = (0, _context.contextConnect)(BorderControlDropdown, 'BorderControlDropdown');
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/border-control/border-control-dropdown/component.tsx"],"names":["getAriaLabelColorValue","colorValue","isHex","startsWith","displayValue","replace","split","join","getColorObject","colors","matchedColor","some","origin","color","find","getToggleAriaLabel","colorObject","style","isStyleEnabled","ariaLabelValue","name","BorderControlDropdown","props","forwardedRef","__experimentalIsRenderedInSidebar","border","disableCustomColors","enableAlpha","enableStyle","indicatorClassName","indicatorWrapperClassName","onReset","onColorChange","onStyleChange","popoverContentClassName","popoverControlsClassName","resetButtonClassName","showDropdownHeader","__unstablePopoverProps","otherProps","toggleAriaLabel","showResetButton","dropdownPosition","undefined","renderToggle","onToggle","renderContent","onClose","closeSmall","ConnectedBorderControlDropdown"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;AA3BA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AAkBA,MAAMA,sBAAsB,GAAKC,UAAF,IAA0B;AACxD,QAAMC,KAAK,GAAGD,UAAU,CAACE,UAAX,CAAuB,GAAvB,CAAd,CADwD,CAGxD;;AACA,QAAMC,YAAY,GAAGH,UAAU,CAACI,OAAX,CAAoB,eAApB,EAAqC,IAArC,CAArB;AAEA,SAAOH,KAAK,GAAGE,YAAY,CAACE,KAAb,CAAoB,EAApB,E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Q,EAAGgB;AAHZ,IAxBF,CADD,CADD,EAkCGQ,eAAe,IAChB,4BAAC,+BAAD;AAAwB,IAAA,WAAW,EAAC;AAApC,KACC,4BAAC,eAAD;AACC,IAAA,SAAS,EAAGL,oBADb;AAEC,IAAA,OAAO,EAAC,UAFT;AAGC,IAAA,OAAO,EAAG,MAAM;AACfL,MAAAA,OAAO;AACPgB,MAAAA,OAAO;AACP;AANF,KAQG,cAAI,kBAAJ,CARH,CADD,CAnCF,CAHD;;AAsDA,SACC,4BAAC,iBAAD;AACC,IAAA,YAAY,EAAGH,YADhB;AAEC,IAAA,aAAa,EAAGE,aAFjB;AAGC,IAAA,YAAY,EAAG,EACd,GAAGR;AADW;AAHhB,KAMMC,UANN;AAOC,IAAA,GAAG,EAAGhB;AAPP,KADD;AAWA,CA5HD;;AA8HA,MAAM0B,8BAA8B,GAAG,6BACtC5B,qBADsC,EAEtC,uBAFsC,CAAvC;eAKe4B,8B","sourcesContent":["/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BorderControlStylePicker from '../border-control-style-picker';\nimport Button from '../../button';\nimport ColorIndicator from '../../color-indicator';\nimport ColorPalette from '../../color-palette';\nimport Dropdown from '../../dropdown';\nimport { HStack } from '../../h-stack';\nimport { VStack } from '../../v-stack';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderControlDropdown } from './hook';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';\n\nimport type { ColorObject } from '../../color-palette/types';\nimport { isMultiplePaletteArray } from '../../color-palette/utils';\nimport type { DropdownProps as DropdownComponentProps } from '../../dropdown/types';\nimport type { ColorProps, DropdownProps } from '../types';\n\nconst getAriaLabelColorValue = ( colorValue: string ) => {\n\tconst isHex = colorValue.startsWith( '#' );\n\n\t// Leave hex values as-is. Remove the `var()` wrapper from CSS vars.\n\tconst displayValue = colorValue.replace( /^var\\((.+)\\)$/, '$1' );\n\n\treturn isHex ? displayValue.split( '' ).join( '-' ) : displayValue;\n};\n\nconst getColorObject = (\n\tcolorValue: CSSProperties[ 'borderColor' ],\n\tcolors: ColorProps[ 'colors' ] | undefined\n) => {\n\tif ( ! colorValue || ! colors ) {\n\t\treturn;\n\t}\n\n\tif ( isMultiplePaletteArray( colors ) ) {\n\t\t// Multiple origins\n\t\tlet matchedColor;\n\n\t\tcolors.some( ( origin ) =>\n\t\t\torigin.colors.some( ( color ) => {\n\t\t\t\tif ( color.color === colorValue ) {\n\t\t\t\t\tmatchedColor = color;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t} )\n\t\t);\n\n\t\treturn matchedColor;\n\t}\n\n\t// Single origin\n\treturn colors.find( ( color ) => color.color === colorValue );\n};\n\nconst getToggleAriaLabel = (\n\tcolorValue: CSSProperties[ 'borderColor' ],\n\tcolorObject: ColorObject | undefined,\n\tstyle: CSSProperties[ 'borderStyle' ],\n\tisStyleEnabled: boolean\n) => {\n\tif ( isStyleEnabled ) {\n\t\tif ( colorObject ) {\n\t\t\tconst ariaLabelValue = getAriaLabelColorValue( colorObject.color );\n\t\t\treturn style\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: %1$s: The name of the color e.g. \"vivid red\". %2$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\". %3$s: The current border style selection e.g. \"solid\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\". The currently selected style is \"%3$s\".',\n\t\t\t\t\t\tcolorObject.name,\n\t\t\t\t\t\tariaLabelValue,\n\t\t\t\t\t\tstyle\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t// translators: %1$s: The name of the color e.g. \"vivid red\". %2$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".',\n\t\t\t\t\t\tcolorObject.name,\n\t\t\t\t\t\tariaLabelValue\n\t\t\t\t );\n\t\t}\n\n\t\tif ( colorValue ) {\n\t\t\tconst ariaLabelValue = getAriaLabelColorValue( colorValue );\n\t\t\treturn style\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: %1$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\". %2$s: The current border style selection e.g. \"solid\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color has a value of \"%1$s\". The currently selected style is \"%2$s\".',\n\t\t\t\t\t\tariaLabelValue,\n\t\t\t\t\t\tstyle\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t// translators: %1$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color has a value of \"%1$s\".',\n\t\t\t\t\t\tariaLabelValue\n\t\t\t\t );\n\t\t}\n\n\t\treturn __( 'Border color and style picker.' );\n\t}\n\n\tif ( colorObject ) {\n\t\treturn sprintf(\n\t\t\t// translators: %1$s: The name of the color e.g. \"vivid red\". %2$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\".\n\t\t\t'Border color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".',\n\t\t\tcolorObject.name,\n\t\t\tgetAriaLabelColorValue( colorObject.color )\n\t\t);\n\t}\n\n\tif ( colorValue ) {\n\t\treturn sprintf(\n\t\t\t// translators: %1$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\".\n\t\t\t'Border color picker. The currently selected color has a value of \"%1$s\".',\n\t\t\tgetAriaLabelColorValue( colorValue )\n\t\t);\n\t}\n\n\treturn __( 'Border color picker.' );\n};\n\nconst BorderControlDropdown = (\n\tprops: WordPressComponentProps< DropdownProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\t__experimentalIsRenderedInSidebar,\n\t\tborder,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tindicatorClassName,\n\t\tindicatorWrapperClassName,\n\t\tonReset,\n\t\tonColorChange,\n\t\tonStyleChange,\n\t\tpopoverContentClassName,\n\t\tpopoverControlsClassName,\n\t\tresetButtonClassName,\n\t\tshowDropdownHeader,\n\t\t__unstablePopoverProps,\n\t\t...otherProps\n\t} = useBorderControlDropdown( props );\n\n\tconst { color, style } = border || {};\n\tconst colorObject = getColorObject( color, colors );\n\n\tconst toggleAriaLabel = getToggleAriaLabel(\n\t\tcolor,\n\t\tcolorObject,\n\t\tstyle,\n\t\tenableStyle\n\t);\n\n\tconst showResetButton = color || ( style && style !== 'none' );\n\tconst dropdownPosition = __experimentalIsRenderedInSidebar\n\t\t? 'bottom left'\n\t\t: undefined;\n\n\tconst renderToggle: DropdownComponentProps[ 'renderToggle' ] = ( {\n\t\tonToggle,\n\t} ) => (\n\t\t<Button\n\t\t\tonClick={ onToggle }\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-label={ toggleAriaLabel }\n\t\t\ttooltipPosition={ dropdownPosition }\n\t\t\tlabel={ __( 'Border color and style picker' ) }\n\t\t\tshowTooltip={ true }\n\t\t>\n\t\t\t<span className={ indicatorWrapperClassName }>\n\t\t\t\t<ColorIndicator\n\t\t\t\t\tclassName={ indicatorClassName }\n\t\t\t\t\tcolorValue={ color }\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</Button>\n\t);\n\n\tconst renderContent: DropdownComponentProps[ 'renderContent' ] = ( {\n\t\tonClose,\n\t} ) => (\n\t\t<>\n\t\t\t<DropdownContentWrapper paddingSize=\"medium\">\n\t\t\t\t<VStack className={ popoverControlsClassName } spacing={ 6 }>\n\t\t\t\t\t{ showDropdownHeader ? (\n\t\t\t\t\t\t<HStack>\n\t\t\t\t\t\t\t<StyledLabel>{ __( 'Border color' ) }</StyledLabel>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\tlabel={ __( 'Close border color' ) }\n\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t) : undefined }\n\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\tclassName={ popoverContentClassName }\n\t\t\t\t\t\tvalue={ color }\n\t\t\t\t\t\tonChange={ onColorChange }\n\t\t\t\t\t\t{ ...{ colors, disableCustomColors } }\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t/>\n\t\t\t\t\t{ enableStyle && (\n\t\t\t\t\t\t<BorderControlStylePicker\n\t\t\t\t\t\t\tlabel={ __( 'Style' ) }\n\t\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\t\tonChange={ onStyleChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t</DropdownContentWrapper>\n\t\t\t{ showResetButton && (\n\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName={ resetButtonClassName }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Reset to default' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t</>\n\t);\n\n\treturn (\n\t\t<Dropdown\n\t\t\trenderToggle={ renderToggle }\n\t\t\trenderContent={ renderContent }\n\t\t\tpopoverProps={ {\n\t\t\t\t...__unstablePopoverProps,\n\t\t\t} }\n\t\t\t{ ...otherProps }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n};\n\nconst ConnectedBorderControlDropdown = contextConnect(\n\tBorderControlDropdown,\n\t'BorderControlDropdown'\n);\n\nexport default ConnectedBorderControlDropdown;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/border-control/border-control-dropdown/component.tsx"],"names":["getAriaLabelColorValue","colorValue","isHex","startsWith","displayValue","replace","split","join","getColorObject","colors","matchedColor","some","origin","color","find","getToggleAriaLabel","colorObject","style","isStyleEnabled","ariaLabelValue","name","BorderControlDropdown","props","forwardedRef","__experimentalIsRenderedInSidebar","border","disableCustomColors","enableAlpha","enableStyle","indicatorClassName","indicatorWrapperClassName","onReset","onColorChange","onStyleChange","popoverContentClassName","popoverControlsClassName","resetButtonClassName","showDropdownHeader","__unstablePopoverProps","otherProps","toggleAriaLabel","showResetButton","dropdownPosition","undefined","renderToggle","onToggle","renderContent","onClose","closeSmall","ConnectedBorderControlDropdown"],"mappings":";;;;;;;;;;;AAQA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;AA3BA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AAkBA,MAAMA,sBAAsB,GAAKC,UAAF,IAA0B;AACxD,QAAMC,KAAK,GAAGD,UAAU,CAACE,UAAX,CAAuB,GAAvB,CAAd,CADwD,CAGxD;;AACA,QAAMC,YAAY,GAAGH,UAAU,CAACI,OAAX,CAAoB,eAApB,EAAqC,IAArC,CAArB;AAEA,SAAOH,KAAK,GAAGE,YAAY,CAACE,KAAb,CAAoB,EAApB,EAAyBC,IAAzB,CAA+B,GAA/B,CAAH,GAA0CH,YAAtD;AACA,CAPD;;AASA,MAAMI,cAAc,GAAG,CACtBP,UADsB,EAEtBQ,MAFsB,KAGlB;AACJ,MAAK,CAAER,UAAF,IAAgB,CAAEQ,MAAvB,EAAgC;AAC/B;AACA;;AAED,MAAK,mCAAwBA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;AACfL,MAAAA,OAAO;AACPgB,MAAAA,OAAO;AACP;AANF,KAQG,cAAI,kBAAJ,CARH,CADD,CAnCF,CAHD;;AAsDA,SACC,4BAAC,iBAAD;AACC,IAAA,YAAY,EAAGH,YADhB;AAEC,IAAA,aAAa,EAAGE,aAFjB;AAGC,IAAA,YAAY,EAAG,EACd,GAAGR;AADW,KAHhB;AAAA,OAMMC,UANN;AAOC,IAAA,GAAG,EAAGhB;AAPP,IADD;AAWA,CA5HD;;AA8HA,MAAM0B,8BAA8B,GAAG,6BACtC5B,qBADsC,EAEtC,uBAFsC,CAAvC;eAKe4B,8B","sourcesContent":["/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BorderControlStylePicker from '../border-control-style-picker';\nimport Button from '../../button';\nimport ColorIndicator from '../../color-indicator';\nimport ColorPalette from '../../color-palette';\nimport Dropdown from '../../dropdown';\nimport { HStack } from '../../h-stack';\nimport { VStack } from '../../v-stack';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderControlDropdown } from './hook';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';\n\nimport type { ColorObject } from '../../color-palette/types';\nimport { isMultiplePaletteArray } from '../../color-palette/utils';\nimport type { DropdownProps as DropdownComponentProps } from '../../dropdown/types';\nimport type { ColorProps, DropdownProps } from '../types';\n\nconst getAriaLabelColorValue = ( colorValue: string ) => {\n\tconst isHex = colorValue.startsWith( '#' );\n\n\t// Leave hex values as-is. Remove the `var()` wrapper from CSS vars.\n\tconst displayValue = colorValue.replace( /^var\\((.+)\\)$/, '$1' );\n\n\treturn isHex ? displayValue.split( '' ).join( '-' ) : displayValue;\n};\n\nconst getColorObject = (\n\tcolorValue: CSSProperties[ 'borderColor' ],\n\tcolors: ColorProps[ 'colors' ] | undefined\n) => {\n\tif ( ! colorValue || ! colors ) {\n\t\treturn;\n\t}\n\n\tif ( isMultiplePaletteArray( colors ) ) {\n\t\t// Multiple origins\n\t\tlet matchedColor;\n\n\t\tcolors.some( ( origin ) =>\n\t\t\torigin.colors.some( ( color ) => {\n\t\t\t\tif ( color.color === colorValue ) {\n\t\t\t\t\tmatchedColor = color;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t} )\n\t\t);\n\n\t\treturn matchedColor;\n\t}\n\n\t// Single origin\n\treturn colors.find( ( color ) => color.color === colorValue );\n};\n\nconst getToggleAriaLabel = (\n\tcolorValue: CSSProperties[ 'borderColor' ],\n\tcolorObject: ColorObject | undefined,\n\tstyle: CSSProperties[ 'borderStyle' ],\n\tisStyleEnabled: boolean\n) => {\n\tif ( isStyleEnabled ) {\n\t\tif ( colorObject ) {\n\t\t\tconst ariaLabelValue = getAriaLabelColorValue( colorObject.color );\n\t\t\treturn style\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: %1$s: The name of the color e.g. \"vivid red\". %2$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\". %3$s: The current border style selection e.g. \"solid\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\". The currently selected style is \"%3$s\".',\n\t\t\t\t\t\tcolorObject.name,\n\t\t\t\t\t\tariaLabelValue,\n\t\t\t\t\t\tstyle\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t// translators: %1$s: The name of the color e.g. \"vivid red\". %2$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".',\n\t\t\t\t\t\tcolorObject.name,\n\t\t\t\t\t\tariaLabelValue\n\t\t\t\t );\n\t\t}\n\n\t\tif ( colorValue ) {\n\t\t\tconst ariaLabelValue = getAriaLabelColorValue( colorValue );\n\t\t\treturn style\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: %1$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\". %2$s: The current border style selection e.g. \"solid\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color has a value of \"%1$s\". The currently selected style is \"%2$s\".',\n\t\t\t\t\t\tariaLabelValue,\n\t\t\t\t\t\tstyle\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t// translators: %1$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color has a value of \"%1$s\".',\n\t\t\t\t\t\tariaLabelValue\n\t\t\t\t );\n\t\t}\n\n\t\treturn __( 'Border color and style picker.' );\n\t}\n\n\tif ( colorObject ) {\n\t\treturn sprintf(\n\t\t\t// translators: %1$s: The name of the color e.g. \"vivid red\". %2$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\".\n\t\t\t'Border color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".',\n\t\t\tcolorObject.name,\n\t\t\tgetAriaLabelColorValue( colorObject.color )\n\t\t);\n\t}\n\n\tif ( colorValue ) {\n\t\treturn sprintf(\n\t\t\t// translators: %1$s: The color's hex code, with added hyphens e.g: \"#-f-0-0\".\n\t\t\t'Border color picker. The currently selected color has a value of \"%1$s\".',\n\t\t\tgetAriaLabelColorValue( colorValue )\n\t\t);\n\t}\n\n\treturn __( 'Border color picker.' );\n};\n\nconst BorderControlDropdown = (\n\tprops: WordPressComponentProps< DropdownProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\t__experimentalIsRenderedInSidebar,\n\t\tborder,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tindicatorClassName,\n\t\tindicatorWrapperClassName,\n\t\tonReset,\n\t\tonColorChange,\n\t\tonStyleChange,\n\t\tpopoverContentClassName,\n\t\tpopoverControlsClassName,\n\t\tresetButtonClassName,\n\t\tshowDropdownHeader,\n\t\t__unstablePopoverProps,\n\t\t...otherProps\n\t} = useBorderControlDropdown( props );\n\n\tconst { color, style } = border || {};\n\tconst colorObject = getColorObject( color, colors );\n\n\tconst toggleAriaLabel = getToggleAriaLabel(\n\t\tcolor,\n\t\tcolorObject,\n\t\tstyle,\n\t\tenableStyle\n\t);\n\n\tconst showResetButton = color || ( style && style !== 'none' );\n\tconst dropdownPosition = __experimentalIsRenderedInSidebar\n\t\t? 'bottom left'\n\t\t: undefined;\n\n\tconst renderToggle: DropdownComponentProps[ 'renderToggle' ] = ( {\n\t\tonToggle,\n\t} ) => (\n\t\t<Button\n\t\t\tonClick={ onToggle }\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-label={ toggleAriaLabel }\n\t\t\ttooltipPosition={ dropdownPosition }\n\t\t\tlabel={ __( 'Border color and style picker' ) }\n\t\t\tshowTooltip={ true }\n\t\t>\n\t\t\t<span className={ indicatorWrapperClassName }>\n\t\t\t\t<ColorIndicator\n\t\t\t\t\tclassName={ indicatorClassName }\n\t\t\t\t\tcolorValue={ color }\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</Button>\n\t);\n\n\tconst renderContent: DropdownComponentProps[ 'renderContent' ] = ( {\n\t\tonClose,\n\t} ) => (\n\t\t<>\n\t\t\t<DropdownContentWrapper paddingSize=\"medium\">\n\t\t\t\t<VStack className={ popoverControlsClassName } spacing={ 6 }>\n\t\t\t\t\t{ showDropdownHeader ? (\n\t\t\t\t\t\t<HStack>\n\t\t\t\t\t\t\t<StyledLabel>{ __( 'Border color' ) }</StyledLabel>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\tlabel={ __( 'Close border color' ) }\n\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t) : undefined }\n\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\tclassName={ popoverContentClassName }\n\t\t\t\t\t\tvalue={ color }\n\t\t\t\t\t\tonChange={ onColorChange }\n\t\t\t\t\t\t{ ...{ colors, disableCustomColors } }\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t/>\n\t\t\t\t\t{ enableStyle && (\n\t\t\t\t\t\t<BorderControlStylePicker\n\t\t\t\t\t\t\tlabel={ __( 'Style' ) }\n\t\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\t\tonChange={ onStyleChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t</DropdownContentWrapper>\n\t\t\t{ showResetButton && (\n\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName={ resetButtonClassName }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Reset to default' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t</>\n\t);\n\n\treturn (\n\t\t<Dropdown\n\t\t\trenderToggle={ renderToggle }\n\t\t\trenderContent={ renderContent }\n\t\t\tpopoverProps={ {\n\t\t\t\t...__unstablePopoverProps,\n\t\t\t} }\n\t\t\t{ ...otherProps }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n};\n\nconst ConnectedBorderControlDropdown = contextConnect(\n\tBorderControlDropdown,\n\t'BorderControlDropdown'\n);\n\nexport default ConnectedBorderControlDropdown;\n"]}
@@ -9,8 +9,6 @@ exports.default = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _icons = require("@wordpress/icons");
15
13
 
16
14
  var _i18n = require("@wordpress/i18n");
@@ -74,9 +72,9 @@ const BorderControlStylePicker = (props, forwardedRef) => {
74
72
  value,
75
73
  ...otherProps
76
74
  } = (0, _hook.useBorderControlStylePicker)(props);
77
- return (0, _element.createElement)(_view.View, (0, _extends2.default)({}, otherProps, {
75
+ return (0, _element.createElement)(_view.View, { ...otherProps,
78
76
  ref: forwardedRef
79
- }), (0, _element.createElement)(Label, {
77
+ }, (0, _element.createElement)(Label, {
80
78
  label: label,
81
79
  hideLabelFromVision: hideLabelFromVision
82
80
  }), (0, _element.createElement)(_flex.Flex, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/border-control/border-control-style-picker/component.tsx"],"names":["BORDER_STYLES","label","icon","lineSolid","value","lineDashed","lineDotted","Label","props","hideLabelFromVision","BorderControlStylePicker","forwardedRef","buttonClassName","onChange","otherProps","map","borderStyle","undefined","ConnectedBorderControlStylePicker"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAfA;AACA;AACA;;AAIA;AACA;AACA;AAWA,MAAMA,aAAa,GAAG,CACrB;AAAEC,EAAAA,KAAK,EAAE,cAAI,OAAJ,CAAT;AAAwBC,EAAAA,IAAI,EAAEC,gBAA9B;AAAyCC,EAAAA,KAAK,EAAE;AAAhD,CADqB,EAErB;AAAEH,EAAAA,KAAK,EAAE,cAAI,QAAJ,CAAT;AAAyBC,EAAAA,IAAI,EAAEG,iBAA/B;AAA2CD,EAAAA,KAAK,EAAE;AAAlD,CAFqB,EAGrB;AAAEH,EAAAA,KAAK,EAAE,cAAI,QAAJ,CAAT;AAAyBC,EAAAA,IAAI,EAAEI,iBAA/B;AAA2CF,EAAAA,KAAK,EAAE;AAAlD,CAHqB,CAAtB;;AAM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B;AAeC,IAAA,WAAW,EAAG;AAff,IADC,CADH,CALD,CADD;AA6BA,CA1CD;;AA4CA,MAAMiB,iCAAiC,GAAG,6BACzCR,wBADyC,EAEzC,0BAFyC,CAA1C;eAKeQ,iC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { lineDashed, lineDotted, lineSolid } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { Flex } from '../../flex';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderControlStylePicker } from './hook';\n\nimport type { LabelProps, StylePickerProps } from '../types';\n\nconst BORDER_STYLES = [\n\t{ label: __( 'Solid' ), icon: lineSolid, value: 'solid' },\n\t{ label: __( 'Dashed' ), icon: lineDashed, value: 'dashed' },\n\t{ label: __( 'Dotted' ), icon: lineDotted, value: 'dotted' },\n];\n\nconst Label = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel>{ label }</StyledLabel>\n\t);\n};\n\nconst BorderControlStylePicker = (\n\tprops: WordPressComponentProps< StylePickerProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tbuttonClassName,\n\t\thideLabelFromVision,\n\t\tlabel,\n\t\tonChange,\n\t\tvalue,\n\t\t...otherProps\n\t} = useBorderControlStylePicker( props );\n\n\treturn (\n\t\t<View { ...otherProps } ref={ forwardedRef }>\n\t\t\t<Label\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<Flex justify=\"flex-start\" gap={ 1 }>\n\t\t\t\t{ BORDER_STYLES.map( ( borderStyle ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ borderStyle.value }\n\t\t\t\t\t\tclassName={ buttonClassName }\n\t\t\t\t\t\ticon={ borderStyle.icon }\n\t\t\t\t\t\tisSmall\n\t\t\t\t\t\tisPressed={ borderStyle.value === value }\n\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\tborderStyle.value === value\n\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t: borderStyle.value\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ borderStyle.label }\n\t\t\t\t\t\tlabel={ borderStyle.label }\n\t\t\t\t\t\tshowTooltip={ true }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</Flex>\n\t\t</View>\n\t);\n};\n\nconst ConnectedBorderControlStylePicker = contextConnect(\n\tBorderControlStylePicker,\n\t'BorderControlStylePicker'\n);\n\nexport default ConnectedBorderControlStylePicker;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/border-control/border-control-style-picker/component.tsx"],"names":["BORDER_STYLES","label","icon","lineSolid","value","lineDashed","lineDotted","Label","props","hideLabelFromVision","BorderControlStylePicker","forwardedRef","buttonClassName","onChange","otherProps","map","borderStyle","undefined","ConnectedBorderControlStylePicker"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAfA;AACA;AACA;;AAIA;AACA;AACA;AAWA,MAAMA,aAAa,GAAG,CACrB;AAAEC,EAAAA,KAAK,EAAE,cAAI,OAAJ,CAAT;AAAwBC,EAAAA,IAAI,EAAEC,gBAA9B;AAAyCC,EAAAA,KAAK,EAAE;AAAhD,CADqB,EAErB;AAAEH,EAAAA,KAAK,EAAE,cAAI,QAAJ,CAAT;AAAyBC,EAAAA,IAAI,EAAEG,iBAA/B;AAA2CD,EAAAA,KAAK,EAAE;AAAlD,CA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AACZ,KAAZ,KAAsBA,KAAtB,GACGa,SADH,GAEGD,WAAW,CAACZ,KAHR,CAPV;AAaC,kBAAaY,WAAW,CAACf,KAb1B;AAcC,IAAA,KAAK,EAAGe,WAAW,CAACf,KAdrB;AAeC,IAAA,WAAW,EAAG;AAff,IADC,CADH,CALD,CADD;AA6BA,CA1CD;;AA4CA,MAAMiB,iCAAiC,GAAG,6BACzCR,wBADyC,EAEzC,0BAFyC,CAA1C;eAKeQ,iC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { lineDashed, lineDotted, lineSolid } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { Flex } from '../../flex';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderControlStylePicker } from './hook';\n\nimport type { LabelProps, StylePickerProps } from '../types';\n\nconst BORDER_STYLES = [\n\t{ label: __( 'Solid' ), icon: lineSolid, value: 'solid' },\n\t{ label: __( 'Dashed' ), icon: lineDashed, value: 'dashed' },\n\t{ label: __( 'Dotted' ), icon: lineDotted, value: 'dotted' },\n];\n\nconst Label = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel>{ label }</StyledLabel>\n\t);\n};\n\nconst BorderControlStylePicker = (\n\tprops: WordPressComponentProps< StylePickerProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tbuttonClassName,\n\t\thideLabelFromVision,\n\t\tlabel,\n\t\tonChange,\n\t\tvalue,\n\t\t...otherProps\n\t} = useBorderControlStylePicker( props );\n\n\treturn (\n\t\t<View { ...otherProps } ref={ forwardedRef }>\n\t\t\t<Label\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<Flex justify=\"flex-start\" gap={ 1 }>\n\t\t\t\t{ BORDER_STYLES.map( ( borderStyle ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ borderStyle.value }\n\t\t\t\t\t\tclassName={ buttonClassName }\n\t\t\t\t\t\ticon={ borderStyle.icon }\n\t\t\t\t\t\tisSmall\n\t\t\t\t\t\tisPressed={ borderStyle.value === value }\n\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\tborderStyle.value === value\n\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t: borderStyle.value\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ borderStyle.label }\n\t\t\t\t\t\tlabel={ borderStyle.label }\n\t\t\t\t\t\tshowTooltip={ true }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</Flex>\n\t\t</View>\n\t);\n};\n\nconst ConnectedBorderControlStylePicker = contextConnect(\n\tBorderControlStylePicker,\n\t'BorderControlStylePicker'\n);\n\nexport default ConnectedBorderControlStylePicker;\n"]}
@@ -9,8 +9,6 @@ exports.default = AllInputControl;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _unitControl = _interopRequireDefault(require("./unit-control"));
15
13
 
16
14
  var _utils = require("./utils");
@@ -74,7 +72,7 @@ function AllInputControl({
74
72
  });
75
73
  };
76
74
 
77
- return (0, _element.createElement)(_unitControl.default, (0, _extends2.default)({}, props, {
75
+ return (0, _element.createElement)(_unitControl.default, { ...props,
78
76
  disableUnits: isMixed,
79
77
  isOnly: true,
80
78
  value: allValue,
@@ -84,6 +82,6 @@ function AllInputControl({
84
82
  onHoverOn: handleOnHoverOn,
85
83
  onHoverOff: handleOnHoverOff,
86
84
  placeholder: allPlaceholder
87
- }));
85
+ });
88
86
  }
89
87
  //# sourceMappingURL=all-input-control.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/box-control/all-input-control.tsx"],"names":["noop","AllInputControl","onChange","onFocus","onHoverOn","onHoverOff","values","sides","selectedUnits","setSelectedUnits","props","allValue","hasValues","isMixed","allPlaceholder","LABELS","mixed","undefined","handleOnFocus","event","side","handleOnChange","next","isNumeric","isNaN","parseFloat","nextValue","nextValues","handleOnUnitChange","unit","newUnits","handleOnHoverOn","top","bottom","left","right","handleOnHoverOff"],"mappings":";;;;;;;;;;;;;AAKA;;AACA;;AANA;AACA;AACA;AAYA,MAAMA,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEe,SAASC,eAAT,CAA0B;AACxCC,EAAAA,QAAQ,GAAGF,IAD6B;AAExCG,EAAAA,OAAO,GAAGH,IAF8B;AAGxCI,EAAAA,SAAS,GAAGJ,IAH4B;AAIxCK,EAAAA,UAAU,GAAGL,IAJ2B;AAKxCM,EAAAA,MALwC;AAMxCC,EAAAA,KANwC;AAOxCC,EAAAA,aAPwC;AAQxCC,EAAAA,gBARwC;AASxC,KAAGC;AATqC,CAA1B,EAUkB;AAChC,QAAMC,QAAQ,GAAG,wBAAaL,MAAb,EAAqBE,aAArB,EAAoCD,KAApC,CAAjB;AACA,QAAMK,SAAS,GAAG,4BAAiBN,MAAjB,CAAlB;AACA,QAAMO,OAAO,GAAGD,SAAS,IAAI,0BAAeN,MAAf,EAAuBE,aAAvB,EAAsCD,KAAtC,CAA7B;AACA,QAAMO,cAAc,GAAGD,OAAO,GAAGE,cAAOC,KAAV,GAAkBC,SAAhD;;AAEA,QAAMC,aAA0D,GAC/DC,KADkE,IAE9D;AACJhB,IAAAA,OAAO,CAAEgB,KAAF,EAAS;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAT,CAAP;AACA,GAJD;;AAMA,QAAMC,cAA8C,GAA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AUC,IAAA,WAAW,EAAGtB;AAVf,KADD;AAcA","sourcesContent":["/**\n * Internal dependencies\n */\nimport type { UnitControlProps } from '../unit-control/types';\nimport type { BoxControlInputControlProps } from './types';\nimport UnitControl from './unit-control';\nimport {\n\tLABELS,\n\tapplyValueToSides,\n\tgetAllValue,\n\tisValuesMixed,\n\tisValuesDefined,\n} from './utils';\n\nconst noop = () => {};\n\nexport default function AllInputControl( {\n\tonChange = noop,\n\tonFocus = noop,\n\tonHoverOn = noop,\n\tonHoverOff = noop,\n\tvalues,\n\tsides,\n\tselectedUnits,\n\tsetSelectedUnits,\n\t...props\n}: BoxControlInputControlProps ) {\n\tconst allValue = getAllValue( values, selectedUnits, sides );\n\tconst hasValues = isValuesDefined( values );\n\tconst isMixed = hasValues && isValuesMixed( values, selectedUnits, sides );\n\tconst allPlaceholder = isMixed ? LABELS.mixed : undefined;\n\n\tconst handleOnFocus: React.FocusEventHandler< HTMLInputElement > = (\n\t\tevent\n\t) => {\n\t\tonFocus( event, { side: 'all' } );\n\t};\n\n\tconst handleOnChange: UnitControlProps[ 'onChange' ] = ( next ) => {\n\t\tconst isNumeric = next !== undefined && ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\t\tconst nextValues = applyValueToSides( values, nextValue, sides );\n\n\t\tonChange( nextValues );\n\t};\n\n\t// Set selected unit so it can be used as fallback by unlinked controls\n\t// when individual sides do not have a value containing a unit.\n\tconst handleOnUnitChange: UnitControlProps[ 'onUnitChange' ] = ( unit ) => {\n\t\tconst newUnits = applyValueToSides( selectedUnits, unit, sides );\n\t\tsetSelectedUnits( newUnits );\n\t};\n\n\tconst handleOnHoverOn = () => {\n\t\tonHoverOn( {\n\t\t\ttop: true,\n\t\t\tbottom: true,\n\t\t\tleft: true,\n\t\t\tright: true,\n\t\t} );\n\t};\n\n\tconst handleOnHoverOff = () => {\n\t\tonHoverOff( {\n\t\t\ttop: false,\n\t\t\tbottom: false,\n\t\t\tleft: false,\n\t\t\tright: false,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<UnitControl\n\t\t\t{ ...props }\n\t\t\tdisableUnits={ isMixed }\n\t\t\tisOnly\n\t\t\tvalue={ allValue }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ handleOnUnitChange }\n\t\t\tonFocus={ handleOnFocus }\n\t\t\tonHoverOn={ handleOnHoverOn }\n\t\t\tonHoverOff={ handleOnHoverOff }\n\t\t\tplaceholder={ allPlaceholder }\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/box-control/all-input-control.tsx"],"names":["noop","AllInputControl","onChange","onFocus","onHoverOn","onHoverOff","values","sides","selectedUnits","setSelectedUnits","props","allValue","hasValues","isMixed","allPlaceholder","LABELS","mixed","undefined","handleOnFocus","event","side","handleOnChange","next","isNumeric","isNaN","parseFloat","nextValue","nextValues","handleOnUnitChange","unit","newUnits","handleOnHoverOn","top","bottom","left","right","handleOnHoverOff"],"mappings":";;;;;;;;;;;AAKA;;AACA;;AANA;AACA;AACA;AAYA,MAAMA,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEe,SAASC,eAAT,CAA0B;AACxCC,EAAAA,QAAQ,GAAGF,IAD6B;AAExCG,EAAAA,OAAO,GAAGH,IAF8B;AAGxCI,EAAAA,SAAS,GAAGJ,IAH4B;AAIxCK,EAAAA,UAAU,GAAGL,IAJ2B;AAKxCM,EAAAA,MALwC;AAMxCC,EAAAA,KANwC;AAOxCC,EAAAA,aAPwC;AAQxCC,EAAAA,gBARwC;AASxC,KAAGC;AATqC,CAA1B,EAUkB;AAChC,QAAMC,QAAQ,GAAG,wBAAaL,MAAb,EAAqBE,aAArB,EAAoCD,KAApC,CAAjB;AACA,QAAMK,SAAS,GAAG,4BAAiBN,MAAjB,CAAlB;AACA,QAAMO,OAAO,GAAGD,SAAS,IAAI,0BAAeN,MAAf,EAAuBE,aAAvB,EAAsCD,KAAtC,CAA7B;AACA,QAAMO,cAAc,GAAGD,OA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A,MAAM,MAHP;AAIC,IAAA,KAAK,EAAGF,QAJT;AAKC,IAAA,QAAQ,EAAGU,cALZ;AAMC,IAAA,YAAY,EAAGO,kBANhB;AAOC,IAAA,OAAO,EAAGV,aAPX;AAQC,IAAA,SAAS,EAAGa,eARb;AASC,IAAA,UAAU,EAAGK,gBATd;AAUC,IAAA,WAAW,EAAGtB;AAVf,IADD;AAcA","sourcesContent":["/**\n * Internal dependencies\n */\nimport type { UnitControlProps } from '../unit-control/types';\nimport type { BoxControlInputControlProps } from './types';\nimport UnitControl from './unit-control';\nimport {\n\tLABELS,\n\tapplyValueToSides,\n\tgetAllValue,\n\tisValuesMixed,\n\tisValuesDefined,\n} from './utils';\n\nconst noop = () => {};\n\nexport default function AllInputControl( {\n\tonChange = noop,\n\tonFocus = noop,\n\tonHoverOn = noop,\n\tonHoverOff = noop,\n\tvalues,\n\tsides,\n\tselectedUnits,\n\tsetSelectedUnits,\n\t...props\n}: BoxControlInputControlProps ) {\n\tconst allValue = getAllValue( values, selectedUnits, sides );\n\tconst hasValues = isValuesDefined( values );\n\tconst isMixed = hasValues && isValuesMixed( values, selectedUnits, sides );\n\tconst allPlaceholder = isMixed ? LABELS.mixed : undefined;\n\n\tconst handleOnFocus: React.FocusEventHandler< HTMLInputElement > = (\n\t\tevent\n\t) => {\n\t\tonFocus( event, { side: 'all' } );\n\t};\n\n\tconst handleOnChange: UnitControlProps[ 'onChange' ] = ( next ) => {\n\t\tconst isNumeric = next !== undefined && ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\t\tconst nextValues = applyValueToSides( values, nextValue, sides );\n\n\t\tonChange( nextValues );\n\t};\n\n\t// Set selected unit so it can be used as fallback by unlinked controls\n\t// when individual sides do not have a value containing a unit.\n\tconst handleOnUnitChange: UnitControlProps[ 'onUnitChange' ] = ( unit ) => {\n\t\tconst newUnits = applyValueToSides( selectedUnits, unit, sides );\n\t\tsetSelectedUnits( newUnits );\n\t};\n\n\tconst handleOnHoverOn = () => {\n\t\tonHoverOn( {\n\t\t\ttop: true,\n\t\t\tbottom: true,\n\t\t\tleft: true,\n\t\t\tright: true,\n\t\t} );\n\t};\n\n\tconst handleOnHoverOff = () => {\n\t\tonHoverOff( {\n\t\t\ttop: false,\n\t\t\tbottom: false,\n\t\t\tleft: false,\n\t\t\tright: false,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<UnitControl\n\t\t\t{ ...props }\n\t\t\tdisableUnits={ isMixed }\n\t\t\tisOnly\n\t\t\tvalue={ allValue }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ handleOnUnitChange }\n\t\t\tonFocus={ handleOnFocus }\n\t\t\tonHoverOn={ handleOnHoverOn }\n\t\t\tonHoverOff={ handleOnHoverOff }\n\t\t\tplaceholder={ allPlaceholder }\n\t\t/>\n\t);\n}\n"]}