@wordpress/components 25.6.1 → 26.0.1-next.5a1d1283.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 (526) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +3 -8
  4. package/build/color-picker/hsv-color-picker.native.js +92 -0
  5. package/build/color-picker/hsv-color-picker.native.js.map +1 -0
  6. package/build/color-picker/hue-picker.native.js +195 -0
  7. package/build/color-picker/hue-picker.native.js.map +1 -0
  8. package/build/color-picker/index.native.js +3 -2
  9. package/build/color-picker/index.native.js.map +1 -1
  10. package/build/color-picker/saturation-picker.native.js +178 -0
  11. package/build/color-picker/saturation-picker.native.js.map +1 -0
  12. package/build/item-group/item/component.js +0 -1
  13. package/build/item-group/item/component.js.map +1 -1
  14. package/build/item-group/item-group/component.js +0 -1
  15. package/build/item-group/item-group/component.js.map +1 -1
  16. package/build/menu-item/index.js +6 -4
  17. package/build/menu-item/index.js.map +1 -1
  18. package/build/menu-item/types.js.map +1 -1
  19. package/build/mobile/link-settings/link-settings-navigation.native.js +1 -1
  20. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  21. package/build/navigation/index.js +0 -1
  22. package/build/navigation/index.js.map +1 -1
  23. package/build/navigator/navigator-provider/component.js +1 -2
  24. package/build/navigator/navigator-provider/component.js.map +1 -1
  25. package/build/palette-edit/styles.js +10 -10
  26. package/build/palette-edit/styles.js.map +1 -1
  27. package/build/popover/index.js +38 -75
  28. package/build/popover/index.js.map +1 -1
  29. package/build/popover/overlay-middlewares.js.map +1 -1
  30. package/build/popover/types.js.map +1 -1
  31. package/build/popover/utils.js +5 -50
  32. package/build/popover/utils.js.map +1 -1
  33. package/build/progress-bar/styles.js +6 -5
  34. package/build/progress-bar/styles.js.map +1 -1
  35. package/build/search-control/index.native.js +27 -24
  36. package/build/search-control/index.native.js.map +1 -1
  37. package/build/shortcut/index.js +13 -0
  38. package/build/shortcut/index.js.map +1 -1
  39. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +3 -1
  40. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  41. package/build/slot-fill/bubbles-virtually/slot.js +14 -8
  42. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  43. package/build/slot-fill/index.js +5 -0
  44. package/build/slot-fill/index.js.map +1 -1
  45. package/build/spinner/index.js +0 -1
  46. package/build/spinner/index.js.map +1 -1
  47. package/build/theme/index.js +0 -1
  48. package/build/theme/index.js.map +1 -1
  49. package/build/tools-panel/tools-panel/component.js +0 -1
  50. package/build/tools-panel/tools-panel/component.js.map +1 -1
  51. package/build/tools-panel/tools-panel-header/component.js +5 -1
  52. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  53. package/build/tree-select/index.js +0 -1
  54. package/build/tree-select/index.js.map +1 -1
  55. package/build/unit-control/index.js +0 -1
  56. package/build/unit-control/index.js.map +1 -1
  57. package/build/utils/hooks/use-cx.js +2 -1
  58. package/build/utils/hooks/use-cx.js.map +1 -1
  59. package/build/view/component.js +1 -2
  60. package/build/view/component.js.map +1 -1
  61. package/build-module/color-picker/hsv-color-picker.native.js +84 -0
  62. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -0
  63. package/build-module/color-picker/hue-picker.native.js +185 -0
  64. package/build-module/color-picker/hue-picker.native.js.map +1 -0
  65. package/build-module/color-picker/index.native.js +2 -1
  66. package/build-module/color-picker/index.native.js.map +1 -1
  67. package/build-module/color-picker/saturation-picker.native.js +168 -0
  68. package/build-module/color-picker/saturation-picker.native.js.map +1 -0
  69. package/build-module/item-group/item/component.js +0 -1
  70. package/build-module/item-group/item/component.js.map +1 -1
  71. package/build-module/item-group/item-group/component.js +0 -1
  72. package/build-module/item-group/item-group/component.js.map +1 -1
  73. package/build-module/menu-item/index.js +4 -2
  74. package/build-module/menu-item/index.js.map +1 -1
  75. package/build-module/menu-item/types.js.map +1 -1
  76. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -1
  77. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  78. package/build-module/navigation/index.js +0 -1
  79. package/build-module/navigation/index.js.map +1 -1
  80. package/build-module/navigator/navigator-provider/component.js +1 -2
  81. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  82. package/build-module/palette-edit/styles.js +10 -10
  83. package/build-module/palette-edit/styles.js.map +1 -1
  84. package/build-module/popover/index.js +42 -79
  85. package/build-module/popover/index.js.map +1 -1
  86. package/build-module/popover/overlay-middlewares.js.map +1 -1
  87. package/build-module/popover/types.js.map +1 -1
  88. package/build-module/popover/utils.js +4 -47
  89. package/build-module/popover/utils.js.map +1 -1
  90. package/build-module/progress-bar/styles.js +6 -5
  91. package/build-module/progress-bar/styles.js.map +1 -1
  92. package/build-module/search-control/index.native.js +28 -25
  93. package/build-module/search-control/index.native.js.map +1 -1
  94. package/build-module/shortcut/index.js +13 -0
  95. package/build-module/shortcut/index.js.map +1 -1
  96. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +3 -1
  97. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  98. package/build-module/slot-fill/bubbles-virtually/slot.js +14 -8
  99. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  100. package/build-module/slot-fill/index.js +6 -1
  101. package/build-module/slot-fill/index.js.map +1 -1
  102. package/build-module/spinner/index.js +0 -1
  103. package/build-module/spinner/index.js.map +1 -1
  104. package/build-module/theme/index.js +0 -1
  105. package/build-module/theme/index.js.map +1 -1
  106. package/build-module/tools-panel/tools-panel/component.js +0 -1
  107. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  108. package/build-module/tools-panel/tools-panel-header/component.js +5 -1
  109. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  110. package/build-module/tree-select/index.js +0 -1
  111. package/build-module/tree-select/index.js.map +1 -1
  112. package/build-module/unit-control/index.js +0 -1
  113. package/build-module/unit-control/index.js.map +1 -1
  114. package/build-module/utils/hooks/use-cx.js +2 -1
  115. package/build-module/utils/hooks/use-cx.js.map +1 -1
  116. package/build-module/view/component.js +1 -2
  117. package/build-module/view/component.js.map +1 -1
  118. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  119. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  120. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  121. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  122. package/build-types/animate/stories/index.story.d.ts +9 -9
  123. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  124. package/build-types/base-control/stories/index.story.d.ts +4 -4
  125. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  126. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  127. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  128. package/build-types/border-control/stories/index.story.d.ts +2 -2
  129. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  130. package/build-types/button/stories/e2e/index.story.d.ts +3 -3
  131. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  132. package/build-types/button/stories/index.story.d.ts +10 -9
  133. package/build-types/button/stories/index.story.d.ts.map +1 -1
  134. package/build-types/button-group/stories/index.story.d.ts +3 -3
  135. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  136. package/build-types/card/stories/index.story.d.ts +2 -2
  137. package/build-types/card/stories/index.story.d.ts.map +1 -1
  138. package/build-types/checkbox-control/stories/index.story.d.ts +4 -4
  139. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  140. package/build-types/circular-option-picker/stories/index.story.d.ts +2 -2
  141. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  142. package/build-types/color-indicator/stories/index.story.d.ts +3 -3
  143. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  144. package/build-types/color-palette/stories/index.story.d.ts +3 -3
  145. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  146. package/build-types/color-palette/styles.d.ts +1 -1
  147. package/build-types/color-picker/stories/index.story.d.ts +2 -2
  148. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  149. package/build-types/combobox-control/stories/index.story.d.ts +2 -2
  150. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  151. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  152. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  153. package/build-types/date-time/date/styles.d.ts +1 -1
  154. package/build-types/date-time/stories/date-time.story.d.ts +5 -5
  155. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  156. package/build-types/date-time/stories/date.story.d.ts +5 -5
  157. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  158. package/build-types/date-time/stories/time.story.d.ts +3 -3
  159. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  160. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  161. package/build-types/disabled/stories/index.story.d.ts +4 -4
  162. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  163. package/build-types/divider/stories/index.story.d.ts +5 -5
  164. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  165. package/build-types/draggable/stories/index.story.d.ts +4 -4
  166. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  167. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  168. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  169. package/build-types/dropdown/stories/index.story.d.ts +6 -5
  170. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  171. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  172. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  173. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +2 -2
  174. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  175. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  176. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  177. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +2 -2
  178. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  179. package/build-types/elevation/stories/index.story.d.ts +5 -5
  180. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  181. package/build-types/external-link/stories/index.story.d.ts +3 -3
  182. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  183. package/build-types/flex/stories/index.story.d.ts +4 -4
  184. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  185. package/build-types/focal-point-picker/stories/index.story.d.ts +2 -2
  186. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  187. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +2 -2
  188. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  189. package/build-types/font-size-picker/stories/index.story.d.ts +8 -8
  190. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  191. package/build-types/form-file-upload/stories/index.story.d.ts +2 -2
  192. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  193. package/build-types/form-toggle/stories/index.story.d.ts +3 -3
  194. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  195. package/build-types/form-token-field/stories/index.story.d.ts +7 -7
  196. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  197. package/build-types/gradient-picker/stories/index.story.d.ts +2 -2
  198. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  199. package/build-types/grid/stories/index.story.d.ts +3 -3
  200. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  201. package/build-types/guide/stories/index.story.d.ts +2 -2
  202. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  203. package/build-types/h-stack/stories/e2e/index.story.d.ts +3 -3
  204. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  205. package/build-types/h-stack/stories/index.story.d.ts +3 -3
  206. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  207. package/build-types/heading/stories/index.story.d.ts +3 -3
  208. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  209. package/build-types/icon/stories/index.story.d.ts +4 -4
  210. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  211. package/build-types/input-control/stories/index.story.d.ts +2 -2
  212. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  213. package/build-types/item-group/item/component.d.ts +0 -1
  214. package/build-types/item-group/item/component.d.ts.map +1 -1
  215. package/build-types/item-group/item-group/component.d.ts +0 -1
  216. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  217. package/build-types/item-group/stories/index.story.d.ts +6 -6
  218. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  219. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  220. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  221. package/build-types/menu-group/stories/index.story.d.ts +3 -3
  222. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  223. package/build-types/menu-item/index.d.ts +5 -58
  224. package/build-types/menu-item/index.d.ts.map +1 -1
  225. package/build-types/menu-item/stories/index.story.d.ts +74 -0
  226. package/build-types/menu-item/stories/index.story.d.ts.map +1 -0
  227. package/build-types/menu-item/types.d.ts +3 -2
  228. package/build-types/menu-item/types.d.ts.map +1 -1
  229. package/build-types/menu-items-choice/stories/index.story.d.ts +3 -3
  230. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  231. package/build-types/modal/stories/index.story.d.ts +4 -4
  232. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  233. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +3 -3
  234. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  235. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +3 -3
  236. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  237. package/build-types/navigation/index.d.ts +0 -1
  238. package/build-types/navigation/index.d.ts.map +1 -1
  239. package/build-types/navigation/stories/index.story.d.ts +2 -2
  240. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  241. package/build-types/navigation/stories/utils/controlled-state.d.ts +2 -2
  242. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  243. package/build-types/navigation/stories/utils/default.d.ts +2 -2
  244. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  245. package/build-types/navigation/stories/utils/group.d.ts +2 -2
  246. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  247. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +2 -2
  248. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  249. package/build-types/navigation/stories/utils/more-examples.d.ts +2 -2
  250. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  251. package/build-types/navigation/stories/utils/search.d.ts +2 -2
  252. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  253. package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
  254. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  255. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  256. package/build-types/navigator/stories/index.story.d.ts +5 -5
  257. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  258. package/build-types/notice/stories/index.story.d.ts +3 -3
  259. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  260. package/build-types/number-control/stories/index.story.d.ts +2 -2
  261. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  262. package/build-types/palette-edit/stories/index.story.d.ts +2 -2
  263. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  264. package/build-types/palette-edit/styles.d.ts +1 -1
  265. package/build-types/palette-edit/styles.d.ts.map +1 -1
  266. package/build-types/panel/stories/index.story.d.ts +6 -6
  267. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  268. package/build-types/placeholder/stories/index.story.d.ts +3 -3
  269. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  270. package/build-types/popover/index.d.ts.map +1 -1
  271. package/build-types/popover/overlay-middlewares.d.ts +2 -2
  272. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  273. package/build-types/popover/stories/index.story.d.ts +7 -7
  274. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  275. package/build-types/popover/types.d.ts +6 -0
  276. package/build-types/popover/types.d.ts.map +1 -1
  277. package/build-types/popover/utils.d.ts +1 -21
  278. package/build-types/popover/utils.d.ts.map +1 -1
  279. package/build-types/progress-bar/stories/index.story.d.ts +3 -3
  280. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  281. package/build-types/progress-bar/styles.d.ts.map +1 -1
  282. package/build-types/query-controls/stories/index.story.d.ts +4 -4
  283. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  284. package/build-types/radio-control/stories/index.story.d.ts +3 -3
  285. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  286. package/build-types/range-control/stories/index.story.d.ts +9 -9
  287. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  288. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  289. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  290. package/build-types/responsive-wrapper/stories/index.story.d.ts +3 -3
  291. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  292. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  293. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  294. package/build-types/scroll-lock/stories/index.story.d.ts +3 -3
  295. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  296. package/build-types/scrollable/stories/index.story.d.ts +3 -3
  297. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  298. package/build-types/search-control/stories/index.story.d.ts +2 -2
  299. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  300. package/build-types/select-control/stories/index.story.d.ts +2 -2
  301. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  302. package/build-types/shortcut/index.d.ts +13 -0
  303. package/build-types/shortcut/index.d.ts.map +1 -1
  304. package/build-types/shortcut/stories/index.story.d.ts +13 -0
  305. package/build-types/shortcut/stories/index.story.d.ts.map +1 -0
  306. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +1 -0
  307. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  308. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -6
  309. package/build-types/slot-fill/index.d.ts +1 -1
  310. package/build-types/slot-fill/index.d.ts.map +1 -1
  311. package/build-types/snackbar/stories/index.story.d.ts +7 -7
  312. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  313. package/build-types/snackbar/stories/list.story.d.ts +3 -3
  314. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  315. package/build-types/spacer/stories/index.story.d.ts +3 -3
  316. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  317. package/build-types/spinner/index.d.ts +0 -1
  318. package/build-types/spinner/index.d.ts.map +1 -1
  319. package/build-types/spinner/stories/index.story.d.ts +4 -4
  320. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  321. package/build-types/surface/stories/index.story.d.ts +3 -3
  322. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  323. package/build-types/tab-panel/stories/index.story.d.ts +2 -2
  324. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  325. package/build-types/text-control/stories/index.story.d.ts +4 -4
  326. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  327. package/build-types/text-highlight/stories/index.story.d.ts +3 -3
  328. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  329. package/build-types/textarea-control/stories/index.story.d.ts +3 -3
  330. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  331. package/build-types/theme/index.d.ts +0 -1
  332. package/build-types/theme/index.d.ts.map +1 -1
  333. package/build-types/theme/stories/index.story.d.ts +4 -4
  334. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  335. package/build-types/tip/stories/index.story.d.ts +3 -3
  336. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  337. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  338. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  339. package/build-types/toggle-group-control/stories/index.story.d.ts +6 -6
  340. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  341. package/build-types/toolbar/stories/index.story.d.ts +2 -2
  342. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  343. package/build-types/tools-panel/stories/index.story.d.ts +8 -8
  344. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  345. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  346. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  347. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  348. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  349. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  350. package/build-types/tree-select/index.d.ts +0 -1
  351. package/build-types/tree-select/index.d.ts.map +1 -1
  352. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  353. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  354. package/build-types/truncate/stories/index.story.d.ts +4 -4
  355. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  356. package/build-types/unit-control/index.d.ts +0 -1
  357. package/build-types/unit-control/index.d.ts.map +1 -1
  358. package/build-types/unit-control/stories/index.story.d.ts +7 -7
  359. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  360. package/build-types/utils/hooks/use-cx.d.ts +2 -1
  361. package/build-types/utils/hooks/use-cx.d.ts.map +1 -1
  362. package/build-types/v-stack/stories/e2e/index.story.d.ts +3 -3
  363. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  364. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  365. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  366. package/build-types/view/component.d.ts +0 -1
  367. package/build-types/view/component.d.ts.map +1 -1
  368. package/build-types/view/stories/index.story.d.ts +3 -3
  369. package/build-types/view/stories/index.story.d.ts.map +1 -1
  370. package/build-types/visually-hidden/stories/index.story.d.ts +5 -5
  371. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  372. package/build-types/z-stack/stories/index.story.d.ts +3 -3
  373. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  374. package/package.json +20 -20
  375. package/src/alignment-matrix-control/stories/index.story.tsx +7 -3
  376. package/src/angle-picker-control/stories/index.story.tsx +3 -3
  377. package/src/animate/stories/index.story.tsx +12 -10
  378. package/src/base-control/stories/index.story.tsx +5 -9
  379. package/src/border-box-control/stories/index.story.tsx +5 -9
  380. package/src/border-control/stories/index.story.tsx +8 -14
  381. package/src/button/stories/e2e/index.story.tsx +3 -3
  382. package/src/button/stories/index.story.tsx +10 -10
  383. package/src/button-group/stories/index.story.tsx +4 -6
  384. package/src/card/stories/index.story.tsx +5 -5
  385. package/src/checkbox-control/stories/index.story.tsx +7 -6
  386. package/src/circular-option-picker/stories/index.story.tsx +16 -4
  387. package/src/color-indicator/stories/index.story.tsx +4 -6
  388. package/src/color-palette/stories/index.story.tsx +12 -21
  389. package/src/color-picker/hsv-color-picker.native.js +88 -0
  390. package/src/color-picker/hue-picker.native.js +194 -0
  391. package/src/color-picker/index.native.js +2 -1
  392. package/src/color-picker/saturation-picker.native.js +163 -0
  393. package/src/color-picker/stories/index.story.tsx +3 -3
  394. package/src/color-picker/style.native.scss +23 -0
  395. package/src/combobox-control/stories/index.story.tsx +3 -3
  396. package/src/custom-gradient-picker/stories/index.story.tsx +3 -3
  397. package/src/date-time/stories/date-time.story.tsx +8 -10
  398. package/src/date-time/stories/date.story.tsx +8 -9
  399. package/src/date-time/stories/time.story.tsx +4 -4
  400. package/src/dimension-control/stories/index.story.tsx +3 -3
  401. package/src/disabled/stories/index.story.tsx +4 -4
  402. package/src/divider/stories/index.story.tsx +6 -6
  403. package/src/draggable/stories/index.story.tsx +5 -7
  404. package/src/drop-zone/stories/index.story.tsx +3 -3
  405. package/src/dropdown/stories/index.story.tsx +8 -6
  406. package/src/dropdown-menu/stories/index.story.tsx +3 -3
  407. package/src/dropdown-menu-v2/stories/index.story.tsx +24 -10
  408. package/src/duotone-picker/stories/duotone-picker.story.tsx +3 -6
  409. package/src/duotone-picker/stories/duotone-swatch.story.tsx +3 -3
  410. package/src/elevation/stories/index.story.tsx +7 -7
  411. package/src/external-link/stories/index.story.tsx +4 -6
  412. package/src/flex/stories/index.story.tsx +6 -6
  413. package/src/focal-point-picker/stories/index.story.tsx +3 -3
  414. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -3
  415. package/src/font-size-picker/stories/index.story.tsx +10 -10
  416. package/src/form-file-upload/stories/index.story.tsx +3 -3
  417. package/src/form-toggle/stories/index.story.tsx +4 -7
  418. package/src/form-token-field/stories/index.story.tsx +10 -11
  419. package/src/gradient-picker/stories/index.story.tsx +3 -3
  420. package/src/grid/stories/index.story.tsx +4 -4
  421. package/src/guide/stories/index.story.tsx +3 -3
  422. package/src/h-stack/stories/e2e/index.story.tsx +4 -4
  423. package/src/h-stack/stories/index.story.tsx +4 -4
  424. package/src/heading/stories/index.story.tsx +3 -3
  425. package/src/icon/stories/index.story.tsx +5 -5
  426. package/src/input-control/stories/index.story.tsx +5 -3
  427. package/src/item-group/item/component.tsx +0 -1
  428. package/src/item-group/item-group/component.tsx +0 -1
  429. package/src/item-group/stories/index.story.tsx +11 -12
  430. package/src/keyboard-shortcuts/stories/index.story.tsx +3 -3
  431. package/src/menu-group/stories/index.story.tsx +5 -5
  432. package/src/menu-item/README.md +1 -1
  433. package/src/menu-item/index.tsx +5 -2
  434. package/src/menu-item/stories/index.story.tsx +80 -0
  435. package/src/menu-item/types.ts +3 -2
  436. package/src/menu-items-choice/stories/index.story.tsx +4 -6
  437. package/src/mobile/link-settings/link-settings-navigation.native.js +1 -1
  438. package/src/modal/stories/index.story.tsx +5 -10
  439. package/src/navigable-container/stories/navigable-menu.story.tsx +3 -3
  440. package/src/navigable-container/stories/tabbable-container.story.tsx +3 -3
  441. package/src/navigation/index.tsx +0 -1
  442. package/src/navigation/stories/index.story.tsx +16 -2
  443. package/src/navigation/stories/utils/controlled-state.tsx +2 -2
  444. package/src/navigation/stories/utils/default.tsx +2 -2
  445. package/src/navigation/stories/utils/group.tsx +2 -2
  446. package/src/navigation/stories/utils/hide-if-empty.tsx +2 -2
  447. package/src/navigation/stories/utils/more-examples.tsx +2 -2
  448. package/src/navigation/stories/utils/search.tsx +2 -2
  449. package/src/navigator/navigator-provider/component.tsx +0 -1
  450. package/src/navigator/stories/index.story.tsx +9 -10
  451. package/src/notice/stories/index.story.tsx +6 -6
  452. package/src/number-control/stories/index.story.tsx +3 -3
  453. package/src/palette-edit/stories/index.story.tsx +3 -3
  454. package/src/palette-edit/styles.js +0 -1
  455. package/src/panel/stories/index.story.tsx +9 -11
  456. package/src/placeholder/stories/index.story.tsx +4 -6
  457. package/src/popover/README.md +2 -2
  458. package/src/popover/index.tsx +69 -103
  459. package/src/popover/overlay-middlewares.tsx +2 -2
  460. package/src/popover/stories/index.story.tsx +8 -10
  461. package/src/popover/test/index.tsx +15 -1
  462. package/src/popover/types.ts +6 -0
  463. package/src/popover/utils.ts +5 -56
  464. package/src/progress-bar/stories/index.story.tsx +4 -6
  465. package/src/progress-bar/styles.ts +4 -1
  466. package/src/query-controls/stories/index.story.tsx +5 -6
  467. package/src/radio-control/stories/index.story.tsx +4 -6
  468. package/src/radio-group/stories/index.story.js +1 -0
  469. package/src/range-control/stories/index.story.tsx +12 -18
  470. package/src/resizable-box/stories/index.story.tsx +3 -3
  471. package/src/responsive-wrapper/stories/index.story.tsx +4 -5
  472. package/src/sandbox/stories/index.story.tsx +3 -5
  473. package/src/scroll-lock/stories/index.story.tsx +3 -3
  474. package/src/scrollable/stories/index.story.tsx +4 -4
  475. package/src/search-control/index.native.js +39 -27
  476. package/src/search-control/stories/index.story.tsx +3 -3
  477. package/src/select-control/stories/index.story.tsx +3 -3
  478. package/src/shortcut/index.tsx +13 -0
  479. package/src/shortcut/stories/index.story.tsx +33 -0
  480. package/src/slot-fill/README.md +5 -5
  481. package/src/slot-fill/bubbles-virtually/slot-fill-context.js +3 -0
  482. package/src/slot-fill/bubbles-virtually/slot.js +17 -5
  483. package/src/slot-fill/index.js +6 -1
  484. package/src/slot-fill/stories/index.story.js +2 -0
  485. package/src/slot-fill/test/__snapshots__/slot.js.snap +12 -4
  486. package/src/snackbar/stories/index.story.tsx +10 -13
  487. package/src/snackbar/stories/list.story.tsx +3 -3
  488. package/src/spacer/stories/index.story.tsx +4 -4
  489. package/src/spinner/index.tsx +0 -1
  490. package/src/spinner/stories/index.story.tsx +5 -5
  491. package/src/surface/stories/index.story.tsx +4 -4
  492. package/src/tab-panel/stories/index.story.tsx +5 -13
  493. package/src/tab-panel/test/index.tsx +9 -25
  494. package/src/text-control/stories/index.story.tsx +7 -6
  495. package/src/text-highlight/stories/index.story.tsx +4 -6
  496. package/src/textarea-control/stories/index.story.tsx +4 -6
  497. package/src/theme/index.tsx +0 -1
  498. package/src/theme/stories/index.story.tsx +5 -5
  499. package/src/tip/stories/index.story.tsx +4 -4
  500. package/src/toggle-control/stories/index.story.tsx +3 -3
  501. package/src/toggle-group-control/stories/index.story.tsx +17 -11
  502. package/src/toolbar/stories/index.story.tsx +13 -3
  503. package/src/tools-panel/stories/index.story.tsx +17 -12
  504. package/src/tools-panel/tools-panel/component.tsx +0 -1
  505. package/src/tools-panel/tools-panel-header/component.tsx +3 -0
  506. package/src/tree-grid/stories/index.story.tsx +5 -3
  507. package/src/tree-select/index.tsx +0 -1
  508. package/src/tree-select/stories/index.story.tsx +3 -3
  509. package/src/truncate/stories/index.story.tsx +5 -7
  510. package/src/unit-control/index.tsx +0 -1
  511. package/src/unit-control/stories/index.story.tsx +10 -9
  512. package/src/utils/hooks/use-cx.ts +2 -1
  513. package/src/v-stack/stories/e2e/index.story.tsx +4 -4
  514. package/src/v-stack/stories/index.story.tsx +3 -3
  515. package/src/view/component.tsx +0 -1
  516. package/src/view/stories/index.story.tsx +4 -4
  517. package/src/visually-hidden/stories/index.story.tsx +7 -7
  518. package/src/z-stack/stories/index.story.tsx +4 -4
  519. package/tsconfig.tsbuildinfo +1 -1
  520. package/build/popover/limit-shift.js +0 -129
  521. package/build/popover/limit-shift.js.map +0 -1
  522. package/build-module/popover/limit-shift.js +0 -122
  523. package/build-module/popover/limit-shift.js.map +0 -1
  524. package/build-types/popover/limit-shift.d.ts +0 -87
  525. package/build-types/popover/limit-shift.d.ts.map +0 -1
  526. package/src/popover/limit-shift.ts +0 -205
package/CHANGELOG.md CHANGED
@@ -2,9 +2,29 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 26.0.0-next.0 (2023-09-01)
6
+
7
+ ### Breaking changes
8
+
9
+ - Make the `Popover.Slot` optional and render popovers at the bottom of the document's body by default. ([#53889](https://github.com/WordPress/gutenberg/pull/53889), [#53982](https://github.com/WordPress/gutenberg/pull/53982)).
10
+
11
+ ## 25.7.0 (2023-08-31)
12
+
13
+ ### Enhancements
14
+
15
+ - `ProgressBar`: Add transition to determinate indicator ([#53877](https://github.com/WordPress/gutenberg/pull/53877)).
16
+ - Prevent nested `SlotFillProvider` from rendering ([#53940](https://github.com/WordPress/gutenberg/pull/53940)).
17
+
5
18
  ### Bug Fix
6
19
 
7
20
  - `SandBox`: Fix the cleanup method in useEffect ([#53796](https://github.com/WordPress/gutenberg/pull/53796)).
21
+ - `PaletteEdit`: Fix the height of the `PaletteItems`. Don't rely on styles only present in the block editor ([#54000](https://github.com/WordPress/gutenberg/pull/54000)).
22
+
23
+ ### Internal
24
+
25
+ - `Shortcut`: Add Storybook stories ([#53627](https://github.com/WordPress/gutenberg/pull/53627)).
26
+ - `SlotFill`: Do not render children when using `<Slot bubblesVirtually />`. ([#53272](https://github.com/WordPress/gutenberg/pull/53272))
27
+ - Update `@floating-ui/react-dom` to the latest version ([#46845](https://github.com/WordPress/gutenberg/pull/46845)).
8
28
 
9
29
  ## 25.6.0 (2023-08-16)
10
30
 
@@ -29,6 +49,7 @@
29
49
 
30
50
  - `ControlGroup`, `FormGroup`, `ControlLabel`, `Spinner`: Remove unused `ui/` components from the codebase ([#52953](https://github.com/WordPress/gutenberg/pull/52953)).
31
51
  - `MenuItem`: Convert to TypeScript ([#53132](https://github.com/WordPress/gutenberg/pull/53132)).
52
+ - `MenuItem`: Add Storybook stories ([#53613](https://github.com/WordPress/gutenberg/pull/53613)).
32
53
  - `MenuGroup`: Add Storybook stories ([#53090](https://github.com/WordPress/gutenberg/pull/53090)).
33
54
  - Components: Remove unnecessary utils ([#53679](https://github.com/WordPress/gutenberg/pull/53679)).
34
55
 
@@ -42,7 +63,6 @@
42
63
 
43
64
  - `ColorPalette`, `BorderControl`: Don't hyphenate hex value in `aria-label` ([#52932](https://github.com/WordPress/gutenberg/pull/52932)).
44
65
  - `MenuItemsChoice`, `MenuItem`: Support a `disabled` prop on a menu item ([#52737](https://github.com/WordPress/gutenberg/pull/52737)).
45
- - `TabPanel`: Introduce a new version of `TabPanel` with updated internals and improved adherence to ARIA guidance on `tabpanel` focus behavior while maintaining the same functionality and API surface.([#52133](https://github.com/WordPress/gutenberg/pull/52133)).
46
66
 
47
67
  ### Bug Fix
48
68
 
package/CONTRIBUTING.md CHANGED
@@ -619,7 +619,7 @@ Given a component folder (e.g. `packages/components/src/unit-control`):
619
619
  3. Rewrite the `meta` story object, and export it as default. In particular, make sure you add the following settings under the `parameters` key:
620
620
 
621
621
  ```tsx
622
- const meta: ComponentMeta< typeof MyComponent > = {
622
+ const meta: Meta< typeof MyComponent > = {
623
623
  parameters: {
624
624
  controls: { expanded: true },
625
625
  docs: { canvas: { sourceState: 'shown' } },
package/README.md CHANGED
@@ -33,14 +33,9 @@ In non-WordPress projects, link to the `build-style/style.css` file directly, it
33
33
 
34
34
  _If you're using [`Popover`](/packages/components/src/popover/README.md) or [`Tooltip`](/packages/components/src/tooltip/README.md) components outside of the editor, make sure they are rendered within a `SlotFillProvider` and with a `Popover.Slot` somewhere up the element tree._
35
35
 
36
- By default, the `Popover` component will render inline i.e. within its
37
- parent to which it should anchor. Depending upon the context in which the
38
- `Popover` is being consumed, this might lead to incorrect positioning. For
39
- example, when being nested within another popover.
40
-
41
- This issue can be solved by rendering popovers to a specific location in the DOM via the
42
- `Popover.Slot`. For this to work, you will need your use of the `Popover`
43
- component and its `Slot` to be wrapped in a [`SlotFill`](/packages/components/src/slot-fill/README.md) provider.
36
+ By default, the `Popover` component will render within an extra element appended to the body of the document.
37
+
38
+ If you want to precisely contol where the popovers render, you will need to use the `Popover.Slot` component.
44
39
 
45
40
  A `Popover` is also used as the underlying mechanism to display `Tooltip` components.
46
41
  So the same considerations should be applied to them.
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _element = require("@wordpress/element");
9
+ var _reactNative = require("react-native");
10
+ var _huePicker = _interopRequireDefault(require("./hue-picker"));
11
+ var _saturationPicker = _interopRequireDefault(require("./saturation-picker"));
12
+ var _styleNative = _interopRequireDefault(require("./style.native.scss"));
13
+ /**
14
+ * External dependencies
15
+ */
16
+
17
+ /**
18
+ * WordPress dependencies
19
+ */
20
+
21
+ /**
22
+ * Internal dependencies
23
+ */
24
+
25
+ const HsvColorPicker = props => {
26
+ const maxWidth = _reactNative.Dimensions.get('window').width - 32;
27
+ const satValPickerRef = (0, _element.useRef)(null);
28
+ const {
29
+ containerStyle = {},
30
+ currentColor,
31
+ huePickerContainerStyle = {},
32
+ huePickerBorderRadius = 0,
33
+ huePickerHue = 0,
34
+ huePickerBarWidth = maxWidth,
35
+ huePickerBarHeight = 12,
36
+ huePickerSliderSize = 24,
37
+ onHuePickerDragStart,
38
+ onHuePickerDragMove,
39
+ onHuePickerDragEnd,
40
+ onHuePickerDragTerminate,
41
+ onHuePickerPress,
42
+ satValPickerContainerStyle = {},
43
+ satValPickerBorderRadius = 0,
44
+ satValPickerSize = {
45
+ width: maxWidth,
46
+ height: 200
47
+ },
48
+ satValPickerSliderSize = 24,
49
+ satValPickerHue = 0,
50
+ satValPickerSaturation = 1,
51
+ satValPickerValue = 1,
52
+ onSatValPickerDragStart,
53
+ onSatValPickerDragMove,
54
+ onSatValPickerDragEnd,
55
+ onSatValPickerDragTerminate,
56
+ onSatValPickerPress
57
+ } = props;
58
+ return (0, _element.createElement)(_reactNative.View, {
59
+ style: [_styleNative.default['hsv-container'], containerStyle],
60
+ testID: "hsv-color-picker"
61
+ }, (0, _element.createElement)(_saturationPicker.default, {
62
+ containerStyle: satValPickerContainerStyle,
63
+ currentColor: currentColor,
64
+ borderRadius: satValPickerBorderRadius,
65
+ size: satValPickerSize,
66
+ sliderSize: satValPickerSliderSize,
67
+ hue: satValPickerHue,
68
+ saturation: satValPickerSaturation,
69
+ value: satValPickerValue,
70
+ onDragStart: onSatValPickerDragStart,
71
+ onDragMove: onSatValPickerDragMove,
72
+ onDragEnd: onSatValPickerDragEnd,
73
+ onDragTerminate: onSatValPickerDragTerminate,
74
+ onPress: onSatValPickerPress,
75
+ ref: satValPickerRef
76
+ }), (0, _element.createElement)(_huePicker.default, {
77
+ containerStyle: huePickerContainerStyle,
78
+ borderRadius: huePickerBorderRadius,
79
+ hue: huePickerHue,
80
+ barWidth: huePickerBarWidth,
81
+ barHeight: huePickerBarHeight,
82
+ sliderSize: huePickerSliderSize,
83
+ onDragStart: onHuePickerDragStart,
84
+ onDragMove: onHuePickerDragMove,
85
+ onDragEnd: onHuePickerDragEnd,
86
+ onDragTerminate: onHuePickerDragTerminate,
87
+ onPress: onHuePickerPress
88
+ }));
89
+ };
90
+ var _default = HsvColorPicker;
91
+ exports.default = _default;
92
+ //# sourceMappingURL=hsv-color-picker.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_element","require","_reactNative","_huePicker","_interopRequireDefault","_saturationPicker","_styleNative","HsvColorPicker","props","maxWidth","Dimensions","get","width","satValPickerRef","useRef","containerStyle","currentColor","huePickerContainerStyle","huePickerBorderRadius","huePickerHue","huePickerBarWidth","huePickerBarHeight","huePickerSliderSize","onHuePickerDragStart","onHuePickerDragMove","onHuePickerDragEnd","onHuePickerDragTerminate","onHuePickerPress","satValPickerContainerStyle","satValPickerBorderRadius","satValPickerSize","height","satValPickerSliderSize","satValPickerHue","satValPickerSaturation","satValPickerValue","onSatValPickerDragStart","onSatValPickerDragMove","onSatValPickerDragEnd","onSatValPickerDragTerminate","onSatValPickerPress","createElement","View","style","styles","testID","default","borderRadius","size","sliderSize","hue","saturation","value","onDragStart","onDragMove","onDragEnd","onDragTerminate","onPress","ref","barWidth","barHeight","_default","exports"],"sources":["@wordpress/components/src/color-picker/hsv-color-picker.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, Dimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport HuePicker from './hue-picker';\nimport SaturationValuePicker from './saturation-picker';\nimport styles from './style.native.scss';\n\nconst HsvColorPicker = ( props ) => {\n\tconst maxWidth = Dimensions.get( 'window' ).width - 32;\n\tconst satValPickerRef = useRef( null );\n\n\tconst {\n\t\tcontainerStyle = {},\n\t\tcurrentColor,\n\t\thuePickerContainerStyle = {},\n\t\thuePickerBorderRadius = 0,\n\t\thuePickerHue = 0,\n\t\thuePickerBarWidth = maxWidth,\n\t\thuePickerBarHeight = 12,\n\t\thuePickerSliderSize = 24,\n\t\tonHuePickerDragStart,\n\t\tonHuePickerDragMove,\n\t\tonHuePickerDragEnd,\n\t\tonHuePickerDragTerminate,\n\t\tonHuePickerPress,\n\t\tsatValPickerContainerStyle = {},\n\t\tsatValPickerBorderRadius = 0,\n\t\tsatValPickerSize = { width: maxWidth, height: 200 },\n\t\tsatValPickerSliderSize = 24,\n\t\tsatValPickerHue = 0,\n\t\tsatValPickerSaturation = 1,\n\t\tsatValPickerValue = 1,\n\t\tonSatValPickerDragStart,\n\t\tonSatValPickerDragMove,\n\t\tonSatValPickerDragEnd,\n\t\tonSatValPickerDragTerminate,\n\t\tonSatValPickerPress,\n\t} = props;\n\n\treturn (\n\t\t<View\n\t\t\tstyle={ [ styles[ 'hsv-container' ], containerStyle ] }\n\t\t\ttestID=\"hsv-color-picker\"\n\t\t>\n\t\t\t<SaturationValuePicker\n\t\t\t\tcontainerStyle={ satValPickerContainerStyle }\n\t\t\t\tcurrentColor={ currentColor }\n\t\t\t\tborderRadius={ satValPickerBorderRadius }\n\t\t\t\tsize={ satValPickerSize }\n\t\t\t\tsliderSize={ satValPickerSliderSize }\n\t\t\t\thue={ satValPickerHue }\n\t\t\t\tsaturation={ satValPickerSaturation }\n\t\t\t\tvalue={ satValPickerValue }\n\t\t\t\tonDragStart={ onSatValPickerDragStart }\n\t\t\t\tonDragMove={ onSatValPickerDragMove }\n\t\t\t\tonDragEnd={ onSatValPickerDragEnd }\n\t\t\t\tonDragTerminate={ onSatValPickerDragTerminate }\n\t\t\t\tonPress={ onSatValPickerPress }\n\t\t\t\tref={ satValPickerRef }\n\t\t\t/>\n\t\t\t<HuePicker\n\t\t\t\tcontainerStyle={ huePickerContainerStyle }\n\t\t\t\tborderRadius={ huePickerBorderRadius }\n\t\t\t\thue={ huePickerHue }\n\t\t\t\tbarWidth={ huePickerBarWidth }\n\t\t\t\tbarHeight={ huePickerBarHeight }\n\t\t\t\tsliderSize={ huePickerSliderSize }\n\t\t\t\tonDragStart={ onHuePickerDragStart }\n\t\t\t\tonDragMove={ onHuePickerDragMove }\n\t\t\t\tonDragEnd={ onHuePickerDragEnd }\n\t\t\t\tonDragTerminate={ onHuePickerDragTerminate }\n\t\t\t\tonPress={ onHuePickerPress }\n\t\t\t/>\n\t\t</View>\n\t);\n};\n\nexport default HsvColorPicker;\n"],"mappings":";;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AALA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,YAAA,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lB,wBAA0B;IACzCmB,IAAI,EAAGlB,gBAAkB;IACzBmB,UAAU,EAAGjB,sBAAwB;IACrCkB,GAAG,EAAGjB,eAAiB;IACvBkB,UAAU,EAAGjB,sBAAwB;IACrCkB,KAAK,EAAGjB,iBAAmB;IAC3BkB,WAAW,EAAGjB,uBAAyB;IACvCkB,UAAU,EAAGjB,sBAAwB;IACrCkB,SAAS,EAAGjB,qBAAuB;IACnCkB,eAAe,EAAGjB,2BAA6B;IAC/CkB,OAAO,EAAGjB,mBAAqB;IAC/BkB,GAAG,EAAG7C;EAAiB,CACvB,CAAC,EACF,IAAAb,QAAA,CAAAyC,aAAA,EAACtC,UAAA,CAAA2C,OAAS;IACT/B,cAAc,EAAGE,uBAAyB;IAC1C8B,YAAY,EAAG7B,qBAAuB;IACtCgC,GAAG,EAAG/B,YAAc;IACpBwC,QAAQ,EAAGvC,iBAAmB;IAC9BwC,SAAS,EAAGvC,kBAAoB;IAChC4B,UAAU,EAAG3B,mBAAqB;IAClC+B,WAAW,EAAG9B,oBAAsB;IACpC+B,UAAU,EAAG9B,mBAAqB;IAClC+B,SAAS,EAAG9B,kBAAoB;IAChC+B,eAAe,EAAG9B,wBAA0B;IAC5C+B,OAAO,EAAG9B;EAAkB,CAC5B,CACI,CAAC;AAET,CAAC;AAAC,IAAAkC,QAAA,GAEatD,cAAc;AAAAuD,OAAA,CAAAhB,OAAA,GAAAe,QAAA"}
@@ -0,0 +1,195 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _element = _interopRequireWildcard(require("@wordpress/element"));
9
+ var _reactNative = require("react-native");
10
+ var _reactNativeLinearGradient = _interopRequireDefault(require("react-native-linear-gradient"));
11
+ var _style = _interopRequireDefault(require("./style.scss"));
12
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
+ /**
15
+ * External dependencies
16
+ */
17
+
18
+ /**
19
+ * WordPress dependencies
20
+ */
21
+
22
+ /**
23
+ * Internal dependencies
24
+ */
25
+
26
+ class HuePicker extends _element.Component {
27
+ constructor(props) {
28
+ super(props);
29
+ this.hueColors = ['#ff0000', '#ffff00', '#00ff00', '#00ffff', '#0000ff', '#ff00ff', '#ff0000'];
30
+ this.sliderX = new _reactNative.Animated.Value(props.barHeight * props.hue / 360);
31
+ this.panResponder = _reactNative.PanResponder.create({
32
+ onStartShouldSetPanResponder: () => true,
33
+ onStartShouldSetPanResponderCapture: () => true,
34
+ onMoveShouldSetPanResponder: () => true,
35
+ onMoveShouldSetPanResponderCapture: () => true,
36
+ onPanResponderGrant: (evt, gestureState) => {
37
+ const {
38
+ onPress
39
+ } = this.props;
40
+ this.dragStartValue = this.computeHueValuePress(evt);
41
+ if (onPress) {
42
+ onPress({
43
+ hue: this.computeHueValuePress(evt),
44
+ nativeEvent: evt.nativeEvent
45
+ });
46
+ }
47
+ this.fireDragEvent('onDragStart', gestureState);
48
+ },
49
+ onPanResponderMove: (evt, gestureState) => {
50
+ this.fireDragEvent('onDragMove', gestureState);
51
+ },
52
+ onPanResponderTerminationRequest: () => true,
53
+ onPanResponderRelease: (evt, gestureState) => {
54
+ this.fireDragEvent('onDragEnd', gestureState);
55
+ },
56
+ onPanResponderTerminate: (evt, gestureState) => {
57
+ this.fireDragEvent('onDragTerminate', gestureState);
58
+ },
59
+ onShouldBlockNativeResponder: () => true
60
+ });
61
+ }
62
+ componentDidUpdate(prevProps) {
63
+ const {
64
+ hue = 0,
65
+ barWidth = 200,
66
+ sliderSize = 24
67
+ } = this.props;
68
+ const borderWidth = sliderSize / 10;
69
+ if (prevProps.hue !== hue || prevProps.barWidth !== barWidth) {
70
+ this.sliderX.setValue((barWidth - sliderSize + borderWidth) * hue / 360);
71
+ }
72
+ }
73
+ normalizeValue(value) {
74
+ if (value < 0) return 0;
75
+ if (value > 1) return 1;
76
+ return value;
77
+ }
78
+ getContainerStyle() {
79
+ const {
80
+ sliderSize = 24,
81
+ barHeight = 12,
82
+ containerStyle = {}
83
+ } = this.props;
84
+ const paddingLeft = sliderSize / 2;
85
+ const paddingTop = sliderSize - barHeight > 0 ? (sliderSize - barHeight) / 2 : 0;
86
+ return [_style.default['hsv-container'], containerStyle, {
87
+ paddingTop,
88
+ paddingBottom: paddingTop,
89
+ paddingLeft,
90
+ paddingRight: paddingLeft
91
+ }];
92
+ }
93
+ computeHueValueDrag(gestureState) {
94
+ const {
95
+ dx
96
+ } = gestureState;
97
+ const {
98
+ barWidth = 200
99
+ } = this.props;
100
+ const {
101
+ dragStartValue
102
+ } = this;
103
+ const diff = dx / barWidth;
104
+ const updatedHue = this.normalizeValue(dragStartValue / 360 + diff) * 360;
105
+ return updatedHue;
106
+ }
107
+ computeHueValuePress(event) {
108
+ const {
109
+ nativeEvent
110
+ } = event;
111
+ const {
112
+ locationX
113
+ } = nativeEvent;
114
+ const {
115
+ barWidth = 200
116
+ } = this.props;
117
+ const updatedHue = this.normalizeValue(locationX / barWidth) * 360;
118
+ return updatedHue;
119
+ }
120
+ fireDragEvent(eventName, gestureState) {
121
+ const {
122
+ [eventName]: event
123
+ } = this.props;
124
+ if (event) {
125
+ event({
126
+ hue: this.computeHueValueDrag(gestureState),
127
+ gestureState
128
+ });
129
+ }
130
+ }
131
+ firePressEvent(event) {
132
+ const {
133
+ onPress
134
+ } = this.props;
135
+ if (onPress) {
136
+ onPress({
137
+ hue: this.computeHueValuePress(event),
138
+ nativeEvent: event.nativeEvent
139
+ });
140
+ }
141
+ }
142
+ render() {
143
+ const {
144
+ hueColors
145
+ } = this;
146
+ const {
147
+ sliderSize = 24,
148
+ barWidth = 200,
149
+ barHeight = 12,
150
+ borderRadius = 0
151
+ } = this.props;
152
+ const borderWidth = sliderSize / 10;
153
+ return (0, _element.createElement)(_reactNative.View, {
154
+ style: this.getContainerStyle(),
155
+ ...this.panResponder.panHandlers,
156
+ hitSlop: {
157
+ top: 10,
158
+ bottom: 10,
159
+ left: 0,
160
+ right: 0
161
+ }
162
+ }, (0, _element.createElement)(_reactNativeLinearGradient.default, {
163
+ colors: hueColors,
164
+ style: {
165
+ borderRadius
166
+ },
167
+ start: {
168
+ x: 0,
169
+ y: 0
170
+ },
171
+ end: {
172
+ x: 1,
173
+ y: 0
174
+ }
175
+ }, (0, _element.createElement)(_reactNative.View, {
176
+ style: {
177
+ width: barWidth,
178
+ height: barHeight
179
+ }
180
+ })), (0, _element.createElement)(_reactNative.Animated.View, {
181
+ pointerEvents: "none",
182
+ style: [_style.default['hue-slider'], {
183
+ width: sliderSize,
184
+ height: sliderSize,
185
+ left: (sliderSize - borderWidth) / 2,
186
+ borderRadius: sliderSize / 2,
187
+ transform: [{
188
+ translateX: this.sliderX
189
+ }]
190
+ }]
191
+ }));
192
+ }
193
+ }
194
+ exports.default = HuePicker;
195
+ //# sourceMappingURL=hue-picker.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_element","_interopRequireWildcard","require","_reactNative","_reactNativeLinearGradient","_interopRequireDefault","_style","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","HuePicker","Component","constructor","props","hueColors","sliderX","Animated","Value","barHeight","hue","panResponder","PanResponder","create","onStartShouldSetPanResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponder","onMoveShouldSetPanResponderCapture","onPanResponderGrant","evt","gestureState","onPress","dragStartValue","computeHueValuePress","nativeEvent","fireDragEvent","onPanResponderMove","onPanResponderTerminationRequest","onPanResponderRelease","onPanResponderTerminate","onShouldBlockNativeResponder","componentDidUpdate","prevProps","barWidth","sliderSize","borderWidth","setValue","normalizeValue","value","getContainerStyle","containerStyle","paddingLeft","paddingTop","styles","paddingBottom","paddingRight","computeHueValueDrag","dx","diff","updatedHue","event","locationX","eventName","firePressEvent","render","borderRadius","createElement","View","style","panHandlers","hitSlop","top","bottom","left","right","colors","start","x","y","end","width","height","pointerEvents","transform","translateX","exports"],"sources":["@wordpress/components/src/color-picker/hue-picker.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Animated, View, PanResponder } from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\n\n/**\n * WordPress dependencies\n */\nimport React, { Component } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport default class HuePicker extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.hueColors = [\n\t\t\t'#ff0000',\n\t\t\t'#ffff00',\n\t\t\t'#00ff00',\n\t\t\t'#00ffff',\n\t\t\t'#0000ff',\n\t\t\t'#ff00ff',\n\t\t\t'#ff0000',\n\t\t];\n\t\tthis.sliderX = new Animated.Value(\n\t\t\t( props.barHeight * props.hue ) / 360\n\t\t);\n\t\tthis.panResponder = PanResponder.create( {\n\t\t\tonStartShouldSetPanResponder: () => true,\n\t\t\tonStartShouldSetPanResponderCapture: () => true,\n\t\t\tonMoveShouldSetPanResponder: () => true,\n\t\t\tonMoveShouldSetPanResponderCapture: () => true,\n\t\t\tonPanResponderGrant: ( evt, gestureState ) => {\n\t\t\t\tconst { onPress } = this.props;\n\t\t\t\tthis.dragStartValue = this.computeHueValuePress( evt );\n\n\t\t\t\tif ( onPress ) {\n\t\t\t\t\tonPress( {\n\t\t\t\t\t\thue: this.computeHueValuePress( evt ),\n\t\t\t\t\t\tnativeEvent: evt.nativeEvent,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tthis.fireDragEvent( 'onDragStart', gestureState );\n\t\t\t},\n\t\t\tonPanResponderMove: ( evt, gestureState ) => {\n\t\t\t\tthis.fireDragEvent( 'onDragMove', gestureState );\n\t\t\t},\n\t\t\tonPanResponderTerminationRequest: () => true,\n\t\t\tonPanResponderRelease: ( evt, gestureState ) => {\n\t\t\t\tthis.fireDragEvent( 'onDragEnd', gestureState );\n\t\t\t},\n\t\t\tonPanResponderTerminate: ( evt, gestureState ) => {\n\t\t\t\tthis.fireDragEvent( 'onDragTerminate', gestureState );\n\t\t\t},\n\t\t\tonShouldBlockNativeResponder: () => true,\n\t\t} );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { hue = 0, barWidth = 200, sliderSize = 24 } = this.props;\n\t\tconst borderWidth = sliderSize / 10;\n\t\tif ( prevProps.hue !== hue || prevProps.barWidth !== barWidth ) {\n\t\t\tthis.sliderX.setValue(\n\t\t\t\t( ( barWidth - sliderSize + borderWidth ) * hue ) / 360\n\t\t\t);\n\t\t}\n\t}\n\n\tnormalizeValue( value ) {\n\t\tif ( value < 0 ) return 0;\n\t\tif ( value > 1 ) return 1;\n\t\treturn value;\n\t}\n\n\tgetContainerStyle() {\n\t\tconst {\n\t\t\tsliderSize = 24,\n\t\t\tbarHeight = 12,\n\t\t\tcontainerStyle = {},\n\t\t} = this.props;\n\t\tconst paddingLeft = sliderSize / 2;\n\t\tconst paddingTop =\n\t\t\tsliderSize - barHeight > 0 ? ( sliderSize - barHeight ) / 2 : 0;\n\t\treturn [\n\t\t\tstyles[ 'hsv-container' ],\n\t\t\tcontainerStyle,\n\t\t\t{\n\t\t\t\tpaddingTop,\n\t\t\t\tpaddingBottom: paddingTop,\n\t\t\t\tpaddingLeft,\n\t\t\t\tpaddingRight: paddingLeft,\n\t\t\t},\n\t\t];\n\t}\n\n\tcomputeHueValueDrag( gestureState ) {\n\t\tconst { dx } = gestureState;\n\t\tconst { barWidth = 200 } = this.props;\n\t\tconst { dragStartValue } = this;\n\t\tconst diff = dx / barWidth;\n\t\tconst updatedHue =\n\t\t\tthis.normalizeValue( dragStartValue / 360 + diff ) * 360;\n\t\treturn updatedHue;\n\t}\n\n\tcomputeHueValuePress( event ) {\n\t\tconst { nativeEvent } = event;\n\t\tconst { locationX } = nativeEvent;\n\t\tconst { barWidth = 200 } = this.props;\n\t\tconst updatedHue = this.normalizeValue( locationX / barWidth ) * 360;\n\t\treturn updatedHue;\n\t}\n\n\tfireDragEvent( eventName, gestureState ) {\n\t\tconst { [ eventName ]: event } = this.props;\n\t\tif ( event ) {\n\t\t\tevent( {\n\t\t\t\thue: this.computeHueValueDrag( gestureState ),\n\t\t\t\tgestureState,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfirePressEvent( event ) {\n\t\tconst { onPress } = this.props;\n\t\tif ( onPress ) {\n\t\t\tonPress( {\n\t\t\t\thue: this.computeHueValuePress( event ),\n\t\t\t\tnativeEvent: event.nativeEvent,\n\t\t\t} );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { hueColors } = this;\n\t\tconst {\n\t\t\tsliderSize = 24,\n\t\t\tbarWidth = 200,\n\t\t\tbarHeight = 12,\n\t\t\tborderRadius = 0,\n\t\t} = this.props;\n\t\tconst borderWidth = sliderSize / 10;\n\t\treturn (\n\t\t\t<View\n\t\t\t\tstyle={ this.getContainerStyle() }\n\t\t\t\t{ ...this.panResponder.panHandlers }\n\t\t\t\thitSlop={ {\n\t\t\t\t\ttop: 10,\n\t\t\t\t\tbottom: 10,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tright: 0,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<LinearGradient\n\t\t\t\t\tcolors={ hueColors }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t} }\n\t\t\t\t\tstart={ { x: 0, y: 0 } }\n\t\t\t\t\tend={ { x: 1, y: 0 } }\n\t\t\t\t>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\twidth: barWidth,\n\t\t\t\t\t\t\theight: barHeight,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</LinearGradient>\n\t\t\t\t<Animated.View\n\t\t\t\t\tpointerEvents=\"none\"\n\t\t\t\t\tstyle={ [\n\t\t\t\t\t\tstyles[ 'hue-slider' ],\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twidth: sliderSize,\n\t\t\t\t\t\t\theight: sliderSize,\n\t\t\t\t\t\t\tleft: ( sliderSize - borderWidth ) / 2,\n\t\t\t\t\t\t\tborderRadius: sliderSize / 2,\n\t\t\t\t\t\t\ttransform: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttranslateX: this.sliderX,\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/>\n\t\t\t</View>\n\t\t);\n\t}\n}\n"],"mappings":";;;;;;;AASA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AANA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAC,sBAAA,CAAAH,OAAA;AAUA,IAAAI,MAAA,GAAAD,sBAAA,CAAAH,OAAA;AAAkC,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAA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,OAAA,CAAAzF,OAAA,GAAAe,SAAA"}
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.ColorPicker = ColorPicker;
8
8
  var _element = require("@wordpress/element");
9
9
  var _reactNative = require("react-native");
10
- var _reactNativeHsvColorPicker = _interopRequireDefault(require("react-native-hsv-color-picker"));
11
10
  var _colord = require("colord");
12
11
  var _names = _interopRequireDefault(require("colord/plugins/names"));
13
12
  var _i18n = require("@wordpress/i18n");
@@ -15,6 +14,7 @@ var _components = require("@wordpress/components");
15
14
  var _compose = require("@wordpress/compose");
16
15
  var _icons = require("@wordpress/icons");
17
16
  var _style = _interopRequireDefault(require("./style.scss"));
17
+ var _hsvColorPickerNative = _interopRequireDefault(require("./hsv-color-picker.native.js"));
18
18
  /**
19
19
  * External dependencies
20
20
  */
@@ -119,8 +119,9 @@ function ColorPicker({
119
119
  onBottomSheetClosed();
120
120
  }
121
121
  }
122
- return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_reactNativeHsvColorPicker.default, {
122
+ return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_hsvColorPickerNative.default, {
123
123
  huePickerHue: hue,
124
+ currentColor: currentColor,
124
125
  onHuePickerDragMove: updateColor,
125
126
  onHuePickerPress: !isBottomSheetContentScrolling && updateColor,
126
127
  satValPickerHue: hue,
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_reactNative","_reactNativeHsvColorPicker","_interopRequireDefault","_colord","_names","_i18n","_components","_compose","_icons","_style","extend","namesPlugin","ColorPicker","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","setColor","activeColor","isGradientColor","onNavigationBack","onHandleClosingBottomSheet","onBottomSheetClosed","onHandleHardwareButtonPress","bottomLabelText","isIOS","Platform","OS","hitSlop","top","bottom","left","right","h","initH","s","initS","v","initV","colord","toHsv","hue","setHue","useState","sat","setSaturation","val","setValue","savedColor","paddingLeft","spacing","height","pickerHeight","borderRadius","styles","picker","pickerPointerSize","pickerPointer","pickerWidth","BottomSheet","getWidth","applyButtonStyle","usePreferredColorSchemeStyle","applyButton","applyButtonDark","cancelButtonStyle","cancelButton","cancelButtonDark","colorTextStyle","colorText","colorTextDark","selectColorTextStyle","selectColorText","selectColorTextDark","footerStyle","footer","footerDark","combineToHex","toHex","currentColor","updateColor","saturation","value","undefined","useEffect","onButtonPress","action","createElement","Fragment","default","huePickerHue","onHuePickerDragMove","onHuePickerPress","satValPickerHue","satValPickerSaturation","satValPickerValue","onSatValPickerDragMove","onSatValPickerPress","onSatValPickerDragStart","onSatValPickerDragEnd","onHuePickerDragStart","onHuePickerDragEnd","huePickerBarWidth","huePickerBarHeight","satValPickerSize","width","satValPickerSliderSize","satValPickerBorderRadius","huePickerBorderRadius","View","style","TouchableWithoutFeedback","onPress","Text","__","Icon","icon","close","size","selectable","toUpperCase","check"],"sources":["@wordpress/components/src/color-picker/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, Text, TouchableWithoutFeedback, Platform } from 'react-native';\nimport HsvColorPicker from 'react-native-hsv-color-picker';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { BottomSheet } from '@wordpress/components';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { Icon, check, close } from '@wordpress/icons';\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nextend( [ namesPlugin ] );\n\nfunction ColorPicker( {\n\tshouldEnableBottomSheetScroll,\n\tshouldEnableBottomSheetMaxHeight,\n\tisBottomSheetContentScrolling,\n\tsetColor,\n\tactiveColor,\n\tisGradientColor,\n\tonNavigationBack,\n\tonHandleClosingBottomSheet,\n\tonBottomSheetClosed,\n\tonHandleHardwareButtonPress,\n\tbottomLabelText,\n} ) {\n\tconst isIOS = Platform.OS === 'ios';\n\tconst hitSlop = { top: 22, bottom: 22, left: 22, right: 22 };\n\tconst {\n\t\th: initH,\n\t\ts: initS,\n\t\tv: initV,\n\t} = ! isGradientColor && activeColor\n\t\t? colord( activeColor ).toHsv()\n\t\t: { h: 0, s: 50, v: 50 };\n\tconst [ hue, setHue ] = useState( initH );\n\tconst [ sat, setSaturation ] = useState( initS / 100 );\n\tconst [ val, setValue ] = useState( initV / 100 );\n\tconst [ savedColor ] = useState( activeColor );\n\n\tconst {\n\t\tpaddingLeft: spacing,\n\t\theight: pickerHeight,\n\t\tborderRadius,\n\t} = styles.picker;\n\tconst { height: pickerPointerSize } = styles.pickerPointer;\n\tconst pickerWidth = BottomSheet.getWidth() - 2 * spacing;\n\n\tconst applyButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.applyButton,\n\t\tstyles.applyButtonDark\n\t);\n\tconst cancelButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.cancelButton,\n\t\tstyles.cancelButtonDark\n\t);\n\tconst colorTextStyle = usePreferredColorSchemeStyle(\n\t\tstyles.colorText,\n\t\tstyles.colorTextDark\n\t);\n\tconst selectColorTextStyle = usePreferredColorSchemeStyle(\n\t\tstyles.selectColorText,\n\t\tstyles.selectColorTextDark\n\t);\n\tconst footerStyle = usePreferredColorSchemeStyle(\n\t\tstyles.footer,\n\t\tstyles.footerDark\n\t);\n\n\tconst combineToHex = ( h = hue, s = sat, v = val ) =>\n\t\tcolord( { h, s: s * 100, v: v * 100 } ).toHex();\n\n\tconst currentColor = combineToHex();\n\n\tconst updateColor = ( { hue: h, saturation: s, value: v } ) => {\n\t\tif ( h !== undefined ) setHue( h );\n\t\tif ( s !== undefined ) setSaturation( s );\n\t\tif ( v !== undefined ) setValue( v );\n\t\tsetColor( combineToHex( h, s, v ) );\n\t};\n\n\tuseEffect( () => {\n\t\tshouldEnableBottomSheetMaxHeight( false );\n\t\tonHandleClosingBottomSheet( () => {\n\t\t\tif ( savedColor ) {\n\t\t\t\tsetColor( savedColor );\n\t\t\t}\n\t\t\tif ( onBottomSheetClosed ) {\n\t\t\t\tonBottomSheetClosed();\n\t\t\t}\n\t\t} );\n\t\tif ( onHandleHardwareButtonPress ) {\n\t\t\tonHandleHardwareButtonPress( onButtonPress );\n\t\t}\n\t\t// TODO: Revisit this to discover if there's a good reason for omitting\n\t\t// the hook’s dependencies and running it a single time. Ideally there\n\t\t// may be a way to refactor and obviate the disabled lint rule. If not,\n\t\t// this comment should be replaced by one that explains the reasoning.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tfunction onButtonPress( action ) {\n\t\tonNavigationBack();\n\t\tonHandleClosingBottomSheet( null );\n\t\tshouldEnableBottomSheetMaxHeight( true );\n\t\tsetColor( action === 'apply' ? currentColor : savedColor );\n\t\tif ( onBottomSheetClosed ) {\n\t\t\tonBottomSheetClosed();\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<HsvColorPicker\n\t\t\t\thuePickerHue={ hue }\n\t\t\t\tonHuePickerDragMove={ updateColor }\n\t\t\t\tonHuePickerPress={\n\t\t\t\t\t! isBottomSheetContentScrolling && updateColor\n\t\t\t\t}\n\t\t\t\tsatValPickerHue={ hue }\n\t\t\t\tsatValPickerSaturation={ sat }\n\t\t\t\tsatValPickerValue={ val }\n\t\t\t\tonSatValPickerDragMove={ updateColor }\n\t\t\t\tonSatValPickerPress={\n\t\t\t\t\t! isBottomSheetContentScrolling && updateColor\n\t\t\t\t}\n\t\t\t\tonSatValPickerDragStart={ () => {\n\t\t\t\t\tshouldEnableBottomSheetScroll( false );\n\t\t\t\t} }\n\t\t\t\tonSatValPickerDragEnd={ () =>\n\t\t\t\t\tshouldEnableBottomSheetScroll( true )\n\t\t\t\t}\n\t\t\t\tonHuePickerDragStart={ () =>\n\t\t\t\t\tshouldEnableBottomSheetScroll( false )\n\t\t\t\t}\n\t\t\t\tonHuePickerDragEnd={ () =>\n\t\t\t\t\tshouldEnableBottomSheetScroll( true )\n\t\t\t\t}\n\t\t\t\thuePickerBarWidth={ pickerWidth }\n\t\t\t\thuePickerBarHeight={ pickerPointerSize / 2 }\n\t\t\t\tsatValPickerSize={ {\n\t\t\t\t\twidth: pickerWidth,\n\t\t\t\t\theight: pickerHeight,\n\t\t\t\t} }\n\t\t\t\tsatValPickerSliderSize={ pickerPointerSize * 2 }\n\t\t\t\tsatValPickerBorderRadius={ borderRadius }\n\t\t\t\thuePickerBorderRadius={ borderRadius }\n\t\t\t/>\n\t\t\t<View style={ footerStyle }>\n\t\t\t\t<TouchableWithoutFeedback\n\t\t\t\t\tonPress={ () => onButtonPress( 'cancel' ) }\n\t\t\t\t\thitSlop={ hitSlop }\n\t\t\t\t>\n\t\t\t\t\t<View>\n\t\t\t\t\t\t{ isIOS ? (\n\t\t\t\t\t\t\t<Text style={ cancelButtonStyle }>\n\t\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\tstyle={ cancelButtonStyle }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</View>\n\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t{ bottomLabelText ? (\n\t\t\t\t\t<Text style={ selectColorTextStyle }>\n\t\t\t\t\t\t{ bottomLabelText }\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Text style={ colorTextStyle } selectable>\n\t\t\t\t\t\t{ currentColor.toUpperCase() }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t\t<TouchableWithoutFeedback\n\t\t\t\t\tonPress={ () => onButtonPress( 'apply' ) }\n\t\t\t\t\thitSlop={ hitSlop }\n\t\t\t\t>\n\t\t\t\t\t<View>\n\t\t\t\t\t\t{ isIOS ? (\n\t\t\t\t\t\t\t<Text style={ applyButtonStyle }>\n\t\t\t\t\t\t\t\t{ __(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7B,IAAAqD,QAAE,EAAE,OAAQ,CACT,CAAC,GAEP,IAAAnH,QAAA,CAAAwF,aAAA,EAAC9E,MAAA,CAAA0G,IAAI;IACJC,IAAI,EAAGK,YAAO;IACdH,IAAI,EAAG,EAAI;IACXR,KAAK,EAAGjD;EAAkB,CAC1B,CAEG,CACmB,CACrB,CACL,CAAC;AAEL"}
1
+ {"version":3,"names":["_element","require","_reactNative","_colord","_names","_interopRequireDefault","_i18n","_components","_compose","_icons","_style","_hsvColorPickerNative","extend","namesPlugin","ColorPicker","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","setColor","activeColor","isGradientColor","onNavigationBack","onHandleClosingBottomSheet","onBottomSheetClosed","onHandleHardwareButtonPress","bottomLabelText","isIOS","Platform","OS","hitSlop","top","bottom","left","right","h","initH","s","initS","v","initV","colord","toHsv","hue","setHue","useState","sat","setSaturation","val","setValue","savedColor","paddingLeft","spacing","height","pickerHeight","borderRadius","styles","picker","pickerPointerSize","pickerPointer","pickerWidth","BottomSheet","getWidth","applyButtonStyle","usePreferredColorSchemeStyle","applyButton","applyButtonDark","cancelButtonStyle","cancelButton","cancelButtonDark","colorTextStyle","colorText","colorTextDark","selectColorTextStyle","selectColorText","selectColorTextDark","footerStyle","footer","footerDark","combineToHex","toHex","currentColor","updateColor","saturation","value","undefined","useEffect","onButtonPress","action","createElement","Fragment","default","huePickerHue","onHuePickerDragMove","onHuePickerPress","satValPickerHue","satValPickerSaturation","satValPickerValue","onSatValPickerDragMove","onSatValPickerPress","onSatValPickerDragStart","onSatValPickerDragEnd","onHuePickerDragStart","onHuePickerDragEnd","huePickerBarWidth","huePickerBarHeight","satValPickerSize","width","satValPickerSliderSize","satValPickerBorderRadius","huePickerBorderRadius","View","style","TouchableWithoutFeedback","onPress","Text","__","Icon","icon","close","size","selectable","toUpperCase","check"],"sources":["@wordpress/components/src/color-picker/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, Text, TouchableWithoutFeedback, Platform } from 'react-native';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { BottomSheet } from '@wordpress/components';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { Icon, check, close } from '@wordpress/icons';\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport HsvColorPicker from './hsv-color-picker.native.js';\n\nextend( [ namesPlugin ] );\n\nfunction ColorPicker( {\n\tshouldEnableBottomSheetScroll,\n\tshouldEnableBottomSheetMaxHeight,\n\tisBottomSheetContentScrolling,\n\tsetColor,\n\tactiveColor,\n\tisGradientColor,\n\tonNavigationBack,\n\tonHandleClosingBottomSheet,\n\tonBottomSheetClosed,\n\tonHandleHardwareButtonPress,\n\tbottomLabelText,\n} ) {\n\tconst isIOS = Platform.OS === 'ios';\n\tconst hitSlop = { top: 22, bottom: 22, left: 22, right: 22 };\n\tconst {\n\t\th: initH,\n\t\ts: initS,\n\t\tv: initV,\n\t} = ! isGradientColor && activeColor\n\t\t? colord( activeColor ).toHsv()\n\t\t: { h: 0, s: 50, v: 50 };\n\tconst [ hue, setHue ] = useState( initH );\n\tconst [ sat, setSaturation ] = useState( initS / 100 );\n\tconst [ val, setValue ] = useState( initV / 100 );\n\tconst [ savedColor ] = useState( activeColor );\n\n\tconst {\n\t\tpaddingLeft: spacing,\n\t\theight: pickerHeight,\n\t\tborderRadius,\n\t} = styles.picker;\n\tconst { height: pickerPointerSize } = styles.pickerPointer;\n\tconst pickerWidth = BottomSheet.getWidth() - 2 * spacing;\n\n\tconst applyButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.applyButton,\n\t\tstyles.applyButtonDark\n\t);\n\tconst cancelButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.cancelButton,\n\t\tstyles.cancelButtonDark\n\t);\n\tconst colorTextStyle = usePreferredColorSchemeStyle(\n\t\tstyles.colorText,\n\t\tstyles.colorTextDark\n\t);\n\tconst selectColorTextStyle = usePreferredColorSchemeStyle(\n\t\tstyles.selectColorText,\n\t\tstyles.selectColorTextDark\n\t);\n\tconst footerStyle = usePreferredColorSchemeStyle(\n\t\tstyles.footer,\n\t\tstyles.footerDark\n\t);\n\n\tconst combineToHex = ( h = hue, s = sat, v = val ) =>\n\t\tcolord( { h, s: s * 100, v: v * 100 } ).toHex();\n\n\tconst currentColor = combineToHex();\n\n\tconst updateColor = ( { hue: h, saturation: s, value: v } ) => {\n\t\tif ( h !== undefined ) setHue( h );\n\t\tif ( s !== undefined ) setSaturation( s );\n\t\tif ( v !== undefined ) setValue( v );\n\t\tsetColor( combineToHex( h, s, v ) );\n\t};\n\n\tuseEffect( () => {\n\t\tshouldEnableBottomSheetMaxHeight( false );\n\t\tonHandleClosingBottomSheet( () => {\n\t\t\tif ( savedColor ) {\n\t\t\t\tsetColor( savedColor );\n\t\t\t}\n\t\t\tif ( onBottomSheetClosed ) {\n\t\t\t\tonBottomSheetClosed();\n\t\t\t}\n\t\t} );\n\t\tif ( onHandleHardwareButtonPress ) {\n\t\t\tonHandleHardwareButtonPress( onButtonPress );\n\t\t}\n\t\t// TODO: Revisit this to discover if there's a good reason for omitting\n\t\t// the hook’s dependencies and running it a single time. Ideally there\n\t\t// may be a way to refactor and obviate the disabled lint rule. If not,\n\t\t// this comment should be replaced by one that explains the reasoning.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tfunction onButtonPress( action ) {\n\t\tonNavigationBack();\n\t\tonHandleClosingBottomSheet( null );\n\t\tshouldEnableBottomSheetMaxHeight( true );\n\t\tsetColor( action === 'apply' ? currentColor : savedColor );\n\t\tif ( onBottomSheetClosed ) {\n\t\t\tonBottomSheetClosed();\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<HsvColorPicker\n\t\t\t\thuePickerHue={ hue }\n\t\t\t\tcurrentColor={ currentColor }\n\t\t\t\tonHuePickerDragMove={ updateColor }\n\t\t\t\tonHuePickerPress={\n\t\t\t\t\t! isBottomSheetContentScrolling && updateColor\n\t\t\t\t}\n\t\t\t\tsatValPickerHue={ hue }\n\t\t\t\tsatValPickerSaturation={ sat }\n\t\t\t\tsatValPickerValue={ val }\n\t\t\t\tonSatValPickerDragMove={ updateColor }\n\t\t\t\tonSatValPickerPress={\n\t\t\t\t\t! isBottomSheetContentScrolling && updateColor\n\t\t\t\t}\n\t\t\t\tonSatValPickerDragStart={ () => {\n\t\t\t\t\tshouldEnableBottomSheetScroll( false );\n\t\t\t\t} }\n\t\t\t\tonSatValPickerDragEnd={ () =>\n\t\t\t\t\tshouldEnableBottomSheetScroll( true )\n\t\t\t\t}\n\t\t\t\tonHuePickerDragStart={ () =>\n\t\t\t\t\tshouldEnableBottomSheetScroll( false )\n\t\t\t\t}\n\t\t\t\tonHuePickerDragEnd={ () =>\n\t\t\t\t\tshouldEnableBottomSheetScroll( true )\n\t\t\t\t}\n\t\t\t\thuePickerBarWidth={ pickerWidth }\n\t\t\t\thuePickerBarHeight={ pickerPointerSize / 2 }\n\t\t\t\tsatValPickerSize={ {\n\t\t\t\t\twidth: pickerWidth,\n\t\t\t\t\theight: pickerHeight,\n\t\t\t\t} }\n\t\t\t\tsatValPickerSliderSize={ pickerPointerSize * 2 }\n\t\t\t\tsatValPickerBorderRadius={ borderRadius }\n\t\t\t\thuePickerBorderRadius={ borderRadius }\n\t\t\t/>\n\t\t\t<View style={ footerStyle }>\n\t\t\t\t<TouchableWithoutFeedback\n\t\t\t\t\tonPress={ () => onButtonPress( 'cancel' ) }\n\t\t\t\t\thitSlop={ hitSlop }\n\t\t\t\t>\n\t\t\t\t\t<View>\n\t\t\t\t\t\t{ isIOS ? (\n\t\t\t\t\t\t\t<Text style={ cancelButtonStyle }>\n\t\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\tstyle={ cancelButtonStyle }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</View>\n\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t{ bottomLabelText ? (\n\t\t\t\t\t<Text style={ selectColorTextStyle }>\n\t\t\t\t\t\t{ bottomLabelText }\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Text style={ colorTextStyle } selectable>\n\t\t\t\t\t\t{ currentColor.toUpperCase() }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t\t<TouchableWithoutFeedback\n\t\t\t\t\tonPress={ () => onButtonPress( 'apply' ) }\n\t\t\t\t\thitSlop={ hitSlop }\n\t\t\t\t>\n\t\t\t\t\t<View>\n\t\t\t\t\t\t{ isIOS ? (\n\t\t\t\t\t\t\t<Text style={ applyButtonStyle }>\n\t\t\t\t\t\t\t\t{ __( 'Apply' ) }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\tstyle={ applyButtonStyle }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</View>\n\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t</View>\n\t\t</>\n\t);\n}\n\nexport { ColorPicker };\n"],"mappings":";;;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AANA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAKA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR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