@wordpress/components 23.6.0 → 23.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/CHANGELOG.md +32 -4
  2. package/build/angle-picker-control/angle-circle.js +1 -4
  3. package/build/angle-picker-control/angle-circle.js.map +1 -1
  4. package/build/angle-picker-control/index.js +10 -22
  5. package/build/angle-picker-control/index.js.map +1 -1
  6. package/build/angle-picker-control/styles/angle-picker-control-styles.js +24 -15
  7. package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  8. package/build/animate/index.js +27 -19
  9. package/build/animate/index.js.map +1 -1
  10. package/build/animate/types.js.map +1 -0
  11. package/build/box-control/axial-input-controls.js.map +1 -1
  12. package/build/color-picker/color-input.js +0 -4
  13. package/build/color-picker/color-input.js.map +1 -1
  14. package/build/color-picker/component.js +5 -4
  15. package/build/color-picker/component.js.map +1 -1
  16. package/build/color-picker/hex-input.js.map +1 -1
  17. package/build/color-picker/hsl-input.js.map +1 -1
  18. package/build/color-picker/input-with-slider.js.map +1 -1
  19. package/build/color-picker/legacy-adapter.js.map +1 -1
  20. package/build/color-picker/picker.js.map +1 -1
  21. package/build/color-picker/rgb-input.js.map +1 -1
  22. package/build/color-picker/use-deprecated-props.js.map +1 -1
  23. package/build/custom-gradient-picker/constants.js +1 -1
  24. package/build/custom-gradient-picker/constants.js.map +1 -1
  25. package/build/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
  26. package/build/custom-gradient-picker/gradient-bar/control-points.js +9 -5
  27. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  28. package/build/custom-gradient-picker/gradient-bar/index.js +14 -9
  29. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  30. package/build/custom-gradient-picker/gradient-bar/utils.js +34 -54
  31. package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  32. package/build/custom-gradient-picker/index.js +45 -16
  33. package/build/custom-gradient-picker/index.js.map +1 -1
  34. package/build/custom-gradient-picker/serializer.js +14 -4
  35. package/build/custom-gradient-picker/serializer.js.map +1 -1
  36. package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js +6 -6
  37. package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
  38. package/build/custom-gradient-picker/types.js +6 -0
  39. package/build/custom-gradient-picker/types.js.map +1 -0
  40. package/build/custom-gradient-picker/utils.js +17 -12
  41. package/build/custom-gradient-picker/utils.js.map +1 -1
  42. package/build/{color-list-picker → duotone-picker/color-list-picker}/index.js +5 -5
  43. package/build/duotone-picker/color-list-picker/index.js.map +1 -0
  44. package/build/duotone-picker/color-list-picker/types.js +6 -0
  45. package/build/duotone-picker/color-list-picker/types.js.map +1 -0
  46. package/build/duotone-picker/custom-duotone-bar.js.map +1 -1
  47. package/build/duotone-picker/duotone-picker.js +39 -2
  48. package/build/duotone-picker/duotone-picker.js.map +1 -1
  49. package/build/duotone-picker/duotone-swatch.js.map +1 -1
  50. package/build/duotone-picker/index.js.map +1 -1
  51. package/build/duotone-picker/types.js +6 -0
  52. package/build/duotone-picker/types.js.map +1 -0
  53. package/build/duotone-picker/utils.js +13 -11
  54. package/build/duotone-picker/utils.js.map +1 -1
  55. package/build/form-token-field/index.js +9 -3
  56. package/build/form-token-field/index.js.map +1 -1
  57. package/build/gradient-picker/index.js +61 -9
  58. package/build/gradient-picker/index.js.map +1 -1
  59. package/build/gradient-picker/types.js +6 -0
  60. package/build/gradient-picker/types.js.map +1 -0
  61. package/build/palette-edit/index.js +1 -2
  62. package/build/palette-edit/index.js.map +1 -1
  63. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  64. package/build/sandbox/index.native.js +80 -67
  65. package/build/sandbox/index.native.js.map +1 -1
  66. package/build/tab-panel/index.js +1 -1
  67. package/build/tab-panel/index.js.map +1 -1
  68. package/build/tools-panel/tools-panel/hook.js +45 -6
  69. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  70. package/build/utils/input/input-control.js +1 -1
  71. package/build/utils/input/input-control.js.map +1 -1
  72. package/build-module/angle-picker-control/angle-circle.js +1 -4
  73. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  74. package/build-module/angle-picker-control/index.js +12 -21
  75. package/build-module/angle-picker-control/index.js.map +1 -1
  76. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +20 -13
  77. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  78. package/build-module/animate/index.js +25 -17
  79. package/build-module/animate/index.js.map +1 -1
  80. package/build-module/box-control/axial-input-controls.js.map +1 -1
  81. package/build-module/color-picker/color-input.js +0 -4
  82. package/build-module/color-picker/color-input.js.map +1 -1
  83. package/build-module/color-picker/component.js +3 -3
  84. package/build-module/color-picker/component.js.map +1 -1
  85. package/build-module/color-picker/hex-input.js.map +1 -1
  86. package/build-module/color-picker/hsl-input.js.map +1 -1
  87. package/build-module/color-picker/input-with-slider.js.map +1 -1
  88. package/build-module/color-picker/legacy-adapter.js.map +1 -1
  89. package/build-module/color-picker/picker.js +4 -0
  90. package/build-module/color-picker/picker.js.map +1 -1
  91. package/build-module/color-picker/rgb-input.js.map +1 -1
  92. package/build-module/color-picker/use-deprecated-props.js.map +1 -1
  93. package/build-module/custom-gradient-picker/constants.js +1 -1
  94. package/build-module/custom-gradient-picker/constants.js.map +1 -1
  95. package/build-module/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
  96. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +9 -4
  97. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  98. package/build-module/custom-gradient-picker/gradient-bar/index.js +14 -8
  99. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  100. package/build-module/custom-gradient-picker/gradient-bar/utils.js +34 -54
  101. package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  102. package/build-module/custom-gradient-picker/index.js +44 -17
  103. package/build-module/custom-gradient-picker/index.js.map +1 -1
  104. package/build-module/custom-gradient-picker/serializer.js +14 -4
  105. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  106. package/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.js +6 -6
  107. package/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
  108. package/build-module/custom-gradient-picker/types.js +2 -0
  109. package/build-module/custom-gradient-picker/utils.js +17 -12
  110. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  111. package/build-module/{color-list-picker → duotone-picker/color-list-picker}/index.js +5 -5
  112. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -0
  113. package/build-module/duotone-picker/color-list-picker/types.js +2 -0
  114. package/build-module/duotone-picker/color-list-picker/types.js.map +1 -0
  115. package/build-module/duotone-picker/custom-duotone-bar.js.map +1 -1
  116. package/build-module/duotone-picker/duotone-picker.js +38 -2
  117. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  118. package/build-module/duotone-picker/duotone-swatch.js.map +1 -1
  119. package/build-module/duotone-picker/index.js.map +1 -1
  120. package/build-module/duotone-picker/types.js +2 -0
  121. package/build-module/duotone-picker/types.js.map +1 -0
  122. package/build-module/duotone-picker/utils.js +17 -11
  123. package/build-module/duotone-picker/utils.js.map +1 -1
  124. package/build-module/form-token-field/index.js +9 -4
  125. package/build-module/form-token-field/index.js.map +1 -1
  126. package/build-module/gradient-picker/index.js +61 -10
  127. package/build-module/gradient-picker/index.js.map +1 -1
  128. package/build-module/gradient-picker/types.js +2 -0
  129. package/build-module/gradient-picker/types.js.map +1 -0
  130. package/build-module/palette-edit/index.js +1 -2
  131. package/build-module/palette-edit/index.js.map +1 -1
  132. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  133. package/build-module/sandbox/index.native.js +70 -58
  134. package/build-module/sandbox/index.native.js.map +1 -1
  135. package/build-module/tab-panel/index.js +2 -2
  136. package/build-module/tab-panel/index.js.map +1 -1
  137. package/build-module/tools-panel/tools-panel/hook.js +45 -6
  138. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  139. package/build-module/utils/input/input-control.js +1 -1
  140. package/build-module/utils/input/input-control.js.map +1 -1
  141. package/build-style/style-rtl.css +40 -28
  142. package/build-style/style.css +42 -28
  143. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  144. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  145. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +5 -0
  146. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  147. package/build-types/animate/index.d.ts +27 -22
  148. package/build-types/animate/index.d.ts.map +1 -1
  149. package/build-types/animate/stories/index.d.ts +18 -0
  150. package/build-types/animate/stories/index.d.ts.map +1 -0
  151. package/build-types/animate/types.d.ts +30 -0
  152. package/build-types/animate/types.d.ts.map +1 -0
  153. package/build-types/color-picker/color-input.d.ts +1 -11
  154. package/build-types/color-picker/color-input.d.ts.map +1 -1
  155. package/build-types/color-picker/component.d.ts +8 -9
  156. package/build-types/color-picker/component.d.ts.map +1 -1
  157. package/build-types/color-picker/hex-input.d.ts +1 -10
  158. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  159. package/build-types/color-picker/hsl-input.d.ts +1 -10
  160. package/build-types/color-picker/hsl-input.d.ts.map +1 -1
  161. package/build-types/color-picker/input-with-slider.d.ts +1 -9
  162. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  163. package/build-types/color-picker/legacy-adapter.d.ts +1 -3
  164. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
  165. package/build-types/color-picker/picker.d.ts +4 -7
  166. package/build-types/color-picker/picker.d.ts.map +1 -1
  167. package/build-types/color-picker/rgb-input.d.ts +1 -10
  168. package/build-types/color-picker/rgb-input.d.ts.map +1 -1
  169. package/build-types/color-picker/stories/index.d.ts +19 -0
  170. package/build-types/color-picker/stories/index.d.ts.map +1 -0
  171. package/build-types/color-picker/test/index.d.ts +2 -0
  172. package/build-types/color-picker/test/index.d.ts.map +1 -0
  173. package/build-types/color-picker/types.d.ts +105 -1
  174. package/build-types/color-picker/types.d.ts.map +1 -1
  175. package/build-types/color-picker/use-deprecated-props.d.ts +1 -44
  176. package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
  177. package/build-types/custom-gradient-picker/constants.d.ts +8 -8
  178. package/build-types/custom-gradient-picker/constants.d.ts.map +1 -1
  179. package/build-types/custom-gradient-picker/gradient-bar/constants.d.ts +7 -7
  180. package/build-types/custom-gradient-picker/gradient-bar/constants.d.ts.map +1 -1
  181. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +5 -22
  182. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  183. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +3 -9
  184. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  185. package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts +2 -0
  186. package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts.map +1 -0
  187. package/build-types/custom-gradient-picker/gradient-bar/utils.d.ts +44 -92
  188. package/build-types/custom-gradient-picker/gradient-bar/utils.d.ts.map +1 -1
  189. package/build-types/custom-gradient-picker/index.d.ts +27 -6
  190. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  191. package/build-types/custom-gradient-picker/serializer.d.ts +13 -16
  192. package/build-types/custom-gradient-picker/serializer.d.ts.map +1 -1
  193. package/build-types/custom-gradient-picker/stories/index.d.ts +12 -0
  194. package/build-types/custom-gradient-picker/stories/index.d.ts.map +1 -0
  195. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +3 -2
  196. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -1
  197. package/build-types/custom-gradient-picker/test/serializer.d.ts +2 -0
  198. package/build-types/custom-gradient-picker/test/serializer.d.ts.map +1 -0
  199. package/build-types/custom-gradient-picker/types.d.ts +120 -0
  200. package/build-types/custom-gradient-picker/types.d.ts.map +1 -0
  201. package/build-types/custom-gradient-picker/utils.d.ts +12 -4
  202. package/build-types/custom-gradient-picker/utils.d.ts.map +1 -1
  203. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -0
  204. package/build-types/{color-list-picker → duotone-picker/color-list-picker}/types.d.ts +2 -2
  205. package/build-types/duotone-picker/color-list-picker/types.d.ts.map +1 -0
  206. package/build-types/duotone-picker/custom-duotone-bar.d.ts +6 -0
  207. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -0
  208. package/build-types/duotone-picker/duotone-picker.d.ts +38 -0
  209. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -0
  210. package/build-types/duotone-picker/duotone-swatch.d.ts +5 -0
  211. package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -0
  212. package/build-types/duotone-picker/index.d.ts +3 -0
  213. package/build-types/duotone-picker/index.d.ts.map +1 -0
  214. package/build-types/duotone-picker/stories/duotone-picker.d.ts +12 -0
  215. package/build-types/duotone-picker/stories/duotone-picker.d.ts.map +1 -0
  216. package/build-types/duotone-picker/stories/duotone-swatch.d.ts +14 -0
  217. package/build-types/duotone-picker/stories/duotone-swatch.d.ts.map +1 -0
  218. package/build-types/duotone-picker/types.d.ts +60 -0
  219. package/build-types/duotone-picker/types.d.ts.map +1 -0
  220. package/build-types/duotone-picker/utils.d.ts +52 -0
  221. package/build-types/duotone-picker/utils.d.ts.map +1 -0
  222. package/build-types/form-token-field/index.d.ts.map +1 -1
  223. package/build-types/form-token-field/types.d.ts +6 -0
  224. package/build-types/form-token-field/types.d.ts.map +1 -1
  225. package/build-types/gradient-picker/index.d.ts +49 -11
  226. package/build-types/gradient-picker/index.d.ts.map +1 -1
  227. package/build-types/gradient-picker/stories/index.d.ts +14 -0
  228. package/build-types/gradient-picker/stories/index.d.ts.map +1 -0
  229. package/build-types/gradient-picker/types.d.ts +87 -0
  230. package/build-types/gradient-picker/types.d.ts.map +1 -0
  231. package/build-types/palette-edit/index.d.ts.map +1 -1
  232. package/build-types/resizable-box/resize-tooltip/utils.d.ts +1 -1
  233. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  234. package/build-types/tab-panel/index.d.ts.map +1 -1
  235. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  236. package/build-types/tools-panel/types.d.ts +1 -0
  237. package/build-types/tools-panel/types.d.ts.map +1 -1
  238. package/build-types/utils/input/input-control.d.ts.map +1 -1
  239. package/package.json +19 -19
  240. package/src/angle-picker-control/angle-circle.tsx +0 -1
  241. package/src/angle-picker-control/index.tsx +14 -27
  242. package/src/angle-picker-control/styles/angle-picker-control-styles.tsx +16 -9
  243. package/src/animate/index.tsx +75 -0
  244. package/src/animate/stories/index.tsx +102 -0
  245. package/src/animate/types.ts +32 -0
  246. package/src/border-box-control/stories/index.tsx +1 -1
  247. package/src/box-control/axial-input-controls.tsx +1 -1
  248. package/src/circular-option-picker/style.scss +10 -0
  249. package/src/color-indicator/style.scss +1 -0
  250. package/src/color-picker/README.md +2 -2
  251. package/src/color-picker/color-input.tsx +1 -12
  252. package/src/color-picker/component.tsx +9 -18
  253. package/src/color-picker/hex-input.tsx +2 -7
  254. package/src/color-picker/hsl-input.tsx +2 -7
  255. package/src/color-picker/input-with-slider.tsx +1 -9
  256. package/src/color-picker/legacy-adapter.tsx +1 -2
  257. package/src/color-picker/picker.tsx +5 -6
  258. package/src/color-picker/rgb-input.tsx +2 -7
  259. package/src/color-picker/stories/index.tsx +51 -0
  260. package/src/color-picker/test/{index.js → index.tsx} +36 -18
  261. package/src/color-picker/types.ts +128 -1
  262. package/src/color-picker/use-deprecated-props.ts +2 -53
  263. package/src/combobox-control/stories/index.tsx +1 -1
  264. package/src/custom-gradient-picker/{constants.js → constants.ts} +2 -2
  265. package/src/custom-gradient-picker/gradient-bar/{control-points.js → control-points.tsx} +171 -134
  266. package/src/custom-gradient-picker/gradient-bar/{index.js → index.tsx} +32 -10
  267. package/src/custom-gradient-picker/gradient-bar/test/{utils.js → utils.ts} +58 -31
  268. package/src/custom-gradient-picker/gradient-bar/utils.ts +193 -0
  269. package/src/custom-gradient-picker/{index.js → index.tsx} +63 -22
  270. package/src/custom-gradient-picker/serializer.ts +82 -0
  271. package/src/custom-gradient-picker/stories/index.tsx +45 -0
  272. package/src/custom-gradient-picker/style.scss +25 -4
  273. package/src/custom-gradient-picker/test/{serializer.js → serializer.ts} +39 -33
  274. package/src/custom-gradient-picker/types.ts +137 -0
  275. package/src/custom-gradient-picker/{utils.js → utils.ts} +37 -22
  276. package/src/custom-select-control/test/index.js +6 -4
  277. package/src/{color-list-picker → duotone-picker/color-list-picker}/index.tsx +7 -6
  278. package/src/{color-list-picker → duotone-picker/color-list-picker}/types.ts +2 -2
  279. package/src/duotone-picker/{custom-duotone-bar.js → custom-duotone-bar.tsx} +7 -1
  280. package/src/duotone-picker/{duotone-picker.js → duotone-picker.tsx} +39 -2
  281. package/src/duotone-picker/{duotone-swatch.js → duotone-swatch.tsx} +2 -1
  282. package/src/duotone-picker/stories/{duotone-picker.js → duotone-picker.tsx} +15 -8
  283. package/src/duotone-picker/stories/{duotone-swatch.js → duotone-swatch.tsx} +9 -3
  284. package/src/duotone-picker/types.ts +61 -0
  285. package/src/duotone-picker/{utils.js → utils.ts} +29 -14
  286. package/src/flex/flex-item/README.md +1 -1
  287. package/src/form-token-field/README.md +1 -0
  288. package/src/form-token-field/index.tsx +10 -3
  289. package/src/form-token-field/style.scss +0 -7
  290. package/src/form-token-field/test/index.tsx +1 -0
  291. package/src/form-token-field/types.ts +6 -0
  292. package/src/gradient-picker/README.md +16 -23
  293. package/src/gradient-picker/{index.js → index.tsx} +70 -16
  294. package/src/gradient-picker/stories/{index.js → index.tsx} +19 -8
  295. package/src/gradient-picker/types.ts +89 -0
  296. package/src/item-group/test/index.js +5 -3
  297. package/src/palette-edit/index.tsx +4 -5
  298. package/src/resizable-box/resize-tooltip/utils.ts +1 -1
  299. package/src/sandbox/index.native.js +71 -78
  300. package/src/slot-fill/test/slot.js +8 -6
  301. package/src/style.scss +1 -1
  302. package/src/tab-panel/index.tsx +7 -2
  303. package/src/tools-panel/test/index.tsx +86 -0
  304. package/src/tools-panel/tools-panel/hook.ts +44 -4
  305. package/src/tools-panel/types.ts +1 -0
  306. package/src/tooltip/test/index.js +251 -301
  307. package/src/utils/input/input-control.js +1 -0
  308. package/tsconfig.json +1 -2
  309. package/tsconfig.tsbuildinfo +1 -1
  310. package/build/color-list-picker/index.js.map +0 -1
  311. package/build-module/color-list-picker/index.js.map +0 -1
  312. package/build-types/color-list-picker/index.d.ts.map +0 -1
  313. package/build-types/color-list-picker/types.d.ts.map +0 -1
  314. package/src/animate/index.js +0 -60
  315. package/src/animate/stories/index.js +0 -53
  316. package/src/color-picker/stories/index.js +0 -41
  317. package/src/custom-gradient-picker/gradient-bar/utils.js +0 -189
  318. package/src/custom-gradient-picker/serializer.js +0 -48
  319. package/src/custom-gradient-picker/stories/index.js +0 -33
  320. /package/build/{color-list-picker → animate}/types.js +0 -0
  321. /package/build-module/{color-list-picker → animate}/types.js +0 -0
  322. /package/build-module/{color-list-picker → animate}/types.js.map +0 -0
  323. /package/{build/color-list-picker → build-module/custom-gradient-picker}/types.js.map +0 -0
  324. /package/build-types/{color-list-picker → duotone-picker/color-list-picker}/index.d.ts +0 -0
  325. /package/src/custom-gradient-picker/gradient-bar/{constants.js → constants.ts} +0 -0
  326. /package/src/custom-gradient-picker/styles/{custom-gradient-picker-styles.js → custom-gradient-picker-styles.tsx} +0 -0
  327. /package/src/{color-list-picker → duotone-picker/color-list-picker}/style.scss +0 -0
  328. /package/src/duotone-picker/{index.js → index.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/resizable-box/resize-tooltip/utils.ts"],"names":[],"mappings":";AAQA,MAAM,MAAM,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7B,eAAO,MAAM,SAAS;;;CAGZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,OAAO,SAAS,CAAE,MAAM,OAAO,SAAS,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AAC;IACxE,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAE,EAC/B,IAAI,EACJ,WAAiB,EACjB,QAAe,EACf,QAA2B,EAC3B,MAAc,GACd,EAAE,kBAAkB,GAAI,mBAAmB,CA8G3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-panel/index.tsx"],"names":[],"mappings":";AAgBA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAoB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,QAAQ,CAAE,EACzB,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,YAAmB,EACnB,cAAc,EACd,WAA0B,EAC1B,WAAyB,EACzB,QAAQ,GACR,EAAE,uBAAuB,CAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAE,eA+GxD;AAED,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-panel/index.tsx"],"names":[],"mappings":";AAqBA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAoB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,QAAQ,CAAE,EACzB,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,YAAmB,EACnB,cAAc,EACd,WAA0B,EAC1B,WAAyB,EACzB,QAAQ,GACR,EAAE,uBAAuB,CAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAE,eA+GxD;AAED,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel/hook.ts"],"names":[],"mappings":";AAeA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EAEnB,eAAe,EACf,cAAc,EACd,MAAM,UAAU,CAAC;AA8BlB,wBAAgB,aAAa,CAC5B,KAAK,EAAE,uBAAuB,CAAE,eAAe,EAAE,KAAK,CAAE;;;;qCAuD9C,MAAM;mDA6BG,cAAc;;uCAiCvB,MAAM,UAAS,qBAAqB;;;;;;kCAnFrC,cAAc;4CAyCT,cAAc;;;;;;wBAuGlB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGhB"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel/hook.ts"],"names":[],"mappings":";AAeA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EAEnB,eAAe,EACf,cAAc,EACd,MAAM,UAAU,CAAC;AAwDlB,wBAAgB,aAAa,CAC5B,KAAK,EAAE,uBAAuB,CAAE,eAAe,EAAE,KAAK,CAAE;;;;qCAmE9C,MAAM;mDA6BG,cAAc;;uCAkCvB,MAAM,UAAS,qBAAqB;;;;;;kCA/FrC,cAAc;4CAoDT,cAAc;;;;;;wBAwGlB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsGhB"}
@@ -174,6 +174,7 @@ export type ToolsPanelMenuItemsConfig = {
174
174
  panelItems: ToolsPanelItem[];
175
175
  shouldReset: boolean;
176
176
  currentMenuItems?: ToolsPanelMenuItems;
177
+ menuItemOrder: string[];
177
178
  };
178
179
  export {};
179
180
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools-panel/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,cAAc,GAAG,CAAE,UAAU,CAAC,EAAE,GAAG,KAAM,GAAG,CAAC;AACzD,KAAK,QAAQ,GAAG,CAAE,OAAO,CAAC,EAAE,cAAc,EAAE,KAAM,IAAI,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;OAIG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACv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EAAE,OAAO,CAAE,EAAE,CAAC;IAC7B,UAAU,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACvC,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;IACvC,aAAa,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"input-control.d.ts","sourceRoot":"","sources":["../../../src/utils/input/input-control.js"],"names":[],"mappings":"AAaA,qEAgDE"}
1
+ {"version":3,"file":"input-control.d.ts","sourceRoot":"","sources":["../../../src/utils/input/input-control.js"],"names":[],"mappings":"AAaA,qEAiDE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "23.6.0",
3
+ "version": "23.7.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -38,23 +38,23 @@
38
38
  "@emotion/utils": "^1.0.0",
39
39
  "@floating-ui/react-dom": "1.0.0",
40
40
  "@use-gesture/react": "^10.2.24",
41
- "@wordpress/a11y": "^3.29.0",
42
- "@wordpress/compose": "^6.6.0",
43
- "@wordpress/date": "^4.29.0",
44
- "@wordpress/deprecated": "^3.29.0",
45
- "@wordpress/dom": "^3.29.0",
46
- "@wordpress/element": "^5.6.0",
47
- "@wordpress/escape-html": "^2.29.0",
48
- "@wordpress/hooks": "^3.29.0",
49
- "@wordpress/html-entities": "^3.29.0",
50
- "@wordpress/i18n": "^4.29.0",
51
- "@wordpress/icons": "^9.20.0",
52
- "@wordpress/is-shallow-equal": "^4.29.0",
53
- "@wordpress/keycodes": "^3.29.0",
54
- "@wordpress/primitives": "^3.27.0",
55
- "@wordpress/private-apis": "^0.11.0",
56
- "@wordpress/rich-text": "^6.6.0",
57
- "@wordpress/warning": "^2.29.0",
41
+ "@wordpress/a11y": "^3.30.0",
42
+ "@wordpress/compose": "^6.7.0",
43
+ "@wordpress/date": "^4.30.0",
44
+ "@wordpress/deprecated": "^3.30.0",
45
+ "@wordpress/dom": "^3.30.0",
46
+ "@wordpress/element": "^5.7.0",
47
+ "@wordpress/escape-html": "^2.30.0",
48
+ "@wordpress/hooks": "^3.30.0",
49
+ "@wordpress/html-entities": "^3.30.0",
50
+ "@wordpress/i18n": "^4.30.0",
51
+ "@wordpress/icons": "^9.21.0",
52
+ "@wordpress/is-shallow-equal": "^4.30.0",
53
+ "@wordpress/keycodes": "^3.30.0",
54
+ "@wordpress/primitives": "^3.28.0",
55
+ "@wordpress/private-apis": "^0.12.0",
56
+ "@wordpress/rich-text": "^6.7.0",
57
+ "@wordpress/warning": "^2.30.0",
58
58
  "change-case": "^4.1.2",
59
59
  "classnames": "^2.3.1",
60
60
  "colord": "^2.7.0",
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "9534a7b3bbf07c1d40b94fdb7a3d091f297bfb06"
88
+ "gitHead": "d5c28a67b11e91e3e4b8e90346bfcb90909364d6"
89
89
  }
@@ -91,7 +91,6 @@ function AngleCircle( {
91
91
  ref={ angleCircleRef }
92
92
  onMouseDown={ startDrag }
93
93
  className="components-angle-picker-control__angle-circle"
94
- style={ isDragging ? { cursor: 'grabbing' } : undefined }
95
94
  { ...props }
96
95
  >
97
96
  <CircleIndicatorWrapper
@@ -9,19 +9,16 @@ import classnames from 'classnames';
9
9
  */
10
10
  import deprecated from '@wordpress/deprecated';
11
11
  import { forwardRef } from '@wordpress/element';
12
- import { __ } from '@wordpress/i18n';
12
+ import { isRTL, __ } from '@wordpress/i18n';
13
13
 
14
14
  /**
15
15
  * Internal dependencies
16
16
  */
17
- import { FlexBlock, FlexItem } from '../flex';
17
+ import { FlexBlock } from '../flex';
18
+ import { Spacer } from '../spacer';
18
19
  import NumberControl from '../number-control';
19
20
  import AngleCircle from './angle-circle';
20
- import { Root } from './styles/angle-picker-control-styles';
21
- import { space } from '../ui/utils/space';
22
- import { Text } from '../text';
23
- import { Spacer } from '../spacer';
24
- import { COLORS } from '../utils/colors-values';
21
+ import { Root, UnitText } from './styles/angle-picker-control-styles';
25
22
 
26
23
  import type { WordPressComponentProps } from '../ui/context';
27
24
  import type { AnglePickerControlProps } from './types';
@@ -64,13 +61,18 @@ function UnforwardedAnglePickerControl(
64
61
 
65
62
  const classes = classnames( 'components-angle-picker-control', className );
66
63
 
64
+ const unitText = <UnitText>°</UnitText>;
65
+ const [ prefixedUnitText, suffixedUnitText ] = isRTL()
66
+ ? [ unitText, null ]
67
+ : [ null, unitText ];
68
+
67
69
  return (
68
70
  <Root
69
71
  { ...restProps }
70
72
  ref={ ref }
71
73
  __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
72
74
  className={ classes }
73
- gap={ 4 }
75
+ gap={ 2 }
74
76
  >
75
77
  <FlexBlock>
76
78
  <NumberControl
@@ -83,32 +85,17 @@ function UnforwardedAnglePickerControl(
83
85
  step="1"
84
86
  value={ value }
85
87
  spinControls="none"
86
- suffix={
87
- <Spacer
88
- as={ Text }
89
- marginBottom={ 0 }
90
- marginRight={ space( 3 ) }
91
- style={ {
92
- color: COLORS.ui.theme,
93
- } }
94
- >
95
- °
96
- </Spacer>
97
- }
88
+ prefix={ prefixedUnitText }
89
+ suffix={ suffixedUnitText }
98
90
  />
99
91
  </FlexBlock>
100
- <FlexItem
101
- style={ {
102
- marginBottom: space( 1 ),
103
- marginTop: 'auto',
104
- } }
105
- >
92
+ <Spacer marginBottom="1" marginTop="auto">
106
93
  <AngleCircle
107
94
  aria-hidden="true"
108
95
  value={ value }
109
96
  onChange={ onChange }
110
97
  />
111
- </FlexItem>
98
+ </Spacer>
112
99
  </Root>
113
100
  );
114
101
  }
@@ -10,12 +10,13 @@ import styled from '@emotion/styled';
10
10
  import { Flex } from '../../flex';
11
11
  import { COLORS } from '../../utils';
12
12
  import { space } from '../../ui/utils/space';
13
+ import { Text } from '../../text';
13
14
  import CONFIG from '../../utils/config-values';
14
15
 
15
16
  import type { AnglePickerControlProps } from '../types';
16
17
 
17
18
  const CIRCLE_SIZE = 32;
18
- const INNER_CIRCLE_SIZE = 3;
19
+ const INNER_CIRCLE_SIZE = 6;
19
20
 
20
21
  const deprecatedBottomMargin = ( {
21
22
  __nextHasNoMarginBottom,
@@ -39,6 +40,10 @@ export const CircleRoot = styled.div`
39
40
  height: ${ CIRCLE_SIZE }px;
40
41
  overflow: hidden;
41
42
  width: ${ CIRCLE_SIZE }px;
43
+
44
+ :active {
45
+ cursor: grabbing;
46
+ }
42
47
  `;
43
48
 
44
49
  export const CircleIndicatorWrapper = styled.div`
@@ -55,15 +60,17 @@ export const CircleIndicatorWrapper = styled.div`
55
60
  export const CircleIndicator = styled.div`
56
61
  background: ${ COLORS.ui.theme };
57
62
  border-radius: 50%;
58
- border: ${ INNER_CIRCLE_SIZE }px solid ${ COLORS.ui.theme };
59
- bottom: 0;
60
63
  box-sizing: border-box;
61
64
  display: block;
62
- height: 0px;
63
- left: 0;
64
- margin: auto;
65
+ left: 50%;
66
+ top: 4px;
67
+ transform: translateX( -50% );
65
68
  position: absolute;
66
- right: 0;
67
- top: -${ CIRCLE_SIZE / 2 }px;
68
- width: 0px;
69
+ width: ${ INNER_CIRCLE_SIZE }px;
70
+ height: ${ INNER_CIRCLE_SIZE }px;
71
+ `;
72
+
73
+ export const UnitText = styled( Text )`
74
+ color: ${ COLORS.ui.theme };
75
+ margin-right: ${ space( 3 ) };
69
76
  `;
@@ -0,0 +1,75 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classnames from 'classnames';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import type { AnimateProps, GetAnimateOptions } from './types';
10
+
11
+ /**
12
+ * @param type The animation type
13
+ * @return Default origin
14
+ */
15
+ function getDefaultOrigin( type?: GetAnimateOptions[ 'type' ] ) {
16
+ return type === 'appear' ? 'top' : 'left';
17
+ }
18
+
19
+ /**
20
+ * @param options
21
+ *
22
+ * @return ClassName that applies the animations
23
+ */
24
+ export function getAnimateClassName( options: GetAnimateOptions ) {
25
+ if ( options.type === 'loading' ) {
26
+ return classnames( 'components-animate__loading' );
27
+ }
28
+
29
+ const { type, origin = getDefaultOrigin( type ) } = options;
30
+
31
+ if ( type === 'appear' ) {
32
+ const [ yAxis, xAxis = 'center' ] = origin.split( ' ' );
33
+ return classnames( 'components-animate__appear', {
34
+ [ 'is-from-' + xAxis ]: xAxis !== 'center',
35
+ [ 'is-from-' + yAxis ]: yAxis !== 'middle',
36
+ } );
37
+ }
38
+
39
+ if ( type === 'slide-in' ) {
40
+ return classnames(
41
+ 'components-animate__slide-in',
42
+ 'is-from-' + origin
43
+ );
44
+ }
45
+
46
+ return undefined;
47
+ }
48
+
49
+ /**
50
+ * Simple interface to introduce animations to components.
51
+ *
52
+ * ```jsx
53
+ * import { Animate, Notice } from '@wordpress/components';
54
+ *
55
+ * const MyAnimatedNotice = () => (
56
+ * <Animate type="slide-in" options={ { origin: 'top' } }>
57
+ * { ( { className } ) => (
58
+ * <Notice className={ className } status="success">
59
+ * <p>Animation finished.</p>
60
+ * </Notice>
61
+ * ) }
62
+ * </Animate>
63
+ * );
64
+ * ```
65
+ */
66
+ export function Animate( { type, options = {}, children }: AnimateProps ) {
67
+ return children( {
68
+ className: getAnimateClassName( {
69
+ type,
70
+ ...options,
71
+ } as GetAnimateOptions ),
72
+ } );
73
+ }
74
+
75
+ export default Animate;
@@ -0,0 +1,102 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import { Animate } from '..';
10
+ import Notice from '../../notice';
11
+
12
+ const meta: ComponentMeta< typeof Animate > = {
13
+ title: 'Components/Animate',
14
+ component: Animate,
15
+ parameters: {
16
+ controls: { expanded: true },
17
+ docs: { source: { state: 'open' } },
18
+ },
19
+ };
20
+ export default meta;
21
+
22
+ const Template: ComponentStory< typeof Animate > = ( props ) => (
23
+ <Animate { ...props } />
24
+ );
25
+
26
+ export const Default: ComponentStory< typeof Animate > = Template.bind( {} );
27
+ Default.args = {
28
+ children: ( { className } ) => (
29
+ <Notice className={ className } status="success">
30
+ <p>{ `No default animation. Use one of type = "appear", "slide-in", or "loading".` }</p>
31
+ </Notice>
32
+ ),
33
+ };
34
+
35
+ export const AppearTopLeft: ComponentStory< typeof Animate > = Template.bind(
36
+ {}
37
+ );
38
+ AppearTopLeft.args = {
39
+ type: 'appear',
40
+ options: { origin: 'top left' },
41
+ children: ( { className } ) => (
42
+ <Notice className={ className } status="success">
43
+ <p>Appear animation. Origin: top left.</p>
44
+ </Notice>
45
+ ),
46
+ };
47
+ export const AppearTopRight: ComponentStory< typeof Animate > = Template.bind(
48
+ {}
49
+ );
50
+ AppearTopRight.args = {
51
+ type: 'appear',
52
+ options: { origin: 'top right' },
53
+ children: ( { className } ) => (
54
+ <Notice className={ className } status="success">
55
+ <p>Appear animation. Origin: top right.</p>
56
+ </Notice>
57
+ ),
58
+ };
59
+ export const AppearBottomLeft: ComponentStory< typeof Animate > = Template.bind(
60
+ {}
61
+ );
62
+ AppearBottomLeft.args = {
63
+ type: 'appear',
64
+ options: { origin: 'bottom left' },
65
+ children: ( { className } ) => (
66
+ <Notice className={ className } status="success">
67
+ <p>Appear animation. Origin: bottom left.</p>
68
+ </Notice>
69
+ ),
70
+ };
71
+ export const AppearBottomRight: ComponentStory< typeof Animate > =
72
+ Template.bind( {} );
73
+ AppearBottomRight.args = {
74
+ type: 'appear',
75
+ options: { origin: 'bottom right' },
76
+ children: ( { className } ) => (
77
+ <Notice className={ className } status="success">
78
+ <p>Appear animation. Origin: bottom right.</p>
79
+ </Notice>
80
+ ),
81
+ };
82
+
83
+ export const Loading: ComponentStory< typeof Animate > = Template.bind( {} );
84
+ Loading.args = {
85
+ type: 'loading',
86
+ children: ( { className } ) => (
87
+ <Notice className={ className } status="success">
88
+ <p>Loading animation.</p>
89
+ </Notice>
90
+ ),
91
+ };
92
+
93
+ export const SlideIn: ComponentStory< typeof Animate > = Template.bind( {} );
94
+ SlideIn.args = {
95
+ type: 'slide-in',
96
+ options: { origin: 'left' },
97
+ children: ( { className } ) => (
98
+ <Notice className={ className } status="success">
99
+ <p>Slide-in animation.</p>
100
+ </Notice>
101
+ ),
102
+ };
@@ -0,0 +1,32 @@
1
+ export type AppearOptions = {
2
+ type: 'appear';
3
+ origin?:
4
+ | 'top'
5
+ | 'top left'
6
+ | 'top right'
7
+ | 'middle'
8
+ | 'middle left'
9
+ | 'middle right'
10
+ | 'bottom'
11
+ | 'bottom left'
12
+ | 'bottom right';
13
+ };
14
+ type SlideInOptions = { type: 'slide-in'; origin?: 'left' | 'right' };
15
+ type LoadingOptions = { type: 'loading'; origin?: never };
16
+ type NoAnimationOptions = { type?: never; origin?: never };
17
+
18
+ export type GetAnimateOptions =
19
+ | AppearOptions
20
+ | SlideInOptions
21
+ | LoadingOptions
22
+ | NoAnimationOptions;
23
+
24
+ // Create a new type that and distributes the `Pick` operator separately to
25
+ // every individual type of a union, thus preserving that same union.
26
+ type DistributiveTypeAndOptions< T extends { type?: any } > = T extends any
27
+ ? Pick< T, 'type' > & { options?: Omit< T, 'type' > }
28
+ : never;
29
+
30
+ export type AnimateProps = DistributiveTypeAndOptions< GetAnimateOptions > & {
31
+ children: ( props: { className?: string } ) => JSX.Element;
32
+ };
@@ -43,7 +43,7 @@ const colors = [
43
43
 
44
44
  const Template: ComponentStory< typeof BorderBoxControl > = ( props ) => {
45
45
  const { onChange, ...otherProps } = props;
46
- const [ borders, setBorders ] = useState< typeof props[ 'value' ] >();
46
+ const [ borders, setBorders ] = useState< ( typeof props )[ 'value' ] >();
47
47
 
48
48
  const onChangeMerged: ComponentProps<
49
49
  typeof BorderBoxControl
@@ -8,7 +8,7 @@ import { Layout } from './styles/box-control-styles';
8
8
  import type { BoxControlInputControlProps } from './types';
9
9
 
10
10
  const groupedSides = [ 'vertical', 'horizontal' ] as const;
11
- type GroupedSide = typeof groupedSides[ number ];
11
+ type GroupedSide = ( typeof groupedSides )[ number ];
12
12
 
13
13
  export default function AxialInputControls( {
14
14
  onChange,
@@ -16,6 +16,16 @@ $color-palette-circle-spacing: 12px;
16
16
  display: flex;
17
17
  flex-wrap: wrap;
18
18
  gap: $color-palette-circle-spacing;
19
+ position: relative;
20
+ z-index: z-index(".components-circular-option-picker__swatches");
21
+ }
22
+
23
+ // Make sure that the .components-circular-option-picker__swatches element
24
+ // renders visually on top of its siblings. This is necessary to make sure
25
+ // that the tooltip rendered when hovering an `Option` always appears on top.
26
+ > *:not(.components-circular-option-picker__swatches) {
27
+ position: relative;
28
+ z-index: z-index("> *:not(.components-circular-option-picker__swatches)");
19
29
  }
20
30
  }
21
31
 
@@ -5,4 +5,5 @@
5
5
  border-radius: 50%;
6
6
  display: inline-block;
7
7
  padding: 0;
8
+ background: $white linear-gradient(-45deg, transparent 48%, $gray-300 48%, $gray-300 52%, transparent 52%);
8
9
  }
@@ -31,13 +31,13 @@ The current color value to display in the picker. Must be a hex or hex8 string.
31
31
 
32
32
  ### `onChange`: `(hex8Color: string) => void`
33
33
 
34
- Fired when the color changes. Always passes a hex8 color string.
34
+ Fired when the color changes. Always passes a hex or hex8 color string.
35
35
 
36
36
  - Required: No
37
37
 
38
38
  ### `enableAlpha`: `boolean`
39
39
 
40
- Defaults to `false`. When `true` the color picker will display the alpha channel both in the bottom inputs as well as in the color picker itself.
40
+ When `true` the color picker will display the alpha channel both in the bottom inputs as well as in the color picker itself.
41
41
 
42
42
  - Required: No
43
43
  - Default: `false`
@@ -1,21 +1,10 @@
1
- /**
2
- * External dependencies
3
- */
4
- import type { Colord } from 'colord';
5
-
6
1
  /**
7
2
  * Internal dependencies
8
3
  */
9
4
  import { RgbInput } from './rgb-input';
10
5
  import { HslInput } from './hsl-input';
11
6
  import { HexInput } from './hex-input';
12
-
13
- interface ColorInputProps {
14
- colorType: 'hsl' | 'hex' | 'rgb';
15
- color: Colord;
16
- onChange: ( nextColor: Colord ) => void;
17
- enableAlpha: boolean;
18
- }
7
+ import type { ColorInputProps } from './types';
19
8
 
20
9
  export const ColorInput = ( {
21
10
  colorType,
@@ -15,11 +15,7 @@ import { __ } from '@wordpress/i18n';
15
15
  /**
16
16
  * Internal dependencies
17
17
  */
18
- import {
19
- useContextSystem,
20
- contextConnect,
21
- WordPressComponentProps,
22
- } from '../ui/context';
18
+ import { useContextSystem, contextConnect } from '../ui/context';
23
19
  import {
24
20
  ColorfulWrapper,
25
21
  SelectControl,
@@ -32,26 +28,18 @@ import { ColorInput } from './color-input';
32
28
  import { Picker } from './picker';
33
29
  import { useControlledValue } from '../utils/hooks';
34
30
 
35
- import type { ColorType } from './types';
31
+ import type { ColorPickerProps, ColorType } from './types';
36
32
 
37
33
  extend( [ namesPlugin ] );
38
34
 
39
- export interface ColorPickerProps {
40
- enableAlpha?: boolean;
41
- color?: string;
42
- onChange?: ( color: string ) => void;
43
- defaultValue?: string;
44
- copyFormat?: ColorType;
45
- }
46
-
47
35
  const options = [
48
36
  { label: 'RGB', value: 'rgb' as const },
49
37
  { label: 'HSL', value: 'hsl' as const },
50
38
  { label: 'Hex', value: 'hex' as const },
51
39
  ];
52
40
 
53
- const ColorPicker = (
54
- props: WordPressComponentProps< ColorPickerProps, 'div', false >,
41
+ const UnconnectedColorPicker = (
42
+ props: ColorPickerProps,
55
43
  forwardedRef: ForwardedRef< any >
56
44
  ) => {
57
45
  const {
@@ -124,6 +112,9 @@ const ColorPicker = (
124
112
  );
125
113
  };
126
114
 
127
- const ConnectedColorPicker = contextConnect( ColorPicker, 'ColorPicker' );
115
+ export const ColorPicker = contextConnect(
116
+ UnconnectedColorPicker,
117
+ 'ColorPicker'
118
+ );
128
119
 
129
- export default ConnectedColorPicker;
120
+ export default ColorPicker;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { colord, Colord } from 'colord';
4
+ import { colord } from 'colord';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -17,12 +17,7 @@ import { Spacer } from '../spacer';
17
17
  import { space } from '../ui/utils/space';
18
18
  import { COLORS } from '../utils/colors-values';
19
19
  import type { StateReducer } from '../input-control/reducer/state';
20
-
21
- interface HexInputProps {
22
- color: Colord;
23
- onChange: ( nextColor: Colord ) => void;
24
- enableAlpha: boolean;
25
- }
20
+ import type { HexInputProps } from './types';
26
21
 
27
22
  export const HexInput = ( { color, onChange, enableAlpha }: HexInputProps ) => {
28
23
  const handleChange = ( nextValue: string | undefined ) => {
@@ -1,18 +1,13 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { colord, Colord } from 'colord';
4
+ import { colord } from 'colord';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
9
  import { InputWithSlider } from './input-with-slider';
10
-
11
- interface HslInputProps {
12
- color: Colord;
13
- onChange: ( nextColor: Colord ) => void;
14
- enableAlpha: boolean;
15
- }
10
+ import type { HslInputProps } from './types';
16
11
 
17
12
  export const HslInput = ( { color, onChange, enableAlpha }: HslInputProps ) => {
18
13
  const { h, s, l, a } = color.toHsl();
@@ -7,15 +7,7 @@ import { Spacer } from '../spacer';
7
7
  import { space } from '../ui/utils/space';
8
8
  import { RangeControl, NumberControlWrapper } from './styles';
9
9
  import { COLORS } from '../utils/colors-values';
10
-
11
- interface InputWithSliderProps {
12
- min: number;
13
- max: number;
14
- value: number;
15
- label: string;
16
- abbreviation: string;
17
- onChange: ( value: number ) => void;
18
- }
10
+ import type { InputWithSliderProps } from './types';
19
11
 
20
12
  export const InputWithSlider = ( {
21
13
  min,