@wordpress/components 25.6.0 → 25.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (864) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/CONTRIBUTING.md +2 -2
  3. package/README.md +3 -8
  4. package/build/color-palette/utils.js +2 -9
  5. package/build/color-palette/utils.js.map +1 -1
  6. package/build/color-picker/hsv-color-picker.native.js +92 -0
  7. package/build/color-picker/hsv-color-picker.native.js.map +1 -0
  8. package/build/color-picker/hue-picker.native.js +195 -0
  9. package/build/color-picker/hue-picker.native.js.map +1 -0
  10. package/build/color-picker/index.native.js +3 -2
  11. package/build/color-picker/index.native.js.map +1 -1
  12. package/build/color-picker/saturation-picker.native.js +178 -0
  13. package/build/color-picker/saturation-picker.native.js.map +1 -0
  14. package/build/item-group/item/component.js +0 -1
  15. package/build/item-group/item/component.js.map +1 -1
  16. package/build/item-group/item-group/component.js +0 -1
  17. package/build/item-group/item-group/component.js.map +1 -1
  18. package/build/menu-item/index.js +6 -4
  19. package/build/menu-item/index.js.map +1 -1
  20. package/build/menu-item/types.js.map +1 -1
  21. package/build/mobile/link-settings/link-settings-navigation.native.js +1 -1
  22. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  23. package/build/navigation/index.js +0 -1
  24. package/build/navigation/index.js.map +1 -1
  25. package/build/navigator/navigator-provider/component.js +1 -2
  26. package/build/navigator/navigator-provider/component.js.map +1 -1
  27. package/build/palette-edit/styles.js +10 -10
  28. package/build/palette-edit/styles.js.map +1 -1
  29. package/build/popover/index.js +38 -75
  30. package/build/popover/index.js.map +1 -1
  31. package/build/popover/overlay-middlewares.js.map +1 -1
  32. package/build/popover/types.js.map +1 -1
  33. package/build/popover/utils.js +5 -50
  34. package/build/popover/utils.js.map +1 -1
  35. package/build/progress-bar/styles.js +6 -5
  36. package/build/progress-bar/styles.js.map +1 -1
  37. package/build/sandbox/index.js +1 -1
  38. package/build/sandbox/index.js.map +1 -1
  39. package/build/search-control/index.native.js +27 -24
  40. package/build/search-control/index.native.js.map +1 -1
  41. package/build/shortcut/index.js +13 -0
  42. package/build/shortcut/index.js.map +1 -1
  43. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +4 -2
  44. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  45. package/build/slot-fill/bubbles-virtually/slot.js +14 -8
  46. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  47. package/build/slot-fill/index.js +5 -0
  48. package/build/slot-fill/index.js.map +1 -1
  49. package/build/snackbar/index.js +1 -1
  50. package/build/snackbar/index.js.map +1 -1
  51. package/build/spinner/index.js +0 -1
  52. package/build/spinner/index.js.map +1 -1
  53. package/build/theme/color-algorithms.js +2 -2
  54. package/build/theme/color-algorithms.js.map +1 -1
  55. package/build/theme/index.js +0 -1
  56. package/build/theme/index.js.map +1 -1
  57. package/build/toolbar/toolbar-item/index.js +1 -1
  58. package/build/toolbar/toolbar-item/index.js.map +1 -1
  59. package/build/toolbar/toolbar-item/index.native.js +1 -1
  60. package/build/toolbar/toolbar-item/index.native.js.map +1 -1
  61. package/build/tools-panel/tools-panel/component.js +0 -1
  62. package/build/tools-panel/tools-panel/component.js.map +1 -1
  63. package/build/tools-panel/tools-panel-header/component.js +5 -1
  64. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  65. package/build/tree-select/index.js +0 -1
  66. package/build/tree-select/index.js.map +1 -1
  67. package/build/ui/context/constants.js +2 -6
  68. package/build/ui/context/constants.js.map +1 -1
  69. package/build/ui/context/context-connect.js +1 -1
  70. package/build/ui/context/context-connect.js.map +1 -1
  71. package/build/ui/context/context-system-provider.js +1 -1
  72. package/build/ui/context/context-system-provider.js.map +1 -1
  73. package/build/ui/context/use-context-system.js +1 -1
  74. package/build/ui/context/use-context-system.js.map +1 -1
  75. package/build/unit-control/index.js +0 -1
  76. package/build/unit-control/index.js.map +1 -1
  77. package/build/utils/hooks/use-cx.js +2 -1
  78. package/build/utils/hooks/use-cx.js.map +1 -1
  79. package/build/utils/math.js +0 -12
  80. package/build/utils/math.js.map +1 -1
  81. package/build/utils/values.js +3 -66
  82. package/build/utils/values.js.map +1 -1
  83. package/build/view/component.js +1 -2
  84. package/build/view/component.js.map +1 -1
  85. package/build-module/color-palette/utils.js +0 -6
  86. package/build-module/color-palette/utils.js.map +1 -1
  87. package/build-module/color-picker/hsv-color-picker.native.js +84 -0
  88. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -0
  89. package/build-module/color-picker/hue-picker.native.js +185 -0
  90. package/build-module/color-picker/hue-picker.native.js.map +1 -0
  91. package/build-module/color-picker/index.native.js +2 -1
  92. package/build-module/color-picker/index.native.js.map +1 -1
  93. package/build-module/color-picker/saturation-picker.native.js +168 -0
  94. package/build-module/color-picker/saturation-picker.native.js.map +1 -0
  95. package/build-module/item-group/item/component.js +0 -1
  96. package/build-module/item-group/item/component.js.map +1 -1
  97. package/build-module/item-group/item-group/component.js +0 -1
  98. package/build-module/item-group/item-group/component.js.map +1 -1
  99. package/build-module/menu-item/index.js +4 -2
  100. package/build-module/menu-item/index.js.map +1 -1
  101. package/build-module/menu-item/types.js.map +1 -1
  102. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -1
  103. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  104. package/build-module/navigation/index.js +0 -1
  105. package/build-module/navigation/index.js.map +1 -1
  106. package/build-module/navigator/navigator-provider/component.js +1 -2
  107. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  108. package/build-module/palette-edit/styles.js +10 -10
  109. package/build-module/palette-edit/styles.js.map +1 -1
  110. package/build-module/popover/index.js +42 -79
  111. package/build-module/popover/index.js.map +1 -1
  112. package/build-module/popover/overlay-middlewares.js.map +1 -1
  113. package/build-module/popover/types.js.map +1 -1
  114. package/build-module/popover/utils.js +4 -47
  115. package/build-module/popover/utils.js.map +1 -1
  116. package/build-module/progress-bar/styles.js +6 -5
  117. package/build-module/progress-bar/styles.js.map +1 -1
  118. package/build-module/sandbox/index.js +1 -1
  119. package/build-module/sandbox/index.js.map +1 -1
  120. package/build-module/search-control/index.native.js +28 -25
  121. package/build-module/search-control/index.native.js.map +1 -1
  122. package/build-module/shortcut/index.js +13 -0
  123. package/build-module/shortcut/index.js.map +1 -1
  124. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +4 -2
  125. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  126. package/build-module/slot-fill/bubbles-virtually/slot.js +14 -8
  127. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  128. package/build-module/slot-fill/index.js +6 -1
  129. package/build-module/slot-fill/index.js.map +1 -1
  130. package/build-module/snackbar/index.js +1 -1
  131. package/build-module/snackbar/index.js.map +1 -1
  132. package/build-module/spinner/index.js +0 -1
  133. package/build-module/spinner/index.js.map +1 -1
  134. package/build-module/theme/color-algorithms.js +2 -2
  135. package/build-module/theme/color-algorithms.js.map +1 -1
  136. package/build-module/theme/index.js +0 -1
  137. package/build-module/theme/index.js.map +1 -1
  138. package/build-module/toolbar/toolbar-item/index.js +1 -1
  139. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  140. package/build-module/toolbar/toolbar-item/index.native.js +1 -1
  141. package/build-module/toolbar/toolbar-item/index.native.js.map +1 -1
  142. package/build-module/tools-panel/tools-panel/component.js +0 -1
  143. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  144. package/build-module/tools-panel/tools-panel-header/component.js +5 -1
  145. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  146. package/build-module/tree-select/index.js +0 -1
  147. package/build-module/tree-select/index.js.map +1 -1
  148. package/build-module/ui/context/constants.js +0 -2
  149. package/build-module/ui/context/constants.js.map +1 -1
  150. package/build-module/ui/context/context-connect.js +1 -1
  151. package/build-module/ui/context/context-connect.js.map +1 -1
  152. package/build-module/ui/context/context-system-provider.js +1 -1
  153. package/build-module/ui/context/context-system-provider.js.map +1 -1
  154. package/build-module/ui/context/use-context-system.js +1 -1
  155. package/build-module/ui/context/use-context-system.js.map +1 -1
  156. package/build-module/unit-control/index.js +0 -1
  157. package/build-module/unit-control/index.js.map +1 -1
  158. package/build-module/utils/hooks/use-cx.js +2 -1
  159. package/build-module/utils/hooks/use-cx.js.map +1 -1
  160. package/build-module/utils/math.js +0 -11
  161. package/build-module/utils/math.js.map +1 -1
  162. package/build-module/utils/values.js +0 -60
  163. package/build-module/utils/values.js.map +1 -1
  164. package/build-module/view/component.js +1 -2
  165. package/build-module/view/component.js.map +1 -1
  166. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  167. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  168. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  169. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  170. package/build-types/animate/stories/index.story.d.ts +9 -9
  171. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  172. package/build-types/base-control/stories/index.story.d.ts +4 -4
  173. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  174. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  175. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  176. package/build-types/border-control/stories/index.story.d.ts +2 -2
  177. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  178. package/build-types/button/stories/e2e/index.story.d.ts +3 -3
  179. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  180. package/build-types/button/stories/index.story.d.ts +10 -9
  181. package/build-types/button/stories/index.story.d.ts.map +1 -1
  182. package/build-types/button-group/stories/index.story.d.ts +3 -3
  183. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  184. package/build-types/card/stories/index.story.d.ts +2 -2
  185. package/build-types/card/stories/index.story.d.ts.map +1 -1
  186. package/build-types/checkbox-control/stories/index.story.d.ts +4 -4
  187. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  188. package/build-types/circular-option-picker/stories/index.story.d.ts +2 -2
  189. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  190. package/build-types/color-indicator/stories/index.story.d.ts +3 -3
  191. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  192. package/build-types/color-palette/stories/index.story.d.ts +3 -3
  193. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  194. package/build-types/color-palette/styles.d.ts +1 -1
  195. package/build-types/color-palette/utils.d.ts +0 -1
  196. package/build-types/color-palette/utils.d.ts.map +1 -1
  197. package/build-types/color-picker/stories/index.story.d.ts +2 -2
  198. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  199. package/build-types/combobox-control/stories/index.story.d.ts +2 -2
  200. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  201. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  202. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  203. package/build-types/date-time/date/styles.d.ts +1 -1
  204. package/build-types/date-time/stories/date-time.story.d.ts +5 -5
  205. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  206. package/build-types/date-time/stories/date.story.d.ts +5 -5
  207. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  208. package/build-types/date-time/stories/time.story.d.ts +3 -3
  209. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  210. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  211. package/build-types/disabled/stories/index.story.d.ts +4 -4
  212. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  213. package/build-types/divider/stories/index.story.d.ts +5 -5
  214. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  215. package/build-types/draggable/stories/index.story.d.ts +4 -4
  216. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  217. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  218. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  219. package/build-types/dropdown/stories/index.story.d.ts +6 -5
  220. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  221. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  222. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  223. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +2 -2
  224. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  225. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  226. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  227. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +2 -2
  228. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  229. package/build-types/elevation/stories/index.story.d.ts +5 -5
  230. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  231. package/build-types/external-link/stories/index.story.d.ts +3 -3
  232. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  233. package/build-types/flex/stories/index.story.d.ts +4 -4
  234. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  235. package/build-types/focal-point-picker/stories/index.story.d.ts +2 -2
  236. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  237. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +2 -2
  238. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  239. package/build-types/font-size-picker/stories/index.story.d.ts +8 -8
  240. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  241. package/build-types/form-file-upload/stories/index.story.d.ts +2 -2
  242. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  243. package/build-types/form-toggle/stories/index.story.d.ts +3 -3
  244. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  245. package/build-types/form-token-field/stories/index.story.d.ts +7 -7
  246. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  247. package/build-types/gradient-picker/stories/index.story.d.ts +2 -2
  248. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  249. package/build-types/grid/stories/index.story.d.ts +3 -3
  250. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  251. package/build-types/guide/stories/index.story.d.ts +2 -2
  252. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  253. package/build-types/h-stack/stories/e2e/index.story.d.ts +3 -3
  254. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  255. package/build-types/h-stack/stories/index.story.d.ts +3 -3
  256. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  257. package/build-types/heading/stories/index.story.d.ts +3 -3
  258. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  259. package/build-types/icon/stories/index.story.d.ts +4 -4
  260. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  261. package/build-types/input-control/stories/index.story.d.ts +2 -2
  262. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  263. package/build-types/item-group/item/component.d.ts +0 -1
  264. package/build-types/item-group/item/component.d.ts.map +1 -1
  265. package/build-types/item-group/item/hook.d.ts +1 -1
  266. package/build-types/item-group/item-group/component.d.ts +0 -1
  267. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  268. package/build-types/item-group/stories/index.story.d.ts +6 -6
  269. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  270. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  271. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  272. package/build-types/menu-group/stories/index.story.d.ts +3 -3
  273. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  274. package/build-types/menu-item/index.d.ts +5 -58
  275. package/build-types/menu-item/index.d.ts.map +1 -1
  276. package/build-types/menu-item/stories/index.story.d.ts +74 -0
  277. package/build-types/menu-item/stories/index.story.d.ts.map +1 -0
  278. package/build-types/menu-item/types.d.ts +3 -2
  279. package/build-types/menu-item/types.d.ts.map +1 -1
  280. package/build-types/menu-items-choice/stories/index.story.d.ts +3 -3
  281. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  282. package/build-types/modal/stories/index.story.d.ts +4 -4
  283. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  284. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +3 -3
  285. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  286. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +3 -3
  287. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  288. package/build-types/navigation/index.d.ts +0 -1
  289. package/build-types/navigation/index.d.ts.map +1 -1
  290. package/build-types/navigation/stories/index.story.d.ts +2 -2
  291. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  292. package/build-types/navigation/stories/utils/controlled-state.d.ts +2 -2
  293. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  294. package/build-types/navigation/stories/utils/default.d.ts +2 -2
  295. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  296. package/build-types/navigation/stories/utils/group.d.ts +2 -2
  297. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  298. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +2 -2
  299. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  300. package/build-types/navigation/stories/utils/more-examples.d.ts +2 -2
  301. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  302. package/build-types/navigation/stories/utils/search.d.ts +2 -2
  303. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  304. package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
  305. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  306. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  307. package/build-types/navigator/stories/index.story.d.ts +5 -5
  308. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  309. package/build-types/notice/stories/index.story.d.ts +3 -3
  310. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  311. package/build-types/number-control/stories/index.story.d.ts +2 -2
  312. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  313. package/build-types/palette-edit/stories/index.story.d.ts +2 -2
  314. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  315. package/build-types/palette-edit/styles.d.ts +1 -1
  316. package/build-types/palette-edit/styles.d.ts.map +1 -1
  317. package/build-types/panel/stories/index.story.d.ts +6 -6
  318. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  319. package/build-types/placeholder/stories/index.story.d.ts +3 -3
  320. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  321. package/build-types/popover/index.d.ts.map +1 -1
  322. package/build-types/popover/overlay-middlewares.d.ts +2 -2
  323. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  324. package/build-types/popover/stories/index.story.d.ts +7 -7
  325. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  326. package/build-types/popover/types.d.ts +6 -0
  327. package/build-types/popover/types.d.ts.map +1 -1
  328. package/build-types/popover/utils.d.ts +1 -21
  329. package/build-types/popover/utils.d.ts.map +1 -1
  330. package/build-types/progress-bar/stories/index.story.d.ts +3 -3
  331. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  332. package/build-types/progress-bar/styles.d.ts.map +1 -1
  333. package/build-types/query-controls/stories/index.story.d.ts +4 -4
  334. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  335. package/build-types/radio-control/stories/index.story.d.ts +3 -3
  336. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  337. package/build-types/range-control/stories/index.story.d.ts +9 -9
  338. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  339. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  340. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  341. package/build-types/responsive-wrapper/stories/index.story.d.ts +3 -3
  342. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  343. package/build-types/sandbox/index.d.ts.map +1 -1
  344. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  345. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  346. package/build-types/scroll-lock/stories/index.story.d.ts +3 -3
  347. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  348. package/build-types/scrollable/stories/index.story.d.ts +3 -3
  349. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  350. package/build-types/search-control/stories/index.story.d.ts +2 -16
  351. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  352. package/build-types/select-control/stories/index.story.d.ts +2 -2
  353. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  354. package/build-types/shortcut/index.d.ts +13 -0
  355. package/build-types/shortcut/index.d.ts.map +1 -1
  356. package/build-types/shortcut/stories/index.story.d.ts +13 -0
  357. package/build-types/shortcut/stories/index.story.d.ts.map +1 -0
  358. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +1 -0
  359. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  360. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -6
  361. package/build-types/slot-fill/index.d.ts +1 -1
  362. package/build-types/slot-fill/index.d.ts.map +1 -1
  363. package/build-types/snackbar/stories/index.story.d.ts +7 -7
  364. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  365. package/build-types/snackbar/stories/list.story.d.ts +3 -3
  366. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  367. package/build-types/spacer/stories/index.story.d.ts +3 -3
  368. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  369. package/build-types/spinner/index.d.ts +0 -1
  370. package/build-types/spinner/index.d.ts.map +1 -1
  371. package/build-types/spinner/stories/index.story.d.ts +4 -4
  372. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  373. package/build-types/surface/stories/index.story.d.ts +3 -3
  374. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  375. package/build-types/tab-panel/stories/index.story.d.ts +2 -2
  376. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  377. package/build-types/text-control/stories/index.story.d.ts +4 -4
  378. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  379. package/build-types/text-highlight/stories/index.story.d.ts +3 -3
  380. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  381. package/build-types/textarea-control/stories/index.story.d.ts +3 -3
  382. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  383. package/build-types/theme/index.d.ts +0 -1
  384. package/build-types/theme/index.d.ts.map +1 -1
  385. package/build-types/theme/stories/index.story.d.ts +4 -4
  386. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  387. package/build-types/tip/stories/index.story.d.ts +3 -3
  388. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  389. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  390. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  391. package/build-types/toggle-group-control/stories/index.story.d.ts +6 -6
  392. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  393. package/build-types/toolbar/stories/index.story.d.ts +2 -2
  394. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  395. package/build-types/tools-panel/stories/index.story.d.ts +8 -8
  396. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  397. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  398. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  399. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  400. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  401. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  402. package/build-types/tree-select/index.d.ts +0 -1
  403. package/build-types/tree-select/index.d.ts.map +1 -1
  404. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  405. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  406. package/build-types/truncate/stories/index.story.d.ts +4 -4
  407. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  408. package/build-types/ui/context/constants.d.ts +0 -2
  409. package/build-types/ui/context/constants.d.ts.map +1 -1
  410. package/build-types/unit-control/index.d.ts +0 -1
  411. package/build-types/unit-control/index.d.ts.map +1 -1
  412. package/build-types/unit-control/stories/index.story.d.ts +7 -7
  413. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  414. package/build-types/utils/hooks/use-cx.d.ts +2 -1
  415. package/build-types/utils/hooks/use-cx.d.ts.map +1 -1
  416. package/build-types/utils/math.d.ts +0 -8
  417. package/build-types/utils/math.d.ts.map +1 -1
  418. package/build-types/utils/values.d.ts +0 -13
  419. package/build-types/utils/values.d.ts.map +1 -1
  420. package/build-types/v-stack/stories/e2e/index.story.d.ts +3 -3
  421. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  422. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  423. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  424. package/build-types/view/component.d.ts +0 -1
  425. package/build-types/view/component.d.ts.map +1 -1
  426. package/build-types/view/stories/index.story.d.ts +3 -3
  427. package/build-types/view/stories/index.story.d.ts.map +1 -1
  428. package/build-types/visually-hidden/stories/index.story.d.ts +5 -5
  429. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  430. package/build-types/z-stack/stories/index.story.d.ts +3 -3
  431. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  432. package/package.json +20 -20
  433. package/src/alignment-matrix-control/stories/index.story.tsx +8 -4
  434. package/src/alignment-matrix-control/test/index.tsx +6 -2
  435. package/src/angle-picker-control/stories/index.story.tsx +4 -4
  436. package/src/animate/stories/index.story.tsx +13 -11
  437. package/src/base-control/stories/index.story.tsx +6 -10
  438. package/src/border-box-control/stories/index.story.tsx +6 -10
  439. package/src/border-control/stories/index.story.tsx +9 -15
  440. package/src/button/stories/e2e/index.story.tsx +3 -3
  441. package/src/button/stories/index.story.tsx +11 -11
  442. package/src/button-group/stories/index.story.tsx +5 -7
  443. package/src/card/stories/index.story.tsx +6 -6
  444. package/src/checkbox-control/stories/index.story.tsx +8 -7
  445. package/src/circular-option-picker/stories/index.story.tsx +20 -5
  446. package/src/color-indicator/stories/index.story.tsx +5 -7
  447. package/src/color-palette/stories/index.story.tsx +13 -22
  448. package/src/color-palette/test/index.tsx +15 -9
  449. package/src/color-palette/test/utils.ts +0 -15
  450. package/src/color-palette/utils.ts +0 -7
  451. package/src/color-picker/hsv-color-picker.native.js +88 -0
  452. package/src/color-picker/hue-picker.native.js +194 -0
  453. package/src/color-picker/index.native.js +2 -1
  454. package/src/color-picker/saturation-picker.native.js +163 -0
  455. package/src/color-picker/stories/index.story.tsx +4 -4
  456. package/src/color-picker/style.native.scss +23 -0
  457. package/src/combobox-control/stories/index.story.tsx +4 -4
  458. package/src/confirm-dialog/stories/index.story.js +1 -1
  459. package/src/custom-gradient-picker/stories/index.story.tsx +4 -4
  460. package/src/date-time/stories/date-time.story.tsx +9 -11
  461. package/src/date-time/stories/date.story.tsx +9 -10
  462. package/src/date-time/stories/time.story.tsx +5 -5
  463. package/src/dimension-control/stories/index.story.tsx +4 -4
  464. package/src/disabled/stories/index.story.tsx +5 -5
  465. package/src/divider/stories/index.story.tsx +7 -7
  466. package/src/draggable/stories/index.story.tsx +5 -7
  467. package/src/drop-zone/stories/index.story.tsx +4 -4
  468. package/src/dropdown/stories/index.story.tsx +8 -6
  469. package/src/dropdown-menu/stories/index.story.tsx +4 -4
  470. package/src/dropdown-menu-v2/stories/index.story.tsx +28 -11
  471. package/src/duotone-picker/stories/duotone-picker.story.tsx +4 -7
  472. package/src/duotone-picker/stories/duotone-swatch.story.tsx +4 -4
  473. package/src/elevation/stories/index.story.tsx +8 -8
  474. package/src/external-link/stories/index.story.tsx +5 -7
  475. package/src/flex/stories/index.story.tsx +7 -7
  476. package/src/focal-point-picker/stories/index.story.tsx +4 -4
  477. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -3
  478. package/src/font-size-picker/stories/index.story.tsx +11 -11
  479. package/src/form-file-upload/stories/index.story.tsx +4 -4
  480. package/src/form-toggle/stories/index.story.tsx +5 -8
  481. package/src/form-token-field/stories/index.story.tsx +11 -12
  482. package/src/gradient-picker/stories/index.story.tsx +4 -4
  483. package/src/grid/stories/index.story.tsx +5 -5
  484. package/src/guide/stories/index.story.tsx +3 -3
  485. package/src/h-stack/stories/e2e/index.story.tsx +4 -4
  486. package/src/h-stack/stories/index.story.tsx +5 -5
  487. package/src/heading/stories/index.story.tsx +4 -4
  488. package/src/icon/stories/index.story.tsx +6 -6
  489. package/src/input-control/stories/index.story.tsx +6 -4
  490. package/src/item-group/item/component.tsx +0 -1
  491. package/src/item-group/item-group/component.tsx +0 -1
  492. package/src/item-group/stories/index.story.tsx +12 -13
  493. package/src/keyboard-shortcuts/stories/index.story.tsx +4 -4
  494. package/src/menu-group/stories/index.story.tsx +6 -6
  495. package/src/menu-item/README.md +1 -1
  496. package/src/menu-item/index.tsx +5 -2
  497. package/src/menu-item/stories/index.story.tsx +80 -0
  498. package/src/menu-item/types.ts +3 -2
  499. package/src/menu-items-choice/stories/index.story.tsx +5 -7
  500. package/src/mobile/link-settings/link-settings-navigation.native.js +1 -1
  501. package/src/modal/stories/index.story.tsx +5 -10
  502. package/src/navigable-container/stories/navigable-menu.story.tsx +4 -4
  503. package/src/navigable-container/stories/tabbable-container.story.tsx +4 -4
  504. package/src/navigation/index.tsx +0 -1
  505. package/src/navigation/stories/index.story.tsx +17 -3
  506. package/src/navigation/stories/utils/controlled-state.tsx +2 -2
  507. package/src/navigation/stories/utils/default.tsx +2 -2
  508. package/src/navigation/stories/utils/group.tsx +2 -2
  509. package/src/navigation/stories/utils/hide-if-empty.tsx +2 -2
  510. package/src/navigation/stories/utils/more-examples.tsx +2 -2
  511. package/src/navigation/stories/utils/search.tsx +2 -2
  512. package/src/navigator/navigator-provider/component.tsx +0 -1
  513. package/src/navigator/stories/index.story.tsx +10 -11
  514. package/src/notice/stories/index.story.tsx +7 -7
  515. package/src/number-control/stories/index.story.tsx +4 -4
  516. package/src/palette-edit/stories/index.story.tsx +4 -4
  517. package/src/palette-edit/styles.js +0 -1
  518. package/src/panel/stories/index.story.tsx +10 -12
  519. package/src/placeholder/stories/index.story.tsx +5 -7
  520. package/src/popover/README.md +2 -2
  521. package/src/popover/index.tsx +69 -103
  522. package/src/popover/overlay-middlewares.tsx +2 -2
  523. package/src/popover/stories/index.story.tsx +8 -10
  524. package/src/popover/test/index.tsx +15 -1
  525. package/src/popover/types.ts +6 -0
  526. package/src/popover/utils.ts +5 -56
  527. package/src/progress-bar/stories/index.story.tsx +5 -7
  528. package/src/progress-bar/styles.ts +4 -1
  529. package/src/query-controls/stories/index.story.tsx +6 -7
  530. package/src/radio-control/stories/index.story.tsx +5 -7
  531. package/src/radio-group/stories/index.story.js +1 -0
  532. package/src/range-control/stories/index.story.tsx +13 -19
  533. package/src/resizable-box/stories/index.story.tsx +4 -4
  534. package/src/responsive-wrapper/stories/index.story.tsx +5 -6
  535. package/src/sandbox/index.tsx +4 -1
  536. package/src/sandbox/stories/index.story.tsx +4 -6
  537. package/src/scroll-lock/stories/index.story.tsx +4 -4
  538. package/src/scrollable/stories/index.story.tsx +5 -5
  539. package/src/search-control/index.native.js +39 -27
  540. package/src/search-control/stories/index.story.tsx +4 -4
  541. package/src/select-control/stories/index.story.tsx +4 -4
  542. package/src/shortcut/index.tsx +13 -0
  543. package/src/shortcut/stories/index.story.tsx +33 -0
  544. package/src/slot-fill/README.md +5 -5
  545. package/src/slot-fill/bubbles-virtually/slot-fill-context.js +3 -0
  546. package/src/slot-fill/bubbles-virtually/slot.js +17 -5
  547. package/src/slot-fill/index.js +6 -1
  548. package/src/slot-fill/stories/index.story.js +3 -1
  549. package/src/slot-fill/test/__snapshots__/slot.js.snap +12 -4
  550. package/src/snackbar/stories/index.story.tsx +11 -14
  551. package/src/snackbar/stories/list.story.tsx +4 -4
  552. package/src/spacer/stories/index.story.tsx +5 -5
  553. package/src/spinner/index.tsx +0 -1
  554. package/src/spinner/stories/index.story.tsx +6 -6
  555. package/src/surface/stories/index.story.tsx +5 -5
  556. package/src/tab-panel/stories/index.story.tsx +6 -14
  557. package/src/tab-panel/test/index.tsx +9 -25
  558. package/src/text/test/index.tsx +1 -1
  559. package/src/text-control/stories/index.story.tsx +8 -7
  560. package/src/text-highlight/stories/index.story.tsx +5 -7
  561. package/src/textarea-control/stories/index.story.tsx +5 -7
  562. package/src/theme/index.tsx +0 -1
  563. package/src/theme/stories/index.story.tsx +7 -7
  564. package/src/tip/stories/index.story.tsx +5 -5
  565. package/src/toggle-control/stories/index.story.tsx +4 -4
  566. package/src/toggle-group-control/stories/index.story.tsx +18 -12
  567. package/src/toolbar/stories/index.story.tsx +14 -4
  568. package/src/tools-panel/stories/index.story.tsx +18 -13
  569. package/src/tools-panel/tools-panel/component.tsx +0 -1
  570. package/src/tools-panel/tools-panel-header/component.tsx +3 -0
  571. package/src/tooltip/stories/index.story.js +1 -1
  572. package/src/tree-grid/stories/index.story.tsx +5 -3
  573. package/src/tree-select/index.tsx +0 -1
  574. package/src/tree-select/stories/index.story.tsx +4 -4
  575. package/src/truncate/stories/index.story.tsx +6 -8
  576. package/src/ui/context/constants.js +0 -2
  577. package/src/unit-control/index.tsx +0 -1
  578. package/src/unit-control/stories/index.story.tsx +11 -10
  579. package/src/utils/hooks/use-cx.ts +2 -1
  580. package/src/utils/math.js +0 -11
  581. package/src/utils/values.js +0 -81
  582. package/src/v-stack/stories/e2e/index.story.tsx +4 -4
  583. package/src/v-stack/stories/index.story.tsx +4 -4
  584. package/src/view/component.tsx +0 -1
  585. package/src/view/stories/index.story.tsx +5 -5
  586. package/src/visually-hidden/stories/index.story.tsx +8 -8
  587. package/src/z-stack/stories/index.story.tsx +5 -5
  588. package/tsconfig.tsbuildinfo +1 -1
  589. package/build/popover/limit-shift.js +0 -129
  590. package/build/popover/limit-shift.js.map +0 -1
  591. package/build/ui/utils/get-high-dpi.js +0 -16
  592. package/build/ui/utils/get-high-dpi.js.map +0 -1
  593. package/build/utils/browsers.js +0 -32
  594. package/build/utils/browsers.js.map +0 -1
  595. package/build/utils/events.js +0 -43
  596. package/build/utils/events.js.map +0 -1
  597. package/build-module/popover/limit-shift.js +0 -122
  598. package/build-module/popover/limit-shift.js.map +0 -1
  599. package/build-module/ui/utils/get-high-dpi.js +0 -11
  600. package/build-module/ui/utils/get-high-dpi.js.map +0 -1
  601. package/build-module/utils/browsers.js +0 -25
  602. package/build-module/utils/browsers.js.map +0 -1
  603. package/build-module/utils/events.js +0 -37
  604. package/build-module/utils/events.js.map +0 -1
  605. package/build-types/alignment-matrix-control/stories/index.d.ts +0 -14
  606. package/build-types/alignment-matrix-control/stories/index.d.ts.map +0 -1
  607. package/build-types/angle-picker-control/stories/index.d.ts +0 -15
  608. package/build-types/angle-picker-control/stories/index.d.ts.map +0 -1
  609. package/build-types/animate/stories/index.d.ts +0 -18
  610. package/build-types/animate/stories/index.d.ts.map +0 -1
  611. package/build-types/base-control/stories/index.d.ts +0 -25
  612. package/build-types/base-control/stories/index.d.ts.map +0 -1
  613. package/build-types/border-box-control/stories/index.d.ts +0 -17
  614. package/build-types/border-box-control/stories/index.d.ts.map +0 -1
  615. package/build-types/border-control/stories/index.d.ts +0 -119
  616. package/build-types/border-control/stories/index.d.ts.map +0 -1
  617. package/build-types/button/stories/e2e/index.d.ts +0 -15
  618. package/build-types/button/stories/e2e/index.d.ts.map +0 -1
  619. package/build-types/button/stories/index.d.ts +0 -20
  620. package/build-types/button/stories/index.d.ts.map +0 -1
  621. package/build-types/button-group/stories/index.d.ts +0 -12
  622. package/build-types/button-group/stories/index.d.ts.map +0 -1
  623. package/build-types/card/stories/index.d.ts +0 -32
  624. package/build-types/card/stories/index.d.ts.map +0 -1
  625. package/build-types/checkbox-control/stories/index.d.ts +0 -13
  626. package/build-types/checkbox-control/stories/index.d.ts.map +0 -1
  627. package/build-types/circular-option-picker/stories/index.d.ts +0 -14
  628. package/build-types/circular-option-picker/stories/index.d.ts.map +0 -1
  629. package/build-types/color-indicator/stories/index.d.ts +0 -12
  630. package/build-types/color-indicator/stories/index.d.ts.map +0 -1
  631. package/build-types/color-palette/stories/index.d.ts +0 -46
  632. package/build-types/color-palette/stories/index.d.ts.map +0 -1
  633. package/build-types/color-picker/stories/index.d.ts +0 -19
  634. package/build-types/color-picker/stories/index.d.ts.map +0 -1
  635. package/build-types/combobox-control/stories/index.d.ts +0 -18
  636. package/build-types/combobox-control/stories/index.d.ts.map +0 -1
  637. package/build-types/custom-gradient-picker/stories/index.d.ts +0 -12
  638. package/build-types/custom-gradient-picker/stories/index.d.ts.map +0 -1
  639. package/build-types/date-time/stories/date-time.d.ts +0 -14
  640. package/build-types/date-time/stories/date-time.d.ts.map +0 -1
  641. package/build-types/date-time/stories/date.d.ts +0 -14
  642. package/build-types/date-time/stories/date.d.ts.map +0 -1
  643. package/build-types/date-time/stories/time.d.ts +0 -12
  644. package/build-types/date-time/stories/time.d.ts.map +0 -1
  645. package/build-types/dimension-control/stories/index.d.ts +0 -12
  646. package/build-types/dimension-control/stories/index.d.ts.map +0 -1
  647. package/build-types/disabled/stories/index.d.ts +0 -13
  648. package/build-types/disabled/stories/index.d.ts.map +0 -1
  649. package/build-types/divider/stories/index.d.ts +0 -11
  650. package/build-types/divider/stories/index.d.ts.map +0 -1
  651. package/build-types/draggable/stories/index.d.ts +0 -20
  652. package/build-types/draggable/stories/index.d.ts.map +0 -1
  653. package/build-types/drop-zone/stories/index.d.ts +0 -12
  654. package/build-types/drop-zone/stories/index.d.ts.map +0 -1
  655. package/build-types/dropdown/stories/index.d.ts +0 -23
  656. package/build-types/dropdown/stories/index.d.ts.map +0 -1
  657. package/build-types/dropdown-menu/stories/index.d.ts +0 -14
  658. package/build-types/dropdown-menu/stories/index.d.ts.map +0 -1
  659. package/build-types/dropdown-menu-v2/stories/index.d.ts +0 -11
  660. package/build-types/dropdown-menu-v2/stories/index.d.ts.map +0 -1
  661. package/build-types/duotone-picker/stories/duotone-picker.d.ts +0 -12
  662. package/build-types/duotone-picker/stories/duotone-picker.d.ts.map +0 -1
  663. package/build-types/duotone-picker/stories/duotone-swatch.d.ts +0 -14
  664. package/build-types/duotone-picker/stories/duotone-swatch.d.ts.map +0 -1
  665. package/build-types/elevation/stories/index.d.ts +0 -22
  666. package/build-types/elevation/stories/index.d.ts.map +0 -1
  667. package/build-types/external-link/stories/index.d.ts +0 -12
  668. package/build-types/external-link/stories/index.d.ts.map +0 -1
  669. package/build-types/flex/stories/index.d.ts +0 -13
  670. package/build-types/flex/stories/index.d.ts.map +0 -1
  671. package/build-types/focal-point-picker/stories/index.d.ts +0 -15
  672. package/build-types/focal-point-picker/stories/index.d.ts.map +0 -1
  673. package/build-types/font-size-picker/stories/e2e/index.d.ts +0 -16
  674. package/build-types/font-size-picker/stories/e2e/index.d.ts.map +0 -1
  675. package/build-types/font-size-picker/stories/index.d.ts +0 -31
  676. package/build-types/font-size-picker/stories/index.d.ts.map +0 -1
  677. package/build-types/form-file-upload/stories/index.d.ts +0 -23
  678. package/build-types/form-file-upload/stories/index.d.ts.map +0 -1
  679. package/build-types/form-toggle/stories/index.d.ts +0 -12
  680. package/build-types/form-toggle/stories/index.d.ts.map +0 -1
  681. package/build-types/form-token-field/stories/index.d.ts +0 -26
  682. package/build-types/form-token-field/stories/index.d.ts.map +0 -1
  683. package/build-types/gradient-picker/stories/index.d.ts +0 -14
  684. package/build-types/gradient-picker/stories/index.d.ts.map +0 -1
  685. package/build-types/grid/stories/index.d.ts +0 -9
  686. package/build-types/grid/stories/index.d.ts.map +0 -1
  687. package/build-types/guide/stories/index.d.ts +0 -9
  688. package/build-types/guide/stories/index.d.ts.map +0 -1
  689. package/build-types/h-stack/stories/e2e/index.d.ts +0 -9
  690. package/build-types/h-stack/stories/e2e/index.d.ts.map +0 -1
  691. package/build-types/h-stack/stories/index.d.ts +0 -9
  692. package/build-types/h-stack/stories/index.d.ts.map +0 -1
  693. package/build-types/heading/stories/index.d.ts +0 -12
  694. package/build-types/heading/stories/index.d.ts.map +0 -1
  695. package/build-types/icon/stories/index.d.ts +0 -22
  696. package/build-types/icon/stories/index.d.ts.map +0 -1
  697. package/build-types/input-control/stories/index.d.ts +0 -28
  698. package/build-types/input-control/stories/index.d.ts.map +0 -1
  699. package/build-types/item-group/stories/index.d.ts +0 -15
  700. package/build-types/item-group/stories/index.d.ts.map +0 -1
  701. package/build-types/keyboard-shortcuts/stories/index.d.ts +0 -12
  702. package/build-types/keyboard-shortcuts/stories/index.d.ts.map +0 -1
  703. package/build-types/menu-group/stories/index.d.ts +0 -17
  704. package/build-types/menu-group/stories/index.d.ts.map +0 -1
  705. package/build-types/menu-items-choice/stories/index.d.ts +0 -12
  706. package/build-types/menu-items-choice/stories/index.d.ts.map +0 -1
  707. package/build-types/modal/stories/index.d.ts +0 -10
  708. package/build-types/modal/stories/index.d.ts.map +0 -1
  709. package/build-types/navigable-container/stories/navigable-menu.d.ts +0 -12
  710. package/build-types/navigable-container/stories/navigable-menu.d.ts.map +0 -1
  711. package/build-types/navigable-container/stories/tabbable-container.d.ts +0 -12
  712. package/build-types/navigable-container/stories/tabbable-container.d.ts.map +0 -1
  713. package/build-types/navigation/stories/index.d.ts +0 -18
  714. package/build-types/navigation/stories/index.d.ts.map +0 -1
  715. package/build-types/navigator/stories/index.d.ts +0 -11
  716. package/build-types/navigator/stories/index.d.ts.map +0 -1
  717. package/build-types/notice/stories/index.d.ts +0 -17
  718. package/build-types/notice/stories/index.d.ts.map +0 -1
  719. package/build-types/number-control/stories/index.d.ts +0 -25
  720. package/build-types/number-control/stories/index.d.ts.map +0 -1
  721. package/build-types/palette-edit/stories/index.d.ts +0 -13
  722. package/build-types/palette-edit/stories/index.d.ts.map +0 -1
  723. package/build-types/panel/stories/index.d.ts +0 -19
  724. package/build-types/panel/stories/index.d.ts.map +0 -1
  725. package/build-types/placeholder/stories/index.d.ts +0 -12
  726. package/build-types/placeholder/stories/index.d.ts.map +0 -1
  727. package/build-types/popover/limit-shift.d.ts +0 -87
  728. package/build-types/popover/limit-shift.d.ts.map +0 -1
  729. package/build-types/popover/stories/e2e/index.d.ts +0 -8
  730. package/build-types/popover/stories/e2e/index.d.ts.map +0 -1
  731. package/build-types/popover/stories/index.d.ts +0 -13
  732. package/build-types/popover/stories/index.d.ts.map +0 -1
  733. package/build-types/progress-bar/stories/index.d.ts +0 -12
  734. package/build-types/progress-bar/stories/index.d.ts.map +0 -1
  735. package/build-types/query-controls/stories/index.d.ts +0 -13
  736. package/build-types/query-controls/stories/index.d.ts.map +0 -1
  737. package/build-types/radio-control/stories/index.d.ts +0 -12
  738. package/build-types/radio-control/stories/index.d.ts.map +0 -1
  739. package/build-types/range-control/stories/index.d.ts +0 -48
  740. package/build-types/range-control/stories/index.d.ts.map +0 -1
  741. package/build-types/resizable-box/stories/index.d.ts +0 -61
  742. package/build-types/resizable-box/stories/index.d.ts.map +0 -1
  743. package/build-types/responsive-wrapper/stories/index.d.ts +0 -22
  744. package/build-types/responsive-wrapper/stories/index.d.ts.map +0 -1
  745. package/build-types/sandbox/stories/index.d.ts +0 -12
  746. package/build-types/sandbox/stories/index.d.ts.map +0 -1
  747. package/build-types/scroll-lock/stories/index.d.ts +0 -9
  748. package/build-types/scroll-lock/stories/index.d.ts.map +0 -1
  749. package/build-types/scrollable/stories/index.d.ts +0 -9
  750. package/build-types/scrollable/stories/index.d.ts.map +0 -1
  751. package/build-types/search-control/stories/index.d.ts +0 -47
  752. package/build-types/search-control/stories/index.d.ts.map +0 -1
  753. package/build-types/select-control/stories/index.d.ts +0 -19
  754. package/build-types/select-control/stories/index.d.ts.map +0 -1
  755. package/build-types/snackbar/stories/index.d.ts +0 -16
  756. package/build-types/snackbar/stories/index.d.ts.map +0 -1
  757. package/build-types/snackbar/stories/list.d.ts +0 -12
  758. package/build-types/snackbar/stories/list.d.ts.map +0 -1
  759. package/build-types/spacer/stories/index.d.ts +0 -12
  760. package/build-types/spacer/stories/index.d.ts.map +0 -1
  761. package/build-types/spinner/stories/index.d.ts +0 -13
  762. package/build-types/spinner/stories/index.d.ts.map +0 -1
  763. package/build-types/surface/stories/index.d.ts +0 -12
  764. package/build-types/surface/stories/index.d.ts.map +0 -1
  765. package/build-types/tab-panel/stories/index.d.ts +0 -16
  766. package/build-types/tab-panel/stories/index.d.ts.map +0 -1
  767. package/build-types/text-control/stories/index.d.ts +0 -13
  768. package/build-types/text-control/stories/index.d.ts.map +0 -1
  769. package/build-types/text-highlight/stories/index.d.ts +0 -12
  770. package/build-types/text-highlight/stories/index.d.ts.map +0 -1
  771. package/build-types/textarea-control/stories/index.d.ts +0 -12
  772. package/build-types/textarea-control/stories/index.d.ts.map +0 -1
  773. package/build-types/theme/stories/index.d.ts +0 -17
  774. package/build-types/theme/stories/index.d.ts.map +0 -1
  775. package/build-types/tip/stories/index.d.ts +0 -12
  776. package/build-types/tip/stories/index.d.ts.map +0 -1
  777. package/build-types/toggle-control/stories/index.d.ts +0 -13
  778. package/build-types/toggle-control/stories/index.d.ts.map +0 -1
  779. package/build-types/toggle-group-control/stories/index.d.ts +0 -27
  780. package/build-types/toggle-group-control/stories/index.d.ts.map +0 -1
  781. package/build-types/toolbar/stories/index.d.ts +0 -14
  782. package/build-types/toolbar/stories/index.d.ts.map +0 -1
  783. package/build-types/tools-panel/stories/index.d.ts +0 -17
  784. package/build-types/tools-panel/stories/index.d.ts.map +0 -1
  785. package/build-types/tree-grid/stories/index.d.ts +0 -13
  786. package/build-types/tree-grid/stories/index.d.ts.map +0 -1
  787. package/build-types/tree-select/stories/index.d.ts +0 -12
  788. package/build-types/tree-select/stories/index.d.ts.map +0 -1
  789. package/build-types/truncate/stories/index.d.ts +0 -13
  790. package/build-types/truncate/stories/index.d.ts.map +0 -1
  791. package/build-types/ui/control-group/component.d.ts +0 -27
  792. package/build-types/ui/control-group/component.d.ts.map +0 -1
  793. package/build-types/ui/control-group/context.d.ts +0 -4
  794. package/build-types/ui/control-group/context.d.ts.map +0 -1
  795. package/build-types/ui/control-group/hook.d.ts +0 -266
  796. package/build-types/ui/control-group/hook.d.ts.map +0 -1
  797. package/build-types/ui/control-group/index.d.ts +0 -4
  798. package/build-types/ui/control-group/index.d.ts.map +0 -1
  799. package/build-types/ui/control-group/styles.d.ts +0 -8
  800. package/build-types/ui/control-group/styles.d.ts.map +0 -1
  801. package/build-types/ui/control-group/types.d.ts +0 -27
  802. package/build-types/ui/control-group/types.d.ts.map +0 -1
  803. package/build-types/ui/control-label/component.d.ts +0 -23
  804. package/build-types/ui/control-label/component.d.ts.map +0 -1
  805. package/build-types/ui/control-label/hook.d.ts +0 -265
  806. package/build-types/ui/control-label/hook.d.ts.map +0 -1
  807. package/build-types/ui/control-label/index.d.ts +0 -3
  808. package/build-types/ui/control-label/index.d.ts.map +0 -1
  809. package/build-types/ui/control-label/styles.d.ts +0 -7
  810. package/build-types/ui/control-label/styles.d.ts.map +0 -1
  811. package/build-types/ui/control-label/types.d.ts +0 -9
  812. package/build-types/ui/control-label/types.d.ts.map +0 -1
  813. package/build-types/ui/form-group/form-group-content.d.ts +0 -7
  814. package/build-types/ui/form-group/form-group-content.d.ts.map +0 -1
  815. package/build-types/ui/form-group/form-group-context.d.ts +0 -11
  816. package/build-types/ui/form-group/form-group-context.d.ts.map +0 -1
  817. package/build-types/ui/form-group/form-group-help.d.ts +0 -18
  818. package/build-types/ui/form-group/form-group-help.d.ts.map +0 -1
  819. package/build-types/ui/form-group/form-group-label.d.ts +0 -8
  820. package/build-types/ui/form-group/form-group-label.d.ts.map +0 -1
  821. package/build-types/ui/form-group/form-group-styles.d.ts +0 -2
  822. package/build-types/ui/form-group/form-group-styles.d.ts.map +0 -1
  823. package/build-types/ui/form-group/form-group.d.ts +0 -53
  824. package/build-types/ui/form-group/form-group.d.ts.map +0 -1
  825. package/build-types/ui/form-group/index.d.ts +0 -4
  826. package/build-types/ui/form-group/index.d.ts.map +0 -1
  827. package/build-types/ui/form-group/types.d.ts +0 -30
  828. package/build-types/ui/form-group/types.d.ts.map +0 -1
  829. package/build-types/ui/form-group/use-form-group.d.ts +0 -593
  830. package/build-types/ui/form-group/use-form-group.d.ts.map +0 -1
  831. package/build-types/ui/index.d.ts +0 -6
  832. package/build-types/ui/index.d.ts.map +0 -1
  833. package/build-types/ui/spinner/component.d.ts +0 -13
  834. package/build-types/ui/spinner/component.d.ts.map +0 -1
  835. package/build-types/ui/spinner/index.d.ts +0 -2
  836. package/build-types/ui/spinner/index.d.ts.map +0 -1
  837. package/build-types/ui/spinner/styles.d.ts +0 -13
  838. package/build-types/ui/spinner/styles.d.ts.map +0 -1
  839. package/build-types/ui/spinner/utils.d.ts +0 -3
  840. package/build-types/ui/spinner/utils.d.ts.map +0 -1
  841. package/build-types/ui/utils/get-high-dpi.d.ts +0 -3
  842. package/build-types/ui/utils/get-high-dpi.d.ts.map +0 -1
  843. package/build-types/unit-control/stories/index.d.ts +0 -33
  844. package/build-types/unit-control/stories/index.d.ts.map +0 -1
  845. package/build-types/utils/browsers.d.ts +0 -11
  846. package/build-types/utils/browsers.d.ts.map +0 -1
  847. package/build-types/utils/events.d.ts +0 -11
  848. package/build-types/utils/events.d.ts.map +0 -1
  849. package/build-types/v-stack/stories/e2e/index.d.ts +0 -9
  850. package/build-types/v-stack/stories/e2e/index.d.ts.map +0 -1
  851. package/build-types/v-stack/stories/index.d.ts +0 -13
  852. package/build-types/v-stack/stories/index.d.ts.map +0 -1
  853. package/build-types/view/stories/index.d.ts +0 -12
  854. package/build-types/view/stories/index.d.ts.map +0 -1
  855. package/build-types/visually-hidden/stories/index.d.ts +0 -14
  856. package/build-types/visually-hidden/stories/index.d.ts.map +0 -1
  857. package/build-types/z-stack/stories/index.d.ts +0 -6
  858. package/build-types/z-stack/stories/index.d.ts.map +0 -1
  859. package/src/popover/limit-shift.ts +0 -205
  860. package/src/ui/utils/get-high-dpi.ts +0 -20
  861. package/src/utils/browsers.js +0 -36
  862. package/src/utils/events.ts +0 -50
  863. package/src/utils/test/events.js +0 -63
  864. package/src/utils/test/values.js +0 -101
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 25.7.0 (2023-08-31)
6
+
7
+ ### Enhancements
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)).
10
+ - `ProgressBar`: Add transition to determinate indicator ([#53877](https://github.com/WordPress/gutenberg/pull/53877)).
11
+ - Prevent nested `SlotFillProvider` from rendering ([#53940](https://github.com/WordPress/gutenberg/pull/53940)).
12
+
13
+ ### Bug Fix
14
+
15
+ - `SandBox`: Fix the cleanup method in useEffect ([#53796](https://github.com/WordPress/gutenberg/pull/53796)).
16
+ - `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)).
17
+
18
+ ### Internal
19
+
20
+ - `Shortcut`: Add Storybook stories ([#53627](https://github.com/WordPress/gutenberg/pull/53627)).
21
+ - `SlotFill`: Do not render children when using `<Slot bubblesVirtually />`. ([#53272](https://github.com/WordPress/gutenberg/pull/53272))
22
+ - Update `@floating-ui/react-dom` to the latest version ([#46845](https://github.com/WordPress/gutenberg/pull/46845)).
23
+
5
24
  ## 25.6.0 (2023-08-16)
6
25
 
7
26
  ### Enhancements
@@ -25,7 +44,9 @@
25
44
 
26
45
  - `ControlGroup`, `FormGroup`, `ControlLabel`, `Spinner`: Remove unused `ui/` components from the codebase ([#52953](https://github.com/WordPress/gutenberg/pull/52953)).
27
46
  - `MenuItem`: Convert to TypeScript ([#53132](https://github.com/WordPress/gutenberg/pull/53132)).
47
+ - `MenuItem`: Add Storybook stories ([#53613](https://github.com/WordPress/gutenberg/pull/53613)).
28
48
  - `MenuGroup`: Add Storybook stories ([#53090](https://github.com/WordPress/gutenberg/pull/53090)).
49
+ - Components: Remove unnecessary utils ([#53679](https://github.com/WordPress/gutenberg/pull/53679)).
29
50
 
30
51
  ## 25.5.0 (2023-08-10)
31
52
 
@@ -37,7 +58,6 @@
37
58
 
38
59
  - `ColorPalette`, `BorderControl`: Don't hyphenate hex value in `aria-label` ([#52932](https://github.com/WordPress/gutenberg/pull/52932)).
39
60
  - `MenuItemsChoice`, `MenuItem`: Support a `disabled` prop on a menu item ([#52737](https://github.com/WordPress/gutenberg/pull/52737)).
40
- - `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)).
41
61
 
42
62
  ### Bug Fix
43
63
 
package/CONTRIBUTING.md CHANGED
@@ -619,10 +619,10 @@ 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
- docs: { source: { state: 'open' } },
625
+ docs: { canvas: { sourceState: 'shown' } },
626
626
  },
627
627
  };
628
628
  ```
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.
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.showTransparentBackground = exports.normalizeColorValue = exports.isMultiplePaletteObject = exports.isMultiplePaletteArray = exports.extractColorNameFromCurrentValue = void 0;
7
+ exports.normalizeColorValue = exports.isMultiplePaletteObject = exports.isMultiplePaletteArray = exports.extractColorNameFromCurrentValue = void 0;
8
8
  var _colord = require("colord");
9
9
  var _names = _interopRequireDefault(require("colord/plugins/names"));
10
10
  var _a11y = _interopRequireDefault(require("colord/plugins/a11y"));
@@ -47,17 +47,10 @@ const extractColorNameFromCurrentValue = (currentValue, colors = [], showMultipl
47
47
  // translators: shown when the user has picked a custom color (i.e not in the palette of colors).
48
48
  return (0, _i18n.__)('Custom');
49
49
  };
50
- exports.extractColorNameFromCurrentValue = extractColorNameFromCurrentValue;
51
- const showTransparentBackground = currentValue => {
52
- if (typeof currentValue === 'undefined') {
53
- return true;
54
- }
55
- return (0, _colord.colord)(currentValue).alpha() === 0;
56
- };
57
50
 
58
51
  // The PaletteObject type has a `colors` property (an array of ColorObject),
59
52
  // while the ColorObject type has a `color` property (the CSS color value).
60
- exports.showTransparentBackground = showTransparentBackground;
53
+ exports.extractColorNameFromCurrentValue = extractColorNameFromCurrentValue;
61
54
  const isMultiplePaletteObject = obj => Array.isArray(obj.colors) && !('color' in obj);
62
55
  exports.isMultiplePaletteObject = isMultiplePaletteObject;
63
56
  const isMultiplePaletteArray = arr => {
@@ -1 +1 @@
1
- {"version":3,"names":["_colord","require","_names","_interopRequireDefault","_a11y","_i18n","extend","namesPlugin","a11yPlugin","extractColorNameFromCurrentValue","currentValue","colors","showMultiplePalettes","currentValueIsCssVariable","test","normalizedCurrentValue","colord","toHex","colorPalettes","paletteColors","name","colorName","color","colorValue","normalizedColorValue","__","exports","showTransparentBackground","alpha","isMultiplePaletteObject","obj","Array","isArray","isMultiplePaletteArray","arr","length","every","colorObj","normalizeColorValue","value","element","ownerDocument","defaultView","computedBackgroundColor","getComputedStyle","backgroundColor"],"sources":["@wordpress/components/src/color-palette/utils.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { ColorObject, ColorPaletteProps, PaletteObject } from './types';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\nexport const extractColorNameFromCurrentValue = (\n\tcurrentValue?: ColorPaletteProps[ 'value' ],\n\tcolors: ColorPaletteProps[ 'colors' ] = [],\n\tshowMultiplePalettes: boolean = false\n) => {\n\tif ( ! currentValue ) {\n\t\treturn '';\n\t}\n\n\tconst currentValueIsCssVariable = /^var\\(/.test( currentValue );\n\tconst normalizedCurrentValue = currentValueIsCssVariable\n\t\t? currentValue\n\t\t: colord( currentValue ).toHex();\n\n\t// Normalize format of `colors` to simplify the following loop\n\ttype normalizedPaletteObject = { colors: ColorObject[] };\n\tconst colorPalettes: normalizedPaletteObject[] = showMultiplePalettes\n\t\t? ( colors as PaletteObject[] )\n\t\t: [ { colors: colors as ColorObject[] } ];\n\tfor ( const { colors: paletteColors } of colorPalettes ) {\n\t\tfor ( const { name: colorName, color: colorValue } of paletteColors ) {\n\t\t\tconst normalizedColorValue = currentValueIsCssVariable\n\t\t\t\t? colorValue\n\t\t\t\t: colord( colorValue ).toHex();\n\n\t\t\tif ( normalizedCurrentValue === normalizedColorValue ) {\n\t\t\t\treturn colorName;\n\t\t\t}\n\t\t}\n\t}\n\n\t// translators: shown when the user has picked a custom color (i.e not in the palette of colors).\n\treturn __( 'Custom' );\n};\n\nexport const showTransparentBackground = ( currentValue?: string ) => {\n\tif ( typeof currentValue === 'undefined' ) {\n\t\treturn true;\n\t}\n\treturn colord( currentValue ).alpha() === 0;\n};\n\n// The PaletteObject type has a `colors` property (an array of ColorObject),\n// while the ColorObject type has a `color` property (the CSS color value).\nexport const isMultiplePaletteObject = (\n\tobj: PaletteObject | ColorObject\n): obj is PaletteObject =>\n\tArray.isArray( ( obj as PaletteObject ).colors ) && ! ( 'color' in obj );\n\nexport const isMultiplePaletteArray = (\n\tarr: ( PaletteObject | ColorObject )[]\n): arr is PaletteObject[] => {\n\treturn (\n\t\tarr.length > 0 &&\n\t\tarr.every( ( colorObj ) => isMultiplePaletteObject( colorObj ) )\n\t);\n};\n\n/**\n * Transform a CSS variable used as background color into the color value itself.\n *\n * @param value The color value that may be a CSS variable.\n * @param element The element for which to get the computed style.\n * @return The background color value computed from a element.\n */\nexport const normalizeColorValue = (\n\tvalue: string | undefined,\n\telement: HTMLElement | null\n) => {\n\tconst currentValueIsCssVariable = /^var\\(/.test( value ?? '' );\n\n\tif ( ! currentValueIsCssVariable || element === null ) {\n\t\treturn value;\n\t}\n\n\tconst { ownerDocument } = element;\n\tconst { defaultView } = ownerDocument;\n\tconst computedBackgroundColor =\n\t\tdefaultView?.getComputedStyle( element ).backgroundColor;\n\n\treturn computedBackgroundColor\n\t\t? colord( computedBackgroundColor ).toHex()\n\t\t: value;\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAKA,IAAAI,KAAA,GAAAJ,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAQA,IAAAK,cAAM,EAAE,CAAEC,cAAW,EAAEC,aAAU,CAAG,CAAC;AAE9B,MAAMC,gCAAgC,GAAGA,CAC/CC,YAA2C,EAC3CC,MAAqC,GAAG,EAAE,EAC1CC,oBAA6B,GAAG,KAAK,KACjC;EACJ,IAAK,CAAEF,YAAY,EAAG;IACrB,OAAO,EAAE;EACV;EAEA,MAAMG,yBAAyB,GAAG,QAAQ,CAACC,IAAI,CAAEJ,YAAa,CAAC;EAC/D,MAAMK,sBAAsB,GAAGF,yBAAyB,GACrDH,YAAY,GACZ,IAAAM,cAAM,EAAEN,YAAa,CAAC,CAACO,KAAK,CAAC,CAAC;;EAEjC;;EAEA,MAAMC,aAAwC,GAAGN,oBAA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BAAmB,GAAGA,CAClCC,KAAyB,EACzBC,OAA2B,KACvB;EACJ,MAAM3B,yBAAyB,GAAG,QAAQ,CAACC,IAAI,CAAEyB,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAG,CAAC;EAE9D,IAAK,CAAE1B,yBAAyB,IAAI2B,OAAO,KAAK,IAAI,EAAG;IACtD,OAAOD,KAAK;EACb;EAEA,MAAM;IAAEE;EAAc,CAAC,GAAGD,OAAO;EACjC,MAAM;IAAEE;EAAY,CAAC,GAAGD,aAAa;EACrC,MAAME,uBAAuB,GAC5BD,WAAW,EAAEE,gBAAgB,CAAEJ,OAAQ,CAAC,CAACK,eAAe;EAEzD,OAAOF,uBAAuB,GAC3B,IAAA3B,cAAM,EAAE2B,uBAAwB,CAAC,CAAC1B,KAAK,CAAC,CAAC,GACzCsB,KAAK;AACT,CAAC;AAACb,OAAA,CAAAY,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"names":["_colord","require","_names","_interopRequireDefault","_a11y","_i18n","extend","namesPlugin","a11yPlugin","extractColorNameFromCurrentValue","currentValue","colors","showMultiplePalettes","currentValueIsCssVariable","test","normalizedCurrentValue","colord","toHex","colorPalettes","paletteColors","name","colorName","color","colorValue","normalizedColorValue","__","exports","isMultiplePaletteObject","obj","Array","isArray","isMultiplePaletteArray","arr","length","every","colorObj","normalizeColorValue","value","element","ownerDocument","defaultView","computedBackgroundColor","getComputedStyle","backgroundColor"],"sources":["@wordpress/components/src/color-palette/utils.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { ColorObject, ColorPaletteProps, PaletteObject } from './types';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\nexport const extractColorNameFromCurrentValue = (\n\tcurrentValue?: ColorPaletteProps[ 'value' ],\n\tcolors: ColorPaletteProps[ 'colors' ] = [],\n\tshowMultiplePalettes: boolean = false\n) => {\n\tif ( ! currentValue ) {\n\t\treturn '';\n\t}\n\n\tconst currentValueIsCssVariable = /^var\\(/.test( currentValue );\n\tconst normalizedCurrentValue = currentValueIsCssVariable\n\t\t? currentValue\n\t\t: colord( currentValue ).toHex();\n\n\t// Normalize format of `colors` to simplify the following loop\n\ttype normalizedPaletteObject = { colors: ColorObject[] };\n\tconst colorPalettes: normalizedPaletteObject[] = showMultiplePalettes\n\t\t? ( colors as PaletteObject[] )\n\t\t: [ { colors: colors as ColorObject[] } ];\n\tfor ( const { colors: paletteColors } of colorPalettes ) {\n\t\tfor ( const { name: colorName, color: colorValue } of paletteColors ) {\n\t\t\tconst normalizedColorValue = currentValueIsCssVariable\n\t\t\t\t? colorValue\n\t\t\t\t: colord( colorValue ).toHex();\n\n\t\t\tif ( normalizedCurrentValue === normalizedColorValue ) {\n\t\t\t\treturn colorName;\n\t\t\t}\n\t\t}\n\t}\n\n\t// translators: shown when the user has picked a custom color (i.e not in the palette of colors).\n\treturn __( 'Custom' );\n};\n\n// The PaletteObject type has a `colors` property (an array of ColorObject),\n// while the ColorObject type has a `color` property (the CSS color value).\nexport const isMultiplePaletteObject = (\n\tobj: PaletteObject | ColorObject\n): obj is PaletteObject =>\n\tArray.isArray( ( obj as PaletteObject ).colors ) && ! ( 'color' in obj );\n\nexport const isMultiplePaletteArray = (\n\tarr: ( PaletteObject | ColorObject )[]\n): arr is PaletteObject[] => {\n\treturn (\n\t\tarr.length > 0 &&\n\t\tarr.every( ( colorObj ) => isMultiplePaletteObject( colorObj ) )\n\t);\n};\n\n/**\n * Transform a CSS variable used as background color into the color value itself.\n *\n * @param value The color value that may be a CSS variable.\n * @param element The element for which to get the computed style.\n * @return The background color value computed from a element.\n */\nexport const normalizeColorValue = (\n\tvalue: string | undefined,\n\telement: HTMLElement | null\n) => {\n\tconst currentValueIsCssVariable = /^var\\(/.test( value ?? '' );\n\n\tif ( ! currentValueIsCssVariable || element === null ) {\n\t\treturn value;\n\t}\n\n\tconst { ownerDocument } = element;\n\tconst { defaultView } = ownerDocument;\n\tconst computedBackgroundColor =\n\t\tdefaultView?.getComputedStyle( element ).backgroundColor;\n\n\treturn computedBackgroundColor\n\t\t? colord( computedBackgroundColor ).toHex()\n\t\t: value;\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAKA,IAAAI,KAAA,GAAAJ,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAQA,IAAAK,cAAM,EAAE,CAAEC,cAAW,EAAEC,aAAU,CAAG,CAAC;AAE9B,MAAMC,gCAAgC,GAAGA,CAC/CC,YAA2C,EAC3CC,MAAqC,GAAG,EAAE,EAC1CC,oBAA6B,GAAG,KAAK,KACjC;EACJ,IAAK,CAAEF,YAAY,EAAG;IACrB,OAAO,EAAE;EACV;EAEA,MAAMG,yBAAyB,GAAG,QAAQ,CAACC,IAAI,CAAEJ,YAAa,CAAC;EAC/D,MAAMK,sBAAsB,GAAGF,yBAAyB,GACrDH,YAAY,GACZ,IAAAM,cAAM,EAAEN,YAAa,CAAC,CAACO,KAAK,CAAC,CAAC;;EAEjC;;EAEA,MAAMC,aAAwC,GAAGN,oBAAoB,GAChED,MAAM,GACR,CAAE;IAAEA,MAAM,EAAEA;EAAwB,CAAC,CAAE;EAC1C,KAAM,MAAM;IAAEA,MAAM,EAAEQ;EAAc,CAAC,IAAID,aAAa,EAAG;IACxD,KAAM,MAAM;MAAEE,IAAI,EAAEC,SAAS;MAAEC,KAAK,EAAEC;IAAW,CAAC,IAAIJ,aAAa,EAAG;MACrE,MAAMK,oBAAoB,GAAGX,yBAAyB,GACnDU,UAAU,GACV,IAAAP,cAAM,EAAEO,UAAW,CAAC,CAACN,KAAK,CAAC,CAAC;MAE/B,IA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ict";
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,GAAAF,sBAAA,CAAAH,OAAA;AAfA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAKA,MAAMM,cAAc,GAAKC,KAAK,IAAM;EACnC,MAAMC,QAAQ,GAAGC,uBAAU,CAACC,GAAG,CAAE,QAAS,CAAC,CAACC,KAAK,GAAG,EAAE;EACtD,MAAMC,eAAe,GAAG,IAAAC,eAAM,EAAE,IAAK,CAAC;EAEtC,MAAM;IACLC,cAAc,GAAG,CAAC,CAAC;IACnBC,YAAY;IACZC,uBAAuB,GAAG,CAAC,CAAC;IAC5BC,qBAAqB,G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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,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAA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GAEH,IAAA5F,QAAA,CAAAoF,aAAA,EAAChF,0BAAA,CAAAU,OAAc;MACd+E,MAAM,EAAG5D,SAAW;MACpBqD,KAAK,EAAG;QACPH;MACD,CAAG;MACHW,KAAK,EAAG;QAAEC,CAAC,EAAE,CAAC;QAAEC,CAAC,EAAE;MAAE,CAAG;MACxBC,GAAG,EAAG;QAAEF,CAAC,EAAE,CAAC;QAAEC,CAAC,EAAE;MAAE;IAAG,GAEtB,IAAAhG,QAAA,CAAAoF,aAAA,EAACjF,YAAA,CAAAkF,IAAI;MACJC,KAAK,EAAG;QACPY,KAAK,EAAErC,QAAQ;QACfsC,MAAM,EAAE9D;MACT;IAAG,CACH,CACc,CAAC,EACjB,IAAArC,QAAA,CAAAoF,aAAA,EAACjF,YAAA,CAAAgC,QAAQ,CAACkD,IAAI;MACbe,aAAa,EAAC,MAAM;MACpBd,KAAK,EAAG,CACPf,cAAM,CAAE,YAAY,CAAE,EACtB;QACC2B,KAAK,EAAEpC,UAAU;QACjBqC,MAAM,EAAErC,UAAU;QAClB6B,IAAI,EAAE,CAAE7B,UAAU,GAAGC,WAAW,IAAK,CAAC;QACtCoB,YAAY,EAAErB,UAAU,GAAG,CAAC;QAC5BuC,SAAS,EAAE,CACV;UACCC,UAAU,EAAE,IAAI,CAACpE;QAClB,CAAC;MAEH,CAAC;IACC,CACH,CACI,CAAC;EAET;AACD;AAACqE,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{ __( '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":";;;;;;;AAUA,IAAAA,QAAA,GAAAC,OAAA;AA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tF,YAAA,CAAAgH,IAAI;IAACH,KAAK,EAAG7C;EAAmB,GAC9B,IAAAiD,QAAE,EAAE,QAAS,CACV,CAAC,GAEP,IAAAnH,QAAA,CAAAwF,aAAA,EAAC9E,MAAA,CAAA0G,IAAI;IACJC,IAAI,EAAGC,YAAO;IACdC,IAAI,EAAG,EAAI;IACXR,KAAK,EAAG7C;EAAmB,CAC3B,CAEG,CACmB,CAAC,EACzBzC,eAAe,GAChB,IAAAzB,QAAA,CAAAwF,aAAA,EAACtF,YAAA,CAAAgH,IAAI;IAACH,KAAK,EAAGvC;EAAsB,GACjC/C,eACG,CAAC,GAEP,IAAAzB,QAAA,CAAAwF,aAAA,EAACtF,YAAA,CAAAgH,IAAI;IAACH,KAAK,EAAG1C,cAAgB;IAACmD,UAAU;EAAA,GACtCxC,YAAY,CAACyC,WAAW,CAAC,CACtB,CACN,EACD,IAAAzH,QAAA,CAAAwF,aAAA,EAACtF,YAAA,CAAA8G,wBAAwB;IACxBC,OAAO,EAAGA,CAAA,KAAM3B,aAAa,CAAE,OAAQ,CAAG;IAC1CzD,OAAO,EAAGA;EAAS,GAEnB,IAAA7B,QAAA,CAAAwF,aAAA,EAACtF,YAAA,CAAA4G,IAAI,QACFpF,KAAK,GACN,IAAA1B,QAAA,CAAAwF,aAAA,EAACtF,YAAA,CAAAgH,IAAI;IAACH,KAAK,EAAGjD;EAAkB,GAC7B,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,OAAA;AAIA,IAAAS,MAAA,GAAAL,sBAAA,CAAAJ,OAAA;AACA,IAAAU,qBAAA,GAAAN,sBAAA,CAAAJ,OAAA;AAlBA;AACA;AACA;;AAIA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,IAAAW,cAAM,EAAE,CAAEC,cAAW,CAAG,CAAC;AAEzB,SAASC,WAAWA,CAAE;EACrBC,6BAA6B;EAC7BC,gCAAgC;EAChCC,6BAA6B;EAC7BC,QAAQ;EACRC,WAAW;EACXC,eAAe;EACfC,gBAAgB;EAChBC,0BAA0B;EAC1BC,mBAAmB;EAC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