@wordpress/components 25.7.0 → 25.8.1

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 (630) hide show
  1. package/CHANGELOG.md +66 -1
  2. package/build/animation/index.js +6 -0
  3. package/build/animation/index.js.map +1 -1
  4. package/build/border-control/border-control-dropdown/component.js +1 -1
  5. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  6. package/build/border-control/styles.js +20 -20
  7. package/build/border-control/styles.js.map +1 -1
  8. package/build/box-control/unit-control.js +1 -1
  9. package/build/box-control/unit-control.js.map +1 -1
  10. package/build/button/index.js +9 -1
  11. package/build/button/index.js.map +1 -1
  12. package/build/button/types.js.map +1 -1
  13. package/build/circular-option-picker/circular-option-picker-actions.js +53 -0
  14. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -0
  15. package/build/circular-option-picker/circular-option-picker-context.js +14 -0
  16. package/build/circular-option-picker/circular-option-picker-context.js.map +1 -0
  17. package/build/circular-option-picker/circular-option-picker-option-group.js +26 -0
  18. package/build/circular-option-picker/circular-option-picker-option-group.js.map +1 -0
  19. package/build/circular-option-picker/circular-option-picker-option.js +122 -0
  20. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -0
  21. package/build/circular-option-picker/circular-option-picker.js +172 -0
  22. package/build/circular-option-picker/circular-option-picker.js.map +1 -0
  23. package/build/circular-option-picker/index.js +29 -137
  24. package/build/circular-option-picker/index.js.map +1 -1
  25. package/build/circular-option-picker/types.js.map +1 -1
  26. package/build/color-palette/index.js +58 -19
  27. package/build/color-palette/index.js.map +1 -1
  28. package/build/color-palette/types.js.map +1 -1
  29. package/build/combobox-control/index.js +0 -3
  30. package/build/combobox-control/index.js.map +1 -1
  31. package/build/composite/index.js.map +1 -1
  32. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  33. package/build/date-time/time/index.js +6 -1
  34. package/build/date-time/time/index.js.map +1 -1
  35. package/build/date-time/time/timezone.js +1 -1
  36. package/build/date-time/time/timezone.js.map +1 -1
  37. package/build/dropdown/index.js +11 -23
  38. package/build/dropdown/index.js.map +1 -1
  39. package/build/dropdown/types.js.map +1 -1
  40. package/build/dropdown-menu/index.js +7 -1
  41. package/build/dropdown-menu/index.js.map +1 -1
  42. package/build/dropdown-menu/types.js.map +1 -1
  43. package/build/dropdown-menu-v2/styles.js +16 -16
  44. package/build/dropdown-menu-v2/styles.js.map +1 -1
  45. package/build/duotone-picker/color-list-picker/index.js +18 -3
  46. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  47. package/build/duotone-picker/duotone-picker.js +33 -1
  48. package/build/duotone-picker/duotone-picker.js.map +1 -1
  49. package/build/duotone-picker/types.js.map +1 -1
  50. package/build/focusable-iframe/index.js +0 -4
  51. package/build/focusable-iframe/index.js.map +1 -1
  52. package/build/focusable-iframe/types.js +6 -0
  53. package/build/focusable-iframe/types.js.map +1 -0
  54. package/build/form-token-field/index.js +6 -2
  55. package/build/form-token-field/index.js.map +1 -1
  56. package/build/form-token-field/types.js.map +1 -1
  57. package/build/gradient-picker/index.js +57 -15
  58. package/build/gradient-picker/index.js.map +1 -1
  59. package/build/gradient-picker/types.js.map +1 -1
  60. package/build/higher-order/navigate-regions/index.js.map +1 -1
  61. package/build/higher-order/with-focus-outside/index.js +1 -2
  62. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  63. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  64. package/build/index.js +6 -0
  65. package/build/index.js.map +1 -1
  66. package/build/input-control/styles/input-control-styles.js +22 -22
  67. package/build/input-control/styles/input-control-styles.js.map +1 -1
  68. package/build/mobile/bottom-sheet/index.native.js +1 -0
  69. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  70. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  71. package/build/modal/index.js +12 -3
  72. package/build/modal/index.js.map +1 -1
  73. package/build/modal/types.js.map +1 -1
  74. package/build/navigation/use-navigation-tree-nodes.js.map +1 -1
  75. package/build/notice/index.js +19 -7
  76. package/build/notice/index.js.map +1 -1
  77. package/build/palette-edit/styles.js +10 -10
  78. package/build/palette-edit/styles.js.map +1 -1
  79. package/build/placeholder/index.js +10 -4
  80. package/build/placeholder/index.js.map +1 -1
  81. package/build/popover/index.js +37 -83
  82. package/build/popover/index.js.map +1 -1
  83. package/build/popover/types.js.map +1 -1
  84. package/build/popover/utils.js +9 -41
  85. package/build/popover/utils.js.map +1 -1
  86. package/build/search-control/index.js +12 -3
  87. package/build/search-control/index.js.map +1 -1
  88. package/build/search-control/types.js.map +1 -1
  89. package/build/text/styles.js +7 -7
  90. package/build/text/styles.js.map +1 -1
  91. package/build/toggle-group-control/toggle-group-control/as-button-group.js +30 -45
  92. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  93. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +40 -41
  94. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  95. package/build/toggle-group-control/toggle-group-control/component.js +10 -5
  96. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  97. package/build/toggle-group-control/toggle-group-control/styles.js +9 -16
  98. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  99. package/build/toggle-group-control/toggle-group-control/utils.js +44 -0
  100. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -0
  101. package/build/toggle-group-control/toggle-group-control-option-base/component.js +36 -17
  102. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  103. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +10 -8
  104. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  105. package/build/toggle-group-control/types.js.map +1 -1
  106. package/build/toolbar/toolbar/index.js +7 -1
  107. package/build/toolbar/toolbar/index.js.map +1 -1
  108. package/build/toolbar/toolbar-dropdown-menu/index.js +1 -3
  109. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  110. package/build/toolbar/toolbar-group/index.js +16 -12
  111. package/build/toolbar/toolbar-group/index.js.map +1 -1
  112. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +0 -2
  113. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  114. package/build/toolbar/toolbar-group/toolbar-group-container.js +3 -1
  115. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  116. package/build/toolbar/toolbar-group/types.js +6 -0
  117. package/build/toolbar/toolbar-group/types.js.map +1 -0
  118. package/build/toolbar/toolbar-item/index.js +1 -1
  119. package/build/toolbar/toolbar-item/index.js.map +1 -1
  120. package/build/tooltip/index.js +51 -225
  121. package/build/tooltip/index.js.map +1 -1
  122. package/build/tooltip/types.js +6 -0
  123. package/build/tooltip/types.js.map +1 -0
  124. package/build/ui/context/context-connect.js.map +1 -1
  125. package/build/ui/context/wordpress-component.js.map +1 -1
  126. package/build/unit-control/index.js.map +1 -1
  127. package/build/unit-control/styles/unit-control-styles.js +7 -7
  128. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  129. package/build/utils/colors-values.js +1 -1
  130. package/build/utils/colors-values.js.map +1 -1
  131. package/build/utils/use-deprecated-props.js.map +1 -1
  132. package/build-module/animation/index.js +1 -1
  133. package/build-module/animation/index.js.map +1 -1
  134. package/build-module/border-control/border-control-dropdown/component.js +1 -1
  135. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  136. package/build-module/border-control/styles.js +20 -20
  137. package/build-module/border-control/styles.js.map +1 -1
  138. package/build-module/box-control/unit-control.js +1 -1
  139. package/build-module/box-control/unit-control.js.map +1 -1
  140. package/build-module/button/index.js +9 -1
  141. package/build-module/button/index.js.map +1 -1
  142. package/build-module/button/types.js.map +1 -1
  143. package/build-module/circular-option-picker/circular-option-picker-actions.js +44 -0
  144. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -0
  145. package/build-module/circular-option-picker/circular-option-picker-context.js +11 -0
  146. package/build-module/circular-option-picker/circular-option-picker-context.js.map +1 -0
  147. package/build-module/circular-option-picker/circular-option-picker-option-group.js +23 -0
  148. package/build-module/circular-option-picker/circular-option-picker-option-group.js.map +1 -0
  149. package/build-module/circular-option-picker/circular-option-picker-option.js +114 -0
  150. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -0
  151. package/build-module/circular-option-picker/circular-option-picker.js +165 -0
  152. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -0
  153. package/build-module/circular-option-picker/index.js +4 -132
  154. package/build-module/circular-option-picker/index.js.map +1 -1
  155. package/build-module/circular-option-picker/types.js.map +1 -1
  156. package/build-module/color-palette/index.js +58 -19
  157. package/build-module/color-palette/index.js.map +1 -1
  158. package/build-module/color-palette/types.js.map +1 -1
  159. package/build-module/combobox-control/index.js +0 -3
  160. package/build-module/combobox-control/index.js.map +1 -1
  161. package/build-module/composite/index.js +2 -0
  162. package/build-module/composite/index.js.map +1 -1
  163. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  164. package/build-module/date-time/time/index.js +6 -1
  165. package/build-module/date-time/time/index.js.map +1 -1
  166. package/build-module/date-time/time/timezone.js +1 -1
  167. package/build-module/date-time/time/timezone.js.map +1 -1
  168. package/build-module/dropdown/index.js +12 -24
  169. package/build-module/dropdown/index.js.map +1 -1
  170. package/build-module/dropdown/types.js.map +1 -1
  171. package/build-module/dropdown-menu/index.js +7 -1
  172. package/build-module/dropdown-menu/index.js.map +1 -1
  173. package/build-module/dropdown-menu/types.js.map +1 -1
  174. package/build-module/dropdown-menu-v2/styles.js +16 -16
  175. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  176. package/build-module/duotone-picker/color-list-picker/index.js +18 -3
  177. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  178. package/build-module/duotone-picker/duotone-picker.js +33 -1
  179. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  180. package/build-module/duotone-picker/types.js.map +1 -1
  181. package/build-module/focusable-iframe/index.js +2 -3
  182. package/build-module/focusable-iframe/index.js.map +1 -1
  183. package/build-module/focusable-iframe/types.js +2 -0
  184. package/build-module/focusable-iframe/types.js.map +1 -0
  185. package/build-module/form-token-field/index.js +6 -2
  186. package/build-module/form-token-field/index.js.map +1 -1
  187. package/build-module/form-token-field/types.js.map +1 -1
  188. package/build-module/gradient-picker/index.js +57 -15
  189. package/build-module/gradient-picker/index.js.map +1 -1
  190. package/build-module/gradient-picker/types.js.map +1 -1
  191. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  192. package/build-module/higher-order/with-focus-outside/index.js +1 -3
  193. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  194. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  195. package/build-module/index.js +1 -1
  196. package/build-module/index.js.map +1 -1
  197. package/build-module/input-control/styles/input-control-styles.js +23 -23
  198. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  199. package/build-module/mobile/bottom-sheet/index.native.js +1 -0
  200. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  201. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  202. package/build-module/modal/index.js +12 -3
  203. package/build-module/modal/index.js.map +1 -1
  204. package/build-module/modal/types.js.map +1 -1
  205. package/build-module/navigation/use-navigation-tree-nodes.js.map +1 -1
  206. package/build-module/notice/index.js +19 -7
  207. package/build-module/notice/index.js.map +1 -1
  208. package/build-module/palette-edit/styles.js +10 -10
  209. package/build-module/palette-edit/styles.js.map +1 -1
  210. package/build-module/placeholder/index.js +11 -4
  211. package/build-module/placeholder/index.js.map +1 -1
  212. package/build-module/popover/index.js +38 -84
  213. package/build-module/popover/index.js.map +1 -1
  214. package/build-module/popover/types.js.map +1 -1
  215. package/build-module/popover/utils.js +8 -39
  216. package/build-module/popover/utils.js.map +1 -1
  217. package/build-module/search-control/index.js +12 -3
  218. package/build-module/search-control/index.js.map +1 -1
  219. package/build-module/search-control/types.js.map +1 -1
  220. package/build-module/text/styles.js +7 -7
  221. package/build-module/text/styles.js.map +1 -1
  222. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +32 -47
  223. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  224. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +41 -42
  225. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  226. package/build-module/toggle-group-control/toggle-group-control/component.js +10 -6
  227. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  228. package/build-module/toggle-group-control/toggle-group-control/styles.js +8 -14
  229. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  230. package/build-module/toggle-group-control/toggle-group-control/utils.js +42 -0
  231. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -0
  232. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +35 -16
  233. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  234. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +8 -7
  235. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  236. package/build-module/toggle-group-control/types.js.map +1 -1
  237. package/build-module/toolbar/toolbar/index.js +7 -1
  238. package/build-module/toolbar/toolbar/index.js.map +1 -1
  239. package/build-module/toolbar/toolbar-dropdown-menu/index.js +5 -3
  240. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  241. package/build-module/toolbar/toolbar-group/index.js +15 -12
  242. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  243. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +0 -2
  244. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  245. package/build-module/toolbar/toolbar-group/toolbar-group-container.js +3 -1
  246. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  247. package/build-module/toolbar/toolbar-group/types.js +2 -0
  248. package/build-module/toolbar/toolbar-group/types.js.map +1 -0
  249. package/build-module/toolbar/toolbar-item/index.js +1 -1
  250. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  251. package/build-module/tooltip/index.js +53 -224
  252. package/build-module/tooltip/index.js.map +1 -1
  253. package/build-module/tooltip/types.js +2 -0
  254. package/build-module/tooltip/types.js.map +1 -0
  255. package/build-module/ui/context/context-connect.js.map +1 -1
  256. package/build-module/ui/context/wordpress-component.js.map +1 -1
  257. package/build-module/unit-control/index.js.map +1 -1
  258. package/build-module/unit-control/styles/unit-control-styles.js +7 -7
  259. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  260. package/build-module/utils/colors-values.js +1 -1
  261. package/build-module/utils/colors-values.js.map +1 -1
  262. package/build-module/utils/use-deprecated-props.js.map +1 -1
  263. package/build-style/style-rtl.css +35 -73
  264. package/build-style/style.css +35 -73
  265. package/build-types/animation/index.d.ts +1 -1
  266. package/build-types/animation/index.d.ts.map +1 -1
  267. package/build-types/base-control/hooks.d.ts +1 -1
  268. package/build-types/border-box-control/border-box-control/component.d.ts +1 -1
  269. package/build-types/border-box-control/border-box-control/hook.d.ts +46 -46
  270. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +51 -51
  271. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
  272. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +46 -46
  273. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +46 -46
  274. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  275. package/build-types/border-control/border-control/hook.d.ts +45 -45
  276. package/build-types/border-control/border-control-dropdown/hook.d.ts +45 -45
  277. package/build-types/border-control/border-control-style-picker/hook.d.ts +45 -45
  278. package/build-types/border-control/stories/index.story.d.ts +6 -6
  279. package/build-types/box-control/styles/box-control-styles.d.ts +1 -1
  280. package/build-types/button/deprecated.d.ts +16 -22
  281. package/build-types/button/deprecated.d.ts.map +1 -1
  282. package/build-types/button/index.d.ts.map +1 -1
  283. package/build-types/button/types.d.ts +0 -4
  284. package/build-types/button/types.d.ts.map +1 -1
  285. package/build-types/card/card/hook.d.ts +46 -46
  286. package/build-types/card/card-body/hook.d.ts +46 -46
  287. package/build-types/card/card-divider/hook.d.ts +47 -47
  288. package/build-types/card/card-footer/hook.d.ts +46 -46
  289. package/build-types/card/card-header/hook.d.ts +46 -46
  290. package/build-types/card/card-media/hook.d.ts +46 -46
  291. package/build-types/card/stories/index.story.d.ts +2 -2
  292. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +7 -0
  293. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -0
  294. package/build-types/circular-option-picker/circular-option-picker-context.d.ts +7 -0
  295. package/build-types/circular-option-picker/circular-option-picker-context.d.ts.map +1 -0
  296. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +7 -0
  297. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -0
  298. package/build-types/circular-option-picker/circular-option-picker-option.d.ts +4 -0
  299. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -0
  300. package/build-types/circular-option-picker/circular-option-picker.d.ts +11 -0
  301. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -0
  302. package/build-types/circular-option-picker/index.d.ts +5 -56
  303. package/build-types/circular-option-picker/index.d.ts.map +1 -1
  304. package/build-types/circular-option-picker/stories/index.story.d.ts +3 -1
  305. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  306. package/build-types/circular-option-picker/test/index.d.ts +2 -0
  307. package/build-types/circular-option-picker/test/index.d.ts.map +1 -0
  308. package/build-types/circular-option-picker/types.d.ts +53 -1
  309. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  310. package/build-types/color-palette/index.d.ts +3 -19
  311. package/build-types/color-palette/index.d.ts.map +1 -1
  312. package/build-types/color-palette/stories/index.story.d.ts +3 -36
  313. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  314. package/build-types/color-palette/styles.d.ts +1 -1
  315. package/build-types/color-palette/types.d.ts +31 -1
  316. package/build-types/color-palette/types.d.ts.map +1 -1
  317. package/build-types/color-picker/component.d.ts +1 -1
  318. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  319. package/build-types/color-picker/styles.d.ts +6 -6
  320. package/build-types/combobox-control/index.d.ts.map +1 -1
  321. package/build-types/combobox-control/stories/index.story.d.ts +2 -2
  322. package/build-types/composite/index.d.ts +14 -1
  323. package/build-types/composite/index.d.ts.map +1 -1
  324. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -2
  325. package/build-types/date-time/date/styles.d.ts +3 -3
  326. package/build-types/date-time/date-time/styles.d.ts +2 -2
  327. package/build-types/date-time/time/index.d.ts.map +1 -1
  328. package/build-types/date-time/time/styles.d.ts +12 -12
  329. package/build-types/dropdown/index.d.ts.map +1 -1
  330. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  331. package/build-types/dropdown/types.d.ts +12 -4
  332. package/build-types/dropdown/types.d.ts.map +1 -1
  333. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  334. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  335. package/build-types/dropdown-menu/types.d.ts +22 -5
  336. package/build-types/dropdown-menu/types.d.ts.map +1 -1
  337. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  338. package/build-types/duotone-picker/duotone-picker.d.ts +1 -1
  339. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  340. package/build-types/duotone-picker/types.d.ts +31 -1
  341. package/build-types/duotone-picker/types.d.ts.map +1 -1
  342. package/build-types/elevation/hook.d.ts +46 -46
  343. package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
  344. package/build-types/flex/flex/hook.d.ts +46 -46
  345. package/build-types/flex/flex-block/hook.d.ts +46 -46
  346. package/build-types/flex/flex-item/hook.d.ts +46 -46
  347. package/build-types/focal-point-picker/stories/index.story.d.ts +8 -8
  348. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
  349. package/build-types/focusable-iframe/index.d.ts +4 -5
  350. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  351. package/build-types/focusable-iframe/types.d.ts +8 -0
  352. package/build-types/focusable-iframe/types.d.ts.map +1 -0
  353. package/build-types/font-size-picker/styles.d.ts +2 -2
  354. package/build-types/form-token-field/index.d.ts.map +1 -1
  355. package/build-types/form-token-field/types.d.ts +6 -0
  356. package/build-types/form-token-field/types.d.ts.map +1 -1
  357. package/build-types/gradient-picker/index.d.ts +1 -1
  358. package/build-types/gradient-picker/index.d.ts.map +1 -1
  359. package/build-types/gradient-picker/stories/index.story.d.ts +3 -36
  360. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  361. package/build-types/gradient-picker/types.d.ts +31 -1
  362. package/build-types/gradient-picker/types.d.ts.map +1 -1
  363. package/build-types/grid/hook.d.ts +46 -46
  364. package/build-types/h-stack/component.d.ts +1 -1
  365. package/build-types/h-stack/hook.d.ts +46 -46
  366. package/build-types/heading/hook.d.ts +45 -45
  367. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  368. package/build-types/higher-order/with-focus-outside/index.d.ts +1 -0
  369. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  370. package/build-types/higher-order/with-focus-outside/test/index.d.ts +2 -0
  371. package/build-types/higher-order/with-focus-outside/test/index.d.ts.map +1 -0
  372. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  373. package/build-types/index.d.ts +1 -1
  374. package/build-types/index.d.ts.map +1 -1
  375. package/build-types/isolated-event-container/test/index.d.ts +2 -0
  376. package/build-types/isolated-event-container/test/index.d.ts.map +1 -0
  377. package/build-types/item-group/item/hook.d.ts +46 -46
  378. package/build-types/item-group/item-group/hook.d.ts +46 -46
  379. package/build-types/menu-item/index.d.ts +1 -1
  380. package/build-types/menu-item/stories/index.story.d.ts +4 -4
  381. package/build-types/modal/index.d.ts.map +1 -1
  382. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  383. package/build-types/modal/types.d.ts +1 -1
  384. package/build-types/modal/types.d.ts.map +1 -1
  385. package/build-types/navigable-container/menu.d.ts +1 -1
  386. package/build-types/navigation/back-button/index.d.ts +1 -1
  387. package/build-types/navigation/styles/navigation-styles.d.ts +5 -3
  388. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  389. package/build-types/navigator/navigator-back-button/component.d.ts +2 -3
  390. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  391. package/build-types/navigator/navigator-back-button/hook.d.ts +53 -54
  392. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  393. package/build-types/navigator/navigator-button/component.d.ts +2 -3
  394. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  395. package/build-types/navigator/navigator-button/hook.d.ts +53 -54
  396. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  397. package/build-types/navigator/navigator-to-parent-button/component.d.ts +2 -3
  398. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  399. package/build-types/notice/index.d.ts.map +1 -1
  400. package/build-types/number-control/index.d.ts +3 -3
  401. package/build-types/number-control/stories/index.story.d.ts +3 -3
  402. package/build-types/palette-edit/styles.d.ts +4 -4
  403. package/build-types/palette-edit/styles.d.ts.map +1 -1
  404. package/build-types/placeholder/index.d.ts.map +1 -1
  405. package/build-types/popover/index.d.ts +1 -1
  406. package/build-types/popover/index.d.ts.map +1 -1
  407. package/build-types/popover/overlay-middlewares.d.ts +1 -1
  408. package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
  409. package/build-types/popover/types.d.ts +0 -4
  410. package/build-types/popover/types.d.ts.map +1 -1
  411. package/build-types/popover/utils.d.ts +2 -6
  412. package/build-types/popover/utils.d.ts.map +1 -1
  413. package/build-types/range-control/index.d.ts +1 -1
  414. package/build-types/range-control/styles/range-control-styles.d.ts +3 -3
  415. package/build-types/resizable-box/index.d.ts +1 -1
  416. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  417. package/build-types/resizable-box/resize-tooltip/label.d.ts +1 -1
  418. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  419. package/build-types/scrollable/hook.d.ts +46 -46
  420. package/build-types/search-control/index.d.ts +4 -2
  421. package/build-types/search-control/index.d.ts.map +1 -1
  422. package/build-types/search-control/stories/index.story.d.ts +8 -4
  423. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  424. package/build-types/search-control/types.d.ts +12 -0
  425. package/build-types/search-control/types.d.ts.map +1 -1
  426. package/build-types/spacer/hook.d.ts +46 -46
  427. package/build-types/spinner/index.d.ts +1 -1
  428. package/build-types/surface/hook.d.ts +46 -46
  429. package/build-types/text/hook.d.ts +46 -46
  430. package/build-types/text/styles.d.ts.map +1 -1
  431. package/build-types/text-control/index.d.ts +3 -3
  432. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  433. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +2 -4
  434. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  435. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +2 -4
  436. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  437. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +2 -2
  438. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  439. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +1 -5
  440. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  441. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts +18 -0
  442. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts.map +1 -0
  443. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
  444. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +5 -1
  445. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  446. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +1 -0
  447. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  448. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  449. package/build-types/toggle-group-control/types.d.ts +13 -24
  450. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  451. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  452. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  453. package/build-types/toolbar/toolbar-button/index.d.ts +16 -22
  454. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  455. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +3 -1
  456. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  457. package/build-types/toolbar/toolbar-group/index.d.ts +10 -14
  458. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
  459. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +3 -5
  460. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
  461. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +7 -5
  462. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
  463. package/build-types/toolbar/toolbar-group/types.d.ts +77 -0
  464. package/build-types/toolbar/toolbar-group/types.d.ts.map +1 -0
  465. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  466. package/build-types/tools-panel/tools-panel/hook.d.ts +46 -46
  467. package/build-types/tools-panel/tools-panel-header/hook.d.ts +46 -46
  468. package/build-types/tools-panel/tools-panel-item/hook.d.ts +46 -46
  469. package/build-types/tooltip/index.d.ts +8 -5
  470. package/build-types/tooltip/index.d.ts.map +1 -1
  471. package/build-types/tooltip/stories/index.story.d.ts +13 -0
  472. package/build-types/tooltip/stories/index.story.d.ts.map +1 -0
  473. package/build-types/tooltip/test/index.d.ts +2 -0
  474. package/build-types/tooltip/test/index.d.ts.map +1 -0
  475. package/build-types/tooltip/test/utils/index.d.ts +11 -0
  476. package/build-types/tooltip/test/utils/index.d.ts.map +1 -0
  477. package/build-types/tooltip/types.d.ts +61 -0
  478. package/build-types/tooltip/types.d.ts.map +1 -0
  479. package/build-types/truncate/hook.d.ts +46 -46
  480. package/build-types/ui/tooltip/content.d.ts +1 -1
  481. package/build-types/unit-control/index.d.ts +1 -1
  482. package/build-types/unit-control/index.d.ts.map +1 -1
  483. package/build-types/unit-control/styles/unit-control-styles.d.ts +3 -3
  484. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  485. package/build-types/unit-control/unit-select-control.d.ts +1 -1
  486. package/build-types/utils/use-deprecated-props.d.ts +1 -1
  487. package/build-types/v-stack/component.d.ts +1 -1
  488. package/build-types/v-stack/hook.d.ts +46 -46
  489. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  490. package/package.json +20 -20
  491. package/src/animation/index.tsx +1 -0
  492. package/src/border-control/border-control/README.md +2 -2
  493. package/src/border-control/border-control-dropdown/component.tsx +1 -1
  494. package/src/border-control/styles.ts +7 -7
  495. package/src/border-control/test/index.js +79 -69
  496. package/src/box-control/unit-control.tsx +1 -1
  497. package/src/button/README.md +0 -6
  498. package/src/button/index.tsx +9 -1
  499. package/src/button/test/index.tsx +19 -0
  500. package/src/button/types.ts +0 -4
  501. package/src/circular-option-picker/README.md +14 -0
  502. package/src/circular-option-picker/circular-option-picker-actions.tsx +60 -0
  503. package/src/circular-option-picker/circular-option-picker-context.tsx +12 -0
  504. package/src/circular-option-picker/circular-option-picker-option-group.tsx +34 -0
  505. package/src/circular-option-picker/circular-option-picker-option.tsx +139 -0
  506. package/src/circular-option-picker/circular-option-picker.tsx +202 -0
  507. package/src/circular-option-picker/index.tsx +7 -174
  508. package/src/circular-option-picker/stories/index.story.tsx +34 -9
  509. package/src/circular-option-picker/style.scss +11 -7
  510. package/src/circular-option-picker/test/index.tsx +133 -0
  511. package/src/circular-option-picker/types.ts +64 -1
  512. package/src/color-palette/README.md +14 -0
  513. package/src/color-palette/index.tsx +69 -28
  514. package/src/color-palette/stories/index.story.tsx +16 -2
  515. package/src/color-palette/test/index.tsx +32 -30
  516. package/src/color-palette/types.ts +34 -1
  517. package/src/combobox-control/index.tsx +7 -5
  518. package/src/composite/{index.js → index.ts} +3 -0
  519. package/src/confirm-dialog/stories/index.story.js +13 -14
  520. package/src/confirm-dialog/test/index.js +10 -18
  521. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +1 -1
  522. package/src/custom-gradient-picker/gradient-bar/test/utils.ts +5 -5
  523. package/src/date-time/time/index.tsx +8 -1
  524. package/src/date-time/time/timezone.tsx +1 -1
  525. package/src/dropdown/README.md +13 -3
  526. package/src/dropdown/index.tsx +16 -34
  527. package/src/dropdown/stories/index.story.tsx +10 -7
  528. package/src/dropdown/types.ts +12 -4
  529. package/src/dropdown-menu/README.md +18 -0
  530. package/src/dropdown-menu/index.tsx +8 -1
  531. package/src/dropdown-menu/stories/index.story.tsx +5 -0
  532. package/src/dropdown-menu/types.ts +23 -6
  533. package/src/dropdown-menu-v2/styles.ts +1 -1
  534. package/src/duotone-picker/README.md +14 -0
  535. package/src/duotone-picker/color-list-picker/index.tsx +28 -12
  536. package/src/duotone-picker/duotone-picker.tsx +33 -0
  537. package/src/duotone-picker/types.ts +34 -1
  538. package/src/focusable-iframe/{index.js → index.tsx} +7 -4
  539. package/src/focusable-iframe/types.ts +9 -0
  540. package/src/form-token-field/README.md +1 -0
  541. package/src/form-token-field/index.tsx +5 -1
  542. package/src/form-token-field/style.scss +5 -9
  543. package/src/form-token-field/test/index.tsx +36 -1
  544. package/src/form-token-field/types.ts +7 -1
  545. package/src/gradient-picker/README.md +14 -0
  546. package/src/gradient-picker/index.tsx +60 -11
  547. package/src/gradient-picker/types.ts +34 -1
  548. package/src/higher-order/navigate-regions/index.tsx +5 -6
  549. package/src/higher-order/with-filters/test/index.tsx +36 -43
  550. package/src/higher-order/with-focus-outside/{index.js → index.tsx} +8 -5
  551. package/src/higher-order/with-focus-outside/test/{index.js → index.tsx} +13 -11
  552. package/src/higher-order/with-notices/test/index.tsx +1 -1
  553. package/src/higher-order/with-spoken-messages/index.tsx +7 -8
  554. package/src/index.ts +5 -1
  555. package/src/input-control/styles/input-control-styles.tsx +2 -2
  556. package/src/isolated-event-container/test/{index.js → index.tsx} +1 -1
  557. package/src/mobile/bottom-sheet/index.native.js +1 -0
  558. package/src/mobile/global-styles-context/index.native.js +7 -8
  559. package/src/modal/README.md +7 -1
  560. package/src/modal/index.tsx +27 -3
  561. package/src/modal/stories/index.story.tsx +2 -1
  562. package/src/modal/test/index.tsx +231 -0
  563. package/src/modal/types.ts +3 -1
  564. package/src/navigation/use-navigation-tree-nodes.tsx +1 -1
  565. package/src/notice/index.tsx +18 -6
  566. package/src/notice/style.scss +0 -1
  567. package/src/notice/test/__snapshots__/index.tsx.snap +9 -1
  568. package/src/palette-edit/styles.js +2 -1
  569. package/src/placeholder/index.tsx +16 -8
  570. package/src/placeholder/style.scss +2 -16
  571. package/src/placeholder/test/index.tsx +34 -15
  572. package/src/popover/index.tsx +47 -110
  573. package/src/popover/test/index.tsx +3 -3
  574. package/src/popover/types.ts +0 -5
  575. package/src/popover/utils.ts +19 -67
  576. package/src/search-control/README.md +7 -0
  577. package/src/search-control/index.tsx +10 -1
  578. package/src/search-control/style.scss +14 -7
  579. package/src/search-control/types.ts +12 -0
  580. package/src/tab-panel/test/index.tsx +5 -0
  581. package/src/text/styles.js +2 -1
  582. package/src/theme/README.md +5 -5
  583. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +567 -59
  584. package/src/toggle-group-control/test/index.tsx +110 -56
  585. package/src/toggle-group-control/toggle-group-control/README.md +0 -1
  586. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +39 -57
  587. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +52 -48
  588. package/src/toggle-group-control/toggle-group-control/component.tsx +12 -6
  589. package/src/toggle-group-control/toggle-group-control/styles.ts +2 -19
  590. package/src/toggle-group-control/toggle-group-control/utils.ts +50 -0
  591. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +70 -20
  592. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +17 -3
  593. package/src/toggle-group-control/types.ts +14 -32
  594. package/src/toolbar/stories/index.story.tsx +3 -5
  595. package/src/toolbar/test/toolbar-group.tsx +13 -7
  596. package/src/toolbar/toolbar/index.tsx +9 -1
  597. package/src/toolbar/toolbar-dropdown-menu/{index.js → index.tsx} +11 -4
  598. package/src/toolbar/toolbar-group/README.md +2 -2
  599. package/src/toolbar/toolbar-group/{index.js → index.tsx} +19 -14
  600. package/src/toolbar/toolbar-group/{toolbar-group-collapsed.js → toolbar-group-collapsed.tsx} +10 -4
  601. package/src/toolbar/toolbar-group/toolbar-group-container.tsx +16 -0
  602. package/src/toolbar/toolbar-group/types.ts +92 -0
  603. package/src/toolbar/toolbar-item/index.tsx +3 -1
  604. package/src/tooltip/README.md +31 -28
  605. package/src/tooltip/index.tsx +106 -0
  606. package/src/tooltip/stories/index.story.tsx +59 -0
  607. package/src/tooltip/style.scss +2 -27
  608. package/src/tooltip/test/index.tsx +335 -0
  609. package/src/tooltip/test/utils/index.tsx +20 -0
  610. package/src/tooltip/types.ts +61 -0
  611. package/src/ui/context/context-connect.ts +3 -3
  612. package/src/ui/context/wordpress-component.ts +4 -4
  613. package/src/unit-control/index.tsx +9 -4
  614. package/src/unit-control/styles/unit-control-styles.ts +3 -1
  615. package/src/unit-control/test/utils.ts +1 -1
  616. package/src/utils/colors-values.js +1 -1
  617. package/src/utils/use-deprecated-props.ts +1 -1
  618. package/tsconfig.tsbuildinfo +1 -1
  619. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -78
  620. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  621. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -76
  622. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  623. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts +0 -9
  624. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +0 -1
  625. package/src/color-palette/test/__snapshots__/index.tsx.snap +0 -288
  626. package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +0 -84
  627. package/src/toolbar/toolbar-group/toolbar-group-container.js +0 -8
  628. package/src/tooltip/index.js +0 -293
  629. package/src/tooltip/stories/index.story.js +0 -85
  630. package/src/tooltip/test/index.js +0 -323
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_utils","_space","_baseControlStyles","_unitControlStyles","_EMOTION_STRINGIFIED_CSS_ERROR__","labelStyles","process","env","NODE_ENV","name","styles","map","toString","focusBoxShadow","css","CONFIG","borderWidth","COLORS","ui","borderFocus","borderControl","boxSizingReset","exports","innerWrapper","UnitControlWrapper","UnitSelect","wrapperWidth","wrapperHeight","size","borderControlDropdown","rtl","borderRadius","border","colorIndicatorBorder","color","style","fallbackColor","gray","undefined","colorIndicatorWrapper","space","swatchSize","swatchGap","borderControlPopoverControls","StyledLabel","borderControlPopoverContent","borderColorIndicator","resetButton","borderControlStylePicker","borderStyleButton","borderSlider","marginRight"],"sources":["@wordpress/components/src/border-control/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG, boxSizingReset, rtl } from '../utils';\nimport { space } from '../ui/utils/space';\nimport { StyledLabel } from '../base-control/styles/base-control-styles';\nimport {\n\tValueInput as UnitControlWrapper,\n\tUnitSelect,\n} from '../unit-control/styles/unit-control-styles';\n\nimport type { Border } from './types';\n\nconst labelStyles = css`\n\tfont-weight: 500;\n`;\n\nconst focusBoxShadow = css`\n\tbox-shadow: inset 0 0 0 ${ CONFIG.borderWidth } ${ COLORS.ui.borderFocus };\n`;\n\nexport const borderControl = css`\n\tborder: 0;\n\tpadding: 0;\n\tmargin: 0;\n\t${ boxSizingReset }\n`;\n\nexport const innerWrapper = () => css`\n\t${ UnitControlWrapper } {\n\t\tflex: 1 1 40%;\n\t}\n\t&& ${ UnitSelect } {\n\t\t/* Prevent unit select forcing min height larger than its UnitControl */\n\t\tmin-height: 0;\n\t}\n`;\n\n/*\n * This style is only applied to the UnitControl wrapper when the border width\n * field should be a set width. Omitting this allows the UnitControl &\n * RangeControl to share the available width in a 40/60 split respectively.\n */\nexport const wrapperWidth = css`\n\t${ UnitControlWrapper } {\n\t\t/* Force the UnitControl's set width. */\n\t\tflex: 0 0 auto;\n\t}\n`;\n\nexport const wrapperHeight = ( size?: 'default' | '__unstable-large' ) => {\n\treturn css`\n\t\theight: ${ size === '__unstable-large' ? '40px' : '30px' };\n\t`;\n};\n\nexport const borderControlDropdown = (\n\tsize?: 'default' | '__unstable-large'\n) => css`\n\tbackground: #fff;\n\n\t&& > button {\n\t\t/*\n\t\t * Override button component styles to fit within BorderControl\n\t\t * regardless of size.\n\t\t */\n\t\theight: ${ size === '__unstable-large' ? '40px' : '30px' };\n\t\twidth: ${ size === '__unstable-large' ? '40px' : '30px' };\n\t\tpadding: 0;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\t${ rtl(\n\t\t\t{ borderRadius: `2px 0 0 2px` },\n\t\t\t{ borderRadius: `0 2px 2px 0` }\n\t\t)() }\n\t\tborder: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };\n\n\t\t&:focus,\n\t\t&:hover:not( :disabled ) {\n\t\t\t${ focusBoxShadow }\n\t\t\tborder-color: ${ COLORS.ui.borderFocus };\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t}\n\t}\n`;\n\nexport const colorIndicatorBorder = ( border?: Border ) => {\n\tconst { color, style } = border || {};\n\n\tconst fallbackColor =\n\t\t!! style && style !== 'none' ? COLORS.gray[ 300 ] : undefined;\n\n\treturn css`\n\t\tborder-style: ${ style === 'none' ? 'solid' : style };\n\t\tborder-color: ${ color || fallbackColor };\n\t`;\n};\n\nexport const colorIndicatorWrapper = (\n\tborder?: Border,\n\tsize?: 'default' | '__unstable-large'\n) => {\n\tconst { style } = border || {};\n\n\treturn css`\n\t\tborder-radius: 9999px;\n\t\tborder: 2px solid transparent;\n\t\t${ style ? colorIndicatorBorder( border ) : undefined }\n\t\twidth: ${ size === '__unstable-large' ? '24px' : '22px' };\n\t\theight: ${ size === '__unstable-large' ? '24px' : '22px' };\n\t\tpadding: ${ size === '__unstable-large' ? '2px' : '1px' };\n\n\t\t/*\n\t\t * ColorIndicator\n\t\t *\n\t\t * The transparent colors used here ensure visibility of the indicator\n\t\t * over the active state of the border control dropdown's toggle button.\n\t\t */\n\t\t& > span {\n\t\t\theight: ${ space( 4 ) };\n\t\t\twidth: ${ space( 4 ) };\n\t\t\tbackground: linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);\n\t\t}\n\t`;\n};\n\n// Must equal $color-palette-circle-size from:\n// @wordpress/components/src/circular-option-picker/style.scss\nconst swatchSize = 28;\nconst swatchGap = 12;\n\nexport const borderControlPopoverControls = css`\n\twidth: ${ swatchSize * 6 + swatchGap * 5 }px;\n\n\t> div:first-of-type > ${ StyledLabel } {\n\t\tmargin-bottom: 0;\n\t\t${ labelStyles }\n\t}\n\n\t&& ${ StyledLabel } + button:not( .has-text ) {\n\t\tmin-width: 24px;\n\t\tpadding: 0;\n\t}\n`;\n\nexport const borderControlPopoverContent = css``;\nexport const borderColorIndicator = css``;\n\nexport const resetButton = css`\n\tjustify-content: center;\n\twidth: 100%;\n\n\t/* Override button component styling */\n\t&& {\n\t\tborder-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 200 ] };\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t\theight: 46px;\n\t}\n`;\n\nexport const borderControlStylePicker = css`\n\t${ StyledLabel } {\n\t\t${ labelStyles }\n\t}\n`;\n\nexport const borderStyleButton = css`\n\t&&&&& {\n\t\tmin-width: 30px;\n\t\twidth: 30px;\n\t\theight: 30px;\n\t\tpadding: 3px;\n\t}\n`;\n\nexport const borderSlider = () => css`\n\tflex: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A;AAEnC,MAAMC,WAAW,oBAAGjC,UAAG,sDAMbC,aAAM,CAACC,WAAW,aAAYC,aAAM,CAACoB,IAAI,CAAE,GAAG,CAAE,yEAAA/B,OAAA,CAAAC,GAAA,CAAAC,QAAA,iDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,moNAKhE;AAACc,OAAA,CAAAyB,WAAA,GAAAA,WAAA;AAEK,MAAMC,wBAAwB,oBAAGlC,UAAG,EACvC8B,8BAAW,OACVvC,WAAW,UAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,8DAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,moNAEf;AAACc,OAAA,CAAA0B,wBAAA,GAAAA,wBAAA;AAEK,MAAMC,iBAAiB,GAAA3C,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA,CAO7B;AAACkB,OAAA,CAAA2B,iBAAA,GAAAA,iBAAA;AAEK,MAAMC,YAAY,GAAGA,CAAA,sBAAMpC,UAAG,mBAEjC,IAAAgB,UAAG,EAAE;EAAEqB,WAAW,EAAE,IAAAX,YAAK,EAAE,CAAE;AAAE,CAAE,CAAC,CAAC,CAAC,SAAAlC,OAAA,CAAAC,GAAA,CAAAC,QAAA,kDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,moNACvC;AAACc,OAAA,CAAA4B,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"names":["_react","require","_utils","_space","_baseControlStyles","_unitControlStyles","_EMOTION_STRINGIFIED_CSS_ERROR__","labelStyles","process","env","NODE_ENV","name","styles","map","toString","focusBoxShadow","css","CONFIG","controlBoxShadowFocus","borderControl","boxSizingReset","exports","innerWrapper","UnitControlWrapper","UnitSelect","wrapperWidth","wrapperHeight","size","borderControlDropdown","rtl","borderRadius","borderWidth","COLORS","ui","border","borderFocus","colorIndicatorBorder","color","style","fallbackColor","gray","undefined","colorIndicatorWrapper","space","swatchSize","swatchGap","borderControlPopoverControls","StyledLabel","borderControlPopoverContent","borderColorIndicator","resetButton","borderControlStylePicker","borderStyleButton","borderSlider","marginRight"],"sources":["@wordpress/components/src/border-control/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG, boxSizingReset, rtl } from '../utils';\nimport { space } from '../ui/utils/space';\nimport { StyledLabel } from '../base-control/styles/base-control-styles';\nimport {\n\tValueInput as UnitControlWrapper,\n\tUnitSelect,\n} from '../unit-control/styles/unit-control-styles';\n\nimport type { Border } from './types';\n\nconst labelStyles = css`\n\tfont-weight: 500;\n`;\n\nconst focusBoxShadow = css`\n\tbox-shadow: inset ${ CONFIG.controlBoxShadowFocus };\n`;\n\nexport const borderControl = css`\n\tborder: 0;\n\tpadding: 0;\n\tmargin: 0;\n\t${ boxSizingReset }\n`;\n\nexport const innerWrapper = () => css`\n\t${ UnitControlWrapper } {\n\t\tflex: 1 1 40%;\n\t}\n\t&& ${ UnitSelect } {\n\t\t/* Prevent unit select forcing min height larger than its UnitControl */\n\t\tmin-height: 0;\n\t}\n`;\n\n/*\n * This style is only applied to the UnitControl wrapper when the border width\n * field should be a set width. Omitting this allows the UnitControl &\n * RangeControl to share the available width in a 40/60 split respectively.\n */\nexport const wrapperWidth = css`\n\t${ UnitControlWrapper } {\n\t\t/* Force the UnitControl's set width. */\n\t\tflex: 0 0 auto;\n\t}\n`;\n\nexport const wrapperHeight = ( size?: 'default' | '__unstable-large' ) => {\n\treturn css`\n\t\theight: ${ size === '__unstable-large' ? '40px' : '30px' };\n\t`;\n};\n\nexport const borderControlDropdown = (\n\tsize?: 'default' | '__unstable-large'\n) => css`\n\tbackground: #fff;\n\n\t&& > button {\n\t\t/*\n\t\t * Override button component styles to fit within BorderControl\n\t\t * regardless of size.\n\t\t */\n\t\theight: ${ size === '__unstable-large' ? '40px' : '30px' };\n\t\twidth: ${ size === '__unstable-large' ? '40px' : '30px' };\n\t\tpadding: 0;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\t${ rtl(\n\t\t\t{ borderRadius: `2px 0 0 2px` },\n\t\t\t{ borderRadius: `0 2px 2px 0` }\n\t\t)() }\n\t\tborder: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };\n\n\t\t&:focus,\n\t\t&:hover:not( :disabled ) {\n\t\t\t${ focusBoxShadow }\n\t\t\tborder-color: ${ COLORS.ui.borderFocus };\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t}\n\t}\n`;\n\nexport const colorIndicatorBorder = ( border?: Border ) => {\n\tconst { color, style } = border || {};\n\n\tconst fallbackColor =\n\t\t!! style && style !== 'none' ? COLORS.gray[ 300 ] : undefined;\n\n\treturn css`\n\t\tborder-style: ${ style === 'none' ? 'solid' : style };\n\t\tborder-color: ${ color || fallbackColor };\n\t`;\n};\n\nexport const colorIndicatorWrapper = (\n\tborder?: Border,\n\tsize?: 'default' | '__unstable-large'\n) => {\n\tconst { style } = border || {};\n\n\treturn css`\n\t\tborder-radius: 9999px;\n\t\tborder: 2px solid transparent;\n\t\t${ style ? colorIndicatorBorder( border ) : undefined }\n\t\twidth: ${ size === '__unstable-large' ? '24px' : '22px' };\n\t\theight: ${ size === '__unstable-large' ? '24px' : '22px' };\n\t\tpadding: ${ size === '__unstable-large' ? '2px' : '1px' };\n\n\t\t/*\n\t\t * ColorIndicator\n\t\t *\n\t\t * The transparent colors used here ensure visibility of the indicator\n\t\t * over the active state of the border control dropdown's toggle button.\n\t\t */\n\t\t& > span {\n\t\t\theight: ${ space( 4 ) };\n\t\t\twidth: ${ space( 4 ) };\n\t\t\tbackground: linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);\n\t\t}\n\t`;\n};\n\n// Must equal $color-palette-circle-size from:\n// @wordpress/components/src/circular-option-picker/style.scss\nconst swatchSize = 28;\nconst swatchGap = 12;\n\nexport const borderControlPopoverControls = css`\n\twidth: ${ swatchSize * 6 + swatchGap * 5 }px;\n\n\t> div:first-of-type > ${ StyledLabel } {\n\t\tmargin-bottom: 0;\n\t\t${ labelStyles }\n\t}\n\n\t&& ${ StyledLabel } + button:not( .has-text ) {\n\t\tmin-width: 24px;\n\t\tpadding: 0;\n\t}\n`;\n\nexport const borderControlPopoverContent = css``;\nexport const borderColorIndicator = css``;\n\nexport const resetButton = css`\n\tjustify-content: center;\n\twidth: 100%;\n\n\t/* Override button component styling */\n\t&& {\n\t\tborder-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 400 ] };\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t\theight: 40px;\n\t}\n`;\n\nexport const borderControlStylePicker = css`\n\t${ StyledLabel } {\n\t\t${ labelStyles }\n\t}\n`;\n\nexport const borderStyleButton = css`\n\t&&&&& {\n\t\tmin-width: 32px;\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tpadding: 4px;\n\t}\n`;\n\nexport const borderSlider = () => css`\n\tflex: 1 1 60%;\n\t${ rtl( { marginRight: space( 3 ) } )() }\n`;\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AAGoD,SAAAK,iCAAA;AAIpD,MAAMC,WAAW,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA,CAEhB;AAED,MAAMS,cAAc,oBAAGC,UAAG,uBACJC,aAAM,CAACC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AAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA,CAO7B;AAACe,OAAA,CAAA+B,iBAAA,GAAAA,iBAAA;AAEK,MAAMC,YAAY,GAAGA,CAAA,sBAAMrC,UAAG,mBAEjC,IAAAa,UAAG,EAAE;EAAEyB,WAAW,EAAE,IAAAX,YAAK,EAAE,CAAE;AAAE,CAAE,CAAC,CAAC,CAAC,SAAAnC,OAAA,CAAAC,GAAA,CAAAC,QAAA,kDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,umNACvC;AAACW,OAAA,CAAAgC,YAAA,GAAAA,YAAA"}
@@ -70,7 +70,7 @@ function Tooltip({
70
70
  */
71
71
  return (0, _element.createElement)(_tooltip.default, {
72
72
  text: text,
73
- position: "top"
73
+ placement: "top"
74
74
  }, (0, _element.createElement)("div", null, children));
75
75
  }
76
76
  //# sourceMappingURL=unit-control.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_tooltip","_interopRequireDefault","_boxControlStyles","noop","BoxUnitControl","isFirst","isLast","isOnly","onHoverOn","onHoverOff","label","value","props","bindHoverGesture","useHover","event","state","hovering","_element","createElement","UnitControlWrapper","Tooltip","text","UnitControl","className","isPressEnterToChange","isResetValueOnUnitChange","children","default","position"],"sources":["@wordpress/components/src/box-control/unit-control.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { useHover } from '@use-gesture/react';\n\n/**\n * Internal dependencies\n */\nimport BaseTooltip from '../tooltip';\nimport { UnitControlWrapper, UnitControl } from './styles/box-control-styles';\nimport type { BoxUnitControlProps } from './types';\n\nconst noop = () => {};\n\nexport default function BoxUnitControl( {\n\tisFirst,\n\tisLast,\n\tisOnly,\n\tonHoverOn = noop,\n\tonHoverOff = noop,\n\tlabel,\n\tvalue,\n\t...props\n}: BoxUnitControlProps ) {\n\tconst bindHoverGesture = useHover( ( { event, ...state } ) => {\n\t\tif ( state.hovering ) {\n\t\t\tonHoverOn( event, state );\n\t\t} else {\n\t\t\tonHoverOff( event, state );\n\t\t}\n\t} );\n\n\treturn (\n\t\t<UnitControlWrapper { ...bindHoverGesture() }>\n\t\t\t<Tooltip text={ label }>\n\t\t\t\t<UnitControl\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tclassName=\"component-box-control__unit-control\"\n\t\t\t\t\tisFirst={ isFirst }\n\t\t\t\t\tisLast={ isLast }\n\t\t\t\t\tisOnly={ isOnly }\n\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\tisResetValueOnUnitChange={ false }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\t{ ...props }\n\t\t\t\t/>\n\t\t\t</Tooltip>\n\t\t</UnitControlWrapper>\n\t);\n}\n\nfunction Tooltip( {\n\tchildren,\n\ttext,\n}: {\n\tchildren: JSX.Element;\n\ttext?: string;\n} ) {\n\tif ( ! text ) return children;\n\n\t/**\n\t * Wrapping the children in a `<div />` as Tooltip as it attempts\n\t * to render the <UnitControl />. Using a plain `<div />` appears to\n\t * resolve this issue.\n\t *\n\t * Originally discovered and referenced here:\n\t * https://github.com/WordPress/gutenberg/pull/24966#issuecomment-685875026\n\t */\n\treturn (\n\t\t<BaseTooltip text={ text } position=\"top\">\n\t\t\t<div>{ children }</div>\n\t\t</BaseTooltip>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAKA,MAAMI,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAEN,SAASC,cAAcA,CAAE;EACvCC,OAAO;EACPC,MAAM;EACNC,MAAM;EACNC,SAAS,GAAGL,IAAI;EAChBM,UAAU,GAAGN,IAAI;EACjBO,KAAK;EACLC,KAAK;EACL,GAAGC;AACiB,CAAC,EAAG;EACxB,MAAMC,gBAAgB,GAAG,IAAAC,eAAQ,EAAE,CAAE;IAAEC,KAAK;IAAE,GAAGC;EAAM,CAAC,KAAM;IAC7D,IAAKA,KAAK,CAACC,QAAQ,EAAG;MACrBT,SAAS,CAAEO,KAAK,EAAEC,KAAM,CAAC;IAC1B,CAAC,MAAM;MACNP,UAAU,CAAEM,KAAK,EAAEC,KAAM,CAAC;IAC3B;EACD,CAAE,CAAC;EAEH,OACC,IAAAE,QAAA,CAAAC,aAAA,EAACjB,iBAAA,CAAAkB,kBAAkB;IAAA,GAAMP,gBAAgB,CAAC;EAAC,GAC1C,IAAAK,QAAA,CAAAC,aAAA,EAACE,OAAO;IAACC,IAAI,EAAGZ;EAAO,GACtB,IAAAQ,QAAA,CAAAC,aAAA,EAACjB,iBAAA,CAAAqB,WAAW;IACX,cAAab,KAAO;IACpBc,SAAS,EAAC,qCAAqC;IAC/CnB,OAAO,EAAGA,OAAS;IACnBC,MAAM,EAAGA,MAAQ;IACjBC,MAAM,EAAGA,MAAQ;IACjBkB,oBAAoB;IACpBC,wBAAwB,EAAG,KAAO;IAClCf,KAAK,EAAGA,KAAO;IAAA,GACVC;EAAK,CACV,CACO,CACU,CAAC;AAEvB;AAEA,SAASS,OAAOA,CAAE;EACjBM,QAAQ;EACRL;AAID,CAAC,EAAG;EACH,IAAK,CAAEA,IAAI,EAAG,OAAOK,QAAQ;;EAE7B;AACD;AACA;AACA;AACA;AACA;AACA;AACA;EACC,OACC,IAAAT,QAAA,CAAAC,aAAA,EAACnB,QAAA,CAAA4B,OAAW;IAACN,IAAI,EAAGA,IAAM;IAACO,QAAQ,EAAC;EAAK,GACxC,IAAAX,QAAA,CAAAC,aAAA,eAAOQ,QAAe,CACV,CAAC;AAEhB"}
1
+ {"version":3,"names":["_react","require","_tooltip","_interopRequireDefault","_boxControlStyles","noop","BoxUnitControl","isFirst","isLast","isOnly","onHoverOn","onHoverOff","label","value","props","bindHoverGesture","useHover","event","state","hovering","_element","createElement","UnitControlWrapper","Tooltip","text","UnitControl","className","isPressEnterToChange","isResetValueOnUnitChange","children","default","placement"],"sources":["@wordpress/components/src/box-control/unit-control.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { useHover } from '@use-gesture/react';\n\n/**\n * Internal dependencies\n */\nimport BaseTooltip from '../tooltip';\nimport { UnitControlWrapper, UnitControl } from './styles/box-control-styles';\nimport type { BoxUnitControlProps } from './types';\n\nconst noop = () => {};\n\nexport default function BoxUnitControl( {\n\tisFirst,\n\tisLast,\n\tisOnly,\n\tonHoverOn = noop,\n\tonHoverOff = noop,\n\tlabel,\n\tvalue,\n\t...props\n}: BoxUnitControlProps ) {\n\tconst bindHoverGesture = useHover( ( { event, ...state } ) => {\n\t\tif ( state.hovering ) {\n\t\t\tonHoverOn( event, state );\n\t\t} else {\n\t\t\tonHoverOff( event, state );\n\t\t}\n\t} );\n\n\treturn (\n\t\t<UnitControlWrapper { ...bindHoverGesture() }>\n\t\t\t<Tooltip text={ label }>\n\t\t\t\t<UnitControl\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tclassName=\"component-box-control__unit-control\"\n\t\t\t\t\tisFirst={ isFirst }\n\t\t\t\t\tisLast={ isLast }\n\t\t\t\t\tisOnly={ isOnly }\n\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\tisResetValueOnUnitChange={ false }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\t{ ...props }\n\t\t\t\t/>\n\t\t\t</Tooltip>\n\t\t</UnitControlWrapper>\n\t);\n}\n\nfunction Tooltip( {\n\tchildren,\n\ttext,\n}: {\n\tchildren: JSX.Element;\n\ttext?: string;\n} ) {\n\tif ( ! text ) return children;\n\n\t/**\n\t * Wrapping the children in a `<div />` as Tooltip as it attempts\n\t * to render the <UnitControl />. Using a plain `<div />` appears to\n\t * resolve this issue.\n\t *\n\t * Originally discovered and referenced here:\n\t * https://github.com/WordPress/gutenberg/pull/24966#issuecomment-685875026\n\t */\n\treturn (\n\t\t<BaseTooltip text={ text } placement=\"top\">\n\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AID,CAAC,EAAG;EACH,IAAK,CAAEA,IAAI,EAAG,OAAOK,QAAQ;;EAE7B;AACD;AACA;AACA;AACA;AACA;AACA;AACA;EACC,OACC,IAAAT,QAAA,CAAAC,aAAA,EAACnB,QAAA,CAAA4B,OAAW;IAACN,IAAI,EAAGA,IAAM;IAACO,SAAS,EAAC;EAAK,GACzC,IAAAX,QAAA,CAAAC,aAAA,eAAOQ,QAAe,CACV,CAAC;AAEhB"}
@@ -14,6 +14,7 @@ var _compose = require("@wordpress/compose");
14
14
  var _tooltip = _interopRequireDefault(require("../tooltip"));
15
15
  var _icon = _interopRequireDefault(require("../icon"));
16
16
  var _visuallyHidden = require("../visually-hidden");
17
+ var _utils = require("../popover/utils");
17
18
  /**
18
19
  * External dependencies
19
20
  */
@@ -187,6 +188,13 @@ function UnforwardedButton(props, ref) {
187
188
  ...additionalProps,
188
189
  ...commonProps
189
190
  }, elementChildren);
191
+
192
+ // Convert legacy `position` values to be used with the new `placement` prop
193
+ let computedPlacement;
194
+ // if `tooltipPosition` is defined, compute value to `placement`
195
+ if (tooltipPosition !== undefined) {
196
+ computedPlacement = (0, _utils.positionToPlacement)(tooltipPosition);
197
+ }
190
198
  if (!shouldShowTooltip) {
191
199
  return (0, _element.createElement)(_element.Fragment, null, element, describedBy && (0, _element.createElement)(_visuallyHidden.VisuallyHidden, null, (0, _element.createElement)("span", {
192
200
  id: descriptionId
@@ -195,7 +203,7 @@ function UnforwardedButton(props, ref) {
195
203
  return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_tooltip.default, {
196
204
  text: children?.length && describedBy ? describedBy : label,
197
205
  shortcut: shortcut,
198
- position: tooltipPosition
206
+ placement: computedPlacement
199
207
  }, element), describedBy && (0, _element.createElement)(_visuallyHidden.VisuallyHidden, null, (0, _element.createElement)("span", {
200
208
  id: descriptionId
201
209
  }, describedBy)));
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_deprecated","_compose","_tooltip","_icon","_visuallyHidden","disabledEventsOnDisabledButton","useDeprecatedProps","isDefault","isPrimary","isSecondary","isTertiary","isLink","isSmall","size","variant","otherProps","computedSize","computedVariant","_computedSize","_computedVariant","_computedVariant2","_computedVariant3","_computedVariant4","deprecated","since","alternative","version","_computedVariant5","UnforwardedButton","props","ref","__next40pxDefaultSize","isPressed","isBusy","isDestructive","className","disabled","icon","iconPosition","iconSize","showTooltip","tooltipPosition","shortcut","label","children","text","__experimentalIsFocusable","isFocusable","describedBy","buttonOrAnchorProps","href","target","additionalProps","undefined","instanceId","useInstanceId","Button","hasChildren","Array","isArray","classes","classnames","trulyDisabled","Tag","buttonProps","type","anchorProps","disabledEvent","event","stopPropagation","preventDefault","shouldShowTooltip","length","descriptionId","describedById","commonProps","elementChildren","createElement","Fragment","default","element","VisuallyHidden","id","position","forwardRef","exports","_default"],"sources":["@wordpress/components/src/button/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type {\n\tComponentPropsWithoutRef,\n\tForwardedRef,\n\tHTMLAttributes,\n\tMouseEvent,\n\tReactElement,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../tooltip';\nimport Icon from '../icon';\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { ButtonProps, DeprecatedButtonProps } from './types';\n\nconst disabledEventsOnDisabledButton = [ 'onMouseDown', 'onClick' ] as const;\n\nfunction useDeprecatedProps( {\n\tisDefault,\n\tisPrimary,\n\tisSecondary,\n\tisTertiary,\n\tisLink,\n\tisSmall,\n\tsize,\n\tvariant,\n\t...otherProps\n}: ButtonProps & DeprecatedButtonProps ): ButtonProps {\n\tlet computedSize = size;\n\tlet computedVariant = variant;\n\n\tif ( isSmall ) {\n\t\tcomputedSize ??= 'small';\n\t}\n\n\tif ( isPrimary ) {\n\t\tcomputedVariant ??= 'primary';\n\t}\n\n\tif ( isTertiary ) {\n\t\tcomputedVariant ??= 'tertiary';\n\t}\n\n\tif ( isSecondary ) {\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isDefault ) {\n\t\tdeprecated( 'Button isDefault prop', {\n\t\t\tsince: '5.4',\n\t\t\talternative: 'variant=\"secondary\"',\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isLink ) {\n\t\tcomputedVariant ??= 'link';\n\t}\n\n\treturn {\n\t\t...otherProps,\n\t\tsize: computedSize,\n\t\tvariant: computedVariant,\n\t};\n}\n\nexport function UnforwardedButton(\n\tprops: ButtonProps,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\t__next40pxDefaultSize,\n\t\tisPressed,\n\t\tisBusy,\n\t\tisDestructive,\n\t\tclassName,\n\t\tdisabled,\n\t\ticon,\n\t\ticonPosition = 'left',\n\t\ticonSize,\n\t\tshowTooltip,\n\t\ttooltipPosition,\n\t\tshortcut,\n\t\tlabel,\n\t\tchildren,\n\t\tsize = 'default',\n\t\ttext,\n\t\tvariant,\n\t\t__experimentalIsFocusable: isFocusable,\n\t\tdescribedBy,\n\t\t...buttonOrAnchorProps\n\t} = useDeprecatedProps( props );\n\n\tconst { href, target, ...additionalProps } =\n\t\t'href' in buttonOrAnchorProps\n\t\t\t? buttonOrAnchorProps\n\t\t\t: { href: undefined, target: undefined, ...buttonOrAnchorProps };\n\n\tconst instanceId = useInstanceId(\n\t\tButton,\n\t\t'components-button__description'\n\t);\n\n\tconst hasChildren =\n\t\t( 'string' === typeof children && !! children ) ||\n\t\t( Array.isArray( children ) &&\n\t\t\tchildren?.[ 0 ] &&\n\t\t\tchildren[ 0 ] !== null &&\n\t\t\t// Tooltip should not considered as a child\n\t\t\tchildren?.[ 0 ]?.props?.className !== 'components-tooltip' );\n\n\tconst classes = classnames( 'components-button', className, {\n\t\t'is-next-40px-default-size': __next40pxDefaultSize,\n\t\t'is-secondary': variant === 'secondary',\n\t\t'is-primary': variant === 'primary',\n\t\t'is-small': size === 'small',\n\t\t'is-compact': size === 'compact',\n\t\t'is-tertiary': variant === 'tertiary',\n\t\t'is-pressed': isPressed,\n\t\t'is-busy': isBusy,\n\t\t'is-link': variant === 'link',\n\t\t'is-destructive': isDestructive,\n\t\t'has-text': !! icon && hasChildren,\n\t\t'has-icon': !! icon,\n\t} );\n\n\tconst trulyDisabled = disabled && ! isFocusable;\n\tconst Tag = href !== undefined && ! trulyDisabled ? 'a' : 'button';\n\tconst buttonProps: ComponentPropsWithoutRef< 'button' > =\n\t\tTag === 'button'\n\t\t\t? {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tdisabled: trulyDisabled,\n\t\t\t\t\t'aria-pressed': isPressed,\n\t\t\t }\n\t\t\t: {};\n\tconst anchorProps: ComponentPropsWithoutRef< 'a' > =\n\t\tTag === 'a' ? { href, target } : {};\n\n\tif ( disabled && isFocusable ) {\n\t\t// In this case, the button will be disabled, but still focusable and\n\t\t// perceivable by screen reader users.\n\t\tbuttonProps[ 'aria-disabled' ] = true;\n\t\tanchorProps[ 'aria-disabled' ] = true;\n\n\t\tfor ( const disabledEvent of disabledEventsOnDisabledButton ) {\n\t\t\tadditionalProps[ disabledEvent ] = ( event: MouseEvent ) => {\n\t\t\t\tif ( event ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\n\t// Should show the tooltip if...\n\tconst shouldShowTooltip =\n\t\t! trulyDisabled &&\n\t\t// An explicit tooltip is passed or...\n\t\t( ( showTooltip && label ) ||\n\t\t\t// There's a shortcut or...\n\t\t\tshortcut ||\n\t\t\t// There's a label and...\n\t\t\t( !! label &&\n\t\t\t\t// The children are empty and...\n\t\t\t\t! ( children as string | ReactElement[] )?.length &&\n\t\t\t\t// The tooltip is not explicitly disabled.\n\t\t\t\tfalse !== showTooltip ) );\n\n\tconst descriptionId = describedBy ? instanceId : undefined;\n\n\tconst describedById =\n\t\tadditionalProps[ 'aria-describedby' ] || descriptionId;\n\n\tconst commonProps = {\n\t\tclassName: classes,\n\t\t'aria-label': additionalProps[ 'aria-label' ] || label,\n\t\t'aria-describedby': describedById,\n\t\tref,\n\t};\n\n\tconst elementChildren = (\n\t\t<>\n\t\t\t{ icon && iconPosition === 'left' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ text && <>{ text }</> }\n\t\t\t{ icon && iconPosition === 'right' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ children }\n\t\t</>\n\t);\n\n\tconst element =\n\t\tTag === 'a' ? (\n\t\t\t<a\n\t\t\t\t{ ...anchorProps }\n\t\t\t\t{ ...( additionalProps as HTMLAttributes< HTMLAnchorElement > ) }\n\t\t\t\t{ ...commonProps }\n\t\t\t>\n\t\t\t\t{ elementChildren }\n\t\t\t</a>\n\t\t) : (\n\t\t\t<button\n\t\t\t\t{ ...buttonProps }\n\t\t\t\t{ ...( additionalProps as HTMLAttributes< HTMLButtonElement > ) }\n\t\t\t\t{ ...commonProps }\n\t\t\t>\n\t\t\t\t{ elementChildren }\n\t\t\t</button>\n\t\t);\n\n\tif ( ! shouldShowTooltip ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ element }\n\t\t\t\t{ describedBy && (\n\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t<span id={ descriptionId }>{ describedBy }</span>\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Tooltip\n\t\t\t\ttext={\n\t\t\t\t\t( children as string | ReactElement[] )?.length &&\n\t\t\t\t\tdescribedBy\n\t\t\t\t\t\t? describedBy\n\t\t\t\t\t\t: label\n\t\t\t\t}\n\t\t\t\tshortcut={ shortcut }\n\t\t\t\tposition={ tooltipPosition }\n\t\t\t>\n\t\t\t\t{ element }\n\t\t\t</Tooltip>\n\t\t\t{ describedBy && (\n\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t<span id={ descriptionId }>{ describedBy }</span>\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n/**\n * Lets users take actions and make choices with a single click or tap.\n *\n * ```jsx\n * import { Button } from '@wordpress/components';\n * const Mybutton = () => (\n * <Button\n * variant=\"primary\"\n * onClick={ handleClick }\n * >\n * Click here\n * </Button>\n * );\n * ```\n */\nexport const Button = forwardRef( UnforwardedButton );\nexport default Button;\n"],"mappings":";;;;;;;;;AAgBA,IAAAA,QAAA,GAAAC,OAAA;AAbA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAYA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AAxBA;AACA;AACA;;AAUA;AACA;AACA;;AAKA;AACA;AACA;;AAMA,MAAMQ,8BAA8B,GAAG,CAAE,aAAa,EAAE,SAAS,CAAW;AAE5E,SAASC,kBAAkBA,CAAE;EAC5BC,SAAS;EACTC,SAAS;EACTC,WAAW;EACXC,UAAU;EACVC,MAAM;EACNC,OAAO;EACPC,IAAI;EACJC,OAAO;EACP,GAAGC;AACiC,CAAC,EAAgB;EACrD,IAAIC,YAAY,GAAGH,IAAI;EACvB,IAAII,eAAe,GAAGH,OAAO;EAE7B,IAAKF,OAAO,EAAG;IAAA,IAAAM,aAAA;IACd,CAAAA,aAAA,GAAAF,YAAY,cAAAE,aAAA,cAAAA,aAAA,GAAZF,YAAY,GAAK,OAAO;EACzB;EAEA,IAAKR,SAAS,EAAG;IAAA,IAAAW,gBAAA;IAChB,CAAAA,gBAAA,GAA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U;IACrByC,QAAQ,EAAG1C;EAAiB,GAE1BuC,OACM,CAAC,EACRhC,WAAW,IACZ,IAAApD,QAAA,CAAAiF,aAAA,EAACzE,eAAA,CAAA6E,cAAc,QACd,IAAArF,QAAA,CAAAiF,aAAA;IAAMK,EAAE,EAAGT;EAAe,GAAGzB,WAAmB,CACjC,CAEhB,CAAC;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMQ,MAAM,GAAG,IAAA4B,mBAAU,EAAExD,iBAAkB,CAAC;AAACyD,OAAA,CAAA7B,MAAA,GAAAA,MAAA;AAAA,IAAA8B,QAAA,GACvC9B,MAAM;AAAA6B,OAAA,CAAAN,OAAA,GAAAO,QAAA"}
1
+ {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_deprecated","_compose","_tooltip","_icon","_visuallyHidden","_utils","disabledEventsOnDisabledButton","useDeprecatedProps","isDefault","isPrimary","isSecondary","isTertiary","isLink","isSmall","size","variant","otherProps","computedSize","computedVariant","_computedSize","_computedVariant","_computedVariant2","_computedVariant3","_computedVariant4","deprecated","since","alternative","version","_computedVariant5","UnforwardedButton","props","ref","__next40pxDefaultSize","isPressed","isBusy","isDestructive","className","disabled","icon","iconPosition","iconSize","showTooltip","tooltipPosition","shortcut","label","children","text","__experimentalIsFocusable","isFocusable","describedBy","buttonOrAnchorProps","href","target","additionalProps","undefined","instanceId","useInstanceId","Button","hasChildren","Array","isArray","classes","classnames","trulyDisabled","Tag","buttonProps","type","anchorProps","disabledEvent","event","stopPropagation","preventDefault","shouldShowTooltip","length","descriptionId","describedById","commonProps","elementChildren","createElement","Fragment","default","element","computedPlacement","positionToPlacement","VisuallyHidden","id","placement","forwardRef","exports","_default"],"sources":["@wordpress/components/src/button/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type {\n\tComponentPropsWithoutRef,\n\tForwardedRef,\n\tHTMLAttributes,\n\tMouseEvent,\n\tReactElement,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../tooltip';\nimport Icon from '../icon';\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { ButtonProps, DeprecatedButtonProps } from './types';\nimport { positionToPlacement } from '../popover/utils';\n\nconst disabledEventsOnDisabledButton = [ 'onMouseDown', 'onClick' ] as const;\n\nfunction useDeprecatedProps( {\n\tisDefault,\n\tisPrimary,\n\tisSecondary,\n\tisTertiary,\n\tisLink,\n\tisSmall,\n\tsize,\n\tvariant,\n\t...otherProps\n}: ButtonProps & DeprecatedButtonProps ): ButtonProps {\n\tlet computedSize = size;\n\tlet computedVariant = variant;\n\n\tif ( isSmall ) {\n\t\tcomputedSize ??= 'small';\n\t}\n\n\tif ( isPrimary ) {\n\t\tcomputedVariant ??= 'primary';\n\t}\n\n\tif ( isTertiary ) {\n\t\tcomputedVariant ??= 'tertiary';\n\t}\n\n\tif ( isSecondary ) {\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isDefault ) {\n\t\tdeprecated( 'Button isDefault prop', {\n\t\t\tsince: '5.4',\n\t\t\talternative: 'variant=\"secondary\"',\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isLink ) {\n\t\tcomputedVariant ??= 'link';\n\t}\n\n\treturn {\n\t\t...otherProps,\n\t\tsize: computedSize,\n\t\tvariant: computedVariant,\n\t};\n}\n\nexport function UnforwardedButton(\n\tprops: ButtonProps,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\t__next40pxDefaultSize,\n\t\tisPressed,\n\t\tisBusy,\n\t\tisDestructive,\n\t\tclassName,\n\t\tdisabled,\n\t\ticon,\n\t\ticonPosition = 'left',\n\t\ticonSize,\n\t\tshowTooltip,\n\t\ttooltipPosition,\n\t\tshortcut,\n\t\tlabel,\n\t\tchildren,\n\t\tsize = 'default',\n\t\ttext,\n\t\tvariant,\n\t\t__experimentalIsFocusable: isFocusable,\n\t\tdescribedBy,\n\t\t...buttonOrAnchorProps\n\t} = useDeprecatedProps( props );\n\n\tconst { href, target, ...additionalProps } =\n\t\t'href' in buttonOrAnchorProps\n\t\t\t? buttonOrAnchorProps\n\t\t\t: { href: undefined, target: undefined, ...buttonOrAnchorProps };\n\n\tconst instanceId = useInstanceId(\n\t\tButton,\n\t\t'components-button__description'\n\t);\n\n\tconst hasChildren =\n\t\t( 'string' === typeof children && !! children ) ||\n\t\t( Array.isArray( children ) &&\n\t\t\tchildren?.[ 0 ] &&\n\t\t\tchildren[ 0 ] !== null &&\n\t\t\t// Tooltip should not considered as a child\n\t\t\tchildren?.[ 0 ]?.props?.className !== 'components-tooltip' );\n\n\tconst classes = classnames( 'components-button', className, {\n\t\t'is-next-40px-default-size': __next40pxDefaultSize,\n\t\t'is-secondary': variant === 'secondary',\n\t\t'is-primary': variant === 'primary',\n\t\t'is-small': size === 'small',\n\t\t'is-compact': size === 'compact',\n\t\t'is-tertiary': variant === 'tertiary',\n\t\t'is-pressed': isPressed,\n\t\t'is-busy': isBusy,\n\t\t'is-link': variant === 'link',\n\t\t'is-destructive': isDestructive,\n\t\t'has-text': !! icon && hasChildren,\n\t\t'has-icon': !! icon,\n\t} );\n\n\tconst trulyDisabled = disabled && ! isFocusable;\n\tconst Tag = href !== undefined && ! trulyDisabled ? 'a' : 'button';\n\tconst buttonProps: ComponentPropsWithoutRef< 'button' > =\n\t\tTag === 'button'\n\t\t\t? {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tdisabled: trulyDisabled,\n\t\t\t\t\t'aria-pressed': isPressed,\n\t\t\t }\n\t\t\t: {};\n\tconst anchorProps: ComponentPropsWithoutRef< 'a' > =\n\t\tTag === 'a' ? { href, target } : {};\n\n\tif ( disabled && isFocusable ) {\n\t\t// In this case, the button will be disabled, but still focusable and\n\t\t// perceivable by screen reader users.\n\t\tbuttonProps[ 'aria-disabled' ] = true;\n\t\tanchorProps[ 'aria-disabled' ] = true;\n\n\t\tfor ( const disabledEvent of disabledEventsOnDisabledButton ) {\n\t\t\tadditionalProps[ disabledEvent ] = ( event: MouseEvent ) => {\n\t\t\t\tif ( event ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\n\t// Should show the tooltip if...\n\tconst shouldShowTooltip =\n\t\t! trulyDisabled &&\n\t\t// An explicit tooltip is passed or...\n\t\t( ( showTooltip && label ) ||\n\t\t\t// There's a shortcut or...\n\t\t\tshortcut ||\n\t\t\t// There's a label and...\n\t\t\t( !! label &&\n\t\t\t\t// The children are empty and...\n\t\t\t\t! ( children as string | ReactElement[] )?.length &&\n\t\t\t\t// The tooltip is not explicitly disabled.\n\t\t\t\tfalse !== showTooltip ) );\n\n\tconst descriptionId = describedBy ? instanceId : undefined;\n\n\tconst describedById =\n\t\tadditionalProps[ 'aria-describedby' ] || descriptionId;\n\n\tconst commonProps = {\n\t\tclassName: classes,\n\t\t'aria-label': additionalProps[ 'aria-label' ] || label,\n\t\t'aria-describedby': describedById,\n\t\tref,\n\t};\n\n\tconst elementChildren = (\n\t\t<>\n\t\t\t{ icon && iconPosition === 'left' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ text && <>{ text }</> }\n\t\t\t{ icon && iconPosition === 'right' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ children }\n\t\t</>\n\t);\n\n\tconst element =\n\t\tTag === 'a' ? (\n\t\t\t<a\n\t\t\t\t{ ...anchorProps }\n\t\t\t\t{ ...( additionalProps as HTMLAttributes< HTMLAnchorElement > ) }\n\t\t\t\t{ ...commonProps }\n\t\t\t>\n\t\t\t\t{ elementChildren }\n\t\t\t</a>\n\t\t) : (\n\t\t\t<button\n\t\t\t\t{ ...buttonProps }\n\t\t\t\t{ ...( additionalProps as HTMLAttributes< HTMLButtonElement > ) }\n\t\t\t\t{ ...commonProps }\n\t\t\t>\n\t\t\t\t{ elementChildren }\n\t\t\t</button>\n\t\t);\n\n\t// Convert legacy `position` values to be used with the new `placement` prop\n\tlet computedPlacement;\n\t// if `tooltipPosition` is defined, compute value to `placement`\n\tif ( tooltipPosition !== undefined ) {\n\t\tcomputedPlacement = positionToPlacement( tooltipPosition );\n\t}\n\n\tif ( ! shouldShowTooltip ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ element }\n\t\t\t\t{ describedBy && (\n\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t<span id={ descriptionId }>{ describedBy }</span>\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Tooltip\n\t\t\t\ttext={\n\t\t\t\t\t( children as string | ReactElement[] )?.length &&\n\t\t\t\t\tdescribedBy\n\t\t\t\t\t\t? describedBy\n\t\t\t\t\t\t: label\n\t\t\t\t}\n\t\t\t\tshortcut={ shortcut }\n\t\t\t\tplacement={ computedPlacement }\n\t\t\t>\n\t\t\t\t{ element }\n\t\t\t</Tooltip>\n\t\t\t{ describedBy && (\n\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t<span id={ descriptionId }>{ describedBy }</span>\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n/**\n * Lets users take actions and make choices with a single click or tap.\n *\n * ```jsx\n * import { Button } from '@wordpress/components';\n * const Mybutton = () => (\n * <Button\n * variant=\"primary\"\n * onClick={ handleClick }\n * >\n * Click here\n * </Button>\n * );\n * ```\n */\nexport const Button = forwardRef( UnforwardedButton );\nexport default Button;\n"],"mappings":";;;;;;;;;AAgBA,IAAAA,QAAA,GAAAC,OAAA;AAbA,IAAAC,WAAA,GAAAC,sBAAA,CAAA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O,MAAMQ,MAAM,GAAG,IAAA8B,mBAAU,EAAE1D,iBAAkB,CAAC;AAAC2D,OAAA,CAAA/B,MAAA,GAAAA,MAAA;AAAA,IAAAgC,QAAA,GACvChC,MAAM;AAAA+B,OAAA,CAAAR,OAAA,GAAAS,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/button/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { Props as IconProps } from '../icon';\nimport type { PopoverProps } from '../popover/types';\nimport type { WordPressComponentProps } from '../ui/context/wordpress-component';\n\nexport type ButtonProps =\n\t| WordPressComponentProps< ButtonAsButtonProps, 'button', false >\n\t| WordPressComponentProps< ButtonAsAnchorProps, 'a', false >;\n\nexport type ButtonAsButtonProps = BaseButtonProps & _ButtonProps;\nexport type ButtonAsAnchorProps = BaseButtonProps & AnchorProps;\n\ntype BaseButtonProps = {\n\t/**\n\t * Start opting into the larger default height that will become the\n\t * default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n\t/**\n\t * The button's children.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * An accessible description for the button.\n\t */\n\tdescribedBy?: string;\n\t/**\n\t * Whether the button is focused.\n\t */\n\tfocus?: boolean;\n\t/**\n\t * If provided, renders an Icon component inside the button.\n\t */\n\ticon?: IconProps[ 'icon' ];\n\t/**\n\t * If provided with `icon`, sets the position of icon relative to the `text`.\n\t *\n\t * @default 'left'\n\t */\n\ticonPosition?: 'left' | 'right';\n\t/**\n\t * If provided with `icon`, sets the icon size.\n\t * Please refer to the Icon component for more details regarding\n\t * the default value of its `size` prop.\n\t */\n\ticonSize?: IconProps[ 'size' ];\n\t/**\n\t * Indicates activity while a action is being performed.\n\t */\n\tisBusy?: boolean;\n\t/**\n\t * Renders a red text-based button style to indicate destructive behavior.\n\t */\n\tisDestructive?: boolean;\n\t/**\n\t * Renders a pressed button style.\n\t */\n\tisPressed?: boolean;\n\t// TODO: Deprecate officially (add console warning and move to DeprecatedButtonProps).\n\t/**\n\t * Decreases the size of the button.\n\t *\n\t * Deprecated in favor of the `size` prop. If both props are defined, the `size` prop will take precedence.\n\t *\n\t * @deprecated Use the `'small'` value on the `size` prop instead.\n\t */\n\tisSmall?: boolean;\n\t/**\n\t * Sets the `aria-label` of the component, if none is provided.\n\t * Sets the Tooltip content if `showTooltip` is provided.\n\t */\n\tlabel?: string;\n\t/**\n\t * If provided with `showTooltip`, appends the Shortcut label to the tooltip content.\n\t * If an object is provided, it should contain `display` and `ariaLabel` keys.\n\t */\n\tshortcut?: string | { display: string; ariaLabel: string };\n\t/**\n\t * If provided, renders a Tooltip component for the button.\n\t */\n\tshowTooltip?: boolean;\n\t/**\n\t * The size of the button.\n\t *\n\t * - `'default'`: For normal text-label buttons, unless it is a toggle button.\n\t * - `'compact'`: For toggle buttons, icon buttons, and buttons when used in context of either.\n\t * - `'small'`: For icon buttons associated with more advanced or auxiliary features.\n\t *\n\t * If the deprecated `isSmall` prop is also defined, this prop will take precedence.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'compact' | 'small';\n\t/**\n\t * If provided, displays the given text inside the button. If the button contains children elements, the text is displayed before them.\n\t */\n\ttext?: string;\n\t/**\n\t * If provided with `showTooltip`, sets the position of the tooltip.\n\t * Please refer to the Tooltip component for more details regarding the defaults.\n\t */\n\ttooltipPosition?: PopoverProps[ 'position' ];\n\t/**\n\t * Specifies the button's style.\n\t * The accepted values are:\n\t * 'primary' (the primary button styles)\n\t * 'secondary' (the default button styles)\n\t * 'tertiary' (the text-based button styles)\n\t * 'link' (the link button styles)\n\t */\n\tvariant?: 'primary' | 'secondary' | 'tertiary' | 'link';\n\t/**\n\t * Whether this is focusable.\n\t */\n\t__experimentalIsFocusable?: boolean;\n};\n\ntype _ButtonProps = {\n\t/**\n\t * Whether the button is disabled.\n\t * If `true`, this will force a `button` element to be rendered.\n\t */\n\tdisabled?: boolean;\n};\n\ntype AnchorProps = {\n\t/**\n\t * Whether the button is disabled.\n\t * If `true`, this will force a `button` element to be rendered.\n\t */\n\tdisabled?: false;\n\t/**\n\t * If provided, renders `a` instead of `button`.\n\t */\n\thref: string;\n\t/**\n\t * If provided with `href`, sets the `target` attribute to the `a`.\n\t */\n\ttarget?: string;\n};\n\nexport type DeprecatedButtonProps = {\n\tisDefault?: boolean;\n\tisLink?: boolean;\n\tisPrimary?: boolean;\n\tisSecondary?: boolean;\n\tisTertiary?: boolean;\n};\n\nexport type DeprecatedIconButtonProps = {\n\tlabelPosition: ButtonProps[ 'tooltipPosition' ];\n\tshowTooltip?: boolean;\n\tsize: ButtonProps[ 'iconSize' ];\n\tlabel: ButtonProps[ 'label' ];\n\ttooltip: ButtonProps[ 'label' ];\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/button/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { Props as IconProps } from '../icon';\nimport type { PopoverProps } from '../popover/types';\nimport type { WordPressComponentProps } from '../ui/context/wordpress-component';\n\nexport type ButtonProps =\n\t| WordPressComponentProps< ButtonAsButtonProps, 'button', false >\n\t| WordPressComponentProps< ButtonAsAnchorProps, 'a', false >;\n\nexport type ButtonAsButtonProps = BaseButtonProps & _ButtonProps;\nexport type ButtonAsAnchorProps = BaseButtonProps & AnchorProps;\n\ntype BaseButtonProps = {\n\t/**\n\t * Start opting into the larger default height that will become the\n\t * default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n\t/**\n\t * The button's children.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * An accessible description for the button.\n\t */\n\tdescribedBy?: string;\n\t/**\n\t * If provided, renders an Icon component inside the button.\n\t */\n\ticon?: IconProps[ 'icon' ];\n\t/**\n\t * If provided with `icon`, sets the position of icon relative to the `text`.\n\t *\n\t * @default 'left'\n\t */\n\ticonPosition?: 'left' | 'right';\n\t/**\n\t * If provided with `icon`, sets the icon size.\n\t * Please refer to the Icon component for more details regarding\n\t * the default value of its `size` prop.\n\t */\n\ticonSize?: IconProps[ 'size' ];\n\t/**\n\t * Indicates activity while a action is being performed.\n\t */\n\tisBusy?: boolean;\n\t/**\n\t * Renders a red text-based button style to indicate destructive behavior.\n\t */\n\tisDestructive?: boolean;\n\t/**\n\t * Renders a pressed button style.\n\t */\n\tisPressed?: boolean;\n\t// TODO: Deprecate officially (add console warning and move to DeprecatedButtonProps).\n\t/**\n\t * Decreases the size of the button.\n\t *\n\t * Deprecated in favor of the `size` prop. If both props are defined, the `size` prop will take precedence.\n\t *\n\t * @deprecated Use the `'small'` value on the `size` prop instead.\n\t */\n\tisSmall?: boolean;\n\t/**\n\t * Sets the `aria-label` of the component, if none is provided.\n\t * Sets the Tooltip content if `showTooltip` is provided.\n\t */\n\tlabel?: string;\n\t/**\n\t * If provided with `showTooltip`, appends the Shortcut label to the tooltip content.\n\t * If an object is provided, it should contain `display` and `ariaLabel` keys.\n\t */\n\tshortcut?: string | { display: string; ariaLabel: string };\n\t/**\n\t * If provided, renders a Tooltip component for the button.\n\t */\n\tshowTooltip?: boolean;\n\t/**\n\t * The size of the button.\n\t *\n\t * - `'default'`: For normal text-label buttons, unless it is a toggle button.\n\t * - `'compact'`: For toggle buttons, icon buttons, and buttons when used in context of either.\n\t * - `'small'`: For icon buttons associated with more advanced or auxiliary features.\n\t *\n\t * If the deprecated `isSmall` prop is also defined, this prop will take precedence.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'compact' | 'small';\n\t/**\n\t * If provided, displays the given text inside the button. If the button contains children elements, the text is displayed before them.\n\t */\n\ttext?: string;\n\t/**\n\t * If provided with `showTooltip`, sets the position of the tooltip.\n\t * Please refer to the Tooltip component for more details regarding the defaults.\n\t */\n\ttooltipPosition?: PopoverProps[ 'position' ];\n\t/**\n\t * Specifies the button's style.\n\t * The accepted values are:\n\t * 'primary' (the primary button styles)\n\t * 'secondary' (the default button styles)\n\t * 'tertiary' (the text-based button styles)\n\t * 'link' (the link button styles)\n\t */\n\tvariant?: 'primary' | 'secondary' | 'tertiary' | 'link';\n\t/**\n\t * Whether this is focusable.\n\t */\n\t__experimentalIsFocusable?: boolean;\n};\n\ntype _ButtonProps = {\n\t/**\n\t * Whether the button is disabled.\n\t * If `true`, this will force a `button` element to be rendered.\n\t */\n\tdisabled?: boolean;\n};\n\ntype AnchorProps = {\n\t/**\n\t * Whether the button is disabled.\n\t * If `true`, this will force a `button` element to be rendered.\n\t */\n\tdisabled?: false;\n\t/**\n\t * If provided, renders `a` instead of `button`.\n\t */\n\thref: string;\n\t/**\n\t * If provided with `href`, sets the `target` attribute to the `a`.\n\t */\n\ttarget?: string;\n};\n\nexport type DeprecatedButtonProps = {\n\tisDefault?: boolean;\n\tisLink?: boolean;\n\tisPrimary?: boolean;\n\tisSecondary?: boolean;\n\tisTertiary?: boolean;\n};\n\nexport type DeprecatedIconButtonProps = {\n\tlabelPosition: ButtonProps[ 'tooltipPosition' ];\n\tshowTooltip?: boolean;\n\tsize: ButtonProps[ 'iconSize' ];\n\tlabel: ButtonProps[ 'label' ];\n\ttooltip: ButtonProps[ 'label' ];\n};\n"],"mappings":""}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.ButtonAction = ButtonAction;
8
+ exports.DropdownLinkAction = DropdownLinkAction;
9
+ var _element = require("@wordpress/element");
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _button = _interopRequireDefault(require("../button"));
12
+ var _dropdown = _interopRequireDefault(require("../dropdown"));
13
+ /**
14
+ * External dependencies
15
+ */
16
+
17
+ /**
18
+ * Internal dependencies
19
+ */
20
+
21
+ function DropdownLinkAction({
22
+ buttonProps,
23
+ className,
24
+ dropdownProps,
25
+ linkText
26
+ }) {
27
+ return (0, _element.createElement)(_dropdown.default, {
28
+ className: (0, _classnames.default)('components-circular-option-picker__dropdown-link-action', className),
29
+ renderToggle: ({
30
+ isOpen,
31
+ onToggle
32
+ }) => (0, _element.createElement)(_button.default, {
33
+ "aria-expanded": isOpen,
34
+ "aria-haspopup": "true",
35
+ onClick: onToggle,
36
+ variant: "link",
37
+ ...buttonProps
38
+ }, linkText),
39
+ ...dropdownProps
40
+ });
41
+ }
42
+ function ButtonAction({
43
+ className,
44
+ children,
45
+ ...additionalProps
46
+ }) {
47
+ return (0, _element.createElement)(_button.default, {
48
+ className: (0, _classnames.default)('components-circular-option-picker__clear', className),
49
+ variant: "tertiary",
50
+ ...additionalProps
51
+ }, children);
52
+ }
53
+ //# sourceMappingURL=circular-option-picker-actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_button","_dropdown","DropdownLinkAction","buttonProps","className","dropdownProps","linkText","_element","createElement","default","classnames","renderToggle","isOpen","onToggle","onClick","variant","ButtonAction","children","additionalProps"],"sources":["@wordpress/components/src/circular-option-picker/circular-option-picker-actions.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Dropdown from '../dropdown';\nimport type { DropdownLinkActionProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { ButtonAsButtonProps } from '../button/types';\n\nexport function DropdownLinkAction( {\n\tbuttonProps,\n\tclassName,\n\tdropdownProps,\n\tlinkText,\n}: DropdownLinkActionProps ) {\n\treturn (\n\t\t<Dropdown\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-circular-option-picker__dropdown-link-action',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t{ ...buttonProps }\n\t\t\t\t>\n\t\t\t\t\t{ linkText }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\t{ ...dropdownProps }\n\t\t/>\n\t);\n}\n\nexport function ButtonAction( {\n\tclassName,\n\tchildren,\n\t...additionalProps\n}: WordPressComponentProps< ButtonAsButtonProps, 'button', false > ) {\n\treturn (\n\t\t<Button\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-circular-option-picker__clear',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tvariant=\"tertiary\"\n\t\t\t{ ...additionalProps }\n\t\t>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAOO,SAASG,kBAAkBA,CAAE;EACnCC,WAAW;EACXC,SAAS;EACTC,aAAa;EACbC;AACwB,CAAC,EAAG;EAC5B,OACC,IAAAC,QAAA,CAAAC,aAAA,EAACP,SAAA,CAAAQ,OAAQ;IACRL,SAAS,EAAG,IAAAM,mBAAU,EACrB,yDAAyD,EACzDN,SACD,CAAG;IACHO,YAAY,EAAGA,CAAE;MAAEC,MAAM;MAAEC;IAAS,CAAC,KACpC,IAAAN,QAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,OAAM;MACN,iBAAgBG,MAAQ;MACxB,iBAAc,MAAM;MACpBE,OAAO,EAAGD,QAAU;MACpBE,OAAO,EAAC,MAAM;MAAA,GACTZ;IAAW,GAEdG,QACK,CACN;IAAA,GACED;EAAa,CAClB,CAAC;AAEJ;AAEO,SAASW,YAAYA,CAAE;EAC7BZ,SAAS;EACTa,QAAQ;EACR,GAAGC;AAC6D,CAAC,EAAG;EACpE,OACC,IAAAX,QAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,OAAM;IACNL,SAAS,EAAG,IAAAM,mBAAU,EACrB,0CAA0C,EAC1CN,SACD,CAAG;IACHW,OAAO,EAAC,UAAU;IAAA,GACbG;EAAe,GAElBD,QACK,CAAC;AAEX"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CircularOptionPickerContext = void 0;
7
+ var _element = require("@wordpress/element");
8
+ /**
9
+ * WordPress dependencies
10
+ */
11
+
12
+ const CircularOptionPickerContext = (0, _element.createContext)({});
13
+ exports.CircularOptionPickerContext = CircularOptionPickerContext;
14
+ //# sourceMappingURL=circular-option-picker-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_element","require","CircularOptionPickerContext","createContext","exports"],"sources":["@wordpress/components/src/circular-option-picker/circular-option-picker-context.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { CircularOptionPickerContextProps } from './types';\n\nexport const CircularOptionPickerContext =\n\tcreateContext< CircularOptionPickerContextProps >( {} );\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAQO,MAAMC,2BAA2B,GACvC,IAAAC,sBAAa,EAAsC,CAAC,CAAE,CAAC;AAACC,OAAA,CAAAF,2BAAA,GAAAA,2BAAA"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.OptionGroup = OptionGroup;
8
+ var _element = require("@wordpress/element");
9
+ var _classnames = _interopRequireDefault(require("classnames"));
10
+ /**
11
+ * External dependencies
12
+ */
13
+
14
+ function OptionGroup({
15
+ className,
16
+ options,
17
+ ...additionalProps
18
+ }) {
19
+ const role = 'aria-label' in additionalProps || 'aria-labelledby' in additionalProps ? 'group' : undefined;
20
+ return (0, _element.createElement)("div", {
21
+ ...additionalProps,
22
+ role: role,
23
+ className: (0, _classnames.default)('components-circular-option-picker__option-group', 'components-circular-option-picker__swatches', className)
24
+ }, options);
25
+ }
26
+ //# sourceMappingURL=circular-option-picker-option-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","OptionGroup","className","options","additionalProps","role","undefined","_element","createElement","classnames"],"sources":["@wordpress/components/src/circular-option-picker/circular-option-picker-option-group.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport type { OptionGroupProps } from './types';\n\nexport function OptionGroup( {\n\tclassName,\n\toptions,\n\t...additionalProps\n}: OptionGroupProps ) {\n\tconst role =\n\t\t'aria-label' in additionalProps || 'aria-labelledby' in additionalProps\n\t\t\t? 'group'\n\t\t\t: undefined;\n\n\treturn (\n\t\t<div\n\t\t\t{ ...additionalProps }\n\t\t\trole={ role }\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-circular-option-picker__option-group',\n\t\t\t\t'components-circular-option-picker__swatches',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ options }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAHA;AACA;AACA;;AAQO,SAASC,WAAWA,CAAE;EAC5BC,SAAS;EACTC,OAAO;EACP,GAAGC;AACc,CAAC,EAAG;EACrB,MAAMC,IAAI,GACT,YAAY,IAAID,eAAe,IAAI,iBAAiB,IAAIA,eAAe,GACpE,OAAO,GACPE,SAAS;EAEb,OACC,IAAAC,QAAA,CAAAC,aAAA;IAAA,GACMJ,eAAe;IACpBC,IAAI,EAAGA,IAAM;IACbH,SAAS,EAAG,IAAAO,mBAAU,EACrB,iDAAiD,EACjD,6CAA6C,EAC7CP,SACD;EAAG,GAEDC,OACE,CAAC;AAER"}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.Option = Option;
8
+ var _element = require("@wordpress/element");
9
+ var _classnames = _interopRequireDefault(require("classnames"));
10
+ var _compose = require("@wordpress/compose");
11
+ var _icons = require("@wordpress/icons");
12
+ var _circularOptionPickerContext = require("./circular-option-picker-context");
13
+ var _button = _interopRequireDefault(require("../button"));
14
+ var _composite = require("../composite");
15
+ var _tooltip = _interopRequireDefault(require("../tooltip"));
16
+ /**
17
+ * External dependencies
18
+ */
19
+
20
+ /**
21
+ * WordPress dependencies
22
+ */
23
+
24
+ /**
25
+ * Internal dependencies
26
+ */
27
+
28
+ const hasSelectedOption = new Map();
29
+ function UnforwardedOptionAsButton(props, forwardedRef) {
30
+ return (0, _element.createElement)(_button.default, {
31
+ ...props,
32
+ ref: forwardedRef
33
+ });
34
+ }
35
+ const OptionAsButton = (0, _element.forwardRef)(UnforwardedOptionAsButton);
36
+ function UnforwardedOptionAsOption(props, forwardedRef) {
37
+ const {
38
+ id,
39
+ className,
40
+ isSelected,
41
+ context,
42
+ ...additionalProps
43
+ } = props;
44
+ const {
45
+ isComposite,
46
+ ..._compositeState
47
+ } = context;
48
+ const compositeState = _compositeState;
49
+ const {
50
+ baseId,
51
+ currentId,
52
+ setCurrentId
53
+ } = compositeState;
54
+ (0, _element.useEffect)(() => {
55
+ // If we call `setCurrentId` here, it doesn't update for other
56
+ // Option renders in the same pass. So we have to store our own
57
+ // map to make sure that we only set the first selected option.
58
+ // We still need to check `currentId` because the control will
59
+ // update this as the user moves around, and that state should
60
+ // be maintained as the group gains and loses focus.
61
+ if (isSelected && !currentId && !hasSelectedOption.get(baseId)) {
62
+ hasSelectedOption.set(baseId, true);
63
+ setCurrentId(id);
64
+ }
65
+ }, [baseId, currentId, id, isSelected, setCurrentId]);
66
+ return (0, _element.createElement)(_composite.CompositeItem, {
67
+ ...additionalProps,
68
+ ...compositeState,
69
+ as: _button.default,
70
+ id: id
71
+ // Ideally we'd let the underlying `Button` component
72
+ // handle this by passing `isPressed` as a prop.
73
+ // Unfortunately doing so also sets `aria-pressed` as
74
+ // an attribute on the element, which is incompatible
75
+ // with `role="option"`, and there is no way at this
76
+ // point to override that behaviour.
77
+ ,
78
+ className: (0, _classnames.default)(className, {
79
+ 'is-pressed': isSelected
80
+ }),
81
+ role: "option",
82
+ "aria-selected": !!isSelected,
83
+ ref: forwardedRef
84
+ });
85
+ }
86
+ const OptionAsOption = (0, _element.forwardRef)(UnforwardedOptionAsOption);
87
+ function Option({
88
+ className,
89
+ isSelected,
90
+ selectedIconProps = {},
91
+ tooltipText,
92
+ ...additionalProps
93
+ }) {
94
+ const compositeContext = (0, _element.useContext)(_circularOptionPickerContext.CircularOptionPickerContext);
95
+ const {
96
+ isComposite,
97
+ baseId
98
+ } = compositeContext;
99
+ const id = (0, _compose.useInstanceId)(Option, baseId || 'components-circular-option-picker__option');
100
+ const commonProps = {
101
+ id,
102
+ className: 'components-circular-option-picker__option',
103
+ ...additionalProps
104
+ };
105
+ const optionControl = isComposite ? (0, _element.createElement)(OptionAsOption, {
106
+ ...commonProps,
107
+ context: compositeContext,
108
+ isSelected: isSelected
109
+ }) : (0, _element.createElement)(OptionAsButton, {
110
+ ...commonProps,
111
+ isPressed: isSelected
112
+ });
113
+ return (0, _element.createElement)("div", {
114
+ className: (0, _classnames.default)(className, 'components-circular-option-picker__option-wrapper')
115
+ }, tooltipText ? (0, _element.createElement)(_tooltip.default, {
116
+ text: tooltipText
117
+ }, optionControl) : optionControl, isSelected && (0, _element.createElement)(_icons.Icon, {
118
+ icon: _icons.check,
119
+ ...selectedIconProps
120
+ }));
121
+ }
122
+ //# sourceMappingURL=circular-option-picker-option.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_compose","_icons","_circularOptionPickerContext","_button","_composite","_tooltip","hasSelectedOption","Map","UnforwardedOptionAsButton","props","forwardedRef","createElement","default","ref","OptionAsButton","forwardRef","UnforwardedOptionAsOption","id","className","isSelected","context","additionalProps","isComposite","_compositeState","compositeState","baseId","currentId","setCurrentId","useEffect","get","set","CompositeItem","as","Button","classnames","role","OptionAsOption","Option","selectedIconProps","tooltipText","compositeContext","useContext","CircularOptionPickerContext","useInstanceId","commonProps","optionControl","isPressed","text","Icon","icon","check"],"sources":["@wordpress/components/src/circular-option-picker/circular-option-picker-option.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useContext, useEffect } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport Button from '../button';\nimport { CompositeItem } from '../composite';\nimport Tooltip from '../tooltip';\nimport type {\n\tOptionProps,\n\tCircularOptionPickerCompositeState,\n\tCircularOptionPickerContextProps,\n} from './types';\n\nconst hasSelectedOption = new Map();\n\nfunction UnforwardedOptionAsButton(\n\tprops: {\n\t\tid?: string;\n\t\tclassName?: string;\n\t\tisPressed?: boolean;\n\t},\n\tforwardedRef: ForwardedRef< any >\n) {\n\treturn <Button { ...props } ref={ forwardedRef }></Button>;\n}\n\nconst OptionAsButton = forwardRef( UnforwardedOptionAsButton );\n\nfunction UnforwardedOptionAsOption(\n\tprops: {\n\t\tid: string;\n\t\tclassName?: string;\n\t\tisSelected?: boolean;\n\t\tcontext: CircularOptionPickerContextProps;\n\t},\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { id, className, isSelected, context, ...additionalProps } = props;\n\tconst { isComposite, ..._compositeState } = context;\n\tconst compositeState =\n\t\t_compositeState as CircularOptionPickerCompositeState;\n\tconst { baseId, currentId, setCurrentId } = compositeState;\n\n\tuseEffect( () => {\n\t\t// If we call `setCurrentId` here, it doesn't update for other\n\t\t// Option renders in the same pass. So we have to store our own\n\t\t// map to make sure that we only set the first selected option.\n\t\t// We still need to check `currentId` because the control will\n\t\t// update this as the user moves around, and that state should\n\t\t// be maintained as the group gains and loses focus.\n\t\tif ( isSelected && ! currentId && ! hasSelectedOption.get( baseId ) ) {\n\t\t\thasSelectedOption.set( baseId, true );\n\t\t\tsetCurrentId( id );\n\t\t}\n\t}, [ baseId, currentId, id, isSelected, setCurrentId ] );\n\n\treturn (\n\t\t<CompositeItem\n\t\t\t{ ...additionalProps }\n\t\t\t{ ...compositeState }\n\t\t\tas={ Button }\n\t\t\tid={ id }\n\t\t\t// Ideally we'd let the underlying `Button` component\n\t\t\t// handle this by passing `isPressed` as a prop.\n\t\t\t// Unfortunately doing so also sets `aria-pressed` as\n\t\t\t// an attribute on the element, which is incompatible\n\t\t\t// with `role=\"option\"`, and there is no way at this\n\t\t\t// point to override that behaviour.\n\t\t\tclassName={ classnames( className, {\n\t\t\t\t'is-pressed': isSelected,\n\t\t\t} ) }\n\t\t\trole=\"option\"\n\t\t\taria-selected={ !! isSelected }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n}\n\nconst OptionAsOption = forwardRef( UnforwardedOptionAsOption );\n\nexport function Option( {\n\tclassName,\n\tisSelected,\n\tselectedIconProps = {},\n\ttooltipText,\n\t...additionalProps\n}: OptionProps ) {\n\tconst compositeContext = useContext( CircularOptionPickerContext );\n\tconst { isComposite, baseId } = compositeContext;\n\tconst id = useInstanceId(\n\t\tOption,\n\t\tbaseId || 'components-circular-option-picker__option'\n\t);\n\n\tconst commonProps = {\n\t\tid,\n\t\tclassName: 'components-circular-option-picker__option',\n\t\t...additionalProps,\n\t};\n\n\tconst optionControl = isComposite ? (\n\t\t<OptionAsOption\n\t\t\t{ ...commonProps }\n\t\t\tcontext={ compositeContext }\n\t\t\tisSelected={ isSelected }\n\t\t/>\n\t) : (\n\t\t<OptionAsButton { ...commonProps } isPressed={ isSelected } />\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'components-circular-option-picker__option-wrapper'\n\t\t\t) }\n\t\t>\n\t\t\t{ tooltipText ? (\n\t\t\t\t<Tooltip text={ tooltipText }>{ optionControl }</Tooltip>\n\t\t\t) : (\n\t\t\t\toptionControl\n\t\t\t) }\n\t\t\t{ isSelected && <Icon icon={ check } { ...selectedIconProps } /> }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAUA,IAAAA,QAAA,GAAAC,OAAA;AAPA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAMA,IAAAG,QAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,4BAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAN,sBAAA,CAAAF,OAAA;AAnBA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;;AAWA,MAAMS,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAAC;AAEnC,SAASC,yBAAyBA,CACjCC,KAIC,EACDC,YAAiC,EAChC;EACD,OAAO,IAAAd,QAAA,CAAAe,aAAA,EAACR,OAAA,CAAAS,OAAM;IAAA,GAAMH,KAAK;IAAGI,GAAG,EAAGH;EAAc,CAAS,CAAC;AAC3D;AAEA,MAAMI,cAAc,GAAG,IAAAC,mBAAU,EAAEP,yBAA0B,CAAC;AAE9D,SAASQ,yBAAyBA,CACjCP,KAKC,EACDC,YAAiC,EAChC;EACD,MAAM;IAAEO,EAAE;IAAEC,SAAS;IAAEC,UAAU;IAAEC,OAAO;IAAE,GAAGC;EAAgB,CAAC,GAAGZ,KAAK;EACxE,MAAM;IAAEa,WAAW;IAAE,GAAGC;EAAgB,CAAC,GAAGH,OAAO;EACnD,MAAMI,cAAc,GACnBD,eAAqD;EACtD,M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