@wordpress/components 27.2.0 → 27.4.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 (2033) hide show
  1. package/CHANGELOG.md +63 -4
  2. package/README.md +13 -0
  3. package/build/alignment-matrix-control/cell.js.map +1 -1
  4. package/build/alignment-matrix-control/icon.js.map +1 -1
  5. package/build/alignment-matrix-control/index.js.map +1 -1
  6. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +8 -4
  7. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +1 -1
  8. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +9 -5
  9. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  10. package/build/alignment-matrix-control/types.js.map +1 -1
  11. package/build/alignment-matrix-control/utils.js +4 -0
  12. package/build/alignment-matrix-control/utils.js.map +1 -1
  13. package/build/angle-picker-control/angle-circle.js.map +1 -1
  14. package/build/angle-picker-control/index.js.map +1 -1
  15. package/build/angle-picker-control/styles/angle-picker-control-styles.js +9 -5
  16. package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  17. package/build/angle-picker-control/types.js.map +1 -1
  18. package/build/animate/index.js +4 -0
  19. package/build/animate/index.js.map +1 -1
  20. package/build/animate/types.js.map +1 -1
  21. package/build/animation/index.js.map +1 -1
  22. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  23. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  24. package/build/autocomplete/background-view.android.js.map +1 -1
  25. package/build/autocomplete/background-view.ios.js.map +1 -1
  26. package/build/autocomplete/get-default-use-items.js.map +1 -1
  27. package/build/autocomplete/index.js.map +1 -1
  28. package/build/autocomplete/types.js.map +1 -1
  29. package/build/base-control/hooks.js.map +1 -1
  30. package/build/base-control/index.js.map +1 -1
  31. package/build/base-control/index.native.js.map +1 -1
  32. package/build/base-control/styles/base-control-styles.js +10 -6
  33. package/build/base-control/styles/base-control-styles.js.map +1 -1
  34. package/build/base-control/types.js.map +1 -1
  35. package/build/border-box-control/border-box-control/component.js.map +1 -1
  36. package/build/border-box-control/border-box-control/hook.js +1 -1
  37. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  38. package/build/border-box-control/border-box-control/index.js.map +1 -1
  39. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  40. package/build/border-box-control/border-box-control-linked-button/hook.js +1 -1
  41. package/build/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  42. package/build/border-box-control/border-box-control-linked-button/index.js.map +1 -1
  43. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  44. package/build/border-box-control/border-box-control-split-controls/hook.js +1 -1
  45. package/build/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  46. package/build/border-box-control/border-box-control-split-controls/index.js.map +1 -1
  47. package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  48. package/build/border-box-control/border-box-control-visualizer/hook.js +1 -1
  49. package/build/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
  50. package/build/border-box-control/border-box-control-visualizer/index.js.map +1 -1
  51. package/build/border-box-control/index.js.map +1 -1
  52. package/build/border-box-control/styles.js +5 -1
  53. package/build/border-box-control/styles.js.map +1 -1
  54. package/build/border-box-control/types.js.map +1 -1
  55. package/build/border-box-control/utils.js.map +1 -1
  56. package/build/border-control/border-control/component.js.map +1 -1
  57. package/build/border-control/border-control/hook.js +1 -1
  58. package/build/border-control/border-control/hook.js.map +1 -1
  59. package/build/border-control/border-control/index.js.map +1 -1
  60. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  61. package/build/border-control/border-control-dropdown/hook.js +1 -1
  62. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  63. package/build/border-control/border-control-dropdown/index.js.map +1 -1
  64. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  65. package/build/border-control/border-control-style-picker/index.js.map +1 -1
  66. package/build/border-control/index.js.map +1 -1
  67. package/build/border-control/styles.js +5 -1
  68. package/build/border-control/styles.js.map +1 -1
  69. package/build/border-control/types.js.map +1 -1
  70. package/build/box-control/all-input-control.js +4 -0
  71. package/build/box-control/all-input-control.js.map +1 -1
  72. package/build/box-control/axial-input-controls.js.map +1 -1
  73. package/build/box-control/icon.js.map +1 -1
  74. package/build/box-control/index.js.map +1 -1
  75. package/build/box-control/input-controls.js.map +1 -1
  76. package/build/box-control/linked-button.js.map +1 -1
  77. package/build/box-control/styles/box-control-icon-styles.js +12 -10
  78. package/build/box-control/styles/box-control-icon-styles.js.map +1 -1
  79. package/build/box-control/styles/box-control-styles.js +11 -7
  80. package/build/box-control/styles/box-control-styles.js.map +1 -1
  81. package/build/box-control/types.js.map +1 -1
  82. package/build/box-control/utils.js.map +1 -1
  83. package/build/button/deprecated.js.map +1 -1
  84. package/build/button/index.js +1 -1
  85. package/build/button/index.js.map +1 -1
  86. package/build/button/index.native.js.map +1 -1
  87. package/build/button/types.js.map +1 -1
  88. package/build/button-group/index.js +4 -0
  89. package/build/button-group/index.js.map +1 -1
  90. package/build/button-group/types.js.map +1 -1
  91. package/build/card/card/component.js +5 -1
  92. package/build/card/card/component.js.map +1 -1
  93. package/build/card/card/hook.js +5 -1
  94. package/build/card/card/hook.js.map +1 -1
  95. package/build/card/card/index.js.map +1 -1
  96. package/build/card/card-body/component.js.map +1 -1
  97. package/build/card/card-body/hook.js +5 -1
  98. package/build/card/card-body/hook.js.map +1 -1
  99. package/build/card/card-body/index.js.map +1 -1
  100. package/build/card/card-divider/component.js.map +1 -1
  101. package/build/card/card-divider/hook.js +5 -1
  102. package/build/card/card-divider/hook.js.map +1 -1
  103. package/build/card/card-divider/index.js.map +1 -1
  104. package/build/card/card-footer/component.js.map +1 -1
  105. package/build/card/card-footer/hook.js +5 -1
  106. package/build/card/card-footer/hook.js.map +1 -1
  107. package/build/card/card-footer/index.js.map +1 -1
  108. package/build/card/card-header/component.js.map +1 -1
  109. package/build/card/card-header/hook.js +5 -1
  110. package/build/card/card-header/hook.js.map +1 -1
  111. package/build/card/card-header/index.js.map +1 -1
  112. package/build/card/card-media/component.js.map +1 -1
  113. package/build/card/card-media/hook.js +5 -1
  114. package/build/card/card-media/hook.js.map +1 -1
  115. package/build/card/card-media/index.js.map +1 -1
  116. package/build/card/context.js.map +1 -1
  117. package/build/card/index.js +1 -1
  118. package/build/card/index.js.map +1 -1
  119. package/build/card/styles.js +5 -1
  120. package/build/card/styles.js.map +1 -1
  121. package/build/card/types.js.map +1 -1
  122. package/build/checkbox-control/index.js.map +1 -1
  123. package/build/checkbox-control/types.js.map +1 -1
  124. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  125. package/build/circular-option-picker/circular-option-picker-context.js +4 -0
  126. package/build/circular-option-picker/circular-option-picker-context.js.map +1 -1
  127. package/build/circular-option-picker/circular-option-picker-option-group.js +4 -0
  128. package/build/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
  129. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  130. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  131. package/build/circular-option-picker/index.js.map +1 -1
  132. package/build/circular-option-picker/types.js.map +1 -1
  133. package/build/clipboard-button/index.js.map +1 -1
  134. package/build/clipboard-button/types.js.map +1 -1
  135. package/build/color-control/index.native.js.map +1 -1
  136. package/build/color-indicator/index.js +4 -0
  137. package/build/color-indicator/index.js.map +1 -1
  138. package/build/color-indicator/index.native.js.map +1 -1
  139. package/build/color-indicator/types.js.map +1 -1
  140. package/build/color-palette/index.js.map +1 -1
  141. package/build/color-palette/index.native.js +4 -3
  142. package/build/color-palette/index.native.js.map +1 -1
  143. package/build/color-palette/styles.js +6 -2
  144. package/build/color-palette/styles.js.map +1 -1
  145. package/build/color-palette/types.js.map +1 -1
  146. package/build/color-palette/utils.js +4 -0
  147. package/build/color-palette/utils.js.map +1 -1
  148. package/build/color-picker/color-copy-button.js.map +1 -1
  149. package/build/color-picker/color-input.js.map +1 -1
  150. package/build/color-picker/component.js +2 -12
  151. package/build/color-picker/component.js.map +1 -1
  152. package/build/color-picker/hex-input.js.map +1 -1
  153. package/build/color-picker/hsl-input.js.map +1 -1
  154. package/build/color-picker/hsv-color-picker.native.js.map +1 -1
  155. package/build/color-picker/hue-picker.native.js +1 -1
  156. package/build/color-picker/hue-picker.native.js.map +1 -1
  157. package/build/color-picker/index.js.map +1 -1
  158. package/build/color-picker/index.native.js.map +1 -1
  159. package/build/color-picker/input-with-slider.js.map +1 -1
  160. package/build/color-picker/legacy-adapter.js.map +1 -1
  161. package/build/color-picker/picker.js +19 -74
  162. package/build/color-picker/picker.js.map +1 -1
  163. package/build/color-picker/rgb-input.js.map +1 -1
  164. package/build/color-picker/saturation-picker.native.js +1 -1
  165. package/build/color-picker/saturation-picker.native.js.map +1 -1
  166. package/build/color-picker/styles.js +8 -8
  167. package/build/color-picker/styles.js.map +1 -1
  168. package/build/color-picker/types.js.map +1 -1
  169. package/build/color-picker/use-deprecated-props.js +4 -0
  170. package/build/color-picker/use-deprecated-props.js.map +1 -1
  171. package/build/combobox-control/index.js.map +1 -1
  172. package/build/combobox-control/styles.js +1 -1
  173. package/build/combobox-control/styles.js.map +1 -1
  174. package/build/combobox-control/types.js.map +1 -1
  175. package/build/composite/current/index.js.map +1 -1
  176. package/build/composite/index.js.map +1 -1
  177. package/build/composite/legacy/index.js +6 -1
  178. package/build/composite/legacy/index.js.map +1 -1
  179. package/build/composite/v2.js.map +1 -1
  180. package/build/confirm-dialog/component.js +1 -1
  181. package/build/confirm-dialog/component.js.map +1 -1
  182. package/build/confirm-dialog/index.js.map +1 -1
  183. package/build/confirm-dialog/styles.js +3 -1
  184. package/build/confirm-dialog/styles.js.map +1 -1
  185. package/build/confirm-dialog/types.js.map +1 -1
  186. package/build/context/constants.js.map +1 -1
  187. package/build/context/context-connect.js.map +1 -1
  188. package/build/context/context-system-provider.js.map +1 -1
  189. package/build/context/get-styled-class-name-from-key.js.map +1 -1
  190. package/build/context/index.js.map +1 -1
  191. package/build/context/use-context-system.js.map +1 -1
  192. package/build/context/utils.js.map +1 -1
  193. package/build/context/wordpress-component.js.map +1 -1
  194. package/build/custom-gradient-picker/constants.js.map +1 -1
  195. package/build/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
  196. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  197. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  198. package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  199. package/build/custom-gradient-picker/index.js.map +1 -1
  200. package/build/custom-gradient-picker/index.native.js.map +1 -1
  201. package/build/custom-gradient-picker/serializer.js.map +1 -1
  202. package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js +7 -3
  203. package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
  204. package/build/custom-gradient-picker/types.js.map +1 -1
  205. package/build/custom-gradient-picker/utils.js.map +1 -1
  206. package/build/custom-select-control/index.js +6 -14
  207. package/build/custom-select-control/index.js.map +1 -1
  208. package/build/custom-select-control-v2/custom-select.js +1 -1
  209. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  210. package/build/custom-select-control-v2/default-component/index.js +5 -3
  211. package/build/custom-select-control-v2/default-component/index.js.map +1 -1
  212. package/build/custom-select-control-v2/index.js +1 -8
  213. package/build/custom-select-control-v2/index.js.map +1 -1
  214. package/build/custom-select-control-v2/{custom-select-item.js → item.js} +7 -2
  215. package/build/custom-select-control-v2/item.js.map +1 -0
  216. package/build/custom-select-control-v2/legacy-component/index.js +6 -6
  217. package/build/custom-select-control-v2/legacy-component/index.js.map +1 -1
  218. package/build/custom-select-control-v2/styles.js +15 -10
  219. package/build/custom-select-control-v2/styles.js.map +1 -1
  220. package/build/custom-select-control-v2/types.js.map +1 -1
  221. package/build/dashicon/index.js.map +1 -1
  222. package/build/dashicon/index.native.js +1 -1
  223. package/build/dashicon/index.native.js.map +1 -1
  224. package/build/dashicon/types.js.map +1 -1
  225. package/build/date-time/constants.js.map +1 -1
  226. package/build/date-time/date/index.js +4 -0
  227. package/build/date-time/date/index.js.map +1 -1
  228. package/build/date-time/date/styles.js +11 -7
  229. package/build/date-time/date/styles.js.map +1 -1
  230. package/build/date-time/date-time/index.js.map +1 -1
  231. package/build/date-time/date-time/styles.js +6 -2
  232. package/build/date-time/date-time/styles.js.map +1 -1
  233. package/build/date-time/index.js.map +1 -1
  234. package/build/date-time/time/index.js.map +1 -1
  235. package/build/date-time/time/styles.js +15 -11
  236. package/build/date-time/time/styles.js.map +1 -1
  237. package/build/date-time/time/timezone.js.map +1 -1
  238. package/build/date-time/types.js.map +1 -1
  239. package/build/date-time/utils.js.map +1 -1
  240. package/build/dimension-control/index.js +1 -1
  241. package/build/dimension-control/index.js.map +1 -1
  242. package/build/dimension-control/sizes.js +4 -0
  243. package/build/dimension-control/sizes.js.map +1 -1
  244. package/build/dimension-control/types.js.map +1 -1
  245. package/build/disabled/index.js.map +1 -1
  246. package/build/disabled/index.native.js.map +1 -1
  247. package/build/disabled/styles/disabled-styles.js +3 -1
  248. package/build/disabled/styles/disabled-styles.js.map +1 -1
  249. package/build/disabled/types.js.map +1 -1
  250. package/build/disclosure/index.js +5 -1
  251. package/build/disclosure/index.js.map +1 -1
  252. package/build/disclosure/types.js.map +1 -1
  253. package/build/divider/component.js +5 -1
  254. package/build/divider/component.js.map +1 -1
  255. package/build/divider/index.js.map +1 -1
  256. package/build/divider/styles.js +6 -2
  257. package/build/divider/styles.js.map +1 -1
  258. package/build/divider/types.js.map +1 -1
  259. package/build/draggable/index.js +4 -0
  260. package/build/draggable/index.js.map +1 -1
  261. package/build/draggable/index.native.js +1 -1
  262. package/build/draggable/index.native.js.map +1 -1
  263. package/build/draggable/types.js.map +1 -1
  264. package/build/drop-zone/index.js.map +1 -1
  265. package/build/drop-zone/provider.js.map +1 -1
  266. package/build/drop-zone/types.js.map +1 -1
  267. package/build/dropdown/dropdown-content-wrapper.js.map +1 -1
  268. package/build/dropdown/index.js.map +1 -1
  269. package/build/dropdown/index.native.js.map +1 -1
  270. package/build/dropdown/styles.js +1 -1
  271. package/build/dropdown/styles.js.map +1 -1
  272. package/build/dropdown/types.js.map +1 -1
  273. package/build/dropdown-menu/index.js.map +1 -1
  274. package/build/dropdown-menu/index.native.js.map +1 -1
  275. package/build/dropdown-menu/types.js.map +1 -1
  276. package/build/dropdown-menu-v2/index.js +1 -1
  277. package/build/dropdown-menu-v2/index.js.map +1 -1
  278. package/build/dropdown-menu-v2/styles.js +20 -15
  279. package/build/dropdown-menu-v2/styles.js.map +1 -1
  280. package/build/dropdown-menu-v2/types.js.map +1 -1
  281. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  282. package/build/duotone-picker/color-list-picker/types.js.map +1 -1
  283. package/build/duotone-picker/custom-duotone-bar.js.map +1 -1
  284. package/build/duotone-picker/duotone-picker.js.map +1 -1
  285. package/build/duotone-picker/duotone-swatch.js.map +1 -1
  286. package/build/duotone-picker/index.js.map +1 -1
  287. package/build/duotone-picker/types.js.map +1 -1
  288. package/build/duotone-picker/utils.js +4 -0
  289. package/build/duotone-picker/utils.js.map +1 -1
  290. package/build/elevation/component.js.map +1 -1
  291. package/build/elevation/hook.js +5 -1
  292. package/build/elevation/hook.js.map +1 -1
  293. package/build/elevation/index.js.map +1 -1
  294. package/build/elevation/styles.js +3 -1
  295. package/build/elevation/styles.js.map +1 -1
  296. package/build/elevation/types.js.map +1 -1
  297. package/build/external-link/index.js +7 -10
  298. package/build/external-link/index.js.map +1 -1
  299. package/build/external-link/index.native.js.map +1 -1
  300. package/build/external-link/types.js.map +1 -1
  301. package/build/flex/context.js.map +1 -1
  302. package/build/flex/flex/component.js.map +1 -1
  303. package/build/flex/flex/hook.js +5 -1
  304. package/build/flex/flex/hook.js.map +1 -1
  305. package/build/flex/flex/index.js.map +1 -1
  306. package/build/flex/flex-block/component.js.map +1 -1
  307. package/build/flex/flex-block/hook.js.map +1 -1
  308. package/build/flex/flex-block/index.js.map +1 -1
  309. package/build/flex/flex-item/component.js.map +1 -1
  310. package/build/flex/flex-item/hook.js +5 -1
  311. package/build/flex/flex-item/hook.js.map +1 -1
  312. package/build/flex/flex-item/index.js.map +1 -1
  313. package/build/flex/index.js +1 -1
  314. package/build/flex/index.js.map +1 -1
  315. package/build/flex/styles.js +3 -1
  316. package/build/flex/styles.js.map +1 -1
  317. package/build/flex/types.js.map +1 -1
  318. package/build/focal-point-picker/controls.js.map +1 -1
  319. package/build/focal-point-picker/focal-point.js.map +1 -1
  320. package/build/focal-point-picker/focal-point.native.js.map +1 -1
  321. package/build/focal-point-picker/grid.js.map +1 -1
  322. package/build/focal-point-picker/index.js.map +1 -1
  323. package/build/focal-point-picker/index.native.js.map +1 -1
  324. package/build/focal-point-picker/media.js.map +1 -1
  325. package/build/focal-point-picker/styles/focal-point-picker-style.js +14 -10
  326. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  327. package/build/focal-point-picker/styles/focal-point-style.js +1 -1
  328. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  329. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  330. package/build/focal-point-picker/types.js.map +1 -1
  331. package/build/focal-point-picker/utils.js.map +1 -1
  332. package/build/focusable-iframe/index.js +4 -0
  333. package/build/focusable-iframe/index.js.map +1 -1
  334. package/build/focusable-iframe/types.js.map +1 -1
  335. package/build/font-size-picker/constants.js.map +1 -1
  336. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  337. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  338. package/build/font-size-picker/index.js +1 -1
  339. package/build/font-size-picker/index.js.map +1 -1
  340. package/build/font-size-picker/index.native.js +1 -1
  341. package/build/font-size-picker/index.native.js.map +1 -1
  342. package/build/font-size-picker/styles.js +10 -6
  343. package/build/font-size-picker/styles.js.map +1 -1
  344. package/build/font-size-picker/types.js.map +1 -1
  345. package/build/font-size-picker/utils.js.map +1 -1
  346. package/build/footer-message-control/index.native.js.map +1 -1
  347. package/build/form-file-upload/index.js.map +1 -1
  348. package/build/form-file-upload/types.js.map +1 -1
  349. package/build/form-toggle/index.js +13 -3
  350. package/build/form-toggle/index.js.map +1 -1
  351. package/build/form-toggle/types.js.map +1 -1
  352. package/build/form-token-field/index.js.map +1 -1
  353. package/build/form-token-field/styles.js +1 -1
  354. package/build/form-token-field/styles.js.map +1 -1
  355. package/build/form-token-field/suggestions-list.js +4 -0
  356. package/build/form-token-field/suggestions-list.js.map +1 -1
  357. package/build/form-token-field/token-input.js +4 -0
  358. package/build/form-token-field/token-input.js.map +1 -1
  359. package/build/form-token-field/token.js.map +1 -1
  360. package/build/form-token-field/types.js.map +1 -1
  361. package/build/gradient-picker/index.js.map +1 -1
  362. package/build/gradient-picker/types.js.map +1 -1
  363. package/build/grid/component.js.map +1 -1
  364. package/build/grid/hook.js +4 -0
  365. package/build/grid/hook.js.map +1 -1
  366. package/build/grid/index.js.map +1 -1
  367. package/build/grid/types.js.map +1 -1
  368. package/build/grid/utils.js.map +1 -1
  369. package/build/guide/icons.js.map +1 -1
  370. package/build/guide/index.js.map +1 -1
  371. package/build/guide/page-control.js.map +1 -1
  372. package/build/guide/page.js +4 -0
  373. package/build/guide/page.js.map +1 -1
  374. package/build/guide/types.js.map +1 -1
  375. package/build/h-stack/component.js.map +1 -1
  376. package/build/h-stack/hook.js.map +1 -1
  377. package/build/h-stack/index.js.map +1 -1
  378. package/build/h-stack/types.js.map +1 -1
  379. package/build/h-stack/utils.js.map +1 -1
  380. package/build/heading/component.js.map +1 -1
  381. package/build/heading/hook.js.map +1 -1
  382. package/build/heading/index.js.map +1 -1
  383. package/build/heading/types.js.map +1 -1
  384. package/build/higher-order/navigate-regions/index.js.map +1 -1
  385. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  386. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  387. package/build/higher-order/with-filters/index.js.map +1 -1
  388. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  389. package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
  390. package/build/higher-order/with-focus-return/index.js.map +1 -1
  391. package/build/higher-order/with-notices/index.js.map +1 -1
  392. package/build/higher-order/with-notices/types.js.map +1 -1
  393. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  394. package/build/icon/index.js.map +1 -1
  395. package/build/index.js +1 -1
  396. package/build/index.js.map +1 -1
  397. package/build/index.native.js +1 -1
  398. package/build/index.native.js.map +1 -1
  399. package/build/input-control/backdrop.js +2 -4
  400. package/build/input-control/backdrop.js.map +1 -1
  401. package/build/input-control/index.js +0 -4
  402. package/build/input-control/index.js.map +1 -1
  403. package/build/input-control/input-base.js +1 -5
  404. package/build/input-control/input-base.js.map +1 -1
  405. package/build/input-control/input-field.js +6 -10
  406. package/build/input-control/input-field.js.map +1 -1
  407. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  408. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  409. package/build/input-control/label.js.map +1 -1
  410. package/build/input-control/reducer/actions.js.map +1 -1
  411. package/build/input-control/reducer/reducer.js +5 -1
  412. package/build/input-control/reducer/reducer.js.map +1 -1
  413. package/build/input-control/reducer/state.js.map +1 -1
  414. package/build/input-control/styles/input-control-styles.js +80 -107
  415. package/build/input-control/styles/input-control-styles.js.map +1 -1
  416. package/build/input-control/types.js.map +1 -1
  417. package/build/input-control/utils.js +4 -0
  418. package/build/input-control/utils.js.map +1 -1
  419. package/build/isolated-event-container/index.js.map +1 -1
  420. package/build/item-group/context.js +4 -0
  421. package/build/item-group/context.js.map +1 -1
  422. package/build/item-group/index.js.map +1 -1
  423. package/build/item-group/item/component.js.map +1 -1
  424. package/build/item-group/item/hook.js +5 -1
  425. package/build/item-group/item/hook.js.map +1 -1
  426. package/build/item-group/item/index.js.map +1 -1
  427. package/build/item-group/item-group/component.js.map +1 -1
  428. package/build/item-group/item-group/hook.js +1 -1
  429. package/build/item-group/item-group/hook.js.map +1 -1
  430. package/build/item-group/item-group/index.js.map +1 -1
  431. package/build/item-group/styles.js +5 -1
  432. package/build/item-group/styles.js.map +1 -1
  433. package/build/item-group/types.js.map +1 -1
  434. package/build/keyboard-shortcuts/index.js +4 -0
  435. package/build/keyboard-shortcuts/index.js.map +1 -1
  436. package/build/keyboard-shortcuts/index.native.js.map +1 -1
  437. package/build/keyboard-shortcuts/types.js.map +1 -1
  438. package/build/lock-unlock.js.map +1 -1
  439. package/build/menu-group/index.js +4 -0
  440. package/build/menu-group/index.js.map +1 -1
  441. package/build/menu-group/types.js.map +1 -1
  442. package/build/menu-item/index.js.map +1 -1
  443. package/build/menu-item/types.js.map +1 -1
  444. package/build/menu-items-choice/index.js.map +1 -1
  445. package/build/menu-items-choice/types.js.map +1 -1
  446. package/build/mobile/audio-player/audio-url-parser.native.js.map +1 -1
  447. package/build/mobile/audio-player/index.native.js.map +1 -1
  448. package/build/mobile/autocompletion-items.native.js.map +1 -1
  449. package/build/mobile/badge/index.native.js.map +1 -1
  450. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  451. package/build/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js.map +1 -1
  452. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  453. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  454. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  455. package/build/mobile/bottom-sheet/button.native.js.map +1 -1
  456. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  457. package/build/mobile/bottom-sheet/chevron-back.native.js.map +1 -1
  458. package/build/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  459. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  460. package/build/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  461. package/build/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js.map +1 -1
  462. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  463. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  464. package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  465. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  466. package/build/mobile/bottom-sheet/lock-icon/index.native.js.map +1 -1
  467. package/build/mobile/bottom-sheet/nav-bar/action-button.native.js.map +1 -1
  468. package/build/mobile/bottom-sheet/nav-bar/apply-button.native.js.map +1 -1
  469. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  470. package/build/mobile/bottom-sheet/nav-bar/heading.native.js.map +1 -1
  471. package/build/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -1
  472. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  473. package/build/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  474. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  475. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  476. package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
  477. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  478. package/build/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
  479. package/build/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
  480. package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  481. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  482. package/build/mobile/bottom-sheet-select-control/index.native.js +5 -1
  483. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  484. package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  485. package/build/mobile/clipboard/index.native.js.map +1 -1
  486. package/build/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
  487. package/build/mobile/color-settings/index.native.js.map +1 -1
  488. package/build/mobile/color-settings/palette.screen.native.js +1 -0
  489. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  490. package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
  491. package/build/mobile/color-settings/utils.native.js.map +1 -1
  492. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  493. package/build/mobile/dashicons/index.native.js.map +1 -1
  494. package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  495. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  496. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  497. package/build/mobile/gradient/index.native.js.map +1 -1
  498. package/build/mobile/gridicons/index.native.js.map +1 -1
  499. package/build/mobile/html-text-input/index.native.js.map +1 -1
  500. package/build/mobile/image/constants.js.map +1 -1
  501. package/build/mobile/image/icon-customize.native.js.map +1 -1
  502. package/build/mobile/image/icon-retry.native.js.map +1 -1
  503. package/build/mobile/image/image-editing-button.native.js.map +1 -1
  504. package/build/mobile/image/index.native.js.map +1 -1
  505. package/build/mobile/image/utils/index.native.js.map +1 -1
  506. package/build/mobile/keyboard-avoiding-view/index.android.js.map +1 -1
  507. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  508. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  509. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  510. package/build/mobile/keyboard-aware-flat-list/use-keyboard-offset.native.js.map +1 -1
  511. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -1
  512. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -1
  513. package/build/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -1
  514. package/build/mobile/keyboard-aware-flat-list/use-text-input-caret-position.native.js.map +1 -1
  515. package/build/mobile/keyboard-aware-flat-list/use-text-input-offset.native.js.map +1 -1
  516. package/build/mobile/layout-animation/index.native.js.map +1 -1
  517. package/build/mobile/link-picker/index.native.js.map +1 -1
  518. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  519. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  520. package/build/mobile/link-settings/index.native.js.map +1 -1
  521. package/build/mobile/link-settings/link-rel.native.js.map +1 -1
  522. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  523. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  524. package/build/mobile/media-edit/index.native.js.map +1 -1
  525. package/build/mobile/picker/index.android.js.map +1 -1
  526. package/build/mobile/picker/index.ios.js.map +1 -1
  527. package/build/mobile/segmented-control/index.native.js.map +1 -1
  528. package/build/mobile/utils/alignments.native.js.map +1 -1
  529. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  530. package/build/mobile/utils/index.native.js.map +1 -1
  531. package/build/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
  532. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  533. package/build/modal/aria-helper.js.map +1 -1
  534. package/build/modal/index.js +1 -1
  535. package/build/modal/index.js.map +1 -1
  536. package/build/modal/types.js.map +1 -1
  537. package/build/navigable-container/container.js +4 -0
  538. package/build/navigable-container/container.js.map +1 -1
  539. package/build/navigable-container/index.js.map +1 -1
  540. package/build/navigable-container/menu.js.map +1 -1
  541. package/build/navigable-container/tabbable.js.map +1 -1
  542. package/build/navigable-container/types.js.map +1 -1
  543. package/build/navigation/back-button/index.js +4 -0
  544. package/build/navigation/back-button/index.js.map +1 -1
  545. package/build/navigation/constants.js.map +1 -1
  546. package/build/navigation/context.js.map +1 -1
  547. package/build/navigation/group/context.js +4 -0
  548. package/build/navigation/group/context.js.map +1 -1
  549. package/build/navigation/group/index.js +4 -0
  550. package/build/navigation/group/index.js.map +1 -1
  551. package/build/navigation/index.js +2 -0
  552. package/build/navigation/index.js.map +1 -1
  553. package/build/navigation/item/base-content.js.map +1 -1
  554. package/build/navigation/item/base.js.map +1 -1
  555. package/build/navigation/item/index.js +4 -0
  556. package/build/navigation/item/index.js.map +1 -1
  557. package/build/navigation/item/use-navigation-tree-item.js.map +1 -1
  558. package/build/navigation/menu/context.js +4 -0
  559. package/build/navigation/menu/context.js.map +1 -1
  560. package/build/navigation/menu/index.js +3 -0
  561. package/build/navigation/menu/index.js.map +1 -1
  562. package/build/navigation/menu/menu-title-search.js.map +1 -1
  563. package/build/navigation/menu/menu-title.js.map +1 -1
  564. package/build/navigation/menu/search-no-results-found.js.map +1 -1
  565. package/build/navigation/menu/use-navigation-tree-menu.js.map +1 -1
  566. package/build/navigation/styles/navigation-styles.js +19 -13
  567. package/build/navigation/styles/navigation-styles.js.map +1 -1
  568. package/build/navigation/types.js.map +1 -1
  569. package/build/navigation/use-create-navigation-tree.js.map +1 -1
  570. package/build/navigation/use-navigation-tree-nodes.js.map +1 -1
  571. package/build/navigation/utils.js.map +1 -1
  572. package/build/navigator/context.js +4 -0
  573. package/build/navigator/context.js.map +1 -1
  574. package/build/navigator/index.js.map +1 -1
  575. package/build/navigator/navigator-back-button/component.js.map +1 -1
  576. package/build/navigator/navigator-back-button/hook.js +4 -0
  577. package/build/navigator/navigator-back-button/hook.js.map +1 -1
  578. package/build/navigator/navigator-back-button/index.js.map +1 -1
  579. package/build/navigator/navigator-button/component.js.map +1 -1
  580. package/build/navigator/navigator-button/hook.js +4 -0
  581. package/build/navigator/navigator-button/hook.js.map +1 -1
  582. package/build/navigator/navigator-button/index.js.map +1 -1
  583. package/build/navigator/navigator-provider/component.js +171 -121
  584. package/build/navigator/navigator-provider/component.js.map +1 -1
  585. package/build/navigator/navigator-provider/index.js.map +1 -1
  586. package/build/navigator/navigator-screen/component.js +7 -3
  587. package/build/navigator/navigator-screen/component.js.map +1 -1
  588. package/build/navigator/navigator-screen/index.js.map +1 -1
  589. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  590. package/build/navigator/navigator-to-parent-button/index.js.map +1 -1
  591. package/build/navigator/styles.js +3 -1
  592. package/build/navigator/styles.js.map +1 -1
  593. package/build/navigator/types.js.map +1 -1
  594. package/build/navigator/use-navigator.js.map +1 -1
  595. package/build/navigator/utils/router.js +4 -0
  596. package/build/navigator/utils/router.js.map +1 -1
  597. package/build/notice/index.js.map +1 -1
  598. package/build/notice/index.native.js.map +1 -1
  599. package/build/notice/list.js.map +1 -1
  600. package/build/notice/list.native.js.map +1 -1
  601. package/build/notice/types.js.map +1 -1
  602. package/build/number-control/index.js +1 -1
  603. package/build/number-control/index.js.map +1 -1
  604. package/build/number-control/styles/number-control-styles.js +7 -3
  605. package/build/number-control/styles/number-control-styles.js.map +1 -1
  606. package/build/number-control/types.js.map +1 -1
  607. package/build/palette-edit/index.js.map +1 -1
  608. package/build/palette-edit/styles.js +15 -11
  609. package/build/palette-edit/styles.js.map +1 -1
  610. package/build/palette-edit/types.js.map +1 -1
  611. package/build/panel/actions.native.js.map +1 -1
  612. package/build/panel/body.js +4 -0
  613. package/build/panel/body.js.map +1 -1
  614. package/build/panel/body.native.js.map +1 -1
  615. package/build/panel/bottom-separator-cover.native.js.map +1 -1
  616. package/build/panel/header.js.map +1 -1
  617. package/build/panel/index.js.map +1 -1
  618. package/build/panel/row.js +4 -0
  619. package/build/panel/row.js.map +1 -1
  620. package/build/panel/types.js.map +1 -1
  621. package/build/placeholder/index.js.map +1 -1
  622. package/build/placeholder/types.js.map +1 -1
  623. package/build/popover/index.js +9 -34
  624. package/build/popover/index.js.map +1 -1
  625. package/build/popover/overlay-middlewares.js.map +1 -1
  626. package/build/popover/types.js.map +1 -1
  627. package/build/popover/utils.js.map +1 -1
  628. package/build/private-apis.js.map +1 -1
  629. package/build/private-apis.native.js.map +1 -1
  630. package/build/progress-bar/index.js +5 -3
  631. package/build/progress-bar/index.js.map +1 -1
  632. package/build/progress-bar/styles.js +21 -12
  633. package/build/progress-bar/styles.js.map +1 -1
  634. package/build/progress-bar/types.js.map +1 -1
  635. package/build/query-controls/author-select.js.map +1 -1
  636. package/build/query-controls/category-select.js.map +1 -1
  637. package/build/query-controls/index.js.map +1 -1
  638. package/build/query-controls/index.native.js.map +1 -1
  639. package/build/query-controls/terms.js.map +1 -1
  640. package/build/query-controls/types.js.map +1 -1
  641. package/build/radio-control/index.js.map +1 -1
  642. package/build/radio-control/index.native.js.map +1 -1
  643. package/build/radio-control/types.js.map +1 -1
  644. package/build/radio-group/context.js.map +1 -1
  645. package/build/radio-group/index.js +1 -1
  646. package/build/radio-group/index.js.map +1 -1
  647. package/build/radio-group/radio.js +1 -1
  648. package/build/radio-group/radio.js.map +1 -1
  649. package/build/radio-group/types.js.map +1 -1
  650. package/build/range-control/index.js.map +1 -1
  651. package/build/range-control/index.native.js.map +1 -1
  652. package/build/range-control/input-range.js.map +1 -1
  653. package/build/range-control/mark.js.map +1 -1
  654. package/build/range-control/rail.js.map +1 -1
  655. package/build/range-control/styles/range-control-styles.js +49 -45
  656. package/build/range-control/styles/range-control-styles.js.map +1 -1
  657. package/build/range-control/tooltip.js.map +1 -1
  658. package/build/range-control/types.js.map +1 -1
  659. package/build/range-control/utils.js.map +1 -1
  660. package/build/resizable-box/index.js.map +1 -1
  661. package/build/resizable-box/index.native.js.map +1 -1
  662. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  663. package/build/resizable-box/resize-tooltip/label.js +4 -0
  664. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  665. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +9 -5
  666. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  667. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  668. package/build/responsive-wrapper/index.js +4 -0
  669. package/build/responsive-wrapper/index.js.map +1 -1
  670. package/build/responsive-wrapper/types.js.map +1 -1
  671. package/build/sandbox/index.js +4 -0
  672. package/build/sandbox/index.js.map +1 -1
  673. package/build/sandbox/index.native.js.map +1 -1
  674. package/build/sandbox/types.js.map +1 -1
  675. package/build/scroll-lock/index.js.map +1 -1
  676. package/build/scrollable/component.js.map +1 -1
  677. package/build/scrollable/hook.js +5 -1
  678. package/build/scrollable/hook.js.map +1 -1
  679. package/build/scrollable/index.js.map +1 -1
  680. package/build/scrollable/styles.js +5 -1
  681. package/build/scrollable/styles.js.map +1 -1
  682. package/build/scrollable/types.js.map +1 -1
  683. package/build/search-control/index.js.map +1 -1
  684. package/build/search-control/index.native.js.map +1 -1
  685. package/build/search-control/styles.js +2 -2
  686. package/build/search-control/styles.js.map +1 -1
  687. package/build/search-control/types.js.map +1 -1
  688. package/build/select-control/chevron-down.js.map +1 -1
  689. package/build/select-control/index.js +0 -15
  690. package/build/select-control/index.js.map +1 -1
  691. package/build/select-control/index.native.js.map +1 -1
  692. package/build/select-control/styles/select-control-styles.js +3 -3
  693. package/build/select-control/styles/select-control-styles.js.map +1 -1
  694. package/build/select-control/types.js.map +1 -1
  695. package/build/shortcut/index.js.map +1 -1
  696. package/build/shortcut/types.js.map +1 -1
  697. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  698. package/build/slot-fill/bubbles-virtually/observable-map.js +68 -0
  699. package/build/slot-fill/bubbles-virtually/observable-map.js.map +1 -0
  700. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +5 -5
  701. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  702. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -12
  703. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  704. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  705. package/build/slot-fill/bubbles-virtually/use-slot-fills.js +2 -12
  706. package/build/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
  707. package/build/slot-fill/bubbles-virtually/use-slot.js +2 -12
  708. package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  709. package/build/slot-fill/context.js +4 -0
  710. package/build/slot-fill/context.js.map +1 -1
  711. package/build/slot-fill/fill.js.map +1 -1
  712. package/build/slot-fill/index.js.map +1 -1
  713. package/build/slot-fill/index.native.js.map +1 -1
  714. package/build/slot-fill/provider.js.map +1 -1
  715. package/build/slot-fill/slot.js.map +1 -1
  716. package/build/slot-fill/types.js.map +1 -1
  717. package/build/slot-fill/use-slot.js.map +1 -1
  718. package/build/snackbar/index.js +1 -1
  719. package/build/snackbar/index.js.map +1 -1
  720. package/build/snackbar/list.js.map +1 -1
  721. package/build/snackbar/types.js.map +1 -1
  722. package/build/spacer/component.js.map +1 -1
  723. package/build/spacer/hook.js +4 -0
  724. package/build/spacer/hook.js.map +1 -1
  725. package/build/spacer/index.js.map +1 -1
  726. package/build/spacer/types.js.map +1 -1
  727. package/build/spinner/index.js.map +1 -1
  728. package/build/spinner/index.native.js.map +1 -1
  729. package/build/spinner/styles.js +8 -4
  730. package/build/spinner/styles.js.map +1 -1
  731. package/build/style-provider/index.js +5 -1
  732. package/build/style-provider/index.js.map +1 -1
  733. package/build/style-provider/index.native.js.map +1 -1
  734. package/build/style-provider/types.js.map +1 -1
  735. package/build/surface/component.js.map +1 -1
  736. package/build/surface/hook.js +1 -1
  737. package/build/surface/hook.js.map +1 -1
  738. package/build/surface/index.js.map +1 -1
  739. package/build/surface/styles.js.map +1 -1
  740. package/build/surface/types.js.map +1 -1
  741. package/build/tab-panel/index.js +1 -1
  742. package/build/tab-panel/index.js.map +1 -1
  743. package/build/tab-panel/types.js.map +1 -1
  744. package/build/tabs/context.js +4 -0
  745. package/build/tabs/context.js.map +1 -1
  746. package/build/tabs/index.js +12 -1
  747. package/build/tabs/index.js.map +1 -1
  748. package/build/tabs/styles.js +10 -5
  749. package/build/tabs/styles.js.map +1 -1
  750. package/build/tabs/tab.js +4 -0
  751. package/build/tabs/tab.js.map +1 -1
  752. package/build/tabs/tablist.js +5 -1
  753. package/build/tabs/tablist.js.map +1 -1
  754. package/build/tabs/tabpanel.js +4 -0
  755. package/build/tabs/tabpanel.js.map +1 -1
  756. package/build/tabs/types.js.map +1 -1
  757. package/build/text/component.js.map +1 -1
  758. package/build/text/get-line-height.js.map +1 -1
  759. package/build/text/hook.js +8 -2
  760. package/build/text/hook.js.map +1 -1
  761. package/build/text/index.js.map +1 -1
  762. package/build/text/index.native.js.map +1 -1
  763. package/build/text/styles/emotion-css.native.js.map +1 -1
  764. package/build/text/styles/font-family.native.js.map +1 -1
  765. package/build/text/styles/text-mixins.native.js.map +1 -1
  766. package/build/text/styles.js +12 -8
  767. package/build/text/styles.js.map +1 -1
  768. package/build/text/types.js.map +1 -1
  769. package/build/text/utils.js +23 -0
  770. package/build/text/utils.js.map +1 -1
  771. package/build/text-control/index.js.map +1 -1
  772. package/build/text-control/index.native.js.map +1 -1
  773. package/build/text-control/types.js.map +1 -1
  774. package/build/text-highlight/index.js.map +1 -1
  775. package/build/text-highlight/types.js.map +1 -1
  776. package/build/textarea-control/index.js.map +1 -1
  777. package/build/textarea-control/index.native.js.map +1 -1
  778. package/build/textarea-control/styles/textarea-control-styles.js +1 -1
  779. package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
  780. package/build/textarea-control/types.js.map +1 -1
  781. package/build/theme/color-algorithms.js +4 -0
  782. package/build/theme/color-algorithms.js.map +1 -1
  783. package/build/theme/index.js +4 -0
  784. package/build/theme/index.js.map +1 -1
  785. package/build/theme/styles.js +8 -2
  786. package/build/theme/styles.js.map +1 -1
  787. package/build/theme/types.js.map +1 -1
  788. package/build/tip/index.js +4 -0
  789. package/build/tip/index.js.map +1 -1
  790. package/build/tip/types.js.map +1 -1
  791. package/build/toggle-control/index.js +6 -4
  792. package/build/toggle-control/index.js.map +1 -1
  793. package/build/toggle-control/index.native.js.map +1 -1
  794. package/build/toggle-control/types.js.map +1 -1
  795. package/build/toggle-group-control/context.js +4 -0
  796. package/build/toggle-group-control/context.js.map +1 -1
  797. package/build/toggle-group-control/index.js.map +1 -1
  798. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  799. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +1 -1
  800. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  801. package/build/toggle-group-control/toggle-group-control/component.js +5 -1
  802. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  803. package/build/toggle-group-control/toggle-group-control/index.js.map +1 -1
  804. package/build/toggle-group-control/toggle-group-control/styles.js +6 -2
  805. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  806. package/build/toggle-group-control/toggle-group-control/utils.js +4 -0
  807. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  808. package/build/toggle-group-control/toggle-group-control-option/component.js +4 -0
  809. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  810. package/build/toggle-group-control/toggle-group-control-option/index.js.map +1 -1
  811. package/build/toggle-group-control/toggle-group-control-option-base/component.js +6 -2
  812. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  813. package/build/toggle-group-control/toggle-group-control-option-base/index.js.map +1 -1
  814. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +7 -3
  815. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  816. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +4 -0
  817. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  818. package/build/toggle-group-control/toggle-group-control-option-icon/index.js.map +1 -1
  819. package/build/toggle-group-control/types.js.map +1 -1
  820. package/build/toolbar/index.js.map +1 -1
  821. package/build/toolbar/toolbar/index.js.map +1 -1
  822. package/build/toolbar/toolbar/toolbar-container.js +1 -1
  823. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  824. package/build/toolbar/toolbar/toolbar-container.native.js.map +1 -1
  825. package/build/toolbar/toolbar/types.js.map +1 -1
  826. package/build/toolbar/toolbar-button/index.js.map +1 -1
  827. package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
  828. package/build/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
  829. package/build/toolbar/toolbar-button/types.js.map +1 -1
  830. package/build/toolbar/toolbar-context/index.js.map +1 -1
  831. package/build/toolbar/toolbar-dropdown-menu/index.js +4 -0
  832. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  833. package/build/toolbar/toolbar-group/index.js.map +1 -1
  834. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  835. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  836. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  837. package/build/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
  838. package/build/toolbar/toolbar-group/types.js.map +1 -1
  839. package/build/toolbar/toolbar-item/index.js +1 -1
  840. package/build/toolbar/toolbar-item/index.js.map +1 -1
  841. package/build/toolbar/toolbar-item/index.native.js.map +1 -1
  842. package/build/toolbar/toolbar-item/types.js.map +1 -1
  843. package/build/tools-panel/context.js +4 -0
  844. package/build/tools-panel/context.js.map +1 -1
  845. package/build/tools-panel/index.js.map +1 -1
  846. package/build/tools-panel/styles.js +7 -3
  847. package/build/tools-panel/styles.js.map +1 -1
  848. package/build/tools-panel/tools-panel/component.js.map +1 -1
  849. package/build/tools-panel/tools-panel/hook.js +1 -1
  850. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  851. package/build/tools-panel/tools-panel/index.js.map +1 -1
  852. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  853. package/build/tools-panel/tools-panel-header/hook.js +1 -1
  854. package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
  855. package/build/tools-panel/tools-panel-header/index.js.map +1 -1
  856. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  857. package/build/tools-panel/tools-panel-item/hook.js +1 -1
  858. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  859. package/build/tools-panel/tools-panel-item/index.js.map +1 -1
  860. package/build/tools-panel/types.js.map +1 -1
  861. package/build/tooltip/index.js +5 -1
  862. package/build/tooltip/index.js.map +1 -1
  863. package/build/tooltip/index.native.js.map +1 -1
  864. package/build/tooltip/types.js.map +1 -1
  865. package/build/tree-grid/cell.js.map +1 -1
  866. package/build/tree-grid/index.js.map +1 -1
  867. package/build/tree-grid/item.js.map +1 -1
  868. package/build/tree-grid/roving-tab-index-context.js.map +1 -1
  869. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  870. package/build/tree-grid/roving-tab-index.js.map +1 -1
  871. package/build/tree-grid/row.js +4 -0
  872. package/build/tree-grid/row.js.map +1 -1
  873. package/build/tree-grid/types.js.map +1 -1
  874. package/build/tree-select/index.js.map +1 -1
  875. package/build/tree-select/types.js.map +1 -1
  876. package/build/truncate/component.js.map +1 -1
  877. package/build/truncate/hook.js +9 -2
  878. package/build/truncate/hook.js.map +1 -1
  879. package/build/truncate/index.js.map +1 -1
  880. package/build/truncate/styles.js +3 -1
  881. package/build/truncate/styles.js.map +1 -1
  882. package/build/truncate/types.js.map +1 -1
  883. package/build/truncate/utils.js.map +1 -1
  884. package/build/unit-control/index.js +4 -0
  885. package/build/unit-control/index.js.map +1 -1
  886. package/build/unit-control/index.native.js.map +1 -1
  887. package/build/unit-control/styles/unit-control-styles.js +6 -3
  888. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  889. package/build/unit-control/types.js.map +1 -1
  890. package/build/unit-control/unit-select-control.js +4 -0
  891. package/build/unit-control/unit-select-control.js.map +1 -1
  892. package/build/unit-control/utils.js +4 -0
  893. package/build/unit-control/utils.js.map +1 -1
  894. package/build/utils/base-label.js +3 -1
  895. package/build/utils/base-label.js.map +1 -1
  896. package/build/utils/box-sizing.js +3 -1
  897. package/build/utils/box-sizing.js.map +1 -1
  898. package/build/utils/breakpoint-values.js.map +1 -1
  899. package/build/utils/breakpoint.js.map +1 -1
  900. package/build/utils/colors-values.js.map +1 -1
  901. package/build/utils/colors.js.map +1 -1
  902. package/build/utils/config-values.js.map +1 -1
  903. package/build/utils/font-size.js.map +1 -1
  904. package/build/utils/font-values.js.map +1 -1
  905. package/build/utils/font.js.map +1 -1
  906. package/build/utils/get-valid-children.js.map +1 -1
  907. package/build/utils/hooks/emotion.d.js.map +1 -1
  908. package/build/utils/hooks/index.js.map +1 -1
  909. package/build/utils/hooks/use-controlled-state.js.map +1 -1
  910. package/build/utils/hooks/use-controlled-value.js.map +1 -1
  911. package/build/utils/hooks/use-cx.js +2 -0
  912. package/build/utils/hooks/use-cx.js.map +1 -1
  913. package/build/utils/hooks/use-update-effect.js.map +1 -1
  914. package/build/utils/index.js.map +1 -1
  915. package/build/utils/input/base.js.map +1 -1
  916. package/build/utils/input/index.js.map +1 -1
  917. package/build/utils/input/input-control.js.map +1 -1
  918. package/build/utils/math.js.map +1 -1
  919. package/build/utils/reduce-motion.js +4 -0
  920. package/build/utils/reduce-motion.js.map +1 -1
  921. package/build/utils/rtl.js +2 -2
  922. package/build/utils/rtl.js.map +1 -1
  923. package/build/utils/space.js.map +1 -1
  924. package/build/utils/strings.js.map +1 -1
  925. package/build/utils/style-mixins.js.map +1 -1
  926. package/build/utils/types.js.map +1 -1
  927. package/build/utils/unit-values.js.map +1 -1
  928. package/build/utils/use-deprecated-props.js.map +1 -1
  929. package/build/utils/use-responsive-value.js.map +1 -1
  930. package/build/utils/values.js.map +1 -1
  931. package/build/utils/with-ignore-ime-events.js.map +1 -1
  932. package/build/v-stack/component.js.map +1 -1
  933. package/build/v-stack/hook.js.map +1 -1
  934. package/build/v-stack/index.js.map +1 -1
  935. package/build/v-stack/types.js.map +1 -1
  936. package/build/view/component.js +5 -1
  937. package/build/view/component.js.map +1 -1
  938. package/build/view/index.js.map +1 -1
  939. package/build/view/types.js.map +1 -1
  940. package/build/visually-hidden/component.js.map +1 -1
  941. package/build/visually-hidden/index.js.map +1 -1
  942. package/build/visually-hidden/styles.js.map +1 -1
  943. package/build/visually-hidden/types.js.map +1 -1
  944. package/build/z-stack/component.js.map +1 -1
  945. package/build/z-stack/index.js.map +1 -1
  946. package/build/z-stack/styles.js +5 -3
  947. package/build/z-stack/styles.js.map +1 -1
  948. package/build/z-stack/types.js.map +1 -1
  949. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  950. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  951. package/build-module/alignment-matrix-control/index.js.map +1 -1
  952. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +3 -3
  953. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +1 -1
  954. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +4 -4
  955. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  956. package/build-module/alignment-matrix-control/types.js.map +1 -1
  957. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  958. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  959. package/build-module/angle-picker-control/index.js.map +1 -1
  960. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +3 -3
  961. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  962. package/build-module/angle-picker-control/types.js.map +1 -1
  963. package/build-module/animate/index.js.map +1 -1
  964. package/build-module/animate/types.js.map +1 -1
  965. package/build-module/animation/index.js.map +1 -1
  966. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  967. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  968. package/build-module/autocomplete/background-view.android.js.map +1 -1
  969. package/build-module/autocomplete/background-view.ios.js.map +1 -1
  970. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  971. package/build-module/autocomplete/index.js.map +1 -1
  972. package/build-module/autocomplete/types.js.map +1 -1
  973. package/build-module/base-control/hooks.js.map +1 -1
  974. package/build-module/base-control/index.js.map +1 -1
  975. package/build-module/base-control/index.native.js.map +1 -1
  976. package/build-module/base-control/styles/base-control-styles.js +5 -5
  977. package/build-module/base-control/styles/base-control-styles.js.map +1 -1
  978. package/build-module/base-control/types.js.map +1 -1
  979. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  980. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  981. package/build-module/border-box-control/border-box-control/index.js.map +1 -1
  982. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  983. package/build-module/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  984. package/build-module/border-box-control/border-box-control-linked-button/index.js.map +1 -1
  985. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  986. package/build-module/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  987. package/build-module/border-box-control/border-box-control-split-controls/index.js.map +1 -1
  988. package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  989. package/build-module/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
  990. package/build-module/border-box-control/border-box-control-visualizer/index.js.map +1 -1
  991. package/build-module/border-box-control/index.js.map +1 -1
  992. package/build-module/border-box-control/styles.js.map +1 -1
  993. package/build-module/border-box-control/types.js.map +1 -1
  994. package/build-module/border-box-control/utils.js.map +1 -1
  995. package/build-module/border-control/border-control/component.js.map +1 -1
  996. package/build-module/border-control/border-control/hook.js.map +1 -1
  997. package/build-module/border-control/border-control/index.js.map +1 -1
  998. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  999. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  1000. package/build-module/border-control/border-control-dropdown/index.js.map +1 -1
  1001. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  1002. package/build-module/border-control/border-control-style-picker/index.js.map +1 -1
  1003. package/build-module/border-control/index.js.map +1 -1
  1004. package/build-module/border-control/styles.js.map +1 -1
  1005. package/build-module/border-control/types.js.map +1 -1
  1006. package/build-module/box-control/all-input-control.js.map +1 -1
  1007. package/build-module/box-control/axial-input-controls.js.map +1 -1
  1008. package/build-module/box-control/icon.js.map +1 -1
  1009. package/build-module/box-control/index.js.map +1 -1
  1010. package/build-module/box-control/input-controls.js.map +1 -1
  1011. package/build-module/box-control/linked-button.js.map +1 -1
  1012. package/build-module/box-control/styles/box-control-icon-styles.js +3 -3
  1013. package/build-module/box-control/styles/box-control-icon-styles.js.map +1 -1
  1014. package/build-module/box-control/styles/box-control-styles.js +1 -1
  1015. package/build-module/box-control/styles/box-control-styles.js.map +1 -1
  1016. package/build-module/box-control/types.js.map +1 -1
  1017. package/build-module/box-control/utils.js.map +1 -1
  1018. package/build-module/button/deprecated.js.map +1 -1
  1019. package/build-module/button/index.js +1 -1
  1020. package/build-module/button/index.js.map +1 -1
  1021. package/build-module/button/index.native.js.map +1 -1
  1022. package/build-module/button/types.js.map +1 -1
  1023. package/build-module/button-group/index.js.map +1 -1
  1024. package/build-module/button-group/types.js.map +1 -1
  1025. package/build-module/card/card/component.js.map +1 -1
  1026. package/build-module/card/card/hook.js.map +1 -1
  1027. package/build-module/card/card/index.js.map +1 -1
  1028. package/build-module/card/card-body/component.js.map +1 -1
  1029. package/build-module/card/card-body/hook.js.map +1 -1
  1030. package/build-module/card/card-body/index.js.map +1 -1
  1031. package/build-module/card/card-divider/component.js.map +1 -1
  1032. package/build-module/card/card-divider/hook.js.map +1 -1
  1033. package/build-module/card/card-divider/index.js.map +1 -1
  1034. package/build-module/card/card-footer/component.js.map +1 -1
  1035. package/build-module/card/card-footer/hook.js.map +1 -1
  1036. package/build-module/card/card-footer/index.js.map +1 -1
  1037. package/build-module/card/card-header/component.js.map +1 -1
  1038. package/build-module/card/card-header/hook.js.map +1 -1
  1039. package/build-module/card/card-header/index.js.map +1 -1
  1040. package/build-module/card/card-media/component.js.map +1 -1
  1041. package/build-module/card/card-media/hook.js.map +1 -1
  1042. package/build-module/card/card-media/index.js.map +1 -1
  1043. package/build-module/card/context.js.map +1 -1
  1044. package/build-module/card/index.js.map +1 -1
  1045. package/build-module/card/styles.js.map +1 -1
  1046. package/build-module/card/types.js.map +1 -1
  1047. package/build-module/checkbox-control/index.js.map +1 -1
  1048. package/build-module/checkbox-control/types.js.map +1 -1
  1049. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  1050. package/build-module/circular-option-picker/circular-option-picker-context.js.map +1 -1
  1051. package/build-module/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
  1052. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  1053. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  1054. package/build-module/circular-option-picker/index.js.map +1 -1
  1055. package/build-module/circular-option-picker/types.js.map +1 -1
  1056. package/build-module/clipboard-button/index.js.map +1 -1
  1057. package/build-module/clipboard-button/types.js.map +1 -1
  1058. package/build-module/color-control/index.native.js.map +1 -1
  1059. package/build-module/color-indicator/index.js.map +1 -1
  1060. package/build-module/color-indicator/index.native.js.map +1 -1
  1061. package/build-module/color-indicator/types.js.map +1 -1
  1062. package/build-module/color-palette/index.js.map +1 -1
  1063. package/build-module/color-palette/index.native.js +4 -3
  1064. package/build-module/color-palette/index.native.js.map +1 -1
  1065. package/build-module/color-palette/styles.js.map +1 -1
  1066. package/build-module/color-palette/types.js.map +1 -1
  1067. package/build-module/color-palette/utils.js.map +1 -1
  1068. package/build-module/color-picker/color-copy-button.js.map +1 -1
  1069. package/build-module/color-picker/color-input.js.map +1 -1
  1070. package/build-module/color-picker/component.js +3 -13
  1071. package/build-module/color-picker/component.js.map +1 -1
  1072. package/build-module/color-picker/hex-input.js.map +1 -1
  1073. package/build-module/color-picker/hsl-input.js.map +1 -1
  1074. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -1
  1075. package/build-module/color-picker/hue-picker.native.js.map +1 -1
  1076. package/build-module/color-picker/index.js.map +1 -1
  1077. package/build-module/color-picker/index.native.js.map +1 -1
  1078. package/build-module/color-picker/input-with-slider.js.map +1 -1
  1079. package/build-module/color-picker/legacy-adapter.js.map +1 -1
  1080. package/build-module/color-picker/picker.js +19 -78
  1081. package/build-module/color-picker/picker.js.map +1 -1
  1082. package/build-module/color-picker/rgb-input.js.map +1 -1
  1083. package/build-module/color-picker/saturation-picker.native.js.map +1 -1
  1084. package/build-module/color-picker/styles.js +2 -2
  1085. package/build-module/color-picker/styles.js.map +1 -1
  1086. package/build-module/color-picker/types.js.map +1 -1
  1087. package/build-module/color-picker/use-deprecated-props.js.map +1 -1
  1088. package/build-module/combobox-control/index.js.map +1 -1
  1089. package/build-module/combobox-control/styles.js.map +1 -1
  1090. package/build-module/combobox-control/types.js.map +1 -1
  1091. package/build-module/composite/current/index.js.map +1 -1
  1092. package/build-module/composite/index.js.map +1 -1
  1093. package/build-module/composite/legacy/index.js +6 -0
  1094. package/build-module/composite/legacy/index.js.map +1 -1
  1095. package/build-module/composite/v2.js.map +1 -1
  1096. package/build-module/confirm-dialog/component.js.map +1 -1
  1097. package/build-module/confirm-dialog/index.js.map +1 -1
  1098. package/build-module/confirm-dialog/styles.js.map +1 -1
  1099. package/build-module/confirm-dialog/types.js.map +1 -1
  1100. package/build-module/context/constants.js.map +1 -1
  1101. package/build-module/context/context-connect.js.map +1 -1
  1102. package/build-module/context/context-system-provider.js.map +1 -1
  1103. package/build-module/context/get-styled-class-name-from-key.js.map +1 -1
  1104. package/build-module/context/index.js.map +1 -1
  1105. package/build-module/context/use-context-system.js.map +1 -1
  1106. package/build-module/context/utils.js.map +1 -1
  1107. package/build-module/context/wordpress-component.js.map +1 -1
  1108. package/build-module/custom-gradient-picker/constants.js.map +1 -1
  1109. package/build-module/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
  1110. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  1111. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  1112. package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  1113. package/build-module/custom-gradient-picker/index.js.map +1 -1
  1114. package/build-module/custom-gradient-picker/index.native.js.map +1 -1
  1115. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  1116. package/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
  1117. package/build-module/custom-gradient-picker/types.js.map +1 -1
  1118. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  1119. package/build-module/custom-select-control/index.js +7 -15
  1120. package/build-module/custom-select-control/index.js.map +1 -1
  1121. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  1122. package/build-module/custom-select-control-v2/default-component/index.js +4 -2
  1123. package/build-module/custom-select-control-v2/default-component/index.js.map +1 -1
  1124. package/build-module/custom-select-control-v2/index.js +1 -2
  1125. package/build-module/custom-select-control-v2/index.js.map +1 -1
  1126. package/build-module/custom-select-control-v2/{custom-select-item.js → item.js} +2 -1
  1127. package/build-module/custom-select-control-v2/{custom-select-item.js.map → item.js.map} +1 -1
  1128. package/build-module/custom-select-control-v2/legacy-component/index.js +4 -4
  1129. package/build-module/custom-select-control-v2/legacy-component/index.js.map +1 -1
  1130. package/build-module/custom-select-control-v2/styles.js +3 -3
  1131. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  1132. package/build-module/custom-select-control-v2/types.js.map +1 -1
  1133. package/build-module/dashicon/index.js.map +1 -1
  1134. package/build-module/dashicon/index.native.js.map +1 -1
  1135. package/build-module/dashicon/types.js.map +1 -1
  1136. package/build-module/date-time/constants.js.map +1 -1
  1137. package/build-module/date-time/date/index.js.map +1 -1
  1138. package/build-module/date-time/date/styles.js +3 -3
  1139. package/build-module/date-time/date/styles.js.map +1 -1
  1140. package/build-module/date-time/date-time/index.js.map +1 -1
  1141. package/build-module/date-time/date-time/styles.js.map +1 -1
  1142. package/build-module/date-time/index.js.map +1 -1
  1143. package/build-module/date-time/time/index.js.map +1 -1
  1144. package/build-module/date-time/time/styles.js +6 -6
  1145. package/build-module/date-time/time/styles.js.map +1 -1
  1146. package/build-module/date-time/time/timezone.js.map +1 -1
  1147. package/build-module/date-time/types.js.map +1 -1
  1148. package/build-module/date-time/utils.js.map +1 -1
  1149. package/build-module/dimension-control/index.js.map +1 -1
  1150. package/build-module/dimension-control/sizes.js.map +1 -1
  1151. package/build-module/dimension-control/types.js.map +1 -1
  1152. package/build-module/disabled/index.js.map +1 -1
  1153. package/build-module/disabled/index.native.js.map +1 -1
  1154. package/build-module/disabled/styles/disabled-styles.js.map +1 -1
  1155. package/build-module/disabled/types.js.map +1 -1
  1156. package/build-module/disclosure/index.js.map +1 -1
  1157. package/build-module/disclosure/types.js.map +1 -1
  1158. package/build-module/divider/component.js +5 -0
  1159. package/build-module/divider/component.js.map +1 -1
  1160. package/build-module/divider/index.js.map +1 -1
  1161. package/build-module/divider/styles.js +1 -1
  1162. package/build-module/divider/styles.js.map +1 -1
  1163. package/build-module/divider/types.js.map +1 -1
  1164. package/build-module/draggable/index.js.map +1 -1
  1165. package/build-module/draggable/index.native.js.map +1 -1
  1166. package/build-module/draggable/types.js.map +1 -1
  1167. package/build-module/drop-zone/index.js.map +1 -1
  1168. package/build-module/drop-zone/provider.js.map +1 -1
  1169. package/build-module/drop-zone/types.js.map +1 -1
  1170. package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -1
  1171. package/build-module/dropdown/index.js.map +1 -1
  1172. package/build-module/dropdown/index.native.js.map +1 -1
  1173. package/build-module/dropdown/styles.js +1 -1
  1174. package/build-module/dropdown/styles.js.map +1 -1
  1175. package/build-module/dropdown/types.js.map +1 -1
  1176. package/build-module/dropdown-menu/index.js.map +1 -1
  1177. package/build-module/dropdown-menu/index.native.js.map +1 -1
  1178. package/build-module/dropdown-menu/types.js.map +1 -1
  1179. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  1180. package/build-module/dropdown-menu-v2/styles.js +4 -4
  1181. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  1182. package/build-module/dropdown-menu-v2/types.js.map +1 -1
  1183. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  1184. package/build-module/duotone-picker/color-list-picker/types.js.map +1 -1
  1185. package/build-module/duotone-picker/custom-duotone-bar.js.map +1 -1
  1186. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  1187. package/build-module/duotone-picker/duotone-swatch.js.map +1 -1
  1188. package/build-module/duotone-picker/index.js.map +1 -1
  1189. package/build-module/duotone-picker/types.js.map +1 -1
  1190. package/build-module/duotone-picker/utils.js.map +1 -1
  1191. package/build-module/elevation/component.js.map +1 -1
  1192. package/build-module/elevation/hook.js.map +1 -1
  1193. package/build-module/elevation/index.js.map +1 -1
  1194. package/build-module/elevation/styles.js.map +1 -1
  1195. package/build-module/elevation/types.js.map +1 -1
  1196. package/build-module/external-link/index.js +8 -10
  1197. package/build-module/external-link/index.js.map +1 -1
  1198. package/build-module/external-link/index.native.js.map +1 -1
  1199. package/build-module/external-link/types.js.map +1 -1
  1200. package/build-module/flex/context.js.map +1 -1
  1201. package/build-module/flex/flex/component.js.map +1 -1
  1202. package/build-module/flex/flex/hook.js.map +1 -1
  1203. package/build-module/flex/flex/index.js.map +1 -1
  1204. package/build-module/flex/flex-block/component.js.map +1 -1
  1205. package/build-module/flex/flex-block/hook.js.map +1 -1
  1206. package/build-module/flex/flex-block/index.js.map +1 -1
  1207. package/build-module/flex/flex-item/component.js.map +1 -1
  1208. package/build-module/flex/flex-item/hook.js.map +1 -1
  1209. package/build-module/flex/flex-item/index.js.map +1 -1
  1210. package/build-module/flex/index.js.map +1 -1
  1211. package/build-module/flex/styles.js.map +1 -1
  1212. package/build-module/flex/types.js.map +1 -1
  1213. package/build-module/focal-point-picker/controls.js.map +1 -1
  1214. package/build-module/focal-point-picker/focal-point.js.map +1 -1
  1215. package/build-module/focal-point-picker/focal-point.native.js.map +1 -1
  1216. package/build-module/focal-point-picker/grid.js.map +1 -1
  1217. package/build-module/focal-point-picker/index.js.map +1 -1
  1218. package/build-module/focal-point-picker/index.native.js.map +1 -1
  1219. package/build-module/focal-point-picker/media.js.map +1 -1
  1220. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +5 -5
  1221. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  1222. package/build-module/focal-point-picker/styles/focal-point-style.js +1 -1
  1223. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  1224. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  1225. package/build-module/focal-point-picker/types.js.map +1 -1
  1226. package/build-module/focal-point-picker/utils.js.map +1 -1
  1227. package/build-module/focusable-iframe/index.js.map +1 -1
  1228. package/build-module/focusable-iframe/types.js.map +1 -1
  1229. package/build-module/font-size-picker/constants.js.map +1 -1
  1230. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  1231. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  1232. package/build-module/font-size-picker/index.js.map +1 -1
  1233. package/build-module/font-size-picker/index.native.js.map +1 -1
  1234. package/build-module/font-size-picker/styles.js +2 -2
  1235. package/build-module/font-size-picker/styles.js.map +1 -1
  1236. package/build-module/font-size-picker/types.js.map +1 -1
  1237. package/build-module/font-size-picker/utils.js.map +1 -1
  1238. package/build-module/footer-message-control/index.native.js.map +1 -1
  1239. package/build-module/form-file-upload/index.js.map +1 -1
  1240. package/build-module/form-file-upload/types.js.map +1 -1
  1241. package/build-module/form-toggle/index.js +8 -3
  1242. package/build-module/form-toggle/index.js.map +1 -1
  1243. package/build-module/form-toggle/types.js.map +1 -1
  1244. package/build-module/form-token-field/index.js.map +1 -1
  1245. package/build-module/form-token-field/styles.js.map +1 -1
  1246. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  1247. package/build-module/form-token-field/token-input.js.map +1 -1
  1248. package/build-module/form-token-field/token.js.map +1 -1
  1249. package/build-module/form-token-field/types.js.map +1 -1
  1250. package/build-module/gradient-picker/index.js.map +1 -1
  1251. package/build-module/gradient-picker/types.js.map +1 -1
  1252. package/build-module/grid/component.js.map +1 -1
  1253. package/build-module/grid/hook.js.map +1 -1
  1254. package/build-module/grid/index.js.map +1 -1
  1255. package/build-module/grid/types.js.map +1 -1
  1256. package/build-module/grid/utils.js.map +1 -1
  1257. package/build-module/guide/icons.js.map +1 -1
  1258. package/build-module/guide/index.js.map +1 -1
  1259. package/build-module/guide/page-control.js.map +1 -1
  1260. package/build-module/guide/page.js.map +1 -1
  1261. package/build-module/guide/types.js.map +1 -1
  1262. package/build-module/h-stack/component.js.map +1 -1
  1263. package/build-module/h-stack/hook.js.map +1 -1
  1264. package/build-module/h-stack/index.js.map +1 -1
  1265. package/build-module/h-stack/types.js.map +1 -1
  1266. package/build-module/h-stack/utils.js.map +1 -1
  1267. package/build-module/heading/component.js.map +1 -1
  1268. package/build-module/heading/hook.js.map +1 -1
  1269. package/build-module/heading/index.js.map +1 -1
  1270. package/build-module/heading/types.js.map +1 -1
  1271. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  1272. package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
  1273. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  1274. package/build-module/higher-order/with-filters/index.js.map +1 -1
  1275. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  1276. package/build-module/higher-order/with-focus-outside/index.native.js.map +1 -1
  1277. package/build-module/higher-order/with-focus-return/index.js.map +1 -1
  1278. package/build-module/higher-order/with-notices/index.js.map +1 -1
  1279. package/build-module/higher-order/with-notices/types.js.map +1 -1
  1280. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  1281. package/build-module/icon/index.js.map +1 -1
  1282. package/build-module/index.js.map +1 -1
  1283. package/build-module/index.native.js.map +1 -1
  1284. package/build-module/input-control/backdrop.js +2 -4
  1285. package/build-module/input-control/backdrop.js.map +1 -1
  1286. package/build-module/input-control/index.js +1 -5
  1287. package/build-module/input-control/index.js.map +1 -1
  1288. package/build-module/input-control/input-base.js +1 -5
  1289. package/build-module/input-control/input-base.js.map +1 -1
  1290. package/build-module/input-control/input-field.js +2 -10
  1291. package/build-module/input-control/input-field.js.map +1 -1
  1292. package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
  1293. package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
  1294. package/build-module/input-control/label.js.map +1 -1
  1295. package/build-module/input-control/reducer/actions.js.map +1 -1
  1296. package/build-module/input-control/reducer/reducer.js.map +1 -1
  1297. package/build-module/input-control/reducer/state.js.map +1 -1
  1298. package/build-module/input-control/styles/input-control-styles.js +76 -103
  1299. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  1300. package/build-module/input-control/types.js.map +1 -1
  1301. package/build-module/input-control/utils.js.map +1 -1
  1302. package/build-module/isolated-event-container/index.js.map +1 -1
  1303. package/build-module/item-group/context.js.map +1 -1
  1304. package/build-module/item-group/index.js.map +1 -1
  1305. package/build-module/item-group/item/component.js.map +1 -1
  1306. package/build-module/item-group/item/hook.js.map +1 -1
  1307. package/build-module/item-group/item/index.js.map +1 -1
  1308. package/build-module/item-group/item-group/component.js.map +1 -1
  1309. package/build-module/item-group/item-group/hook.js.map +1 -1
  1310. package/build-module/item-group/item-group/index.js.map +1 -1
  1311. package/build-module/item-group/styles.js.map +1 -1
  1312. package/build-module/item-group/types.js.map +1 -1
  1313. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  1314. package/build-module/keyboard-shortcuts/index.native.js.map +1 -1
  1315. package/build-module/keyboard-shortcuts/types.js.map +1 -1
  1316. package/build-module/lock-unlock.js.map +1 -1
  1317. package/build-module/menu-group/index.js.map +1 -1
  1318. package/build-module/menu-group/types.js.map +1 -1
  1319. package/build-module/menu-item/index.js.map +1 -1
  1320. package/build-module/menu-item/types.js.map +1 -1
  1321. package/build-module/menu-items-choice/index.js.map +1 -1
  1322. package/build-module/menu-items-choice/types.js.map +1 -1
  1323. package/build-module/mobile/audio-player/audio-url-parser.native.js.map +1 -1
  1324. package/build-module/mobile/audio-player/index.native.js.map +1 -1
  1325. package/build-module/mobile/autocompletion-items.native.js.map +1 -1
  1326. package/build-module/mobile/badge/index.native.js.map +1 -1
  1327. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  1328. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js.map +1 -1
  1329. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  1330. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  1331. package/build-module/mobile/bottom-sheet/button.native.js.map +1 -1
  1332. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  1333. package/build-module/mobile/bottom-sheet/chevron-back.native.js.map +1 -1
  1334. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  1335. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  1336. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  1337. package/build-module/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js.map +1 -1
  1338. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  1339. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  1340. package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  1341. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  1342. package/build-module/mobile/bottom-sheet/lock-icon/index.native.js.map +1 -1
  1343. package/build-module/mobile/bottom-sheet/nav-bar/action-button.native.js.map +1 -1
  1344. package/build-module/mobile/bottom-sheet/nav-bar/apply-button.native.js.map +1 -1
  1345. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  1346. package/build-module/mobile/bottom-sheet/nav-bar/heading.native.js.map +1 -1
  1347. package/build-module/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -1
  1348. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  1349. package/build-module/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  1350. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  1351. package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  1352. package/build-module/mobile/bottom-sheet/ripple.native.js.map +1 -1
  1353. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  1354. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
  1355. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
  1356. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  1357. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  1358. package/build-module/mobile/bottom-sheet-select-control/index.native.js +5 -1
  1359. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  1360. package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  1361. package/build-module/mobile/clipboard/index.native.js.map +1 -1
  1362. package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
  1363. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  1364. package/build-module/mobile/color-settings/palette.screen.native.js +1 -0
  1365. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  1366. package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
  1367. package/build-module/mobile/color-settings/utils.native.js.map +1 -1
  1368. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  1369. package/build-module/mobile/dashicons/index.native.js.map +1 -1
  1370. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  1371. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  1372. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  1373. package/build-module/mobile/gradient/index.native.js.map +1 -1
  1374. package/build-module/mobile/gridicons/index.native.js.map +1 -1
  1375. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  1376. package/build-module/mobile/image/constants.js.map +1 -1
  1377. package/build-module/mobile/image/icon-customize.native.js.map +1 -1
  1378. package/build-module/mobile/image/icon-retry.native.js.map +1 -1
  1379. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  1380. package/build-module/mobile/image/index.native.js.map +1 -1
  1381. package/build-module/mobile/image/utils/index.native.js.map +1 -1
  1382. package/build-module/mobile/keyboard-avoiding-view/index.android.js.map +1 -1
  1383. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  1384. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  1385. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  1386. package/build-module/mobile/keyboard-aware-flat-list/use-keyboard-offset.native.js.map +1 -1
  1387. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -1
  1388. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -1
  1389. package/build-module/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -1
  1390. package/build-module/mobile/keyboard-aware-flat-list/use-text-input-caret-position.native.js.map +1 -1
  1391. package/build-module/mobile/keyboard-aware-flat-list/use-text-input-offset.native.js.map +1 -1
  1392. package/build-module/mobile/layout-animation/index.native.js.map +1 -1
  1393. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  1394. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  1395. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  1396. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  1397. package/build-module/mobile/link-settings/link-rel.native.js.map +1 -1
  1398. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  1399. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  1400. package/build-module/mobile/media-edit/index.native.js.map +1 -1
  1401. package/build-module/mobile/picker/index.android.js.map +1 -1
  1402. package/build-module/mobile/picker/index.ios.js.map +1 -1
  1403. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  1404. package/build-module/mobile/utils/alignments.native.js.map +1 -1
  1405. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  1406. package/build-module/mobile/utils/index.native.js.map +1 -1
  1407. package/build-module/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
  1408. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  1409. package/build-module/modal/aria-helper.js.map +1 -1
  1410. package/build-module/modal/index.js.map +1 -1
  1411. package/build-module/modal/types.js.map +1 -1
  1412. package/build-module/navigable-container/container.js.map +1 -1
  1413. package/build-module/navigable-container/index.js.map +1 -1
  1414. package/build-module/navigable-container/menu.js.map +1 -1
  1415. package/build-module/navigable-container/tabbable.js.map +1 -1
  1416. package/build-module/navigable-container/types.js.map +1 -1
  1417. package/build-module/navigation/back-button/index.js +4 -0
  1418. package/build-module/navigation/back-button/index.js.map +1 -1
  1419. package/build-module/navigation/constants.js.map +1 -1
  1420. package/build-module/navigation/context.js.map +1 -1
  1421. package/build-module/navigation/group/context.js.map +1 -1
  1422. package/build-module/navigation/group/index.js +4 -0
  1423. package/build-module/navigation/group/index.js.map +1 -1
  1424. package/build-module/navigation/index.js +2 -0
  1425. package/build-module/navigation/index.js.map +1 -1
  1426. package/build-module/navigation/item/base-content.js.map +1 -1
  1427. package/build-module/navigation/item/base.js.map +1 -1
  1428. package/build-module/navigation/item/index.js +4 -0
  1429. package/build-module/navigation/item/index.js.map +1 -1
  1430. package/build-module/navigation/item/use-navigation-tree-item.js.map +1 -1
  1431. package/build-module/navigation/menu/context.js.map +1 -1
  1432. package/build-module/navigation/menu/index.js +3 -0
  1433. package/build-module/navigation/menu/index.js.map +1 -1
  1434. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  1435. package/build-module/navigation/menu/menu-title.js.map +1 -1
  1436. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  1437. package/build-module/navigation/menu/use-navigation-tree-menu.js.map +1 -1
  1438. package/build-module/navigation/styles/navigation-styles.js +9 -9
  1439. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  1440. package/build-module/navigation/types.js.map +1 -1
  1441. package/build-module/navigation/use-create-navigation-tree.js.map +1 -1
  1442. package/build-module/navigation/use-navigation-tree-nodes.js.map +1 -1
  1443. package/build-module/navigation/utils.js.map +1 -1
  1444. package/build-module/navigator/context.js.map +1 -1
  1445. package/build-module/navigator/index.js.map +1 -1
  1446. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  1447. package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
  1448. package/build-module/navigator/navigator-back-button/index.js.map +1 -1
  1449. package/build-module/navigator/navigator-button/component.js.map +1 -1
  1450. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  1451. package/build-module/navigator/navigator-button/index.js.map +1 -1
  1452. package/build-module/navigator/navigator-provider/component.js +167 -121
  1453. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  1454. package/build-module/navigator/navigator-provider/index.js.map +1 -1
  1455. package/build-module/navigator/navigator-screen/component.js +2 -2
  1456. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  1457. package/build-module/navigator/navigator-screen/index.js.map +1 -1
  1458. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  1459. package/build-module/navigator/navigator-to-parent-button/index.js.map +1 -1
  1460. package/build-module/navigator/styles.js.map +1 -1
  1461. package/build-module/navigator/types.js.map +1 -1
  1462. package/build-module/navigator/use-navigator.js.map +1 -1
  1463. package/build-module/navigator/utils/router.js.map +1 -1
  1464. package/build-module/notice/index.js.map +1 -1
  1465. package/build-module/notice/index.native.js.map +1 -1
  1466. package/build-module/notice/list.js.map +1 -1
  1467. package/build-module/notice/list.native.js.map +1 -1
  1468. package/build-module/notice/types.js.map +1 -1
  1469. package/build-module/number-control/index.js.map +1 -1
  1470. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  1471. package/build-module/number-control/types.js.map +1 -1
  1472. package/build-module/palette-edit/index.js.map +1 -1
  1473. package/build-module/palette-edit/styles.js +1 -1
  1474. package/build-module/palette-edit/styles.js.map +1 -1
  1475. package/build-module/palette-edit/types.js.map +1 -1
  1476. package/build-module/panel/actions.native.js.map +1 -1
  1477. package/build-module/panel/body.js.map +1 -1
  1478. package/build-module/panel/body.native.js.map +1 -1
  1479. package/build-module/panel/bottom-separator-cover.native.js.map +1 -1
  1480. package/build-module/panel/header.js.map +1 -1
  1481. package/build-module/panel/index.js.map +1 -1
  1482. package/build-module/panel/row.js +5 -0
  1483. package/build-module/panel/row.js.map +1 -1
  1484. package/build-module/panel/types.js.map +1 -1
  1485. package/build-module/placeholder/index.js.map +1 -1
  1486. package/build-module/placeholder/types.js.map +1 -1
  1487. package/build-module/popover/index.js +9 -36
  1488. package/build-module/popover/index.js.map +1 -1
  1489. package/build-module/popover/overlay-middlewares.js.map +1 -1
  1490. package/build-module/popover/types.js.map +1 -1
  1491. package/build-module/popover/utils.js.map +1 -1
  1492. package/build-module/private-apis.js.map +1 -1
  1493. package/build-module/private-apis.native.js.map +1 -1
  1494. package/build-module/progress-bar/index.js +4 -2
  1495. package/build-module/progress-bar/index.js.map +1 -1
  1496. package/build-module/progress-bar/styles.js +16 -11
  1497. package/build-module/progress-bar/styles.js.map +1 -1
  1498. package/build-module/progress-bar/types.js.map +1 -1
  1499. package/build-module/query-controls/author-select.js.map +1 -1
  1500. package/build-module/query-controls/category-select.js.map +1 -1
  1501. package/build-module/query-controls/index.js.map +1 -1
  1502. package/build-module/query-controls/index.native.js.map +1 -1
  1503. package/build-module/query-controls/terms.js.map +1 -1
  1504. package/build-module/query-controls/types.js.map +1 -1
  1505. package/build-module/radio-control/index.js.map +1 -1
  1506. package/build-module/radio-control/index.native.js.map +1 -1
  1507. package/build-module/radio-control/types.js.map +1 -1
  1508. package/build-module/radio-group/context.js.map +1 -1
  1509. package/build-module/radio-group/index.js.map +1 -1
  1510. package/build-module/radio-group/radio.js.map +1 -1
  1511. package/build-module/radio-group/types.js.map +1 -1
  1512. package/build-module/range-control/index.js.map +1 -1
  1513. package/build-module/range-control/index.native.js.map +1 -1
  1514. package/build-module/range-control/input-range.js.map +1 -1
  1515. package/build-module/range-control/mark.js.map +1 -1
  1516. package/build-module/range-control/rail.js.map +1 -1
  1517. package/build-module/range-control/styles/range-control-styles.js +43 -43
  1518. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  1519. package/build-module/range-control/tooltip.js.map +1 -1
  1520. package/build-module/range-control/types.js.map +1 -1
  1521. package/build-module/range-control/utils.js.map +1 -1
  1522. package/build-module/resizable-box/index.js.map +1 -1
  1523. package/build-module/resizable-box/index.native.js.map +1 -1
  1524. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  1525. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  1526. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +3 -3
  1527. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  1528. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  1529. package/build-module/responsive-wrapper/index.js.map +1 -1
  1530. package/build-module/responsive-wrapper/types.js.map +1 -1
  1531. package/build-module/sandbox/index.js.map +1 -1
  1532. package/build-module/sandbox/index.native.js.map +1 -1
  1533. package/build-module/sandbox/types.js.map +1 -1
  1534. package/build-module/scroll-lock/index.js.map +1 -1
  1535. package/build-module/scrollable/component.js.map +1 -1
  1536. package/build-module/scrollable/hook.js.map +1 -1
  1537. package/build-module/scrollable/index.js.map +1 -1
  1538. package/build-module/scrollable/styles.js.map +1 -1
  1539. package/build-module/scrollable/types.js.map +1 -1
  1540. package/build-module/search-control/index.js.map +1 -1
  1541. package/build-module/search-control/index.native.js.map +1 -1
  1542. package/build-module/search-control/styles.js +1 -1
  1543. package/build-module/search-control/styles.js.map +1 -1
  1544. package/build-module/search-control/types.js.map +1 -1
  1545. package/build-module/select-control/chevron-down.js.map +1 -1
  1546. package/build-module/select-control/index.js +1 -16
  1547. package/build-module/select-control/index.js.map +1 -1
  1548. package/build-module/select-control/index.native.js.map +1 -1
  1549. package/build-module/select-control/styles/select-control-styles.js +2 -2
  1550. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  1551. package/build-module/select-control/types.js.map +1 -1
  1552. package/build-module/shortcut/index.js.map +1 -1
  1553. package/build-module/shortcut/types.js.map +1 -1
  1554. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  1555. package/build-module/slot-fill/bubbles-virtually/observable-map.js +60 -0
  1556. package/build-module/slot-fill/bubbles-virtually/observable-map.js.map +1 -0
  1557. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +3 -6
  1558. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  1559. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -12
  1560. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  1561. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  1562. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js +2 -12
  1563. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
  1564. package/build-module/slot-fill/bubbles-virtually/use-slot.js +2 -12
  1565. package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  1566. package/build-module/slot-fill/context.js.map +1 -1
  1567. package/build-module/slot-fill/fill.js.map +1 -1
  1568. package/build-module/slot-fill/index.js.map +1 -1
  1569. package/build-module/slot-fill/index.native.js.map +1 -1
  1570. package/build-module/slot-fill/provider.js.map +1 -1
  1571. package/build-module/slot-fill/slot.js.map +1 -1
  1572. package/build-module/slot-fill/types.js.map +1 -1
  1573. package/build-module/slot-fill/use-slot.js.map +1 -1
  1574. package/build-module/snackbar/index.js +1 -1
  1575. package/build-module/snackbar/index.js.map +1 -1
  1576. package/build-module/snackbar/list.js.map +1 -1
  1577. package/build-module/snackbar/types.js.map +1 -1
  1578. package/build-module/spacer/component.js.map +1 -1
  1579. package/build-module/spacer/hook.js.map +1 -1
  1580. package/build-module/spacer/index.js.map +1 -1
  1581. package/build-module/spacer/types.js.map +1 -1
  1582. package/build-module/spinner/index.js.map +1 -1
  1583. package/build-module/spinner/index.native.js.map +1 -1
  1584. package/build-module/spinner/styles.js +3 -3
  1585. package/build-module/spinner/styles.js.map +1 -1
  1586. package/build-module/style-provider/index.js.map +1 -1
  1587. package/build-module/style-provider/index.native.js.map +1 -1
  1588. package/build-module/style-provider/types.js.map +1 -1
  1589. package/build-module/surface/component.js.map +1 -1
  1590. package/build-module/surface/hook.js.map +1 -1
  1591. package/build-module/surface/index.js.map +1 -1
  1592. package/build-module/surface/styles.js.map +1 -1
  1593. package/build-module/surface/types.js.map +1 -1
  1594. package/build-module/tab-panel/index.js.map +1 -1
  1595. package/build-module/tab-panel/types.js.map +1 -1
  1596. package/build-module/tabs/context.js.map +1 -1
  1597. package/build-module/tabs/index.js +7 -0
  1598. package/build-module/tabs/index.js.map +1 -1
  1599. package/build-module/tabs/styles.js +1 -1
  1600. package/build-module/tabs/styles.js.map +1 -1
  1601. package/build-module/tabs/tab.js.map +1 -1
  1602. package/build-module/tabs/tablist.js.map +1 -1
  1603. package/build-module/tabs/tabpanel.js.map +1 -1
  1604. package/build-module/tabs/types.js.map +1 -1
  1605. package/build-module/text/component.js.map +1 -1
  1606. package/build-module/text/get-line-height.js.map +1 -1
  1607. package/build-module/text/hook.js.map +1 -1
  1608. package/build-module/text/index.js.map +1 -1
  1609. package/build-module/text/index.native.js.map +1 -1
  1610. package/build-module/text/styles/emotion-css.native.js.map +1 -1
  1611. package/build-module/text/styles/font-family.native.js.map +1 -1
  1612. package/build-module/text/styles/text-mixins.native.js.map +1 -1
  1613. package/build-module/text/styles.js +7 -7
  1614. package/build-module/text/styles.js.map +1 -1
  1615. package/build-module/text/types.js.map +1 -1
  1616. package/build-module/text/utils.js.map +1 -1
  1617. package/build-module/text-control/index.js.map +1 -1
  1618. package/build-module/text-control/index.native.js.map +1 -1
  1619. package/build-module/text-control/types.js.map +1 -1
  1620. package/build-module/text-highlight/index.js.map +1 -1
  1621. package/build-module/text-highlight/types.js.map +1 -1
  1622. package/build-module/textarea-control/index.js.map +1 -1
  1623. package/build-module/textarea-control/index.native.js.map +1 -1
  1624. package/build-module/textarea-control/styles/textarea-control-styles.js +1 -1
  1625. package/build-module/textarea-control/styles/textarea-control-styles.js.map +1 -1
  1626. package/build-module/textarea-control/types.js.map +1 -1
  1627. package/build-module/theme/color-algorithms.js.map +1 -1
  1628. package/build-module/theme/index.js.map +1 -1
  1629. package/build-module/theme/styles.js +1 -1
  1630. package/build-module/theme/styles.js.map +1 -1
  1631. package/build-module/theme/types.js.map +1 -1
  1632. package/build-module/tip/index.js.map +1 -1
  1633. package/build-module/tip/types.js.map +1 -1
  1634. package/build-module/toggle-control/index.js +6 -4
  1635. package/build-module/toggle-control/index.js.map +1 -1
  1636. package/build-module/toggle-control/index.native.js.map +1 -1
  1637. package/build-module/toggle-control/types.js.map +1 -1
  1638. package/build-module/toggle-group-control/context.js.map +1 -1
  1639. package/build-module/toggle-group-control/index.js.map +1 -1
  1640. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  1641. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  1642. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  1643. package/build-module/toggle-group-control/toggle-group-control/index.js.map +1 -1
  1644. package/build-module/toggle-group-control/toggle-group-control/styles.js +1 -1
  1645. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  1646. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  1647. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  1648. package/build-module/toggle-group-control/toggle-group-control-option/index.js.map +1 -1
  1649. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +2 -2
  1650. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  1651. package/build-module/toggle-group-control/toggle-group-control-option-base/index.js.map +1 -1
  1652. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +2 -2
  1653. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  1654. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  1655. package/build-module/toggle-group-control/toggle-group-control-option-icon/index.js.map +1 -1
  1656. package/build-module/toggle-group-control/types.js.map +1 -1
  1657. package/build-module/toolbar/index.js.map +1 -1
  1658. package/build-module/toolbar/toolbar/index.js.map +1 -1
  1659. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  1660. package/build-module/toolbar/toolbar/toolbar-container.native.js.map +1 -1
  1661. package/build-module/toolbar/toolbar/types.js.map +1 -1
  1662. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  1663. package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
  1664. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
  1665. package/build-module/toolbar/toolbar-button/types.js.map +1 -1
  1666. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  1667. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  1668. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  1669. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  1670. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  1671. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  1672. package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
  1673. package/build-module/toolbar/toolbar-group/types.js.map +1 -1
  1674. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  1675. package/build-module/toolbar/toolbar-item/index.native.js.map +1 -1
  1676. package/build-module/toolbar/toolbar-item/types.js.map +1 -1
  1677. package/build-module/tools-panel/context.js.map +1 -1
  1678. package/build-module/tools-panel/index.js.map +1 -1
  1679. package/build-module/tools-panel/styles.js +2 -2
  1680. package/build-module/tools-panel/styles.js.map +1 -1
  1681. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  1682. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  1683. package/build-module/tools-panel/tools-panel/index.js.map +1 -1
  1684. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  1685. package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
  1686. package/build-module/tools-panel/tools-panel-header/index.js.map +1 -1
  1687. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  1688. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  1689. package/build-module/tools-panel/tools-panel-item/index.js.map +1 -1
  1690. package/build-module/tools-panel/types.js.map +1 -1
  1691. package/build-module/tooltip/index.js.map +1 -1
  1692. package/build-module/tooltip/index.native.js.map +1 -1
  1693. package/build-module/tooltip/types.js.map +1 -1
  1694. package/build-module/tree-grid/cell.js.map +1 -1
  1695. package/build-module/tree-grid/index.js.map +1 -1
  1696. package/build-module/tree-grid/item.js.map +1 -1
  1697. package/build-module/tree-grid/roving-tab-index-context.js.map +1 -1
  1698. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  1699. package/build-module/tree-grid/roving-tab-index.js.map +1 -1
  1700. package/build-module/tree-grid/row.js.map +1 -1
  1701. package/build-module/tree-grid/types.js.map +1 -1
  1702. package/build-module/tree-select/index.js.map +1 -1
  1703. package/build-module/tree-select/types.js.map +1 -1
  1704. package/build-module/truncate/component.js.map +1 -1
  1705. package/build-module/truncate/hook.js +4 -1
  1706. package/build-module/truncate/hook.js.map +1 -1
  1707. package/build-module/truncate/index.js.map +1 -1
  1708. package/build-module/truncate/styles.js.map +1 -1
  1709. package/build-module/truncate/types.js.map +1 -1
  1710. package/build-module/truncate/utils.js.map +1 -1
  1711. package/build-module/unit-control/index.js.map +1 -1
  1712. package/build-module/unit-control/index.native.js.map +1 -1
  1713. package/build-module/unit-control/styles/unit-control-styles.js +2 -2
  1714. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  1715. package/build-module/unit-control/types.js.map +1 -1
  1716. package/build-module/unit-control/unit-select-control.js.map +1 -1
  1717. package/build-module/unit-control/utils.js.map +1 -1
  1718. package/build-module/utils/base-label.js.map +1 -1
  1719. package/build-module/utils/box-sizing.js.map +1 -1
  1720. package/build-module/utils/breakpoint-values.js.map +1 -1
  1721. package/build-module/utils/breakpoint.js.map +1 -1
  1722. package/build-module/utils/colors-values.js.map +1 -1
  1723. package/build-module/utils/colors.js.map +1 -1
  1724. package/build-module/utils/config-values.js.map +1 -1
  1725. package/build-module/utils/font-size.js.map +1 -1
  1726. package/build-module/utils/font-values.js.map +1 -1
  1727. package/build-module/utils/font.js.map +1 -1
  1728. package/build-module/utils/get-valid-children.js.map +1 -1
  1729. package/build-module/utils/hooks/emotion.d.js.map +1 -1
  1730. package/build-module/utils/hooks/index.js.map +1 -1
  1731. package/build-module/utils/hooks/use-controlled-state.js.map +1 -1
  1732. package/build-module/utils/hooks/use-controlled-value.js.map +1 -1
  1733. package/build-module/utils/hooks/use-cx.js.map +1 -1
  1734. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  1735. package/build-module/utils/index.js.map +1 -1
  1736. package/build-module/utils/input/base.js.map +1 -1
  1737. package/build-module/utils/input/index.js.map +1 -1
  1738. package/build-module/utils/input/input-control.js.map +1 -1
  1739. package/build-module/utils/math.js.map +1 -1
  1740. package/build-module/utils/reduce-motion.js +4 -0
  1741. package/build-module/utils/reduce-motion.js.map +1 -1
  1742. package/build-module/utils/rtl.js +2 -2
  1743. package/build-module/utils/rtl.js.map +1 -1
  1744. package/build-module/utils/space.js.map +1 -1
  1745. package/build-module/utils/strings.js.map +1 -1
  1746. package/build-module/utils/style-mixins.js.map +1 -1
  1747. package/build-module/utils/types.js.map +1 -1
  1748. package/build-module/utils/unit-values.js.map +1 -1
  1749. package/build-module/utils/use-deprecated-props.js.map +1 -1
  1750. package/build-module/utils/use-responsive-value.js.map +1 -1
  1751. package/build-module/utils/values.js.map +1 -1
  1752. package/build-module/utils/with-ignore-ime-events.js.map +1 -1
  1753. package/build-module/v-stack/component.js.map +1 -1
  1754. package/build-module/v-stack/hook.js.map +1 -1
  1755. package/build-module/v-stack/index.js.map +1 -1
  1756. package/build-module/v-stack/types.js.map +1 -1
  1757. package/build-module/view/component.js +5 -1
  1758. package/build-module/view/component.js.map +1 -1
  1759. package/build-module/view/index.js.map +1 -1
  1760. package/build-module/view/types.js.map +1 -1
  1761. package/build-module/visually-hidden/component.js.map +1 -1
  1762. package/build-module/visually-hidden/index.js.map +1 -1
  1763. package/build-module/visually-hidden/styles.js.map +1 -1
  1764. package/build-module/visually-hidden/types.js.map +1 -1
  1765. package/build-module/z-stack/component.js.map +1 -1
  1766. package/build-module/z-stack/index.js.map +1 -1
  1767. package/build-module/z-stack/styles.js +2 -2
  1768. package/build-module/z-stack/styles.js.map +1 -1
  1769. package/build-module/z-stack/types.js.map +1 -1
  1770. package/build-style/style-rtl.css +45 -44
  1771. package/build-style/style.css +45 -44
  1772. package/build-types/alignment-matrix-control/stories/index.story.d.ts +1 -1
  1773. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  1774. package/build-types/angle-picker-control/stories/index.story.d.ts +1 -1
  1775. package/build-types/animate/stories/index.story.d.ts +7 -7
  1776. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  1777. package/build-types/base-control/stories/index.story.d.ts +1 -1
  1778. package/build-types/border-box-control/stories/index.story.d.ts +1 -1
  1779. package/build-types/border-control/stories/index.story.d.ts +6 -6
  1780. package/build-types/box-control/stories/index.story.d.ts +6 -6
  1781. package/build-types/button/stories/e2e/index.story.d.ts +1 -1
  1782. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  1783. package/build-types/button/stories/index.story.d.ts +7 -7
  1784. package/build-types/button/stories/index.story.d.ts.map +1 -1
  1785. package/build-types/card/stories/index.story.d.ts +2 -2
  1786. package/build-types/circular-option-picker/stories/index.story.d.ts +5 -5
  1787. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  1788. package/build-types/color-palette/stories/index.story.d.ts +3 -3
  1789. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  1790. package/build-types/color-picker/component.d.ts.map +1 -1
  1791. package/build-types/color-picker/picker.d.ts +1 -1
  1792. package/build-types/color-picker/picker.d.ts.map +1 -1
  1793. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  1794. package/build-types/color-picker/styles.d.ts +1 -1
  1795. package/build-types/color-picker/types.d.ts +0 -3
  1796. package/build-types/color-picker/types.d.ts.map +1 -1
  1797. package/build-types/combobox-control/stories/index.story.d.ts +2 -2
  1798. package/build-types/confirm-dialog/stories/index.story.d.ts +2 -2
  1799. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  1800. package/build-types/custom-gradient-picker/stories/index.story.d.ts +1 -1
  1801. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  1802. package/build-types/custom-select-control/index.d.ts.map +1 -1
  1803. package/build-types/custom-select-control/stories/index.story.d.ts +35 -0
  1804. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -0
  1805. package/build-types/custom-select-control-v2/default-component/index.d.ts +5 -2
  1806. package/build-types/custom-select-control-v2/default-component/index.d.ts.map +1 -1
  1807. package/build-types/custom-select-control-v2/index.d.ts +1 -2
  1808. package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
  1809. package/build-types/custom-select-control-v2/{custom-select-item.d.ts → item.d.ts} +4 -1
  1810. package/build-types/custom-select-control-v2/item.d.ts.map +1 -0
  1811. package/build-types/custom-select-control-v2/legacy-component/index.d.ts +2 -2
  1812. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +1 -1
  1813. package/build-types/custom-select-control-v2/stories/default.story.d.ts +5 -5
  1814. package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +1 -1
  1815. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts +5 -3
  1816. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +1 -1
  1817. package/build-types/custom-select-control-v2/types.d.ts +7 -0
  1818. package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
  1819. package/build-types/date-time/time/styles.d.ts +4 -4
  1820. package/build-types/dimension-control/stories/index.story.d.ts +2 -2
  1821. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  1822. package/build-types/drop-zone/stories/index.story.d.ts +1 -1
  1823. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  1824. package/build-types/dropdown/stories/index.story.d.ts +4 -4
  1825. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  1826. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  1827. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  1828. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +1 -1
  1829. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  1830. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +3 -3
  1831. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  1832. package/build-types/external-link/index.d.ts +3 -0
  1833. package/build-types/external-link/index.d.ts.map +1 -1
  1834. package/build-types/focal-point-picker/stories/index.story.d.ts +4 -4
  1835. package/build-types/form-file-upload/stories/index.story.d.ts +5 -5
  1836. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  1837. package/build-types/form-toggle/index.d.ts +4 -3
  1838. package/build-types/form-toggle/index.d.ts.map +1 -1
  1839. package/build-types/form-toggle/stories/index.story.d.ts +1 -1
  1840. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  1841. package/build-types/gradient-picker/stories/index.story.d.ts +3 -3
  1842. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  1843. package/build-types/guide/stories/index.story.d.ts +1 -1
  1844. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  1845. package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -1
  1846. package/build-types/higher-order/with-filters/index.d.ts.map +1 -1
  1847. package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -1
  1848. package/build-types/higher-order/with-notices/index.d.ts.map +1 -1
  1849. package/build-types/icon/stories/index.story.d.ts +4 -4
  1850. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  1851. package/build-types/input-control/backdrop.d.ts +1 -2
  1852. package/build-types/input-control/backdrop.d.ts.map +1 -1
  1853. package/build-types/input-control/index.d.ts.map +1 -1
  1854. package/build-types/input-control/input-base.d.ts.map +1 -1
  1855. package/build-types/input-control/input-field.d.ts.map +1 -1
  1856. package/build-types/input-control/stories/index.story.d.ts +6 -6
  1857. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  1858. package/build-types/input-control/styles/input-control-styles.d.ts +16 -21
  1859. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  1860. package/build-types/input-control/types.d.ts +3 -12
  1861. package/build-types/input-control/types.d.ts.map +1 -1
  1862. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +1 -1
  1863. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  1864. package/build-types/menu-group/stories/index.story.d.ts +1 -1
  1865. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  1866. package/build-types/menu-item/stories/index.story.d.ts +4 -4
  1867. package/build-types/navigation/back-button/index.d.ts +3 -0
  1868. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  1869. package/build-types/navigation/group/index.d.ts +3 -0
  1870. package/build-types/navigation/group/index.d.ts.map +1 -1
  1871. package/build-types/navigation/index.d.ts +2 -0
  1872. package/build-types/navigation/index.d.ts.map +1 -1
  1873. package/build-types/navigation/item/index.d.ts +3 -0
  1874. package/build-types/navigation/item/index.d.ts.map +1 -1
  1875. package/build-types/navigation/menu/index.d.ts +3 -0
  1876. package/build-types/navigation/menu/index.d.ts.map +1 -1
  1877. package/build-types/navigation/stories/index.story.d.ts +11 -6
  1878. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  1879. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  1880. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  1881. package/build-types/notice/stories/index.story.d.ts +4 -4
  1882. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  1883. package/build-types/number-control/index.d.ts +1 -1
  1884. package/build-types/number-control/stories/index.story.d.ts +2 -2
  1885. package/build-types/palette-edit/stories/index.story.d.ts +2 -2
  1886. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  1887. package/build-types/popover/index.d.ts.map +1 -1
  1888. package/build-types/popover/utils.d.ts +1 -1
  1889. package/build-types/popover/utils.d.ts.map +1 -1
  1890. package/build-types/progress-bar/index.d.ts.map +1 -1
  1891. package/build-types/progress-bar/styles.d.ts +0 -1
  1892. package/build-types/progress-bar/styles.d.ts.map +1 -1
  1893. package/build-types/query-controls/stories/index.story.d.ts +1 -1
  1894. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  1895. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  1896. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  1897. package/build-types/responsive-wrapper/stories/index.story.d.ts +1 -1
  1898. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  1899. package/build-types/sandbox/stories/index.story.d.ts +1 -1
  1900. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  1901. package/build-types/search-control/stories/index.story.d.ts +2 -2
  1902. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  1903. package/build-types/select-control/index.d.ts.map +1 -1
  1904. package/build-types/select-control/stories/index.story.d.ts +2 -2
  1905. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  1906. package/build-types/shortcut/stories/index.story.d.ts +1 -1
  1907. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  1908. package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts +19 -0
  1909. package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts.map +1 -0
  1910. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  1911. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  1912. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
  1913. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  1914. package/build-types/slot-fill/types.d.ts +6 -2
  1915. package/build-types/slot-fill/types.d.ts.map +1 -1
  1916. package/build-types/tab-panel/stories/index.story.d.ts +4 -4
  1917. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  1918. package/build-types/tabs/index.d.ts.map +1 -1
  1919. package/build-types/tabs/stories/index.story.d.ts +9 -9
  1920. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  1921. package/build-types/text/stories/index.story.d.ts +3 -3
  1922. package/build-types/text/styles.d.ts.map +1 -1
  1923. package/build-types/theme/stories/index.story.d.ts +1 -1
  1924. package/build-types/toggle-control/index.d.ts +11 -3
  1925. package/build-types/toggle-control/index.d.ts.map +1 -1
  1926. package/build-types/toggle-control/stories/index.story.d.ts +4 -4
  1927. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  1928. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +1 -1
  1929. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  1930. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +2 -2
  1931. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  1932. package/build-types/toolbar/stories/index.story.d.ts +3 -3
  1933. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  1934. package/build-types/tooltip/stories/index.story.d.ts +1 -1
  1935. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  1936. package/build-types/tree-grid/stories/index.story.d.ts +1 -1
  1937. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  1938. package/build-types/tree-select/stories/index.story.d.ts +1 -1
  1939. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  1940. package/build-types/truncate/hook.d.ts.map +1 -1
  1941. package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
  1942. package/build-types/unit-control/utils.d.ts +3 -3
  1943. package/build-types/unit-control/utils.d.ts.map +1 -1
  1944. package/build-types/utils/reduce-motion.d.ts +4 -0
  1945. package/build-types/utils/reduce-motion.d.ts.map +1 -1
  1946. package/build-types/v-stack/stories/index.story.d.ts +1 -1
  1947. package/package.json +22 -23
  1948. package/src/button/index.tsx +1 -1
  1949. package/src/checkbox-control/style.scss +22 -24
  1950. package/src/color-palette/index.native.js +4 -3
  1951. package/src/color-picker/component.tsx +3 -25
  1952. package/src/color-picker/picker.tsx +12 -96
  1953. package/src/color-picker/types.ts +0 -3
  1954. package/src/combobox-control/README.md +4 -4
  1955. package/src/custom-select-control/index.js +45 -55
  1956. package/src/custom-select-control/stories/{index.story.js → index.story.tsx} +8 -3
  1957. package/src/custom-select-control/style.scss +6 -0
  1958. package/src/custom-select-control/test/index.js +24 -0
  1959. package/src/custom-select-control-v2/README.md +27 -27
  1960. package/src/custom-select-control-v2/default-component/index.tsx +5 -2
  1961. package/src/custom-select-control-v2/index.tsx +1 -2
  1962. package/src/custom-select-control-v2/{custom-select-item.tsx → item.tsx} +2 -0
  1963. package/src/custom-select-control-v2/legacy-component/index.tsx +4 -6
  1964. package/src/custom-select-control-v2/legacy-component/test/index.tsx +13 -10
  1965. package/src/custom-select-control-v2/stories/default.story.tsx +16 -17
  1966. package/src/custom-select-control-v2/stories/legacy.story.tsx +20 -35
  1967. package/src/custom-select-control-v2/test/index.tsx +26 -16
  1968. package/src/custom-select-control-v2/types.ts +7 -0
  1969. package/src/dimension-control/stories/index.story.tsx +4 -4
  1970. package/src/dimension-control/test/__snapshots__/index.test.js.snap +60 -12
  1971. package/src/dropdown/style.scss +3 -3
  1972. package/src/external-link/index.tsx +9 -11
  1973. package/src/external-link/style.scss +12 -0
  1974. package/src/form-toggle/index.tsx +10 -2
  1975. package/src/form-toggle/stories/index.story.tsx +1 -1
  1976. package/src/heading/test/__snapshots__/index.tsx.snap +5 -2
  1977. package/src/input-control/backdrop.tsx +1 -6
  1978. package/src/input-control/index.tsx +1 -6
  1979. package/src/input-control/input-base.tsx +1 -8
  1980. package/src/input-control/input-field.tsx +2 -11
  1981. package/src/input-control/styles/input-control-styles.tsx +61 -77
  1982. package/src/input-control/types.ts +2 -13
  1983. package/src/mobile/bottom-sheet-select-control/index.native.js +7 -3
  1984. package/src/mobile/color-settings/palette.screen.native.js +5 -1
  1985. package/src/navigable-container/container.tsx +1 -1
  1986. package/src/navigation/README.md +4 -0
  1987. package/src/navigation/back-button/index.tsx +3 -0
  1988. package/src/navigation/group/index.tsx +3 -0
  1989. package/src/navigation/index.tsx +2 -0
  1990. package/src/navigation/item/index.tsx +3 -0
  1991. package/src/navigation/menu/index.tsx +3 -0
  1992. package/src/navigation/stories/index.story.tsx +7 -1
  1993. package/src/navigator/navigator-provider/component.tsx +193 -188
  1994. package/src/navigator/navigator-screen/component.tsx +2 -4
  1995. package/src/placeholder/style.scss +3 -7
  1996. package/src/popover/index.tsx +59 -99
  1997. package/src/popover/style.scss +0 -9
  1998. package/src/progress-bar/index.tsx +8 -2
  1999. package/src/progress-bar/styles.ts +2 -3
  2000. package/src/progress-bar/test/index.tsx +4 -1
  2001. package/src/range-control/styles/range-control-styles.ts +1 -1
  2002. package/src/select-control/index.tsx +1 -19
  2003. package/src/slot-fill/bubbles-virtually/observable-map.ts +79 -0
  2004. package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +3 -6
  2005. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +10 -18
  2006. package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +2 -10
  2007. package/src/slot-fill/bubbles-virtually/use-slot.ts +2 -10
  2008. package/src/slot-fill/test/observable-map.js +83 -0
  2009. package/src/slot-fill/types.ts +7 -2
  2010. package/src/snackbar/index.tsx +1 -1
  2011. package/src/style.scss +1 -0
  2012. package/src/tabs/index.tsx +8 -0
  2013. package/src/tabs/test/index.tsx +38 -0
  2014. package/src/text/styles.ts +1 -0
  2015. package/src/text/test/__snapshots__/index.tsx.snap +4 -1
  2016. package/src/text-control/style.scss +2 -0
  2017. package/src/toggle-control/index.tsx +16 -11
  2018. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +2 -2
  2019. package/src/toolbar/toolbar/style.scss +1 -1
  2020. package/src/toolbar/toolbar-group/style.scss +1 -6
  2021. package/src/tooltip/test/index.tsx +5 -8
  2022. package/src/truncate/hook.ts +4 -0
  2023. package/src/utils/reduce-motion.js +4 -0
  2024. package/tsconfig.tsbuildinfo +1 -1
  2025. package/build/custom-select-control-v2/custom-select-item.js.map +0 -1
  2026. package/build/external-link/styles/external-link-styles.js +0 -25
  2027. package/build/external-link/styles/external-link-styles.js.map +0 -1
  2028. package/build-module/external-link/styles/external-link-styles.js +0 -25
  2029. package/build-module/external-link/styles/external-link-styles.js.map +0 -1
  2030. package/build-types/custom-select-control-v2/custom-select-item.d.ts.map +0 -1
  2031. package/build-types/external-link/styles/external-link-styles.d.ts +0 -10
  2032. package/build-types/external-link/styles/external-link-styles.d.ts.map +0 -1
  2033. package/src/external-link/styles/external-link-styles.ts +0 -17
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","colord","useInstanceId","useEffect","useRef","useState","useMemo","__","sprintf","plus","Button","HStack","ColorPicker","VisuallyHidden","CustomColorPickerDropdown","addControlPoint","clampPercent","removeControlPoint","updateControlPointColor","updateControlPointColorByPosition","updateControlPointPosition","getHorizontalRelativeGradientPosition","MINIMUM_SIGNIFICANT_MOVE","KEYBOARD_CONTROL_POINT_VARIATION","DropdownContentWrapper","ControlPointButton","isOpen","position","color","additionalProps","instanceId","descriptionId","createElement","Fragment","className","id","GradientColorPickerDropdown","isRenderedInSidebar","props","popoverProps","placement","offset","resize","mergedClassName","ControlPoints","disableRemove","disableAlpha","gradientPickerDomRef","ignoreMarkerPosition","value","controlPoints","onChange","onStartControlPointChange","onStopControlPointChange","__experimentalIsRenderedInSidebar","controlPointMoveState","onMouseMove","event","current","undefined","relativePosition","clientX","initialPosition","index","significantMoveHappened","Math","abs","cleanEventListeners","window","removeEventListener","listenersActivated","cleanEventListenersRef","map","point","key","onClose","renderToggle","onToggle","onClick","onMouseDown","addEventListener","onKeyDown","code","stopPropagation","renderContent","paddingSize","enableAlpha","toRgbString","length","alignment","variant","style","left","transform","InsertPoint","onOpenInserter","onCloseInserter","insertPosition","alreadyInsertedPoint","setAlreadyInsertedPoint","icon"],"sources":["@wordpress/components/src/custom-gradient-picker/gradient-bar/control-points.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect, useRef, useState, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { plus } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { HStack } from '../../h-stack';\nimport { ColorPicker } from '../../color-picker';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { CustomColorPickerDropdown } from '../../color-palette';\n\nimport {\n\taddControlPoint,\n\tclampPercent,\n\tremoveControlPoint,\n\tupdateControlPointColor,\n\tupdateControlPointColorByPosition,\n\tupdateControlPointPosition,\n\tgetHorizontalRelativeGradientPosition,\n} from './utils';\nimport {\n\tMINIMUM_SIGNIFICANT_MOVE,\n\tKEYBOARD_CONTROL_POINT_VARIATION,\n} from './constants';\nimport type { WordPressComponentProps } from '../../context';\nimport type {\n\tControlPointButtonProps,\n\tControlPointMoveState,\n\tControlPointsProps,\n\tInsertPointProps,\n} from '../types';\nimport type { CustomColorPickerDropdownProps } from '../../color-palette/types';\nimport DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';\n\nfunction ControlPointButton( {\n\tisOpen,\n\tposition,\n\tcolor,\n\t...additionalProps\n}: WordPressComponentProps< ControlPointButtonProps, 'button', true > ) {\n\tconst instanceId = useInstanceId( ControlPointButton );\n\tconst descriptionId = `components-custom-gradient-picker__control-point-button-description-${ instanceId }`;\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t// translators: %1$s: gradient position e.g: 70, %2$s: gradient color code e.g: rgb(52,121,151).\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Gradient control point at position %1$s%% with color code %2$s.'\n\t\t\t\t\t),\n\t\t\t\t\tposition,\n\t\t\t\t\tcolor\n\t\t\t\t) }\n\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\taria-haspopup=\"true\"\n\t\t\t\taria-expanded={ isOpen }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'components-custom-gradient-picker__control-point-button',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isOpen,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t{ __(\n\t\t\t\t\t'Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.'\n\t\t\t\t) }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n\nfunction GradientColorPickerDropdown( {\n\tisRenderedInSidebar,\n\tclassName,\n\t...props\n}: CustomColorPickerDropdownProps ) {\n\t// Open the popover below the gradient control/insertion point\n\tconst popoverProps = useMemo(\n\t\t() =>\n\t\t\t( {\n\t\t\t\tplacement: 'bottom',\n\t\t\t\toffset: 8,\n\t\t\t\t// Disabling resize as it would otherwise cause the popover to show\n\t\t\t\t// scrollbars while dragging the color picker's handle close to the\n\t\t\t\t// popover edge.\n\t\t\t\tresize: false,\n\t\t\t} ) as const,\n\t\t[]\n\t);\n\n\tconst mergedClassName = classnames(\n\t\t'components-custom-gradient-picker__control-point-dropdown',\n\t\tclassName\n\t);\n\n\treturn (\n\t\t<CustomColorPickerDropdown\n\t\t\tisRenderedInSidebar={ isRenderedInSidebar }\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tclassName={ mergedClassName }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction ControlPoints( {\n\tdisableRemove,\n\tdisableAlpha,\n\tgradientPickerDomRef,\n\tignoreMarkerPosition,\n\tvalue: controlPoints,\n\tonChange,\n\tonStartControlPointChange,\n\tonStopControlPointChange,\n\t__experimentalIsRenderedInSidebar,\n}: ControlPointsProps ) {\n\tconst controlPointMoveState = useRef< ControlPointMoveState >();\n\n\tconst onMouseMove = ( event: MouseEvent ) => {\n\t\tif (\n\t\t\tcontrolPointMoveState.current === undefined ||\n\t\t\tgradientPickerDomRef.current === null\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst relativePosition = getHorizontalRelativeGradientPosition(\n\t\t\tevent.clientX,\n\t\t\tgradientPickerDomRef.current\n\t\t);\n\n\t\tconst { initialPosition, index, significantMoveHappened } =\n\t\t\tcontrolPointMoveState.current;\n\n\t\tif (\n\t\t\t! significantMoveHappened &&\n\t\t\tMath.abs( initialPosition - relativePosition ) >=\n\t\t\t\tMINIMUM_SIGNIFICANT_MOVE\n\t\t) {\n\t\t\tcontrolPointMoveState.current.significantMoveHappened = true;\n\t\t}\n\n\t\tonChange(\n\t\t\tupdateControlPointPosition( controlPoints, index, relativePosition )\n\t\t);\n\t};\n\n\tconst cleanEventListeners = () => {\n\t\tif (\n\t\t\twindow &&\n\t\t\twindow.removeEventListener &&\n\t\t\tcontrolPointMoveState.current &&\n\t\t\tcontrolPointMoveState.current.listenersActivated\n\t\t) {\n\t\t\twindow.removeEventListener( 'mousemove', onMouseMove );\n\t\t\twindow.removeEventListener( 'mouseup', cleanEventListeners );\n\t\t\tonStopControlPointChange();\n\t\t\tcontrolPointMoveState.current.listenersActivated = false;\n\t\t}\n\t};\n\n\t// Adding `cleanEventListeners` to the dependency array below requires the function itself to be wrapped in a `useCallback`\n\t// This memoization would prevent the event listeners from being properly cleaned.\n\t// Instead, we'll pass a ref to the function in our `useEffect` so `cleanEventListeners` itself is no longer a dependency.\n\tconst cleanEventListenersRef = useRef< () => void >();\n\tcleanEventListenersRef.current = cleanEventListeners;\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tcleanEventListenersRef.current?.();\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<>\n\t\t\t{ controlPoints.map( ( point, index ) => {\n\t\t\t\tconst initialPosition = point?.position;\n\t\t\t\treturn (\n\t\t\t\t\tignoreMarkerPosition !== initialPosition && (\n\t\t\t\t\t\t<GradientColorPickerDropdown\n\t\t\t\t\t\t\tisRenderedInSidebar={\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tonClose={ onStopControlPointChange }\n\t\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t\t<ControlPointButton\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tcontrolPointMoveState.current &&\n\t\t\t\t\t\t\t\t\t\t\tcontrolPointMoveState.current\n\t\t\t\t\t\t\t\t\t\t\t\t.significantMoveHappened\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( isOpen ) {\n\t\t\t\t\t\t\t\t\t\t\tonStopControlPointChange();\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tonStartControlPointChange();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tonMouseDown={ () => {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\twindow &&\n\t\t\t\t\t\t\t\t\t\t\twindow.addEventListener\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tcontrolPointMoveState.current = {\n\t\t\t\t\t\t\t\t\t\t\t\tinitialPosition,\n\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\tsignificantMoveHappened: false,\n\t\t\t\t\t\t\t\t\t\t\t\tlistenersActivated: true,\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\tonStartControlPointChange();\n\t\t\t\t\t\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t\t\t\t\t\t'mousemove',\n\t\t\t\t\t\t\t\t\t\t\t\tonMouseMove\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t\t\t\t\t\t'mouseup',\n\t\t\t\t\t\t\t\t\t\t\t\tcleanEventListeners\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\t\tif ( event.code === 'ArrowLeft' ) {\n\t\t\t\t\t\t\t\t\t\t\t// Stop propagation of the key press event to avoid focus moving\n\t\t\t\t\t\t\t\t\t\t\t// to another editor area.\n\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\tupdateControlPointPosition(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\tclampPercent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpoint.position -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tKEYBOARD_CONTROL_POINT_VARIATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\t\t\t\tevent.code === 'ArrowRight'\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t// Stop propagation of the key press event to avoid focus moving\n\t\t\t\t\t\t\t\t\t\t\t// to another editor area.\n\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\tupdateControlPointPosition(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\tclampPercent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpoint.position +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tKEYBOARD_CONTROL_POINT_VARIATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\t\tposition={ point.position }\n\t\t\t\t\t\t\t\t\tcolor={ point.color }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t\t\t\t\t<ColorPicker\n\t\t\t\t\t\t\t\t\t\tenableAlpha={ ! disableAlpha }\n\t\t\t\t\t\t\t\t\t\tcolor={ point.color }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( color ) => {\n\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\tupdateControlPointColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolord(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor\n\t\t\t\t\t\t\t\t\t\t\t\t\t).toRgbString()\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{ ! disableRemove &&\n\t\t\t\t\t\t\t\t\t\tcontrolPoints.length > 2 && (\n\t\t\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-custom-gradient-picker__remove-control-point-wrapper\"\n\t\t\t\t\t\t\t\t\t\t\t\talignment=\"center\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tremoveControlPoint(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Remove Control Point'\n\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</DropdownContentWrapper>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tleft: `${ point.position }%`,\n\t\t\t\t\t\t\t\ttransform: 'translateX( -50% )',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n\nfunction InsertPoint( {\n\tvalue: controlPoints,\n\tonChange,\n\tonOpenInserter,\n\tonCloseInserter,\n\tinsertPosition,\n\tdisableAlpha,\n\t__experimentalIsRenderedInSidebar,\n}: InsertPointProps ) {\n\tconst [ alreadyInsertedPoint, setAlreadyInsertedPoint ] = useState( false );\n\treturn (\n\t\t<GradientColorPickerDropdown\n\t\t\tisRenderedInSidebar={ __experimentalIsRenderedInSidebar }\n\t\t\tclassName=\"components-custom-gradient-picker__inserter\"\n\t\t\tonClose={ () => {\n\t\t\t\tonCloseInserter();\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={ () => {\n\t\t\t\t\t\tif ( isOpen ) {\n\t\t\t\t\t\t\tonCloseInserter();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetAlreadyInsertedPoint( false );\n\t\t\t\t\t\t\tonOpenInserter();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonToggle();\n\t\t\t\t\t} }\n\t\t\t\t\tclassName=\"components-custom-gradient-picker__insert-point-dropdown\"\n\t\t\t\t\ticon={ plus }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ () => (\n\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t<ColorPicker\n\t\t\t\t\t\tenableAlpha={ ! disableAlpha }\n\t\t\t\t\t\tonChange={ ( color ) => {\n\t\t\t\t\t\t\tif ( ! alreadyInsertedPoint ) {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\taddControlPoint(\n\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\tinsertPosition,\n\t\t\t\t\t\t\t\t\t\tcolord( color ).toRgbString()\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tsetAlreadyInsertedPoint( true );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\tupdateControlPointColorByPosition(\n\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\tinsertPosition,\n\t\t\t\t\t\t\t\t\t\tcolord( color ).toRgbString()\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t\tstyle={\n\t\t\t\tinsertPosition !== null\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tleft: `${ insertPosition }%`,\n\t\t\t\t\t\t\ttransform: 'translateX( -50% )',\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t/>\n\t);\n}\nControlPoints.InsertPoint = InsertPoint;\n\nexport default ControlPoints;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AACnC,SAASC,MAAM,QAAQ,QAAQ;;AAE/B;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,oBAAoB;AACzE,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,IAAI,QAAQ,kBAAkB;;AAEvC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SAASC,MAAM,QAAQ,eAAe;AACtC,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,yBAAyB,QAAQ,qBAAqB;AAE/D,SACCC,eAAe,EACfC,YAAY,EACZC,kBAAkB,EAClBC,uBAAuB,EACvBC,iCAAiC,EACjCC,0BAA0B,EAC1BC,qCAAqC,QAC/B,SAAS;AAChB,SACCC,wBAAwB,EACxBC,gCAAgC,QAC1B,aAAa;AASpB,OAAOC,sBAAsB,MAAM,yCAAyC;AAE5E,SAASC,kBAAkBA,CAAE;EAC5BC,MAAM;EACNC,QAAQ;EACRC,KAAK;EACL,GAAGC;AACgE,CAAC,EAAG;EACvE,MAAMC,UAAU,GAAG5B,aAAa,CAAEuB,kBAAmB,CAAC;EACtD,MAAMM,aAAa,GAAI,uEAAuED,UAAY,EAAC;EAC3G,OACCE,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACtB,MAAM;IACN,cAAaF,OAAO;IACnB;IACAD,EAAE,CACD,iEACD,CAAC,EACDoB,QAAQ,EACRC,KACD,CAAG;IACH,oBAAmBG,aAAe;IACl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ACpB;MACAL,IAAI,EAAG,GAAGK,cAAgB,GAAE;MAC5BJ,SAAS,EAAE;IACX,CAAC,GACDlC;EACH,CACD,CAAC;AAEJ;AACAf,aAAa,CAACkD,WAAW,GAAGA,WAAW;AAEvC,eAAelD,aAAa"}
1
+ {"version":3,"names":["classnames","colord","useInstanceId","useEffect","useRef","useState","useMemo","__","sprintf","plus","Button","HStack","ColorPicker","VisuallyHidden","CustomColorPickerDropdown","addControlPoint","clampPercent","removeControlPoint","updateControlPointColor","updateControlPointColorByPosition","updateControlPointPosition","getHorizontalRelativeGradientPosition","MINIMUM_SIGNIFICANT_MOVE","KEYBOARD_CONTROL_POINT_VARIATION","DropdownContentWrapper","ControlPointButton","isOpen","position","color","additionalProps","instanceId","descriptionId","createElement","Fragment","className","id","GradientColorPickerDropdown","isRenderedInSidebar","props","popoverProps","placement","offset","resize","mergedClassName","ControlPoints","disableRemove","disableAlpha","gradientPickerDomRef","ignoreMarkerPosition","value","controlPoints","onChange","onStartControlPointChange","onStopControlPointChange","__experimentalIsRenderedInSidebar","controlPointMoveState","onMouseMove","event","current","undefined","relativePosition","clientX","initialPosition","index","significantMoveHappened","Math","abs","cleanEventListeners","window","removeEventListener","listenersActivated","cleanEventListenersRef","map","point","key","onClose","renderToggle","onToggle","onClick","onMouseDown","addEventListener","onKeyDown","code","stopPropagation","renderContent","paddingSize","enableAlpha","toRgbString","length","alignment","variant","style","left","transform","InsertPoint","onOpenInserter","onCloseInserter","insertPosition","alreadyInsertedPoint","setAlreadyInsertedPoint","icon"],"sources":["@wordpress/components/src/custom-gradient-picker/gradient-bar/control-points.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect, useRef, useState, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { plus } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { HStack } from '../../h-stack';\nimport { ColorPicker } from '../../color-picker';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { CustomColorPickerDropdown } from '../../color-palette';\n\nimport {\n\taddControlPoint,\n\tclampPercent,\n\tremoveControlPoint,\n\tupdateControlPointColor,\n\tupdateControlPointColorByPosition,\n\tupdateControlPointPosition,\n\tgetHorizontalRelativeGradientPosition,\n} from './utils';\nimport {\n\tMINIMUM_SIGNIFICANT_MOVE,\n\tKEYBOARD_CONTROL_POINT_VARIATION,\n} from './constants';\nimport type { WordPressComponentProps } from '../../context';\nimport type {\n\tControlPointButtonProps,\n\tControlPointMoveState,\n\tControlPointsProps,\n\tInsertPointProps,\n} from '../types';\nimport type { CustomColorPickerDropdownProps } from '../../color-palette/types';\nimport DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';\n\nfunction ControlPointButton( {\n\tisOpen,\n\tposition,\n\tcolor,\n\t...additionalProps\n}: WordPressComponentProps< ControlPointButtonProps, 'button', true > ) {\n\tconst instanceId = useInstanceId( ControlPointButton );\n\tconst descriptionId = `components-custom-gradient-picker__control-point-button-description-${ instanceId }`;\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t// translators: %1$s: gradient position e.g: 70, %2$s: gradient color code e.g: rgb(52,121,151).\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Gradient control point at position %1$s%% with color code %2$s.'\n\t\t\t\t\t),\n\t\t\t\t\tposition,\n\t\t\t\t\tcolor\n\t\t\t\t) }\n\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\taria-haspopup=\"true\"\n\t\t\t\taria-expanded={ isOpen }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'components-custom-gradient-picker__control-point-button',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isOpen,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t{ __(\n\t\t\t\t\t'Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.'\n\t\t\t\t) }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n\nfunction GradientColorPickerDropdown( {\n\tisRenderedInSidebar,\n\tclassName,\n\t...props\n}: CustomColorPickerDropdownProps ) {\n\t// Open the popover below the gradient control/insertion point\n\tconst popoverProps = useMemo(\n\t\t() =>\n\t\t\t( {\n\t\t\t\tplacement: 'bottom',\n\t\t\t\toffset: 8,\n\t\t\t\t// Disabling resize as it would otherwise cause the popover to show\n\t\t\t\t// scrollbars while dragging the color picker's handle close to the\n\t\t\t\t// popover edge.\n\t\t\t\tresize: false,\n\t\t\t} ) as const,\n\t\t[]\n\t);\n\n\tconst mergedClassName = classnames(\n\t\t'components-custom-gradient-picker__control-point-dropdown',\n\t\tclassName\n\t);\n\n\treturn (\n\t\t<CustomColorPickerDropdown\n\t\t\tisRenderedInSidebar={ isRenderedInSidebar }\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tclassName={ mergedClassName }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction ControlPoints( {\n\tdisableRemove,\n\tdisableAlpha,\n\tgradientPickerDomRef,\n\tignoreMarkerPosition,\n\tvalue: controlPoints,\n\tonChange,\n\tonStartControlPointChange,\n\tonStopControlPointChange,\n\t__experimentalIsRenderedInSidebar,\n}: ControlPointsProps ) {\n\tconst controlPointMoveState = useRef< ControlPointMoveState >();\n\n\tconst onMouseMove = ( event: MouseEvent ) => {\n\t\tif (\n\t\t\tcontrolPointMoveState.current === undefined ||\n\t\t\tgradientPickerDomRef.current === null\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst relativePosition = getHorizontalRelativeGradientPosition(\n\t\t\tevent.clientX,\n\t\t\tgradientPickerDomRef.current\n\t\t);\n\n\t\tconst { initialPosition, index, significantMoveHappened } =\n\t\t\tcontrolPointMoveState.current;\n\n\t\tif (\n\t\t\t! significantMoveHappened &&\n\t\t\tMath.abs( initialPosition - relativePosition ) >=\n\t\t\t\tMINIMUM_SIGNIFICANT_MOVE\n\t\t) {\n\t\t\tcontrolPointMoveState.current.significantMoveHappened = true;\n\t\t}\n\n\t\tonChange(\n\t\t\tupdateControlPointPosition( controlPoints, index, relativePosition )\n\t\t);\n\t};\n\n\tconst cleanEventListeners = () => {\n\t\tif (\n\t\t\twindow &&\n\t\t\twindow.removeEventListener &&\n\t\t\tcontrolPointMoveState.current &&\n\t\t\tcontrolPointMoveState.current.listenersActivated\n\t\t) {\n\t\t\twindow.removeEventListener( 'mousemove', onMouseMove );\n\t\t\twindow.removeEventListener( 'mouseup', cleanEventListeners );\n\t\t\tonStopControlPointChange();\n\t\t\tcontrolPointMoveState.current.listenersActivated = false;\n\t\t}\n\t};\n\n\t// Adding `cleanEventListeners` to the dependency array below requires the function itself to be wrapped in a `useCallback`\n\t// This memoization would prevent the event listeners from being properly cleaned.\n\t// Instead, we'll pass a ref to the function in our `useEffect` so `cleanEventListeners` itself is no longer a dependency.\n\tconst cleanEventListenersRef = useRef< () => void >();\n\tcleanEventListenersRef.current = cleanEventListeners;\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tcleanEventListenersRef.current?.();\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<>\n\t\t\t{ controlPoints.map( ( point, index ) => {\n\t\t\t\tconst initialPosition = point?.position;\n\t\t\t\treturn (\n\t\t\t\t\tignoreMarkerPosition !== initialPosition && (\n\t\t\t\t\t\t<GradientColorPickerDropdown\n\t\t\t\t\t\t\tisRenderedInSidebar={\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tonClose={ onStopControlPointChange }\n\t\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t\t<ControlPointButton\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tcontrolPointMoveState.current &&\n\t\t\t\t\t\t\t\t\t\t\tcontrolPointMoveState.current\n\t\t\t\t\t\t\t\t\t\t\t\t.significantMoveHappened\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( isOpen ) {\n\t\t\t\t\t\t\t\t\t\t\tonStopControlPointChange();\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tonStartControlPointChange();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tonMouseDown={ () => {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\twindow &&\n\t\t\t\t\t\t\t\t\t\t\twindow.addEventListener\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tcontrolPointMoveState.current = {\n\t\t\t\t\t\t\t\t\t\t\t\tinitialPosition,\n\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\tsignificantMoveHappened: false,\n\t\t\t\t\t\t\t\t\t\t\t\tlistenersActivated: true,\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\tonStartControlPointChange();\n\t\t\t\t\t\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t\t\t\t\t\t'mousemove',\n\t\t\t\t\t\t\t\t\t\t\t\tonMouseMove\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t\t\t\t\t\t'mouseup',\n\t\t\t\t\t\t\t\t\t\t\t\tcleanEventListeners\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\t\tif ( event.code === 'ArrowLeft' ) {\n\t\t\t\t\t\t\t\t\t\t\t// Stop propagation of the key press event to avoid focus moving\n\t\t\t\t\t\t\t\t\t\t\t// to another editor area.\n\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\tupdateControlPointPosition(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\tclampPercent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpoint.position -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tKEYBOARD_CONTROL_POINT_VARIATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\t\t\t\tevent.code === 'ArrowRight'\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t// Stop propagation of the key press event to avoid focus moving\n\t\t\t\t\t\t\t\t\t\t\t// to another editor area.\n\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\tupdateControlPointPosition(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\tclampPercent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpoint.position +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tKEYBOARD_CONTROL_POINT_VARIATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\t\tposition={ point.position }\n\t\t\t\t\t\t\t\t\tcolor={ point.color }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t\t\t\t\t<ColorPicker\n\t\t\t\t\t\t\t\t\t\tenableAlpha={ ! disableAlpha }\n\t\t\t\t\t\t\t\t\t\tcolor={ point.color }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( color ) => {\n\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\tupdateControlPointColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolord(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor\n\t\t\t\t\t\t\t\t\t\t\t\t\t).toRgbString()\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{ ! disableRemove &&\n\t\t\t\t\t\t\t\t\t\tcontrolPoints.length > 2 && (\n\t\t\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-custom-gradient-picker__remove-control-point-wrapper\"\n\t\t\t\t\t\t\t\t\t\t\t\talignment=\"center\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tremoveControlPoint(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Remove Control Point'\n\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</DropdownContentWrapper>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tleft: `${ point.position }%`,\n\t\t\t\t\t\t\t\ttransform: 'translateX( -50% )',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n\nfunction InsertPoint( {\n\tvalue: controlPoints,\n\tonChange,\n\tonOpenInserter,\n\tonCloseInserter,\n\tinsertPosition,\n\tdisableAlpha,\n\t__experimentalIsRenderedInSidebar,\n}: InsertPointProps ) {\n\tconst [ alreadyInsertedPoint, setAlreadyInsertedPoint ] = useState( false );\n\treturn (\n\t\t<GradientColorPickerDropdown\n\t\t\tisRenderedInSidebar={ __experimentalIsRenderedInSidebar }\n\t\t\tclassName=\"components-custom-gradient-picker__inserter\"\n\t\t\tonClose={ () => {\n\t\t\t\tonCloseInserter();\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={ () => {\n\t\t\t\t\t\tif ( isOpen ) {\n\t\t\t\t\t\t\tonCloseInserter();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetAlreadyInsertedPoint( false );\n\t\t\t\t\t\t\tonOpenInserter();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonToggle();\n\t\t\t\t\t} }\n\t\t\t\t\tclassName=\"components-custom-gradient-picker__insert-point-dropdown\"\n\t\t\t\t\ticon={ plus }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ () => (\n\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t<ColorPicker\n\t\t\t\t\t\tenableAlpha={ ! disableAlpha }\n\t\t\t\t\t\tonChange={ ( color ) => {\n\t\t\t\t\t\t\tif ( ! alreadyInsertedPoint ) {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\taddControlPoint(\n\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\tinsertPosition,\n\t\t\t\t\t\t\t\t\t\tcolord( color ).toRgbString()\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tsetAlreadyInsertedPoint( true );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\tupdateControlPointColorByPosition(\n\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\tinsertPosition,\n\t\t\t\t\t\t\t\t\t\tcolord( color ).toRgbString()\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t\tstyle={\n\t\t\t\tinsertPosition !== null\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tleft: `${ insertPosition }%`,\n\t\t\t\t\t\t\ttransform: 'translateX( -50% )',\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t/>\n\t);\n}\nControlPoints.InsertPoint = InsertPoint;\n\nexport default ControlPoints;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AACnC,SAASC,MAAM,QAAQ,QAAQ;;AAE/B;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,oBAAoB;AACzE,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,IAAI,QAAQ,kBAAkB;;AAEvC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SAASC,MAAM,QAAQ,eAAe;AACtC,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,yBAAyB,QAAQ,qBAAqB;AAE/D,SACCC,eAAe,EACfC,YAAY,EACZC,kBAAkB,EAClBC,uBAAuB,EACvBC,iCAAiC,EACjCC,0BAA0B,EAC1BC,qCAAqC,QAC/B,SAAS;AAChB,SACCC,wBAAwB,EACxBC,gCAAgC,QAC1B,aAAa;AASpB,OAAOC,sBAAsB,MAAM,yCAAyC;AAE5E,SAASC,kBAAkBA,CAAE;EAC5BC,MAAM;EACNC,QAAQ;EACRC,KAAK;EACL,GAAGC;AACgE,CAAC,EAAG;EACvE,MAAMC,UAAU,GAAG5B,aAAa,CAAEuB,kBAAmB,CAAC;EACtD,MAAMM,aAAa,GAAI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,CACPhC,iCAAiC,CAChC+B,aAAa,EACb+C,cAAc,EACdhG,MAAM,CAAE2B,KAAM,CAAC,CAAC2D,WAAW,CAAC,CAC7B,CACD,CAAC;QACF;MACD;IAAG,CACH,CACsB,CACtB;IACHI,KAAK,EACJM,cAAc,KAAK,IAAI,GACpB;MACAL,IAAI,EAAG,GAAGK,cAAgB,GAAE;MAC5BJ,SAAS,EAAE;IACX,CAAC,GACDlC;EACH,CACD,CAAC;AAEJ;AACAf,aAAa,CAACkD,WAAW,GAAGA,WAAW;AAEvC,eAAelD,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useRef","useReducer","ControlPoints","getHorizontalRelativeGradientPosition","MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT","customGradientBarReducer","state","action","type","id","insertPosition","customGradientBarReducerInitialState","CustomGradientBar","background","hasGradient","value","controlPoints","onChange","disableInserter","disableAlpha","__experimentalIsRenderedInSidebar","gradientMarkersContainerDomRef","gradientBarState","gradientBarStateDispatch","onMouseEnterAndMove","event","current","clientX","some","position","Math","abs","onMouseLeave","isMovingInserter","isInsertingControlPoint","createElement","className","onMouseEnter","onMouseMove","style","opacity","ref","InsertPoint","onOpenInserter","onCloseInserter","disableRemove","gradientPickerDomRef","ignoreMarkerPosition","undefined","onStartControlPointChange","onStopControlPointChange"],"sources":["@wordpress/components/src/custom-gradient-picker/gradient-bar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useReducer } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ControlPoints from './control-points';\nimport { getHorizontalRelativeGradientPosition } from './utils';\nimport { MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT } from './constants';\nimport type {\n\tCustomGradientBarProps,\n\tCustomGradientBarReducerState,\n\tCustomGradientBarReducerAction,\n\tCustomGradientBarIdleState,\n} from '../types';\nimport type { MouseEventHandler } from 'react';\n\nconst customGradientBarReducer = (\n\tstate: CustomGradientBarReducerState,\n\taction: CustomGradientBarReducerAction\n): CustomGradientBarReducerState => {\n\tswitch ( action.type ) {\n\t\tcase 'MOVE_INSERTER':\n\t\t\tif ( state.id === 'IDLE' || state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'MOVING_INSERTER',\n\t\t\t\t\tinsertPosition: action.insertPosition,\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'STOP_INSERTER_MOVE':\n\t\t\tif ( state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'OPEN_INSERTER':\n\t\t\tif ( state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'INSERTING_CONTROL_POINT',\n\t\t\t\t\tinsertPosition: state.insertPosition,\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'CLOSE_INSERTER':\n\t\t\tif ( state.id === 'INSERTING_CONTROL_POINT' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'START_CONTROL_CHANGE':\n\t\t\tif ( state.id === 'IDLE' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'MOVING_CONTROL_POINT',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'STOP_CONTROL_CHANGE':\n\t\t\tif ( state.id === 'MOVING_CONTROL_POINT' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn state;\n};\nconst customGradientBarReducerInitialState: CustomGradientBarIdleState = {\n\tid: 'IDLE',\n};\n\nexport default function CustomGradientBar( {\n\tbackground,\n\thasGradient,\n\tvalue: controlPoints,\n\tonChange,\n\tdisableInserter = false,\n\tdisableAlpha = false,\n\t__experimentalIsRenderedInSidebar = false,\n}: CustomGradientBarProps ) {\n\tconst gradientMarkersContainerDomRef = useRef< HTMLDivElement >( null );\n\n\tconst [ gradientBarState, gradientBarStateDispatch ] = useReducer(\n\t\tcustomGradientBarReducer,\n\t\tcustomGradientBarReducerInitialState\n\t);\n\tconst onMouseEnterAndMove: MouseEventHandler< HTMLDivElement > = (\n\t\tevent\n\t) => {\n\t\tif ( ! gradientMarkersContainerDomRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst insertPosition = getHorizontalRelativeGradientPosition(\n\t\t\tevent.clientX,\n\t\t\tgradientMarkersContainerDomRef.current\n\t\t);\n\n\t\t// If the insert point is close to an existing control point don't show it.\n\t\tif (\n\t\t\tcontrolPoints.some( ( { position } ) => {\n\t\t\t\treturn (\n\t\t\t\t\tMath.abs( insertPosition - position ) <\n\t\t\t\t\tMINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT\n\t\t\t\t);\n\t\t\t} )\n\t\t) {\n\t\t\tif ( gradientBarState.id === 'MOVING_INSERTER' ) {\n\t\t\t\tgradientBarStateDispatch( { type: 'STOP_INSERTER_MOVE' } );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tgradientBarStateDispatch( { type: 'MOVE_INSERTER', insertPosition } );\n\t};\n\n\tconst onMouseLeave = () => {\n\t\tgradientBarStateDispatch( { type: 'STOP_INSERTER_MOVE' } );\n\t};\n\n\tconst isMovingInserter = gradientBarState.id === 'MOVING_INSERTER';\n\tconst isInsertingControlPoint =\n\t\tgradientBarState.id === 'INSERTING_CONTROL_POINT';\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-custom-gradient-picker__gradient-bar',\n\t\t\t\t{ 'has-gradient': hasGradient }\n\t\t\t) }\n\t\t\tonMouseEnter={ onMouseEnterAndMove }\n\t\t\tonMouseMove={ onMouseEnterAndMove }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"components-custom-gradient-picker__gradient-bar-background\"\n\t\t\t\tstyle={ {\n\t\t\t\t\tbackground,\n\t\t\t\t\topacity: hasGradient ? 1 : 0.4,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tref={ gradientMarkersContainerDomRef }\n\t\t\t\tclassName=\"components-custom-gradient-picker__markers-container\"\n\t\t\t>\n\t\t\t\t{ ! disableInserter &&\n\t\t\t\t\t( isMovingInserter || isInsertingControlPoint ) && (\n\t\t\t\t\t\t<ControlPoints.InsertPoint\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisableAlpha={ disableAlpha }\n\t\t\t\t\t\t\tinsertPosition={ gradientBarState.insertPosition }\n\t\t\t\t\t\t\tvalue={ controlPoints }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonOpenInserter={ () => {\n\t\t\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\t\t\ttype: 'OPEN_INSERTER',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCloseInserter={ () => {\n\t\t\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\t\t\ttype: 'CLOSE_INSERTER',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t<ControlPoints\n\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t}\n\t\t\t\t\tdisableAlpha={ disableAlpha }\n\t\t\t\t\tdisableRemove={ disableInserter }\n\t\t\t\t\tgradientPickerDomRef={ gradientMarkersContainerDomRef }\n\t\t\t\t\tignoreMarkerPosition={\n\t\t\t\t\t\tisInsertingControlPoint\n\t\t\t\t\t\t\t? gradientBarState.insertPosition\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tvalue={ controlPoints }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tonStartControlPointChange={ () => {\n\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\ttype: 'START_CONTROL_CHANGE',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tonStopControlPointChange={ () => {\n\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\ttype: 'STOP_CONTROL_CHANGE',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,UAAU,QAAQ,oBAAoB;;AAEvD;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,qCAAqC,QAAQ,SAAS;AAC/D,SAASC,2CAA2C,QAAQ,aAAa;AASzE,MAAMC,wBAAwB,GAAGA,CAChCC,KAAoC,EACpCC,MAAsC,KACH;EACnC,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,eAAe;MACnB,IAAKF,KAAK,CAACG,EAAE,KAAK,MAAM,IAAIH,KAAK,CAACG,EAAE,KAAK,iBAAiB,EAAG;QAC5D,OAAO;UACNA,EAAE,EAAE,iBAAiB;UACrBC,cAAc,EAAEH,MAAM,CAACG;QACxB,CAAC;MACF;MACA;IACD,KAAK,oBAAoB;MACxB,IAAKJ,KAAK,CAACG,EAAE,KAAK,iBAAiB,EAAG;QACrC,OAAO;UACNA,EAAE,EAAE;QACL,CAAC;MACF;MACA;IACD,KAAK,eAAe;MACnB,IAAKH,KAAK,CAACG,EAAE,KAAK,iBAAiB,EAAG;QACrC,OAAO;UACNA,EAAE,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IACHoC,eAAe,EAAGA,CAAA,KAAM;MACvBrB,wBAAwB,CAAE;QACzBf,IAAI,EAAE;MACP,CAAE,CAAC;IACJ;EAAG,CACH,CACD,EACF2B,aAAA,CAACjC,aAAa;IACbkB,iCAAiC,EAChCA,iCACA;IACDD,YAAY,EAAGA,YAAc;IAC7B0B,aAAa,EAAG3B,eAAiB;IACjC4B,oBAAoB,EAAGzB,8BAAgC;IACvD0B,oBAAoB,EACnBb,uBAAuB,GACpBZ,gBAAgB,CAACZ,cAAc,GAC/BsC,SACH;IACDjC,KAAK,EAAGC,aAAe;IACvBC,QAAQ,EAAGA,QAAU;IACrBgC,yBAAyB,EAAGA,CAAA,KAAM;MACjC1B,wBAAwB,CAAE;QACzBf,IAAI,EAAE;MACP,CAAE,CAAC;IACJ,CAAG;IACH0C,wBAAwB,EAAGA,CAAA,KAAM;MAChC3B,wBAAwB,CAAE;QACzBf,IAAI,EAAE;MACP,CAAE,CAAC;IACJ;EAAG,CACH,CACG,CACD,CAAC;AAER"}
1
+ {"version":3,"names":["classnames","useRef","useReducer","ControlPoints","getHorizontalRelativeGradientPosition","MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT","customGradientBarReducer","state","action","type","id","insertPosition","customGradientBarReducerInitialState","CustomGradientBar","background","hasGradient","value","controlPoints","onChange","disableInserter","disableAlpha","__experimentalIsRenderedInSidebar","gradientMarkersContainerDomRef","gradientBarState","gradientBarStateDispatch","onMouseEnterAndMove","event","current","clientX","some","position","Math","abs","onMouseLeave","isMovingInserter","isInsertingControlPoint","createElement","className","onMouseEnter","onMouseMove","style","opacity","ref","InsertPoint","onOpenInserter","onCloseInserter","disableRemove","gradientPickerDomRef","ignoreMarkerPosition","undefined","onStartControlPointChange","onStopControlPointChange"],"sources":["@wordpress/components/src/custom-gradient-picker/gradient-bar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useReducer } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ControlPoints from './control-points';\nimport { getHorizontalRelativeGradientPosition } from './utils';\nimport { MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT } from './constants';\nimport type {\n\tCustomGradientBarProps,\n\tCustomGradientBarReducerState,\n\tCustomGradientBarReducerAction,\n\tCustomGradientBarIdleState,\n} from '../types';\nimport type { MouseEventHandler } from 'react';\n\nconst customGradientBarReducer = (\n\tstate: CustomGradientBarReducerState,\n\taction: CustomGradientBarReducerAction\n): CustomGradientBarReducerState => {\n\tswitch ( action.type ) {\n\t\tcase 'MOVE_INSERTER':\n\t\t\tif ( state.id === 'IDLE' || state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'MOVING_INSERTER',\n\t\t\t\t\tinsertPosition: action.insertPosition,\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'STOP_INSERTER_MOVE':\n\t\t\tif ( state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'OPEN_INSERTER':\n\t\t\tif ( state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'INSERTING_CONTROL_POINT',\n\t\t\t\t\tinsertPosition: state.insertPosition,\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'CLOSE_INSERTER':\n\t\t\tif ( state.id === 'INSERTING_CONTROL_POINT' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'START_CONTROL_CHANGE':\n\t\t\tif ( state.id === 'IDLE' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'MOVING_CONTROL_POINT',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'STOP_CONTROL_CHANGE':\n\t\t\tif ( state.id === 'MOVING_CONTROL_POINT' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn state;\n};\nconst customGradientBarReducerInitialState: CustomGradientBarIdleState = {\n\tid: 'IDLE',\n};\n\nexport default function CustomGradientBar( {\n\tbackground,\n\thasGradient,\n\tvalue: controlPoints,\n\tonChange,\n\tdisableInserter = false,\n\tdisableAlpha = false,\n\t__experimentalIsRenderedInSidebar = false,\n}: CustomGradientBarProps ) {\n\tconst gradientMarkersContainerDomRef = useRef< HTMLDivElement >( null );\n\n\tconst [ gradientBarState, gradientBarStateDispatch ] = useReducer(\n\t\tcustomGradientBarReducer,\n\t\tcustomGradientBarReducerInitialState\n\t);\n\tconst onMouseEnterAndMove: MouseEventHandler< HTMLDivElement > = (\n\t\tevent\n\t) => {\n\t\tif ( ! gradientMarkersContainerDomRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst insertPosition = getHorizontalRelativeGradientPosition(\n\t\t\tevent.clientX,\n\t\t\tgradientMarkersContainerDomRef.current\n\t\t);\n\n\t\t// If the insert point is close to an existing control point don't show it.\n\t\tif (\n\t\t\tcontrolPoints.some( ( { position } ) => {\n\t\t\t\treturn (\n\t\t\t\t\tMath.abs( insertPosition - position ) <\n\t\t\t\t\tMINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT\n\t\t\t\t);\n\t\t\t} )\n\t\t) {\n\t\t\tif ( gradientBarState.id === 'MOVING_INSERTER' ) {\n\t\t\t\tgradientBarStateDispatch( { type: 'STOP_INSERTER_MOVE' } );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tgradientBarStateDispatch( { type: 'MOVE_INSERTER', insertPosition } );\n\t};\n\n\tconst onMouseLeave = () => {\n\t\tgradientBarStateDispatch( { type: 'STOP_INSERTER_MOVE' } );\n\t};\n\n\tconst isMovingInserter = gradientBarState.id === 'MOVING_INSERTER';\n\tconst isInsertingControlPoint =\n\t\tgradientBarState.id === 'INSERTING_CONTROL_POINT';\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-custom-gradient-picker__gradient-bar',\n\t\t\t\t{ 'has-gradient': hasGradient }\n\t\t\t) }\n\t\t\tonMouseEnter={ onMouseEnterAndMove }\n\t\t\tonMouseMove={ onMouseEnterAndMove }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"components-custom-gradient-picker__gradient-bar-background\"\n\t\t\t\tstyle={ {\n\t\t\t\t\tbackground,\n\t\t\t\t\topacity: hasGradient ? 1 : 0.4,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tref={ gradientMarkersContainerDomRef }\n\t\t\t\tclassName=\"components-custom-gradient-picker__markers-container\"\n\t\t\t>\n\t\t\t\t{ ! disableInserter &&\n\t\t\t\t\t( isMovingInserter || isInsertingControlPoint ) && (\n\t\t\t\t\t\t<ControlPoints.InsertPoint\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisableAlpha={ disableAlpha }\n\t\t\t\t\t\t\tinsertPosition={ gradientBarState.insertPosition }\n\t\t\t\t\t\t\tvalue={ controlPoints }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonOpenInserter={ () => {\n\t\t\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\t\t\ttype: 'OPEN_INSERTER',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCloseInserter={ () => {\n\t\t\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\t\t\ttype: 'CLOSE_INSERTER',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t<ControlPoints\n\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t}\n\t\t\t\t\tdisableAlpha={ disableAlpha }\n\t\t\t\t\tdisableRemove={ disableInserter }\n\t\t\t\t\tgradientPickerDomRef={ gradientMarkersContainerDomRef }\n\t\t\t\t\tignoreMarkerPosition={\n\t\t\t\t\t\tisInsertingControlPoint\n\t\t\t\t\t\t\t? gradientBarState.insertPosition\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tvalue={ controlPoints }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tonStartControlPointChange={ () => {\n\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\ttype: 'START_CONTROL_CHANGE',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tonStopControlPointChange={ () => {\n\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\ttype: 'STOP_CONTROL_CHANGE',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,UAAU,QAAQ,oBAAoB;;AAEvD;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,qCAAqC,QAAQ,SAAS;AAC/D,SAASC,2CAA2C,QAAQ,aAAa;AASzE,MAAMC,wBAAwB,GAAGA,CAChCC,KAAoC,EACpCC,MAAsC,KACH;EACnC,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,eAAe;MACnB,IAAKF,KAAK,CAACG,EAAE,KAAK,MAAM,IAAIH,KAAK,CAACG,EAAE,KAAK,iBAAiB,EAAG;QAC5D,OAAO;UACNA,EAAE,EAAE,iBAAiB;UACrBC,cAAc,EAA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B,iCAAiC,EAChCA,iCACA;IACDD,YAAY,EAAGA,YAAc;IAC7BT,cAAc,EAAGY,gBAAgB,CAACZ,cAAgB;IAClDK,KAAK,EAAGC,aAAe;IACvBC,QAAQ,EAAGA,QAAU;IACrB0B,cAAc,EAAGA,CAAA,KAAM;MACtBpB,wBAAwB,CAAE;QACzBf,IAAI,EAAE;MACP,CAAE,CAAC;IACJ,CAAG;IACHoC,eAAe,EAAGA,CAAA,KAAM;MACvBrB,wBAAwB,CAAE;QACzBf,IAAI,EAAE;MACP,CAAE,CAAC;IACJ;EAAG,CACH,CACD,EACF2B,aAAA,CAACjC,aAAa;IACbkB,iCAAiC,EAChCA,iCACA;IACDD,YAAY,EAAGA,YAAc;IAC7B0B,aAAa,EAAG3B,eAAiB;IACjC4B,oBAAoB,EAAGzB,8BAAgC;IACvD0B,oBAAoB,EACnBb,uBAAuB,GACpBZ,gBAAgB,CAACZ,cAAc,GAC/BsC,SACH;IACDjC,KAAK,EAAGC,aAAe;IACvBC,QAAQ,EAAGA,QAAU;IACrBgC,yBAAyB,EAAGA,CAAA,KAAM;MACjC1B,wBAAwB,CAAE;QACzBf,IAAI,EAAE;MACP,CAAE,CAAC;IACJ,CAAG;IACH0C,wBAAwB,EAAGA,CAAA,KAAM;MAChC3B,wBAAwB,CAAE;QACzBf,IAAI,EAAE;MACP,CAAE,CAAC;IACJ;EAAG,CACH,CACG,CACD,CAAC;AAER","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["MINIMUM_DISTANCE_BETWEEN_POINTS","clampPercent","value","Math","max","min","isOverlapping","initialIndex","newPosition","minDistance","initialPosition","position","minPosition","maxPosition","some","index","abs","addControlPoint","points","color","nextIndex","findIndex","point","newPoint","newPoints","slice","splice","removeControlPoint","filter","_point","pointIndex","updateControlPoint","newValue","updateControlPointPosition","updateControlPointColor","newColor","updateControlPointColorByPosition","getHorizontalRelativeGradientPosition","mouseXCoordinate","containerElement","x","width","getBoundingClientRect","absolutePositionValue","round"],"sources":["@wordpress/components/src/custom-gradient-picker/gradient-bar/utils.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { MINIMUM_DISTANCE_BETWEEN_POINTS } from './constants';\nimport type { ControlPoint } from '../types';\n\n/**\n * Clamps a number between 0 and 100.\n *\n * @param value Value to clamp.\n *\n * @return Value clamped between 0 and 100.\n */\nexport function clampPercent( value: number ) {\n\treturn Math.max( 0, Math.min( 100, value ) );\n}\n\n/**\n * Check if a control point is overlapping with another.\n *\n * @param value Array of control points.\n * @param initialIndex Index of the position to test.\n * @param newPosition New position of the control point.\n * @param minDistance Distance considered to be overlapping.\n *\n * @return True if the point is overlapping.\n */\nexport function isOverlapping(\n\tvalue: ControlPoint[],\n\tinitialIndex: number,\n\tnewPosition: number,\n\tminDistance: number = MINIMUM_DISTANCE_BETWEEN_POINTS\n) {\n\tconst initialPosition = value[ initialIndex ].position;\n\tconst minPosition = Math.min( initialPosition, newPosition );\n\tconst maxPosition = Math.max( initialPosition, newPosition );\n\n\treturn value.some( ( { position }, index ) => {\n\t\treturn (\n\t\t\tindex !== initialIndex &&\n\t\t\t( Math.abs( position - newPosition ) < minDistance ||\n\t\t\t\t( minPosition < position && position < maxPosition ) )\n\t\t);\n\t} );\n}\n\n/**\n * Adds a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param position Position to insert the new point.\n * @param color Color to update the control point at index.\n *\n * @return New array of control points.\n */\nexport function addControlPoint(\n\tpoints: ControlPoint[],\n\tposition: number,\n\tcolor: ControlPoint[ 'color' ]\n) {\n\tconst nextIndex = points.findIndex(\n\t\t( point ) => point.position > position\n\t);\n\tconst newPoint = { color, position };\n\tconst newPoints = points.slice();\n\tnewPoints.splice( nextIndex - 1, 0, newPoint );\n\treturn newPoints;\n}\n\n/**\n * Removes a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to remove.\n *\n * @return New array of control points.\n */\nexport function removeControlPoint( points: ControlPoint[], index: number ) {\n\treturn points.filter( ( _point, pointIndex ) => {\n\t\treturn pointIndex !== index;\n\t} );\n}\n/**\n * Updates a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to update.\n * @param newPoint New control point to replace the index.\n *\n * @return New array of control points.\n */\nexport function updateControlPoint(\n\tpoints: ControlPoint[],\n\tindex: number,\n\tnewPoint: ControlPoint\n) {\n\tconst newValue = points.slice();\n\tnewValue[ index ] = newPoint;\n\treturn newValue;\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to update.\n * @param newPosition Position to move the control point at index.\n *\n * @return New array of control points.\n */\nexport function updateControlPointPosition(\n\tpoints: ControlPoint[],\n\tindex: number,\n\tnewPosition: ControlPoint[ 'position' ]\n) {\n\tif ( isOverlapping( points, index, newPosition ) ) {\n\t\treturn points;\n\t}\n\tconst newPoint = {\n\t\t...points[ index ],\n\t\tposition: newPosition,\n\t};\n\treturn updateControlPoint( points, index, newPoint );\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to update.\n * @param newColor Color to update the control point at index.\n *\n * @return New array of control points.\n */\nexport function updateControlPointColor(\n\tpoints: ControlPoint[],\n\tindex: number,\n\tnewColor: ControlPoint[ 'color' ]\n) {\n\tconst newPoint = {\n\t\t...points[ index ],\n\t\tcolor: newColor,\n\t};\n\treturn updateControlPoint( points, index, newPoint );\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param position Position of the color stop.\n * @param newColor Color to update the control point at index.\n *\n * @return New array of control points.\n */\nexport function updateControlPointColorByPosition(\n\tpoints: ControlPoint[],\n\tposition: ControlPoint[ 'position' ],\n\tnewColor: ControlPoint[ 'color' ]\n) {\n\tconst index = points.findIndex( ( point ) => point.position === position );\n\treturn updateControlPointColor( points, index, newColor );\n}\n\n/**\n * Gets the horizontal coordinate when dragging a control point with the mouse.\n *\n * @param mouseXcoordinate Horizontal coordinate of the mouse position.\n * @param containerElement Container for the gradient picker.\n *\n * @return Whole number percentage from the left.\n */\nexport function getHorizontalRelativeGradientPosition(\n\tmouseXcoordinate: number,\n\tcontainerElement: HTMLDivElement\n): number;\nexport function getHorizontalRelativeGradientPosition(\n\tmouseXcoordinate: number,\n\tcontainerElement: null\n): undefined;\nexport function getHorizontalRelativeGradientPosition(\n\tmouseXCoordinate: number,\n\tcontainerElement: HTMLDivElement | null\n) {\n\tif ( ! containerElement ) {\n\t\treturn;\n\t}\n\tconst { x, width } = containerElement.getBoundingClientRect();\n\tconst absolutePositionValue = mouseXCoordinate - x;\n\treturn Math.round(\n\t\tclampPercent( ( absolutePositionValue * 100 ) / width )\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,+BAA+B,QAAQ,aAAa;AAG7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAEC,KAAa,EAAG;EAC7C,OAAOC,IAAI,CAACC,GAAG,CAAE,CAAC,EAAED,IAAI,CAACE,GAAG,CAAE,GAAG,EAAEH,KAAM,CAAE,CAAC;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,aAAaA,CAC5BJ,KAAqB,EACrBK,YAAoB,EACpBC,WAAmB,EACnBC,WAAmB,GAAGT,+BAA+B,EACpD;EACD,MAAMU,eAAe,GAAGR,KAAK,CAAEK,YAAY,CAAE,CAACI,QAAQ;EACtD,MAAMC,WAAW,GAAGT,IAAI,CAACE,GAAG,CAAEK,eAAe,EAAEF,WAAY,CAAC;EAC5D,MAAMK,WAAW,GAAGV,IAAI,CAACC,GAAG,CAAEM,eAAe,EAAEF,WAAY,CAAC;EAE5D,OAAON,KAAK,CAACY,IAAI,CAAE,CAAE;IAAEH;EAAS,CAAC,EAAEI,KAAK,KAAM;IAC7C,OACCA,KAAK,KAAKR,YAAY,KACpBJ,IAAI,CAACa,GAAG,CAAEL,QAAQ,GAAGH,WAAY,CAAC,GAAGC,WAAW,IAC/CG,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MAAMK,QAAQ,GAAG;IAChB,GAAGL,MAAM,CAAEH,KAAK,CAAE;IAClBJ,QAAQ,EAAEH;EACX,CAAC;EACD,OAAOuB,kBAAkB,CAAEb,MAAM,EAAEH,KAAK,EAAEQ,QAAS,CAAC;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASW,uBAAuBA,CACtChB,MAAsB,EACtBH,KAAa,EACboB,QAAiC,EAChC;EACD,MAAMZ,QAAQ,GAAG;IAChB,GAAGL,MAAM,CAAEH,KAAK,CAAE;IAClBI,KAAK,EAAEgB;EACR,CAAC;EACD,OAAOJ,kBAAkB,CAAEb,MAAM,EAAEH,KAAK,EAAEQ,QAAS,CAAC;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASa,iCAAiCA,CAChDlB,MAAsB,EACtBP,QAAoC,EACpCwB,QAAiC,EAChC;EACD,MAAMpB,KAAK,GAAGG,MAAM,CAACG,SAAS,CAAIC,KAAK,IAAMA,KAAK,CAACX,QAAQ,KAAKA,QAAS,CAAC;EAC1E,OAAOuB,uBAAuB,CAAEhB,MAAM,EAAEH,KAAK,EAAEoB,QAAS,CAAC;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASE,qCAAqCA,CACpDC,gBAAwB,EACxBC,gBAAuC,EACtC;EACD,IAAK,CAAEA,gBAAgB,EAAG;IACzB;EACD;EACA,MAAM;IAAEC,CAAC;IAAEC;EAAM,CAAC,GAAGF,gBAAgB,CAACG,qBAAqB,CAAC,CAAC;EAC7D,MAAMC,qBAAqB,GAAGL,gBAAgB,GAAGE,CAAC;EAClD,OAAOrC,IAAI,CAACyC,KAAK,CAChB3C,YAAY,CAAI0C,qBAAqB,GAAG,GAAG,GAAKF,KAAM,CACvD,CAAC;AACF"}
1
+ {"version":3,"names":["MINIMUM_DISTANCE_BETWEEN_POINTS","clampPercent","value","Math","max","min","isOverlapping","initialIndex","newPosition","minDistance","initialPosition","position","minPosition","maxPosition","some","index","abs","addControlPoint","points","color","nextIndex","findIndex","point","newPoint","newPoints","slice","splice","removeControlPoint","filter","_point","pointIndex","updateControlPoint","newValue","updateControlPointPosition","updateControlPointColor","newColor","updateControlPointColorByPosition","getHorizontalRelativeGradientPosition","mouseXCoordinate","containerElement","x","width","getBoundingClientRect","absolutePositionValue","round"],"sources":["@wordpress/components/src/custom-gradient-picker/gradient-bar/utils.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { MINIMUM_DISTANCE_BETWEEN_POINTS } from './constants';\nimport type { ControlPoint } from '../types';\n\n/**\n * Clamps a number between 0 and 100.\n *\n * @param value Value to clamp.\n *\n * @return Value clamped between 0 and 100.\n */\nexport function clampPercent( value: number ) {\n\treturn Math.max( 0, Math.min( 100, value ) );\n}\n\n/**\n * Check if a control point is overlapping with another.\n *\n * @param value Array of control points.\n * @param initialIndex Index of the position to test.\n * @param newPosition New position of the control point.\n * @param minDistance Distance considered to be overlapping.\n *\n * @return True if the point is overlapping.\n */\nexport function isOverlapping(\n\tvalue: ControlPoint[],\n\tinitialIndex: number,\n\tnewPosition: number,\n\tminDistance: number = MINIMUM_DISTANCE_BETWEEN_POINTS\n) {\n\tconst initialPosition = value[ initialIndex ].position;\n\tconst minPosition = Math.min( initialPosition, newPosition );\n\tconst maxPosition = Math.max( initialPosition, newPosition );\n\n\treturn value.some( ( { position }, index ) => {\n\t\treturn (\n\t\t\tindex !== initialIndex &&\n\t\t\t( Math.abs( position - newPosition ) < minDistance ||\n\t\t\t\t( minPosition < position && position < maxPosition ) )\n\t\t);\n\t} );\n}\n\n/**\n * Adds a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param position Position to insert the new point.\n * @param color Color to update the control point at index.\n *\n * @return New array of control points.\n */\nexport function addControlPoint(\n\tpoints: ControlPoint[],\n\tposition: number,\n\tcolor: ControlPoint[ 'color' ]\n) {\n\tconst nextIndex = points.findIndex(\n\t\t( point ) => point.position > position\n\t);\n\tconst newPoint = { color, position };\n\tconst newPoints = points.slice();\n\tnewPoints.splice( nextIndex - 1, 0, newPoint );\n\treturn newPoints;\n}\n\n/**\n * Removes a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to remove.\n *\n * @return New array of control points.\n */\nexport function removeControlPoint( points: ControlPoint[], index: number ) {\n\treturn points.filter( ( _point, pointIndex ) => {\n\t\treturn pointIndex !== index;\n\t} );\n}\n/**\n * Updates a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to update.\n * @param newPoint New control point to replace the index.\n *\n * @return New array of control points.\n */\nexport function updateControlPoint(\n\tpoints: ControlPoint[],\n\tindex: number,\n\tnewPoint: ControlPoint\n) {\n\tconst newValue = points.slice();\n\tnewValue[ index ] = newPoint;\n\treturn newValue;\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to update.\n * @param newPosition Position to move the control point at index.\n *\n * @return New array of control points.\n */\nexport function updateControlPointPosition(\n\tpoints: ControlPoint[],\n\tindex: number,\n\tnewPosition: ControlPoint[ 'position' ]\n) {\n\tif ( isOverlapping( points, index, newPosition ) ) {\n\t\treturn points;\n\t}\n\tconst newPoint = {\n\t\t...points[ index ],\n\t\tposition: newPosition,\n\t};\n\treturn updateControlPoint( points, index, newPoint );\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to update.\n * @param newColor Color to update the control point at index.\n *\n * @return New array of control points.\n */\nexport function updateControlPointColor(\n\tpoints: ControlPoint[],\n\tindex: number,\n\tnewColor: ControlPoint[ 'color' ]\n) {\n\tconst newPoint = {\n\t\t...points[ index ],\n\t\tcolor: newColor,\n\t};\n\treturn updateControlPoint( points, index, newPoint );\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param position Position of the color stop.\n * @param newColor Color to update the control point at index.\n *\n * @return New array of control points.\n */\nexport function updateControlPointColorByPosition(\n\tpoints: ControlPoint[],\n\tposition: ControlPoint[ 'position' ],\n\tnewColor: ControlPoint[ 'color' ]\n) {\n\tconst index = points.findIndex( ( point ) => point.position === position );\n\treturn updateControlPointColor( points, index, newColor );\n}\n\n/**\n * Gets the horizontal coordinate when dragging a control point with the mouse.\n *\n * @param mouseXcoordinate Horizontal coordinate of the mouse position.\n * @param containerElement Container for the gradient picker.\n *\n * @return Whole number percentage from the left.\n */\nexport function getHorizontalRelativeGradientPosition(\n\tmouseXcoordinate: number,\n\tcontainerElement: HTMLDivElement\n): number;\nexport function getHorizontalRelativeGradientPosition(\n\tmouseXcoordinate: number,\n\tcontainerElement: null\n): undefined;\nexport function getHorizontalRelativeGradientPosition(\n\tmouseXCoordinate: number,\n\tcontainerElement: HTMLDivElement | null\n) {\n\tif ( ! containerElement ) {\n\t\treturn;\n\t}\n\tconst { x, width } = containerElement.getBoundingClientRect();\n\tconst absolutePositionValue = mouseXCoordinate - x;\n\treturn Math.round(\n\t\tclampPercent( ( absolutePositionValue * 100 ) / width )\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,+BAA+B,QAAQ,aAAa;AAG7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAEC,KAAa,EAAG;EAC7C,OAAOC,IAAI,CAACC,GAAG,CAAE,CAAC,EAAED,IAAI,CAACE,GAAG,CAAE,GAAG,EAAEH,KAAM,CAAE,CAAC;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,aAAaA,CAC5BJ,KAAqB,EACrBK,YAAoB,EACpBC,WAAmB,EACnBC,WAAmB,GAAGT,+BAA+B,EACpD;EACD,MAAMU,eAAe,GAAGR,KAAK,CAAEK,YAAY,CAAE,CAACI,QAAQ;EACtD,MAAMC,WAAW,GAAGT,IAAI,CAACE,GAAG,CAAEK,eAAe,EAAEF,WAAY,CAAC;EAC5D,MAAMK,WAAW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G,qBAAqB,CAAC,CAAC;EAC7D,MAAMC,qBAAqB,GAAGL,gBAAgB,GAAGE,CAAC;EAClD,OAAOrC,IAAI,CAACyC,KAAK,CAChB3C,YAAY,CAAI0C,qBAAqB,GAAG,GAAG,GAAKF,KAAM,CACvD,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","AnglePickerControl","CustomGradientBar","Flex","SelectControl","VStack","getGradientAstWithDefault","getLinearGradientRepresentation","getGradientAstWithControlPoints","getStopCssColor","serializeGradient","DEFAULT_LINEAR_GRADIENT_ANGLE","HORIZONTAL_GRADIENT_ORIENTATION","GRADIENT_OPTIONS","AccessoryWrapper","SelectWrapper","GradientAnglePicker","gradientAST","hasGradient","onChange","_gradientAST$orientat","angle","orientation","value","onAngleChange","newAngle","type","createElement","GradientTypePicker","onSetLinearGradient","undefined","onSetRadialGradient","restGradientAST","handleOnChange","next","__nextHasNoMarginBottom","className","label","labelPosition","options","size","CustomGradientPicker","__experimentalIsRenderedInSidebar","background","controlPoints","colorStops","map","colorStop","color","position","parseInt","length","spacing","newControlPoints","gap"],"sources":["@wordpress/components/src/custom-gradient-picker/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type gradientParser from 'gradient-parser';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AnglePickerControl from '../angle-picker-control';\nimport CustomGradientBar from './gradient-bar';\nimport { Flex } from '../flex';\nimport SelectControl from '../select-control';\nimport { VStack } from '../v-stack';\nimport {\n\tgetGradientAstWithDefault,\n\tgetLinearGradientRepresentation,\n\tgetGradientAstWithControlPoints,\n\tgetStopCssColor,\n} from './utils';\nimport { serializeGradient } from './serializer';\nimport {\n\tDEFAULT_LINEAR_GRADIENT_ANGLE,\n\tHORIZONTAL_GRADIENT_ORIENTATION,\n\tGRADIENT_OPTIONS,\n} from './constants';\nimport {\n\tAccessoryWrapper,\n\tSelectWrapper,\n} from './styles/custom-gradient-picker-styles';\nimport type {\n\tCustomGradientPickerProps,\n\tGradientAnglePickerProps,\n\tGradientTypePickerProps,\n} from './types';\n\nconst GradientAnglePicker = ( {\n\tgradientAST,\n\thasGradient,\n\tonChange,\n}: GradientAnglePickerProps ) => {\n\tconst angle =\n\t\tgradientAST?.orientation?.value ?? DEFAULT_LINEAR_GRADIENT_ANGLE;\n\tconst onAngleChange = ( newAngle: number ) => {\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...gradientAST,\n\t\t\t\torientation: {\n\t\t\t\t\ttype: 'angular',\n\t\t\t\t\tvalue: `${ newAngle }`,\n\t\t\t\t},\n\t\t\t} )\n\t\t);\n\t};\n\treturn (\n\t\t<AnglePickerControl\n\t\t\tonChange={ onAngleChange }\n\t\t\tvalue={ hasGradient ? angle : '' }\n\t\t/>\n\t);\n};\n\nconst GradientTypePicker = ( {\n\tgradientAST,\n\thasGradient,\n\tonChange,\n}: GradientTypePickerProps ) => {\n\tconst { type } = gradientAST;\n\n\tconst onSetLinearGradient = () => {\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...gradientAST,\n\t\t\t\torientation: gradientAST.orientation\n\t\t\t\t\t? undefined\n\t\t\t\t\t: HORIZONTAL_GRADIENT_ORIENTATION,\n\t\t\t\ttype: 'linear-gradient',\n\t\t\t} as gradientParser.LinearGradientNode )\n\t\t);\n\t};\n\n\tconst onSetRadialGradient = () => {\n\t\tconst { orientation, ...restGradientAST } = gradientAST;\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...restGradientAST,\n\t\t\t\ttype: 'radial-gradient',\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst handleOnChange = ( next: string ) => {\n\t\tif ( next === 'linear-gradient' ) {\n\t\t\tonSetLinearGradient();\n\t\t}\n\t\tif ( next === 'radial-gradient' ) {\n\t\t\tonSetRadialGradient();\n\t\t}\n\t};\n\n\treturn (\n\t\t<SelectControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"components-custom-gradient-picker__type-picker\"\n\t\t\tlabel={ __( 'Type' ) }\n\t\t\tlabelPosition=\"top\"\n\t\t\tonChange={ handleOnChange }\n\t\t\toptions={ GRADIENT_OPTIONS }\n\t\t\tsize=\"__unstable-large\"\n\t\t\tvalue={ hasGradient ? type : undefined }\n\t\t/>\n\t);\n};\n\n/**\n * CustomGradientPicker is a React component that renders a UI for specifying\n * linear or radial gradients. Radial gradients are displayed in the picker as\n * a slice of the gradient from the center to the outside.\n *\n * ```jsx\n * import { CustomGradientPicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyCustomGradientPicker = () => {\n * const [ gradient, setGradient ] = useState();\n *\n * return (\n * <CustomGradientPicker\n *\t\t\tvalue={ gradient }\n *\t\t\tonChange={ setGradient }\n * />\n * );\n * };\n * ```\n */\nexport function CustomGradientPicker( {\n\tvalue,\n\tonChange,\n\t__experimentalIsRenderedInSidebar = false,\n}: CustomGradientPickerProps ) {\n\tconst { gradientAST, hasGradient } = getGradientAstWithDefault( value );\n\n\t// On radial gradients the bar should display a linear gradient.\n\t// On radial gradients the bar represents a slice of the gradient from the center until the outside.\n\t// On liner gradients the bar represents the color stops from left to right independently of the angle.\n\tconst background = getLinearGradientRepresentation( gradientAST );\n\n\t// Control points color option may be hex from presets, custom colors will be rgb.\n\t// The position should always be a percentage.\n\tconst controlPoints = gradientAST.colorStops.map( ( colorStop ) => {\n\t\treturn {\n\t\t\tcolor: getStopCssColor( colorStop ),\n\t\t\t// Although it's already been checked by `hasUnsupportedLength` in `getGradientAstWithDefault`,\n\t\t\t// TypeScript doesn't know that `colorStop.length` is not undefined here.\n\t\t\t// @ts-expect-error\n\t\t\tposition: parseInt( colorStop.length.value ),\n\t\t};\n\t} );\n\n\treturn (\n\t\t<VStack spacing={ 4 } className=\"components-custom-gradient-picker\">\n\t\t\t<CustomGradientBar\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tbackground={ background }\n\t\t\t\thasGradient={ hasGradient }\n\t\t\t\tvalue={ controlPoints }\n\t\t\t\tonChange={ ( newControlPoints ) => {\n\t\t\t\t\tonChange(\n\t\t\t\t\t\tserializeGradient(\n\t\t\t\t\t\t\tgetGradientAstWithControlPoints(\n\t\t\t\t\t\t\t\tgradientAST,\n\t\t\t\t\t\t\t\tnewControlPoints\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<Flex\n\t\t\t\tgap={ 3 }\n\t\t\t\tclassName=\"components-custom-gradient-picker__ui-line\"\n\t\t\t>\n\t\t\t\t<SelectWrapper>\n\t\t\t\t\t<GradientTypePicker\n\t\t\t\t\t\tgradientAST={ gradientAST }\n\t\t\t\t\t\thasGradient={ hasGradient }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t</SelectWrapper>\n\t\t\t\t<AccessoryWrapper>\n\t\t\t\t\t{ gradientAST.type === 'linear-gradient' && (\n\t\t\t\t\t\t<GradientAnglePicker\n\t\t\t\t\t\t\tgradientAST={ gradientAST }\n\t\t\t\t\t\t\thasGradient={ hasGradient }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</AccessoryWrapper>\n\t\t\t</Flex>\n\t\t</VStack>\n\t);\n}\n\nexport default CustomGradientPicker;\n"],"mappings":";AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,yBAAyB;AACxD,OAAOC,iBAAiB,MAAM,gBAAgB;AAC9C,SAASC,IAAI,QAAQ,SAAS;AAC9B,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,SAASC,MAAM,QAAQ,YAAY;AACnC,SACCC,yBAAyB,EACzBC,+BAA+B,EAC/BC,+BAA+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B,MAAM;IAAC+C,OAAO,EAAG,CAAG;IAAChB,SAAS,EAAC;EAAmC,GAClET,aAAA,CAACzB,iBAAiB;IACjBwC,iCAAiC,EAChCA,iCACA;IACDC,UAAU,EAAGA,UAAY;IACzBzB,WAAW,EAAGA,WAAa;IAC3BK,KAAK,EAAGqB,aAAe;IACvBzB,QAAQ,EAAKkC,gBAAgB,IAAM;MAClClC,QAAQ,CACPT,iBAAiB,CAChBF,+BAA+B,CAC9BS,WAAW,EACXoC,gBACD,CACD,CACD,CAAC;IACF;EAAG,CACH,CAAC,EACF1B,aAAA,CAACxB,IAAI;IACJmD,GAAG,EAAG,CAAG;IACTlB,SAAS,EAAC;EAA4C,GAEtDT,aAAA,CAACZ,aAAa,QACbY,aAAA,CAACC,kBAAkB;IAClBX,WAAW,EAAGA,WAAa;IAC3BC,WAAW,EAAGA,WAAa;IAC3BC,QAAQ,EAAGA;EAAU,CACrB,CACa,CAAC,EAChBQ,aAAA,CAACb,gBAAgB,QACdG,WAAW,CAACS,IAAI,KAAK,iBAAiB,IACvCC,aAAA,CAACX,mBAAmB;IACnBC,WAAW,EAAGA,WAAa;IAC3BC,WAAW,EAAGA,WAAa;IAC3BC,QAAQ,EAAGA;EAAU,CACrB,CAEe,CACb,CACC,CAAC;AAEX;AAEA,eAAesB,oBAAoB"}
1
+ {"version":3,"names":["__","AnglePickerControl","CustomGradientBar","Flex","SelectControl","VStack","getGradientAstWithDefault","getLinearGradientRepresentation","getGradientAstWithControlPoints","getStopCssColor","serializeGradient","DEFAULT_LINEAR_GRADIENT_ANGLE","HORIZONTAL_GRADIENT_ORIENTATION","GRADIENT_OPTIONS","AccessoryWrapper","SelectWrapper","GradientAnglePicker","gradientAST","hasGradient","onChange","_gradientAST$orientat","angle","orientation","value","onAngleChange","newAngle","type","createElement","GradientTypePicker","onSetLinearGradient","undefined","onSetRadialGradient","restGradientAST","handleOnChange","next","__nextHasNoMarginBottom","className","label","labelPosition","options","size","CustomGradientPicker","__experimentalIsRenderedInSidebar","background","controlPoints","colorStops","map","colorStop","color","position","parseInt","length","spacing","newControlPoints","gap"],"sources":["@wordpress/components/src/custom-gradient-picker/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type gradientParser from 'gradient-parser';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AnglePickerControl from '../angle-picker-control';\nimport CustomGradientBar from './gradient-bar';\nimport { Flex } from '../flex';\nimport SelectControl from '../select-control';\nimport { VStack } from '../v-stack';\nimport {\n\tgetGradientAstWithDefault,\n\tgetLinearGradientRepresentation,\n\tgetGradientAstWithControlPoints,\n\tgetStopCssColor,\n} from './utils';\nimport { serializeGradient } from './serializer';\nimport {\n\tDEFAULT_LINEAR_GRADIENT_ANGLE,\n\tHORIZONTAL_GRADIENT_ORIENTATION,\n\tGRADIENT_OPTIONS,\n} from './constants';\nimport {\n\tAccessoryWrapper,\n\tSelectWrapper,\n} from './styles/custom-gradient-picker-styles';\nimport type {\n\tCustomGradientPickerProps,\n\tGradientAnglePickerProps,\n\tGradientTypePickerProps,\n} from './types';\n\nconst GradientAnglePicker = ( {\n\tgradientAST,\n\thasGradient,\n\tonChange,\n}: GradientAnglePickerProps ) => {\n\tconst angle =\n\t\tgradientAST?.orientation?.value ?? DEFAULT_LINEAR_GRADIENT_ANGLE;\n\tconst onAngleChange = ( newAngle: number ) => {\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...gradientAST,\n\t\t\t\torientation: {\n\t\t\t\t\ttype: 'angular',\n\t\t\t\t\tvalue: `${ newAngle }`,\n\t\t\t\t},\n\t\t\t} )\n\t\t);\n\t};\n\treturn (\n\t\t<AnglePickerControl\n\t\t\tonChange={ onAngleChange }\n\t\t\tvalue={ hasGradient ? angle : '' }\n\t\t/>\n\t);\n};\n\nconst GradientTypePicker = ( {\n\tgradientAST,\n\thasGradient,\n\tonChange,\n}: GradientTypePickerProps ) => {\n\tconst { type } = gradientAST;\n\n\tconst onSetLinearGradient = () => {\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...gradientAST,\n\t\t\t\torientation: gradientAST.orientation\n\t\t\t\t\t? undefined\n\t\t\t\t\t: HORIZONTAL_GRADIENT_ORIENTATION,\n\t\t\t\ttype: 'linear-gradient',\n\t\t\t} as gradientParser.LinearGradientNode )\n\t\t);\n\t};\n\n\tconst onSetRadialGradient = () => {\n\t\tconst { orientation, ...restGradientAST } = gradientAST;\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...restGradientAST,\n\t\t\t\ttype: 'radial-gradient',\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst handleOnChange = ( next: string ) => {\n\t\tif ( next === 'linear-gradient' ) {\n\t\t\tonSetLinearGradient();\n\t\t}\n\t\tif ( next === 'radial-gradient' ) {\n\t\t\tonSetRadialGradient();\n\t\t}\n\t};\n\n\treturn (\n\t\t<SelectControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"components-custom-gradient-picker__type-picker\"\n\t\t\tlabel={ __( 'Type' ) }\n\t\t\tlabelPosition=\"top\"\n\t\t\tonChange={ handleOnChange }\n\t\t\toptions={ GRADIENT_OPTIONS }\n\t\t\tsize=\"__unstable-large\"\n\t\t\tvalue={ hasGradient ? type : undefined }\n\t\t/>\n\t);\n};\n\n/**\n * CustomGradientPicker is a React component that renders a UI for specifying\n * linear or radial gradients. Radial gradients are displayed in the picker as\n * a slice of the gradient from the center to the outside.\n *\n * ```jsx\n * import { CustomGradientPicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyCustomGradientPicker = () => {\n * const [ gradient, setGradient ] = useState();\n *\n * return (\n * <CustomGradientPicker\n *\t\t\tvalue={ gradient }\n *\t\t\tonChange={ setGradient }\n * />\n * );\n * };\n * ```\n */\nexport function CustomGradientPicker( {\n\tvalue,\n\tonChange,\n\t__experimentalIsRenderedInSidebar = false,\n}: CustomGradientPickerProps ) {\n\tconst { gradientAST, hasGradient } = getGradientAstWithDefault( value );\n\n\t// On radial gradients the bar should display a linear gradient.\n\t// On radial gradients the bar represents a slice of the gradient from the center until the outside.\n\t// On liner gradients the bar represents the color stops from left to right independently of the angle.\n\tconst background = getLinearGradientRepresentation( gradientAST );\n\n\t// Control points color option may be hex from presets, custom colors will be rgb.\n\t// The position should always be a percentage.\n\tconst controlPoints = gradientAST.colorStops.map( ( colorStop ) => {\n\t\treturn {\n\t\t\tcolor: getStopCssColor( colorStop ),\n\t\t\t// Although it's already been checked by `hasUnsupportedLength` in `getGradientAstWithDefault`,\n\t\t\t// TypeScript doesn't know that `colorStop.length` is not undefined here.\n\t\t\t// @ts-expect-error\n\t\t\tposition: parseInt( colorStop.length.value ),\n\t\t};\n\t} );\n\n\treturn (\n\t\t<VStack spacing={ 4 } className=\"components-custom-gradient-picker\">\n\t\t\t<CustomGradientBar\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tbackground={ background }\n\t\t\t\thasGradient={ hasGradient }\n\t\t\t\tvalue={ controlPoints }\n\t\t\t\tonChange={ ( newControlPoints ) => {\n\t\t\t\t\tonChange(\n\t\t\t\t\t\tserializeGradient(\n\t\t\t\t\t\t\tgetGradientAstWithControlPoints(\n\t\t\t\t\t\t\t\tgradientAST,\n\t\t\t\t\t\t\t\tnewControlPoints\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<Flex\n\t\t\t\tgap={ 3 }\n\t\t\t\tclassName=\"components-custom-gradient-picker__ui-line\"\n\t\t\t>\n\t\t\t\t<SelectWrapper>\n\t\t\t\t\t<GradientTypePicker\n\t\t\t\t\t\tgradientAST={ gradientAST }\n\t\t\t\t\t\thasGradient={ hasGradient }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t</SelectWrapper>\n\t\t\t\t<AccessoryWrapper>\n\t\t\t\t\t{ gradientAST.type === 'linear-gradient' && (\n\t\t\t\t\t\t<GradientAnglePicker\n\t\t\t\t\t\t\tgradientAST={ gradientAST }\n\t\t\t\t\t\t\thasGradient={ hasGradient }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</AccessoryWrapper>\n\t\t\t</Flex>\n\t\t</VStack>\n\t);\n}\n\nexport default CustomGradientPicker;\n"],"mappings":";AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,yBAAyB;AACxD,OAAOC,iBAAiB,MAAM,gBAAgB;AAC9C,SAASC,IAAI,QAAQ,SAAS;AAC9B,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,SAASC,MAAM,QAAQ,YAAY;AACnC,SACCC,yBAAyB,EACzBC,+BAA+B,EAC/BC,+BAA+B,EAC/BC,eAAe,QACT,SAAS;AAChB,SAASC,iBAAiB,QAAQ,cAAc;AAChD,SACCC,6BAA6B,EAC7BC,+BAA+B,EAC/BC,gBAAgB,QACV,aAAa;AACpB,SACCC,gBAAgB,EAChBC,aAAa,QACP,wCAAwC;AAO/C,MAAMC,mBAAmB,GAAGA,CAAE;EAC7BC,WAAW;EACXC,WAAW;EACXC;AACyB,CAAC,KAAM;EAAA,IAAAC,qBAAA;EAChC,MAAMC,KAAK,IAAAD,qBAAA,GACVH,WAAW,EAAEK,WAAW,EAAEC,KAAK,cAAAH,qBAAA,cAAAA,qBAAA,GAAIT,6BAA6B;EACjE,MAAMa,aAAa,GAAKC,QAAgB,IAAM;IAC7CN,QAAQ,CACPT,iBAAiB,CAAE;MAClB,GAAGO,WAAW;MACdK,WAAW,EAAE;QACZI,IAAI,EAAE,SAAS;QACfH,KAAK,EAAG,GAAGE,QAAU;MACtB;IACD,CAAE,CACH,CAAC;EACF,CAAC;EACD,OACCE,aAAA,C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CAACS,IAAI,KAAK,iBAAiB,IACvCC,aAAA,CAACX,mBAAmB;IACnBC,WAAW,EAAGA,WAAa;IAC3BC,WAAW,EAAGA,WAAa;IAC3BC,QAAQ,EAAGA;EAAU,CACrB,CAEe,CACb,CACC,CAAC;AAEX;AAEA,eAAesB,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["PanelBody","RadioControl","RangeControl","__","useState","colorsUtils","getGradientAstWithDefault","serializeGradient","DEFAULT_LINEAR_GRADIENT_ANGLE","HORIZONTAL_GRADIENT_ORIENTATION","styles","CustomGradientPicker","setColor","currentValue","isGradientColor","gradientOrientation","setGradientOrientation","currentColor","setCurrentColor","getGradientType","gradients","gradientOptions","gradientAST","gradientType","isLinearGradient","type","linear","getGradientColor","orientation","restGradientAST","onGradientTypeChange","gradientColor","setGradientAngle","value","getGradientAngle","_gradientAST$orientat","createElement","Fragment","title","selected","options","onChange","style","angleControl","label","minimumValue","maximumValue"],"sources":["@wordpress/components/src/custom-gradient-picker/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelBody, RadioControl, RangeControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { colorsUtils } from '../mobile/color-settings/utils';\nimport { getGradientAstWithDefault } from './utils';\nimport { serializeGradient } from './serializer';\nimport {\n\tDEFAULT_LINEAR_GRADIENT_ANGLE,\n\tHORIZONTAL_GRADIENT_ORIENTATION,\n} from './constants';\nimport styles from './style.scss';\n\nfunction CustomGradientPicker( { setColor, currentValue, isGradientColor } ) {\n\tconst [ gradientOrientation, setGradientOrientation ] = useState(\n\t\tHORIZONTAL_GRADIENT_ORIENTATION\n\t);\n\n\tconst [ currentColor, setCurrentColor ] = useState( currentValue );\n\n\tconst { getGradientType, gradients, gradientOptions } = colorsUtils;\n\tconst { gradientAST } = getGradientAstWithDefault( currentColor );\n\tconst gradientType = getGradientType( currentColor );\n\n\tfunction isLinearGradient( type ) {\n\t\treturn type === gradients.linear;\n\t}\n\n\tfunction getGradientColor( type ) {\n\t\tconst { orientation, ...restGradientAST } = gradientAST;\n\n\t\tif ( orientation ) {\n\t\t\tsetGradientOrientation( orientation );\n\t\t}\n\n\t\treturn serializeGradient(\n\t\t\tisLinearGradient( type )\n\t\t\t\t? {\n\t\t\t\t\t\t...gradientAST,\n\t\t\t\t\t\t...( gradientAST.orientation\n\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\torientation: gradientOrientation,\n\t\t\t\t\t\t\t } ),\n\t\t\t\t\t\ttype,\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\t...restGradientAST,\n\t\t\t\t\t\ttype,\n\t\t\t\t }\n\t\t);\n\t}\n\n\tfunction onGradientTypeChange( type ) {\n\t\tconst gradientColor = getGradientColor( type );\n\t\tsetCurrentColor( gradientColor );\n\t\tsetColor( gradientColor );\n\t}\n\n\tfunction setGradientAngle( value ) {\n\t\tconst gradientColor = serializeGradient( {\n\t\t\t...gradientAST,\n\t\t\torientation: {\n\t\t\t\ttype: 'angular',\n\t\t\t\tvalue,\n\t\t\t},\n\t\t} );\n\n\t\tif ( isGradientColor && gradientColor !== currentColor ) {\n\t\t\tsetCurrentColor( gradientColor );\n\t\t\tsetColor( gradientColor );\n\t\t}\n\t}\n\n\tfunction getGradientAngle() {\n\t\treturn gradientAST?.orientation?.value ?? DEFAULT_LINEAR_GRADIENT_ANGLE;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<PanelBody title={ __( 'Gradient Type' ) }>\n\t\t\t\t<RadioControl\n\t\t\t\t\tselected={ gradientType }\n\t\t\t\t\toptions={ gradientOptions }\n\t\t\t\t\tonChange={ onGradientTypeChange }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t\t{ isLinearGradient( gradientType ) && (\n\t\t\t\t<PanelBody style={ styles.angleControl }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Angle' ) }\n\t\t\t\t\t\tminimumValue={ 0 }\n\t\t\t\t\t\tmaximumValue={ 360 }\n\t\t\t\t\t\tvalue={ getGradientAngle() }\n\t\t\t\t\t\tonChange={ setGradientAngle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default CustomGradientPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,YAAY,EAAEC,YAAY,QAAQ,uBAAuB;AAC7E,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,SAASC,WAAW,QAAQ,gCAAgC;AAC5D,SAASC,yBAAyB,QAAQ,SAAS;AACnD,SAASC,iBAAiB,QAAQ,cAAc;AAChD,SACCC,6BAA6B,EAC7BC,+BAA+B,QACzB,aAAa;AACpB,OAAOC,MAAM,MAAM,cAAc;AAEjC,SAASC,oBAAoBA,CAAE;EAAEC,QAAQ;EAAEC,YAAY;EAAEC;AAAgB,CAAC,EAAG;EAC5E,MAAM,CAAEC,mBAAmB,EAAEC,sBAAsB,CAAE,GAAGZ,QAAQ,CAC/DK,+BACD,CAAC;EAED,MAAM,CAAEQ,YAAY,EAAEC,eAAe,CAAE,GAAGd,QAAQ,CAAES,YAAa,CAAC;EAElE,MAAM;IAAEM,eAAe;IAAEC,SAAS;IAAEC;EAAgB,CAAC,GAAGhB,WAAW;EACnE,MAAM;IAAEiB;EAAY,CAAC,GAAGhB,yBAAyB,CAAEW,YAAa,CAAC;EACjE,MAAMM,YAAY,GAAGJ,eAAe,CAAEF,YAAa,CAAC;EAEpD,SAASO,gBAAgBA,CAAEC,IAAI,EAAG;IACjC,OAAOA,IAAI,KAAKL,SAAS,CAACM,MAAM;EACjC;EAEA,SAASC,gBAAgBA,CAAEF,IAAI,EAAG;IACjC,MAAM;MAAEG,WAAW;MAAE,GAAGC;IAAgB,CAAC,GAAGP,W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C,IACjCa,aAAA,CAACpC,SAAS;IAAC0C,KAAK,EAAGhC,MAAM,CAACiC;EAAc,GACvCP,aAAA,CAAClC,YAAY;IACZ0C,KAAK,EAAGzC,EAAE,CAAE,OAAQ,CAAG;IACvB0C,YAAY,EAAG,CAAG;IAClBC,YAAY,EAAG,GAAK;IACpBb,KAAK,EAAGC,gBAAgB,CAAC,CAAG;IAC5BO,QAAQ,EAAGT;EAAkB,CAC7B,CACS,CAEX,CAAC;AAEL;AAEA,eAAerB,oBAAoB"}
1
+ {"version":3,"names":["PanelBody","RadioControl","RangeControl","__","useState","colorsUtils","getGradientAstWithDefault","serializeGradient","DEFAULT_LINEAR_GRADIENT_ANGLE","HORIZONTAL_GRADIENT_ORIENTATION","styles","CustomGradientPicker","setColor","currentValue","isGradientColor","gradientOrientation","setGradientOrientation","currentColor","setCurrentColor","getGradientType","gradients","gradientOptions","gradientAST","gradientType","isLinearGradient","type","linear","getGradientColor","orientation","restGradientAST","onGradientTypeChange","gradientColor","setGradientAngle","value","getGradientAngle","_gradientAST$orientat","createElement","Fragment","title","selected","options","onChange","style","angleControl","label","minimumValue","maximumValue"],"sources":["@wordpress/components/src/custom-gradient-picker/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelBody, RadioControl, RangeControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { colorsUtils } from '../mobile/color-settings/utils';\nimport { getGradientAstWithDefault } from './utils';\nimport { serializeGradient } from './serializer';\nimport {\n\tDEFAULT_LINEAR_GRADIENT_ANGLE,\n\tHORIZONTAL_GRADIENT_ORIENTATION,\n} from './constants';\nimport styles from './style.scss';\n\nfunction CustomGradientPicker( { setColor, currentValue, isGradientColor } ) {\n\tconst [ gradientOrientation, setGradientOrientation ] = useState(\n\t\tHORIZONTAL_GRADIENT_ORIENTATION\n\t);\n\n\tconst [ currentColor, setCurrentColor ] = useState( currentValue );\n\n\tconst { getGradientType, gradients, gradientOptions } = colorsUtils;\n\tconst { gradientAST } = getGradientAstWithDefault( currentColor );\n\tconst gradientType = getGradientType( currentColor );\n\n\tfunction isLinearGradient( type ) {\n\t\treturn type === gradients.linear;\n\t}\n\n\tfunction getGradientColor( type ) {\n\t\tconst { orientation, ...restGradientAST } = gradientAST;\n\n\t\tif ( orientation ) {\n\t\t\tsetGradientOrientation( orientation );\n\t\t}\n\n\t\treturn serializeGradient(\n\t\t\tisLinearGradient( type )\n\t\t\t\t? {\n\t\t\t\t\t\t...gradientAST,\n\t\t\t\t\t\t...( gradientAST.orientation\n\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\torientation: gradientOrientation,\n\t\t\t\t\t\t\t } ),\n\t\t\t\t\t\ttype,\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\t...restGradientAST,\n\t\t\t\t\t\ttype,\n\t\t\t\t }\n\t\t);\n\t}\n\n\tfunction onGradientTypeChange( type ) {\n\t\tconst gradientColor = getGradientColor( type );\n\t\tsetCurrentColor( gradientColor );\n\t\tsetColor( gradientColor );\n\t}\n\n\tfunction setGradientAngle( value ) {\n\t\tconst gradientColor = serializeGradient( {\n\t\t\t...gradientAST,\n\t\t\torientation: {\n\t\t\t\ttype: 'angular',\n\t\t\t\tvalue,\n\t\t\t},\n\t\t} );\n\n\t\tif ( isGradientColor && gradientColor !== currentColor ) {\n\t\t\tsetCurrentColor( gradientColor );\n\t\t\tsetColor( gradientColor );\n\t\t}\n\t}\n\n\tfunction getGradientAngle() {\n\t\treturn gradientAST?.orientation?.value ?? DEFAULT_LINEAR_GRADIENT_ANGLE;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<PanelBody title={ __( 'Gradient Type' ) }>\n\t\t\t\t<RadioControl\n\t\t\t\t\tselected={ gradientType }\n\t\t\t\t\toptions={ gradientOptions }\n\t\t\t\t\tonChange={ onGradientTypeChange }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t\t{ isLinearGradient( gradientType ) && (\n\t\t\t\t<PanelBody style={ styles.angleControl }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Angle' ) }\n\t\t\t\t\t\tminimumValue={ 0 }\n\t\t\t\t\t\tmaximumValue={ 360 }\n\t\t\t\t\t\tvalue={ getGradientAngle() }\n\t\t\t\t\t\tonChange={ setGradientAngle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default CustomGradientPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,YAAY,EAAEC,YAAY,QAAQ,uBAAuB;AAC7E,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,SAASC,WAAW,QAAQ,gCAAgC;AAC5D,SAASC,yBAAyB,QAAQ,SAAS;AACnD,SAASC,iBAAiB,QAAQ,cAAc;AAChD,SACCC,6BAA6B,EAC7BC,+BAA+B,QACzB,aAAa;AACpB,OAAOC,MAAM,MAAM,cAAc;AAEjC,SAASC,oBAAoBA,CAAE;EAAEC,QAAQ;EAAEC,YAAY;EAAEC;AAAgB,CAAC,EAAG;EAC5E,MAAM,CAAEC,mBAAmB,EAAEC,sBAAsB,CAAE,GAAGZ,QAAQ,CAC/DK,+BACD,CAAC;EAED,MAAM,CAAEQ,YAAY,EAAEC,eAAe,CAAE,GAAGd,QAAQ,CAAES,YAAa,CAAC;EAElE,MAAM;IAAEM,eAAe;IAAEC,SAAS;IAAEC;EAAgB,CAAC,GAAGhB,WAAW;EACnE,MAAM;IAAEiB;EAAY,CAAC,GAAGhB,yBAAyB,CAAEW,YAAa,CAAC;EACjE,MAAMM,YAAY,GAAGJ,eAAe,CAAEF,YAAa,CAAC;EAEpD,SAASO,gBAAgBA,CAAEC,IAAI,EAAG;IACjC,OAAOA,IAAI,KAAKL,SAAS,CAACM,MAAM;EAC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BiB,OAAO,EAAGnB,eAAiB;IAC3BoB,QAAQ,EAAGX;EAAsB,CACjC,CACS,CAAC,EACVN,gBAAgB,CAAED,YAAa,CAAC,IACjCa,aAAA,CAACpC,SAAS;IAAC0C,KAAK,EAAGhC,MAAM,CAACiC;EAAc,GACvCP,aAAA,CAAClC,YAAY;IACZ0C,KAAK,EAAGzC,EAAE,CAAE,OAAQ,CAAG;IACvB0C,YAAY,EAAG,CAAG;IAClBC,YAAY,EAAG,GAAK;IACpBb,KAAK,EAAGC,gBAAgB,CAAC,CAAG;IAC5BO,QAAQ,EAAGT;EAAkB,CAC7B,CACS,CAEX,CAAC;AAEL;AAEA,eAAerB,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["serializeGradientColor","type","value","join","serializeGradientPosition","position","serializeGradientColorStop","length","serializeGradientOrientation","orientation","Array","isArray","serializeGradient","colorStops","serializedOrientation","serializedColorStops","sort","colorStop1","colorStop2","getNumericStopValue","colorStop","undefined","parseInt","map","filter","Boolean"],"sources":["@wordpress/components/src/custom-gradient-picker/serializer.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type gradientParser from 'gradient-parser';\n\nexport function serializeGradientColor( {\n\ttype,\n\tvalue,\n}: gradientParser.ColorStop ) {\n\tif ( type === 'literal' ) {\n\t\treturn value;\n\t}\n\tif ( type === 'hex' ) {\n\t\treturn `#${ value }`;\n\t}\n\treturn `${ type }(${ value.join( ',' ) })`;\n}\n\nexport function serializeGradientPosition(\n\tposition: gradientParser.ColorStop[ 'length' ]\n) {\n\tif ( ! position ) {\n\t\treturn '';\n\t}\n\tconst { value, type } = position;\n\treturn `${ value }${ type }`;\n}\n\nexport function serializeGradientColorStop( {\n\ttype,\n\tvalue,\n\tlength,\n}: gradientParser.ColorStop ) {\n\treturn `${ serializeGradientColor( {\n\t\ttype,\n\t\tvalue,\n\t} as gradientParser.ColorStop ) } ${ serializeGradientPosition( length ) }`;\n}\n\nexport function serializeGradientOrientation(\n\torientation: gradientParser.GradientNode[ 'orientation' ]\n) {\n\tif (\n\t\tArray.isArray( orientation ) ||\n\t\t! orientation ||\n\t\torientation.type !== 'angular'\n\t) {\n\t\treturn;\n\t}\n\treturn `${ orientation.value }deg`;\n}\n\nexport function serializeGradient( {\n\ttype,\n\torientation,\n\tcolorStops,\n}: gradientParser.GradientNode ) {\n\tconst serializedOrientation = serializeGradientOrientation( orientation );\n\tconst serializedColorStops = colorStops\n\t\t.sort( ( colorStop1, colorStop2 ) => {\n\t\t\tconst getNumericStopValue = (\n\t\t\t\tcolorStop: gradientParser.ColorStop\n\t\t\t) => {\n\t\t\t\treturn colorStop?.length?.value === undefined\n\t\t\t\t\t? 0\n\t\t\t\t\t: parseInt( colorStop.length.value );\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\tgetNumericStopValue( colorStop1 ) -\n\t\t\t\tgetNumericStopValue( colorStop2 )\n\t\t\t);\n\t\t} )\n\t\t.map( serializeGradientColorStop );\n\treturn `${ type }(${ [ serializedOrientation, ...serializedColorStops ]\n\t\t.filter( Boolean )\n\t\t.join( ',' ) })`;\n}\n"],"mappings":"AAAA;AACA;AACA;;AAGA,OAAO,SAASA,sBAAsBA,CAAE;EACvCC,IAAI;EACJC;AACyB,CAAC,EAAG;EAC7B,IAAKD,IAAI,KAAK,SAAS,EAAG;IACzB,OAAOC,KAAK;EACb;EACA,IAAKD,IAAI,KAAK,KAAK,EAAG;IACrB,OAAQ,IAAIC,KAAO,EAAC;EACrB;EACA,OAAQ,GAAGD,IAAM,IAAIC,KAAK,CAACC,IAAI,CAAE,GAAI,CAAG,GAAE;AAC3C;AAEA,OAAO,SAASC,yBAAyBA,CACxCC,QAA8C,EAC7C;EACD,IAAK,CAAEA,QAAQ,EAAG;IACjB,OAAO,EAAE;EACV;EACA,MAAM;IAAEH,KAAK;IAAED;EAAK,CAAC,GAAGI,QAAQ;EAChC,OAAQ,GAAGH,KAAO,GAAGD,IAAM,EAAC;AAC7B;AAEA,OAAO,SAASK,0BAA0BA,CAAE;EAC3CL,IAAI;EACJC,KAAK;EACLK;AACyB,CAAC,EAAG;EAC7B,OAAQ,GAAGP,sBAAsB,CAAE;IAClCC,IAAI;IACJC;EACD,CAA8B,CAAG,IAAIE,yBAAyB,CAAEG,MAAO,CAAG,EAAC;AAC5E;AAEA,OAAO,SAASC,4BAA4BA,CAC3CC,WAAyD,EACxD;EACD,IACCC,KAAK,CAACC,OAAO,CAAEF,WAAY,CAAC,IAC5B,CAAEA,WAAW,IACbA,WAAW,CAACR,IAAI,KAAK,SAAS,EAC7B;IACD;EACD;EACA,OAAQ,GAAGQ,WAAW,CAACP,KAAO,KAAI;AACnC;AAEA,OAAO,SAASU,iBAAiBA,CAAE;EAClCX,IAAI;EACJQ,WAAW;EACXI;AAC4B,CAAC,EAAG;EAChC,MAAMC,qBAAqB,GAAGN,4BAA4B,CAAEC,WAAY,CAAC;EACzE,MAAMM,oBAAoB,GAAGF,UAAU,CACrCG,IAAI,CAAE,CAAEC,UAAU,EAAEC,UAAU,KAAM;IACpC,MAAMC,mBAAmB,GACxBC,SAAmC,IAC/B;MACJ,OAAOA,SAAS,EAAEb,MAAM,EAAEL,KAAK,KAAKmB,SAAS,GAC1C,CAAC,GACDC,QAAQ,CAAEF,SAAS,CAACb,MAAM,CAACL,KAAM,CAAC;IACtC,CAAC;IAED,OACCiB,mBAAmB,CAAEF,UAAW,CAAC,GACjCE,mBAAmB,CAAED,UAAW,CAAC;EAEnC,CAAE,CAAC,CACFK,GAAG,CAAEjB,0BAA2B,CAAC;EACnC,OAAQ,GAAGL,IAAM,IAAI,CAAEa,qBAAqB,EAAE,GAAGC,oBAAoB,CAAE,CACrES,MAAM,CAAEC,OAAQ,CAAC,CACjBtB,IAAI,CAAE,GAAI,CAAG,GAAE;AAClB"}
1
+ {"version":3,"names":["serializeGradientColor","type","value","join","serializeGradientPosition","position","serializeGradientColorStop","length","serializeGradientOrientation","orientation","Array","isArray","serializeGradient","colorStops","serializedOrientation","serializedColorStops","sort","colorStop1","colorStop2","getNumericStopValue","colorStop","undefined","parseInt","map","filter","Boolean"],"sources":["@wordpress/components/src/custom-gradient-picker/serializer.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type gradientParser from 'gradient-parser';\n\nexport function serializeGradientColor( {\n\ttype,\n\tvalue,\n}: gradientParser.ColorStop ) {\n\tif ( type === 'literal' ) {\n\t\treturn value;\n\t}\n\tif ( type === 'hex' ) {\n\t\treturn `#${ value }`;\n\t}\n\treturn `${ type }(${ value.join( ',' ) })`;\n}\n\nexport function serializeGradientPosition(\n\tposition: gradientParser.ColorStop[ 'length' ]\n) {\n\tif ( ! position ) {\n\t\treturn '';\n\t}\n\tconst { value, type } = position;\n\treturn `${ value }${ type }`;\n}\n\nexport function serializeGradientColorStop( {\n\ttype,\n\tvalue,\n\tlength,\n}: gradientParser.ColorStop ) {\n\treturn `${ serializeGradientColor( {\n\t\ttype,\n\t\tvalue,\n\t} as gradientParser.ColorStop ) } ${ serializeGradientPosition( length ) }`;\n}\n\nexport function serializeGradientOrientation(\n\torientation: gradientParser.GradientNode[ 'orientation' ]\n) {\n\tif (\n\t\tArray.isArray( orientation ) ||\n\t\t! orientation ||\n\t\torientation.type !== 'angular'\n\t) {\n\t\treturn;\n\t}\n\treturn `${ orientation.value }deg`;\n}\n\nexport function serializeGradient( {\n\ttype,\n\torientation,\n\tcolorStops,\n}: gradientParser.GradientNode ) {\n\tconst serializedOrientation = serializeGradientOrientation( orientation );\n\tconst serializedColorStops = colorStops\n\t\t.sort( ( colorStop1, colorStop2 ) => {\n\t\t\tconst getNumericStopValue = (\n\t\t\t\tcolorStop: gradientParser.ColorStop\n\t\t\t) => {\n\t\t\t\treturn colorStop?.length?.value === undefined\n\t\t\t\t\t? 0\n\t\t\t\t\t: parseInt( colorStop.length.value );\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\tgetNumericStopValue( colorStop1 ) -\n\t\t\t\tgetNumericStopValue( colorStop2 )\n\t\t\t);\n\t\t} )\n\t\t.map( serializeGradientColorStop );\n\treturn `${ type }(${ [ serializedOrientation, ...serializedColorStops ]\n\t\t.filter( Boolean )\n\t\t.join( ',' ) })`;\n}\n"],"mappings":"AAAA;AACA;AACA;;AAGA,OAAO,SAASA,sBAAsBA,CAAE;EACvCC,IAAI;EACJC;AACyB,CAAC,EAAG;EAC7B,IAAKD,IAAI,KAAK,SAAS,EAAG;IACzB,OAAOC,KAAK;EACb;EACA,IAAKD,IAAI,KAAK,KAAK,EAAG;IACrB,OAAQ,IAAIC,KAAO,EAAC;EACrB;EACA,OAAQ,GAAGD,IAAM,IAAIC,KAAK,CAACC,IAAI,CAAE,GAAI,CAAG,GAAE;AAC3C;AAEA,OAAO,SAASC,yBAAyBA,CACxCC,QAA8C,EAC7C;EACD,IAAK,CAAEA,QAAQ,EAAG;IACjB,OAAO,EAAE;EACV;EACA,MAAM;IAAEH,KAAK;IAAED;EAAK,CAAC,GAAGI,QAAQ;EAChC,OAAQ,GAAGH,KAAO,GAAGD,IAAM,EAAC;AAC7B;AAEA,OAAO,SAASK,0BAA0BA,CAAE;EAC3CL,IAAI;EACJC,KAAK;EACLK;AACyB,CAAC,EAAG;EAC7B,OAAQ,GAAGP,sBAAsB,CAAE;IAClCC,IAAI;IACJC;EACD,CAA8B,CAAG,IAAIE,yBAAyB,CAAEG,MAAO,CAAG,EAAC;AAC5E;AAEA,OAAO,SAASC,4BAA4BA,CAC3CC,WAAyD,EACxD;EACD,IACCC,KAAK,CAACC,OAAO,CAAEF,WAAY,CAAC,IAC5B,CAAEA,WAAW,IACbA,WAAW,CAACR,IAAI,KAAK,SAAS,EAC7B;IACD;EACD;EACA,OAAQ,GAAGQ,WAAW,CAACP,KAAO,KAAI;AACnC;AAEA,OAAO,SAASU,iBAAiBA,CAAE;EAClCX,IAAI;EACJQ,WAAW;EACXI;AAC4B,CAAC,EAAG;EAChC,MAAMC,qBAAqB,GAAGN,4BAA4B,CAAEC,WAAY,CAAC;EACzE,MAAMM,oBAAoB,GAAGF,UAAU,CACrCG,IAAI,CAAE,CAAEC,UAAU,EAAEC,UAAU,KAAM;IACpC,MAAMC,mBAAmB,GACxBC,SAAmC,IAC/B;MACJ,OAAOA,SAAS,EAAEb,MAAM,EAAEL,KAAK,KAAKmB,SAAS,GAC1C,CAAC,GACDC,QAAQ,CAAEF,SAAS,CAACb,MAAM,CAACL,KAAM,CAAC;IACtC,CAAC;IAED,OACCiB,mBAAmB,CAAEF,UAAW,CAAC,GACjCE,mBAAmB,CAAED,UAAW,CAAC;EAEnC,CAAE,CAAC,CACFK,GAAG,CAAEjB,0BAA2B,CAAC;EACnC,OAAQ,GAAGL,IAAM,IAAI,CAAEa,qBAAqB,EAAE,GAAGC,oBAAoB,CAAE,CACrES,MAAM,CAAEC,OAAQ,CAAC,CACjBtB,IAAI,CAAE,GAAI,CAAG,GAAE;AAClB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["FlexBlock","SelectWrapper","_styled","process","env","NODE_ENV","target","label","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","AccessoryWrapper"],"sources":["@wordpress/components/src/custom-gradient-picker/styles/custom-gradient-picker-styles.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../../flex';\n\nexport const SelectWrapper = styled( FlexBlock )`\n\tflex-grow: 5;\n`;\n\nexport const AccessoryWrapper = styled( FlexBlock )`\n\tflex-grow: 5;\n`;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,YAAY;AAEtC,OAAO,MAAMC,aAAa,GAAG,aAAAC,OAAA,CAAQF,SAAS,EAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAE/C;AAED,OAAO,MAAMC,gBAAgB,GAAG,aAAAX,OAAA,CAAQF,SAAS,EAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAElD"}
1
+ {"version":3,"names":["FlexBlock","SelectWrapper","_styled","process","env","NODE_ENV","target","label","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","AccessoryWrapper"],"sources":["@wordpress/components/src/custom-gradient-picker/styles/custom-gradient-picker-styles.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../../flex';\n\nexport const SelectWrapper = styled( FlexBlock )`\n\tflex-grow: 5;\n`;\n\nexport const AccessoryWrapper = styled( FlexBlock )`\n\tflex-grow: 5;\n`;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,YAAY;AAEtC,OAAO,MAAMC,aAAa,gBAAGC,OAAA,CAAQF,SAAS,EAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAE/C;AAED,OAAO,MAAMC,gBAAgB,gBAAGX,OAAA,CAAQF,SAAS,EAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAElD","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/custom-gradient-picker/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type gradientParser from 'gradient-parser';\n\nexport type CustomGradientPickerProps = {\n\t/**\n\t * Start opting in to the new margin-free styles that will become the default\n\t * in a future version, currently scheduled to be WordPress 6.4. (The prop\n\t * can be safely removed once this happens.)\n\t *\n\t * @default false\n\t * @deprecated Default behavior since WP 6.5. Prop can be safely removed.\n\t * @ignore\n\t */\n\t__nextHasNoMargin?: boolean;\n\t/**\n\t * The current value of the gradient. Pass a css gradient string (See default value for example).\n\t * Optionally pass in a `null` value to specify no gradient is currently selected.\n\t *\n\t * @default 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)'\n\t */\n\tvalue?: string | null;\n\t/**\n\t * The function called when a new gradient has been defined. It is passed to\n\t * the `currentGradient` as an argument.\n\t */\n\tonChange: ( currentGradient: string ) => void;\n\t/**\n\t * Whether this is rendered in the sidebar.\n\t *\n\t * @default false\n\t */\n\t__experimentalIsRenderedInSidebar?: boolean;\n};\n\nexport type GradientAnglePickerProps = {\n\tgradientAST:\n\t\t| gradientParser.LinearGradientNode\n\t\t| gradientParser.RepeatingLinearGradientNode;\n\thasGradient: boolean;\n\tonChange: ( gradient: string ) => void;\n};\n\nexport type GradientTypePickerProps = {\n\tgradientAST: gradientParser.GradientNode;\n\thasGradient: boolean;\n\tonChange: ( gradient: string ) => void;\n};\n\nexport type ControlPoint = { color: string; position: number };\n\nexport type CustomGradientBarProps = {\n\tbackground: React.CSSProperties[ 'background' ];\n\thasGradient: boolean;\n\tvalue: ControlPoint[];\n\tonChange: ( newControlPoints: ControlPoint[] ) => void;\n\tdisableInserter?: boolean;\n\tdisableAlpha?: boolean;\n\t__experimentalIsRenderedInSidebar?: boolean;\n};\n\nexport type CustomGradientBarIdleState = { id: 'IDLE' };\ntype CustomGradientBarMovingInserterState = {\n\tid: 'MOVING_INSERTER';\n\tinsertPosition: number;\n};\ntype CustomGradientBarInsertingControlPointState = {\n\tid: 'INSERTING_CONTROL_POINT';\n\tinsertPosition: number;\n};\ntype CustomGradientBarMovingControlPointState = { id: 'MOVING_CONTROL_POINT' };\n\nexport type CustomGradientBarReducerState =\n\t| CustomGradientBarIdleState\n\t| CustomGradientBarMovingInserterState\n\t| CustomGradientBarInsertingControlPointState\n\t| CustomGradientBarMovingControlPointState;\n\nexport type CustomGradientBarReducerAction =\n\t| { type: 'MOVE_INSERTER'; insertPosition: number }\n\t| { type: 'STOP_INSERTER_MOVE' }\n\t| { type: 'OPEN_INSERTER' }\n\t| { type: 'CLOSE_INSERTER' }\n\t| { type: 'START_CONTROL_CHANGE' }\n\t| { type: 'STOP_CONTROL_CHANGE' };\n\nexport type ControlPointButtonProps = {\n\tisOpen: boolean;\n\tposition: ControlPoint[ 'position' ];\n\tcolor: string;\n};\n\nexport type ControlPointsProps = {\n\tdisableRemove: boolean;\n\tdisableAlpha: boolean;\n\tgradientPickerDomRef: React.RefObject< HTMLDivElement >;\n\tignoreMarkerPosition?: number;\n\tvalue: ControlPoint[];\n\tonChange: ( controlPoints: ControlPoint[] ) => void;\n\tonStartControlPointChange: () => void;\n\tonStopControlPointChange: () => void;\n\t__experimentalIsRenderedInSidebar: boolean;\n};\n\nexport type ControlPointMoveState = {\n\tinitialPosition: number;\n\tindex: number;\n\tsignificantMoveHappened: boolean;\n\tlistenersActivated: boolean;\n};\n\nexport type InsertPointProps = {\n\tvalue: ControlPoint[];\n\tonChange: ( controlPoints: ControlPoint[] ) => void;\n\tonOpenInserter: () => void;\n\tonCloseInserter: () => void;\n\tinsertPosition: number;\n\tdisableAlpha: boolean;\n\t__experimentalIsRenderedInSidebar: boolean;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/custom-gradient-picker/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type gradientParser from 'gradient-parser';\n\nexport type CustomGradientPickerProps = {\n\t/**\n\t * Start opting in to the new margin-free styles that will become the default\n\t * in a future version, currently scheduled to be WordPress 6.4. (The prop\n\t * can be safely removed once this happens.)\n\t *\n\t * @default false\n\t * @deprecated Default behavior since WP 6.5. Prop can be safely removed.\n\t * @ignore\n\t */\n\t__nextHasNoMargin?: boolean;\n\t/**\n\t * The current value of the gradient. Pass a css gradient string (See default value for example).\n\t * Optionally pass in a `null` value to specify no gradient is currently selected.\n\t *\n\t * @default 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)'\n\t */\n\tvalue?: string | null;\n\t/**\n\t * The function called when a new gradient has been defined. It is passed to\n\t * the `currentGradient` as an argument.\n\t */\n\tonChange: ( currentGradient: string ) => void;\n\t/**\n\t * Whether this is rendered in the sidebar.\n\t *\n\t * @default false\n\t */\n\t__experimentalIsRenderedInSidebar?: boolean;\n};\n\nexport type GradientAnglePickerProps = {\n\tgradientAST:\n\t\t| gradientParser.LinearGradientNode\n\t\t| gradientParser.RepeatingLinearGradientNode;\n\thasGradient: boolean;\n\tonChange: ( gradient: string ) => void;\n};\n\nexport type GradientTypePickerProps = {\n\tgradientAST: gradientParser.GradientNode;\n\thasGradient: boolean;\n\tonChange: ( gradient: string ) => void;\n};\n\nexport type ControlPoint = { color: string; position: number };\n\nexport type CustomGradientBarProps = {\n\tbackground: React.CSSProperties[ 'background' ];\n\thasGradient: boolean;\n\tvalue: ControlPoint[];\n\tonChange: ( newControlPoints: ControlPoint[] ) => void;\n\tdisableInserter?: boolean;\n\tdisableAlpha?: boolean;\n\t__experimentalIsRenderedInSidebar?: boolean;\n};\n\nexport type CustomGradientBarIdleState = { id: 'IDLE' };\ntype CustomGradientBarMovingInserterState = {\n\tid: 'MOVING_INSERTER';\n\tinsertPosition: number;\n};\ntype CustomGradientBarInsertingControlPointState = {\n\tid: 'INSERTING_CONTROL_POINT';\n\tinsertPosition: number;\n};\ntype CustomGradientBarMovingControlPointState = { id: 'MOVING_CONTROL_POINT' };\n\nexport type CustomGradientBarReducerState =\n\t| CustomGradientBarIdleState\n\t| CustomGradientBarMovingInserterState\n\t| CustomGradientBarInsertingControlPointState\n\t| CustomGradientBarMovingControlPointState;\n\nexport type CustomGradientBarReducerAction =\n\t| { type: 'MOVE_INSERTER'; insertPosition: number }\n\t| { type: 'STOP_INSERTER_MOVE' }\n\t| { type: 'OPEN_INSERTER' }\n\t| { type: 'CLOSE_INSERTER' }\n\t| { type: 'START_CONTROL_CHANGE' }\n\t| { type: 'STOP_CONTROL_CHANGE' };\n\nexport type ControlPointButtonProps = {\n\tisOpen: boolean;\n\tposition: ControlPoint[ 'position' ];\n\tcolor: string;\n};\n\nexport type ControlPointsProps = {\n\tdisableRemove: boolean;\n\tdisableAlpha: boolean;\n\tgradientPickerDomRef: React.RefObject< HTMLDivElement >;\n\tignoreMarkerPosition?: number;\n\tvalue: ControlPoint[];\n\tonChange: ( controlPoints: ControlPoint[] ) => void;\n\tonStartControlPointChange: () => void;\n\tonStopControlPointChange: () => void;\n\t__experimentalIsRenderedInSidebar: boolean;\n};\n\nexport type ControlPointMoveState = {\n\tinitialPosition: number;\n\tindex: number;\n\tsignificantMoveHappened: boolean;\n\tlistenersActivated: boolean;\n};\n\nexport type InsertPointProps = {\n\tvalue: ControlPoint[];\n\tonChange: ( controlPoints: ControlPoint[] ) => void;\n\tonOpenInserter: () => void;\n\tonCloseInserter: () => void;\n\tinsertPosition: number;\n\tdisableAlpha: boolean;\n\t__experimentalIsRenderedInSidebar: boolean;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["gradientParser","colord","extend","namesPlugin","DEFAULT_GRADIENT","HORIZONTAL_GRADIENT_ORIENTATION","DIRECTIONAL_ORIENTATION_ANGLE_MAP","serializeGradient","getLinearGradientRepresentation","gradientAST","type","orientation","colorStops","hasUnsupportedLength","item","length","undefined","getGradientAstWithDefault","value","hasGradient","valueToParse","parse","error","console","warn","Array","isArray","toString","some","step","forEach","stop","index","getGradientAstWithControlPoints","newControlPoints","map","position","color","r","g","b","a","toRgb","getStopCssColor","colorStop","join"],"sources":["@wordpress/components/src/custom-gradient-picker/utils.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport gradientParser from 'gradient-parser';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * Internal dependencies\n */\nimport {\n\tDEFAULT_GRADIENT,\n\tHORIZONTAL_GRADIENT_ORIENTATION,\n\tDIRECTIONAL_ORIENTATION_ANGLE_MAP,\n} from './constants';\nimport { serializeGradient } from './serializer';\nimport type { ControlPoint } from './types';\n\nextend( [ namesPlugin ] );\n\nexport function getLinearGradientRepresentation(\n\tgradientAST: gradientParser.GradientNode\n) {\n\treturn serializeGradient( {\n\t\ttype: 'linear-gradient',\n\t\torientation: HORIZONTAL_GRADIENT_ORIENTATION,\n\t\tcolorStops: gradientAST.colorStops,\n\t} );\n}\n\nfunction hasUnsupportedLength( item: gradientParser.ColorStop ) {\n\treturn item.length === undefined || item.length.type !== '%';\n}\n\nexport function getGradientAstWithDefault( value?: string | null ) {\n\t// gradientAST will contain the gradient AST as parsed by gradient-parser npm module.\n\t// More information of its structure available at https://www.npmjs.com/package/gradient-parser#ast.\n\tlet gradientAST: gradientParser.GradientNode | undefined;\n\tlet hasGradient = !! value;\n\n\tconst valueToParse = value ?? DEFAULT_GRADIENT;\n\n\ttry {\n\t\tgradientAST = gradientParser.parse( valueToParse )[ 0 ];\n\t} catch ( error ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t'wp.components.CustomGradientPicker failed to parse the gradient with error',\n\t\t\terror\n\t\t);\n\n\t\tgradientAST = gradientParser.parse( DEFAULT_GRADIENT )[ 0 ];\n\t\thasGradient = false;\n\t}\n\n\tif (\n\t\t! Array.isArray( gradientAST.orientation ) &&\n\t\tgradientAST.orientation?.type === 'directional'\n\t) {\n\t\tgradientAST.orientation = {\n\t\t\ttype: 'angular',\n\t\t\tvalue: DIRECTIONAL_ORIENTATION_ANGLE_MAP[\n\t\t\t\tgradientAST.orientation.value\n\t\t\t].toString(),\n\t\t};\n\t}\n\n\tif ( gradientAST.colorStops.some( hasUnsupportedLength ) ) {\n\t\tconst { colorStops } = gradientAST;\n\t\tconst step = 100 / ( colorStops.length - 1 );\n\t\tcolorStops.forEach( ( stop, index ) => {\n\t\t\tstop.length = {\n\t\t\t\tvalue: `${ step * index }`,\n\t\t\t\ttype: '%',\n\t\t\t};\n\t\t} );\n\t}\n\n\treturn { gradientAST, hasGradient };\n}\n\nexport function getGradientAstWithControlPoints(\n\tgradientAST: gradientParser.GradientNode,\n\tnewControlPoints: ControlPoint[]\n) {\n\treturn {\n\t\t...gradientAST,\n\t\tcolorStops: newControlPoints.map( ( { position, color } ) => {\n\t\t\tconst { r, g, b, a } = colord( color ).toRgb();\n\t\t\treturn {\n\t\t\t\tlength: {\n\t\t\t\t\ttype: '%',\n\t\t\t\t\tvalue: position?.toString(),\n\t\t\t\t},\n\t\t\t\ttype: a < 1 ? 'rgba' : 'rgb',\n\t\t\t\tvalue:\n\t\t\t\t\ta < 1\n\t\t\t\t\t\t? [ `${ r }`, `${ g }`, `${ b }`, `${ a }` ]\n\t\t\t\t\t\t: [ `${ r }`, `${ g }`, `${ b }` ],\n\t\t\t};\n\t\t} ),\n\t} as gradientParser.GradientNode;\n}\n\nexport function getStopCssColor( colorStop: gradientParser.ColorStop ) {\n\tswitch ( colorStop.type ) {\n\t\tcase 'hex':\n\t\t\treturn `#${ colorStop.value }`;\n\t\tcase 'literal':\n\t\t\treturn colorStop.value;\n\t\tcase 'rgb':\n\t\tcase 'rgba':\n\t\t\treturn `${ colorStop.type }(${ colorStop.value.join( ',' ) })`;\n\t\tdefault:\n\t\t\t// Should be unreachable if passing an AST from gradient-parser.\n\t\t\t// See https://github.com/rafaelcaricio/gradient-parser#ast.\n\t\t\treturn 'transparent';\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,cAAc,MAAM,iBAAiB;AAC5C,SAASC,MAAM,EAAEC,MAAM,QAAQ,QAAQ;AACvC,OAAOC,WAAW,MAAM,sBAAsB;;AAE9C;AACA;AACA;AACA,SACCC,gBAAgB,EAChBC,+BAA+B,EAC/BC,iCAAiC,QAC3B,aAAa;AACpB,SAASC,iBAAiB,QAAQ,cAAc;AAGhDL,MAAM,CAAE,CAAEC,WAAW,CAAG,CAAC;AAEzB,OAAO,SAASK,+BAA+BA,CAC9CC,WAAwC,EACvC;EACD,OAAOF,iBAAiB,CAAE;IACzBG,IAAI,EAAE,iBAAiB;IACvBC,WAAW,EAAEN,+BAA+B;IAC5CO,UAAU,EAAEH,WAAW,CAACG;EACzB,CAAE,CAAC;AACJ;AAEA,SAASC,oBAAoBA,CAAEC,IAA8B,EAAG;EAC/D,OAAOA,IAAI,CAACC,MAAM,KAAKC,SAAS,IAAIF,IAAI,CAACC,MAAM,CAACL,IAAI,KAAK,GAAG;AAC7D;AAEA,OAAO,SAASO,yBAAyBA,CAAEC,KAAqB,EAAG;EAClE;EACA;EACA,IAAIT,WAAoD;EACxD,IAAIU,WAAW,GAAG,CAAC,CAAED,KAAK;EAE1B,MAAME,YAAY,GAAGF,KAAK,aAALA,KAAK,cAALA,KAAK,GAAId,gBAAgB;EAE9C,IAAI;IACHK,WAAW,GAAGT,cAAc,CAACqB,KAAK,CAAED,YAAa,CAAC,CAAE,CAAC,CAAE;EACxD,CAAC,CAAC,OAAQE,KAAK,EAAG;IACjB;IACAC,OAAO,CAACC,IAAI,CACX,4EAA4E,EAC5EF,KACD,CAAC;IAEDb,WAAW,GAAGT,cAAc,CAACqB,KAAK,CAAEjB,gBAAiB,CAAC,CAAE,CAAC,CAAE;IAC3De,WAAW,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,CAAC,GAAG,MAAM,GAAG,KAAK;QAC5BvB,KAAK,EACJuB,CAAC,GAAG,CAAC,GACF,CAAG,GAAGH,CAAG,EAAC,EAAG,GAAGC,CAAG,EAAC,EAAG,GAAGC,CAAG,EAAC,EAAG,GAAGC,CAAG,EAAC,CAAE,GAC1C,CAAG,GAAGH,CAAG,EAAC,EAAG,GAAGC,CAAG,EAAC,EAAG,GAAGC,CAAG,EAAC;MACnC,CAAC;IACF,CAAE;EACH,CAAC;AACF;AAEA,OAAO,SAASG,eAAeA,CAAEC,SAAmC,EAAG;EACtE,QAASA,SAAS,CAAClC,IAAI;IACtB,KAAK,KAAK;MACT,OAAQ,IAAIkC,SAAS,CAAC1B,KAAO,EAAC;IAC/B,KAAK,SAAS;MACb,OAAO0B,SAAS,CAAC1B,KAAK;IACvB,KAAK,KAAK;IACV,KAAK,MAAM;MACV,OAAQ,GAAG0B,SAAS,CAAClC,IAAM,IAAIkC,SAAS,CAAC1B,KAAK,CAAC2B,IAAI,CAAE,GAAI,CAAG,GAAE;IAC/D;MACC;MACA;MACA,OAAO,aAAa;EACtB;AACD"}
1
+ {"version":3,"names":["gradientParser","colord","extend","namesPlugin","DEFAULT_GRADIENT","HORIZONTAL_GRADIENT_ORIENTATION","DIRECTIONAL_ORIENTATION_ANGLE_MAP","serializeGradient","getLinearGradientRepresentation","gradientAST","type","orientation","colorStops","hasUnsupportedLength","item","length","undefined","getGradientAstWithDefault","value","hasGradient","valueToParse","parse","error","console","warn","Array","isArray","toString","some","step","forEach","stop","index","getGradientAstWithControlPoints","newControlPoints","map","position","color","r","g","b","a","toRgb","getStopCssColor","colorStop","join"],"sources":["@wordpress/components/src/custom-gradient-picker/utils.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport gradientParser from 'gradient-parser';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * Internal dependencies\n */\nimport {\n\tDEFAULT_GRADIENT,\n\tHORIZONTAL_GRADIENT_ORIENTATION,\n\tDIRECTIONAL_ORIENTATION_ANGLE_MAP,\n} from './constants';\nimport { serializeGradient } from './serializer';\nimport type { ControlPoint } from './types';\n\nextend( [ namesPlugin ] );\n\nexport function getLinearGradientRepresentation(\n\tgradientAST: gradientParser.GradientNode\n) {\n\treturn serializeGradient( {\n\t\ttype: 'linear-gradient',\n\t\torientation: HORIZONTAL_GRADIENT_ORIENTATION,\n\t\tcolorStops: gradientAST.colorStops,\n\t} );\n}\n\nfunction hasUnsupportedLength( item: gradientParser.ColorStop ) {\n\treturn item.length === undefined || item.length.type !== '%';\n}\n\nexport function getGradientAstWithDefault( value?: string | null ) {\n\t// gradientAST will contain the gradient AST as parsed by gradient-parser npm module.\n\t// More information of its structure available at https://www.npmjs.com/package/gradient-parser#ast.\n\tlet gradientAST: gradientParser.GradientNode | undefined;\n\tlet hasGradient = !! value;\n\n\tconst valueToParse = value ?? DEFAULT_GRADIENT;\n\n\ttry {\n\t\tgradientAST = gradientParser.parse( valueToParse )[ 0 ];\n\t} catch ( error ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t'wp.components.CustomGradientPicker failed to parse the gradient with error',\n\t\t\terror\n\t\t);\n\n\t\tgradientAST = gradientParser.parse( DEFAULT_GRADIENT )[ 0 ];\n\t\thasGradient = false;\n\t}\n\n\tif (\n\t\t! Array.isArray( gradientAST.orientation ) &&\n\t\tgradientAST.orientation?.type === 'directional'\n\t) {\n\t\tgradientAST.orientation = {\n\t\t\ttype: 'angular',\n\t\t\tvalue: DIRECTIONAL_ORIENTATION_ANGLE_MAP[\n\t\t\t\tgradientAST.orientation.value\n\t\t\t].toString(),\n\t\t};\n\t}\n\n\tif ( gradientAST.colorStops.some( hasUnsupportedLength ) ) {\n\t\tconst { colorStops } = gradientAST;\n\t\tconst step = 100 / ( colorStops.length - 1 );\n\t\tcolorStops.forEach( ( stop, index ) => {\n\t\t\tstop.length = {\n\t\t\t\tvalue: `${ step * index }`,\n\t\t\t\ttype: '%',\n\t\t\t};\n\t\t} );\n\t}\n\n\treturn { gradientAST, hasGradient };\n}\n\nexport function getGradientAstWithControlPoints(\n\tgradientAST: gradientParser.GradientNode,\n\tnewControlPoints: ControlPoint[]\n) {\n\treturn {\n\t\t...gradientAST,\n\t\tcolorStops: newControlPoints.map( ( { position, color } ) => {\n\t\t\tconst { r, g, b, a } = colord( color ).toRgb();\n\t\t\treturn {\n\t\t\t\tlength: {\n\t\t\t\t\ttype: '%',\n\t\t\t\t\tvalue: position?.toString(),\n\t\t\t\t},\n\t\t\t\ttype: a < 1 ? 'rgba' : 'rgb',\n\t\t\t\tvalue:\n\t\t\t\t\ta < 1\n\t\t\t\t\t\t? [ `${ r }`, `${ g }`, `${ b }`, `${ a }` ]\n\t\t\t\t\t\t: [ `${ r }`, `${ g }`, `${ b }` ],\n\t\t\t};\n\t\t} ),\n\t} as gradientParser.GradientNode;\n}\n\nexport function getStopCssColor( colorStop: gradientParser.ColorStop ) {\n\tswitch ( colorStop.type ) {\n\t\tcase 'hex':\n\t\t\treturn `#${ colorStop.value }`;\n\t\tcase 'literal':\n\t\t\treturn colorStop.value;\n\t\tcase 'rgb':\n\t\tcase 'rgba':\n\t\t\treturn `${ colorStop.type }(${ colorStop.value.join( ',' ) })`;\n\t\tdefault:\n\t\t\t// Should be unreachable if passing an AST from gradient-parser.\n\t\t\t// See https://github.com/rafaelcaricio/gradient-parser#ast.\n\t\t\treturn 'transparent';\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,cAAc,MAAM,iBAAiB;AAC5C,SAASC,MAAM,EAAEC,MAAM,QAAQ,QAAQ;AACvC,OAAOC,WAAW,MAAM,sBAAsB;;AAE9C;AACA;AACA;AACA,SACCC,gBAAgB,EAChBC,+BAA+B,EAC/BC,iCAAiC,QAC3B,aAAa;AACpB,SAASC,iBAAiB,QAAQ,cAAc;AAGhDL,MAAM,CAAE,CAAEC,WAAW,CAAG,CAAC;AAEzB,OAAO,SAASK,+BAA+BA,CAC9CC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K,SAAS;MACb,OAAO0B,SAAS,CAAC1B,KAAK;IACvB,KAAK,KAAK;IACV,KAAK,MAAM;MACV,OAAQ,GAAG0B,SAAS,CAAClC,IAAM,IAAIkC,SAAS,CAAC1B,KAAK,CAAC2B,IAAI,CAAE,GAAI,CAAG,GAAE;IAC/D;MACC;MACA;MACA,OAAO,aAAa;EACtB;AACD","ignoreList":[]}
@@ -11,7 +11,7 @@ import classnames from 'classnames';
11
11
  */
12
12
  import { Icon, check } from '@wordpress/icons';
13
13
  import { __, sprintf } from '@wordpress/i18n';
14
- import { useCallback, useState } from '@wordpress/element';
14
+ import { useCallback } from '@wordpress/element';
15
15
 
16
16
  /**
17
17
  * Internal dependencies
@@ -90,15 +90,6 @@ export default function CustomSelectControl(props) {
90
90
  } : undefined),
91
91
  stateReducer
92
92
  });
93
- const [isFocused, setIsFocused] = useState(false);
94
- function handleOnFocus(e) {
95
- setIsFocused(true);
96
- onFocus?.(e);
97
- }
98
- function handleOnBlur(e) {
99
- setIsFocused(false);
100
- onBlur?.(e);
101
- }
102
93
  function getDescribedBy() {
103
94
  if (describedBy) {
104
95
  return describedBy;
@@ -135,15 +126,14 @@ export default function CustomSelectControl(props) {
135
126
  })
136
127
  }, label), createElement(InputBase, {
137
128
  __next40pxDefaultSize: __next40pxDefaultSize,
138
- isFocused: isOpen || isFocused,
139
129
  size: size,
140
130
  suffix: createElement(SelectControlChevronDown, null)
141
131
  }, createElement(SelectControlSelect, {
142
132
  onMouseOver: onMouseOver,
143
133
  onMouseOut: onMouseOut,
144
134
  as: "button",
145
- onFocus: handleOnFocus,
146
- onBlur: handleOnBlur,
135
+ onFocus: onFocus,
136
+ onBlur: onBlur,
147
137
  selectSize: size,
148
138
  __next40pxDefaultSize: __next40pxDefaultSize,
149
139
  ...getToggleButtonProps({
@@ -155,7 +145,9 @@ export default function CustomSelectControl(props) {
155
145
  })
156
146
  }, itemToString(selectedItem), __experimentalShowSelectedHint && selectedItem.__experimentalHint && createElement("span", {
157
147
  className: "components-custom-select-control__hint"
158
- }, selectedItem.__experimentalHint))), createElement("ul", {
148
+ }, selectedItem.__experimentalHint)), createElement("div", {
149
+ className: "components-custom-select-control__menu-wrapper"
150
+ }, createElement("ul", {
159
151
  ...menuProps,
160
152
  onKeyDown: onKeyDownHandler
161
153
  }, isOpen && items.map((item, index) =>
@@ -177,7 +169,7 @@ export default function CustomSelectControl(props) {
177
169
  }, item.__experimentalHint), item === selectedItem && createElement(Icon, {
178
170
  icon: check,
179
171
  className: "components-custom-select-control__item-icon"
180
- })))));
172
+ })))))));
181
173
  }
182
174
  export function StableCustomSelectControl(props) {
183
175
  return createElement(CustomSelectControl, {
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","classnames","Icon","check","__","sprintf","useCallback","useState","VisuallyHidden","Select","SelectControlSelect","SelectControlChevronDown","StyledLabel","useDeprecated36pxDefaultSizeProp","InputBase","itemToString","item","name","stateReducer","selectedItem","type","changes","props","items","stateChangeTypes","ToggleButtonKeyDownArrowDown","Math","min","indexOf","length","ToggleButtonKeyDownArrowUp","max","CustomSelectControl","__next40pxDefaultSize","className","hideLabelFromVision","label","describedBy","options","onChange","onSelectedItemChange","size","value","_selectedItem","onMouseOver","onMouseOut","onFocus","onBlur","__experimentalShowSelectedHint","getLabelProps","getToggleButtonProps","getMenuProps","getItemProps","isOpen","highlightedIndex","initialSelectedItem","undefined","isFocused","setIsFocused","handleOnFocus","e","handleOnBlur","getDescribedBy","menuProps","onKeyDownHandler","stopPropagation","onKeyDown","startsWith","createElement","as","suffix","selectSize","__experimentalHint","map","index","key","style","icon","StableCustomSelectControl"],"sources":["@wordpress/components/src/custom-select-control/index.js"],"sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport { useSelect } from 'downshift';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, check } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport { Select as SelectControlSelect } from '../select-control/styles/select-control-styles';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport { StyledLabel } from '../base-control/styles/base-control-styles';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport InputBase from '../input-control/input-base';\n\nconst itemToString = ( item ) => item?.name;\n// This is needed so that in Windows, where\n// the menu does not necessarily open on\n// key up/down, you can still switch between\n// options with the menu closed.\nconst stateReducer = (\n\t{ selectedItem },\n\t{ type, changes, props: { items } }\n) => {\n\tswitch ( type ) {\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:\n\t\t\t// If we already have a selected item, try to select the next one,\n\t\t\t// without circular navigation. Otherwise, select the first item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.min(\n\t\t\t\t\t\t\t\t\titems.indexOf( selectedItem ) + 1,\n\t\t\t\t\t\t\t\t\titems.length - 1\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: 0\n\t\t\t\t\t],\n\t\t\t};\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:\n\t\t\t// If we already have a selected item, try to select the previous one,\n\t\t\t// without circular navigation. Otherwise, select the last item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.max( items.indexOf( selectedItem ) - 1, 0 )\n\t\t\t\t\t\t\t: items.length - 1\n\t\t\t\t\t],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn changes;\n\t}\n};\n\nexport default function CustomSelectControl( props ) {\n\tconst {\n\t\t/** Start opting into the larger default height that will become the default size in a future version. */\n\t\t__next40pxDefaultSize = false,\n\t\tclassName,\n\t\thideLabelFromVision,\n\t\tlabel,\n\t\tdescribedBy,\n\t\toptions: items,\n\t\tonChange: onSelectedItemChange,\n\t\t/** @type {import('../select-control/types').SelectControlProps.size} */\n\t\tsize = 'default',\n\t\tvalue: _selectedItem,\n\t\tonMouseOver,\n\t\tonMouseOut,\n\t\tonFocus,\n\t\tonBlur,\n\t\t__experimentalShowSelectedHint = false,\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst {\n\t\tgetLabelProps,\n\t\tgetToggleButtonProps,\n\t\tgetMenuProps,\n\t\tgetItemProps,\n\t\tisOpen,\n\t\thighlightedIndex,\n\t\tselectedItem,\n\t} = useSelect( {\n\t\tinitialSelectedItem: items[ 0 ],\n\t\titems,\n\t\titemToString,\n\t\tonSelectedItemChange,\n\t\t...( typeof _selectedItem !== 'undefined' && _selectedItem !== null\n\t\t\t? { selectedItem: _selectedItem }\n\t\t\t: undefined ),\n\t\tstateReducer,\n\t} );\n\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tfunction handleOnFocus( e ) {\n\t\tsetIsFocused( true );\n\t\tonFocus?.( e );\n\t}\n\n\tfunction handleOnBlur( e ) {\n\t\tsetIsFocused( false );\n\t\tonBlur?.( e );\n\t}\n\n\tfunction getDescribedBy() {\n\t\tif ( describedBy ) {\n\t\t\treturn describedBy;\n\t\t}\n\n\t\tif ( ! selectedItem ) {\n\t\t\treturn __( 'No selection' );\n\t\t}\n\n\t\t// translators: %s: The selected option.\n\t\treturn sprintf( __( 'Currently selected: %s' ), selectedItem.name );\n\t}\n\n\tconst menuProps = getMenuProps( {\n\t\tclassName: 'components-custom-select-control__menu',\n\t\t'aria-hidden': ! isOpen,\n\t} );\n\n\tconst onKeyDownHandler = useCallback(\n\t\t( e ) => {\n\t\t\te.stopPropagation();\n\t\t\tmenuProps?.onKeyDown?.( e );\n\t\t},\n\t\t[ menuProps ]\n\t);\n\n\t// We need this here, because the null active descendant is not fully ARIA compliant.\n\tif (\n\t\tmenuProps[ 'aria-activedescendant' ]?.startsWith( 'downshift-null' )\n\t) {\n\t\tdelete menuProps[ 'aria-activedescendant' ];\n\t}\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-custom-select-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"label\" { ...getLabelProps() }>\n\t\t\t\t\t{ label }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */\n\t\t\t\t<StyledLabel\n\t\t\t\t\t{ ...getLabelProps( {\n\t\t\t\t\t\tclassName: 'components-custom-select-control__label',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</StyledLabel>\n\t\t\t) }\n\t\t\t<InputBase\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\tisFocused={ isOpen || isFocused }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ <SelectControlChevronDown /> }\n\t\t\t>\n\t\t\t\t<SelectControlSelect\n\t\t\t\t\tonMouseOver={ onMouseOver }\n\t\t\t\t\tonMouseOut={ onMouseOut }\n\t\t\t\t\tas=\"button\"\n\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t{ ...getToggleButtonProps( {\n\t\t\t\t\t\t// This is needed because some speech recognition software don't support `aria-labelledby`.\n\t\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t\t'aria-labelledby': undefined,\n\t\t\t\t\t\tclassName: 'components-custom-select-control__button',\n\t\t\t\t\t\tdescribedBy: getDescribedBy(),\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ itemToString( selectedItem ) }\n\t\t\t\t\t{ __experimentalShowSelectedHint &&\n\t\t\t\t\t\tselectedItem.__experimentalHint && (\n\t\t\t\t\t\t\t<span className=\"components-custom-select-control__hint\">\n\t\t\t\t\t\t\t\t{ selectedItem.__experimentalHint }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) }\n\t\t\t\t</SelectControlSelect>\n\t\t\t</InputBase>\n\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t<ul { ...menuProps } onKeyDown={ onKeyDownHandler }>\n\t\t\t\t{ isOpen &&\n\t\t\t\t\titems.map( ( item, index ) => (\n\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t{ ...getItemProps( {\n\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\tkey: item.key,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\titem.className,\n\t\t\t\t\t\t\t\t\t'components-custom-select-control__item',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-highlighted':\n\t\t\t\t\t\t\t\t\t\t\tindex === highlightedIndex,\n\t\t\t\t\t\t\t\t\t\t'has-hint': !! item.__experimentalHint,\n\t\t\t\t\t\t\t\t\t\t'is-next-40px-default-size':\n\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: item.style,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.name }\n\t\t\t\t\t\t\t{ item.__experimentalHint && (\n\t\t\t\t\t\t\t\t<span className=\"components-custom-select-control__item-hint\">\n\t\t\t\t\t\t\t\t\t{ item.__experimentalHint }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ item === selectedItem && (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\t\tclassName=\"components-custom-select-control__item-icon\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n}\n\nexport function StableCustomSelectControl( props ) {\n\treturn (\n\t\t<CustomSelectControl\n\t\t\t{ ...props }\n\t\t\t__experimentalShowSelectedHint={ false }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,WAAW;AACrC,OAAOC,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;AAC9C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,WAAW,EAAEC,QAAQ,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,MAAM,IAAIC,mBAAmB,QAAQ,gDAAgD;AAC9F,OAAOC,wBAAwB,MAAM,gCAAgC;AACrE,SAASC,WAAW,QAAQ,4CAA4C;AACxE,SAASC,gCAAgC,QAAQ,+BAA+B;AAChF,OAAOC,SAAS,MAAM,6BAA6B;AAEnD,MAAMC,YAAY,GAAKC,IAAI,IAAMA,IAAI,EAAEC,IAAI;AAC3C;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAGA,CACpB;EAAEC;AAAa,CAAC,EAChB;EAAEC,IAAI;EAAEC,OAAO;EAAEC,KAAK,EAAE;IAAEC;EAAM;AAAE,CAAC,KAC/B;EACJ,QAASH,IAAI;IACZ,KAAKpB,SAAS,CAACwB,gBAAgB,CAACC,4BAA4B;MAC3D;MACA;MACA,OAAO;QACNN,YAAY,EACXI,KAAK,CACJJ,YAAY,GACTO,IAAI,CAACC,GAAG,CACRJ,KAAK,CAACK,OAAO,CAAET,YAAa,CAAC,GAAG,CAAC,EACjCI,KAAK,CAACM,MAAM,GAAG,CACf,CAAC,G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EAAC;EAA6C,GAC1DlB,IAAI,CAACwD,kBACF,CACN,EACCxD,IAAI,KAAKG,YAAY,IACtBiD,aAAA,CAAClE,IAAI;IACJ2E,IAAI,EAAG1E,KAAO;IACd+B,SAAS,EAAC;EAA6C,CACvD,CAEC,CACH,CACA,CACA,CAAC;AAER;AAEA,OAAO,SAAS4C,yBAAyBA,CAAExD,KAAK,EAAG;EAClD,OACC8C,aAAA,CAACpC,mBAAmB;IAAA,GACdV,KAAK;IACV0B,8BAA8B,EAAG;EAAO,CACxC,CAAC;AAEJ"}
1
+ {"version":3,"names":["useSelect","classnames","Icon","check","__","sprintf","useCallback","VisuallyHidden","Select","SelectControlSelect","SelectControlChevronDown","StyledLabel","useDeprecated36pxDefaultSizeProp","InputBase","itemToString","item","name","stateReducer","selectedItem","type","changes","props","items","stateChangeTypes","ToggleButtonKeyDownArrowDown","Math","min","indexOf","length","ToggleButtonKeyDownArrowUp","max","CustomSelectControl","__next40pxDefaultSize","className","hideLabelFromVision","label","describedBy","options","onChange","onSelectedItemChange","size","value","_selectedItem","onMouseOver","onMouseOut","onFocus","onBlur","__experimentalShowSelectedHint","getLabelProps","getToggleButtonProps","getMenuProps","getItemProps","isOpen","highlightedIndex","initialSelectedItem","undefined","getDescribedBy","menuProps","onKeyDownHandler","e","stopPropagation","onKeyDown","startsWith","createElement","as","suffix","selectSize","__experimentalHint","map","index","key","style","icon","StableCustomSelectControl"],"sources":["@wordpress/components/src/custom-select-control/index.js"],"sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport { useSelect } from 'downshift';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, check } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport { Select as SelectControlSelect } from '../select-control/styles/select-control-styles';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport { StyledLabel } from '../base-control/styles/base-control-styles';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport InputBase from '../input-control/input-base';\n\nconst itemToString = ( item ) => item?.name;\n// This is needed so that in Windows, where\n// the menu does not necessarily open on\n// key up/down, you can still switch between\n// options with the menu closed.\nconst stateReducer = (\n\t{ selectedItem },\n\t{ type, changes, props: { items } }\n) => {\n\tswitch ( type ) {\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:\n\t\t\t// If we already have a selected item, try to select the next one,\n\t\t\t// without circular navigation. Otherwise, select the first item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.min(\n\t\t\t\t\t\t\t\t\titems.indexOf( selectedItem ) + 1,\n\t\t\t\t\t\t\t\t\titems.length - 1\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: 0\n\t\t\t\t\t],\n\t\t\t};\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:\n\t\t\t// If we already have a selected item, try to select the previous one,\n\t\t\t// without circular navigation. Otherwise, select the last item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.max( items.indexOf( selectedItem ) - 1, 0 )\n\t\t\t\t\t\t\t: items.length - 1\n\t\t\t\t\t],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn changes;\n\t}\n};\n\nexport default function CustomSelectControl( props ) {\n\tconst {\n\t\t/** Start opting into the larger default height that will become the default size in a future version. */\n\t\t__next40pxDefaultSize = false,\n\t\tclassName,\n\t\thideLabelFromVision,\n\t\tlabel,\n\t\tdescribedBy,\n\t\toptions: items,\n\t\tonChange: onSelectedItemChange,\n\t\t/** @type {import('../select-control/types').SelectControlProps.size} */\n\t\tsize = 'default',\n\t\tvalue: _selectedItem,\n\t\tonMouseOver,\n\t\tonMouseOut,\n\t\tonFocus,\n\t\tonBlur,\n\t\t__experimentalShowSelectedHint = false,\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst {\n\t\tgetLabelProps,\n\t\tgetToggleButtonProps,\n\t\tgetMenuProps,\n\t\tgetItemProps,\n\t\tisOpen,\n\t\thighlightedIndex,\n\t\tselectedItem,\n\t} = useSelect( {\n\t\tinitialSelectedItem: items[ 0 ],\n\t\titems,\n\t\titemToString,\n\t\tonSelectedItemChange,\n\t\t...( typeof _selectedItem !== 'undefined' && _selectedItem !== null\n\t\t\t? { selectedItem: _selectedItem }\n\t\t\t: undefined ),\n\t\tstateReducer,\n\t} );\n\n\tfunction getDescribedBy() {\n\t\tif ( describedBy ) {\n\t\t\treturn describedBy;\n\t\t}\n\n\t\tif ( ! selectedItem ) {\n\t\t\treturn __( 'No selection' );\n\t\t}\n\n\t\t// translators: %s: The selected option.\n\t\treturn sprintf( __( 'Currently selected: %s' ), selectedItem.name );\n\t}\n\n\tconst menuProps = getMenuProps( {\n\t\tclassName: 'components-custom-select-control__menu',\n\t\t'aria-hidden': ! isOpen,\n\t} );\n\n\tconst onKeyDownHandler = useCallback(\n\t\t( e ) => {\n\t\t\te.stopPropagation();\n\t\t\tmenuProps?.onKeyDown?.( e );\n\t\t},\n\t\t[ menuProps ]\n\t);\n\n\t// We need this here, because the null active descendant is not fully ARIA compliant.\n\tif (\n\t\tmenuProps[ 'aria-activedescendant' ]?.startsWith( 'downshift-null' )\n\t) {\n\t\tdelete menuProps[ 'aria-activedescendant' ];\n\t}\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-custom-select-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"label\" { ...getLabelProps() }>\n\t\t\t\t\t{ label }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */\n\t\t\t\t<StyledLabel\n\t\t\t\t\t{ ...getLabelProps( {\n\t\t\t\t\t\tclassName: 'components-custom-select-control__label',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</StyledLabel>\n\t\t\t) }\n\t\t\t<InputBase\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ <SelectControlChevronDown /> }\n\t\t\t>\n\t\t\t\t<SelectControlSelect\n\t\t\t\t\tonMouseOver={ onMouseOver }\n\t\t\t\t\tonMouseOut={ onMouseOut }\n\t\t\t\t\tas=\"button\"\n\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t{ ...getToggleButtonProps( {\n\t\t\t\t\t\t// This is needed because some speech recognition software don't support `aria-labelledby`.\n\t\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t\t'aria-labelledby': undefined,\n\t\t\t\t\t\tclassName: 'components-custom-select-control__button',\n\t\t\t\t\t\tdescribedBy: getDescribedBy(),\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ itemToString( selectedItem ) }\n\t\t\t\t\t{ __experimentalShowSelectedHint &&\n\t\t\t\t\t\tselectedItem.__experimentalHint && (\n\t\t\t\t\t\t\t<span className=\"components-custom-select-control__hint\">\n\t\t\t\t\t\t\t\t{ selectedItem.__experimentalHint }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) }\n\t\t\t\t</SelectControlSelect>\n\t\t\t\t<div className=\"components-custom-select-control__menu-wrapper\">\n\t\t\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t\t\t<ul { ...menuProps } onKeyDown={ onKeyDownHandler }>\n\t\t\t\t\t\t{ isOpen &&\n\t\t\t\t\t\t\titems.map( ( item, index ) => (\n\t\t\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t{ ...getItemProps( {\n\t\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\tkey: item.key,\n\t\t\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\t\t\titem.className,\n\t\t\t\t\t\t\t\t\t\t\t'components-custom-select-control__item',\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t'is-highlighted':\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex === highlightedIndex,\n\t\t\t\t\t\t\t\t\t\t\t\t'has-hint':\n\t\t\t\t\t\t\t\t\t\t\t\t\t!! item.__experimentalHint,\n\t\t\t\t\t\t\t\t\t\t\t\t'is-next-40px-default-size':\n\t\t\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tstyle: item.style,\n\t\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ item.name }\n\t\t\t\t\t\t\t\t\t{ item.__experimentalHint && (\n\t\t\t\t\t\t\t\t\t\t<span className=\"components-custom-select-control__item-hint\">\n\t\t\t\t\t\t\t\t\t\t\t{ item.__experimentalHint }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ item === selectedItem && (\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-custom-select-control__item-icon\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</InputBase>\n\t\t</div>\n\t);\n}\n\nexport function StableCustomSelectControl( props ) {\n\treturn (\n\t\t<CustomSelectControl\n\t\t\t{ ...props }\n\t\t\t__experimentalShowSelectedHint={ false }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,WAAW;AACrC,OAAOC,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;AAC9C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,WAAW,QAAQ,oBAAoB;;AAEhD;AACA;AACA;AACA,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,MAAM,IAAIC,mBAAmB,QAAQ,gDAAgD;AAC9F,OAAOC,wBAAwB,MAAM,gCAAgC;AACrE,SAASC,WAAW,QAAQ,4CAA4C;AACxE,SAASC,gCAAgC,QAAQ,+BAA+B;AAChF,OAAOC,SAAS,MAAM,6BAA6B;AAEnD,MAAMC,YAAY,GAAKC,IAAI,IAAMA,IAAI,EAAEC,IAAI;AAC3C;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAGA,CACpB;EAAEC;AAAa,CAAC,EAChB;EAAEC,IAAI;EAAEC,OAAO;EAAEC,KAAK,EAAE;IAAEC;EAAM;AAAE,CAAC,KAC/B;EACJ,QAASH,IAAI;IACZ,KAAKnB,SAAS,CAACuB,gBAAgB,CAACC,4BAA4B;MAC3D;MACA;MACA,OAAO;QACNN,YAAY,EACXI,KAAK,CACJJ,YAAY,GACTO,IAAI,CAACC,GAAG,CACRJ,KAAK,CAACK,OAAO,CAAET,YAAa,CAAC,GAAG,CAAC,EACjCI,KAAK,CAACM,MAAM,GAAG,CACf,CAAC,GACD,CAAC;MAEP,CAAC;IACF,KAAK5B,SAAS,CAACuB,gBAAgB,CAACM,0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 -1 +1 @@
1
- {"version":3,"names":["createContext","useMemo","__","sprintf","Icon","chevronDown","VisuallyHidden","Styled","contextConnectWithoutRef","useContextSystem","CustomSelectContext","undefined","defaultRenderSelectedValue","value","isValueEmpty","Array","isArray","length","UnconnectedCustomSelectButton","props","renderSelectedValue","size","store","restProps","currentValue","useState","computedRenderSelectedValue","createElement","Select","hasCustomRenderProp","showOnKeyDown","icon","CustomSelectButton","_CustomSelect","children","hideLabelFromVision","label","Fragment","as","SelectLabel","SelectPopover","gutter","sameWidth","Provider"],"sources":["@wordpress/components/src/custom-select-control-v2/custom-select.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Icon, chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '..';\nimport * as Styled from './styles';\nimport type {\n\tCustomSelectContext as CustomSelectContextType,\n\tCustomSelectStore,\n\tCustomSelectButtonProps,\n\t_CustomSelectProps,\n} from './types';\nimport {\n\tcontextConnectWithoutRef,\n\tuseContextSystem,\n\ttype WordPressComponentProps,\n} from '../context';\n\nexport const CustomSelectContext =\n\tcreateContext< CustomSelectContextType >( undefined );\n\nfunction defaultRenderSelectedValue(\n\tvalue: CustomSelectButtonProps[ 'value' ]\n) {\n\tconst isValueEmpty = Array.isArray( value )\n\t\t? value.length === 0\n\t\t: value === undefined || value === null;\n\n\tif ( isValueEmpty ) {\n\t\treturn __( 'Select an item' );\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.length === 1\n\t\t\t? value[ 0 ]\n\t\t\t: // translators: %s: number of items selected (it will always be 2 or more items)\n\t\t\t sprintf( __( '%s items selected' ), value.length );\n\t}\n\n\treturn value;\n}\n\nconst UnconnectedCustomSelectButton = (\n\tprops: Omit<\n\t\tWordPressComponentProps<\n\t\t\tCustomSelectButtonProps & CustomSelectStore,\n\t\t\t'button',\n\t\t\tfalse\n\t\t>,\n\t\t'onChange'\n\t>\n) => {\n\tconst {\n\t\trenderSelectedValue,\n\t\tsize = 'default',\n\t\tstore,\n\t\t...restProps\n\t} = useContextSystem( props, 'CustomSelectControlButton' );\n\n\tconst { value: currentValue } = store.useState();\n\n\tconst computedRenderSelectedValue = useMemo(\n\t\t() => renderSelectedValue ?? defaultRenderSelectedValue,\n\t\t[ renderSelectedValue ]\n\t);\n\n\treturn (\n\t\t<Styled.Select\n\t\t\t{ ...restProps }\n\t\t\tsize={ size }\n\t\t\thasCustomRenderProp={ !! renderSelectedValue }\n\t\t\tstore={ store }\n\t\t\t// to match legacy behavior where using arrow keys\n\t\t\t// move selection rather than open the popover\n\t\t\tshowOnKeyDown={ false }\n\t\t>\n\t\t\t<div>{ computedRenderSelectedValue( currentValue ) }</div>\n\t\t\t<Icon icon={ chevronDown } size={ 18 } />\n\t\t</Styled.Select>\n\t);\n};\n\nconst CustomSelectButton = contextConnectWithoutRef(\n\tUnconnectedCustomSelectButton,\n\t'CustomSelectControlButton'\n);\n\nfunction _CustomSelect( props: _CustomSelectProps & CustomSelectStore ) {\n\tconst {\n\t\tchildren,\n\t\thideLabelFromVision = false,\n\t\tlabel,\n\t\tstore,\n\t\t...restProps\n\t} = props;\n\n\treturn (\n\t\t<>\n\t\t\t{ hideLabelFromVision ? ( // TODO: Replace with BaseControl\n\t\t\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t<Styled.SelectLabel store={ store }>\n\t\t\t\t\t{ label }\n\t\t\t\t</Styled.SelectLabel>\n\t\t\t) }\n\t\t\t<CustomSelectButton { ...restProps } store={ store } />\n\t\t\t<Styled.SelectPopover gutter={ 12 } store={ store } sameWidth>\n\t\t\t\t<CustomSelectContext.Provider value={ { store } }>\n\t\t\t\t\t{ children }\n\t\t\t\t</CustomSelectContext.Provider>\n\t\t\t</Styled.SelectPopover>\n\t\t</>\n\t);\n}\n\nexport default _CustomSelect;\n"],"mappings":";AAAA;AAC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Styled","contextConnectWithoutRef","useContextSystem","CustomSelectContext","undefined","defaultRenderSelectedValue","value","isValueEmpty","Array","isArray","length","UnconnectedCustomSelectButton","props","renderSelectedValue","size","store","restProps","currentValue","useState","computedRenderSelectedValue","createElement","Select","hasCustomRenderProp","showOnKeyDown","icon","CustomSelectButton","_CustomSelect","children","hideLabelFromVision","label","Fragment","as","SelectLabel","SelectPopover","gutter","sameWidth","Provider"],"sources":["@wordpress/components/src/custom-select-control-v2/custom-select.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Icon, chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '..';\nimport * as Styled from './styles';\nimport type {\n\tCustomSelectContext as CustomSelectContextType,\n\tCustomSelectStore,\n\tCustomSelectButtonProps,\n\t_CustomSelectProps,\n} from './types';\nimport {\n\tcontextConnectWithoutRef,\n\tuseContextSystem,\n\ttype WordPressComponentProps,\n} from '../context';\n\nexport const CustomSelectContext =\n\tcreateContext< CustomSelectContextType >( undefined );\n\nfunction defaultRenderSelectedValue(\n\tvalue: CustomSelectButtonProps[ 'value' ]\n) {\n\tconst isValueEmpty = Array.isArray( value )\n\t\t? value.length === 0\n\t\t: value === undefined || value === null;\n\n\tif ( isValueEmpty ) {\n\t\treturn __( 'Select an item' );\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.length === 1\n\t\t\t? value[ 0 ]\n\t\t\t: // translators: %s: number of items selected (it will always be 2 or more items)\n\t\t\t sprintf( __( '%s items selected' ), value.length );\n\t}\n\n\treturn value;\n}\n\nconst UnconnectedCustomSelectButton = (\n\tprops: Omit<\n\t\tWordPressComponentProps<\n\t\t\tCustomSelectButtonProps & CustomSelectStore,\n\t\t\t'button',\n\t\t\tfalse\n\t\t>,\n\t\t'onChange'\n\t>\n) => {\n\tconst {\n\t\trenderSelectedValue,\n\t\tsize = 'default',\n\t\tstore,\n\t\t...restProps\n\t} = useContextSystem( props, 'CustomSelectControlButton' );\n\n\tconst { value: currentValue } = store.useState();\n\n\tconst computedRenderSelectedValue = useMemo(\n\t\t() => renderSelectedValue ?? defaultRenderSelectedValue,\n\t\t[ renderSelectedValue ]\n\t);\n\n\treturn (\n\t\t<Styled.Select\n\t\t\t{ ...restProps }\n\t\t\tsize={ size }\n\t\t\thasCustomRenderProp={ !! renderSelectedValue }\n\t\t\tstore={ store }\n\t\t\t// to match legacy behavior where using arrow keys\n\t\t\t// move selection rather than open the popover\n\t\t\tshowOnKeyDown={ false }\n\t\t>\n\t\t\t<div>{ computedRenderSelectedValue( currentValue ) }</div>\n\t\t\t<Icon icon={ chevronDown } size={ 18 } />\n\t\t</Styled.Select>\n\t);\n};\n\nconst CustomSelectButton = contextConnectWithoutRef(\n\tUnconnectedCustomSelectButton,\n\t'CustomSelectControlButton'\n);\n\nfunction _CustomSelect( props: _CustomSelectProps & CustomSelectStore ) {\n\tconst {\n\t\tchildren,\n\t\thideLabelFromVision = false,\n\t\tlabel,\n\t\tstore,\n\t\t...restProps\n\t} = props;\n\n\treturn (\n\t\t<>\n\t\t\t{ hideLabelFromVision ? ( // TODO: Replace with BaseControl\n\t\t\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t<Styled.SelectLabel store={ store }>\n\t\t\t\t\t{ label }\n\t\t\t\t</Styled.SelectLabel>\n\t\t\t) }\n\t\t\t<CustomSelectButton { ...restProps } store={ store } />\n\t\t\t<Styled.SelectPopover gutter={ 12 } store={ store } sameWidth>\n\t\t\t\t<CustomSelectContext.Provider value={ { store } }>\n\t\t\t\t\t{ children }\n\t\t\t\t</CustomSelectContext.Provider>\n\t\t\t</Styled.SelectPopover>\n\t\t</>\n\t);\n}\n\nexport default _CustomSelect;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,OAAO,QAAQ,oBAAoB;AAC3D,SAASC,EAA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AACqB,MAAM;IAAA,GACRL,SAAS;IACdF,IAAI,EAAGA,IAAM;IACbQ,mBAAmB,EAAG,CAAC,CAAET,mBAAqB;IAC9CE,KAAK,EAAGA;IACR;IACA;IAAA;IACAQ,aAAa,EAAG;EAAO,GAEvBH,aAAA,cAAOD,2BAA2B,CAAEF,YAAa,CAAQ,CAAC,EAC1DG,aAAA,CAACvB,IAAI;IAAC2B,IAAI,EAAG1B,WAAa;IAACgB,IAAI,EAAG;EAAI,CAAE,CAC1B,CAAC;AAElB,CAAC;AAED,MAAMW,kBAAkB,GAAGxB,wBAAwB,CAClDU,6BAA6B,EAC7B,2BACD,CAAC;AAED,SAASe,aAAaA,CAAEd,KAA6C,EAAG;EACvE,MAAM;IACLe,QAAQ;IACRC,mBAAmB,GAAG,KAAK;IAC3BC,KAAK;IACLd,KAAK;IACL,GAAGC;EACJ,CAAC,GAAGJ,KAAK;EAET,OACCQ,aAAA,CAAAU,QAAA,QACGF,mBAAmB;EAAK;EACzBR,aAAA,CAACrB,cAAc;IAACgC,EAAE,EAAC;EAAO,GAAGF,KAAuB,CAAC,GAErDT,aAAA,CAACpB,MAAM,CAACgC,WAAW;IAACjB,KAAK,EAAGA;EAAO,GAChCc,KACiB,CACpB,EACDT,aAAA,CAACK,kBAAkB;IAAA,GAAMT,SAAS;IAAGD,KAAK,EAAGA;EAAO,CAAE,CAAC,EACvDK,aAAA,CAACpB,MAAM,CAACiC,aAAa;IAACC,MAAM,EAAG,EAAI;IAACnB,KAAK,EAAGA,KAAO;IAACoB,SAAS;EAAA,GAC5Df,aAAA,CAACjB,mBAAmB,CAACiC,QAAQ;IAAC9B,KAAK,EAAG;MAAES;IAAM;EAAG,GAC9CY,QAC2B,CACT,CACrB,CAAC;AAEL;AAEA,eAAeD,aAAa","ignoreList":[]}
@@ -8,7 +8,8 @@ import * as Ariakit from '@ariakit/react';
8
8
  * Internal dependencies
9
9
  */
10
10
  import _CustomSelect from '../custom-select';
11
- function CustomSelect(props) {
11
+ import Item from '../item';
12
+ function CustomSelectControlV2(props) {
12
13
  const {
13
14
  defaultValue,
14
15
  onChange,
@@ -26,5 +27,6 @@ function CustomSelect(props) {
26
27
  store: store
27
28
  });
28
29
  }
29
- export default CustomSelect;
30
+ CustomSelectControlV2.Item = Item;
31
+ export default CustomSelectControlV2;
30
32
  //# sourceMappingURL=index.js.map