@wordpress/components 28.9.0 → 28.11.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 (1108) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/build/alignment-matrix-control/icon.js.map +1 -1
  3. package/build/alignment-matrix-control/types.js.map +1 -1
  4. package/build/alignment-matrix-control/utils.js.map +1 -1
  5. package/build/angle-picker-control/angle-circle.js.map +1 -1
  6. package/build/autocomplete/autocompleter-ui.js +5 -9
  7. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  8. package/build/autocomplete/autocompleter-ui.native.js +2 -4
  9. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  10. package/build/autocomplete/get-default-use-items.js.map +1 -1
  11. package/build/autocomplete/index.js +5 -5
  12. package/build/autocomplete/index.js.map +1 -1
  13. package/build/base-control/hooks.js.map +1 -1
  14. package/build/base-control/index.js.map +1 -1
  15. package/build/base-control/types.js.map +1 -1
  16. package/build/border-box-control/border-box-control/component.js +1 -0
  17. package/build/border-box-control/border-box-control/component.js.map +1 -1
  18. package/build/border-box-control/border-box-control/hook.js +6 -0
  19. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  20. package/build/border-box-control/styles.js.map +1 -1
  21. package/build/border-box-control/utils.js.map +1 -1
  22. package/build/border-control/border-control/component.js +1 -0
  23. package/build/border-control/border-control/component.js.map +1 -1
  24. package/build/border-control/border-control/hook.js +6 -0
  25. package/build/border-control/border-control/hook.js.map +1 -1
  26. package/build/border-control/border-control-dropdown/component.js +12 -12
  27. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  28. package/build/border-control/styles.js.map +1 -1
  29. package/build/box-control/axial-input-controls.js.map +1 -1
  30. package/build/box-control/icon.js.map +1 -1
  31. package/build/box-control/index.js.map +1 -1
  32. package/build/box-control/input-controls.js.map +1 -1
  33. package/build/button/index.native.js +1 -1
  34. package/build/button/index.native.js.map +1 -1
  35. package/build/card/card/component.js +1 -1
  36. package/build/card/card/component.js.map +1 -1
  37. package/build/card/styles.js.map +1 -1
  38. package/build/color-palette/index.js +1 -1
  39. package/build/color-palette/index.js.map +1 -1
  40. package/build/color-palette/index.native.js +3 -3
  41. package/build/color-palette/index.native.js.map +1 -1
  42. package/build/color-picker/index.native.js +0 -1
  43. package/build/color-picker/index.native.js.map +1 -1
  44. package/build/color-picker/styles.js.map +1 -1
  45. package/build/combobox-control/index.js +1 -1
  46. package/build/combobox-control/index.js.map +1 -1
  47. package/build/composite/legacy/index.js +5 -2
  48. package/build/composite/legacy/index.js.map +1 -1
  49. package/build/context/context-connect.js +1 -0
  50. package/build/context/context-connect.js.map +1 -1
  51. package/build/context/context-system-provider.js +1 -1
  52. package/build/context/context-system-provider.js.map +1 -1
  53. package/build/context/get-styled-class-name-from-key.js.map +1 -1
  54. package/build/custom-gradient-picker/gradient-bar/control-points.js +1 -1
  55. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  56. package/build/custom-gradient-picker/index.js.map +1 -1
  57. package/build/custom-gradient-picker/serializer.js.map +1 -1
  58. package/build/custom-gradient-picker/utils.js.map +1 -1
  59. package/build/custom-select-control-v2/styles.js.map +1 -1
  60. package/build/dashicon/index.js.map +1 -1
  61. package/build/date-time/date/index.js +0 -1
  62. package/build/date-time/date/index.js.map +1 -1
  63. package/build/date-time/date/styles.js.map +1 -1
  64. package/build/date-time/time/timezone.js.map +1 -1
  65. package/build/draggable/index.js.map +1 -1
  66. package/build/drop-zone/index.js +1 -2
  67. package/build/drop-zone/index.js.map +1 -1
  68. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  69. package/build/duotone-picker/utils.js.map +1 -1
  70. package/build/elevation/hook.js.map +1 -1
  71. package/build/external-link/index.js +20 -23
  72. package/build/external-link/index.js.map +1 -1
  73. package/build/focal-point-picker/index.js.map +1 -1
  74. package/build/focal-point-picker/index.native.js.map +1 -1
  75. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  76. package/build/font-size-picker/index.js.map +1 -1
  77. package/build/font-size-picker/index.native.js +6 -6
  78. package/build/font-size-picker/index.native.js.map +1 -1
  79. package/build/form-token-field/index.js +2 -4
  80. package/build/form-token-field/index.js.map +1 -1
  81. package/build/form-token-field/suggestions-list.js +7 -3
  82. package/build/form-token-field/suggestions-list.js.map +1 -1
  83. package/build/form-token-field/token-input.js.map +1 -1
  84. package/build/form-token-field/token.js +1 -1
  85. package/build/form-token-field/token.js.map +1 -1
  86. package/build/gradient-picker/index.js.map +1 -1
  87. package/build/grid/hook.js.map +1 -1
  88. package/build/guide/page-control.js +1 -1
  89. package/build/guide/page-control.js.map +1 -1
  90. package/build/h-stack/hook.js.map +1 -1
  91. package/build/heading/hook.js.map +1 -1
  92. package/build/input-control/index.js.map +1 -1
  93. package/build/input-control/input-base.js.map +1 -1
  94. package/build/input-control/styles/input-control-styles.js.map +1 -1
  95. package/build/item-group/styles.js.map +1 -1
  96. package/build/{dropdown-menu-v2 → menu}/checkbox-item.js +8 -8
  97. package/build/menu/checkbox-item.js.map +1 -0
  98. package/build/{dropdown-menu-v2 → menu}/context.js +2 -2
  99. package/build/menu/context.js.map +1 -0
  100. package/build/{dropdown-menu-v2 → menu}/group-label.js +5 -5
  101. package/build/menu/group-label.js.map +1 -0
  102. package/build/{dropdown-menu-v2 → menu}/group.js +5 -5
  103. package/build/menu/group.js.map +1 -0
  104. package/build/{dropdown-menu-v2 → menu}/index.js +38 -38
  105. package/build/menu/index.js.map +1 -0
  106. package/build/{dropdown-menu-v2 → menu}/item-help-text.js +3 -3
  107. package/build/menu/item-help-text.js.map +1 -0
  108. package/build/{dropdown-menu-v2 → menu}/item-label.js +3 -3
  109. package/build/menu/item-label.js.map +1 -0
  110. package/build/{dropdown-menu-v2 → menu}/item.js +7 -7
  111. package/build/menu/item.js.map +1 -0
  112. package/build/{dropdown-menu-v2 → menu}/radio-item.js +8 -8
  113. package/build/menu/radio-item.js.map +1 -0
  114. package/build/{dropdown-menu-v2 → menu}/separator.js +6 -6
  115. package/build/menu/separator.js.map +1 -0
  116. package/build/menu/styles.js +150 -0
  117. package/build/menu/styles.js.map +1 -0
  118. package/build/menu/types.js.map +1 -0
  119. package/build/menu/use-temporary-focus-visible-fix.js.map +1 -0
  120. package/build/menu-group/index.js.map +1 -1
  121. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +3 -5
  122. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  123. package/build/mobile/bottom-sheet/cell.native.js +4 -4
  124. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  125. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  126. package/build/mobile/bottom-sheet/range-cell.native.js +1 -1
  127. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  128. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  129. package/build/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  130. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  131. package/build/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
  132. package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  133. package/build/mobile/bottom-sheet/switch-cell.native.js +4 -4
  134. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  135. package/build/mobile/bottom-sheet-select-control/index.native.js +2 -2
  136. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  137. package/build/mobile/color-settings/index.native.js +1 -3
  138. package/build/mobile/color-settings/index.native.js.map +1 -1
  139. package/build/mobile/color-settings/picker-screen.native.js +1 -3
  140. package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
  141. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  142. package/build/mobile/gradient/index.native.js.map +1 -1
  143. package/build/mobile/image/index.native.js +1 -3
  144. package/build/mobile/image/index.native.js.map +1 -1
  145. package/build/mobile/keyboard-avoiding-view/index.ios.js +1 -3
  146. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  147. package/build/mobile/link-picker/index.native.js +1 -1
  148. package/build/mobile/link-picker/index.native.js.map +1 -1
  149. package/build/mobile/link-picker/link-picker-results.native.js +2 -5
  150. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  151. package/build/mobile/link-picker/link-picker-screen.native.js +1 -3
  152. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  153. package/build/mobile/link-settings/index.native.js +6 -18
  154. package/build/mobile/link-settings/index.native.js.map +1 -1
  155. package/build/mobile/link-settings/link-settings-screen.native.js +1 -3
  156. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  157. package/build/mobile/picker/index.android.js.map +1 -1
  158. package/build/mobile/segmented-control/index.native.js +2 -6
  159. package/build/mobile/segmented-control/index.native.js.map +1 -1
  160. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  161. package/build/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
  162. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  163. package/build/modal/aria-helper.js +2 -1
  164. package/build/modal/aria-helper.js.map +1 -1
  165. package/build/modal/index.js +2 -1
  166. package/build/modal/index.js.map +1 -1
  167. package/build/modal/use-modal-exit-animation.js.map +1 -1
  168. package/build/navigation/group/index.js.map +1 -1
  169. package/build/navigation/index.js +1 -2
  170. package/build/navigation/index.js.map +1 -1
  171. package/build/navigation/item/base.js.map +1 -1
  172. package/build/navigation/item/use-navigation-tree-item.js +2 -2
  173. package/build/navigation/item/use-navigation-tree-item.js.map +1 -1
  174. package/build/navigation/menu/index.js.map +1 -1
  175. package/build/navigation/menu/menu-title-search.js +4 -4
  176. package/build/navigation/menu/menu-title-search.js.map +1 -1
  177. package/build/navigation/menu/menu-title.js.map +1 -1
  178. package/build/navigation/menu/use-navigation-tree-menu.js +2 -2
  179. package/build/navigation/menu/use-navigation-tree-menu.js.map +1 -1
  180. package/build/navigation/styles/navigation-styles.js.map +1 -1
  181. package/build/navigator/navigator/component.js.map +1 -1
  182. package/build/navigator/navigator-button/hook.js.map +1 -1
  183. package/build/number-control/styles/number-control-styles.js.map +1 -1
  184. package/build/palette-edit/index.js +29 -4
  185. package/build/palette-edit/index.js.map +1 -1
  186. package/build/palette-edit/styles.js +13 -28
  187. package/build/palette-edit/styles.js.map +1 -1
  188. package/build/popover/index.js +1 -1
  189. package/build/popover/index.js.map +1 -1
  190. package/build/popover/overlay-middlewares.js.map +1 -1
  191. package/build/popover/utils.js.map +1 -1
  192. package/build/private-apis.js +4 -4
  193. package/build/private-apis.js.map +1 -1
  194. package/build/progress-bar/index.js.map +1 -1
  195. package/build/progress-bar/styles.js.map +1 -1
  196. package/build/query-controls/index.js.map +1 -1
  197. package/build/query-controls/index.native.js.map +1 -1
  198. package/build/radio-control/index.js.map +1 -1
  199. package/build/radio-control/index.native.js.map +1 -1
  200. package/build/radio-group/index.js +3 -1
  201. package/build/radio-group/index.js.map +1 -1
  202. package/build/range-control/index.js.map +1 -1
  203. package/build/range-control/index.native.js.map +1 -1
  204. package/build/range-control/rail.js.map +1 -1
  205. package/build/range-control/styles/range-control-styles.js +32 -32
  206. package/build/range-control/styles/range-control-styles.js.map +1 -1
  207. package/build/range-control/tooltip.js +1 -1
  208. package/build/range-control/tooltip.js.map +1 -1
  209. package/build/range-control/utils.js.map +1 -1
  210. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  211. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  212. package/build/responsive-wrapper/index.js.map +1 -1
  213. package/build/sandbox/index.js +3 -6
  214. package/build/sandbox/index.js.map +1 -1
  215. package/build/sandbox/index.native.js +1 -3
  216. package/build/sandbox/index.native.js.map +1 -1
  217. package/build/search-control/index.js +6 -0
  218. package/build/search-control/index.js.map +1 -1
  219. package/build/search-control/index.native.js +1 -3
  220. package/build/search-control/index.native.js.map +1 -1
  221. package/build/search-control/types.js.map +1 -1
  222. package/build/select-control/index.js.map +1 -1
  223. package/build/select-control/index.native.js.map +1 -1
  224. package/build/slot-fill/bubbles-virtually/slot.js +1 -2
  225. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  226. package/build/slot-fill/fill.js +3 -6
  227. package/build/slot-fill/fill.js.map +1 -1
  228. package/build/slot-fill/index.js.map +1 -1
  229. package/build/spacer/hook.js +5 -3
  230. package/build/spacer/hook.js.map +1 -1
  231. package/build/spinner/styles.js.map +1 -1
  232. package/build/style-provider/index.js +1 -0
  233. package/build/style-provider/index.js.map +1 -1
  234. package/build/surface/hook.js.map +1 -1
  235. package/build/surface/styles.js.map +1 -1
  236. package/build/tab-panel/index.js +4 -1
  237. package/build/tab-panel/index.js.map +1 -1
  238. package/build/tabs/index.js +48 -113
  239. package/build/tabs/index.js.map +1 -1
  240. package/build/tabs/styles.js +31 -13
  241. package/build/tabs/styles.js.map +1 -1
  242. package/build/tabs/tab.js +30 -8
  243. package/build/tabs/tab.js.map +1 -1
  244. package/build/tabs/tablist.js +67 -56
  245. package/build/tabs/tablist.js.map +1 -1
  246. package/build/tabs/tabpanel.js.map +1 -1
  247. package/build/tabs/types.js.map +1 -1
  248. package/build/text/get-line-height.js.map +1 -1
  249. package/build/text/styles/text-mixins.native.js.map +1 -1
  250. package/build/text/utils.js.map +1 -1
  251. package/build/text-control/index.native.js.map +1 -1
  252. package/build/text-highlight/index.js.map +1 -1
  253. package/build/textarea-control/index.js.map +1 -1
  254. package/build/theme/color-algorithms.js.map +1 -1
  255. package/build/theme/styles.js.map +1 -1
  256. package/build/toggle-control/index.js.map +1 -1
  257. package/build/toggle-control/index.native.js.map +1 -1
  258. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +9 -1
  259. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  260. package/build/toggle-group-control/toggle-group-control/component.js +4 -61
  261. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  262. package/build/toggle-group-control/toggle-group-control-option-base/component.js +10 -10
  263. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  264. package/build/toggle-group-control/types.js.map +1 -1
  265. package/build/toolbar/toolbar/index.js +3 -0
  266. package/build/toolbar/toolbar/index.js.map +1 -1
  267. package/build/tools-panel/styles.js.map +1 -1
  268. package/build/tools-panel/tools-panel-header/component.js +1 -1
  269. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  270. package/build/tools-panel/tools-panel-item/hook.js +0 -2
  271. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  272. package/build/tooltip/index.js +5 -1
  273. package/build/tooltip/index.js.map +1 -1
  274. package/build/tooltip/index.native.js +5 -15
  275. package/build/tooltip/index.native.js.map +1 -1
  276. package/build/unit-control/index.js.map +1 -1
  277. package/build/unit-control/index.native.js +2 -6
  278. package/build/unit-control/index.native.js.map +1 -1
  279. package/build/unit-control/utils.js.map +1 -1
  280. package/build/utils/breakpoint.js.map +1 -1
  281. package/build/utils/colors-values.js.map +1 -1
  282. package/build/utils/config-values.js.map +1 -1
  283. package/build/utils/deprecated-36px-size.js +27 -0
  284. package/build/utils/deprecated-36px-size.js.map +1 -0
  285. package/build/utils/element-rect.js +13 -2
  286. package/build/utils/element-rect.js.map +1 -1
  287. package/build/utils/font-size.js.map +1 -1
  288. package/build/utils/hooks/use-animated-offset-rect.js +81 -0
  289. package/build/utils/hooks/use-animated-offset-rect.js.map +1 -0
  290. package/build/utils/hooks/use-cx.js.map +1 -1
  291. package/build/utils/hooks/use-update-effect.js +0 -2
  292. package/build/utils/hooks/use-update-effect.js.map +1 -1
  293. package/build/utils/math.js +2 -2
  294. package/build/utils/math.js.map +1 -1
  295. package/build/utils/space.js.map +1 -1
  296. package/build/utils/unit-values.js.map +1 -1
  297. package/build/utils/use-responsive-value.js.map +1 -1
  298. package/build-module/alignment-matrix-control/cell.js +1 -2
  299. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  300. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  301. package/build-module/alignment-matrix-control/types.js.map +1 -1
  302. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  303. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  304. package/build-module/angle-picker-control/index.js +1 -2
  305. package/build-module/angle-picker-control/index.js.map +1 -1
  306. package/build-module/autocomplete/autocompleter-ui.js +6 -12
  307. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  308. package/build-module/autocomplete/autocompleter-ui.native.js +3 -6
  309. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  310. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  311. package/build-module/autocomplete/index.js +6 -8
  312. package/build-module/autocomplete/index.js.map +1 -1
  313. package/build-module/base-control/hooks.js.map +1 -1
  314. package/build-module/base-control/index.js +1 -2
  315. package/build-module/base-control/index.js.map +1 -1
  316. package/build-module/base-control/index.native.js +1 -2
  317. package/build-module/base-control/index.native.js.map +1 -1
  318. package/build-module/base-control/types.js.map +1 -1
  319. package/build-module/border-box-control/border-box-control/component.js +2 -2
  320. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  321. package/build-module/border-box-control/border-box-control/hook.js +6 -0
  322. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  323. package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -2
  324. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  325. package/build-module/border-box-control/styles.js.map +1 -1
  326. package/build-module/border-box-control/utils.js.map +1 -1
  327. package/build-module/border-control/border-control/component.js +2 -2
  328. package/build-module/border-control/border-control/component.js.map +1 -1
  329. package/build-module/border-control/border-control/hook.js +7 -0
  330. package/build-module/border-control/border-control/hook.js.map +1 -1
  331. package/build-module/border-control/border-control-dropdown/component.js +13 -15
  332. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  333. package/build-module/border-control/styles.js.map +1 -1
  334. package/build-module/box-control/all-input-control.js +1 -3
  335. package/build-module/box-control/all-input-control.js.map +1 -1
  336. package/build-module/box-control/axial-input-controls.js +1 -3
  337. package/build-module/box-control/axial-input-controls.js.map +1 -1
  338. package/build-module/box-control/icon.js +1 -2
  339. package/build-module/box-control/icon.js.map +1 -1
  340. package/build-module/box-control/index.js +1 -2
  341. package/build-module/box-control/index.js.map +1 -1
  342. package/build-module/box-control/input-controls.js +1 -3
  343. package/build-module/box-control/input-controls.js.map +1 -1
  344. package/build-module/button/index.js +1 -3
  345. package/build-module/button/index.js.map +1 -1
  346. package/build-module/button/index.native.js +2 -3
  347. package/build-module/button/index.native.js.map +1 -1
  348. package/build-module/card/card/component.js +2 -3
  349. package/build-module/card/card/component.js.map +1 -1
  350. package/build-module/card/styles.js.map +1 -1
  351. package/build-module/checkbox-control/index.js +1 -2
  352. package/build-module/checkbox-control/index.js.map +1 -1
  353. package/build-module/circular-option-picker/circular-option-picker-option.js +1 -2
  354. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  355. package/build-module/circular-option-picker/circular-option-picker.js +1 -2
  356. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  357. package/build-module/color-indicator/index.native.js +1 -2
  358. package/build-module/color-indicator/index.native.js.map +1 -1
  359. package/build-module/color-palette/index.js +2 -3
  360. package/build-module/color-palette/index.js.map +1 -1
  361. package/build-module/color-palette/index.native.js +4 -6
  362. package/build-module/color-palette/index.native.js.map +1 -1
  363. package/build-module/color-picker/component.js +1 -2
  364. package/build-module/color-picker/component.js.map +1 -1
  365. package/build-module/color-picker/hsl-input.js +1 -3
  366. package/build-module/color-picker/hsl-input.js.map +1 -1
  367. package/build-module/color-picker/hsv-color-picker.native.js +1 -2
  368. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -1
  369. package/build-module/color-picker/hue-picker.native.js +1 -2
  370. package/build-module/color-picker/hue-picker.native.js.map +1 -1
  371. package/build-module/color-picker/index.native.js +1 -4
  372. package/build-module/color-picker/index.native.js.map +1 -1
  373. package/build-module/color-picker/input-with-slider.js +1 -2
  374. package/build-module/color-picker/input-with-slider.js.map +1 -1
  375. package/build-module/color-picker/rgb-input.js +1 -3
  376. package/build-module/color-picker/rgb-input.js.map +1 -1
  377. package/build-module/color-picker/saturation-picker.native.js +1 -2
  378. package/build-module/color-picker/saturation-picker.native.js.map +1 -1
  379. package/build-module/color-picker/styles.js.map +1 -1
  380. package/build-module/combobox-control/index.js +2 -3
  381. package/build-module/combobox-control/index.js.map +1 -1
  382. package/build-module/composite/legacy/index.js +5 -2
  383. package/build-module/composite/legacy/index.js.map +1 -1
  384. package/build-module/confirm-dialog/component.js +1 -3
  385. package/build-module/confirm-dialog/component.js.map +1 -1
  386. package/build-module/context/context-connect.js +1 -0
  387. package/build-module/context/context-connect.js.map +1 -1
  388. package/build-module/context/context-system-provider.js +1 -1
  389. package/build-module/context/context-system-provider.js.map +1 -1
  390. package/build-module/context/get-styled-class-name-from-key.js.map +1 -1
  391. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +2 -4
  392. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  393. package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -2
  394. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  395. package/build-module/custom-gradient-picker/index.js +1 -2
  396. package/build-module/custom-gradient-picker/index.js.map +1 -1
  397. package/build-module/custom-gradient-picker/index.native.js +1 -3
  398. package/build-module/custom-gradient-picker/index.native.js.map +1 -1
  399. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  400. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  401. package/build-module/custom-select-control/index.js +1 -3
  402. package/build-module/custom-select-control/index.js.map +1 -1
  403. package/build-module/custom-select-control-v2/custom-select.js +1 -2
  404. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  405. package/build-module/custom-select-control-v2/item.js +1 -2
  406. package/build-module/custom-select-control-v2/item.js.map +1 -1
  407. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  408. package/build-module/dashicon/index.js.map +1 -1
  409. package/build-module/date-time/date/index.js +1 -3
  410. package/build-module/date-time/date/index.js.map +1 -1
  411. package/build-module/date-time/date/styles.js.map +1 -1
  412. package/build-module/date-time/date-time/index.js +1 -3
  413. package/build-module/date-time/date-time/index.js.map +1 -1
  414. package/build-module/date-time/time/index.js +1 -2
  415. package/build-module/date-time/time/index.js.map +1 -1
  416. package/build-module/date-time/time/time-input/index.js +1 -2
  417. package/build-module/date-time/time/time-input/index.js.map +1 -1
  418. package/build-module/date-time/time/timezone.js.map +1 -1
  419. package/build-module/dimension-control/index.js +1 -3
  420. package/build-module/dimension-control/index.js.map +1 -1
  421. package/build-module/draggable/index.js +1 -3
  422. package/build-module/draggable/index.js.map +1 -1
  423. package/build-module/drop-zone/index.js +2 -4
  424. package/build-module/drop-zone/index.js.map +1 -1
  425. package/build-module/dropdown/index.js +1 -2
  426. package/build-module/dropdown/index.js.map +1 -1
  427. package/build-module/dropdown/index.native.js +1 -2
  428. package/build-module/dropdown/index.native.js.map +1 -1
  429. package/build-module/dropdown-menu/index.js +1 -2
  430. package/build-module/dropdown-menu/index.js.map +1 -1
  431. package/build-module/dropdown-menu/index.native.js +1 -2
  432. package/build-module/dropdown-menu/index.native.js.map +1 -1
  433. package/build-module/duotone-picker/color-list-picker/index.js +1 -3
  434. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  435. package/build-module/duotone-picker/duotone-picker.js +1 -2
  436. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  437. package/build-module/duotone-picker/utils.js.map +1 -1
  438. package/build-module/elevation/hook.js.map +1 -1
  439. package/build-module/external-link/index.js +21 -25
  440. package/build-module/external-link/index.js.map +1 -1
  441. package/build-module/external-link/index.native.js +1 -2
  442. package/build-module/external-link/index.native.js.map +1 -1
  443. package/build-module/focal-point-picker/controls.js +1 -2
  444. package/build-module/focal-point-picker/controls.js.map +1 -1
  445. package/build-module/focal-point-picker/focal-point.native.js +1 -2
  446. package/build-module/focal-point-picker/focal-point.native.js.map +1 -1
  447. package/build-module/focal-point-picker/grid.js +1 -2
  448. package/build-module/focal-point-picker/grid.js.map +1 -1
  449. package/build-module/focal-point-picker/index.js +1 -2
  450. package/build-module/focal-point-picker/index.js.map +1 -1
  451. package/build-module/focal-point-picker/index.native.js +1 -2
  452. package/build-module/focal-point-picker/index.native.js.map +1 -1
  453. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  454. package/build-module/focal-point-picker/tooltip/index.native.js +1 -2
  455. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  456. package/build-module/font-size-picker/index.js +1 -2
  457. package/build-module/font-size-picker/index.js.map +1 -1
  458. package/build-module/font-size-picker/index.native.js +8 -10
  459. package/build-module/font-size-picker/index.native.js.map +1 -1
  460. package/build-module/form-file-upload/index.js +1 -2
  461. package/build-module/form-file-upload/index.js.map +1 -1
  462. package/build-module/form-toggle/index.js +1 -2
  463. package/build-module/form-toggle/index.js.map +1 -1
  464. package/build-module/form-token-field/index.js +3 -6
  465. package/build-module/form-token-field/index.js.map +1 -1
  466. package/build-module/form-token-field/suggestions-list.js +8 -5
  467. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  468. package/build-module/form-token-field/token-input.js.map +1 -1
  469. package/build-module/form-token-field/token.js +2 -3
  470. package/build-module/form-token-field/token.js.map +1 -1
  471. package/build-module/gradient-picker/index.js +1 -2
  472. package/build-module/gradient-picker/index.js.map +1 -1
  473. package/build-module/grid/hook.js.map +1 -1
  474. package/build-module/guide/index.js +1 -2
  475. package/build-module/guide/index.js.map +1 -1
  476. package/build-module/guide/page-control.js +1 -1
  477. package/build-module/guide/page-control.js.map +1 -1
  478. package/build-module/h-stack/hook.js.map +1 -1
  479. package/build-module/heading/hook.js.map +1 -1
  480. package/build-module/higher-order/with-fallback-styles/index.js +3 -4
  481. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  482. package/build-module/input-control/index.js.map +1 -1
  483. package/build-module/input-control/input-base.js +1 -2
  484. package/build-module/input-control/input-base.js.map +1 -1
  485. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  486. package/build-module/item-group/styles.js.map +1 -1
  487. package/build-module/keyboard-shortcuts/index.js +1 -3
  488. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  489. package/build-module/{dropdown-menu-v2 → menu}/checkbox-item.js +9 -10
  490. package/build-module/menu/checkbox-item.js.map +1 -0
  491. package/build-module/{dropdown-menu-v2 → menu}/context.js +1 -1
  492. package/build-module/menu/context.js.map +1 -0
  493. package/build-module/{dropdown-menu-v2 → menu}/group-label.js +5 -5
  494. package/build-module/menu/group-label.js.map +1 -0
  495. package/build-module/menu/group.js +21 -0
  496. package/build-module/menu/group.js.map +1 -0
  497. package/build-module/{dropdown-menu-v2 → menu}/index.js +47 -49
  498. package/build-module/menu/index.js.map +1 -0
  499. package/build-module/{dropdown-menu-v2 → menu}/item-help-text.js +2 -2
  500. package/build-module/menu/item-help-text.js.map +1 -0
  501. package/build-module/{dropdown-menu-v2 → menu}/item-label.js +2 -2
  502. package/build-module/menu/item-label.js.map +1 -0
  503. package/build-module/{dropdown-menu-v2 → menu}/item.js +8 -9
  504. package/build-module/menu/item.js.map +1 -0
  505. package/build-module/{dropdown-menu-v2 → menu}/radio-item.js +9 -10
  506. package/build-module/menu/radio-item.js.map +1 -0
  507. package/build-module/menu/separator.js +22 -0
  508. package/build-module/menu/separator.js.map +1 -0
  509. package/build-module/menu/styles.js +143 -0
  510. package/build-module/menu/styles.js.map +1 -0
  511. package/build-module/menu/types.js.map +1 -0
  512. package/build-module/menu/use-temporary-focus-visible-fix.js.map +1 -0
  513. package/build-module/menu-group/index.js +1 -2
  514. package/build-module/menu-group/index.js.map +1 -1
  515. package/build-module/menu-item/index.js +1 -2
  516. package/build-module/menu-item/index.js.map +1 -1
  517. package/build-module/menu-items-choice/index.js +1 -2
  518. package/build-module/menu-items-choice/index.js.map +1 -1
  519. package/build-module/mobile/badge/index.native.js +1 -3
  520. package/build-module/mobile/badge/index.native.js.map +1 -1
  521. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +4 -7
  522. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  523. package/build-module/mobile/bottom-sheet/cell.native.js +5 -6
  524. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  525. package/build-module/mobile/bottom-sheet/color-cell.native.js +1 -2
  526. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  527. package/build-module/mobile/bottom-sheet/index.native.js +1 -3
  528. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  529. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -2
  530. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  531. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -2
  532. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  533. package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
  534. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  535. package/build-module/mobile/bottom-sheet/range-text-input.native.js +1 -2
  536. package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  537. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +2 -3
  538. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  539. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js +1 -2
  540. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
  541. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js +1 -2
  542. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
  543. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +2 -6
  544. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  545. package/build-module/mobile/bottom-sheet/switch-cell.native.js +4 -4
  546. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  547. package/build-module/mobile/bottom-sheet-select-control/index.native.js +3 -5
  548. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  549. package/build-module/mobile/bottom-sheet-text-control/index.native.js +1 -3
  550. package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  551. package/build-module/mobile/color-settings/gradient-picker-screen.native.js +1 -2
  552. package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
  553. package/build-module/mobile/color-settings/index.native.js +2 -5
  554. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  555. package/build-module/mobile/color-settings/palette.screen.native.js +1 -3
  556. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  557. package/build-module/mobile/color-settings/picker-screen.native.js +1 -3
  558. package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
  559. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  560. package/build-module/mobile/focal-point-settings-panel/index.native.js +1 -2
  561. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  562. package/build-module/mobile/gradient/index.native.js +1 -2
  563. package/build-module/mobile/gradient/index.native.js.map +1 -1
  564. package/build-module/mobile/html-text-input/index.native.js +1 -2
  565. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  566. package/build-module/mobile/image/icon-retry.native.js +1 -2
  567. package/build-module/mobile/image/icon-retry.native.js.map +1 -1
  568. package/build-module/mobile/image/image-editing-button.native.js +1 -2
  569. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  570. package/build-module/mobile/image/index.native.js +2 -6
  571. package/build-module/mobile/image/index.native.js.map +1 -1
  572. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +2 -5
  573. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  574. package/build-module/mobile/link-picker/index.native.js +2 -3
  575. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  576. package/build-module/mobile/link-picker/link-picker-results.native.js +2 -5
  577. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  578. package/build-module/mobile/link-picker/link-picker-screen.native.js +1 -3
  579. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  580. package/build-module/mobile/link-settings/index.native.js +7 -21
  581. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  582. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -2
  583. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  584. package/build-module/mobile/link-settings/link-settings-screen.native.js +1 -3
  585. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  586. package/build-module/mobile/picker/index.android.js +1 -2
  587. package/build-module/mobile/picker/index.android.js.map +1 -1
  588. package/build-module/mobile/segmented-control/index.native.js +3 -8
  589. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  590. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  591. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
  592. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  593. package/build-module/modal/aria-helper.js +2 -1
  594. package/build-module/modal/aria-helper.js.map +1 -1
  595. package/build-module/modal/index.js +3 -4
  596. package/build-module/modal/index.js.map +1 -1
  597. package/build-module/modal/use-modal-exit-animation.js.map +1 -1
  598. package/build-module/navigation/back-button/index.js +1 -2
  599. package/build-module/navigation/back-button/index.js.map +1 -1
  600. package/build-module/navigation/group/index.js +1 -2
  601. package/build-module/navigation/group/index.js.map +1 -1
  602. package/build-module/navigation/index.js +1 -2
  603. package/build-module/navigation/index.js.map +1 -1
  604. package/build-module/navigation/item/base-content.js +1 -3
  605. package/build-module/navigation/item/base-content.js.map +1 -1
  606. package/build-module/navigation/item/base.js.map +1 -1
  607. package/build-module/navigation/item/index.js +1 -2
  608. package/build-module/navigation/item/index.js.map +1 -1
  609. package/build-module/navigation/item/use-navigation-tree-item.js +2 -2
  610. package/build-module/navigation/item/use-navigation-tree-item.js.map +1 -1
  611. package/build-module/navigation/menu/index.js +1 -2
  612. package/build-module/navigation/menu/index.js.map +1 -1
  613. package/build-module/navigation/menu/menu-title-search.js +4 -4
  614. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  615. package/build-module/navigation/menu/menu-title.js +1 -2
  616. package/build-module/navigation/menu/menu-title.js.map +1 -1
  617. package/build-module/navigation/menu/search-no-results-found.js +1 -2
  618. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  619. package/build-module/navigation/menu/use-navigation-tree-menu.js +2 -2
  620. package/build-module/navigation/menu/use-navigation-tree-menu.js.map +1 -1
  621. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  622. package/build-module/navigator/navigator/component.js.map +1 -1
  623. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  624. package/build-module/notice/index.js +1 -2
  625. package/build-module/notice/index.js.map +1 -1
  626. package/build-module/notice/index.native.js +1 -3
  627. package/build-module/notice/index.native.js.map +1 -1
  628. package/build-module/number-control/index.js +1 -3
  629. package/build-module/number-control/index.js.map +1 -1
  630. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  631. package/build-module/palette-edit/index.js +31 -9
  632. package/build-module/palette-edit/index.js.map +1 -1
  633. package/build-module/palette-edit/styles.js +13 -29
  634. package/build-module/palette-edit/styles.js.map +1 -1
  635. package/build-module/panel/actions.native.js +1 -2
  636. package/build-module/panel/actions.native.js.map +1 -1
  637. package/build-module/panel/body.js +1 -2
  638. package/build-module/panel/body.js.map +1 -1
  639. package/build-module/panel/body.native.js +1 -2
  640. package/build-module/panel/body.native.js.map +1 -1
  641. package/build-module/panel/header.js +1 -2
  642. package/build-module/panel/header.js.map +1 -1
  643. package/build-module/panel/index.js +1 -2
  644. package/build-module/panel/index.js.map +1 -1
  645. package/build-module/placeholder/index.js +1 -2
  646. package/build-module/placeholder/index.js.map +1 -1
  647. package/build-module/popover/index.js +2 -4
  648. package/build-module/popover/index.js.map +1 -1
  649. package/build-module/popover/overlay-middlewares.js.map +1 -1
  650. package/build-module/popover/utils.js.map +1 -1
  651. package/build-module/private-apis.js +3 -3
  652. package/build-module/private-apis.js.map +1 -1
  653. package/build-module/progress-bar/index.js +1 -2
  654. package/build-module/progress-bar/index.js.map +1 -1
  655. package/build-module/progress-bar/styles.js.map +1 -1
  656. package/build-module/query-controls/index.js.map +1 -1
  657. package/build-module/query-controls/index.native.js +1 -3
  658. package/build-module/query-controls/index.native.js.map +1 -1
  659. package/build-module/radio-control/index.js +1 -2
  660. package/build-module/radio-control/index.js.map +1 -1
  661. package/build-module/radio-control/index.native.js +1 -2
  662. package/build-module/radio-control/index.native.js.map +1 -1
  663. package/build-module/radio-group/index.js +3 -1
  664. package/build-module/radio-group/index.js.map +1 -1
  665. package/build-module/range-control/index.js +1 -2
  666. package/build-module/range-control/index.js.map +1 -1
  667. package/build-module/range-control/index.native.js.map +1 -1
  668. package/build-module/range-control/mark.js +1 -3
  669. package/build-module/range-control/mark.js.map +1 -1
  670. package/build-module/range-control/rail.js +1 -3
  671. package/build-module/range-control/rail.js.map +1 -1
  672. package/build-module/range-control/styles/range-control-styles.js +32 -32
  673. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  674. package/build-module/range-control/tooltip.js +1 -1
  675. package/build-module/range-control/tooltip.js.map +1 -1
  676. package/build-module/range-control/utils.js.map +1 -1
  677. package/build-module/resizable-box/index.js +1 -2
  678. package/build-module/resizable-box/index.js.map +1 -1
  679. package/build-module/resizable-box/resize-tooltip/index.js +1 -2
  680. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  681. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  682. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  683. package/build-module/responsive-wrapper/index.js.map +1 -1
  684. package/build-module/sandbox/index.js +4 -8
  685. package/build-module/sandbox/index.js.map +1 -1
  686. package/build-module/sandbox/index.native.js +2 -5
  687. package/build-module/sandbox/index.native.js.map +1 -1
  688. package/build-module/search-control/index.js +6 -0
  689. package/build-module/search-control/index.js.map +1 -1
  690. package/build-module/search-control/index.native.js +2 -5
  691. package/build-module/search-control/index.native.js.map +1 -1
  692. package/build-module/search-control/types.js.map +1 -1
  693. package/build-module/select-control/index.js.map +1 -1
  694. package/build-module/select-control/index.native.js.map +1 -1
  695. package/build-module/slot-fill/bubbles-virtually/slot.js +1 -2
  696. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  697. package/build-module/slot-fill/fill.js +3 -6
  698. package/build-module/slot-fill/fill.js.map +1 -1
  699. package/build-module/slot-fill/index.js +1 -3
  700. package/build-module/slot-fill/index.js.map +1 -1
  701. package/build-module/slot-fill/slot.js +1 -2
  702. package/build-module/slot-fill/slot.js.map +1 -1
  703. package/build-module/snackbar/index.js +1 -2
  704. package/build-module/snackbar/index.js.map +1 -1
  705. package/build-module/snackbar/list.js +1 -2
  706. package/build-module/snackbar/list.js.map +1 -1
  707. package/build-module/spacer/hook.js +5 -3
  708. package/build-module/spacer/hook.js.map +1 -1
  709. package/build-module/spinner/index.js +1 -2
  710. package/build-module/spinner/index.js.map +1 -1
  711. package/build-module/spinner/styles.js.map +1 -1
  712. package/build-module/style-provider/index.js +1 -0
  713. package/build-module/style-provider/index.js.map +1 -1
  714. package/build-module/surface/hook.js.map +1 -1
  715. package/build-module/surface/styles.js.map +1 -1
  716. package/build-module/tab-panel/index.js +5 -3
  717. package/build-module/tab-panel/index.js.map +1 -1
  718. package/build-module/tabs/index.js +47 -112
  719. package/build-module/tabs/index.js.map +1 -1
  720. package/build-module/tabs/styles.js +29 -7
  721. package/build-module/tabs/styles.js.map +1 -1
  722. package/build-module/tabs/tab.js +30 -10
  723. package/build-module/tabs/tab.js.map +1 -1
  724. package/build-module/tabs/tablist.js +67 -56
  725. package/build-module/tabs/tablist.js.map +1 -1
  726. package/build-module/tabs/tabpanel.js.map +1 -1
  727. package/build-module/tabs/types.js.map +1 -1
  728. package/build-module/text/get-line-height.js.map +1 -1
  729. package/build-module/text/styles/text-mixins.native.js.map +1 -1
  730. package/build-module/text/utils.js.map +1 -1
  731. package/build-module/text-control/index.native.js.map +1 -1
  732. package/build-module/text-highlight/index.js +1 -2
  733. package/build-module/text-highlight/index.js.map +1 -1
  734. package/build-module/textarea-control/index.js.map +1 -1
  735. package/build-module/theme/color-algorithms.js.map +1 -1
  736. package/build-module/theme/styles.js.map +1 -1
  737. package/build-module/tip/index.js +1 -2
  738. package/build-module/tip/index.js.map +1 -1
  739. package/build-module/toggle-control/index.js +1 -2
  740. package/build-module/toggle-control/index.js.map +1 -1
  741. package/build-module/toggle-control/index.native.js.map +1 -1
  742. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +10 -2
  743. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  744. package/build-module/toggle-group-control/toggle-group-control/component.js +6 -66
  745. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  746. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +11 -12
  747. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  748. package/build-module/toggle-group-control/types.js.map +1 -1
  749. package/build-module/toolbar/toolbar/index.js +3 -0
  750. package/build-module/toolbar/toolbar/index.js.map +1 -1
  751. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js +2 -2
  752. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
  753. package/build-module/toolbar/toolbar-group/index.js +1 -2
  754. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  755. package/build-module/tools-panel/styles.js.map +1 -1
  756. package/build-module/tools-panel/tools-panel/component.js +1 -2
  757. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  758. package/build-module/tools-panel/tools-panel-header/component.js +2 -4
  759. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  760. package/build-module/tools-panel/tools-panel-item/hook.js +0 -2
  761. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  762. package/build-module/tooltip/index.js +6 -3
  763. package/build-module/tooltip/index.js.map +1 -1
  764. package/build-module/tooltip/index.native.js +6 -18
  765. package/build-module/tooltip/index.native.js.map +1 -1
  766. package/build-module/tree-grid/cell.js +1 -2
  767. package/build-module/tree-grid/cell.js.map +1 -1
  768. package/build-module/unit-control/index.js.map +1 -1
  769. package/build-module/unit-control/index.native.js +3 -9
  770. package/build-module/unit-control/index.native.js.map +1 -1
  771. package/build-module/unit-control/utils.js.map +1 -1
  772. package/build-module/utils/breakpoint.js.map +1 -1
  773. package/build-module/utils/colors-values.js.map +1 -1
  774. package/build-module/utils/config-values.js.map +1 -1
  775. package/build-module/utils/deprecated-36px-size.js +19 -0
  776. package/build-module/utils/deprecated-36px-size.js.map +1 -0
  777. package/build-module/utils/element-rect.js +13 -2
  778. package/build-module/utils/element-rect.js.map +1 -1
  779. package/build-module/utils/font-size.js.map +1 -1
  780. package/build-module/utils/hooks/use-animated-offset-rect.js +75 -0
  781. package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -0
  782. package/build-module/utils/hooks/use-cx.js.map +1 -1
  783. package/build-module/utils/hooks/use-update-effect.js +0 -2
  784. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  785. package/build-module/utils/math.js +2 -2
  786. package/build-module/utils/math.js.map +1 -1
  787. package/build-module/utils/space.js.map +1 -1
  788. package/build-module/utils/unit-values.js.map +1 -1
  789. package/build-module/utils/use-responsive-value.js.map +1 -1
  790. package/build-style/style-rtl.css +14 -11
  791. package/build-style/style.css +14 -11
  792. package/build-types/alignment-matrix-control/types.d.ts +2 -0
  793. package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
  794. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  795. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  796. package/build-types/autocomplete/index.d.ts.map +1 -1
  797. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  798. package/build-types/base-control/types.d.ts +3 -0
  799. package/build-types/base-control/types.d.ts.map +1 -1
  800. package/build-types/border-box-control/border-box-control/component.d.ts +1 -0
  801. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  802. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  803. package/build-types/border-control/border-control/component.d.ts +1 -0
  804. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  805. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  806. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  807. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  808. package/build-types/button/stories/index.story.d.ts.map +1 -1
  809. package/build-types/card/stories/index.story.d.ts.map +1 -1
  810. package/build-types/composite/legacy/index.d.ts.map +1 -1
  811. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  812. package/build-types/date-time/date/index.d.ts.map +1 -1
  813. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  814. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  815. package/build-types/drop-zone/index.d.ts.map +1 -1
  816. package/build-types/form-token-field/index.d.ts.map +1 -1
  817. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  818. package/build-types/item-group/stories/index.story.d.ts +1 -1
  819. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  820. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  821. package/build-types/menu/checkbox-item.d.ts +3 -0
  822. package/build-types/menu/checkbox-item.d.ts.map +1 -0
  823. package/build-types/menu/context.d.ts +6 -0
  824. package/build-types/menu/context.d.ts.map +1 -0
  825. package/build-types/menu/group-label.d.ts +3 -0
  826. package/build-types/menu/group-label.d.ts.map +1 -0
  827. package/build-types/menu/group.d.ts +3 -0
  828. package/build-types/menu/group.d.ts.map +1 -0
  829. package/build-types/menu/index.d.ts +40 -0
  830. package/build-types/menu/index.d.ts.map +1 -0
  831. package/build-types/{dropdown-menu-v2 → menu}/item-help-text.d.ts +1 -1
  832. package/build-types/menu/item-help-text.d.ts.map +1 -0
  833. package/build-types/{dropdown-menu-v2 → menu}/item-label.d.ts +1 -1
  834. package/build-types/menu/item-label.d.ts.map +1 -0
  835. package/build-types/menu/item.d.ts +3 -0
  836. package/build-types/menu/item.d.ts.map +1 -0
  837. package/build-types/menu/radio-item.d.ts +3 -0
  838. package/build-types/menu/radio-item.d.ts.map +1 -0
  839. package/build-types/menu/separator.d.ts +3 -0
  840. package/build-types/menu/separator.d.ts.map +1 -0
  841. package/build-types/menu/stories/index.story.d.ts +16 -0
  842. package/build-types/menu/stories/index.story.d.ts.map +1 -0
  843. package/build-types/{dropdown-menu-v2 → menu}/styles.d.ts +13 -13
  844. package/build-types/menu/styles.d.ts.map +1 -0
  845. package/build-types/menu/test/index.d.ts.map +1 -0
  846. package/build-types/{dropdown-menu-v2 → menu}/types.d.ts +22 -21
  847. package/build-types/menu/types.d.ts.map +1 -0
  848. package/build-types/menu/use-temporary-focus-visible-fix.d.ts.map +1 -0
  849. package/build-types/modal/aria-helper.d.ts.map +1 -1
  850. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  851. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  852. package/build-types/navigation/index.d.ts.map +1 -1
  853. package/build-types/palette-edit/index.d.ts +3 -0
  854. package/build-types/palette-edit/index.d.ts.map +1 -1
  855. package/build-types/palette-edit/styles.d.ts +0 -256
  856. package/build-types/palette-edit/styles.d.ts.map +1 -1
  857. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  858. package/build-types/radio-group/index.d.ts.map +1 -1
  859. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  860. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  861. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  862. package/build-types/sandbox/index.d.ts.map +1 -1
  863. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  864. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  865. package/build-types/search-control/index.d.ts.map +1 -1
  866. package/build-types/search-control/stories/index.story.d.ts +0 -8
  867. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  868. package/build-types/search-control/types.d.ts +3 -0
  869. package/build-types/search-control/types.d.ts.map +1 -1
  870. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  871. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  872. package/build-types/slot-fill/fill.d.ts.map +1 -1
  873. package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
  874. package/build-types/spacer/hook.d.ts.map +1 -1
  875. package/build-types/tab-panel/index.d.ts.map +1 -1
  876. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  877. package/build-types/tabs/index.d.ts +21 -8
  878. package/build-types/tabs/index.d.ts.map +1 -1
  879. package/build-types/tabs/stories/index.story.d.ts +1 -1
  880. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  881. package/build-types/tabs/styles.d.ts +13 -3
  882. package/build-types/tabs/styles.d.ts.map +1 -1
  883. package/build-types/tabs/tab.d.ts +0 -3
  884. package/build-types/tabs/tab.d.ts.map +1 -1
  885. package/build-types/tabs/tablist.d.ts.map +1 -1
  886. package/build-types/tabs/types.d.ts +85 -48
  887. package/build-types/tabs/types.d.ts.map +1 -1
  888. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  889. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  890. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  891. package/build-types/toggle-group-control/types.d.ts +1 -0
  892. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  893. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  894. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  895. package/build-types/tooltip/index.d.ts.map +1 -1
  896. package/build-types/utils/deprecated-36px-size.d.ts +6 -0
  897. package/build-types/utils/deprecated-36px-size.d.ts.map +1 -0
  898. package/build-types/utils/element-rect.d.ts +1 -1
  899. package/build-types/utils/element-rect.d.ts.map +1 -1
  900. package/build-types/utils/hooks/use-animated-offset-rect.d.ts +69 -0
  901. package/build-types/utils/hooks/use-animated-offset-rect.d.ts.map +1 -0
  902. package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
  903. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  904. package/package.json +21 -20
  905. package/schemas/docs-manifest.json +38 -0
  906. package/src/alignment-matrix-control/README.md +45 -36
  907. package/src/alignment-matrix-control/docs-manifest.json +12 -0
  908. package/src/alignment-matrix-control/types.ts +2 -0
  909. package/src/angle-picker-control/README.md +35 -23
  910. package/src/angle-picker-control/docs-manifest.json +5 -0
  911. package/src/animate/stories/index.story.tsx +2 -1
  912. package/src/autocomplete/autocompleter-ui.native.js +2 -4
  913. package/src/autocomplete/autocompleter-ui.tsx +2 -6
  914. package/src/autocomplete/index.tsx +4 -5
  915. package/src/base-control/README.md +58 -47
  916. package/src/base-control/docs-manifest.json +12 -0
  917. package/src/base-control/stories/index.story.tsx +4 -0
  918. package/src/base-control/types.ts +3 -0
  919. package/src/border-box-control/border-box-control/README.md +1 -0
  920. package/src/border-box-control/border-box-control/component.tsx +1 -0
  921. package/src/border-box-control/border-box-control/hook.ts +7 -0
  922. package/src/border-box-control/stories/index.story.tsx +1 -0
  923. package/src/border-box-control/test/index.tsx +1 -0
  924. package/src/border-control/border-control/README.md +1 -0
  925. package/src/border-control/border-control/component.tsx +1 -0
  926. package/src/border-control/border-control/hook.ts +7 -1
  927. package/src/border-control/border-control-dropdown/component.tsx +24 -12
  928. package/src/border-control/stories/index.story.tsx +1 -0
  929. package/src/border-control/test/index.js +1 -0
  930. package/src/button/stories/index.story.tsx +2 -1
  931. package/src/button/style.scss +5 -1
  932. package/src/card/stories/index.story.tsx +2 -1
  933. package/src/color-palette/index.native.js +1 -2
  934. package/src/color-palette/index.tsx +1 -1
  935. package/src/color-palette/style.scss +2 -4
  936. package/src/color-picker/index.native.js +0 -1
  937. package/src/composite/legacy/index.tsx +5 -2
  938. package/src/composite/stories/index.story.tsx +2 -1
  939. package/src/composite/test/index.tsx +629 -38
  940. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +1 -1
  941. package/src/date-time/date/index.tsx +0 -1
  942. package/src/disabled/stories/index.story.tsx +2 -1
  943. package/src/draggable/stories/index.story.tsx +2 -1
  944. package/src/drop-zone/index.tsx +1 -2
  945. package/src/drop-zone/style.scss +1 -1
  946. package/src/font-size-picker/index.native.js +7 -7
  947. package/src/form-token-field/index.tsx +0 -3
  948. package/src/form-token-field/style.scss +4 -1
  949. package/src/form-token-field/suggestions-list.tsx +6 -0
  950. package/src/item-group/stories/index.story.tsx +8 -4
  951. package/src/keyboard-shortcuts/stories/index.story.tsx +2 -1
  952. package/src/{dropdown-menu-v2 → menu}/README.md +34 -34
  953. package/src/{dropdown-menu-v2 → menu}/checkbox-item.tsx +14 -14
  954. package/src/menu/context.tsx +13 -0
  955. package/src/{dropdown-menu-v2 → menu}/group-label.tsx +8 -8
  956. package/src/menu/group.tsx +26 -0
  957. package/src/{dropdown-menu-v2 → menu}/index.tsx +65 -70
  958. package/src/{dropdown-menu-v2 → menu}/item-help-text.tsx +3 -7
  959. package/src/{dropdown-menu-v2 → menu}/item-label.tsx +3 -7
  960. package/src/{dropdown-menu-v2 → menu}/item.tsx +13 -13
  961. package/src/{dropdown-menu-v2 → menu}/radio-item.tsx +14 -14
  962. package/src/menu/separator.tsx +27 -0
  963. package/src/menu/stories/index.story.tsx +542 -0
  964. package/src/{dropdown-menu-v2 → menu}/styles.ts +17 -17
  965. package/src/{dropdown-menu-v2 → menu}/test/index.tsx +145 -225
  966. package/src/{dropdown-menu-v2 → menu}/types.ts +24 -23
  967. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +3 -5
  968. package/src/mobile/bottom-sheet/range-cell.native.js +1 -1
  969. package/src/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  970. package/src/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
  971. package/src/mobile/bottom-sheet-select-control/index.native.js +2 -2
  972. package/src/mobile/color-settings/index.native.js +1 -3
  973. package/src/mobile/color-settings/picker-screen.native.js +1 -3
  974. package/src/mobile/image/index.native.js +1 -3
  975. package/src/mobile/keyboard-avoiding-view/index.ios.js +1 -3
  976. package/src/mobile/link-picker/link-picker-results.native.js +2 -5
  977. package/src/mobile/link-picker/link-picker-screen.native.js +1 -3
  978. package/src/mobile/link-settings/index.native.js +6 -18
  979. package/src/mobile/link-settings/link-settings-screen.native.js +1 -3
  980. package/src/mobile/segmented-control/index.native.js +2 -6
  981. package/src/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
  982. package/src/modal/aria-helper.ts +1 -0
  983. package/src/navigable-container/stories/navigable-menu.story.tsx +2 -1
  984. package/src/navigable-container/stories/tabbable-container.story.tsx +2 -1
  985. package/src/navigation/index.tsx +1 -2
  986. package/src/navigation/item/use-navigation-tree-item.tsx +2 -2
  987. package/src/navigation/menu/menu-title-search.tsx +2 -2
  988. package/src/navigation/menu/use-navigation-tree-menu.tsx +2 -2
  989. package/src/palette-edit/index.tsx +34 -10
  990. package/src/palette-edit/styles.ts +1 -67
  991. package/src/palette-edit/test/index.tsx +50 -1
  992. package/src/panel/stories/index.story.tsx +2 -1
  993. package/src/private-apis.ts +3 -3
  994. package/src/radio-group/index.tsx +2 -0
  995. package/src/range-control/styles/range-control-styles.ts +19 -10
  996. package/src/range-control/tooltip.tsx +1 -1
  997. package/src/resizable-box/stories/index.story.tsx +2 -1
  998. package/src/sandbox/index.native.js +1 -3
  999. package/src/sandbox/index.tsx +3 -6
  1000. package/src/sandbox/stories/index.story.tsx +2 -1
  1001. package/src/scroll-lock/stories/index.story.tsx +2 -1
  1002. package/src/search-control/README.md +2 -0
  1003. package/src/search-control/index.native.js +1 -3
  1004. package/src/search-control/index.tsx +7 -0
  1005. package/src/search-control/stories/index.story.tsx +0 -15
  1006. package/src/search-control/test/index.tsx +4 -1
  1007. package/src/search-control/types.ts +3 -0
  1008. package/src/shortcut/stories/index.story.tsx +2 -1
  1009. package/src/slot-fill/bubbles-virtually/slot.tsx +1 -2
  1010. package/src/slot-fill/fill.ts +3 -6
  1011. package/src/slot-fill/stories/index.story.tsx +2 -1
  1012. package/src/spacer/hook.ts +3 -2
  1013. package/src/tab-panel/index.tsx +3 -0
  1014. package/src/tab-panel/stories/index.story.tsx +2 -1
  1015. package/src/tab-panel/style.scss +1 -3
  1016. package/src/tabs/README.md +63 -21
  1017. package/src/tabs/index.tsx +112 -189
  1018. package/src/tabs/stories/index.story.tsx +5 -2
  1019. package/src/tabs/styles.ts +123 -46
  1020. package/src/tabs/tab.tsx +31 -5
  1021. package/src/tabs/tablist.tsx +74 -59
  1022. package/src/tabs/test/index.tsx +131 -118
  1023. package/src/tabs/types.ts +89 -49
  1024. package/src/theme/stories/index.story.tsx +2 -1
  1025. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +6 -6
  1026. package/src/toggle-group-control/test/index.tsx +39 -0
  1027. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +11 -1
  1028. package/src/toggle-group-control/toggle-group-control/component.tsx +4 -98
  1029. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +15 -15
  1030. package/src/toggle-group-control/types.ts +1 -0
  1031. package/src/toolbar/toolbar/index.tsx +3 -0
  1032. package/src/tools-panel/tools-panel-header/component.tsx +1 -1
  1033. package/src/tools-panel/tools-panel-item/hook.ts +0 -2
  1034. package/src/tooltip/index.native.js +5 -15
  1035. package/src/tooltip/index.tsx +8 -1
  1036. package/src/tooltip/test/index.tsx +78 -0
  1037. package/src/unit-control/index.native.js +2 -6
  1038. package/src/utils/deprecated-36px-size.ts +24 -0
  1039. package/src/utils/element-rect.ts +14 -2
  1040. package/src/utils/hooks/use-animated-offset-rect.ts +119 -0
  1041. package/src/utils/hooks/use-update-effect.js +0 -2
  1042. package/src/visually-hidden/stories/index.story.tsx +2 -1
  1043. package/tsconfig.tsbuildinfo +1 -1
  1044. package/build/dropdown-menu-v2/checkbox-item.js.map +0 -1
  1045. package/build/dropdown-menu-v2/context.js.map +0 -1
  1046. package/build/dropdown-menu-v2/group-label.js.map +0 -1
  1047. package/build/dropdown-menu-v2/group.js.map +0 -1
  1048. package/build/dropdown-menu-v2/index.js.map +0 -1
  1049. package/build/dropdown-menu-v2/item-help-text.js.map +0 -1
  1050. package/build/dropdown-menu-v2/item-label.js.map +0 -1
  1051. package/build/dropdown-menu-v2/item.js.map +0 -1
  1052. package/build/dropdown-menu-v2/radio-item.js.map +0 -1
  1053. package/build/dropdown-menu-v2/separator.js.map +0 -1
  1054. package/build/dropdown-menu-v2/styles.js +0 -150
  1055. package/build/dropdown-menu-v2/styles.js.map +0 -1
  1056. package/build/dropdown-menu-v2/types.js.map +0 -1
  1057. package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +0 -1
  1058. package/build-module/dropdown-menu-v2/checkbox-item.js.map +0 -1
  1059. package/build-module/dropdown-menu-v2/context.js.map +0 -1
  1060. package/build-module/dropdown-menu-v2/group-label.js.map +0 -1
  1061. package/build-module/dropdown-menu-v2/group.js +0 -21
  1062. package/build-module/dropdown-menu-v2/group.js.map +0 -1
  1063. package/build-module/dropdown-menu-v2/index.js.map +0 -1
  1064. package/build-module/dropdown-menu-v2/item-help-text.js.map +0 -1
  1065. package/build-module/dropdown-menu-v2/item-label.js.map +0 -1
  1066. package/build-module/dropdown-menu-v2/item.js.map +0 -1
  1067. package/build-module/dropdown-menu-v2/radio-item.js.map +0 -1
  1068. package/build-module/dropdown-menu-v2/separator.js +0 -22
  1069. package/build-module/dropdown-menu-v2/separator.js.map +0 -1
  1070. package/build-module/dropdown-menu-v2/styles.js +0 -143
  1071. package/build-module/dropdown-menu-v2/styles.js.map +0 -1
  1072. package/build-module/dropdown-menu-v2/types.js.map +0 -1
  1073. package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +0 -1
  1074. package/build-types/dropdown-menu-v2/checkbox-item.d.ts +0 -3
  1075. package/build-types/dropdown-menu-v2/checkbox-item.d.ts.map +0 -1
  1076. package/build-types/dropdown-menu-v2/context.d.ts +0 -6
  1077. package/build-types/dropdown-menu-v2/context.d.ts.map +0 -1
  1078. package/build-types/dropdown-menu-v2/group-label.d.ts +0 -3
  1079. package/build-types/dropdown-menu-v2/group-label.d.ts.map +0 -1
  1080. package/build-types/dropdown-menu-v2/group.d.ts +0 -3
  1081. package/build-types/dropdown-menu-v2/group.d.ts.map +0 -1
  1082. package/build-types/dropdown-menu-v2/index.d.ts +0 -40
  1083. package/build-types/dropdown-menu-v2/index.d.ts.map +0 -1
  1084. package/build-types/dropdown-menu-v2/item-help-text.d.ts.map +0 -1
  1085. package/build-types/dropdown-menu-v2/item-label.d.ts.map +0 -1
  1086. package/build-types/dropdown-menu-v2/item.d.ts +0 -3
  1087. package/build-types/dropdown-menu-v2/item.d.ts.map +0 -1
  1088. package/build-types/dropdown-menu-v2/radio-item.d.ts +0 -3
  1089. package/build-types/dropdown-menu-v2/radio-item.d.ts.map +0 -1
  1090. package/build-types/dropdown-menu-v2/separator.d.ts +0 -3
  1091. package/build-types/dropdown-menu-v2/separator.d.ts.map +0 -1
  1092. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +0 -16
  1093. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +0 -1
  1094. package/build-types/dropdown-menu-v2/styles.d.ts.map +0 -1
  1095. package/build-types/dropdown-menu-v2/test/index.d.ts.map +0 -1
  1096. package/build-types/dropdown-menu-v2/types.d.ts.map +0 -1
  1097. package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts.map +0 -1
  1098. package/src/dropdown-menu-v2/context.tsx +0 -13
  1099. package/src/dropdown-menu-v2/group.tsx +0 -26
  1100. package/src/dropdown-menu-v2/separator.tsx +0 -27
  1101. package/src/dropdown-menu-v2/stories/index.story.tsx +0 -639
  1102. /package/build/{dropdown-menu-v2 → menu}/types.js +0 -0
  1103. /package/build/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.js +0 -0
  1104. /package/build-module/{dropdown-menu-v2 → menu}/types.js +0 -0
  1105. /package/build-module/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.js +0 -0
  1106. /package/build-types/{dropdown-menu-v2 → menu}/test/index.d.ts +0 -0
  1107. /package/build-types/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.d.ts +0 -0
  1108. /package/src/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["Animated","View","PanResponder","LinearGradient","React","Component","styles","jsx","_jsx","jsxs","_jsxs","HuePicker","constructor","props","hueColors","sliderX","Value","barHeight","hue","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","paddingBottom","paddingRight","computeHueValueDrag","dx","diff","updatedHue","event","locationX","eventName","firePressEvent","render","borderRadius","style","panHandlers","hitSlop","top","bottom","left","right","children","colors","start","x","y","end","width","height","pointerEvents","transform","translateX"],"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 ) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ( value > 1 ) {\n\t\t\treturn 1;\n\t\t}\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":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,IAAI,EAAEC,YAAY,QAAQ,cAAc;AAC3D,OAAOC,cAAc,MAAM,8BAA8B;;AAEzD;AACA;AACA;AACA,OAAOC,KAAK,IAAIC,SAAS,QAAQ,oBAAoB;;AAErD;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAA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B,UAAU,GAAG,CAAC;UAC5BqC,SAAS,EAAE,CACV;YACCC,UAAU,EAAE,IAAI,CAAChE;UAClB,CAAC;QAEH,CAAC;MACC,CACH,CAAC;IAAA,CACG,CAAC;EAET;AACD","ignoreList":[]}
1
+ {"version":3,"names":["Animated","View","PanResponder","LinearGradient","React","Component","styles","jsx","_jsx","jsxs","_jsxs","HuePicker","constructor","props","hueColors","sliderX","Value","barHeight","hue","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","paddingBottom","paddingRight","computeHueValueDrag","dx","diff","updatedHue","event","locationX","eventName","firePressEvent","render","borderRadius","style","panHandlers","hitSlop","top","bottom","left","right","children","colors","start","x","y","end","width","height","pointerEvents","transform","translateX"],"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 ) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ( value > 1 ) {\n\t\t\treturn 1;\n\t\t}\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":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,IAAI,EAAEC,YAAY,QAAQ,cAAc;AAC3D,OAAOC,cAAc,MAAM,8BAA8B;;AAEzD;AACA;AACA;AACA,OAAOC,KAAK,IAAIC,SAAS,QAAQ,oBAAoB;;AAErD;AACA;AACA;AACA,OAAOC,MAA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AAI,EAAE,CAAE1B,UAAU,GAAGC,WAAW,IAAK,CAAC;UACtCmB,YAAY,EAAEpB,UAAU,GAAG,CAAC;UAC5BqC,SAAS,EAAE,CACV;YACCC,UAAU,EAAE,IAAI,CAAChE;UAClB,CAAC;QAEH,CAAC;MACC,CACH,CAAC;IAAA,CACG,CAAC;EAET;AACD","ignoreList":[]}
@@ -17,9 +17,7 @@ import { Icon, check, close } from '@wordpress/icons';
17
17
  import styles from './style.scss';
18
18
  import HsvColorPicker from './hsv-color-picker.native.js';
19
19
  import BottomSheet from '../mobile/bottom-sheet';
20
- import { jsx as _jsx } from "react/jsx-runtime";
21
- import { jsxs as _jsxs } from "react/jsx-runtime";
22
- import { Fragment as _Fragment } from "react/jsx-runtime";
20
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
23
21
  extend([namesPlugin]);
24
22
  function ColorPicker({
25
23
  shouldEnableBottomSheetScroll,
@@ -107,7 +105,6 @@ function ColorPicker({
107
105
  // the hook’s dependencies and running it a single time. Ideally there
108
106
  // may be a way to refactor and obviate the disabled lint rule. If not,
109
107
  // this comment should be replaced by one that explains the reasoning.
110
- // eslint-disable-next-line react-hooks/exhaustive-deps
111
108
  }, []);
112
109
  function onButtonPress(action) {
113
110
  onNavigationBack();
@@ -1 +1 @@
1
- {"version":3,"names":["View","Text","TouchableWithoutFeedback","Platform","colord","extend","namesPlugin","useState","useEffect","__","usePreferredColorSchemeStyle","Icon","check","close","styles","HsvColorPicker","BottomSheet","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ColorPicker","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","setColor","activeColor","isGradientColor","onNavigationBack","onHandleClosingBottomSheet","onBottomSheetClosed","onHandleHardwareButtonPress","bottomLabelText","isIOS","OS","hitSlop","top","bottom","left","right","h","initH","s","initS","v","initV","toHsv","hue","setHue","sat","setSaturation","val","setValue","savedColor","paddingLeft","spacing","height","pickerHeight","borderRadius","picker","pickerPointerSize","pickerPointer","pickerWidth","getWidth","applyButtonStyle","applyButton","applyButtonDark","cancelButtonStyle","cancelButton","cancelButtonDark","colorTextStyle","colorText","colorTextDark","selectColorTextStyle","selectColorText","selectColorTextDark","footerStyle","footer","footerDark","combineToHex","toHex","currentColor","updateColor","saturation","value","undefined","onButtonPress","action","children","huePickerHue","onHuePickerDragMove","onHuePickerPress","satValPickerHue","satValPickerSaturation","satValPickerValue","onSatValPickerDragMove","onSatValPickerPress","onSatValPickerDragStart","onSatValPickerDragEnd","onHuePickerDragStart","onHuePickerDragEnd","huePickerBarWidth","huePickerBarHeight","satValPickerSize","width","satValPickerSliderSize","satValPickerBorderRadius","huePickerBorderRadius","style","onPress","icon","size","selectable","toUpperCase"],"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 { 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';\nimport BottomSheet from '../mobile/bottom-sheet';\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 ) {\n\t\t\tsetHue( h );\n\t\t}\n\t\tif ( s !== undefined ) {\n\t\t\tsetSaturation( s );\n\t\t}\n\t\tif ( v !== undefined ) {\n\t\t\tsetValue( v );\n\t\t}\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 }>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EPS,IAAA,CAACP,IAAI;YACJqG,IAAI,EAAGpG,KAAO;YACdqG,IAAI,EAAG,EAAI;YACXH,KAAK,EAAG5C;UAAkB,CAC1B;QACD,CACI;MAAC,CACkB,CAAC;IAAA,CACtB,CAAC;EAAA,CACN,CAAC;AAEL;AAEA,SAAS3C,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["View","Text","TouchableWithoutFeedback","Platform","colord","extend","namesPlugin","useState","useEffect","__","usePreferredColorSchemeStyle","Icon","check","close","styles","HsvColorPicker","BottomSheet","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ColorPicker","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","setColor","activeColor","isGradientColor","onNavigationBack","onHandleClosingBottomSheet","onBottomSheetClosed","onHandleHardwareButtonPress","bottomLabelText","isIOS","OS","hitSlop","top","bottom","left","right","h","initH","s","initS","v","initV","toHsv","hue","setHue","sat","setSaturation","val","setValue","savedColor","paddingLeft","spacing","height","pickerHeight","borderRadius","picker","pickerPointerSize","pickerPointer","pickerWidth","getWidth","applyButtonStyle","applyButton","applyButtonDark","cancelButtonStyle","cancelButton","cancelButtonDark","colorTextStyle","colorText","colorTextDark","selectColorTextStyle","selectColorText","selectColorTextDark","footerStyle","footer","footerDark","combineToHex","toHex","currentColor","updateColor","saturation","value","undefined","onButtonPress","action","children","huePickerHue","onHuePickerDragMove","onHuePickerPress","satValPickerHue","satValPickerSaturation","satValPickerValue","onSatValPickerDragMove","onSatValPickerPress","onSatValPickerDragStart","onSatValPickerDragEnd","onHuePickerDragStart","onHuePickerDragEnd","huePickerBarWidth","huePickerBarHeight","satValPickerSize","width","satValPickerSliderSize","satValPickerBorderRadius","huePickerBorderRadius","style","onPress","icon","size","selectable","toUpperCase"],"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 { 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';\nimport BottomSheet from '../mobile/bottom-sheet';\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 ) {\n\t\t\tsetHue( h );\n\t\t}\n\t\tif ( s !== undefined ) {\n\t\t\tsetSaturation( s );\n\t\t}\n\t\tif ( v !== undefined ) {\n\t\t\tsetValue( v );\n\t\t}\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}, [] );\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":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,IAAI,EAAEC,wBAAwB,EAAEC,QAAQ,QAAQ,cAAc;AAC7E,SAASC,MAAM,EAAEC,MAAM,QAAQ,QAAQ;AACvC,OAAOC,WAAW,MAAM,sBAAsB;AAC9C;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,4BAA4B,QA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,CAAC,EACzBnC,eAAe,gBAChBhB,IAAA,CAACjB,IAAI;QAAC6G,KAAK,EAAGnC,oBAAsB;QAAAe,QAAA,EACjCxD;MAAe,CACZ,CAAC,gBAEPhB,IAAA,CAACjB,IAAI;QAAC6G,KAAK,EAAGtC,cAAgB;QAAC0C,UAAU;QAAAxB,QAAA,EACtCP,YAAY,CAACgC,WAAW,CAAC;MAAC,CACvB,CACN,eACDjG,IAAA,CAAChB,wBAAwB;QACxB6G,OAAO,EAAGA,CAAA,KAAMvB,aAAa,CAAE,OAAQ,CAAG;QAC1CnD,OAAO,EAAGA,OAAS;QAAAqD,QAAA,eAEnBxE,IAAA,CAAClB,IAAI;UAAA0F,QAAA,EACFvD,KAAK,gBACNjB,IAAA,CAACjB,IAAI;YAAC6G,KAAK,EAAG5C,gBAAkB;YAAAwB,QAAA,EAC7BjF,EAAE,CAAE,OAAQ;UAAC,CACV,CAAC,gBAEPS,IAAA,CAACP,IAAI;YACJqG,IAAI,EAAGpG,KAAO;YACdqG,IAAI,EAAG,EAAI;YACXH,KAAK,EAAG5C;UAAkB,CAC1B;QACD,CACI;MAAC,CACkB,CAAC;IAAA,CACtB,CAAC;EAAA,CACN,CAAC;AAEL;AAEA,SAAS3C,WAAW","ignoreList":[]}
@@ -6,8 +6,7 @@ import { Text } from '../text';
6
6
  import { RangeControl, NumberControlWrapper } from './styles';
7
7
  import { COLORS } from '../utils/colors-values';
8
8
  import InputControlPrefixWrapper from '../input-control/input-prefix-wrapper';
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
10
  export const InputWithSlider = ({
12
11
  min,
13
12
  max,
@@ -1 +1 @@
1
- {"version":3,"names":["HStack","Text","RangeControl","NumberControlWrapper","COLORS","InputControlPrefixWrapper","jsx","_jsx","jsxs","_jsxs","InputWithSlider","min","max","label","abbreviation","onChange","value","onNumberControlChange","newValue","parseInt","spacing","children","hideLabelFromVision","prefix","color","theme","accent","lineHeight","spinControls","size","__nextHasNoMarginBottom","__next40pxDefaultSize","withInputField"],"sources":["@wordpress/components/src/color-picker/input-with-slider.tsx"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { HStack } from '../h-stack';\nimport { Text } from '../text';\nimport { RangeControl, NumberControlWrapper } from './styles';\nimport { COLORS } from '../utils/colors-values';\nimport type { InputWithSliderProps } from './types';\nimport InputControlPrefixWrapper from '../input-control/input-prefix-wrapper';\n\nexport const InputWithSlider = ( {\n\tmin,\n\tmax,\n\tlabel,\n\tabbreviation,\n\tonChange,\n\tvalue,\n}: InputWithSliderProps ) => {\n\tconst onNumberControlChange = ( newValue?: number | string ) => {\n\t\tif ( ! newValue ) {\n\t\t\tonChange( 0 );\n\t\t\treturn;\n\t\t}\n\t\tif ( typeof newValue === 'string' ) {\n\t\t\tonChange( parseInt( newValue, 10 ) );\n\t\t\treturn;\n\t\t}\n\t\tonChange( newValue );\n\t};\n\n\treturn (\n\t\t<HStack spacing={ 4 }>\n\t\t\t<NumberControlWrapper\n\t\t\t\tmin={ min }\n\t\t\t\tmax={ max }\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onNumberControlChange }\n\t\t\t\tprefix={\n\t\t\t\t\t<InputControlPrefixWrapper>\n\t\t\t\t\t\t<Text color={ COLORS.theme.accent } lineHeight={ 1 }>\n\t\t\t\t\t\t\t{ abbreviation }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t}\n\t\t\t\tspinControls=\"none\"\n\t\t\t\tsize=\"__unstable-large\"\n\t\t\t/>\n\t\t\t<RangeControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision\n\t\t\t\tmin={ min }\n\t\t\t\tmax={ max }\n\t\t\t\tvalue={ value }\n\t\t\t\t// @ts-expect-error\n\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/40535#issuecomment-1172418185\n\t\t\t\tonChange={ onChange }\n\t\t\t\twithInputField={ false }\n\t\t\t/>\n\t\t</HStack>\n\t);\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,YAAY;AACnC,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,YAAY,EAAEC,oBAAoB,QAAQ,UAAU;AAC7D,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,OAAOC,yBAAyB,MAAM,uCAAuC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE9E,OAAO,MAAMC,eAAe,GAAGA,CAAE;EAChCC,GAAG;EACHC,GAAG;EACHC,KAAK;EACLC,YAAY;EACZC,QAAQ;EACRC;AACqB,CAAC,KAAM;EAC5B,MAAMC,qBAAqB,GAAKC,QAA0B,IAAM;IAC/D,IAAK,CAAEA,QAAQ,EAAG;MACjBH,QAAQ,CAAE,CAAE,CAAC;MACb;IACD;IACA,IAAK,OAAOG,QAAQ,KAAK,QAAQ,EAAG;MACnCH,QAAQ,CAAEI,QAAQ,CAAED,QAAQ,EAAE,EAAG,CAAE,CAAC;MACpC;IACD;IACAH,QAAQ,CAAEG,QAAS,CAAC;EACrB,CAAC;EAED,oBACCT,KAAA,CAACT,MAAM;IAACoB,OAAO,EAAG,CAAG;IAAAC,QAAA,gBACpBd,IAAA,CAACJ,oBAAoB;MACpBQ,GAAG,EAAGA,GAAK;MACXC,GAAG,EAAGA,GAAK;MACXC,KAAK,EAAGA,KAAO;MACfS,mBAAmB;MACnBN,KAAK,EAAGA,KAAO;MACfD,QAAQ,EAAGE,qBAAuB;MAClCM,MAAM,eACLhB,IAAA,CAACF,yBAAyB;QAAAgB,QAAA,eACzBd,IAAA,CAACN,IAAI;UAACuB,KAAK,EAAGpB,MAAM,CAACqB,KAAK,CAACC,MAAQ;UAACC,UAAU,EAAG,CAAG;UAAAN,QAAA,EACjDP;QAAY,CACT;MAAC,CACmB,CAC3B;MACDc,YAAY,EAAC,MAAM;MACnBC,IAAI,EAAC;IAAkB,CACvB,CAAC,eACFtB,IAAA,CAACL,YAAY;MACZ4B,uBAAuB;MACvBC,qBAAqB;MACrBlB,KAAK,EAAGA,KAAO;MACfS,mBAAmB;MACnBX,GAAG,EAAGA,GAAK;MACXC,GAAG,EAAGA,GAAK;MACXI,KAAK,EAAGA;MACR;MACA;MAAA;MACAD,QAAQ,EAAGA,QAAU;MACrBiB,cAAc,EAAG;IAAO,CACxB,CAAC;EAAA,CACK,CAAC;AAEX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["HStack","Text","RangeControl","NumberControlWrapper","COLORS","InputControlPrefixWrapper","jsx","_jsx","jsxs","_jsxs","InputWithSlider","min","max","label","abbreviation","onChange","value","onNumberControlChange","newValue","parseInt","spacing","children","hideLabelFromVision","prefix","color","theme","accent","lineHeight","spinControls","size","__nextHasNoMarginBottom","__next40pxDefaultSize","withInputField"],"sources":["@wordpress/components/src/color-picker/input-with-slider.tsx"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { HStack } from '../h-stack';\nimport { Text } from '../text';\nimport { RangeControl, NumberControlWrapper } from './styles';\nimport { COLORS } from '../utils/colors-values';\nimport type { InputWithSliderProps } from './types';\nimport InputControlPrefixWrapper from '../input-control/input-prefix-wrapper';\n\nexport const InputWithSlider = ( {\n\tmin,\n\tmax,\n\tlabel,\n\tabbreviation,\n\tonChange,\n\tvalue,\n}: InputWithSliderProps ) => {\n\tconst onNumberControlChange = ( newValue?: number | string ) => {\n\t\tif ( ! newValue ) {\n\t\t\tonChange( 0 );\n\t\t\treturn;\n\t\t}\n\t\tif ( typeof newValue === 'string' ) {\n\t\t\tonChange( parseInt( newValue, 10 ) );\n\t\t\treturn;\n\t\t}\n\t\tonChange( newValue );\n\t};\n\n\treturn (\n\t\t<HStack spacing={ 4 }>\n\t\t\t<NumberControlWrapper\n\t\t\t\tmin={ min }\n\t\t\t\tmax={ max }\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onNumberControlChange }\n\t\t\t\tprefix={\n\t\t\t\t\t<InputControlPrefixWrapper>\n\t\t\t\t\t\t<Text color={ COLORS.theme.accent } lineHeight={ 1 }>\n\t\t\t\t\t\t\t{ abbreviation }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t}\n\t\t\t\tspinControls=\"none\"\n\t\t\t\tsize=\"__unstable-large\"\n\t\t\t/>\n\t\t\t<RangeControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision\n\t\t\t\tmin={ min }\n\t\t\t\tmax={ max }\n\t\t\t\tvalue={ value }\n\t\t\t\t// @ts-expect-error\n\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/40535#issuecomment-1172418185\n\t\t\t\tonChange={ onChange }\n\t\t\t\twithInputField={ false }\n\t\t\t/>\n\t\t</HStack>\n\t);\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,YAAY;AACnC,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,YAAY,EAAEC,oBAAoB,QAAQ,UAAU;AAC7D,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,OAAOC,yBAAyB,MAAM,uCAAuC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9E,OAAO,MAAMC,eAAe,GAAGA,CAAE;EAChCC,GAAG;EACHC,GAAG;EACHC,KAAK;EACLC,YAAY;EACZC,QAAQ;EACRC;AACqB,CAAC,KAAM;EAC5B,MAAMC,qBAAqB,GAAKC,QAA0B,IAAM;IAC/D,IAAK,CAAEA,QAAQ,EAAG;MACjBH,QAAQ,CAAE,CAAE,CAAC;MACb;IACD;IACA,IAAK,OAAOG,QAAQ,KAAK,QAAQ,EAAG;MACnCH,QAAQ,CAAEI,QAAQ,CAAED,QAAQ,EAAE,EAAG,CAAE,CAAC;MACpC;IACD;IACAH,QAAQ,CAAEG,QAAS,CAAC;EACrB,CAAC;EAED,oBACCT,KAAA,CAACT,MAAM;IAACoB,OAAO,EAAG,CAAG;IAAAC,QAAA,gBACpBd,IAAA,CAACJ,oBAAoB;MACpBQ,GAAG,EAAGA,GAAK;MACXC,GAAG,EAAGA,GAAK;MACXC,KAAK,EAAGA,KAAO;MACfS,mBAAmB;MACnBN,KAAK,EAAGA,KAAO;MACfD,QAAQ,EAAGE,qBAAuB;MAClCM,MAAM,eACLhB,IAAA,CAACF,yBAAyB;QAAAgB,QAAA,eACzBd,IAAA,CAACN,IAAI;UAACuB,KAAK,EAAGpB,MAAM,CAACqB,KAAK,CAACC,MAAQ;UAACC,UAAU,EAAG,CAAG;UAAAN,QAAA,EACjDP;QAAY,CACT;MAAC,CACmB,CAC3B;MACDc,YAAY,EAAC,MAAM;MACnBC,IAAI,EAAC;IAAkB,CACvB,CAAC,eACFtB,IAAA,CAACL,YAAY;MACZ4B,uBAAuB;MACvBC,qBAAqB;MACrBlB,KAAK,EAAGA,KAAO;MACfS,mBAAmB;MACnBX,GAAG,EAAGA,GAAK;MACXC,GAAG,EAAGA,GAAK;MACXI,KAAK,EAAGA;MACR;MACA;MAAA;MACAD,QAAQ,EAAGA,QAAU;MACrBiB,cAAc,EAAG;IAAO,CACxB,CAAC;EAAA,CACK,CAAC;AAEX,CAAC","ignoreList":[]}
@@ -7,9 +7,7 @@ import { colord } from 'colord';
7
7
  * Internal dependencies
8
8
  */
9
9
  import { InputWithSlider } from './input-with-slider';
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- import { Fragment as _Fragment } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
10
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
11
  export const RgbInput = ({
14
12
  color,
15
13
  onChange,
@@ -1 +1 @@
1
- {"version":3,"names":["colord","InputWithSlider","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","RgbInput","color","onChange","enableAlpha","r","g","b","a","toRgb","children","min","max","label","abbreviation","value","nextR","nextG","nextB","Math","trunc","nextA"],"sources":["@wordpress/components/src/color-picker/rgb-input.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { colord } from 'colord';\n\n/**\n * Internal dependencies\n */\nimport { InputWithSlider } from './input-with-slider';\nimport type { RgbInputProps } from './types';\n\nexport const RgbInput = ( { color, onChange, enableAlpha }: RgbInputProps ) => {\n\tconst { r, g, b, a } = color.toRgb();\n\n\treturn (\n\t\t<>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Red\"\n\t\t\t\tabbreviation=\"R\"\n\t\t\t\tvalue={ r }\n\t\t\t\tonChange={ ( nextR: number ) =>\n\t\t\t\t\tonChange( colord( { r: nextR, g, b, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Green\"\n\t\t\t\tabbreviation=\"G\"\n\t\t\t\tvalue={ g }\n\t\t\t\tonChange={ ( nextG: number ) =>\n\t\t\t\t\tonChange( colord( { r, g: nextG, b, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Blue\"\n\t\t\t\tabbreviation=\"B\"\n\t\t\t\tvalue={ b }\n\t\t\t\tonChange={ ( nextB: number ) =>\n\t\t\t\t\tonChange( colord( { r, g, b: nextB, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ enableAlpha && (\n\t\t\t\t<InputWithSlider\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\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ACXC,KAAK,EAAC,OAAO;MACbC,YAAY,EAAC,GAAG;MAChBC,KAAK,EAAGT,CAAG;MACXH,QAAQ,EAAKc,KAAa,IACzBd,QAAQ,CAAEV,MAAM,CAAE;QAAEY,CAAC;QAAEC,CAAC,EAAEW,KAAK;QAAEV,CAAC;QAAEC;MAAE,CAAE,CAAE;IAC1C,CACD,CAAC,eACFZ,IAAA,CAACF,eAAe;MACfiB,GAAG,EAAG,CAAG;MACTC,GAAG,EAAG,GAAK;MACXC,KAAK,EAAC,MAAM;MACZC,YAAY,EAAC,GAAG;MAChBC,KAAK,EAAGR,CAAG;MACXJ,QAAQ,EAAKe,KAAa,IACzBf,QAAQ,CAAEV,MAAM,CAAE;QAAEY,CAAC;QAAEC,CAAC;QAAEC,CAAC,EAAEW,KAAK;QAAEV;MAAE,CAAE,CAAE;IAC1C,CACD,CAAC,EACAJ,WAAW,iBACZR,IAAA,CAACF,eAAe;MACfiB,GAAG,EAAG,CAAG;MACTC,GAAG,EAAG,GAAK;MACXC,KAAK,EAAC,OAAO;MACbC,YAAY,EAAC,GAAG;MAChBC,KAAK,EAAGI,IAAI,CAACC,KAAK,CAAEZ,CAAC,GAAG,GAAI,CAAG;MAC/BL,QAAQ,EAAKkB,KAAa,IACzBlB,QAAQ,CACPV,MAAM,CAAE;QACPY,CAAC;QACDC,CAAC;QACDC,CAAC;QACDC,CAAC,EAAEa,KAAK,GAAG;MACZ,CAAE,CACH;IACA,CACD,CACD;EAAA,CACA,CAAC;AAEL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["colord","InputWithSlider","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","RgbInput","color","onChange","enableAlpha","r","g","b","a","toRgb","children","min","max","label","abbreviation","value","nextR","nextG","nextB","Math","trunc","nextA"],"sources":["@wordpress/components/src/color-picker/rgb-input.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { colord } from 'colord';\n\n/**\n * Internal dependencies\n */\nimport { InputWithSlider } from './input-with-slider';\nimport type { RgbInputProps } from './types';\n\nexport const RgbInput = ( { color, onChange, enableAlpha }: RgbInputProps ) => {\n\tconst { r, g, b, a } = color.toRgb();\n\n\treturn (\n\t\t<>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Red\"\n\t\t\t\tabbreviation=\"R\"\n\t\t\t\tvalue={ r }\n\t\t\t\tonChange={ ( nextR: number ) =>\n\t\t\t\t\tonChange( colord( { r: nextR, g, b, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Green\"\n\t\t\t\tabbreviation=\"G\"\n\t\t\t\tvalue={ g }\n\t\t\t\tonChange={ ( nextG: number ) =>\n\t\t\t\t\tonChange( colord( { r, g: nextG, b, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Blue\"\n\t\t\t\tabbreviation=\"B\"\n\t\t\t\tvalue={ b }\n\t\t\t\tonChange={ ( nextB: number ) =>\n\t\t\t\t\tonChange( colord( { r, g, b: nextB, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ enableAlpha && (\n\t\t\t\t<InputWithSlider\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tmax={ 100 }\n\t\t\t\t\tlabel=\"Alpha\"\n\t\t\t\t\tabbreviation=\"A\"\n\t\t\t\t\tvalue={ Math.trunc( a * 100 ) }\n\t\t\t\t\tonChange={ ( nextA: number ) =>\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tcolord( {\n\t\t\t\t\t\t\t\tr,\n\t\t\t\t\t\t\t\tg,\n\t\t\t\t\t\t\t\tb,\n\t\t\t\t\t\t\t\ta: nextA / 100,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t)\n\t\t\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;MAChBC,KAAK,EAAGR,CAAG;MACXJ,QAAQ,EAAKe,KAAa,IACzBf,QAAQ,CAAEV,MAAM,CAAE;QAAEY,CAAC;QAAEC,CAAC;QAAEC,CAAC,EAAEW,KAAK;QAAEV;MAAE,CAAE,CAAE;IAC1C,CACD,CAAC,EACAJ,WAAW,iBACZR,IAAA,CAACF,eAAe;MACfiB,GAAG,EAAG,CAAG;MACTC,GAAG,EAAG,GAAK;MACXC,KAAK,EAAC,OAAO;MACbC,YAAY,EAAC,GAAG;MAChBC,KAAK,EAAGI,IAAI,CAACC,KAAK,CAAEZ,CAAC,GAAG,GAAI,CAAG;MAC/BL,QAAQ,EAAKkB,KAAa,IACzBlB,QAAQ,CACPV,MAAM,CAAE;QACPY,CAAC;QACDC,CAAC;QACDC,CAAC;QACDC,CAAC,EAAEa,KAAK,GAAG;MACZ,CAAE,CACH;IACA,CACD,CACD;EAAA,CACA,CAAC;AAEL,CAAC","ignoreList":[]}
@@ -14,8 +14,7 @@ import React, { Component } from '@wordpress/element';
14
14
  * Internal dependencies
15
15
  */
16
16
  import styles from './style.native.scss';
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
18
  export default class SaturationValuePicker extends Component {
20
19
  constructor(props) {
21
20
  super(props);
@@ -1 +1 @@
1
- {"version":3,"names":["View","PanResponder","LinearGradient","colord","React","Component","styles","jsx","_jsx","jsxs","_jsxs","SaturationValuePicker","constructor","props","panResponder","create","onStartShouldSetPanResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponder","onMoveShouldSetPanResponderCapture","onPanResponderGrant","evt","gestureState","onPress","saturation","value","computeSatValPress","dragStartValue","nativeEvent","fireDragEvent","onPanResponderMove","onPanResponderTerminationRequest","onPanResponderRelease","onPanResponderTerminate","onShouldBlockNativeResponder","normalizeValue","computeSatValDrag","dx","dy","size","diffx","width","diffy","height","event","locationX","locationY","eventName","render","sliderSize","hue","containerStyle","borderRadius","currentColor","style","panHandlers","children","colors","h","s","l","toHex","start","x","y","end","pointerEvents","borderWidth","backgroundColor","transform","translateX","translateY"],"sources":["@wordpress/components/src/color-picker/saturation-picker.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, PanResponder } from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport React, { Component } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.native.scss';\n\nexport default class SaturationValuePicker extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\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\tconst { saturation, value } = this.computeSatValPress( evt );\n\t\t\t\tthis.dragStartValue = {\n\t\t\t\t\tsaturation,\n\t\t\t\t\tvalue,\n\t\t\t\t};\n\n\t\t\t\tif ( onPress ) {\n\t\t\t\t\tonPress( {\n\t\t\t\t\t\t...this.computeSatValPress( 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\tnormalizeValue( value ) {\n\t\tif ( value < 0 ) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ( value > 1 ) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn value;\n\t}\n\n\tcomputeSatValDrag( gestureState ) {\n\t\tconst { dx, dy } = gestureState;\n\t\tconst { size } = this.props;\n\t\tconst { saturation, value } = this.dragStartValue;\n\t\tconst diffx = dx / size.width;\n\t\tconst diffy = dy / size.height;\n\t\treturn {\n\t\t\tsaturation: this.normalizeValue( saturation + diffx ),\n\t\t\tvalue: this.normalizeValue( value - diffy ),\n\t\t};\n\t}\n\n\tcomputeSatValPress( event ) {\n\t\tconst { nativeEvent } = event;\n\t\tconst { locationX, locationY } = nativeEvent;\n\t\tconst { size } = this.props;\n\t\treturn {\n\t\t\tsaturation: this.normalizeValue( locationX / size.width ),\n\t\t\tvalue: 1 - this.normalizeValue( locationY / size.height ),\n\t\t};\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\t...this.computeSatValDrag( gestureState ),\n\t\t\t\tgestureState,\n\t\t\t} );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tsize,\n\t\t\tsliderSize = 24,\n\t\t\thue = 0,\n\t\t\tvalue = 1,\n\t\t\tsaturation = 1,\n\t\t\tcontainerStyle = {},\n\t\t\tborderRadius = 0,\n\t\t\tcurrentColor,\n\t\t} = this.props;\n\n\t\treturn (\n\t\t\t<View\n\t\t\t\tstyle={ [\n\t\t\t\t\tstyles[ 'hsv-container' ],\n\t\t\t\t\tcontainerStyle,\n\t\t\t\t\t{\n\t\t\t\t\t\theight: size.height + sliderSize,\n\t\t\t\t\t\twidth: size.width + sliderSize,\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\t{ ...this.panResponder.panHandlers }\n\t\t\t>\n\t\t\t\t<LinearGradient\n\t\t\t\t\tstyle={ [\n\t\t\t\t\t\tstyles[ 'gradient-container' ],\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\t},\n\t\t\t\t\t] }\n\t\t\t\t\tcolors={ [\n\t\t\t\t\t\t'#fff',\n\t\t\t\t\t\tcolord( { h: hue, s: 100, l: 50 } ).toHex(),\n\t\t\t\t\t] }\n\t\t\t\t\tstart={ { x: 0, y: 0.5 } }\n\t\t\t\t\tend={ { x: 1, y: 0.5 } }\n\t\t\t\t>\n\t\t\t\t\t<LinearGradient colors={ [ 'rgba(0, 0, 0, 0)', '#000' ] }>\n\t\t\t\t\t\t<View\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: size.height,\n\t\t\t\t\t\t\t\twidth: size.width,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</LinearGradient>\n\t\t\t\t</LinearGradient>\n\t\t\t\t<View\n\t\t\t\t\tpointerEvents=\"none\"\n\t\t\t\t\tstyle={ [\n\t\t\t\t\t\tstyles[ 'saturation-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\tborderRadius: sliderSize / 2,\n\t\t\t\t\t\t\tborderWidth: sliderSize / 10,\n\t\t\t\t\t\t\tbackgroundColor: currentColor,\n\t\t\t\t\t\t\ttransform: [\n\t\t\t\t\t\t\t\t{ translateX: size.width * saturation },\n\t\t\t\t\t\t\t\t{ translateY: size.height * ( 1 - value ) },\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":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,YAAY,QAAQ,cAAc;AACjD,OAAOC,cAAc,MAAM,8BAA8B;AACzD,SAAS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E;QAAI,CAAG;QAC1BC,GAAG,EAAG;UAAEF,CAAC,EAAE,CAAC;UAAEC,CAAC,EAAE;QAAI,CAAG;QAAAR,QAAA,eAExBhD,IAAA,CAACN,cAAc;UAACuD,MAAM,EAAG,CAAE,kBAAkB,EAAE,MAAM,CAAI;UAAAD,QAAA,eACxDhD,IAAA,CAACR,IAAI;YACJsD,KAAK,EAAG;cACPX,MAAM,EAAEJ,IAAI,CAACI,MAAM;cACnBF,KAAK,EAAEF,IAAI,CAACE;YACb;UAAG,CACH;QAAC,CACa;MAAC,CACF,CAAC,eACjBjC,IAAA,CAACR,IAAI;QACJkE,aAAa,EAAC,MAAM;QACpBZ,KAAK,EAAG,CACPhD,MAAM,CAAE,mBAAmB,CAAE,EAC7B;UACCmC,KAAK,EAAEQ,UAAU;UACjBN,MAAM,EAAEM,UAAU;UAClBG,YAAY,EAAEH,UAAU,GAAG,CAAC;UAC5BkB,WAAW,EAAElB,UAAU,GAAG,EAAE;UAC5BmB,eAAe,EAAEf,YAAY;UAC7BgB,SAAS,EAAE,CACV;YAAEC,UAAU,EAAE/B,IAAI,CAACE,KAAK,GAAGjB;UAAW,CAAC,EACvC;YAAE+C,UAAU,EAAEhC,IAAI,CAACI,MAAM,IAAK,CAAC,GAAGlB,KAAK;UAAG,CAAC;QAE7C,CAAC;MACC,CACH,CAAC;IAAA,CACG,CAAC;EAET;AACD","ignoreList":[]}
1
+ {"version":3,"names":["View","PanResponder","LinearGradient","colord","React","Component","styles","jsx","_jsx","jsxs","_jsxs","SaturationValuePicker","constructor","props","panResponder","create","onStartShouldSetPanResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponder","onMoveShouldSetPanResponderCapture","onPanResponderGrant","evt","gestureState","onPress","saturation","value","computeSatValPress","dragStartValue","nativeEvent","fireDragEvent","onPanResponderMove","onPanResponderTerminationRequest","onPanResponderRelease","onPanResponderTerminate","onShouldBlockNativeResponder","normalizeValue","computeSatValDrag","dx","dy","size","diffx","width","diffy","height","event","locationX","locationY","eventName","render","sliderSize","hue","containerStyle","borderRadius","currentColor","style","panHandlers","children","colors","h","s","l","toHex","start","x","y","end","pointerEvents","borderWidth","backgroundColor","transform","translateX","translateY"],"sources":["@wordpress/components/src/color-picker/saturation-picker.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, PanResponder } from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport React, { Component } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.native.scss';\n\nexport default class SaturationValuePicker extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\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\tconst { saturation, value } = this.computeSatValPress( evt );\n\t\t\t\tthis.dragStartValue = {\n\t\t\t\t\tsaturation,\n\t\t\t\t\tvalue,\n\t\t\t\t};\n\n\t\t\t\tif ( onPress ) {\n\t\t\t\t\tonPress( {\n\t\t\t\t\t\t...this.computeSatValPress( 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\tnormalizeValue( value ) {\n\t\tif ( value < 0 ) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ( value > 1 ) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn value;\n\t}\n\n\tcomputeSatValDrag( gestureState ) {\n\t\tconst { dx, dy } = gestureState;\n\t\tconst { size } = this.props;\n\t\tconst { saturation, value } = this.dragStartValue;\n\t\tconst diffx = dx / size.width;\n\t\tconst diffy = dy / size.height;\n\t\treturn {\n\t\t\tsaturation: this.normalizeValue( saturation + diffx ),\n\t\t\tvalue: this.normalizeValue( value - diffy ),\n\t\t};\n\t}\n\n\tcomputeSatValPress( event ) {\n\t\tconst { nativeEvent } = event;\n\t\tconst { locationX, locationY } = nativeEvent;\n\t\tconst { size } = this.props;\n\t\treturn {\n\t\t\tsaturation: this.normalizeValue( locationX / size.width ),\n\t\t\tvalue: 1 - this.normalizeValue( locationY / size.height ),\n\t\t};\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\t...this.computeSatValDrag( gestureState ),\n\t\t\t\tgestureState,\n\t\t\t} );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tsize,\n\t\t\tsliderSize = 24,\n\t\t\thue = 0,\n\t\t\tvalue = 1,\n\t\t\tsaturation = 1,\n\t\t\tcontainerStyle = {},\n\t\t\tborderRadius = 0,\n\t\t\tcurrentColor,\n\t\t} = this.props;\n\n\t\treturn (\n\t\t\t<View\n\t\t\t\tstyle={ [\n\t\t\t\t\tstyles[ 'hsv-container' ],\n\t\t\t\t\tcontainerStyle,\n\t\t\t\t\t{\n\t\t\t\t\t\theight: size.height + sliderSize,\n\t\t\t\t\t\twidth: size.width + sliderSize,\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\t{ ...this.panResponder.panHandlers }\n\t\t\t>\n\t\t\t\t<LinearGradient\n\t\t\t\t\tstyle={ [\n\t\t\t\t\t\tstyles[ 'gradient-container' ],\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\t},\n\t\t\t\t\t] }\n\t\t\t\t\tcolors={ [\n\t\t\t\t\t\t'#fff',\n\t\t\t\t\t\tcolord( { h: hue, s: 100, l: 50 } ).toHex(),\n\t\t\t\t\t] }\n\t\t\t\t\tstart={ { x: 0, y: 0.5 } }\n\t\t\t\t\tend={ { x: 1, y: 0.5 } }\n\t\t\t\t>\n\t\t\t\t\t<LinearGradient colors={ [ 'rgba(0, 0, 0, 0)', '#000' ] }>\n\t\t\t\t\t\t<View\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: size.height,\n\t\t\t\t\t\t\t\twidth: size.width,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</LinearGradient>\n\t\t\t\t</LinearGradient>\n\t\t\t\t<View\n\t\t\t\t\tpointerEvents=\"none\"\n\t\t\t\t\tstyle={ [\n\t\t\t\t\t\tstyles[ 'saturation-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\tborderRadius: sliderSize / 2,\n\t\t\t\t\t\t\tborderWidth: sliderSize / 10,\n\t\t\t\t\t\t\tbackgroundColor: currentColor,\n\t\t\t\t\t\t\ttransform: [\n\t\t\t\t\t\t\t\t{ translateX: size.width * saturation },\n\t\t\t\t\t\t\t\t{ translateY: size.height * ( 1 - value ) },\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":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,YAAY,QAAQ,cAAc;AACjD,OAAOC,cAAc,MAAM,8BAA8B;AACzD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;QAAI,CAAG;QAC1BC,GAAG,EAAG;UAAEF,CAAC,EAAE,CAAC;UAAEC,CAAC,EAAE;QAAI,CAAG;QAAAR,QAAA,eAExBhD,IAAA,CAACN,cAAc;UAACuD,MAAM,EAAG,CAAE,kBAAkB,EAAE,MAAM,CAAI;UAAAD,QAAA,eACxDhD,IAAA,CAACR,IAAI;YACJsD,KAAK,EAAG;cACPX,MAAM,EAAEJ,IAAI,CAACI,MAAM;cACnBF,KAAK,EAAEF,IAAI,CAACE;YACb;UAAG,CACH;QAAC,CACa;MAAC,CACF,CAAC,eACjBjC,IAAA,CAACR,IAAI;QACJkE,aAAa,EAAC,MAAM;QACpBZ,KAAK,EAAG,CACPhD,MAAM,CAAE,mBAAmB,CAAE,EAC7B;UACCmC,KAAK,EAAEQ,UAAU;UACjBN,MAAM,EAAEM,UAAU;UAClBG,YAAY,EAAEH,UAAU,GAAG,CAAC;UAC5BkB,WAAW,EAAElB,UAAU,GAAG,EAAE;UAC5BmB,eAAe,EAAEf,YAAY;UAC7BgB,SAAS,EAAE,CACV;YAAEC,UAAU,EAAE/B,IAAI,CAACE,KAAK,GAAGjB;UAAW,CAAC,EACvC;YAAE+C,UAAU,EAAEhC,IAAI,CAACI,MAAM,IAAK,CAAC,GAAGlB,KAAK;UAAG,CAAC;QAE7C,CAAC;MACC,CACH,CAAC;IAAA,CACG,CAAC;EAET;AACD","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["NumberControl","InnerSelectControl","InnerRangeControl","space","boxSizingReset","Button","Flex","HStack","CONFIG","NumberControlWrapper","_styled","process","env","NODE_ENV","target","label","SelectControl","RangeControl","interactiveHueStyles","AuxiliaryColorArtefactWrapper","AuxiliaryColorArtefactHStackHeader","ColorInputWrapper","ColorfulWrapper","radiusFull","borderWidthFocus","CopyButton"],"sources":["@wordpress/components/src/color-picker/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport NumberControl from '../number-control';\nimport InnerSelectControl from '../select-control';\nimport InnerRangeControl from '../range-control';\nimport { space } from '../utils/space';\nimport { boxSizingReset } from '../utils';\nimport Button from '../button';\nimport { Flex } from '../flex';\nimport { HStack } from '../h-stack';\nimport CONFIG from '../utils/config-values';\n\nexport const NumberControlWrapper = styled( NumberControl )`\n\twidth: ${ space( 24 ) };\n`;\n\nexport const SelectControl = styled( InnerSelectControl )`\n\tmargin-left: ${ space( -2 ) };\n\twidth: 5em;\n`;\n\nexport const RangeControl = styled( InnerRangeControl )`\n\tflex: 1;\n\tmargin-right: ${ space( 2 ) };\n`;\n\n// Make the Hue circle picker not go out of the bar.\nconst interactiveHueStyles = `\n.react-colorful__interactive {\n\twidth: calc( 100% - ${ space( 2 ) } );\n\tmargin-left: ${ space( 1 ) };\n}`;\n\nexport const AuxiliaryColorArtefactWrapper = styled.div`\n\tpadding-top: ${ space( 2 ) };\n\tpadding-right: 0;\n\tpadding-left: 0;\n\tpadding-bottom: 0;\n`;\n\nexport const AuxiliaryColorArtefactHStackHeader = styled( HStack )`\n\tpadding-left: ${ space( 4 ) };\n\tpadding-right: ${ space( 4 ) };\n`;\n\nexport const ColorInputWrapper = styled( Flex )`\n\tpadding-top: ${ space( 4 ) };\n\tpadding-left: ${ space( 4 ) };\n\tpadding-right: ${ space( 3 ) };\n\tpadding-bottom: ${ space( 5 ) };\n`;\n\nexport const ColorfulWrapper = styled.div`\n\t${ boxSizingReset };\n\n\twidth: 216px;\n\n\t.react-colorful {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\twidth: 216px;\n\t\theight: auto;\n\t}\n\n\t.react-colorful__saturation {\n\t\twidth: 100%;\n\t\tborder-radius: 0;\n\t\theight: 216px;\n\t\tmargin-bottom: ${ space( 4 ) };\n\t\tborder-bottom: none;\n\t}\n\n\t.react-colorful__hue,\n\t.react-colorful__alpha {\n\t\twidth: 184px;\n\t\theight: 16px;\n\t\tborder-radius: ${ CONFIG.radiusFull };\n\t\tmargin-bottom: ${ space( 2 ) };\n\t}\n\n\t.react-colorful__pointer {\n\t\theight: 16px;\n\t\twidth: 16px;\n\t\tborder: none;\n\t\tbox-shadow: 0 0 2px 0 rgba( 0, 0, 0, 0.25 );\n\n\t\t// Shown instead of box-shadow to Windows high contrast mode.\n\t\toutline: 2px solid transparent;\n\t}\n\n\t.react-colorful__pointer-fill {\n\t\tbox-shadow: inset 0 0 0 ${ CONFIG.borderWidthFocus } #fff;\n\t}\n\n\t${ interactiveHueStyles }\n`;\n\nexport const CopyButton = styled( Button )`\n\t&&&&& {\n\t\tmin-width: ${ space( 6 ) };\n\t\tpadding: 0;\n\n\t\t> svg {\n\t\t\tmargin-right: 0;\n\t\t}\n\t}\n`;\n"],"mappings":";AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,kBAAkB,MAAM,mBAAmB;AAClD,OAAOC,iBAAiB,MAAM,kBAAkB;AAChD,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,cAAc,QAAQ,UAAU;AACzC,OAAOC,MAAM,MAAM,WAAW;AAC9B,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,MAAM,QAAQ,YAAY;AACnC,OAAOC,MAAM,MAAM,wBAAwB;AAE3C,OAAO,MAAMC,oBAAoB,gBAAGC,OAAA,CAAQV,aAAa,EAAAW,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,WAChDZ,KAAK,CAAE,EAAG,CAAC,SAAAQ,OAAA,CAAAC,GAAA,CAAAC,QAAA,gyHACrB;AAED,OAAO,MAAMG,aAAa,gBAAGN,OAAA,CAAQT,kBAAkB,EAAAU,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,iBACxCZ,KAAK,CAAE,CAAC,CA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AAAC,GAAA,CAAAC,QAAA,gyHAC7B;AAED,OAAO,MAAMS,eAAe,gBAAAZ,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GACxBX,cAAc,oMAgBED,KAAK,CAAE,CAAE,CAAC,6GAQVK,MAAM,CAACe,UAAU,qBACjBpB,KAAK,CAAE,CAAE,CAAC,mMAcDK,MAAM,CAACgB,gBAAgB,aAGhDN,oBAAoB,SAAAP,OAAA,CAAAC,GAAA,CAAAC,QAAA,gyHACvB;AAED,OAAO,MAAMY,UAAU,gBAAGf,OAAA,CAAQL,MAAM,EAAAM,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,qBAE1BZ,KAAK,CAAE,CAAE,CAAC,yCAAAQ,OAAA,CAAAC,GAAA,CAAAC,QAAA,gyHAOzB","ignoreList":[]}
1
+ {"version":3,"names":["NumberControl","InnerSelectControl","InnerRangeControl","space","boxSizingReset","Button","Flex","HStack","CONFIG","NumberControlWrapper","_styled","process","env","NODE_ENV","target","label","SelectControl","RangeControl","interactiveHueStyles","AuxiliaryColorArtefactWrapper","AuxiliaryColorArtefactHStackHeader","ColorInputWrapper","ColorfulWrapper","radiusFull","borderWidthFocus","CopyButton"],"sources":["@wordpress/components/src/color-picker/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport NumberControl from '../number-control';\nimport InnerSelectControl from '../select-control';\nimport InnerRangeControl from '../range-control';\nimport { space } from '../utils/space';\nimport { boxSizingReset } from '../utils';\nimport Button from '../button';\nimport { Flex } from '../flex';\nimport { HStack } from '../h-stack';\nimport CONFIG from '../utils/config-values';\n\nexport const NumberControlWrapper = styled( NumberControl )`\n\twidth: ${ space( 24 ) };\n`;\n\nexport const SelectControl = styled( InnerSelectControl )`\n\tmargin-left: ${ space( -2 ) };\n\twidth: 5em;\n`;\n\nexport const RangeControl = styled( InnerRangeControl )`\n\tflex: 1;\n\tmargin-right: ${ space( 2 ) };\n`;\n\n// Make the Hue circle picker not go out of the bar.\nconst interactiveHueStyles = `\n.react-colorful__interactive {\n\twidth: calc( 100% - ${ space( 2 ) } );\n\tmargin-left: ${ space( 1 ) };\n}`;\n\nexport const AuxiliaryColorArtefactWrapper = styled.div`\n\tpadding-top: ${ space( 2 ) };\n\tpadding-right: 0;\n\tpadding-left: 0;\n\tpadding-bottom: 0;\n`;\n\nexport const AuxiliaryColorArtefactHStackHeader = styled( HStack )`\n\tpadding-left: ${ space( 4 ) };\n\tpadding-right: ${ space( 4 ) };\n`;\n\nexport const ColorInputWrapper = styled( Flex )`\n\tpadding-top: ${ space( 4 ) };\n\tpadding-left: ${ space( 4 ) };\n\tpadding-right: ${ space( 3 ) };\n\tpadding-bottom: ${ space( 5 ) };\n`;\n\nexport const ColorfulWrapper = styled.div`\n\t${ boxSizingReset };\n\n\twidth: 216px;\n\n\t.react-colorful {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\twidth: 216px;\n\t\theight: auto;\n\t}\n\n\t.react-colorful__saturation {\n\t\twidth: 100%;\n\t\tborder-radius: 0;\n\t\theight: 216px;\n\t\tmargin-bottom: ${ space( 4 ) };\n\t\tborder-bottom: none;\n\t}\n\n\t.react-colorful__hue,\n\t.react-colorful__alpha {\n\t\twidth: 184px;\n\t\theight: 16px;\n\t\tborder-radius: ${ CONFIG.radiusFull };\n\t\tmargin-bottom: ${ space( 2 ) };\n\t}\n\n\t.react-colorful__pointer {\n\t\theight: 16px;\n\t\twidth: 16px;\n\t\tborder: none;\n\t\tbox-shadow: 0 0 2px 0 rgba( 0, 0, 0, 0.25 );\n\n\t\t// Shown instead of box-shadow to Windows high contrast mode.\n\t\toutline: 2px solid transparent;\n\t}\n\n\t.react-colorful__pointer-fill {\n\t\tbox-shadow: inset 0 0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AE,CAAC,mMAcDK,MAAM,CAACgB,gBAAgB,aAGhDN,oBAAoB,SAAAP,OAAA,CAAAC,GAAA,CAAAC,QAAA,gyHACvB;AAED,OAAO,MAAMY,UAAU,gBAAGf,OAAA,CAAQL,MAAM,EAAAM,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,qBAE1BZ,KAAK,CAAE,CAAE,CAAC,yCAAAQ,OAAA,CAAAC,GAAA,CAAAC,QAAA,gyHAOzB","ignoreList":[]}
@@ -26,8 +26,7 @@ import { useControlledValue } from '../utils/hooks';
26
26
  import { normalizeTextString } from '../utils/strings';
27
27
  import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';
28
28
  import { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';
29
- import { jsx as _jsx } from "react/jsx-runtime";
30
- import { jsxs as _jsxs } from "react/jsx-runtime";
29
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
31
30
  const noop = () => {};
32
31
  const DetectOutside = withFocusOutside(class extends Component {
33
32
  handleFocusOutside(event) {
@@ -242,7 +241,7 @@ function ComboboxControl(props) {
242
241
  useEffect(() => {
243
242
  const hasMatchingSuggestions = matchingSuggestions.length > 0;
244
243
  if (isExpanded) {
245
- const message = hasMatchingSuggestions ? sprintf( /* translators: %d: number of results. */
244
+ const message = hasMatchingSuggestions ? sprintf(/* translators: %d: number of results. */
246
245
  _n('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', matchingSuggestions.length), matchingSuggestions.length) : __('No results.');
247
246
  speak(message, 'polite');
248
247
  }
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","_n","sprintf","Component","useState","useMemo","useRef","useEffect","useInstanceId","speak","closeSmall","InputWrapperFlex","TokenInput","SuggestionsList","BaseControl","Button","FlexBlock","FlexItem","withFocusOutside","useControlledValue","normalizeTextString","useDeprecated36pxDefaultSizeProp","withIgnoreIMEEvents","jsx","_jsx","jsxs","_jsxs","noop","DetectOutside","handleFocusOutside","event","props","onFocusOutside","render","children","getIndexOfMatchingSuggestion","selectedSuggestion","matchingSuggestions","indexOf","ComboboxControl","_currentOption$label","__nextHasNoMarginBottom","__next40pxDefaultSize","value","valueProp","label","options","onChange","onChangeProp","onFilterValueChange","hideLabelFromVision","help","allowReset","className","messages","selected","__experimentalRenderItem","expandOnFocus","placeholder","setValue","currentOption","find","option","currentLabel","instanceId","setSelectedSuggestion","isExpanded","setIsExpanded","inputHasFocus","setInputHasFocus","inputValue","setInputValue","inputContainer","startsWithMatch","containsMatch","match","forEach","index","push","concat","onSuggestionSelected","newSelectedSuggestion","disabled","handleArrowNavigation","offset","nextIndex","length","onKeyDown","preventDefault","defaultPrevented","code","onBlur","onFocus","onClick","onInputChange","text","handleOnReset","current","focus","handleResetStopPropagation","stopPropagation","hasMatchingSuggestions","hasSelectedMatchingSuggestions","message","__associatedWPComponentName","id","tabIndex","ref","selectedSuggestionIndex","icon","displayTransform","suggestion","suggestions","selectedIndex","onHover","onSelect","scrollIntoView"],"sources":["@wordpress/components/src/combobox-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tComponent,\n\tuseState,\n\tuseMemo,\n\tuseRef,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock, FlexItem } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport type { ComboboxControlOption, ComboboxControlProps } from './types';\nimport type { TokenInputProps } from '../form-token-field/types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\nconst noop = () => {};\n\ninterface DetectOutsideComponentProps {\n\tonFocusOutside: ( event: React.FocusEvent ) => void;\n\tchildren?: React.ReactNode;\n}\n\nconst DetectOutside = withFocusOutside(\n\tclass extends Component< DetectOutsideComponentProps > {\n\t\thandleFocusOutside( event: React.FocusEvent ) {\n\t\t\tthis.props.onFocusOutside( event );\n\t\t}\n\n\t\trender() {\n\t\t\treturn this.props.children;\n\t\t}\n\t}\n);\n\nconst getIndexOfMatchingSuggestion = (\n\tselectedSuggestion: ComboboxControlOption | null,\n\tmatchingSuggestions: ComboboxControlOption[]\n) =>\n\tselectedSuggestion === null\n\t\t? -1\n\t\t: matchingSuggestions.indexOf( selectedSuggestion );\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\t__nextHasNoMarginBottom\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl( props: ComboboxControlProps ) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\tvalue: valueProp,\n\t\tlabel,\n\t\toptions,\n\t\tonChange: onChangeProp,\n\t\tonFilterValueChange = noop,\n\t\thideLabelFromVision,\n\t\thelp,\n\t\tallowReset = true,\n\t\tclassName,\n\t\tmessages = {\n\t\t\tselected: __( 'Item selected.' ),\n\t\t},\n\t\t__experimentalRenderItem,\n\t\texpandOnFocus = true,\n\t\tplaceholder,\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst [ value, setValue ] = useControlledValue( {\n\t\tvalue: valueProp,\n\t\tonChange: onChangeProp,\n\t} );\n\n\tconst currentOption = options.find( ( option ) => option.value === value );\n\tconst currentLabel = currentOption?.label ?? '';\n\t// Use a custom prefix when generating the `instanceId` to avoid having\n\t// duplicate input IDs when rendering this component and `FormTokenField`\n\t// in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n\tconst instanceId = useInstanceId( ComboboxControl, 'combobox-control' );\n\tconst [ selectedSuggestion, setSelectedSuggestion ] = useState(\n\t\tcurrentOption || null\n\t);\n\tconst [ isExpanded, setIsExpanded ] = useState( false );\n\tconst [ inputHasFocus, setInputHasFocus ] = useState( false );\n\tconst [ inputValue, setInputValue ] = useState( '' );\n\tconst inputContainer = useRef< HTMLInputElement >( null );\n\n\tconst matchingSuggestions = useMemo( () => {\n\t\tconst startsWithMatch: ComboboxControlOption[] = [];\n\t\tconst containsMatch: ComboboxControlOption[] = [];\n\t\tconst match = normalizeTextString( inputValue );\n\t\toptions.forEach( ( option ) => {\n\t\t\tconst index = normalizeTextString( option.label ).indexOf( match );\n\t\t\tif ( index === 0 ) {\n\t\t\t\tstartsWithMatch.push( option );\n\t\t\t} else if ( index > 0 ) {\n\t\t\t\tcontainsMatch.push( option );\n\t\t\t}\n\t\t} );\n\n\t\treturn startsWithMatch.concat( containsMatch );\n\t}, [ inputValue, options ] );\n\n\tconst onSuggestionSelected = (\n\t\tnewSelectedSuggestion: ComboboxControlOption\n\t) => {\n\t\tif ( newSelectedSuggestion.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetValue( newSelectedSuggestion.value );\n\t\tspeak( messages.selected, 'assertive' );\n\t\tsetSelectedSuggestion( newSelectedSuggestion );\n\t\tsetInputValue( '' );\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst handleArrowNavigation = ( offset = 1 ) => {\n\t\tconst index = getIndexOfMatchingSuggestion(\n\t\t\tselectedSuggestion,\n\t\t\tmatchingSuggestions\n\t\t);\n\t\tlet nextIndex = index + offset;\n\t\tif ( nextIndex < 0 ) {\n\t\t\tnextIndex = matchingSuggestions.length - 1;\n\t\t} else if ( nextIndex >= matchingSuggestions.length ) {\n\t\t\tnextIndex = 0;\n\t\t}\n\t\tsetSelectedSuggestion( matchingSuggestions[ nextIndex ] );\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onKeyDown: React.KeyboardEventHandler< HTMLDivElement > =\n\t\twithIgnoreIMEEvents( ( event ) => {\n\t\t\tlet preventDefault = false;\n\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tswitch ( event.code ) {\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tif ( selectedSuggestion ) {\n\t\t\t\t\t\tonSuggestionSelected( selectedSuggestion );\n\t\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\thandleArrowNavigation( -1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\thandleArrowNavigation( 1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tsetIsExpanded( false );\n\t\t\t\t\tsetSelectedSuggestion( null );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\n\tconst onBlur = () => {\n\t\tsetInputHasFocus( false );\n\t};\n\n\tconst onFocus = () => {\n\t\tsetInputHasFocus( true );\n\t\tif ( expandOnFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\n\t\tonFilterValueChange( '' );\n\t\tsetInputValue( '' );\n\t};\n\n\tconst onClick = () => {\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onFocusOutside = () => {\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst onInputChange: TokenInputProps[ 'onChange' ] = ( event ) => {\n\t\tconst text = event.value;\n\t\tsetInputValue( text );\n\t\tonFilterValueChange( text );\n\t\tif ( inputHasFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tsetValue( null );\n\t\tinputContainer.current?.focus();\n\t};\n\n\t// Stop propagation of the keydown event when pressing Enter on the Reset\n\t// button to prevent calling the onKeydown callback on the container div\n\t// element which actually sets the selected suggestion.\n\tconst handleResetStopPropagation: React.KeyboardEventHandler<\n\t\tHTMLButtonElement\n\t> = ( event ) => {\n\t\tevent.stopPropagation();\n\t};\n\n\t// Update current selections when the filter input changes.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tconst hasSelectedMatchingSuggestions =\n\t\t\tgetIndexOfMatchingSuggestion(\n\t\t\t\tselectedSuggestion,\n\t\t\t\tmatchingSuggestions\n\t\t\t) > 0;\n\n\t\tif ( hasMatchingSuggestions && ! hasSelectedMatchingSuggestions ) {\n\t\t\t// If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n\t\t\tsetSelectedSuggestion( matchingSuggestions[ 0 ] );\n\t\t}\n\t}, [ matchingSuggestions, selectedSuggestion ] );\n\n\t// Announcements.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tif ( isExpanded ) {\n\t\t\tconst message = hasMatchingSuggestions\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t )\n\t\t\t\t: __( 'No results.' );\n\n\t\t\tspeak( message, 'polite' );\n\t\t}\n\t}, [ matchingSuggestions, isExpanded ] );\n\n\t// Disable reason: There is no appropriate role which describes the\n\t// input container intended accessible usability.\n\t// TODO: Refactor click detection to use blur to stop propagation.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<DetectOutside onFocusOutside={ onFocusOutside }>\n\t\t\t<BaseControl\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t__associatedWPComponentName=\"ComboboxControl\"\n\t\t\t\tclassName={ clsx( className, 'components-combobox-control' ) }\n\t\t\t\tlabel={ label }\n\t\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\thelp={ help }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-combobox-control__suggestions-container\"\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<InputWrapperFlex\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexBlock>\n\t\t\t\t\t\t\t<TokenInput\n\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__input\"\n\t\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t\tref={ inputContainer }\n\t\t\t\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\t\t\t\tvalue={ isExpanded ? inputValue : currentLabel }\n\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tselectedSuggestionIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t\t{ allowReset && (\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__reset\"\n\t\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\t\t// Disable reason: Focus returns to input field when reset is clicked.\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\t\t\t\t\t\t\tdisabled={ ! value }\n\t\t\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t\t\t\tonKeyDown={ handleResetStopPropagation }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Reset' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</InputWrapperFlex>\n\t\t\t\t\t{ isExpanded && (\n\t\t\t\t\t\t<SuggestionsList\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t// The empty string for `value` here is not actually used, but is\n\t\t\t\t\t\t\t// just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n\t\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n\t\t\t\t\t\t\tmatch={ { label: inputValue, value: '' } }\n\t\t\t\t\t\t\tdisplayTransform={ ( suggestion ) =>\n\t\t\t\t\t\t\t\tsuggestion.label\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ matchingSuggestions }\n\t\t\t\t\t\t\tselectedIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonHover={ setSelectedSuggestion }\n\t\t\t\t\t\t\tonSelect={ onSuggestionSelected }\n\t\t\t\t\t\t\tscrollIntoView\n\t\t\t\t\t\t\t__experimentalRenderItem={\n\t\t\t\t\t\t\t\t__experimentalRenderItem\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</div>\n\t\t\t</BaseControl>\n\t\t</DetectOutside>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n}\n\nexport default ComboboxControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SACCC,SAAS,EACTC,QAAQ,EACRC,OAAO,EACPC,MAAM,EACNC,SAAS,QACH,oBAAoB;AAC3B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASC,UAAU,QAAQ,kBAAkB;;AAE7C;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,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,CAACP,QAAQ;YAAAiB,QAAA,eACRV,IAAA,CAACT,MAAM;cACNsC,SAAS,EAAC,oCAAoC;cAC9CwD,IAAI,EAAGnG;cACP;cACA;cAAA;cACAwE,QAAQ,EAAG,CAAEvC,KAAO;cACpBkD,OAAO,EAAGG,aAAe;cACzBT,SAAS,EAAGY,0BAA4B;cACxCtD,KAAK,EAAG7C,EAAE,CAAE,OAAQ;YAAG,CACvB;UAAC,CACO,CACV;QAAA,CACgB,CAAC,EACjBkE,UAAU,iBACX1C,IAAA,CAACX,eAAe;UACfmD,UAAU,EAAGA;UACb;UACA;UACA;UAAA;UACAW,KAAK,EAAG;YAAE9B,KAAK,EAAEyB,UAAU;YAAE3B,KAAK,EAAE;UAAG,CAAG;UAC1CmE,gBAAgB,EAAKC,UAAU,IAC9BA,UAAU,CAAClE,KACX;UACDmE,WAAW,EAAG3E,mBAAqB;UACnC4E,aAAa,EAAG9E,4BAA4B,CAC3CC,kBAAkB,EAClBC,mBACD,CAAG;UACH6E,OAAO,EAAGjD,qBAAuB;UACjCkD,QAAQ,EAAGnC,oBAAsB;UACjCoC,cAAc;UACd5D,wBAAwB,EACvBA;QACA,CACD,CACD;MAAA,CACG;IAAC,CACM;EAAC,CACA,CAAC;EAEjB;AACD;AAEA,eAAejB,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","_n","sprintf","Component","useState","useMemo","useRef","useEffect","useInstanceId","speak","closeSmall","InputWrapperFlex","TokenInput","SuggestionsList","BaseControl","Button","FlexBlock","FlexItem","withFocusOutside","useControlledValue","normalizeTextString","useDeprecated36pxDefaultSizeProp","withIgnoreIMEEvents","jsx","_jsx","jsxs","_jsxs","noop","DetectOutside","handleFocusOutside","event","props","onFocusOutside","render","children","getIndexOfMatchingSuggestion","selectedSuggestion","matchingSuggestions","indexOf","ComboboxControl","_currentOption$label","__nextHasNoMarginBottom","__next40pxDefaultSize","value","valueProp","label","options","onChange","onChangeProp","onFilterValueChange","hideLabelFromVision","help","allowReset","className","messages","selected","__experimentalRenderItem","expandOnFocus","placeholder","setValue","currentOption","find","option","currentLabel","instanceId","setSelectedSuggestion","isExpanded","setIsExpanded","inputHasFocus","setInputHasFocus","inputValue","setInputValue","inputContainer","startsWithMatch","containsMatch","match","forEach","index","push","concat","onSuggestionSelected","newSelectedSuggestion","disabled","handleArrowNavigation","offset","nextIndex","length","onKeyDown","preventDefault","defaultPrevented","code","onBlur","onFocus","onClick","onInputChange","text","handleOnReset","current","focus","handleResetStopPropagation","stopPropagation","hasMatchingSuggestions","hasSelectedMatchingSuggestions","message","__associatedWPComponentName","id","tabIndex","ref","selectedSuggestionIndex","icon","displayTransform","suggestion","suggestions","selectedIndex","onHover","onSelect","scrollIntoView"],"sources":["@wordpress/components/src/combobox-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tComponent,\n\tuseState,\n\tuseMemo,\n\tuseRef,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock, FlexItem } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport type { ComboboxControlOption, ComboboxControlProps } from './types';\nimport type { TokenInputProps } from '../form-token-field/types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\nconst noop = () => {};\n\ninterface DetectOutsideComponentProps {\n\tonFocusOutside: ( event: React.FocusEvent ) => void;\n\tchildren?: React.ReactNode;\n}\n\nconst DetectOutside = withFocusOutside(\n\tclass extends Component< DetectOutsideComponentProps > {\n\t\thandleFocusOutside( event: React.FocusEvent ) {\n\t\t\tthis.props.onFocusOutside( event );\n\t\t}\n\n\t\trender() {\n\t\t\treturn this.props.children;\n\t\t}\n\t}\n);\n\nconst getIndexOfMatchingSuggestion = (\n\tselectedSuggestion: ComboboxControlOption | null,\n\tmatchingSuggestions: ComboboxControlOption[]\n) =>\n\tselectedSuggestion === null\n\t\t? -1\n\t\t: matchingSuggestions.indexOf( selectedSuggestion );\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\t__nextHasNoMarginBottom\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl( props: ComboboxControlProps ) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\tvalue: valueProp,\n\t\tlabel,\n\t\toptions,\n\t\tonChange: onChangeProp,\n\t\tonFilterValueChange = noop,\n\t\thideLabelFromVision,\n\t\thelp,\n\t\tallowReset = true,\n\t\tclassName,\n\t\tmessages = {\n\t\t\tselected: __( 'Item selected.' ),\n\t\t},\n\t\t__experimentalRenderItem,\n\t\texpandOnFocus = true,\n\t\tplaceholder,\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst [ value, setValue ] = useControlledValue( {\n\t\tvalue: valueProp,\n\t\tonChange: onChangeProp,\n\t} );\n\n\tconst currentOption = options.find( ( option ) => option.value === value );\n\tconst currentLabel = currentOption?.label ?? '';\n\t// Use a custom prefix when generating the `instanceId` to avoid having\n\t// duplicate input IDs when rendering this component and `FormTokenField`\n\t// in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n\tconst instanceId = useInstanceId( ComboboxControl, 'combobox-control' );\n\tconst [ selectedSuggestion, setSelectedSuggestion ] = useState(\n\t\tcurrentOption || null\n\t);\n\tconst [ isExpanded, setIsExpanded ] = useState( false );\n\tconst [ inputHasFocus, setInputHasFocus ] = useState( false );\n\tconst [ inputValue, setInputValue ] = useState( '' );\n\tconst inputContainer = useRef< HTMLInputElement >( null );\n\n\tconst matchingSuggestions = useMemo( () => {\n\t\tconst startsWithMatch: ComboboxControlOption[] = [];\n\t\tconst containsMatch: ComboboxControlOption[] = [];\n\t\tconst match = normalizeTextString( inputValue );\n\t\toptions.forEach( ( option ) => {\n\t\t\tconst index = normalizeTextString( option.label ).indexOf( match );\n\t\t\tif ( index === 0 ) {\n\t\t\t\tstartsWithMatch.push( option );\n\t\t\t} else if ( index > 0 ) {\n\t\t\t\tcontainsMatch.push( option );\n\t\t\t}\n\t\t} );\n\n\t\treturn startsWithMatch.concat( containsMatch );\n\t}, [ inputValue, options ] );\n\n\tconst onSuggestionSelected = (\n\t\tnewSelectedSuggestion: ComboboxControlOption\n\t) => {\n\t\tif ( newSelectedSuggestion.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetValue( newSelectedSuggestion.value );\n\t\tspeak( messages.selected, 'assertive' );\n\t\tsetSelectedSuggestion( newSelectedSuggestion );\n\t\tsetInputValue( '' );\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst handleArrowNavigation = ( offset = 1 ) => {\n\t\tconst index = getIndexOfMatchingSuggestion(\n\t\t\tselectedSuggestion,\n\t\t\tmatchingSuggestions\n\t\t);\n\t\tlet nextIndex = index + offset;\n\t\tif ( nextIndex < 0 ) {\n\t\t\tnextIndex = matchingSuggestions.length - 1;\n\t\t} else if ( nextIndex >= matchingSuggestions.length ) {\n\t\t\tnextIndex = 0;\n\t\t}\n\t\tsetSelectedSuggestion( matchingSuggestions[ nextIndex ] );\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onKeyDown: React.KeyboardEventHandler< HTMLDivElement > =\n\t\twithIgnoreIMEEvents( ( event ) => {\n\t\t\tlet preventDefault = false;\n\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tswitch ( event.code ) {\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tif ( selectedSuggestion ) {\n\t\t\t\t\t\tonSuggestionSelected( selectedSuggestion );\n\t\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\thandleArrowNavigation( -1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\thandleArrowNavigation( 1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tsetIsExpanded( false );\n\t\t\t\t\tsetSelectedSuggestion( null );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\n\tconst onBlur = () => {\n\t\tsetInputHasFocus( false );\n\t};\n\n\tconst onFocus = () => {\n\t\tsetInputHasFocus( true );\n\t\tif ( expandOnFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\n\t\tonFilterValueChange( '' );\n\t\tsetInputValue( '' );\n\t};\n\n\tconst onClick = () => {\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onFocusOutside = () => {\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst onInputChange: TokenInputProps[ 'onChange' ] = ( event ) => {\n\t\tconst text = event.value;\n\t\tsetInputValue( text );\n\t\tonFilterValueChange( text );\n\t\tif ( inputHasFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tsetValue( null );\n\t\tinputContainer.current?.focus();\n\t};\n\n\t// Stop propagation of the keydown event when pressing Enter on the Reset\n\t// button to prevent calling the onKeydown callback on the container div\n\t// element which actually sets the selected suggestion.\n\tconst handleResetStopPropagation: React.KeyboardEventHandler<\n\t\tHTMLButtonElement\n\t> = ( event ) => {\n\t\tevent.stopPropagation();\n\t};\n\n\t// Update current selections when the filter input changes.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tconst hasSelectedMatchingSuggestions =\n\t\t\tgetIndexOfMatchingSuggestion(\n\t\t\t\tselectedSuggestion,\n\t\t\t\tmatchingSuggestions\n\t\t\t) > 0;\n\n\t\tif ( hasMatchingSuggestions && ! hasSelectedMatchingSuggestions ) {\n\t\t\t// If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n\t\t\tsetSelectedSuggestion( matchingSuggestions[ 0 ] );\n\t\t}\n\t}, [ matchingSuggestions, selectedSuggestion ] );\n\n\t// Announcements.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tif ( isExpanded ) {\n\t\t\tconst message = hasMatchingSuggestions\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t )\n\t\t\t\t: __( 'No results.' );\n\n\t\t\tspeak( message, 'polite' );\n\t\t}\n\t}, [ matchingSuggestions, isExpanded ] );\n\n\t// Disable reason: There is no appropriate role which describes the\n\t// input container intended accessible usability.\n\t// TODO: Refactor click detection to use blur to stop propagation.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<DetectOutside onFocusOutside={ onFocusOutside }>\n\t\t\t<BaseControl\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t__associatedWPComponentName=\"ComboboxControl\"\n\t\t\t\tclassName={ clsx( className, 'components-combobox-control' ) }\n\t\t\t\tlabel={ label }\n\t\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\thelp={ help }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-combobox-control__suggestions-container\"\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<InputWrapperFlex\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexBlock>\n\t\t\t\t\t\t\t<TokenInput\n\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__input\"\n\t\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t\tref={ inputContainer }\n\t\t\t\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\t\t\t\tvalue={ isExpanded ? inputValue : currentLabel }\n\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tselectedSuggestionIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t\t{ allowReset && (\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__reset\"\n\t\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\t\t// Disable reason: Focus returns to input field when reset is clicked.\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\t\t\t\t\t\t\tdisabled={ ! value }\n\t\t\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t\t\t\tonKeyDown={ handleResetStopPropagation }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Reset' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</InputWrapperFlex>\n\t\t\t\t\t{ isExpanded && (\n\t\t\t\t\t\t<SuggestionsList\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t// The empty string for `value` here is not actually used, but is\n\t\t\t\t\t\t\t// just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n\t\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n\t\t\t\t\t\t\tmatch={ { label: inputValue, value: '' } }\n\t\t\t\t\t\t\tdisplayTransform={ ( suggestion ) =>\n\t\t\t\t\t\t\t\tsuggestion.label\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ matchingSuggestions }\n\t\t\t\t\t\t\tselectedIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonHover={ setSelectedSuggestion }\n\t\t\t\t\t\t\tonSelect={ onSuggestionSelected }\n\t\t\t\t\t\t\tscrollIntoView\n\t\t\t\t\t\t\t__experimentalRenderItem={\n\t\t\t\t\t\t\t\t__experimentalRenderItem\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</div>\n\t\t\t</BaseControl>\n\t\t</DetectOutside>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n}\n\nexport default ComboboxControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SACCC,SAAS,EACTC,QAAQ,EACRC,OAAO,EACPC,MAAM,EACNC,SAAS,QACH,oBAAoB;AAC3B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASC,UAAU,QAAQ,kBAAkB;;AAE7C;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,UAAU;AAC3C,OAAOC,UAAU,MAAM,iCAAiC;AACxD,OAAOC,eAAe,MAAM,sCAAsC;AAClE,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,MAAM,MAAM,WAAW;AAC9B,SAASC,SAAS,EAAEC,QAAQ,QAAQ,SAAS;AAC7C,OAAOC,gBAAgB,MAAM,oCAAoC;AACjE,SAASC,kBAA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OAAQ;YAAG,CACvB;UAAC,CACO,CACV;QAAA,CACgB,CAAC,EACjBkE,UAAU,iBACX1C,IAAA,CAACX,eAAe;UACfmD,UAAU,EAAGA;UACb;UACA;UACA;UAAA;UACAW,KAAK,EAAG;YAAE9B,KAAK,EAAEyB,UAAU;YAAE3B,KAAK,EAAE;UAAG,CAAG;UAC1CmE,gBAAgB,EAAKC,UAAU,IAC9BA,UAAU,CAAClE,KACX;UACDmE,WAAW,EAAG3E,mBAAqB;UACnC4E,aAAa,EAAG9E,4BAA4B,CAC3CC,kBAAkB,EAClBC,mBACD,CAAG;UACH6E,OAAO,EAAGjD,qBAAuB;UACjCkD,QAAQ,EAAGnC,oBAAsB;UACjCoC,cAAc;UACd5D,wBAAwB,EACvBA;QACA,CACD,CACD;MAAA,CACG;IAAC,CACM;EAAC,CACA,CAAC;EAEjB;AACD;AAEA,eAAejB,eAAe","ignoreList":[]}
@@ -73,8 +73,11 @@ function proxyComposite(ProxiedComponent, propMap = {}) {
73
73
  store,
74
74
  ...rest
75
75
  } = mapLegacyStatePropsToComponentProps(legacyProps);
76
- const props = rest;
77
- props.id = useInstanceId(store, props.baseId, props.id);
76
+ let props = rest;
77
+ props = {
78
+ ...props,
79
+ id: useInstanceId(store, props.baseId, props.id)
80
+ };
78
81
  Object.entries(propMap).forEach(([from, to]) => {
79
82
  if (props.hasOwnProperty(from)) {
80
83
  Object.assign(props, {
@@ -1 +1 @@
1
- {"version":3,"names":["Ariakit","forwardRef","useInstanceId","deprecated","Composite","Current","jsx","_jsx","mapLegacyStatePropsToComponentProps","legacyProps","state","rest","store","props","LEGACY_TO_NEW_DISPLAY_NAME","__unstableComposite","__unstableCompositeGroup","__unstableCompositeItem","__unstableUseCompositeState","proxyComposite","ProxiedComponent","propMap","_ProxiedComponent$dis","displayName","Component","since","alternative","hasOwnProperty","undefined","id","baseId","Object","entries","forEach","from","to","assign","UnproxiedCompositeGroup","role","ref","Row","Group","CompositeGroup","CompositeItem","Item","focusable","useCompositeState","legacyStateOptions","currentId","defaultActiveId","orientation","rtl","loop","focusLoop","wrap","focusWrap","shift","focusShift","unstable_virtual","virtualFocus","useCompositeStore"],"sources":["@wordpress/components/src/composite/legacy/index.tsx"],"sourcesContent":["/**\n * Composite is a component that may contain navigable items represented by\n * CompositeItem. It's inspired by the WAI-ARIA Composite Role and implements\n * all the keyboard navigation mechanisms to ensure that there's only one\n * tab stop for the whole Composite element. This means that it can behave as\n * a roving tabindex or aria-activedescendant container.\n *\n * This file aims at providing components that are as close as possible to the\n * original `reakit`-based implementation (which was removed from the codebase),\n * although it is recommended that consumers of the package switch to the stable,\n * un-prefixed, `ariakit`-based version of `Composite`.\n *\n * @see https://ariakit.org/components/composite\n */\n\n/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { Composite as Current } from '..';\n\ntype Orientation = 'horizontal' | 'vertical';\n\nexport interface LegacyStateOptions {\n\t/**\n\t * ID that will serve as a base for all the items IDs.\n\t */\n\tbaseId?: string;\n\t/**\n\t * Determines how next and previous functions will behave. If `rtl` is set\n\t * to `true`, they will be inverted. This only affects the composite widget\n\t * behavior. You still need to set `dir=\"rtl\"` on HTML/CSS.\n\t *\n\t * @default false\n\t */\n\trtl?: boolean;\n\t/**\n\t * Defines the orientation of the composite widget. If the composite has a\n\t * single row or column (one-dimensional), the orientation value determines\n\t * which arrow keys can be used to move focus.\n\t */\n\torientation?: Orientation;\n\t/**\n\t * The current focused item `id`.\n\t */\n\tcurrentId?: string;\n\t/**\n\t * Determines how focus moves from the start and end of rows and columns.\n\t *\n\t * @default false\n\t */\n\tloop?: boolean | Orientation;\n\t/**\n\t * If enabled, moving to the next item from the last one in a row or column\n\t * will focus the first item in the next row or column and vice-versa.\n\t *\n\t * ** Has effect only on two-dimensional composites. **\n\t *\n\t * @default false\n\t */\n\twrap?: boolean | Orientation;\n\t/**\n\t * If enabled, moving up or down when there's no next item or the next item\n\t * is disabled will shift to the item right before it.\n\t *\n\t * ** Has effect only on two-dimensional composites. **\n\t *\n\t * @default false\n\t */\n\tshift?: boolean;\n\tunstable_virtual?: boolean;\n}\n\ntype Component = React.FunctionComponent< any >;\n\ntype CompositeStore = ReturnType< typeof Ariakit.useCompositeStore >;\ntype CompositeStoreState = { store: CompositeStore };\nexport type CompositeState = CompositeStoreState &\n\tRequired< Pick< LegacyStateOptions, 'baseId' > >;\n\n// Legacy composite components can either provide state through a\n// single `state` prop, or via individual props, usually through\n// spreading the state generated by `useCompositeState`.\n// That is, `<Composite* { ...state }>`.\nexport type CompositeStateProps =\n\t| { state: CompositeState }\n\t| ( CompositeState & { state?: never } );\ntype ComponentProps< C extends Component > = React.ComponentPropsWithRef< C >;\nexport type CompositeProps< C extends Component > = ComponentProps< C > &\n\tCompositeStateProps;\ntype CompositeComponent< C extends Component > = (\n\tprops: CompositeProps< C >\n) => React.ReactElement;\ntype CompositeComponentProps = CompositeState &\n\t(\n\t\t| ComponentProps< typeof Current.Group >\n\t\t| ComponentProps< typeof Current.Item >\n\t\t| ComponentProps< typeof Current.Row >\n\t);\n\nfunction mapLegacyStatePropsToComponentProps(\n\tlegacyProps: CompositeStateProps\n): CompositeComponentProps {\n\t// If a `state` prop is provided, we unpack that; otherwise,\n\t// the necessary props are provided directly in `legacyProps`.\n\tif ( legacyProps.state ) {\n\t\tconst { state, ...rest } = legacyProps;\n\t\tconst { store, ...props } =\n\t\t\tmapLegacyStatePropsToComponentProps( state );\n\t\treturn { ...rest, ...props, store };\n\t}\n\n\treturn legacyProps;\n}\n\nconst LEGACY_TO_NEW_DISPLAY_NAME = {\n\t__unstableComposite: 'Composite',\n\t__unstableCompositeGroup: 'Composite.Group or Composite.Row',\n\t__unstableCompositeItem: 'Composite.Item',\n\t__unstableUseCompositeState: 'Composite',\n};\n\nfunction proxyComposite< C extends Component >(\n\tProxiedComponent: C | React.ForwardRefExoticComponent< C >,\n\tpropMap: Record< string, string > = {}\n): CompositeComponent< C > {\n\tconst displayName = ProxiedComponent.displayName ?? '';\n\n\tconst Component = ( legacyProps: CompositeStateProps ) => {\n\t\tdeprecated( `wp.components.${ displayName }`, {\n\t\t\tsince: '6.7',\n\t\t\talternative: LEGACY_TO_NEW_DISPLAY_NAME.hasOwnProperty(\n\t\t\t\tdisplayName\n\t\t\t)\n\t\t\t\t? LEGACY_TO_NEW_DISPLAY_NAME[\n\t\t\t\t\t\tdisplayName as keyof typeof LEGACY_TO_NEW_DISPLAY_NAME\n\t\t\t\t ]\n\t\t\t\t: undefined,\n\t\t} );\n\n\t\tconst { store, ...rest } =\n\t\t\tmapLegacyStatePropsToComponentProps( legacyProps );\n\t\tconst props = rest as ComponentProps< C >;\n\t\tprops.id = useInstanceId( store, props.baseId, props.id );\n\n\t\tObject.entries( propMap ).forEach( ( [ from, to ] ) => {\n\t\t\tif ( props.hasOwnProperty( from ) ) {\n\t\t\t\tObject.assign( props, { [ to ]: props[ from ] } );\n\t\t\t\tdelete props[ from ];\n\t\t\t}\n\t\t} );\n\n\t\tdelete props.baseId;\n\n\t\treturn <ProxiedComponent { ...props } store={ store } />;\n\t};\n\tComponent.displayName = displayName;\n\treturn Component;\n}\n\n// The old `CompositeGroup` used to behave more like the current\n// `CompositeRow`, but this has been split into two different\n// components. We handle that difference by checking on the\n// provided role, and returning the appropriate component.\nconst UnproxiedCompositeGroup = forwardRef<\n\tany,\n\tReact.ComponentPropsWithoutRef< typeof Current.Group | typeof Current.Row >\n>( ( { role, ...props }, ref ) => {\n\tconst Component = role === 'row' ? Current.Row : Current.Group;\n\treturn <Component ref={ ref } role={ role } { ...props } />;\n} );\n\n/**\n * _Note: please use the `Composite` component instead._\n *\n * @deprecated\n */\nexport const Composite = proxyComposite(\n\tObject.assign( Current, { displayName: '__unstableComposite' } ),\n\t{ baseId: 'id' }\n);\n/**\n * _Note: please use the `Composite.Row` or `Composite.Group` components instead._\n *\n * @deprecated\n */\nexport const CompositeGroup = proxyComposite(\n\tObject.assign( UnproxiedCompositeGroup, {\n\t\tdisplayName: '__unstableCompositeGroup',\n\t} )\n);\n/**\n * _Note: please use the `Composite.Item` component instead._\n *\n * @deprecated\n */\nexport const CompositeItem = proxyComposite(\n\tObject.assign( Current.Item, {\n\t\tdisplayName: '__unstableCompositeItem',\n\t} ),\n\t{\n\t\tfocusable: 'accessibleWhenDisabled',\n\t}\n);\n\n/**\n * _Note: please use the `Composite` component instead._\n *\n * @deprecated\n */\nexport function useCompositeState(\n\tlegacyStateOptions: LegacyStateOptions = {}\n): CompositeState {\n\tdeprecated( `wp.components.__unstableUseCompositeState`, {\n\t\tsince: '6.7',\n\t\talternative: LEGACY_TO_NEW_DISPLAY_NAME.__unstableUseCompositeState,\n\t} );\n\n\tconst {\n\t\tbaseId,\n\t\tcurrentId: defaultActiveId,\n\t\torientation,\n\t\trtl = false,\n\t\tloop: focusLoop = false,\n\t\twrap: focusWrap = false,\n\t\tshift: focusShift = false,\n\t\t// eslint-disable-next-line camelcase\n\t\tunstable_virtual: virtualFocus,\n\t} = legacyStateOptions;\n\n\treturn {\n\t\tbaseId: useInstanceId( Composite, 'composite', baseId ),\n\t\tstore: Ariakit.useCompositeStore( {\n\t\t\tdefaultActiveId,\n\t\t\trtl,\n\t\t\torientation,\n\t\t\tfocusLoop,\n\t\t\tfocusShift,\n\t\t\tfocusWrap,\n\t\t\tvirtualFocus,\n\t\t} ),\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;;AAEzC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,SAAS,IAAIC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,EAAE;AACd,CAAE,CACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMoB,aAAa,GAAGxB,cAAc,CAC1CY,MAAM,CAACK,MAAM,CAAE/B,OAAO,CAACuC,IAAI,EAAE;EAC5BrB,WAAW,EAAE;AACd,CAAE,CAAC,EACH;EACCsB,SAAS,EAAE;AACZ,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAChCC,kBAAsC,GAAG,CAAC,CAAC,EAC1B;EACjB5C,UAAU,CAAG,2CAA0C,EAAE;IACxDsB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAEZ,0BAA0B,CAACI;EACzC,CAAE,CAAC;EAEH,MAAM;IACLY,MAAM;IACNkB,SAAS,EAAEC,eAAe;IAC1BC,WAAW;IACXC,GAAG,GAAG,KAAK;IACXC,IAAI,EAAEC,SAAS,GAAG,KAAK;IACvBC,IAAI,EAAEC,SAAS,GAAG,KAAK;IACvBC,KAAK,EAAEC,UAAU,GAAG,KAAK;IACzB;IACAC,gBAAgB,EAAEC;EACnB,CAAC,GAAGZ,kBAAkB;EAEtB,OAAO;IACNjB,MAAM,EAAE5B,aAAa,CAAEE,SAAS,EAAE,WAAW,EAAE0B,MAAO,CAAC;IACvDlB,KAAK,EAAEZ,OAAO,CAAC4D,iBAAiB,CAAE;MACjCX,eAAe;MACfE,GAAG;MACHD,WAAW;MACXG,SAAS;MACTI,UAAU;MACVF,SAAS;MACTI;IACD,CAAE;EACH,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["Ariakit","forwardRef","useInstanceId","deprecated","Composite","Current","jsx","_jsx","mapLegacyStatePropsToComponentProps","legacyProps","state","rest","store","props","LEGACY_TO_NEW_DISPLAY_NAME","__unstableComposite","__unstableCompositeGroup","__unstableCompositeItem","__unstableUseCompositeState","proxyComposite","ProxiedComponent","propMap","_ProxiedComponent$dis","displayName","Component","since","alternative","hasOwnProperty","undefined","id","baseId","Object","entries","forEach","from","to","assign","UnproxiedCompositeGroup","role","ref","Row","Group","CompositeGroup","CompositeItem","Item","focusable","useCompositeState","legacyStateOptions","currentId","defaultActiveId","orientation","rtl","loop","focusLoop","wrap","focusWrap","shift","focusShift","unstable_virtual","virtualFocus","useCompositeStore"],"sources":["@wordpress/components/src/composite/legacy/index.tsx"],"sourcesContent":["/**\n * Composite is a component that may contain navigable items represented by\n * CompositeItem. It's inspired by the WAI-ARIA Composite Role and implements\n * all the keyboard navigation mechanisms to ensure that there's only one\n * tab stop for the whole Composite element. This means that it can behave as\n * a roving tabindex or aria-activedescendant container.\n *\n * This file aims at providing components that are as close as possible to the\n * original `reakit`-based implementation (which was removed from the codebase),\n * although it is recommended that consumers of the package switch to the stable,\n * un-prefixed, `ariakit`-based version of `Composite`.\n *\n * @see https://ariakit.org/components/composite\n */\n\n/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { Composite as Current } from '..';\n\ntype Orientation = 'horizontal' | 'vertical';\n\nexport interface LegacyStateOptions {\n\t/**\n\t * ID that will serve as a base for all the items IDs.\n\t */\n\tbaseId?: string;\n\t/**\n\t * Determines how next and previous functions will behave. If `rtl` is set\n\t * to `true`, they will be inverted. This only affects the composite widget\n\t * behavior. You still need to set `dir=\"rtl\"` on HTML/CSS.\n\t *\n\t * @default false\n\t */\n\trtl?: boolean;\n\t/**\n\t * Defines the orientation of the composite widget. If the composite has a\n\t * single row or column (one-dimensional), the orientation value determines\n\t * which arrow keys can be used to move focus.\n\t */\n\torientation?: Orientation;\n\t/**\n\t * The current focused item `id`.\n\t */\n\tcurrentId?: string;\n\t/**\n\t * Determines how focus moves from the start and end of rows and columns.\n\t *\n\t * @default false\n\t */\n\tloop?: boolean | Orientation;\n\t/**\n\t * If enabled, moving to the next item from the last one in a row or column\n\t * will focus the first item in the next row or column and vice-versa.\n\t *\n\t * ** Has effect only on two-dimensional composites. **\n\t *\n\t * @default false\n\t */\n\twrap?: boolean | Orientation;\n\t/**\n\t * If enabled, moving up or down when there's no next item or the next item\n\t * is disabled will shift to the item right before it.\n\t *\n\t * ** Has effect only on two-dimensional composites. **\n\t *\n\t * @default false\n\t */\n\tshift?: boolean;\n\tunstable_virtual?: boolean;\n}\n\ntype Component = React.FunctionComponent< any >;\n\ntype CompositeStore = ReturnType< typeof Ariakit.useCompositeStore >;\ntype CompositeStoreState = { store: CompositeStore };\nexport type CompositeState = CompositeStoreState &\n\tRequired< Pick< LegacyStateOptions, 'baseId' > >;\n\n// Legacy composite components can either provide state through a\n// single `state` prop, or via individual props, usually through\n// spreading the state generated by `useCompositeState`.\n// That is, `<Composite* { ...state }>`.\nexport type CompositeStateProps =\n\t| { state: CompositeState }\n\t| ( CompositeState & { state?: never } );\ntype ComponentProps< C extends Component > = React.ComponentPropsWithRef< C >;\nexport type CompositeProps< C extends Component > = ComponentProps< C > &\n\tCompositeStateProps;\ntype CompositeComponent< C extends Component > = (\n\tprops: CompositeProps< C >\n) => React.ReactElement;\ntype CompositeComponentProps = CompositeState &\n\t(\n\t\t| ComponentProps< typeof Current.Group >\n\t\t| ComponentProps< typeof Current.Item >\n\t\t| ComponentProps< typeof Current.Row >\n\t);\n\nfunction mapLegacyStatePropsToComponentProps(\n\tlegacyProps: CompositeStateProps\n): CompositeComponentProps {\n\t// If a `state` prop is provided, we unpack that; otherwise,\n\t// the necessary props are provided directly in `legacyProps`.\n\tif ( legacyProps.state ) {\n\t\tconst { state, ...rest } = legacyProps;\n\t\tconst { store, ...props } =\n\t\t\tmapLegacyStatePropsToComponentProps( state );\n\t\treturn { ...rest, ...props, store };\n\t}\n\n\treturn legacyProps;\n}\n\nconst LEGACY_TO_NEW_DISPLAY_NAME = {\n\t__unstableComposite: 'Composite',\n\t__unstableCompositeGroup: 'Composite.Group or Composite.Row',\n\t__unstableCompositeItem: 'Composite.Item',\n\t__unstableUseCompositeState: 'Composite',\n};\n\nfunction proxyComposite< C extends Component >(\n\tProxiedComponent: C | React.ForwardRefExoticComponent< C >,\n\tpropMap: Record< string, string > = {}\n): CompositeComponent< C > {\n\tconst displayName = ProxiedComponent.displayName ?? '';\n\n\tconst Component = ( legacyProps: CompositeStateProps ) => {\n\t\tdeprecated( `wp.components.${ displayName }`, {\n\t\t\tsince: '6.7',\n\t\t\talternative: LEGACY_TO_NEW_DISPLAY_NAME.hasOwnProperty(\n\t\t\t\tdisplayName\n\t\t\t)\n\t\t\t\t? LEGACY_TO_NEW_DISPLAY_NAME[\n\t\t\t\t\t\tdisplayName as keyof typeof LEGACY_TO_NEW_DISPLAY_NAME\n\t\t\t\t ]\n\t\t\t\t: undefined,\n\t\t} );\n\n\t\tconst { store, ...rest } =\n\t\t\tmapLegacyStatePropsToComponentProps( legacyProps );\n\t\tlet props = rest as ComponentProps< C >;\n\t\tprops = {\n\t\t\t...props,\n\t\t\tid: useInstanceId( store, props.baseId, props.id ),\n\t\t};\n\n\t\tObject.entries( propMap ).forEach( ( [ from, to ] ) => {\n\t\t\tif ( props.hasOwnProperty( from ) ) {\n\t\t\t\tObject.assign( props, { [ to ]: props[ from ] } );\n\t\t\t\tdelete props[ from ];\n\t\t\t}\n\t\t} );\n\n\t\tdelete props.baseId;\n\n\t\treturn <ProxiedComponent { ...props } store={ store } />;\n\t};\n\tComponent.displayName = displayName;\n\treturn Component;\n}\n\n// The old `CompositeGroup` used to behave more like the current\n// `CompositeRow`, but this has been split into two different\n// components. We handle that difference by checking on the\n// provided role, and returning the appropriate component.\nconst UnproxiedCompositeGroup = forwardRef<\n\tany,\n\tReact.ComponentPropsWithoutRef< typeof Current.Group | typeof Current.Row >\n>( ( { role, ...props }, ref ) => {\n\tconst Component = role === 'row' ? Current.Row : Current.Group;\n\treturn <Component ref={ ref } role={ role } { ...props } />;\n} );\n\n/**\n * _Note: please use the `Composite` component instead._\n *\n * @deprecated\n */\nexport const Composite = proxyComposite(\n\tObject.assign( Current, { displayName: '__unstableComposite' } ),\n\t{ baseId: 'id' }\n);\n/**\n * _Note: please use the `Composite.Row` or `Composite.Group` components instead._\n *\n * @deprecated\n */\nexport const CompositeGroup = proxyComposite(\n\tObject.assign( UnproxiedCompositeGroup, {\n\t\tdisplayName: '__unstableCompositeGroup',\n\t} )\n);\n/**\n * _Note: please use the `Composite.Item` component instead._\n *\n * @deprecated\n */\nexport const CompositeItem = proxyComposite(\n\tObject.assign( Current.Item, {\n\t\tdisplayName: '__unstableCompositeItem',\n\t} ),\n\t{\n\t\tfocusable: 'accessibleWhenDisabled',\n\t}\n);\n\n/**\n * _Note: please use the `Composite` component instead._\n *\n * @deprecated\n */\nexport function useCompositeState(\n\tlegacyStateOptions: LegacyStateOptions = {}\n): CompositeState {\n\tdeprecated( `wp.components.__unstableUseCompositeState`, {\n\t\tsince: '6.7',\n\t\talternative: LEGACY_TO_NEW_DISPLAY_NAME.__unstableUseCompositeState,\n\t} );\n\n\tconst {\n\t\tbaseId,\n\t\tcurrentId: defaultActiveId,\n\t\torientation,\n\t\trtl = false,\n\t\tloop: focusLoop = false,\n\t\twrap: focusWrap = false,\n\t\tshift: focusShift = false,\n\t\t// eslint-disable-next-line camelcase\n\t\tunstable_virtual: virtualFocus,\n\t} = legacyStateOptions;\n\n\treturn {\n\t\tbaseId: useInstanceId( Composite, 'composite', baseId ),\n\t\tstore: Ariakit.useCompositeStore( {\n\t\t\tdefaultActiveId,\n\t\t\trtl,\n\t\t\torientation,\n\t\t\tfocusLoop,\n\t\t\tfocusShift,\n\t\t\tfocusWrap,\n\t\t\tvirtualFocus,\n\t\t} ),\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;;AAEzC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAC/C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B,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMY,cAAc,GAAGvB,cAAc,CAC3CY,MAAM,CAACK,MAAM,CAAEC,uBAAuB,EAAE;EACvCd,WAAW,EAAE;AACd,CAAE,CACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMoB,aAAa,GAAGxB,cAAc,CAC1CY,MAAM,CAACK,MAAM,CAAE/B,OAAO,CAACuC,IAAI,EAAE;EAC5BrB,WAAW,EAAE;AACd,CAAE,CAAC,EACH;EACCsB,SAAS,EAAE;AACZ,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAChCC,kBAAsC,GAAG,CAAC,CAAC,EAC1B;EACjB5C,UAAU,CAAE,2CAA2C,EAAE;IACxDsB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAEZ,0BAA0B,CAACI;EACzC,CAAE,CAAC;EAEH,MAAM;IACLY,MAAM;IACNkB,SAAS,EAAEC,eAAe;IAC1BC,WAAW;IACXC,GAAG,GAAG,KAAK;IACXC,IAAI,EAAEC,SAAS,GAAG,KAAK;IACvBC,IAAI,EAAEC,SAAS,GAAG,KAAK;IACvBC,KAAK,EAAEC,UAAU,GAAG,KAAK;IACzB;IACAC,gBAAgB,EAAEC;EACnB,CAAC,GAAGZ,kBAAkB;EAEtB,OAAO;IACNjB,MAAM,EAAE5B,aAAa,CAAEE,SAAS,EAAE,WAAW,EAAE0B,MAAO,CAAC;IACvDlB,KAAK,EAAEZ,OAAO,CAAC4D,iBAAiB,CAAE;MACjCX,eAAe;MACfE,GAAG;MACHD,WAAW;MACXG,SAAS;MACTI,UAAU;MACVF,SAAS;MACTI;IACD,CAAE;EACH,CAAC;AACF","ignoreList":[]}
@@ -15,9 +15,7 @@ import { Text } from '../text';
15
15
  import { VStack } from '../v-stack';
16
16
  import * as styles from './styles';
17
17
  import { useCx } from '../utils/hooks/use-cx';
18
- import { jsx as _jsx } from "react/jsx-runtime";
19
- import { jsxs as _jsxs } from "react/jsx-runtime";
20
- import { Fragment as _Fragment } from "react/jsx-runtime";
18
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
21
19
  const UnconnectedConfirmDialog = (props, forwardedRef) => {
22
20
  const {
23
21
  isOpen: isOpenProp,