@wordpress/components 25.11.1-next.f8d8eceb.0 → 25.13.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 (317) hide show
  1. package/CHANGELOG.md +58 -1
  2. package/build/angle-picker-control/index.js +0 -1
  3. package/build/angle-picker-control/index.js.map +1 -1
  4. package/build/custom-select-control-v2/index.js +87 -0
  5. package/build/custom-select-control-v2/index.js.map +1 -0
  6. package/build/custom-select-control-v2/styles.js +85 -0
  7. package/build/custom-select-control-v2/styles.js.map +1 -0
  8. package/build/custom-select-control-v2/types.js +6 -0
  9. package/build/custom-select-control-v2/types.js.map +1 -0
  10. package/build/disclosure/index.js +37 -7
  11. package/build/disclosure/index.js.map +1 -1
  12. package/build/disclosure/types.js +6 -0
  13. package/build/disclosure/types.js.map +1 -0
  14. package/build/divider/component.js +5 -3
  15. package/build/divider/component.js.map +1 -1
  16. package/build/divider/types.js.map +1 -1
  17. package/build/dropdown-menu-v2-ariakit/index.js +74 -35
  18. package/build/dropdown-menu-v2-ariakit/index.js.map +1 -1
  19. package/build/dropdown-menu-v2-ariakit/styles.js +82 -59
  20. package/build/dropdown-menu-v2-ariakit/styles.js.map +1 -1
  21. package/build/dropdown-menu-v2-ariakit/types.js.map +1 -1
  22. package/build/form-token-field/index.js +6 -2
  23. package/build/form-token-field/index.js.map +1 -1
  24. package/build/form-token-field/token-input.js.map +1 -1
  25. package/build/form-token-field/types.js.map +1 -1
  26. package/build/gradient-picker/index.js +1 -1
  27. package/build/gradient-picker/index.js.map +1 -1
  28. package/build/heading/hook.js +6 -3
  29. package/build/heading/hook.js.map +1 -1
  30. package/build/heading/types.js.map +1 -1
  31. package/build/index.native.js +8 -1
  32. package/build/index.native.js.map +1 -1
  33. package/build/mobile/audio-player/index.native.js +8 -9
  34. package/build/mobile/audio-player/index.native.js.map +1 -1
  35. package/build/mobile/global-styles-context/utils.native.js +44 -3
  36. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  37. package/build/mobile/utils/alignments.native.js +1 -1
  38. package/build/mobile/utils/alignments.native.js.map +1 -1
  39. package/build/private-apis.js +3 -2
  40. package/build/private-apis.js.map +1 -1
  41. package/build/radio-group/context.js +22 -0
  42. package/build/radio-group/context.js.map +1 -0
  43. package/build/radio-group/index.js +27 -23
  44. package/build/radio-group/index.js.map +1 -1
  45. package/build/radio-group/radio.js +58 -0
  46. package/build/radio-group/radio.js.map +1 -0
  47. package/build/radio-group/types.js +6 -0
  48. package/build/radio-group/types.js.map +1 -0
  49. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  50. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  51. package/build/slot-fill/types.js.map +1 -1
  52. package/build/tabs/index.js +6 -4
  53. package/build/tabs/index.js.map +1 -1
  54. package/build/tabs/styles.js +14 -7
  55. package/build/tabs/styles.js.map +1 -1
  56. package/build/tabs/tab.js +5 -7
  57. package/build/tabs/tab.js.map +1 -1
  58. package/build/tabs/tablist.js +3 -5
  59. package/build/tabs/tablist.js.map +1 -1
  60. package/build/tabs/tabpanel.js +7 -10
  61. package/build/tabs/tabpanel.js.map +1 -1
  62. package/build/tabs/types.js.map +1 -1
  63. package/build/text/types.js.map +1 -1
  64. package/build/text-control/index.js +5 -1
  65. package/build/text-control/index.js.map +1 -1
  66. package/build/text-control/types.js.map +1 -1
  67. package/build/toggle-group-control/toggle-group-control/component.js +4 -2
  68. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  69. package/build/toggle-group-control/toggle-group-control/styles.js +13 -9
  70. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  71. package/build/toggle-group-control/types.js.map +1 -1
  72. package/build/tools-panel/tools-panel-item/hook.js +5 -1
  73. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  74. package/build-module/angle-picker-control/index.js +0 -1
  75. package/build-module/angle-picker-control/index.js.map +1 -1
  76. package/build-module/custom-select-control-v2/index.js +74 -0
  77. package/build-module/custom-select-control-v2/index.js.map +1 -0
  78. package/build-module/custom-select-control-v2/styles.js +71 -0
  79. package/build-module/custom-select-control-v2/styles.js.map +1 -0
  80. package/build-module/custom-select-control-v2/types.js +2 -0
  81. package/build-module/custom-select-control-v2/types.js.map +1 -0
  82. package/build-module/disclosure/index.js +33 -8
  83. package/build-module/disclosure/index.js.map +1 -1
  84. package/build-module/disclosure/types.js +2 -0
  85. package/build-module/disclosure/types.js.map +1 -0
  86. package/build-module/divider/component.js +3 -3
  87. package/build-module/divider/component.js.map +1 -1
  88. package/build-module/divider/types.js.map +1 -1
  89. package/build-module/dropdown-menu-v2-ariakit/index.js +72 -34
  90. package/build-module/dropdown-menu-v2-ariakit/index.js.map +1 -1
  91. package/build-module/dropdown-menu-v2-ariakit/styles.js +69 -40
  92. package/build-module/dropdown-menu-v2-ariakit/styles.js.map +1 -1
  93. package/build-module/dropdown-menu-v2-ariakit/types.js.map +1 -1
  94. package/build-module/form-token-field/index.js +6 -2
  95. package/build-module/form-token-field/index.js.map +1 -1
  96. package/build-module/form-token-field/token-input.js.map +1 -1
  97. package/build-module/form-token-field/types.js.map +1 -1
  98. package/build-module/gradient-picker/index.js +1 -1
  99. package/build-module/gradient-picker/index.js.map +1 -1
  100. package/build-module/heading/hook.js +6 -3
  101. package/build-module/heading/hook.js.map +1 -1
  102. package/build-module/heading/types.js.map +1 -1
  103. package/build-module/index.native.js +1 -1
  104. package/build-module/index.native.js.map +1 -1
  105. package/build-module/mobile/audio-player/index.native.js +9 -10
  106. package/build-module/mobile/audio-player/index.native.js.map +1 -1
  107. package/build-module/mobile/global-styles-context/utils.native.js +43 -4
  108. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  109. package/build-module/mobile/utils/alignments.native.js +1 -1
  110. package/build-module/mobile/utils/alignments.native.js.map +1 -1
  111. package/build-module/private-apis.js +4 -3
  112. package/build-module/private-apis.js.map +1 -1
  113. package/build-module/radio-group/context.js +14 -0
  114. package/build-module/radio-group/context.js.map +1 -0
  115. package/build-module/radio-group/index.js +24 -23
  116. package/build-module/radio-group/index.js.map +1 -1
  117. package/build-module/radio-group/radio.js +46 -0
  118. package/build-module/radio-group/radio.js.map +1 -0
  119. package/build-module/radio-group/types.js +2 -0
  120. package/build-module/radio-group/types.js.map +1 -0
  121. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  122. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  123. package/build-module/slot-fill/types.js.map +1 -1
  124. package/build-module/tabs/index.js +7 -5
  125. package/build-module/tabs/index.js.map +1 -1
  126. package/build-module/tabs/styles.js +11 -5
  127. package/build-module/tabs/styles.js.map +1 -1
  128. package/build-module/tabs/tab.js +7 -9
  129. package/build-module/tabs/tab.js.map +1 -1
  130. package/build-module/tabs/tablist.js +3 -5
  131. package/build-module/tabs/tablist.js.map +1 -1
  132. package/build-module/tabs/tabpanel.js +9 -10
  133. package/build-module/tabs/tabpanel.js.map +1 -1
  134. package/build-module/tabs/types.js.map +1 -1
  135. package/build-module/text/types.js.map +1 -1
  136. package/build-module/text-control/index.js +6 -1
  137. package/build-module/text-control/index.js.map +1 -1
  138. package/build-module/text-control/types.js.map +1 -1
  139. package/build-module/toggle-group-control/toggle-group-control/component.js +4 -2
  140. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  141. package/build-module/toggle-group-control/toggle-group-control/styles.js +13 -9
  142. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  143. package/build-module/toggle-group-control/types.js.map +1 -1
  144. package/build-module/tools-panel/tools-panel-item/hook.js +6 -2
  145. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  146. package/build-style/style-rtl.css +52 -8
  147. package/build-style/style.css +52 -8
  148. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  149. package/build-types/box-control/stories/index.story.d.ts +1944 -0
  150. package/build-types/box-control/stories/index.story.d.ts.map +1 -0
  151. package/build-types/card/card-divider/component.d.ts +1 -1
  152. package/build-types/card/card-divider/hook.d.ts +162 -162
  153. package/build-types/color-palette/styles.d.ts +4 -1
  154. package/build-types/color-palette/styles.d.ts.map +1 -1
  155. package/build-types/custom-select-control-v2/index.d.ts +6 -0
  156. package/build-types/custom-select-control-v2/index.d.ts.map +1 -0
  157. package/build-types/custom-select-control-v2/stories/index.story.d.ts +19 -0
  158. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -0
  159. package/build-types/custom-select-control-v2/styles.d.ts +47 -0
  160. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -0
  161. package/build-types/custom-select-control-v2/types.d.ts +57 -0
  162. package/build-types/custom-select-control-v2/types.d.ts.map +1 -0
  163. package/build-types/date-time/date/styles.d.ts +4 -1
  164. package/build-types/date-time/date/styles.d.ts.map +1 -1
  165. package/build-types/disclosure/index.d.ts +7 -1
  166. package/build-types/disclosure/index.d.ts.map +1 -1
  167. package/build-types/disclosure/types.d.ts +12 -0
  168. package/build-types/disclosure/types.d.ts.map +1 -0
  169. package/build-types/divider/component.d.ts +5 -1
  170. package/build-types/divider/component.d.ts.map +1 -1
  171. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  172. package/build-types/divider/styles.d.ts +1 -1
  173. package/build-types/divider/types.d.ts +2 -2
  174. package/build-types/divider/types.d.ts.map +1 -1
  175. package/build-types/dropdown-menu-v2-ariakit/index.d.ts +11 -2
  176. package/build-types/dropdown-menu-v2-ariakit/index.d.ts.map +1 -1
  177. package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts.map +1 -1
  178. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts +26 -18
  179. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts.map +1 -1
  180. package/build-types/dropdown-menu-v2-ariakit/types.d.ts +1 -7
  181. package/build-types/dropdown-menu-v2-ariakit/types.d.ts.map +1 -1
  182. package/build-types/form-token-field/index.d.ts.map +1 -1
  183. package/build-types/form-token-field/token-input.d.ts.map +1 -1
  184. package/build-types/form-token-field/types.d.ts +1 -1
  185. package/build-types/form-token-field/types.d.ts.map +1 -1
  186. package/build-types/heading/component.d.ts +4 -1
  187. package/build-types/heading/component.d.ts.map +1 -1
  188. package/build-types/heading/hook.d.ts.map +1 -1
  189. package/build-types/heading/types.d.ts +20 -1
  190. package/build-types/heading/types.d.ts.map +1 -1
  191. package/build-types/navigation/styles/navigation-styles.d.ts +4 -1
  192. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  193. package/build-types/palette-edit/styles.d.ts +4 -1
  194. package/build-types/palette-edit/styles.d.ts.map +1 -1
  195. package/build-types/private-apis.d.ts.map +1 -1
  196. package/build-types/radio-group/context.d.ts +10 -0
  197. package/build-types/radio-group/context.d.ts.map +1 -0
  198. package/build-types/radio-group/index.d.ts +7 -9
  199. package/build-types/radio-group/index.d.ts.map +1 -1
  200. package/build-types/radio-group/radio.d.ts +8 -0
  201. package/build-types/radio-group/radio.d.ts.map +1 -0
  202. package/build-types/radio-group/stories/index.story.d.ts +14 -0
  203. package/build-types/radio-group/stories/index.story.d.ts.map +1 -0
  204. package/build-types/radio-group/types.d.ts +40 -0
  205. package/build-types/radio-group/types.d.ts.map +1 -0
  206. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -1
  207. package/build-types/slot-fill/types.d.ts +16 -6
  208. package/build-types/slot-fill/types.d.ts.map +1 -1
  209. package/build-types/tabs/index.d.ts +4 -3
  210. package/build-types/tabs/index.d.ts.map +1 -1
  211. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  212. package/build-types/tabs/styles.d.ts +10 -0
  213. package/build-types/tabs/styles.d.ts.map +1 -1
  214. package/build-types/tabs/tab.d.ts +1 -1
  215. package/build-types/tabs/tab.d.ts.map +1 -1
  216. package/build-types/tabs/tablist.d.ts +1 -1
  217. package/build-types/tabs/tablist.d.ts.map +1 -1
  218. package/build-types/tabs/tabpanel.d.ts +4 -1
  219. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  220. package/build-types/tabs/types.d.ts +7 -31
  221. package/build-types/tabs/types.d.ts.map +1 -1
  222. package/build-types/text/types.d.ts +15 -2
  223. package/build-types/text/types.d.ts.map +1 -1
  224. package/build-types/text-control/index.d.ts +2 -1
  225. package/build-types/text-control/index.d.ts.map +1 -1
  226. package/build-types/text-control/types.d.ts +6 -0
  227. package/build-types/text-control/types.d.ts.map +1 -1
  228. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +1 -0
  229. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  230. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +2 -2
  231. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  232. package/build-types/toggle-group-control/types.d.ts +6 -0
  233. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  234. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  235. package/package.json +19 -20
  236. package/src/angle-picker-control/index.tsx +0 -1
  237. package/src/box-control/stories/index.story.tsx +82 -0
  238. package/src/button/style.scss +10 -2
  239. package/src/combobox-control/README.md +1 -3
  240. package/src/custom-select-control-v2/README.md +73 -0
  241. package/src/custom-select-control-v2/index.tsx +99 -0
  242. package/src/custom-select-control-v2/stories/index.story.tsx +149 -0
  243. package/src/custom-select-control-v2/styles.ts +76 -0
  244. package/src/custom-select-control-v2/types.ts +63 -0
  245. package/src/disclosure/index.tsx +44 -0
  246. package/src/disclosure/types.tsx +10 -0
  247. package/src/divider/component.tsx +3 -3
  248. package/src/divider/stories/index.story.tsx +8 -0
  249. package/src/divider/types.ts +2 -2
  250. package/src/dropdown-menu/style.scss +4 -0
  251. package/src/dropdown-menu-v2-ariakit/README.md +19 -12
  252. package/src/dropdown-menu-v2-ariakit/index.tsx +116 -51
  253. package/src/dropdown-menu-v2-ariakit/stories/index.story.tsx +205 -94
  254. package/src/dropdown-menu-v2-ariakit/styles.ts +153 -117
  255. package/src/dropdown-menu-v2-ariakit/test/index.tsx +5 -36
  256. package/src/dropdown-menu-v2-ariakit/types.ts +1 -8
  257. package/src/form-toggle/style.scss +37 -7
  258. package/src/form-token-field/index.tsx +11 -3
  259. package/src/form-token-field/token-input.tsx +1 -3
  260. package/src/form-token-field/types.ts +1 -0
  261. package/src/gradient-picker/index.tsx +1 -1
  262. package/src/heading/README.md +6 -1
  263. package/src/heading/hook.ts +6 -3
  264. package/src/heading/types.ts +23 -1
  265. package/src/index.native.js +1 -0
  266. package/src/mobile/audio-player/index.native.js +9 -13
  267. package/src/mobile/global-styles-context/utils.native.js +52 -3
  268. package/src/mobile/utils/alignments.native.js +1 -0
  269. package/src/navigable-container/README.md +1 -1
  270. package/src/private-apis.ts +4 -2
  271. package/src/radio-group/context.tsx +18 -0
  272. package/src/radio-group/index.tsx +65 -0
  273. package/src/radio-group/radio.tsx +55 -0
  274. package/src/radio-group/stories/index.story.tsx +90 -0
  275. package/src/radio-group/types.ts +39 -0
  276. package/src/slot-fill/README.md +1 -1
  277. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +1 -1
  278. package/src/slot-fill/types.ts +18 -6
  279. package/src/tabs/README.md +3 -33
  280. package/src/tabs/index.tsx +12 -2
  281. package/src/tabs/stories/index.story.tsx +17 -1
  282. package/src/tabs/styles.ts +16 -0
  283. package/src/tabs/tab.tsx +10 -10
  284. package/src/tabs/tablist.tsx +21 -20
  285. package/src/tabs/tabpanel.tsx +26 -25
  286. package/src/tabs/test/index.tsx +90 -16
  287. package/src/tabs/types.ts +7 -32
  288. package/src/text/README.md +5 -1
  289. package/src/text/types.ts +15 -2
  290. package/src/text-control/index.tsx +5 -1
  291. package/src/text-control/style.scss +5 -0
  292. package/src/text-control/types.ts +6 -0
  293. package/src/toggle-control/README.md +2 -2
  294. package/src/toggle-group-control/toggle-group-control/component.tsx +8 -2
  295. package/src/toggle-group-control/toggle-group-control/styles.ts +13 -4
  296. package/src/toggle-group-control/types.ts +6 -0
  297. package/src/toolbar/toolbar-button/style.scss +0 -5
  298. package/src/tools-panel/tools-panel-item/hook.ts +11 -2
  299. package/tsconfig.tsbuildinfo +1 -1
  300. package/build/radio-group/radio/index.js +0 -49
  301. package/build/radio-group/radio/index.js.map +0 -1
  302. package/build/radio-group/radio-context/index.js +0 -18
  303. package/build/radio-group/radio-context/index.js.map +0 -1
  304. package/build-module/radio-group/radio/index.js +0 -40
  305. package/build-module/radio-group/radio/index.js.map +0 -1
  306. package/build-module/radio-group/radio-context/index.js +0 -10
  307. package/build-module/radio-group/radio-context/index.js.map +0 -1
  308. package/build-types/radio-group/radio/index.d.ts +0 -7
  309. package/build-types/radio-group/radio/index.d.ts.map +0 -1
  310. package/build-types/radio-group/radio-context/index.d.ts +0 -6
  311. package/build-types/radio-group/radio-context/index.d.ts.map +0 -1
  312. package/src/box-control/stories/index.story.js +0 -75
  313. package/src/disclosure/index.js +0 -11
  314. package/src/radio-group/index.js +0 -51
  315. package/src/radio-group/radio/index.js +0 -40
  316. package/src/radio-group/radio-context/index.js +0 -11
  317. package/src/radio-group/stories/index.story.js +0 -83
package/CHANGELOG.md CHANGED
@@ -2,7 +2,63 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 25.11.0-next.0 (2023-11-01)
5
+ ## 25.13.0 (2023-11-29)
6
+
7
+ ### Enhancements
8
+
9
+ - `FormToggle`: refine animation and improve high contrast styles ([#56515](https://github.com/WordPress/gutenberg/pull/56515)).
10
+ - `Button`: Add focus rings to focusable disabled buttons ([#56383](https://github.com/WordPress/gutenberg/pull/56383)).
11
+
12
+ ### Bug Fix
13
+
14
+ - `ToolsPanelItem`: Use useLayoutEffect to prevent rendering glitch for last panel item styling. ([#56536](https://github.com/WordPress/gutenberg/pull/56536)).
15
+ - `FormTokenField`: Fix broken suggestions scrollbar when the `__experimentalExpandOnFocus` prop is defined ([#56426](https://github.com/WordPress/gutenberg/pull/56426)).
16
+ - `FormTokenField`: `onFocus` prop is now typed as a React `FocusEvent` ([#56426](https://github.com/WordPress/gutenberg/pull/56426)).
17
+
18
+ ### Experimental
19
+
20
+ - `Tabs`: Memoize and expose the component context ([#56224](https://github.com/WordPress/gutenberg/pull/56224)).
21
+ - `DropdownMenuV2`: Design tweaks ([#56041](https://github.com/WordPress/gutenberg/pull/56041))
22
+
23
+ ### Documentation
24
+
25
+ - `Text` and `Heading`: improve docs around default values and truncation logic ([#56518](https://github.com/WordPress/gutenberg/pull/56518))
26
+
27
+ ### Internal
28
+
29
+ - `Slot`: add `style` prop to `bubblesVirtually` version ([#56428](https://github.com/WordPress/gutenberg/pull/56428))
30
+ - Introduce experimental new version of `CustomSelectControl` based on `ariakit` ([#55790](https://github.com/WordPress/gutenberg/pull/55790))
31
+
32
+ ## 25.12.0 (2023-11-16)
33
+
34
+ ### Bug Fix
35
+
36
+ - `Toolbar`: Remove CSS rule that prevented focus outline to be visible for toolbar buttons in the `:active` state. ([#56123](https://github.com/WordPress/gutenberg/pull/56123)).
37
+
38
+ ### Internal
39
+
40
+ - Migrate `Divider` from `reakit` to `ariakit` ([#55622](https://github.com/WordPress/gutenberg/pull/55622))
41
+ - Migrate `DisclosureContent` from `reakit` to `ariakit` and TypeScript ([#55639](https://github.com/WordPress/gutenberg/pull/55639))
42
+ - Migrate `RadioGroup` from `reakit` to `ariakit` and TypeScript ([#55580](https://github.com/WordPress/gutenberg/pull/55580))
43
+
44
+ ### Experimental
45
+
46
+ - `Tabs`: Add `focusable` prop to the `Tabs.TabPanel` sub-component ([#55287](https://github.com/WordPress/gutenberg/pull/55287))
47
+ - `Tabs`: Update sub-components to accept relevant HTML element props ([#55860](https://github.com/WordPress/gutenberg/pull/55860))
48
+ - `DropdownMenuV2`: Fix radio menu item check icon not rendering correctly in some browsers ([#55964](https://github.com/WordPress/gutenberg/pull/55964))
49
+ - `DropdownMenuV2`: prevent default when pressing Escape key to close menu ([#55962](https://github.com/WordPress/gutenberg/pull/55962))
50
+
51
+ ### Enhancements
52
+
53
+ - `ToggleGroupControl`: Add opt-in prop for 40px default size ([#55789](https://github.com/WordPress/gutenberg/pull/55789)).
54
+ - `TextControl`: Add opt-in prop for 40px default size ([#55471](https://github.com/WordPress/gutenberg/pull/55471)).
55
+
56
+ ### Bug Fix
57
+
58
+ - `DropdownMenu`: remove extra vertical space around the toggle button ([#56136](https://github.com/WordPress/gutenberg/pull/56136)).
59
+ - Package should not depend on `@ariakit/test`, that package is only needed for testing ([#56091](https://github.com/WordPress/gutenberg/pull/56091)).
60
+
61
+ ## 25.11.0 (2023-11-02)
6
62
 
7
63
  ### Enhancements
8
64
 
@@ -11,6 +67,7 @@
11
67
  ### Bug Fix
12
68
 
13
69
  - `Autocomplete`: Add `aria-live` announcements for Mac and IOS Voiceover to fix lack of support for `aria-owns` ([#54902](https://github.com/WordPress/gutenberg/pull/54902)).
70
+ - Improve Button saving state accessibility. ([#55547](https://github.com/WordPress/gutenberg/pull/55547))
14
71
 
15
72
  ### Internal
16
73
 
@@ -39,7 +39,6 @@ function UnforwardedAnglePickerControl(props, ref) {
39
39
  if (!__nextHasNoMarginBottom) {
40
40
  (0, _deprecated.default)('Bottom margin styles for wp.components.AnglePickerControl', {
41
41
  since: '6.1',
42
- version: '6.4',
43
42
  hint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.'
44
43
  });
45
44
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_deprecated","_element","_i18n","_flex","_spacer","_numberControl","_angleCircle","_anglePickerControlStyles","UnforwardedAnglePickerControl","props","ref","__nextHasNoMarginBottom","className","label","__","onChange","value","restProps","deprecated","since","version","hint","handleOnNumberChange","unprocessedValue","undefined","inputValue","parseInt","classes","classnames","unitText","_react","createElement","UnitText","prefixedUnitText","suffixedUnitText","isRTL","Root","gap","FlexBlock","default","max","min","size","step","spinControls","prefix","suffix","Spacer","marginBottom","marginTop","AnglePickerControl","forwardRef","exports","_default"],"sources":["@wordpress/components/src/angle-picker-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../flex';\nimport { Spacer } from '../spacer';\nimport NumberControl from '../number-control';\nimport AngleCircle from './angle-circle';\nimport { Root, UnitText } from './styles/angle-picker-control-styles';\n\nimport type { WordPressComponentProps } from '../context';\nimport type { AnglePickerControlProps } from './types';\n\nfunction UnforwardedAnglePickerControl(\n\tprops: WordPressComponentProps< AnglePickerControlProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tclassName,\n\t\tlabel = __( 'Angle' ),\n\t\tonChange,\n\t\tvalue,\n\t\t...restProps\n\t} = props;\n\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated(\n\t\t\t'Bottom margin styles for wp.components.AnglePickerControl',\n\t\t\t{\n\t\t\t\tsince: '6.1',\n\t\t\t\tversion: '6.4',\n\t\t\t\thint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.',\n\t\t\t}\n\t\t);\n\t}\n\n\tconst handleOnNumberChange = ( unprocessedValue: string | undefined ) => {\n\t\tif ( onChange === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== undefined && unprocessedValue !== ''\n\t\t\t\t? parseInt( unprocessedValue, 10 )\n\t\t\t\t: 0;\n\t\tonChange( inputValue );\n\t};\n\n\tconst classes = classnames( 'components-angle-picker-control', className );\n\n\tconst unitText = <UnitText>°</UnitText>;\n\tconst [ prefixedUnitText, suffixedUnitText ] = isRTL()\n\t\t? [ unitText, null ]\n\t\t: [ null, unitText ];\n\n\treturn (\n\t\t<Root\n\t\t\t{ ...restProps }\n\t\t\tref={ ref }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tclassName={ classes }\n\t\t\tgap={ 2 }\n\t\t>\n\t\t\t<FlexBlock>\n\t\t\t\t<NumberControl\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tclassName=\"components-angle-picker-control__input-field\"\n\t\t\t\t\tmax={ 360 }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ handleOnNumberChange }\n\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\tstep=\"1\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\tprefix={ prefixedUnitText }\n\t\t\t\t\tsuffix={ suffixedUnitText }\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t\t<Spacer marginBottom=\"1\" marginTop=\"auto\">\n\t\t\t\t<AngleCircle\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</Spacer>\n\t\t</Root>\n\t);\n}\n\n/**\n * `AnglePickerControl` is a React component to render a UI that allows users to\n * pick an angle. Users can choose an angle in a visual UI with the mouse by\n * dragging an angle indicator inside a circle or by directly inserting the\n * desired angle in a text field.\n *\n * ```jsx\n * import { useState } from '@wordpress/element';\n * import { AnglePickerControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ angle, setAngle ] = useState( 0 );\n * return (\n * <AnglePickerControl\n * value={ angle }\n * onChange={ setAngle }\n * __nextHasNoMarginBottom\n * </>\n * );\n * }\n * ```\n */\nexport const AnglePickerControl = forwardRef( UnforwardedAnglePickerControl );\n\nexport default AnglePickerControl;\n"],"mappings":";;;;;;;;AAIA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAP,sBAAA,CAA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,GAAK;IACXC,uBAAuB,EAAGA,uBAAyB;IACnDC,SAAS,EAAGe,OAAS;IACrBU,GAAG,EAAG;EAAG,GAET,IAAAP,MAAA,CAAAC,aAAA,EAAC5B,KAAA,CAAAmC,SAAS,QACT,IAAAR,MAAA,CAAAC,aAAA,EAAC1B,cAAA,CAAAkC,OAAa;IACb1B,KAAK,EAAGA,KAAO;IACfD,SAAS,EAAC,8CAA8C;IACxD4B,GAAG,EAAG,GAAK;IACXC,GAAG,EAAG,CAAG;IACT1B,QAAQ,EAAGO,oBAAsB;IACjCoB,IAAI,EAAC,kBAAkB;IACvBC,IAAI,EAAC,GAAG;IACR3B,KAAK,EAAGA,KAAO;IACf4B,YAAY,EAAC,MAAM;IACnBC,MAAM,EAAGZ,gBAAkB;IAC3Ba,MAAM,EAAGZ;EAAkB,CAC3B,CACS,CAAC,EACZ,IAAAJ,MAAA,CAAAC,aAAA,EAAC3B,OAAA,CAAA2C,MAAM;IAACC,YAAY,EAAC,GAAG;IAACC,SAAS,EAAC;EAAM,GACxC,IAAAnB,MAAA,CAAAC,aAAA,EAACzB,YAAA,CAAAiC,OAAW;IACX,eAAY,MAAM;IAClBvB,KAAK,EAAGA,KAAO;IACfD,QAAQ,EAAGA;EAAU,CACrB,CACM,CACH,CAAC;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMmC,kBAAkB,GAAG,IAAAC,mBAAU,EAAE3C,6BAA8B,CAAC;AAAC4C,OAAA,CAAAF,kBAAA,GAAAA,kBAAA;AAAA,IAAAG,QAAA,GAE/DH,kBAAkB;AAAAE,OAAA,CAAAb,OAAA,GAAAc,QAAA"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_deprecated","_element","_i18n","_flex","_spacer","_numberControl","_angleCircle","_anglePickerControlStyles","UnforwardedAnglePickerControl","props","ref","__nextHasNoMarginBottom","className","label","__","onChange","value","restProps","deprecated","since","hint","handleOnNumberChange","unprocessedValue","undefined","inputValue","parseInt","classes","classnames","unitText","_react","createElement","UnitText","prefixedUnitText","suffixedUnitText","isRTL","Root","gap","FlexBlock","default","max","min","size","step","spinControls","prefix","suffix","Spacer","marginBottom","marginTop","AnglePickerControl","forwardRef","exports","_default"],"sources":["@wordpress/components/src/angle-picker-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../flex';\nimport { Spacer } from '../spacer';\nimport NumberControl from '../number-control';\nimport AngleCircle from './angle-circle';\nimport { Root, UnitText } from './styles/angle-picker-control-styles';\n\nimport type { WordPressComponentProps } from '../context';\nimport type { AnglePickerControlProps } from './types';\n\nfunction UnforwardedAnglePickerControl(\n\tprops: WordPressComponentProps< AnglePickerControlProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tclassName,\n\t\tlabel = __( 'Angle' ),\n\t\tonChange,\n\t\tvalue,\n\t\t...restProps\n\t} = props;\n\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated(\n\t\t\t'Bottom margin styles for wp.components.AnglePickerControl',\n\t\t\t{\n\t\t\t\tsince: '6.1',\n\t\t\t\thint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.',\n\t\t\t}\n\t\t);\n\t}\n\n\tconst handleOnNumberChange = ( unprocessedValue: string | undefined ) => {\n\t\tif ( onChange === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== undefined && unprocessedValue !== ''\n\t\t\t\t? parseInt( unprocessedValue, 10 )\n\t\t\t\t: 0;\n\t\tonChange( inputValue );\n\t};\n\n\tconst classes = classnames( 'components-angle-picker-control', className );\n\n\tconst unitText = <UnitText>°</UnitText>;\n\tconst [ prefixedUnitText, suffixedUnitText ] = isRTL()\n\t\t? [ unitText, null ]\n\t\t: [ null, unitText ];\n\n\treturn (\n\t\t<Root\n\t\t\t{ ...restProps }\n\t\t\tref={ ref }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tclassName={ classes }\n\t\t\tgap={ 2 }\n\t\t>\n\t\t\t<FlexBlock>\n\t\t\t\t<NumberControl\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tclassName=\"components-angle-picker-control__input-field\"\n\t\t\t\t\tmax={ 360 }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ handleOnNumberChange }\n\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\tstep=\"1\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\tprefix={ prefixedUnitText }\n\t\t\t\t\tsuffix={ suffixedUnitText }\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t\t<Spacer marginBottom=\"1\" marginTop=\"auto\">\n\t\t\t\t<AngleCircle\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</Spacer>\n\t\t</Root>\n\t);\n}\n\n/**\n * `AnglePickerControl` is a React component to render a UI that allows users to\n * pick an angle. Users can choose an angle in a visual UI with the mouse by\n * dragging an angle indicator inside a circle or by directly inserting the\n * desired angle in a text field.\n *\n * ```jsx\n * import { useState } from '@wordpress/element';\n * import { AnglePickerControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ angle, setAngle ] = useState( 0 );\n * return (\n * <AnglePickerControl\n * value={ angle }\n * onChange={ setAngle }\n * __nextHasNoMarginBottom\n * </>\n * );\n * }\n * ```\n */\nexport const AnglePickerControl = forwardRef( Unforward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AE1C,6BAA8B,CAAC;AAAC2C,OAAA,CAAAF,kBAAA,GAAAA,kBAAA;AAAA,IAAAG,QAAA,GAE/DH,kBAAkB;AAAAE,OAAA,CAAAb,OAAA,GAAAc,QAAA"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CustomSelect = CustomSelect;
7
+ exports.CustomSelectContext = void 0;
8
+ exports.CustomSelectItem = CustomSelectItem;
9
+ var _react = require("react");
10
+ var Ariakit = _interopRequireWildcard(require("@ariakit/react"));
11
+ var _element = require("@wordpress/element");
12
+ var _i18n = require("@wordpress/i18n");
13
+ var Styled = _interopRequireWildcard(require("./styles"));
14
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
+ /**
17
+ * External dependencies
18
+ */
19
+ // eslint-disable-next-line no-restricted-imports
20
+
21
+ /**
22
+ * WordPress dependencies
23
+ */
24
+
25
+ /**
26
+ * Internal dependencies
27
+ */
28
+
29
+ const CustomSelectContext = (0, _element.createContext)(undefined);
30
+ exports.CustomSelectContext = CustomSelectContext;
31
+ function defaultRenderSelectedValue(value) {
32
+ const isValueEmpty = Array.isArray(value) ? value.length === 0 : value === undefined || value === null;
33
+ if (isValueEmpty) {
34
+ return (0, _i18n.__)('Select an item');
35
+ }
36
+ if (Array.isArray(value)) {
37
+ return value.length === 1 ? value[0] :
38
+ // translators: %s: number of items selected (it will always be 2 or more items)
39
+ (0, _i18n.sprintf)((0, _i18n.__)('%s items selected'), value.length);
40
+ }
41
+ return value;
42
+ }
43
+ function CustomSelect(props) {
44
+ const {
45
+ children,
46
+ defaultValue,
47
+ label,
48
+ onChange,
49
+ size = 'default',
50
+ value,
51
+ renderSelectedValue = defaultRenderSelectedValue
52
+ } = props;
53
+ const store = Ariakit.useSelectStore({
54
+ setValue: nextValue => onChange?.(nextValue),
55
+ defaultValue,
56
+ value
57
+ });
58
+ const {
59
+ value: currentValue
60
+ } = store.useState();
61
+ return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(Styled.CustomSelectLabel, {
62
+ store: store
63
+ }, label), (0, _react.createElement)(Styled.CustomSelectButton, {
64
+ size: size,
65
+ hasCustomRenderProp: !!renderSelectedValue,
66
+ store: store
67
+ }, renderSelectedValue(currentValue), (0, _react.createElement)(Ariakit.SelectArrow, null)), (0, _react.createElement)(Styled.CustomSelectPopover, {
68
+ gutter: 12,
69
+ store: store,
70
+ sameWidth: true
71
+ }, (0, _react.createElement)(CustomSelectContext.Provider, {
72
+ value: {
73
+ store
74
+ }
75
+ }, children)));
76
+ }
77
+ function CustomSelectItem({
78
+ children,
79
+ ...props
80
+ }) {
81
+ const customSelectContext = (0, _element.useContext)(CustomSelectContext);
82
+ return (0, _react.createElement)(Styled.CustomSelectItem, {
83
+ store: customSelectContext?.store,
84
+ ...props
85
+ }, children !== null && children !== void 0 ? children : props.value, (0, _react.createElement)(Ariakit.SelectItemCheck, null));
86
+ }
87
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_element","_i18n","Styled","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","CustomSelectContext","createContext","undefined","exports","defaultRenderSelectedValue","value","isValueEmpty","Array","isArray","length","__","sprintf","CustomSelect","props","children","defaultValue","label","onChange","size","renderSelectedValue","store","useSelectStore","setValue","nextValue","currentValue","useState","_react","createElement","Fragment","CustomSelectLabel","CustomSelectButton","hasCustomRenderProp","SelectArrow","CustomSelectPopover","gutter","sameWidth","Provider","CustomSelectItem","customSelectContext","useContext","SelectItemCheck"],"sources":["@wordpress/components/src/custom-select-control-v2/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\n/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport * as Styled from './styles';\nimport type {\n\tCustomSelectProps,\n\tCustomSelectItemProps,\n\tCustomSelectContext as CustomSelectContextType,\n} from './types';\n\nexport const CustomSelectContext =\n\tcreateContext< CustomSelectContextType >( undefined );\n\nfunction defaultRenderSelectedValue( value: CustomSelectProps[ 'value' ] ) {\n\tconst isValueEmpty = Array.isArray( value )\n\t\t? value.length === 0\n\t\t: value === undefined || value === null;\n\n\tif ( isValueEmpty ) {\n\t\treturn __( 'Select an item' );\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.length === 1\n\t\t\t? value[ 0 ]\n\t\t\t: // translators: %s: number of items selected (it will always be 2 or more items)\n\t\t\t sprintf( __( '%s items selected' ), value.length );\n\t}\n\n\treturn value;\n}\n\nexport function CustomSelect( props: CustomSelectProps ) {\n\tconst {\n\t\tchildren,\n\t\tdefaultValue,\n\t\tlabel,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\trenderSelectedValue = defaultRenderSelectedValue,\n\t} = props;\n\n\tconst store = Ariakit.useSelectStore( {\n\t\tsetValue: ( nextValue ) => onChange?.( nextValue ),\n\t\tdefaultValue,\n\t\tvalue,\n\t} );\n\n\tconst { value: currentValue } = store.useState();\n\n\treturn (\n\t\t<>\n\t\t\t<Styled.CustomSelectLabel store={ store }>\n\t\t\t\t{ label }\n\t\t\t</Styled.CustomSelectLabel>\n\t\t\t<Styled.CustomSelectButton\n\t\t\t\tsize={ size }\n\t\t\t\thasCustomRenderProp={ !! renderSelectedValue }\n\t\t\t\tstore={ store }\n\t\t\t>\n\t\t\t\t{ renderSelectedValue( currentValue ) }\n\t\t\t\t<Ariakit.SelectArrow />\n\t\t\t</Styled.CustomSelectButton>\n\t\t\t<Styled.CustomSelectPopover gutter={ 12 } store={ store } sameWidth>\n\t\t\t\t<CustomSelectContext.Provider value={ { store } }>\n\t\t\t\t\t{ children }\n\t\t\t\t</CustomSelectContext.Provider>\n\t\t\t</Styled.CustomSelectPopover>\n\t\t</>\n\t);\n}\n\nexport function CustomSelectItem( {\n\tchildren,\n\t...props\n}: CustomSelectItemProps ) {\n\tconst customSelectContext = useContext( CustomSelectContext );\n\treturn (\n\t\t<Styled.CustomSelectItem\n\t\t\tstore={ customSelectContext?.store }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children ?? props.value }\n\t\t\t<Ariakit.SelectItemCheck />\n\t\t</Styled.CustomSelectItem>\n\t);\n}\n"],"mappings":";;;;;;;;;AAIA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAAmC,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,C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AE,MAAA,CAAAC,aAAA,EAACvD,OAAO,CAAC4D,WAAW,MAAE,CACI,CAAC,EAC5B,IAAAN,MAAA,CAAAC,aAAA,EAAClD,MAAM,CAACwD,mBAAmB;IAACC,MAAM,EAAG,EAAI;IAACd,KAAK,EAAGA,KAAO;IAACe,SAAS;EAAA,GAClE,IAAAT,MAAA,CAAAC,aAAA,EAAC3B,mBAAmB,CAACoC,QAAQ;IAAC/B,KAAK,EAAG;MAAEe;IAAM;EAAG,GAC9CN,QAC2B,CACH,CAC3B,CAAC;AAEL;AAEO,SAASuB,gBAAgBA,CAAE;EACjCvB,QAAQ;EACR,GAAGD;AACmB,CAAC,EAAG;EAC1B,MAAMyB,mBAAmB,GAAG,IAAAC,mBAAU,EAAEvC,mBAAoB,CAAC;EAC7D,OACC,IAAA0B,MAAA,CAAAC,aAAA,EAAClD,MAAM,CAAC4D,gBAAgB;IACvBjB,KAAK,EAAGkB,mBAAmB,EAAElB,KAAO;IAAA,GAC/BP;EAAK,GAERC,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAID,KAAK,CAACR,KAAK,EACzB,IAAAqB,MAAA,CAAAC,aAAA,EAACvD,OAAO,CAACoE,eAAe,MAAE,CACF,CAAC;AAE5B"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.CustomSelectPopover = exports.CustomSelectLabel = exports.CustomSelectItem = exports.CustomSelectButton = void 0;
8
+ var _base = _interopRequireDefault(require("@emotion/styled/base"));
9
+ var Ariakit = _interopRequireWildcard(require("@ariakit/react"));
10
+ var _utils = require("../utils");
11
+ var _space = require("../utils/space");
12
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
+ /**
15
+ * External dependencies
16
+ */
17
+
18
+ // eslint-disable-next-line no-restricted-imports
19
+
20
+ /**
21
+ * Internal dependencies
22
+ */
23
+
24
+ const CustomSelectLabel = ( /*#__PURE__*/0, _base.default)(Ariakit.SelectLabel, process.env.NODE_ENV === "production" ? {
25
+ target: "e1p3eej73"
26
+ } : {
27
+ target: "e1p3eej73",
28
+ label: "CustomSelectLabel"
29
+ })("font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase;margin-bottom:", (0, _space.space)(2), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY3VzdG9tLXNlbGVjdC1jb250cm9sLXYyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjOEQiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9jdXN0b20tc2VsZWN0LWNvbnRyb2wtdjIvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW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JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9YCxcblx0XHR9LFxuXHR9O1xufSApO1xuXG5leHBvcnQgY29uc3QgQ3VzdG9tU2VsZWN0UG9wb3ZlciA9IHN0eWxlZCggQXJpYWtpdC5TZWxlY3RQb3BvdmVyIClgXG5cdGJvcmRlci1yYWRpdXM6ICR7IHNwYWNlKCAwLjUgKSB9O1xuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMud2hpdGUgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5gO1xuXG5leHBvcnQgY29uc3QgQ3VzdG9tU2VsZWN0SXRlbSA9IHN0eWxlZCggQXJpYWtpdC5TZWxlY3RJdGVtIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2Vlbjtcblx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9O1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0fVxuYDtcbiJdfQ== */"));
30
+ exports.CustomSelectLabel = CustomSelectLabel;
31
+ const inputHeights = {
32
+ default: 40,
33
+ small: 24
34
+ };
35
+ const CustomSelectButton = ( /*#__PURE__*/0, _base.default)(Ariakit.Select, process.env.NODE_ENV === "production" ? {
36
+ // Do not forward `hasCustomRenderProp` to the underlying Ariakit.Select component
37
+ shouldForwardProp: prop => prop !== 'hasCustomRenderProp',
38
+ target: "e1p3eej72"
39
+ } : {
40
+ // Do not forward `hasCustomRenderProp` to the underlying Ariakit.Select component
41
+ shouldForwardProp: prop => prop !== 'hasCustomRenderProp',
42
+ target: "e1p3eej72",
43
+ label: "CustomSelectButton"
44
+ })(({
45
+ size,
46
+ hasCustomRenderProp
47
+ }) => {
48
+ const isSmallSize = size === 'small' && !hasCustomRenderProp;
49
+ const heightProperty = hasCustomRenderProp ? 'minHeight' : 'height';
50
+ return {
51
+ display: 'flex',
52
+ justifyContent: 'space-between',
53
+ alignItems: 'center',
54
+ backgroundColor: _utils.COLORS.white,
55
+ border: `1px solid ${_utils.COLORS.gray[600]}`,
56
+ borderRadius: (0, _space.space)(0.5),
57
+ cursor: 'pointer',
58
+ width: '100%',
59
+ [heightProperty]: `${inputHeights[size]}px`,
60
+ padding: isSmallSize ? (0, _space.space)(2) : (0, _space.space)(4),
61
+ fontSize: isSmallSize ? '11px' : '13px',
62
+ '&[data-focus-visible]': {
63
+ outlineStyle: 'solid'
64
+ },
65
+ '&[aria-expanded="true"]': {
66
+ outlineStyle: `1.5px solid ${_utils.COLORS.theme.accent}`
67
+ }
68
+ };
69
+ }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY3VzdG9tLXNlbGVjdC1jb250cm9sLXYyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQmtDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY3VzdG9tLXNlbGVjdC1jb250cm9sLXYyL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1yZXN0cmljdGVkLWltcG9ydHNcbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tICcuL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B4IHNvbGlkICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEN1c3RvbVNlbGVjdEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbSApYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdHBhZGRpbmc6ICR7IHNwYWNlKCAyICkgfTtcblx0JltkYXRhLWFjdGl2ZS1pdGVtXSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLmdyYXlbIDMwMCBdIH07XG5cdH1cbmA7XG4iXX0= */");
70
+ exports.CustomSelectButton = CustomSelectButton;
71
+ const CustomSelectPopover = ( /*#__PURE__*/0, _base.default)(Ariakit.SelectPopover, process.env.NODE_ENV === "production" ? {
72
+ target: "e1p3eej71"
73
+ } : {
74
+ target: "e1p3eej71",
75
+ label: "CustomSelectPopover"
76
+ })("border-radius:", (0, _space.space)(0.5), ";background:", _utils.COLORS.white, ";border:1px solid ", _utils.COLORS.gray[900], ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY3VzdG9tLXNlbGVjdC1jb250cm9sLXYyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2RGtFIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY3VzdG9tLXNlbGVjdC1jb250cm9sLXYyL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8vIGVz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wb3J0IGNvbnN0IEN1c3RvbVNlbGVjdFBvcG92ZXIgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0UG9wb3ZlciApYFxuXHRib3JkZXItcmFkaXVzOiAkeyBzcGFjZSggMC41ICkgfTtcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLndoaXRlIH07XG5cdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEN1c3RvbVNlbGVjdEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbSApYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdHBhZGRpbmc6ICR7IHNwYWNlKCAyICkgfTtcblx0JltkYXRhLWFjdGl2ZS1pdGVtXSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLmdyYXlbIDMwMCBdIH07XG5cdH1cbmA7XG4iXX0= */"));
77
+ exports.CustomSelectPopover = CustomSelectPopover;
78
+ const CustomSelectItem = ( /*#__PURE__*/0, _base.default)(Ariakit.SelectItem, process.env.NODE_ENV === "production" ? {
79
+ target: "e1p3eej70"
80
+ } : {
81
+ target: "e1p3eej70",
82
+ label: "CustomSelectItem"
83
+ })("display:flex;align-items:center;justify-content:space-between;padding:", (0, _space.space)(2), ";&[data-active-item]{background-color:", _utils.COLORS.gray[300], ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY3VzdG9tLXNlbGVjdC1jb250cm9sLXYyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtRTREIiwiZmlsZSI6IkB3b3JkcHJl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XRsaW5lU3R5bGU6ICdzb2xpZCcsXG5cdFx0fSxcblx0XHQnJlthcmlhLWV4cGFuZGVkPVwidHJ1ZVwiXSc6IHtcblx0XHRcdG91dGxpbmVTdHlsZTogYDEuNXB4IHNvbGlkICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfWAsXG5cdFx0fSxcblx0fTtcbn0gKTtcblxuZXhwb3J0IGNvbnN0IEN1c3RvbVNlbGVjdFBvcG92ZXIgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0UG9wb3ZlciApYFxuXHRib3JkZXItcmFkaXVzOiAkeyBzcGFjZSggMC41ICkgfTtcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLndoaXRlIH07XG5cdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEN1c3RvbVNlbGVjdEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbSApYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdHBhZGRpbmc6ICR7IHNwYWNlKCAyICkgfTtcblx0JltkYXRhLWFjdGl2ZS1pdGVtXSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLmdyYXlbIDMwMCBdIH07XG5cdH1cbmA7XG4iXX0= */"));
84
+ exports.CustomSelectItem = CustomSelectItem;
85
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_utils","_space","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","CustomSelectLabel","_base","SelectLabel","process","env","NODE_ENV","target","label","space","exports","inputHeights","small","CustomSelectButton","Select","shouldForwardProp","prop","size","hasCustomRenderProp","isSmallSize","heightProperty","display","justifyContent","alignItems","backgroundColor","COLORS","white","border","gray","borderRadius","cursor","width","padding","fontSize","outlineStyle","theme","accent","CustomSelectPopover","SelectPopover","CustomSelectItem","SelectItem"],"sources":["@wordpress/components/src/custom-select-control-v2/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS } from '../utils';\nimport { space } from '../utils/space';\nimport type { CustomSelectProps } from './types';\n\nexport const CustomSelectLabel = styled( Ariakit.SelectLabel )`\n\tfont-size: 11px;\n\tfont-weight: 500;\n\tline-height: 1.4;\n\ttext-transform: uppercase;\n\tmargin-bottom: ${ space( 2 ) };\n`;\n\nconst inputHeights = {\n\tdefault: 40,\n\tsmall: 24,\n};\n\nexport const CustomSelectButton = styled( Ariakit.Select, {\n\t// Do not forward `hasCustomRenderProp` to the underlying Ariakit.Select component\n\tshouldForwardProp: ( prop ) => prop !== 'hasCustomRenderProp',\n} )( ( {\n\tsize,\n\thasCustomRenderProp,\n}: {\n\tsize: NonNullable< CustomSelectProps[ 'size' ] >;\n\thasCustomRenderProp: boolean;\n} ) => {\n\tconst isSmallSize = size === 'small' && ! hasCustomRenderProp;\n\tconst heightProperty = hasCustomRenderProp ? 'minHeight' : 'height';\n\n\treturn {\n\t\tdisplay: 'flex',\n\t\tjustifyContent: 'space-between',\n\t\talignItems: 'center',\n\t\tbackgroundColor: COLORS.white,\n\t\tborder: `1px solid ${ COLORS.gray[ 600 ] }`,\n\t\tborderRadius: space( 0.5 ),\n\t\tcursor: 'pointer',\n\t\twidth: '100%',\n\t\t[ heightProperty ]: `${ inputHeights[ size ] }px`,\n\t\tpadding: isSmallSize ? space( 2 ) : space( 4 ),\n\t\tfontSize: isSmallSize ? '11px' : '13px',\n\t\t'&[data-focus-visible]': {\n\t\t\toutlineStyle: 'solid',\n\t\t},\n\t\t'&[aria-expanded=\"true\"]': {\n\t\t\toutlineStyle: `1.5px solid ${ COLORS.theme.accent }`,\n\t\t},\n\t};\n} );\n\nexport const CustomSelectPopover = styled( Ariakit.SelectPopover )`\n\tborder-radius: ${ space( 0.5 ) };\n\tbackground: ${ COLORS.white };\n\tborder: 1px solid ${ COLORS.gray[ 900 ] };\n`;\n\nexport const CustomSelectItem = styled( Ariakit.SelectItem )`\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tpadding: ${ space( 2 ) };\n\t&[data-active-item] {\n\t\tbackground-color: ${ COLORS.gray[ 300 ] };\n\t}\n`;\n"],"mappings":";;;;;;;;AAKA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAuC,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA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,QAAA,oqGACvC;AAACI,OAAA,CAAA2B,mBAAA,GAAAA,mBAAA;AAEK,MAAME,gBAAgB,GAAG,kBAAArC,KAAA,CAAAhB,OAAA,EAAQZ,OAAO,CAACkE,UAAU,EAAApC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,2EAI/C,IAAAC,YAAK,EAAE,CAAE,CAAC,4CAEAgB,aAAM,CAACG,IAAI,CAAE,GAAG,CAAE,UAAAxB,OAAA,CAAAC,GAAA,CAAAC,QAAA,oqGAExC;AAACI,OAAA,CAAA6B,gBAAA,GAAAA,gBAAA"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/custom-select-control-v2/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type * as Ariakit from '@ariakit/react';\n\nexport type CustomSelectContext =\n\t| {\n\t\t\t/**\n\t\t\t * The store object returned by Ariakit's `useSelectStore` hook.\n\t\t\t */\n\t\t\tstore: Ariakit.SelectStore;\n\t }\n\t| undefined;\n\nexport type CustomSelectProps = {\n\t/**\n\t * The child elements. This should be composed of CustomSelectItem components.\n\t */\n\tchildren: React.ReactNode;\n\t/**\n\t * An optional default value for the control. If left `undefined`, the first\n\t * non-disabled item will be used.\n\t */\n\tdefaultValue?: string | string[];\n\t/**\n\t * Label for the control.\n\t */\n\tlabel: string;\n\t/**\n\t * A function that receives the new value of the input.\n\t */\n\tonChange?: ( newValue: string | string[] ) => void;\n\t/**\n\t * Can be used to render select UI with custom styled values.\n\t */\n\trenderSelectedValue?: (\n\t\tselectedValue: string | string[]\n\t) => React.ReactNode;\n\t/**\n\t * The size of the control.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'small';\n\t/**\n\t * Can be used to externally control the value of the control.\n\t */\n\tvalue?: string | string[];\n};\n\nexport type CustomSelectItemProps = {\n\t/**\n\t * The value of the select item. This will be used as the children if\n\t * children are left `undefined`.\n\t */\n\tvalue: string;\n\t/**\n\t * The children to display for each select item. The `value` will be\n\t * used if left `undefined`.\n\t */\n\tchildren?: React.ReactNode;\n};\n"],"mappings":""}
@@ -3,11 +3,41 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "DisclosureContent", {
7
- enumerable: true,
8
- get: function () {
9
- return _reakit.DisclosureContent;
10
- }
11
- });
12
- var _reakit = require("reakit");
6
+ exports.default = exports.DisclosureContent = void 0;
7
+ var _react = require("react");
8
+ var Ariakit = _interopRequireWildcard(require("@ariakit/react"));
9
+ var _element = require("@wordpress/element");
10
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
+ /**
13
+ * External dependencies
14
+ */
15
+ // eslint-disable-next-line no-restricted-imports
16
+
17
+ /**
18
+ * WordPress dependencies
19
+ */
20
+
21
+ /**
22
+ * Accessible Disclosure component that controls visibility of a section of
23
+ * content. It follows the WAI-ARIA Disclosure Pattern.
24
+ */
25
+ const UnforwardedDisclosureContent = ({
26
+ visible,
27
+ children,
28
+ ...props
29
+ }, ref) => {
30
+ const disclosure = Ariakit.useDisclosureStore({
31
+ open: visible
32
+ });
33
+ return (0, _react.createElement)(Ariakit.DisclosureContent, {
34
+ store: disclosure,
35
+ ref: ref,
36
+ ...props
37
+ }, children);
38
+ };
39
+ const DisclosureContent = (0, _element.forwardRef)(UnforwardedDisclosureContent);
40
+ exports.DisclosureContent = DisclosureContent;
41
+ var _default = DisclosureContent;
42
+ exports.default = _default;
13
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reakit","require"],"sources":["@wordpress/components/src/disclosure/index.js"],"sourcesContent":["/**\n * Accessible Disclosure component that controls visibility of a section of\n * content. It follows the WAI-ARIA Disclosure Pattern.\n *\n * @see https://reakit.io/docs/disclosure/\n *\n * The plan is to build own API that accounts for future breaking changes\n * in Reakit (https://github.com/WordPress/gutenberg/pull/28085).\n */\n/* eslint-disable-next-line no-restricted-imports */\nexport { DisclosureContent } from 'reakit';\n"],"mappings":";;;;;;;;;;;AAUA,IAAAA,OAAA,GAAAC,OAAA"}
1
+ {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_element","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","UnforwardedDisclosureContent","visible","children","props","ref","disclosure","useDisclosureStore","open","_react","createElement","DisclosureContent","store","forwardRef","exports","_default"],"sources":["@wordpress/components/src/disclosure/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { DisclosureContentProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * Accessible Disclosure component that controls visibility of a section of\n * content. It follows the WAI-ARIA Disclosure Pattern.\n */\nconst UnforwardedDisclosureContent = (\n\t{\n\t\tvisible,\n\t\tchildren,\n\t\t...props\n\t}: WordPressComponentProps< DisclosureContentProps, 'div', false >,\n\tref: React.ForwardedRef< any >\n) => {\n\tconst disclosure = Ariakit.useDisclosureStore( { open: visible } );\n\n\treturn (\n\t\t<Ariakit.DisclosureContent\n\t\t\tstore={ disclosure }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t</Ariakit.DisclosureContent>\n\t);\n};\n\nexport const DisclosureContent = forwardRef( UnforwardedDisclosureContent );\nexport default DisclosureContent;\n"],"mappings":";;;;;;;AAIA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAAgD,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,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,"names":[],"sources":["@wordpress/components/src/disclosure/types.tsx"],"sourcesContent":["export type DisclosureContentProps = {\n\t/**\n\t * If set to `true` the content will be shown, otherwise it's hidden.\n\t */\n\tvisible?: boolean;\n\t/**\n\t * The content to display within the component.\n\t */\n\tchildren: React.ReactNode;\n};\n"],"mappings":""}
@@ -5,9 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = exports.Divider = void 0;
7
7
  var _react = require("react");
8
- var _reakit = require("reakit");
8
+ var Ariakit = _interopRequireWildcard(require("@ariakit/react"));
9
9
  var _context = require("../context");
10
10
  var _styles = require("./styles");
11
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
13
  /**
12
14
  * External dependencies
13
15
  */
@@ -15,8 +17,8 @@ var _styles = require("./styles");
15
17
 
16
18
  function UnconnectedDivider(props, forwardedRef) {
17
19
  const contextProps = (0, _context.useContextSystem)(props, 'Divider');
18
- return (0, _react.createElement)(_reakit.Separator, {
19
- as: _styles.DividerView,
20
+ return (0, _react.createElement)(Ariakit.Separator, {
21
+ render: (0, _react.createElement)(_styles.DividerView, null),
20
22
  ...contextProps,
21
23
  ref: forwardedRef
22
24
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_reakit","require","_context","_styles","UnconnectedDivider","props","forwardedRef","contextProps","useContextSystem","_react","createElement","Separator","as","DividerView","ref","Divider","contextConnect","exports","_default","default"],"sources":["@wordpress/components/src/divider/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { Separator } from 'reakit';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect, useContextSystem } from '../context';\nimport { DividerView } from './styles';\nimport type { DividerProps } from './types';\n\nfunction UnconnectedDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst contextProps = useContextSystem( props, 'Divider' );\n\n\treturn (\n\t\t<Separator\n\t\t\tas={ DividerView }\n\t\t\t{ ...contextProps }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n}\n\n/**\n * `Divider` is a layout component that separates groups of related content.\n *\n * ```js\n * import {\n * \t\t__experimentalDivider as Divider,\n * \t\t__experimentalText as Text,\n * \t\t__experimentalVStack as VStack,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VStack spacing={4}>\n * \t\t\t<Text>Some text here</Text>\n * \t\t\t<Divider />\n * \t\t\t<Text>Some more text here</Text>\n * \t\t</VStack>\n * \t);\n * }\n * ```\n */\nexport const Divider = contextConnect( UnconnectedDivider, 'Divider' );\n\nexport default Divider;\n"],"mappings":";;;;;;;AAIA,IAAAA,OAAA,GAAAC,OAAA;AAOA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAZA;AACA;AACA;AACA;;AAYA,SAASG,kBAAkBA,CAC1BC,KAA2D,EAC3DC,YAAiC,EAChC;EACD,MAAMC,YAAY,GAAG,IAAAC,yBAAgB,EAAEH,KAAK,EAAE,SAAU,CAAC;EAEzD,OACC,IAAAI,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAW,SAAS;IACTC,EAAE,EAAGC,mBAAa;IAAA,GACbN,YAAY;IACjBO,GAAG,EAAGR;EAAc,CACpB,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMS,OAAO,GAAG,IAAAC,uBAAc,EAAEZ,kBAAkB,EAAE,SAAU,CAAC;AAACa,OAAA,CAAAF,OAAA,GAAAA,OAAA;AAAA,IAAAG,QAAA,GAExDH,OAAO;AAAAE,OAAA,CAAAE,OAAA,GAAAD,QAAA"}
1
+ {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_context","_styles","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","UnconnectedDivider","props","forwardedRef","contextProps","useContextSystem","_react","createElement","Separator","render","DividerView","ref","Divider","contextConnect","exports","_default"],"sources":["@wordpress/components/src/divider/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect, useContextSystem } from '../context';\nimport { DividerView } from './styles';\nimport type { DividerProps } from './types';\n\nfunction UnconnectedDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst contextProps = useContextSystem( props, 'Divider' );\n\n\treturn (\n\t\t<Ariakit.Separator\n\t\t\trender={ <DividerView /> }\n\t\t\t{ ...contextProps }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n}\n\n/**\n * `Divider` is a layout component that separates groups of related content.\n *\n * ```js\n * import {\n * \t\t__experimentalDivider as Divider,\n * \t\t__experimentalText as Text,\n * \t\t__experimentalVStack as VStack,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VStack spacing={4}>\n * \t\t\t<Text>Some text here</Text>\n * \t\t\t<Divider />\n * \t\t\t<Text>Some more text here</Text>\n * \t\t</VStack>\n * \t);\n * }\n * ```\n */\nexport const Divider = contextConnect( UnconnectedDivider, 'Divider' );\n\nexport default Divider;\n"],"mappings":";;;;;;;AAIA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAOA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAAuC,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAZvC;AACA;AACA;AACA;;AAYA,SAASW,kBAAkBA,CAC1BC,KAA2D,EAC3DC,YAAiC,EAChC;EACD,MAAMC,YAAY,GAAG,IAAAC,yBAAgB,EAAEH,KAAK,EAAE,SAAU,CAAC;EAEzD,OACC,IAAAI,MAAA,CAAAC,aAAA,EAACjC,OAAO,CAACkC,SAAS;IACjBC,MAAM,EAAG,IAAAH,MAAA,CAAAC,aAAA,EAAC7B,OAAA,CAAAgC,WAAW,MAAE,CAAG;IAAA,GACrBN,YAAY;IACjBO,GAAG,EAAGR;EAAc,CACpB,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMS,OAAO,GAAG,IAAAC,uBAAc,EAAEZ,kBAAkB,EAAE,SAAU,CAAC;AAACa,OAAA,CAAAF,OAAA,GAAAA,OAAA;AAAA,IAAAG,QAAA,GAExDH,OAAO;AAAAE,OAAA,CAAA5B,OAAA,GAAA6B,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/divider/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { SeparatorProps } from 'reakit';\n\n/**\n * Internal dependencies\n */\nimport type { SpaceInput } from '../utils/space';\n\nexport type DividerProps = Omit<\n\tSeparatorProps,\n\t'children' | 'unstable_system' | 'orientation'\n> & {\n\t/**\n\t * Adjusts all margins on the inline dimension.\n\t *\n\t * Can either be a number (which will act as a multiplier to the library's grid system base of 4px),\n\t * or a literal CSS value string.\n\t */\n\tmargin?: SpaceInput;\n\t/**\n\t * Adjusts the inline-end margin.\n\t *\n\t * Can either be a number (which will act as a multiplier to the library's grid system base of 4px),\n\t * or a literal CSS value string.\n\t */\n\tmarginEnd?: SpaceInput;\n\t/**\n\t * Adjusts the inline-start margin.\n\t *\n\t * Can either be a number (which will act as a multiplier to the library's grid system base of 4px),\n\t * or a literal CSS value string.\n\t */\n\tmarginStart?: SpaceInput;\n\t/**\n\t * Divider's orientation. When using inside a flex container, you may need\n\t * to make sure the divider is `stretch` aligned in order for it to be\n\t * visible.\n\t *\n\t * @default 'horizontal'\n\t */\n\torientation?: SeparatorProps[ 'orientation' ];\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/divider/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { SeparatorProps } from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport type { SpaceInput } from '../utils/space';\n\nexport type DividerProps = Omit<\n\tSeparatorProps,\n\t'children' | 'unstable_system' | 'orientation' | 'as' | 'render'\n> & {\n\t/**\n\t * Adjusts all margins on the inline dimension.\n\t *\n\t * Can either be a number (which will act as a multiplier to the library's grid system base of 4px),\n\t * or a literal CSS value string.\n\t */\n\tmargin?: SpaceInput;\n\t/**\n\t * Adjusts the inline-end margin.\n\t *\n\t * Can either be a number (which will act as a multiplier to the library's grid system base of 4px),\n\t * or a literal CSS value string.\n\t */\n\tmarginEnd?: SpaceInput;\n\t/**\n\t * Adjusts the inline-start margin.\n\t *\n\t * Can either be a number (which will act as a multiplier to the library's grid system base of 4px),\n\t * or a literal CSS value string.\n\t */\n\tmarginStart?: SpaceInput;\n\t/**\n\t * Divider's orientation. When using inside a flex container, you may need\n\t * to make sure the divider is `stretch` aligned in order for it to be\n\t * visible.\n\t *\n\t * @default 'horizontal'\n\t */\n\torientation?: SeparatorProps[ 'orientation' ];\n};\n"],"mappings":""}