@wordpress/components 28.3.0 → 28.5.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 (1233) hide show
  1. package/CHANGELOG.md +70 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/build/autocomplete/autocompleter-ui.js +2 -0
  4. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  5. package/build/autocomplete/types.js.map +1 -1
  6. package/build/base-control/styles/base-control-styles.js +8 -8
  7. package/build/base-control/styles/base-control-styles.js.map +1 -1
  8. package/build/base-control/types.js.map +1 -1
  9. package/build/border-control/styles.js +18 -24
  10. package/build/border-control/styles.js.map +1 -1
  11. package/build/button/index.js +9 -7
  12. package/build/button/index.js.map +1 -1
  13. package/build/button/types.js.map +1 -1
  14. package/build/checkbox-control/index.js +1 -0
  15. package/build/checkbox-control/index.js.map +1 -1
  16. package/build/color-palette/index.js +1 -1
  17. package/build/color-palette/index.js.map +1 -1
  18. package/build/color-picker/component.js +8 -17
  19. package/build/color-picker/component.js.map +1 -1
  20. package/build/combobox-control/index.js +9 -0
  21. package/build/combobox-control/index.js.map +1 -1
  22. package/build/custom-select-control/index.js +141 -167
  23. package/build/custom-select-control/index.js.map +1 -1
  24. package/build/custom-select-control/types.js +6 -0
  25. package/build/custom-select-control/types.js.map +1 -0
  26. package/build/custom-select-control-v2/custom-select.js +4 -1
  27. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  28. package/build/custom-select-control-v2/index.js +35 -7
  29. package/build/custom-select-control-v2/index.js.map +1 -1
  30. package/build/custom-select-control-v2/styles.js +25 -9
  31. package/build/custom-select-control-v2/styles.js.map +1 -1
  32. package/build/custom-select-control-v2/types.js.map +1 -1
  33. package/build/date-time/index.js +0 -7
  34. package/build/date-time/index.js.map +1 -1
  35. package/build/date-time/time/index.js +66 -38
  36. package/build/date-time/time/index.js.map +1 -1
  37. package/build/date-time/time/styles.js +11 -11
  38. package/build/date-time/time/styles.js.map +1 -1
  39. package/build/date-time/{time-input → time/time-input}/index.js +7 -7
  40. package/build/date-time/time/time-input/index.js.map +1 -0
  41. package/build/dropdown-menu-v2/styles.js +14 -14
  42. package/build/dropdown-menu-v2/styles.js.map +1 -1
  43. package/build/focal-point-picker/index.js +1 -0
  44. package/build/focal-point-picker/index.js.map +1 -1
  45. package/build/font-size-picker/font-size-picker-select.js +4 -4
  46. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  47. package/build/font-size-picker/index.js +36 -24
  48. package/build/font-size-picker/index.js.map +1 -1
  49. package/build/font-size-picker/types.js.map +1 -1
  50. package/build/form-toggle/index.js +24 -24
  51. package/build/form-toggle/index.js.map +1 -1
  52. package/build/form-token-field/index.js +8 -0
  53. package/build/form-token-field/index.js.map +1 -1
  54. package/build/guide/index.js +2 -0
  55. package/build/guide/index.js.map +1 -1
  56. package/build/heading/types.js.map +1 -1
  57. package/build/index.js +2 -2
  58. package/build/index.js.map +1 -1
  59. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  60. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  61. package/build/modal/index.js +18 -11
  62. package/build/modal/index.js.map +1 -1
  63. package/build/private-apis.js +0 -4
  64. package/build/private-apis.js.map +1 -1
  65. package/build/query-controls/index.js +1 -1
  66. package/build/query-controls/index.js.map +1 -1
  67. package/build/radio-control/index.js +34 -7
  68. package/build/radio-control/index.js.map +1 -1
  69. package/build/radio-control/types.js.map +1 -1
  70. package/build/range-control/index.js +1 -0
  71. package/build/range-control/index.js.map +1 -1
  72. package/build/select-control/index.js +25 -8
  73. package/build/select-control/index.js.map +1 -1
  74. package/build/select-control/styles/select-control-styles.js +42 -11
  75. package/build/select-control/styles/select-control-styles.js.map +1 -1
  76. package/build/select-control/types.js.map +1 -1
  77. package/build/tabs/styles.js +3 -3
  78. package/build/tabs/styles.js.map +1 -1
  79. package/build/tabs/tablist.js +4 -189
  80. package/build/tabs/tablist.js.map +1 -1
  81. package/build/text-control/index.js +1 -0
  82. package/build/text-control/index.js.map +1 -1
  83. package/build/textarea-control/index.js +1 -0
  84. package/build/textarea-control/index.js.map +1 -1
  85. package/build/toggle-control/index.js +36 -28
  86. package/build/toggle-control/index.js.map +1 -1
  87. package/build/toggle-group-control/toggle-group-control/component.js +6 -1
  88. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  89. package/build/toggle-group-control/toggle-group-control-option/component.js +6 -1
  90. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  91. package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -0
  92. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  93. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  94. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  95. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +14 -14
  96. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  97. package/build/tools-panel/tools-panel-header/component.js +1 -1
  98. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  99. package/build/tooltip/index.js +12 -1
  100. package/build/tooltip/index.js.map +1 -1
  101. package/build/tree-select/index.js +1 -1
  102. package/build/tree-select/index.js.map +1 -1
  103. package/build/utils/config-values.js +6 -0
  104. package/build/utils/config-values.js.map +1 -1
  105. package/build/utils/element-rect.js +157 -0
  106. package/build/utils/element-rect.js.map +1 -0
  107. package/build/utils/hooks/use-event.js +41 -0
  108. package/build/utils/hooks/use-event.js.map +1 -0
  109. package/build/utils/hooks/use-on-value-update.js +46 -0
  110. package/build/utils/hooks/use-on-value-update.js.map +1 -0
  111. package/build-module/autocomplete/autocompleter-ui.js +2 -0
  112. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  113. package/build-module/autocomplete/types.js.map +1 -1
  114. package/build-module/base-control/styles/base-control-styles.js +8 -8
  115. package/build-module/base-control/styles/base-control-styles.js.map +1 -1
  116. package/build-module/base-control/types.js.map +1 -1
  117. package/build-module/border-control/styles.js +13 -23
  118. package/build-module/border-control/styles.js.map +1 -1
  119. package/build-module/button/index.js +9 -7
  120. package/build-module/button/index.js.map +1 -1
  121. package/build-module/button/types.js.map +1 -1
  122. package/build-module/checkbox-control/index.js +1 -0
  123. package/build-module/checkbox-control/index.js.map +1 -1
  124. package/build-module/color-palette/index.js +1 -1
  125. package/build-module/color-palette/index.js.map +1 -1
  126. package/build-module/color-picker/component.js +9 -18
  127. package/build-module/color-picker/component.js.map +1 -1
  128. package/build-module/combobox-control/index.js +9 -0
  129. package/build-module/combobox-control/index.js.map +1 -1
  130. package/build-module/custom-select-control/index.js +140 -166
  131. package/build-module/custom-select-control/index.js.map +1 -1
  132. package/build-module/custom-select-control/types.js +2 -0
  133. package/build-module/custom-select-control/types.js.map +1 -0
  134. package/build-module/custom-select-control-v2/custom-select.js +4 -1
  135. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  136. package/build-module/custom-select-control-v2/index.js +27 -1
  137. package/build-module/custom-select-control-v2/index.js.map +1 -1
  138. package/build-module/custom-select-control-v2/styles.js +26 -10
  139. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  140. package/build-module/custom-select-control-v2/types.js.map +1 -1
  141. package/build-module/date-time/index.js +1 -2
  142. package/build-module/date-time/index.js.map +1 -1
  143. package/build-module/date-time/time/index.js +66 -38
  144. package/build-module/date-time/time/index.js.map +1 -1
  145. package/build-module/date-time/time/styles.js +11 -11
  146. package/build-module/date-time/time/styles.js.map +1 -1
  147. package/build-module/date-time/{time-input → time/time-input}/index.js +7 -7
  148. package/build-module/date-time/time/time-input/index.js.map +1 -0
  149. package/build-module/dropdown-menu-v2/styles.js +14 -14
  150. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  151. package/build-module/focal-point-picker/index.js +1 -0
  152. package/build-module/focal-point-picker/index.js.map +1 -1
  153. package/build-module/font-size-picker/font-size-picker-select.js +3 -3
  154. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  155. package/build-module/font-size-picker/index.js +36 -24
  156. package/build-module/font-size-picker/index.js.map +1 -1
  157. package/build-module/font-size-picker/types.js.map +1 -1
  158. package/build-module/form-toggle/index.js +23 -22
  159. package/build-module/form-toggle/index.js.map +1 -1
  160. package/build-module/form-token-field/index.js +8 -0
  161. package/build-module/form-token-field/index.js.map +1 -1
  162. package/build-module/guide/index.js +2 -0
  163. package/build-module/guide/index.js.map +1 -1
  164. package/build-module/heading/types.js.map +1 -1
  165. package/build-module/index.js +1 -1
  166. package/build-module/index.js.map +1 -1
  167. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  168. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  169. package/build-module/modal/index.js +17 -11
  170. package/build-module/modal/index.js.map +1 -1
  171. package/build-module/private-apis.js +0 -4
  172. package/build-module/private-apis.js.map +1 -1
  173. package/build-module/query-controls/index.js +1 -1
  174. package/build-module/query-controls/index.js.map +1 -1
  175. package/build-module/radio-control/index.js +35 -9
  176. package/build-module/radio-control/index.js.map +1 -1
  177. package/build-module/radio-control/types.js.map +1 -1
  178. package/build-module/range-control/index.js +1 -0
  179. package/build-module/range-control/index.js.map +1 -1
  180. package/build-module/select-control/index.js +25 -8
  181. package/build-module/select-control/index.js.map +1 -1
  182. package/build-module/select-control/styles/select-control-styles.js +41 -6
  183. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  184. package/build-module/select-control/types.js.map +1 -1
  185. package/build-module/tabs/styles.js +3 -3
  186. package/build-module/tabs/styles.js.map +1 -1
  187. package/build-module/tabs/tablist.js +3 -188
  188. package/build-module/tabs/tablist.js.map +1 -1
  189. package/build-module/text-control/index.js +1 -0
  190. package/build-module/text-control/index.js.map +1 -1
  191. package/build-module/textarea-control/index.js +1 -0
  192. package/build-module/textarea-control/index.js.map +1 -1
  193. package/build-module/toggle-control/index.js +35 -27
  194. package/build-module/toggle-control/index.js.map +1 -1
  195. package/build-module/toggle-group-control/toggle-group-control/component.js +6 -1
  196. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  197. package/build-module/toggle-group-control/toggle-group-control-option/component.js +6 -1
  198. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  199. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +3 -0
  200. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  201. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  202. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  203. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +14 -14
  204. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  205. package/build-module/tools-panel/tools-panel-header/component.js +1 -1
  206. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  207. package/build-module/tooltip/index.js +13 -2
  208. package/build-module/tooltip/index.js.map +1 -1
  209. package/build-module/tree-select/index.js +1 -1
  210. package/build-module/tree-select/index.js.map +1 -1
  211. package/build-module/utils/config-values.js +6 -0
  212. package/build-module/utils/config-values.js.map +1 -1
  213. package/build-module/utils/element-rect.js +147 -0
  214. package/build-module/utils/element-rect.js.map +1 -0
  215. package/build-module/utils/hooks/use-event.js +35 -0
  216. package/build-module/utils/hooks/use-event.js.map +1 -0
  217. package/build-module/utils/hooks/use-on-value-update.js +39 -0
  218. package/build-module/utils/hooks/use-on-value-update.js.map +1 -0
  219. package/build-style/style-rtl.css +126 -123
  220. package/build-style/style.css +126 -123
  221. package/build-types/alignment-matrix-control/cell.d.ts +0 -1
  222. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
  223. package/build-types/alignment-matrix-control/icon.d.ts +0 -1
  224. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
  225. package/build-types/alignment-matrix-control/index.d.ts +0 -1
  226. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  227. package/build-types/alignment-matrix-control/stories/index.story.d.ts +0 -1
  228. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  229. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +8 -9
  230. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +1 -1
  231. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +10 -11
  232. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
  233. package/build-types/angle-picker-control/angle-circle.d.ts +0 -1
  234. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  235. package/build-types/angle-picker-control/index.d.ts +0 -1
  236. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  237. package/build-types/angle-picker-control/stories/index.story.d.ts +0 -1
  238. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  239. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +7 -8
  240. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  241. package/build-types/animate/index.d.ts +0 -1
  242. package/build-types/animate/index.d.ts.map +1 -1
  243. package/build-types/animate/types.d.ts +0 -1
  244. package/build-types/animate/types.d.ts.map +1 -1
  245. package/build-types/autocomplete/autocompleter-ui.d.ts +0 -1
  246. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  247. package/build-types/autocomplete/index.d.ts +2 -3
  248. package/build-types/autocomplete/index.d.ts.map +1 -1
  249. package/build-types/autocomplete/types.d.ts +2 -3
  250. package/build-types/autocomplete/types.d.ts.map +1 -1
  251. package/build-types/base-control/hooks.d.ts +3 -4
  252. package/build-types/base-control/hooks.d.ts.map +1 -1
  253. package/build-types/base-control/index.d.ts +0 -1
  254. package/build-types/base-control/index.d.ts.map +1 -1
  255. package/build-types/base-control/stories/index.story.d.ts +0 -1
  256. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  257. package/build-types/base-control/styles/base-control-styles.d.ts +10 -11
  258. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  259. package/build-types/base-control/types.d.ts +1 -1
  260. package/build-types/border-box-control/border-box-control/component.d.ts +4 -5
  261. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  262. package/build-types/border-box-control/border-box-control/hook.d.ts +14 -16
  263. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  264. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts +0 -1
  265. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts.map +1 -1
  266. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +12 -14
  267. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  268. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +5 -6
  269. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  270. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +14 -16
  271. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  272. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts +1 -2
  273. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts.map +1 -1
  274. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +9 -11
  275. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  276. package/build-types/border-box-control/stories/index.story.d.ts +4 -5
  277. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  278. package/build-types/border-box-control/styles.d.ts +3 -3
  279. package/build-types/border-box-control/utils.d.ts.map +1 -1
  280. package/build-types/border-control/border-control/component.d.ts +14 -15
  281. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  282. package/build-types/border-control/border-control/hook.d.ts +17 -19
  283. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  284. package/build-types/border-control/border-control-dropdown/component.d.ts +6 -7
  285. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  286. package/build-types/border-control/border-control-dropdown/hook.d.ts +12 -14
  287. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  288. package/build-types/border-control/border-control-style-picker/component.d.ts +2 -3
  289. package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
  290. package/build-types/border-control/stories/index.story.d.ts +84 -85
  291. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  292. package/build-types/border-control/styles.d.ts +2 -2
  293. package/build-types/border-control/styles.d.ts.map +1 -1
  294. package/build-types/box-control/all-input-control.d.ts +0 -1
  295. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  296. package/build-types/box-control/axial-input-controls.d.ts +0 -1
  297. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  298. package/build-types/box-control/icon.d.ts +0 -1
  299. package/build-types/box-control/icon.d.ts.map +1 -1
  300. package/build-types/box-control/index.d.ts +0 -1
  301. package/build-types/box-control/index.d.ts.map +1 -1
  302. package/build-types/box-control/input-controls.d.ts +0 -1
  303. package/build-types/box-control/input-controls.d.ts.map +1 -1
  304. package/build-types/box-control/linked-button.d.ts +0 -1
  305. package/build-types/box-control/linked-button.d.ts.map +1 -1
  306. package/build-types/box-control/stories/index.story.d.ts +312 -350
  307. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  308. package/build-types/box-control/styles/box-control-icon-styles.d.ts +16 -17
  309. package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
  310. package/build-types/box-control/styles/box-control-styles.d.ts +44 -45
  311. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  312. package/build-types/box-control/types.d.ts +0 -1
  313. package/build-types/box-control/types.d.ts.map +1 -1
  314. package/build-types/button/deprecated.d.ts +69 -70
  315. package/build-types/button/deprecated.d.ts.map +1 -1
  316. package/build-types/button/index.d.ts.map +1 -1
  317. package/build-types/button/stories/e2e/index.story.d.ts +0 -1
  318. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  319. package/build-types/button/stories/index.story.d.ts +0 -1
  320. package/build-types/button/stories/index.story.d.ts.map +1 -1
  321. package/build-types/button/types.d.ts +9 -2
  322. package/build-types/button/types.d.ts.map +1 -1
  323. package/build-types/button-group/index.d.ts +0 -1
  324. package/build-types/button-group/index.d.ts.map +1 -1
  325. package/build-types/card/card/component.d.ts +5 -6
  326. package/build-types/card/card/component.d.ts.map +1 -1
  327. package/build-types/card/card/hook.d.ts +10 -12
  328. package/build-types/card/card/hook.d.ts.map +1 -1
  329. package/build-types/card/card-body/component.d.ts +4 -5
  330. package/build-types/card/card-body/component.d.ts.map +1 -1
  331. package/build-types/card/card-body/hook.d.ts +10 -12
  332. package/build-types/card/card-body/hook.d.ts.map +1 -1
  333. package/build-types/card/card-divider/component.d.ts +4 -5
  334. package/build-types/card/card-divider/component.d.ts.map +1 -1
  335. package/build-types/card/card-divider/hook.d.ts +15 -17
  336. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  337. package/build-types/card/card-footer/component.d.ts +5 -6
  338. package/build-types/card/card-footer/component.d.ts.map +1 -1
  339. package/build-types/card/card-footer/hook.d.ts +10 -12
  340. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  341. package/build-types/card/card-header/component.d.ts +4 -5
  342. package/build-types/card/card-header/component.d.ts.map +1 -1
  343. package/build-types/card/card-header/hook.d.ts +10 -12
  344. package/build-types/card/card-header/hook.d.ts.map +1 -1
  345. package/build-types/card/card-media/component.d.ts +0 -1
  346. package/build-types/card/card-media/component.d.ts.map +1 -1
  347. package/build-types/card/card-media/hook.d.ts +10 -12
  348. package/build-types/card/card-media/hook.d.ts.map +1 -1
  349. package/build-types/card/context.d.ts +0 -1
  350. package/build-types/card/context.d.ts.map +1 -1
  351. package/build-types/card/stories/index.story.d.ts +3 -22
  352. package/build-types/card/stories/index.story.d.ts.map +1 -1
  353. package/build-types/checkbox-control/index.d.ts +1 -1
  354. package/build-types/checkbox-control/index.d.ts.map +1 -1
  355. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +0 -1
  356. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  357. package/build-types/circular-option-picker/circular-option-picker-context.d.ts +0 -1
  358. package/build-types/circular-option-picker/circular-option-picker-context.d.ts.map +1 -1
  359. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +0 -1
  360. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -1
  361. package/build-types/circular-option-picker/circular-option-picker-option.d.ts +0 -1
  362. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  363. package/build-types/circular-option-picker/circular-option-picker.d.ts +0 -1
  364. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  365. package/build-types/clipboard-button/index.d.ts +0 -1
  366. package/build-types/clipboard-button/index.d.ts.map +1 -1
  367. package/build-types/color-indicator/index.d.ts +0 -1
  368. package/build-types/color-indicator/index.d.ts.map +1 -1
  369. package/build-types/color-palette/index.d.ts +0 -1
  370. package/build-types/color-palette/index.d.ts.map +1 -1
  371. package/build-types/color-palette/stories/index.story.d.ts +0 -1
  372. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  373. package/build-types/color-palette/styles.d.ts +7 -8
  374. package/build-types/color-palette/styles.d.ts.map +1 -1
  375. package/build-types/color-palette/utils.d.ts +1 -1
  376. package/build-types/color-palette/utils.d.ts.map +1 -1
  377. package/build-types/color-picker/color-copy-button.d.ts +0 -1
  378. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  379. package/build-types/color-picker/color-input.d.ts +0 -1
  380. package/build-types/color-picker/color-input.d.ts.map +1 -1
  381. package/build-types/color-picker/component.d.ts +5 -6
  382. package/build-types/color-picker/component.d.ts.map +1 -1
  383. package/build-types/color-picker/hex-input.d.ts +0 -1
  384. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  385. package/build-types/color-picker/hsl-input.d.ts +0 -1
  386. package/build-types/color-picker/hsl-input.d.ts.map +1 -1
  387. package/build-types/color-picker/input-with-slider.d.ts +0 -1
  388. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  389. package/build-types/color-picker/legacy-adapter.d.ts +0 -1
  390. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
  391. package/build-types/color-picker/picker.d.ts +0 -1
  392. package/build-types/color-picker/picker.d.ts.map +1 -1
  393. package/build-types/color-picker/rgb-input.d.ts +0 -1
  394. package/build-types/color-picker/rgb-input.d.ts.map +1 -1
  395. package/build-types/color-picker/stories/index.story.d.ts +2 -9
  396. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  397. package/build-types/color-picker/styles.d.ts +55 -54
  398. package/build-types/color-picker/styles.d.ts.map +1 -1
  399. package/build-types/combobox-control/index.d.ts +1 -1
  400. package/build-types/combobox-control/index.d.ts.map +1 -1
  401. package/build-types/combobox-control/stories/index.story.d.ts +41 -41
  402. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  403. package/build-types/combobox-control/styles.d.ts +1 -2
  404. package/build-types/combobox-control/styles.d.ts.map +1 -1
  405. package/build-types/combobox-control/types.d.ts +0 -1
  406. package/build-types/combobox-control/types.d.ts.map +1 -1
  407. package/build-types/composite/current/stories/utils.d.ts +0 -1
  408. package/build-types/composite/current/stories/utils.d.ts.map +1 -1
  409. package/build-types/composite/legacy/index.d.ts +0 -1
  410. package/build-types/composite/legacy/index.d.ts.map +1 -1
  411. package/build-types/composite/legacy/stories/utils.d.ts +0 -1
  412. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  413. package/build-types/confirm-dialog/component.d.ts +0 -1
  414. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  415. package/build-types/confirm-dialog/stories/index.story.d.ts +0 -1
  416. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  417. package/build-types/context/context-system-provider.d.ts +1 -1
  418. package/build-types/context/context-system-provider.d.ts.map +1 -1
  419. package/build-types/context/get-styled-class-name-from-key.d.ts +9 -1
  420. package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
  421. package/build-types/context/use-context-system.d.ts +1 -1
  422. package/build-types/context/use-context-system.d.ts.map +1 -1
  423. package/build-types/context/utils.d.ts.map +1 -1
  424. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +0 -1
  425. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  426. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +0 -1
  427. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  428. package/build-types/custom-gradient-picker/index.d.ts +0 -1
  429. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  430. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -3
  431. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -1
  432. package/build-types/custom-gradient-picker/types.d.ts +0 -1
  433. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  434. package/build-types/custom-gradient-picker/utils.d.ts.map +1 -1
  435. package/build-types/custom-select-control/index.d.ts +3 -2
  436. package/build-types/custom-select-control/index.d.ts.map +1 -1
  437. package/build-types/custom-select-control/stories/index.story.d.ts +6 -42
  438. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  439. package/build-types/custom-select-control/test/index.d.ts.map +1 -0
  440. package/build-types/custom-select-control/types.d.ts +122 -0
  441. package/build-types/custom-select-control/types.d.ts.map +1 -0
  442. package/build-types/custom-select-control-v2/custom-select.d.ts +0 -1
  443. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  444. package/build-types/custom-select-control-v2/index.d.ts +7 -4
  445. package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
  446. package/build-types/custom-select-control-v2/item.d.ts +0 -1
  447. package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
  448. package/build-types/custom-select-control-v2/stories/{default.story.d.ts → index.story.d.ts} +10 -11
  449. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -0
  450. package/build-types/custom-select-control-v2/styles.d.ts +30 -43
  451. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  452. package/build-types/custom-select-control-v2/types.d.ts +0 -106
  453. package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
  454. package/build-types/dashicon/index.d.ts +0 -1
  455. package/build-types/dashicon/index.d.ts.map +1 -1
  456. package/build-types/date-time/date/index.d.ts +0 -1
  457. package/build-types/date-time/date/index.d.ts.map +1 -1
  458. package/build-types/date-time/date/styles.d.ts +17 -18
  459. package/build-types/date-time/date/styles.d.ts.map +1 -1
  460. package/build-types/date-time/date-time/index.d.ts +1 -2
  461. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  462. package/build-types/date-time/date-time/styles.d.ts +3 -4
  463. package/build-types/date-time/date-time/styles.d.ts.map +1 -1
  464. package/build-types/date-time/index.d.ts +1 -2
  465. package/build-types/date-time/index.d.ts.map +1 -1
  466. package/build-types/date-time/stories/time.story.d.ts +5 -0
  467. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  468. package/build-types/date-time/time/index.d.ts +3 -1
  469. package/build-types/date-time/time/index.d.ts.map +1 -1
  470. package/build-types/date-time/time/styles.d.ts +64 -65
  471. package/build-types/date-time/time/styles.d.ts.map +1 -1
  472. package/build-types/date-time/{time-input → time/time-input}/index.d.ts +1 -2
  473. package/build-types/date-time/time/time-input/index.d.ts.map +1 -0
  474. package/build-types/date-time/time/time-input/test/index.d.ts.map +1 -0
  475. package/build-types/date-time/time/timezone.d.ts +0 -1
  476. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  477. package/build-types/date-time/types.d.ts +0 -1
  478. package/build-types/date-time/types.d.ts.map +1 -1
  479. package/build-types/date-time/utils.d.ts +3 -4
  480. package/build-types/date-time/utils.d.ts.map +1 -1
  481. package/build-types/dimension-control/index.d.ts +0 -1
  482. package/build-types/dimension-control/index.d.ts.map +1 -1
  483. package/build-types/disabled/index.d.ts +0 -1
  484. package/build-types/disabled/index.d.ts.map +1 -1
  485. package/build-types/disabled/types.d.ts +0 -1
  486. package/build-types/disabled/types.d.ts.map +1 -1
  487. package/build-types/disclosure/index.d.ts +0 -1
  488. package/build-types/disclosure/index.d.ts.map +1 -1
  489. package/build-types/disclosure/types.d.ts +0 -1
  490. package/build-types/disclosure/types.d.ts.map +1 -1
  491. package/build-types/divider/component.d.ts +4 -5
  492. package/build-types/divider/component.d.ts.map +1 -1
  493. package/build-types/divider/styles.d.ts +6 -7
  494. package/build-types/divider/styles.d.ts.map +1 -1
  495. package/build-types/draggable/index.d.ts +0 -1
  496. package/build-types/draggable/index.d.ts.map +1 -1
  497. package/build-types/drop-zone/index.d.ts +0 -1
  498. package/build-types/drop-zone/index.d.ts.map +1 -1
  499. package/build-types/drop-zone/provider.d.ts +0 -1
  500. package/build-types/drop-zone/provider.d.ts.map +1 -1
  501. package/build-types/drop-zone/stories/index.story.d.ts +0 -1
  502. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  503. package/build-types/dropdown/dropdown-content-wrapper.d.ts +0 -1
  504. package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
  505. package/build-types/dropdown/index.d.ts +0 -1
  506. package/build-types/dropdown/index.d.ts.map +1 -1
  507. package/build-types/dropdown/stories/index.story.d.ts +5 -6
  508. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  509. package/build-types/dropdown/styles.d.ts +2 -3
  510. package/build-types/dropdown/styles.d.ts.map +1 -1
  511. package/build-types/dropdown-menu/index.d.ts +0 -1
  512. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  513. package/build-types/dropdown-menu/stories/index.story.d.ts +3 -4
  514. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  515. package/build-types/dropdown-menu-v2/index.d.ts +0 -1
  516. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  517. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  518. package/build-types/dropdown-menu-v2/styles.d.ts +41 -60
  519. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  520. package/build-types/dropdown-menu-v2/types.d.ts +0 -1
  521. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  522. package/build-types/duotone-picker/color-list-picker/index.d.ts +0 -1
  523. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  524. package/build-types/duotone-picker/custom-duotone-bar.d.ts +0 -1
  525. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
  526. package/build-types/duotone-picker/duotone-picker.d.ts +0 -1
  527. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  528. package/build-types/duotone-picker/duotone-swatch.d.ts +0 -1
  529. package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -1
  530. package/build-types/elevation/component.d.ts +0 -1
  531. package/build-types/elevation/component.d.ts.map +1 -1
  532. package/build-types/elevation/hook.d.ts +9 -11
  533. package/build-types/elevation/hook.d.ts.map +1 -1
  534. package/build-types/external-link/index.d.ts +0 -1
  535. package/build-types/external-link/index.d.ts.map +1 -1
  536. package/build-types/flex/context.d.ts +2 -3
  537. package/build-types/flex/context.d.ts.map +1 -1
  538. package/build-types/flex/flex/component.d.ts +0 -1
  539. package/build-types/flex/flex/component.d.ts.map +1 -1
  540. package/build-types/flex/flex/hook.d.ts +9 -11
  541. package/build-types/flex/flex/hook.d.ts.map +1 -1
  542. package/build-types/flex/flex-block/component.d.ts +0 -1
  543. package/build-types/flex/flex-block/component.d.ts.map +1 -1
  544. package/build-types/flex/flex-block/hook.d.ts +9 -11
  545. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  546. package/build-types/flex/flex-item/component.d.ts +0 -1
  547. package/build-types/flex/flex-item/component.d.ts.map +1 -1
  548. package/build-types/flex/flex-item/hook.d.ts +9 -11
  549. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  550. package/build-types/focal-point-picker/controls.d.ts +0 -1
  551. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  552. package/build-types/focal-point-picker/focal-point.d.ts +0 -1
  553. package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
  554. package/build-types/focal-point-picker/grid.d.ts +0 -1
  555. package/build-types/focal-point-picker/grid.d.ts.map +1 -1
  556. package/build-types/focal-point-picker/index.d.ts +1 -1
  557. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  558. package/build-types/focal-point-picker/media.d.ts +0 -1
  559. package/build-types/focal-point-picker/media.d.ts.map +1 -1
  560. package/build-types/focal-point-picker/stories/index.story.d.ts +32 -33
  561. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  562. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +26 -27
  563. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  564. package/build-types/focal-point-picker/styles/focal-point-style.d.ts +2 -3
  565. package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
  566. package/build-types/focusable-iframe/index.d.ts +0 -1
  567. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  568. package/build-types/font-size-picker/font-size-picker-select.d.ts +0 -1
  569. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  570. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts +0 -1
  571. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  572. package/build-types/font-size-picker/index.d.ts +0 -1
  573. package/build-types/font-size-picker/index.d.ts.map +1 -1
  574. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +0 -1
  575. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  576. package/build-types/font-size-picker/styles.d.ts +9 -10
  577. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  578. package/build-types/font-size-picker/types.d.ts +6 -5
  579. package/build-types/font-size-picker/types.d.ts.map +1 -1
  580. package/build-types/form-file-upload/index.d.ts +0 -1
  581. package/build-types/form-file-upload/index.d.ts.map +1 -1
  582. package/build-types/form-file-upload/stories/index.story.d.ts +0 -1
  583. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  584. package/build-types/form-toggle/index.d.ts +2 -5
  585. package/build-types/form-toggle/index.d.ts.map +1 -1
  586. package/build-types/form-token-field/index.d.ts +0 -1
  587. package/build-types/form-token-field/index.d.ts.map +1 -1
  588. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  589. package/build-types/form-token-field/styles.d.ts +1 -2
  590. package/build-types/form-token-field/styles.d.ts.map +1 -1
  591. package/build-types/form-token-field/suggestions-list.d.ts +0 -1
  592. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  593. package/build-types/form-token-field/token.d.ts +0 -1
  594. package/build-types/form-token-field/token.d.ts.map +1 -1
  595. package/build-types/gradient-picker/index.d.ts +0 -1
  596. package/build-types/gradient-picker/index.d.ts.map +1 -1
  597. package/build-types/gradient-picker/types.d.ts +0 -1
  598. package/build-types/gradient-picker/types.d.ts.map +1 -1
  599. package/build-types/grid/component.d.ts +0 -1
  600. package/build-types/grid/component.d.ts.map +1 -1
  601. package/build-types/grid/hook.d.ts +9 -11
  602. package/build-types/grid/hook.d.ts.map +1 -1
  603. package/build-types/guide/icons.d.ts +0 -1
  604. package/build-types/guide/icons.d.ts.map +1 -1
  605. package/build-types/guide/index.d.ts +0 -1
  606. package/build-types/guide/index.d.ts.map +1 -1
  607. package/build-types/guide/page-control.d.ts +0 -1
  608. package/build-types/guide/page-control.d.ts.map +1 -1
  609. package/build-types/guide/page.d.ts +0 -1
  610. package/build-types/guide/page.d.ts.map +1 -1
  611. package/build-types/h-stack/component.d.ts +2 -3
  612. package/build-types/h-stack/component.d.ts.map +1 -1
  613. package/build-types/h-stack/hook.d.ts +9 -11
  614. package/build-types/h-stack/hook.d.ts.map +1 -1
  615. package/build-types/heading/component.d.ts +5 -6
  616. package/build-types/heading/component.d.ts.map +1 -1
  617. package/build-types/heading/hook.d.ts +9 -11
  618. package/build-types/heading/hook.d.ts.map +1 -1
  619. package/build-types/heading/types.d.ts +1 -1
  620. package/build-types/heading/types.d.ts.map +1 -1
  621. package/build-types/higher-order/navigate-regions/index.d.ts +1 -2
  622. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  623. package/build-types/higher-order/with-constrained-tabbing/index.d.ts +0 -1
  624. package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
  625. package/build-types/higher-order/with-fallback-styles/index.d.ts +3 -4
  626. package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -1
  627. package/build-types/higher-order/with-filters/index.d.ts +4 -5
  628. package/build-types/higher-order/with-filters/index.d.ts.map +1 -1
  629. package/build-types/higher-order/with-focus-outside/index.d.ts +0 -1
  630. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  631. package/build-types/higher-order/with-focus-return/index.d.ts +0 -1
  632. package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -1
  633. package/build-types/higher-order/with-notices/index.d.ts +0 -1
  634. package/build-types/higher-order/with-notices/index.d.ts.map +1 -1
  635. package/build-types/higher-order/with-notices/types.d.ts +0 -1
  636. package/build-types/higher-order/with-notices/types.d.ts.map +1 -1
  637. package/build-types/higher-order/with-spoken-messages/index.d.ts +0 -1
  638. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  639. package/build-types/index.d.ts +1 -1
  640. package/build-types/index.d.ts.map +1 -1
  641. package/build-types/input-control/backdrop.d.ts +0 -1
  642. package/build-types/input-control/backdrop.d.ts.map +1 -1
  643. package/build-types/input-control/input-base.d.ts +0 -1
  644. package/build-types/input-control/input-base.d.ts.map +1 -1
  645. package/build-types/input-control/input-field.d.ts +0 -1
  646. package/build-types/input-control/input-field.d.ts.map +1 -1
  647. package/build-types/input-control/input-prefix-wrapper.d.ts +0 -1
  648. package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
  649. package/build-types/input-control/input-suffix-wrapper.d.ts +0 -1
  650. package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
  651. package/build-types/input-control/label.d.ts +0 -1
  652. package/build-types/input-control/label.d.ts.map +1 -1
  653. package/build-types/input-control/reducer/reducer.d.ts +9 -9
  654. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  655. package/build-types/input-control/stories/index.story.d.ts +0 -1
  656. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  657. package/build-types/input-control/styles/input-control-styles.d.ts +13 -13
  658. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  659. package/build-types/isolated-event-container/index.d.ts +0 -1
  660. package/build-types/isolated-event-container/index.d.ts.map +1 -1
  661. package/build-types/item-group/context.d.ts +0 -1
  662. package/build-types/item-group/context.d.ts.map +1 -1
  663. package/build-types/item-group/item/component.d.ts +0 -1
  664. package/build-types/item-group/item/component.d.ts.map +1 -1
  665. package/build-types/item-group/item/hook.d.ts +10 -12
  666. package/build-types/item-group/item/hook.d.ts.map +1 -1
  667. package/build-types/item-group/item-group/component.d.ts +0 -1
  668. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  669. package/build-types/item-group/item-group/hook.d.ts +11 -13
  670. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  671. package/build-types/item-group/styles.d.ts +1 -1
  672. package/build-types/item-group/types.d.ts +0 -1
  673. package/build-types/item-group/types.d.ts.map +1 -1
  674. package/build-types/keyboard-shortcuts/index.d.ts +0 -1
  675. package/build-types/keyboard-shortcuts/index.d.ts.map +1 -1
  676. package/build-types/keyboard-shortcuts/types.d.ts +0 -1
  677. package/build-types/keyboard-shortcuts/types.d.ts.map +1 -1
  678. package/build-types/menu-group/index.d.ts +0 -1
  679. package/build-types/menu-group/index.d.ts.map +1 -1
  680. package/build-types/menu-item/index.d.ts +8 -9
  681. package/build-types/menu-item/index.d.ts.map +1 -1
  682. package/build-types/menu-item/stories/index.story.d.ts +32 -33
  683. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  684. package/build-types/menu-items-choice/index.d.ts +0 -1
  685. package/build-types/menu-items-choice/index.d.ts.map +1 -1
  686. package/build-types/modal/index.d.ts +0 -1
  687. package/build-types/modal/index.d.ts.map +1 -1
  688. package/build-types/navigable-container/container.d.ts +8 -8
  689. package/build-types/navigable-container/menu.d.ts +7 -7
  690. package/build-types/navigable-container/tabbable.d.ts +6 -6
  691. package/build-types/navigation/back-button/index.d.ts +0 -1
  692. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  693. package/build-types/navigation/context.d.ts +0 -1
  694. package/build-types/navigation/context.d.ts.map +1 -1
  695. package/build-types/navigation/group/context.d.ts +0 -1
  696. package/build-types/navigation/group/context.d.ts.map +1 -1
  697. package/build-types/navigation/group/index.d.ts +0 -1
  698. package/build-types/navigation/group/index.d.ts.map +1 -1
  699. package/build-types/navigation/index.d.ts +0 -1
  700. package/build-types/navigation/index.d.ts.map +1 -1
  701. package/build-types/navigation/item/base-content.d.ts +0 -1
  702. package/build-types/navigation/item/base-content.d.ts.map +1 -1
  703. package/build-types/navigation/item/base.d.ts +0 -1
  704. package/build-types/navigation/item/base.d.ts.map +1 -1
  705. package/build-types/navigation/item/index.d.ts +0 -1
  706. package/build-types/navigation/item/index.d.ts.map +1 -1
  707. package/build-types/navigation/menu/context.d.ts +0 -1
  708. package/build-types/navigation/menu/context.d.ts.map +1 -1
  709. package/build-types/navigation/menu/index.d.ts +0 -1
  710. package/build-types/navigation/menu/index.d.ts.map +1 -1
  711. package/build-types/navigation/menu/menu-title-search.d.ts +0 -1
  712. package/build-types/navigation/menu/menu-title-search.d.ts.map +1 -1
  713. package/build-types/navigation/menu/menu-title.d.ts +0 -1
  714. package/build-types/navigation/menu/menu-title.d.ts.map +1 -1
  715. package/build-types/navigation/menu/search-no-results-found.d.ts +0 -1
  716. package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -1
  717. package/build-types/navigation/styles/navigation-styles.d.ts +27 -28
  718. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  719. package/build-types/navigation/types.d.ts +0 -1
  720. package/build-types/navigation/types.d.ts.map +1 -1
  721. package/build-types/navigation/use-navigation-tree-nodes.d.ts +0 -1
  722. package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +1 -1
  723. package/build-types/navigator/context.d.ts +0 -1
  724. package/build-types/navigator/context.d.ts.map +1 -1
  725. package/build-types/navigator/navigator-back-button/component.d.ts +17 -18
  726. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  727. package/build-types/navigator/navigator-back-button/hook.d.ts +29 -31
  728. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  729. package/build-types/navigator/navigator-button/component.d.ts +18 -19
  730. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  731. package/build-types/navigator/navigator-button/hook.d.ts +29 -31
  732. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  733. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  734. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  735. package/build-types/navigator/navigator-screen/component.d.ts +0 -1
  736. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  737. package/build-types/navigator/navigator-to-parent-button/component.d.ts +17 -18
  738. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  739. package/build-types/navigator/stories/index.story.d.ts +4 -4
  740. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  741. package/build-types/notice/index.d.ts +0 -1
  742. package/build-types/notice/index.d.ts.map +1 -1
  743. package/build-types/notice/list.d.ts +0 -1
  744. package/build-types/notice/list.d.ts.map +1 -1
  745. package/build-types/number-control/index.d.ts +12 -13
  746. package/build-types/number-control/index.d.ts.map +1 -1
  747. package/build-types/number-control/stories/index.story.d.ts +12 -13
  748. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  749. package/build-types/number-control/styles/number-control-styles.d.ts +2 -3
  750. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  751. package/build-types/palette-edit/index.d.ts +0 -1
  752. package/build-types/palette-edit/index.d.ts.map +1 -1
  753. package/build-types/palette-edit/styles.d.ts +18 -20
  754. package/build-types/palette-edit/styles.d.ts.map +1 -1
  755. package/build-types/panel/body.d.ts +0 -1
  756. package/build-types/panel/body.d.ts.map +1 -1
  757. package/build-types/panel/header.d.ts +0 -1
  758. package/build-types/panel/header.d.ts.map +1 -1
  759. package/build-types/panel/index.d.ts +0 -1
  760. package/build-types/panel/index.d.ts.map +1 -1
  761. package/build-types/panel/row.d.ts +0 -1
  762. package/build-types/panel/row.d.ts.map +1 -1
  763. package/build-types/panel/types.d.ts +0 -1
  764. package/build-types/panel/types.d.ts.map +1 -1
  765. package/build-types/placeholder/index.d.ts +0 -1
  766. package/build-types/placeholder/index.d.ts.map +1 -1
  767. package/build-types/popover/index.d.ts +0 -1
  768. package/build-types/popover/index.d.ts.map +1 -1
  769. package/build-types/popover/overlay-middlewares.d.ts +1 -11
  770. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  771. package/build-types/popover/stories/e2e/index.story.d.ts +0 -1
  772. package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
  773. package/build-types/popover/stories/index.story.d.ts +6 -6
  774. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  775. package/build-types/popover/test/utils/index.d.ts +0 -1
  776. package/build-types/popover/test/utils/index.d.ts.map +1 -1
  777. package/build-types/popover/utils.d.ts +3 -3
  778. package/build-types/popover/utils.d.ts.map +1 -1
  779. package/build-types/private-apis.d.ts.map +1 -1
  780. package/build-types/progress-bar/index.d.ts +0 -1
  781. package/build-types/progress-bar/index.d.ts.map +1 -1
  782. package/build-types/progress-bar/stories/index.story.d.ts +0 -1
  783. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  784. package/build-types/progress-bar/styles.d.ts +6 -7
  785. package/build-types/progress-bar/styles.d.ts.map +1 -1
  786. package/build-types/query-controls/author-select.d.ts +0 -1
  787. package/build-types/query-controls/author-select.d.ts.map +1 -1
  788. package/build-types/query-controls/category-select.d.ts +0 -1
  789. package/build-types/query-controls/category-select.d.ts.map +1 -1
  790. package/build-types/query-controls/index.d.ts +0 -1
  791. package/build-types/query-controls/index.d.ts.map +1 -1
  792. package/build-types/radio-control/index.d.ts +0 -1
  793. package/build-types/radio-control/index.d.ts.map +1 -1
  794. package/build-types/radio-control/stories/index.story.d.ts +1 -0
  795. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  796. package/build-types/radio-control/test/index.d.ts +2 -0
  797. package/build-types/radio-control/test/index.d.ts.map +1 -0
  798. package/build-types/radio-control/types.d.ts +4 -0
  799. package/build-types/radio-control/types.d.ts.map +1 -1
  800. package/build-types/radio-group/context.d.ts +2 -3
  801. package/build-types/radio-group/context.d.ts.map +1 -1
  802. package/build-types/radio-group/index.d.ts +0 -1
  803. package/build-types/radio-group/index.d.ts.map +1 -1
  804. package/build-types/radio-group/radio.d.ts +0 -1
  805. package/build-types/radio-group/radio.d.ts.map +1 -1
  806. package/build-types/radio-group/types.d.ts +0 -1
  807. package/build-types/radio-group/types.d.ts.map +1 -1
  808. package/build-types/range-control/index.d.ts +29 -29
  809. package/build-types/range-control/index.d.ts.map +1 -1
  810. package/build-types/range-control/input-range.d.ts +0 -1
  811. package/build-types/range-control/input-range.d.ts.map +1 -1
  812. package/build-types/range-control/mark.d.ts +0 -1
  813. package/build-types/range-control/mark.d.ts.map +1 -1
  814. package/build-types/range-control/rail.d.ts +0 -1
  815. package/build-types/range-control/rail.d.ts.map +1 -1
  816. package/build-types/range-control/styles/range-control-styles.d.ts +48 -49
  817. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  818. package/build-types/range-control/tooltip.d.ts +0 -1
  819. package/build-types/range-control/tooltip.d.ts.map +1 -1
  820. package/build-types/resizable-box/index.d.ts +7 -20
  821. package/build-types/resizable-box/index.d.ts.map +1 -1
  822. package/build-types/resizable-box/resize-tooltip/label.d.ts +0 -1
  823. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  824. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +7 -8
  825. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  826. package/build-types/resizable-box/resize-tooltip/utils.d.ts +0 -1
  827. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  828. package/build-types/resizable-box/stories/index.story.d.ts +32 -39
  829. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  830. package/build-types/responsive-wrapper/index.d.ts +0 -1
  831. package/build-types/responsive-wrapper/index.d.ts.map +1 -1
  832. package/build-types/responsive-wrapper/types.d.ts +0 -1
  833. package/build-types/responsive-wrapper/types.d.ts.map +1 -1
  834. package/build-types/sandbox/index.d.ts +0 -1
  835. package/build-types/sandbox/index.d.ts.map +1 -1
  836. package/build-types/sandbox/types.d.ts +0 -1
  837. package/build-types/sandbox/types.d.ts.map +1 -1
  838. package/build-types/scrollable/component.d.ts +0 -1
  839. package/build-types/scrollable/component.d.ts.map +1 -1
  840. package/build-types/scrollable/hook.d.ts +9 -11
  841. package/build-types/scrollable/hook.d.ts.map +1 -1
  842. package/build-types/search-control/index.d.ts +0 -1
  843. package/build-types/search-control/index.d.ts.map +1 -1
  844. package/build-types/search-control/stories/index.story.d.ts +0 -1
  845. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  846. package/build-types/search-control/styles.d.ts +3 -4
  847. package/build-types/search-control/styles.d.ts.map +1 -1
  848. package/build-types/search-control/types.d.ts +0 -1
  849. package/build-types/search-control/types.d.ts.map +1 -1
  850. package/build-types/select-control/chevron-down.d.ts +0 -1
  851. package/build-types/select-control/chevron-down.d.ts.map +1 -1
  852. package/build-types/select-control/index.d.ts +4 -2
  853. package/build-types/select-control/index.d.ts.map +1 -1
  854. package/build-types/select-control/stories/index.story.d.ts +9 -3
  855. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  856. package/build-types/select-control/styles/select-control-styles.d.ts +7 -8
  857. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  858. package/build-types/select-control/types.d.ts +33 -27
  859. package/build-types/select-control/types.d.ts.map +1 -1
  860. package/build-types/shortcut/index.d.ts +0 -1
  861. package/build-types/shortcut/index.d.ts.map +1 -1
  862. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -1
  863. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  864. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -1
  865. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  866. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -1
  867. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  868. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -2
  869. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  870. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  871. package/build-types/slot-fill/context.d.ts +0 -1
  872. package/build-types/slot-fill/context.d.ts.map +1 -1
  873. package/build-types/slot-fill/index.d.ts +4 -4
  874. package/build-types/slot-fill/index.d.ts.map +1 -1
  875. package/build-types/slot-fill/provider.d.ts +0 -1
  876. package/build-types/slot-fill/provider.d.ts.map +1 -1
  877. package/build-types/slot-fill/slot.d.ts +1 -2
  878. package/build-types/slot-fill/slot.d.ts.map +1 -1
  879. package/build-types/slot-fill/use-slot.d.ts +0 -1
  880. package/build-types/slot-fill/use-slot.d.ts.map +1 -1
  881. package/build-types/snackbar/index.d.ts +5 -6
  882. package/build-types/snackbar/index.d.ts.map +1 -1
  883. package/build-types/snackbar/list.d.ts +0 -1
  884. package/build-types/snackbar/list.d.ts.map +1 -1
  885. package/build-types/spacer/component.d.ts +0 -1
  886. package/build-types/spacer/component.d.ts.map +1 -1
  887. package/build-types/spacer/hook.d.ts +9 -11
  888. package/build-types/spacer/hook.d.ts.map +1 -1
  889. package/build-types/spinner/styles.d.ts +6 -7
  890. package/build-types/spinner/styles.d.ts.map +1 -1
  891. package/build-types/style-provider/index.d.ts +0 -1
  892. package/build-types/style-provider/index.d.ts.map +1 -1
  893. package/build-types/surface/component.d.ts +0 -1
  894. package/build-types/surface/component.d.ts.map +1 -1
  895. package/build-types/surface/hook.d.ts +10 -12
  896. package/build-types/surface/hook.d.ts.map +1 -1
  897. package/build-types/surface/types.d.ts +0 -1
  898. package/build-types/surface/types.d.ts.map +1 -1
  899. package/build-types/tab-panel/index.d.ts +0 -1
  900. package/build-types/tab-panel/index.d.ts.map +1 -1
  901. package/build-types/tab-panel/stories/index.story.d.ts +0 -1
  902. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  903. package/build-types/tabs/context.d.ts +0 -1
  904. package/build-types/tabs/context.d.ts.map +1 -1
  905. package/build-types/tabs/index.d.ts +0 -1
  906. package/build-types/tabs/index.d.ts.map +1 -1
  907. package/build-types/tabs/styles.d.ts +12 -19
  908. package/build-types/tabs/styles.d.ts.map +1 -1
  909. package/build-types/tabs/tab.d.ts +0 -1
  910. package/build-types/tabs/tab.d.ts.map +1 -1
  911. package/build-types/tabs/tablist.d.ts +0 -1
  912. package/build-types/tabs/tablist.d.ts.map +1 -1
  913. package/build-types/tabs/tabpanel.d.ts +0 -1
  914. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  915. package/build-types/tabs/types.d.ts +0 -1
  916. package/build-types/tabs/types.d.ts.map +1 -1
  917. package/build-types/text/component.d.ts +0 -1
  918. package/build-types/text/component.d.ts.map +1 -1
  919. package/build-types/text/hook.d.ts +9 -9
  920. package/build-types/text/stories/index.story.d.ts +0 -1
  921. package/build-types/text/stories/index.story.d.ts.map +1 -1
  922. package/build-types/text/utils.d.ts +0 -1
  923. package/build-types/text/utils.d.ts.map +1 -1
  924. package/build-types/text-control/index.d.ts +3 -3
  925. package/build-types/text-control/index.d.ts.map +1 -1
  926. package/build-types/text-highlight/index.d.ts +0 -1
  927. package/build-types/text-highlight/index.d.ts.map +1 -1
  928. package/build-types/textarea-control/index.d.ts +2 -2
  929. package/build-types/textarea-control/index.d.ts.map +1 -1
  930. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +2 -3
  931. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
  932. package/build-types/theme/color-algorithms.d.ts +1 -9
  933. package/build-types/theme/color-algorithms.d.ts.map +1 -1
  934. package/build-types/theme/index.d.ts +0 -1
  935. package/build-types/theme/index.d.ts.map +1 -1
  936. package/build-types/theme/stories/index.story.d.ts +0 -1
  937. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  938. package/build-types/theme/styles.d.ts +2 -3
  939. package/build-types/theme/styles.d.ts.map +1 -1
  940. package/build-types/tip/index.d.ts +0 -1
  941. package/build-types/tip/index.d.ts.map +1 -1
  942. package/build-types/toggle-control/index.d.ts +3 -9
  943. package/build-types/toggle-control/index.d.ts.map +1 -1
  944. package/build-types/toggle-control/stories/index.story.d.ts +0 -1
  945. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  946. package/build-types/toggle-group-control/context.d.ts +0 -1
  947. package/build-types/toggle-group-control/context.d.ts.map +1 -1
  948. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +0 -1
  949. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  950. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +0 -1
  951. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  952. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +14 -10
  953. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  954. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +5 -6
  955. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  956. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +6 -2
  957. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  958. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -2
  959. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  960. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +5 -6
  961. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  962. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +14 -15
  963. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  964. package/build-types/toolbar/stories/index.story.d.ts +0 -1
  965. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  966. package/build-types/toolbar/toolbar/index.d.ts +0 -1
  967. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  968. package/build-types/toolbar/toolbar/toolbar-container.d.ts +0 -1
  969. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  970. package/build-types/toolbar/toolbar-button/index.d.ts +0 -1
  971. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  972. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +0 -1
  973. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
  974. package/build-types/toolbar/toolbar-context/index.d.ts +0 -1
  975. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  976. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +0 -1
  977. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  978. package/build-types/toolbar/toolbar-group/index.d.ts +0 -1
  979. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
  980. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +0 -1
  981. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
  982. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +1 -2
  983. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
  984. package/build-types/toolbar/toolbar-item/index.d.ts +2 -3
  985. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  986. package/build-types/tools-panel/context.d.ts +0 -1
  987. package/build-types/tools-panel/context.d.ts.map +1 -1
  988. package/build-types/tools-panel/styles.d.ts +2 -3
  989. package/build-types/tools-panel/styles.d.ts.map +1 -1
  990. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  991. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  992. package/build-types/tools-panel/tools-panel/hook.d.ts +10 -12
  993. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  994. package/build-types/tools-panel/tools-panel-header/component.d.ts +0 -1
  995. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  996. package/build-types/tools-panel/tools-panel-header/hook.d.ts +11 -13
  997. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  998. package/build-types/tools-panel/tools-panel-item/component.d.ts +3 -4
  999. package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
  1000. package/build-types/tools-panel/tools-panel-item/hook.d.ts +9 -11
  1001. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  1002. package/build-types/tooltip/index.d.ts +0 -1
  1003. package/build-types/tooltip/index.d.ts.map +1 -1
  1004. package/build-types/tooltip/stories/index.story.d.ts +0 -1
  1005. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  1006. package/build-types/tooltip/test/utils/index.d.ts +1 -5
  1007. package/build-types/tooltip/test/utils/index.d.ts.map +1 -1
  1008. package/build-types/tooltip/types.d.ts +0 -1
  1009. package/build-types/tooltip/types.d.ts.map +1 -1
  1010. package/build-types/tree-grid/cell.d.ts +0 -1
  1011. package/build-types/tree-grid/cell.d.ts.map +1 -1
  1012. package/build-types/tree-grid/index.d.ts +0 -1
  1013. package/build-types/tree-grid/index.d.ts.map +1 -1
  1014. package/build-types/tree-grid/item.d.ts +0 -1
  1015. package/build-types/tree-grid/item.d.ts.map +1 -1
  1016. package/build-types/tree-grid/roving-tab-index-context.d.ts +0 -1
  1017. package/build-types/tree-grid/roving-tab-index-context.d.ts.map +1 -1
  1018. package/build-types/tree-grid/roving-tab-index-item.d.ts +0 -1
  1019. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  1020. package/build-types/tree-grid/roving-tab-index.d.ts +0 -1
  1021. package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -1
  1022. package/build-types/tree-grid/row.d.ts +0 -1
  1023. package/build-types/tree-grid/row.d.ts.map +1 -1
  1024. package/build-types/tree-grid/stories/index.story.d.ts +0 -1
  1025. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  1026. package/build-types/tree-grid/types.d.ts +0 -1
  1027. package/build-types/tree-grid/types.d.ts.map +1 -1
  1028. package/build-types/tree-select/index.d.ts +1 -1
  1029. package/build-types/tree-select/index.d.ts.map +1 -1
  1030. package/build-types/truncate/component.d.ts +0 -1
  1031. package/build-types/truncate/component.d.ts.map +1 -1
  1032. package/build-types/truncate/hook.d.ts +9 -11
  1033. package/build-types/truncate/hook.d.ts.map +1 -1
  1034. package/build-types/truncate/utils.d.ts.map +1 -1
  1035. package/build-types/unit-control/index.d.ts +7 -8
  1036. package/build-types/unit-control/index.d.ts.map +1 -1
  1037. package/build-types/unit-control/styles/unit-control-styles.d.ts +17 -18
  1038. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  1039. package/build-types/unit-control/unit-select-control.d.ts +0 -1
  1040. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  1041. package/build-types/unit-control/utils.d.ts.map +1 -1
  1042. package/build-types/utils/breakpoint.d.ts +1 -10
  1043. package/build-types/utils/breakpoint.d.ts.map +1 -1
  1044. package/build-types/utils/config-values.d.ts +6 -0
  1045. package/build-types/utils/element-rect.d.ts +111 -0
  1046. package/build-types/utils/element-rect.d.ts.map +1 -0
  1047. package/build-types/utils/font.d.ts +1 -6
  1048. package/build-types/utils/font.d.ts.map +1 -1
  1049. package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
  1050. package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
  1051. package/build-types/utils/hooks/use-controlled-value.d.ts +0 -1
  1052. package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
  1053. package/build-types/utils/hooks/use-event.d.ts +20 -0
  1054. package/build-types/utils/hooks/use-event.d.ts.map +1 -0
  1055. package/build-types/utils/hooks/use-on-value-update.d.ts +19 -0
  1056. package/build-types/utils/hooks/use-on-value-update.d.ts.map +1 -0
  1057. package/build-types/utils/hooks/use-update-effect.d.ts +1 -1
  1058. package/build-types/utils/math.d.ts.map +1 -1
  1059. package/build-types/utils/rtl.d.ts +2 -2
  1060. package/build-types/utils/values.d.ts +2 -2
  1061. package/build-types/utils/values.d.ts.map +1 -1
  1062. package/build-types/utils/with-ignore-ime-events.d.ts +0 -1
  1063. package/build-types/utils/with-ignore-ime-events.d.ts.map +1 -1
  1064. package/build-types/v-stack/component.d.ts +2 -3
  1065. package/build-types/v-stack/component.d.ts.map +1 -1
  1066. package/build-types/v-stack/hook.d.ts +9 -11
  1067. package/build-types/v-stack/hook.d.ts.map +1 -1
  1068. package/build-types/v-stack/stories/index.story.d.ts +2 -3
  1069. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  1070. package/build-types/view/component.d.ts +0 -2
  1071. package/build-types/view/component.d.ts.map +1 -1
  1072. package/build-types/visually-hidden/component.d.ts +0 -1
  1073. package/build-types/visually-hidden/component.d.ts.map +1 -1
  1074. package/build-types/z-stack/component.d.ts +0 -1
  1075. package/build-types/z-stack/component.d.ts.map +1 -1
  1076. package/build-types/z-stack/styles.d.ts +4 -5
  1077. package/build-types/z-stack/styles.d.ts.map +1 -1
  1078. package/package.json +20 -21
  1079. package/src/alignment-matrix-control/test/index.tsx +1 -3
  1080. package/src/autocomplete/README.md +2 -2
  1081. package/src/autocomplete/autocompleter-ui.tsx +2 -0
  1082. package/src/autocomplete/style.scss +0 -6
  1083. package/src/autocomplete/types.ts +2 -3
  1084. package/src/base-control/README.md +1 -1
  1085. package/src/base-control/styles/base-control-styles.ts +1 -1
  1086. package/src/base-control/types.ts +1 -1
  1087. package/src/border-control/styles.ts +0 -5
  1088. package/src/button/README.md +1 -1
  1089. package/src/button/index.tsx +9 -7
  1090. package/src/button/stories/e2e/index.story.tsx +103 -21
  1091. package/src/button/style.scss +49 -21
  1092. package/src/button/test/index.tsx +35 -44
  1093. package/src/button/types.ts +9 -2
  1094. package/src/card/card/README.md +1 -1
  1095. package/src/card/stories/index.story.tsx +43 -42
  1096. package/src/checkbox-control/README.md +8 -0
  1097. package/src/checkbox-control/index.tsx +1 -0
  1098. package/src/checkbox-control/style.scss +3 -1
  1099. package/src/circular-option-picker/test/index.tsx +1 -4
  1100. package/src/color-palette/index.tsx +22 -20
  1101. package/src/color-picker/component.tsx +12 -22
  1102. package/src/color-picker/stories/index.story.tsx +2 -22
  1103. package/src/combobox-control/README.md +9 -0
  1104. package/src/combobox-control/index.tsx +11 -0
  1105. package/src/combobox-control/test/index.tsx +127 -1
  1106. package/src/composite/legacy/test/index.tsx +2 -18
  1107. package/src/custom-select-control/README.md +34 -32
  1108. package/src/custom-select-control/index.tsx +206 -0
  1109. package/src/custom-select-control/stories/index.story.tsx +26 -18
  1110. package/src/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.tsx +90 -77
  1111. package/src/custom-select-control/types.ts +123 -0
  1112. package/src/custom-select-control-v2/custom-select.tsx +2 -0
  1113. package/src/custom-select-control-v2/index.tsx +26 -1
  1114. package/src/custom-select-control-v2/stories/{default.story.tsx → index.story.tsx} +1 -1
  1115. package/src/custom-select-control-v2/styles.ts +29 -3
  1116. package/src/custom-select-control-v2/test/index.tsx +15 -19
  1117. package/src/custom-select-control-v2/types.ts +0 -109
  1118. package/src/date-time/index.ts +1 -2
  1119. package/src/date-time/stories/time.story.tsx +17 -0
  1120. package/src/date-time/time/index.tsx +46 -16
  1121. package/src/date-time/time/styles.ts +1 -0
  1122. package/src/date-time/{time-input → time/time-input}/index.tsx +9 -9
  1123. package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -0
  1124. package/src/disabled/README.md +1 -1
  1125. package/src/dropdown/stories/index.story.tsx +55 -50
  1126. package/src/dropdown-menu/stories/index.story.tsx +52 -55
  1127. package/src/dropdown-menu-v2/stories/index.story.tsx +0 -12
  1128. package/src/dropdown-menu-v2/styles.ts +18 -17
  1129. package/src/dropdown-menu-v2/test/index.tsx +1 -4
  1130. package/src/focal-point-picker/README.md +9 -0
  1131. package/src/focal-point-picker/index.tsx +1 -0
  1132. package/src/font-size-picker/README.md +1 -1
  1133. package/src/font-size-picker/font-size-picker-select.tsx +3 -3
  1134. package/src/font-size-picker/index.tsx +68 -64
  1135. package/src/font-size-picker/test/index.tsx +128 -53
  1136. package/src/font-size-picker/types.ts +6 -5
  1137. package/src/form-toggle/index.tsx +23 -21
  1138. package/src/form-toggle/style.scss +14 -9
  1139. package/src/form-token-field/README.md +2 -1
  1140. package/src/form-token-field/index.tsx +9 -0
  1141. package/src/form-token-field/stories/index.story.tsx +2 -0
  1142. package/src/guide/index.tsx +2 -0
  1143. package/src/heading/types.ts +1 -4
  1144. package/src/higher-order/navigate-regions/style.scss +3 -15
  1145. package/src/index.ts +1 -1
  1146. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  1147. package/src/modal/index.tsx +21 -20
  1148. package/src/navigator/stories/index.story.tsx +240 -242
  1149. package/src/notice/test/__snapshots__/index.tsx.snap +1 -1
  1150. package/src/placeholder/style.scss +11 -2
  1151. package/src/popover/stories/index.story.tsx +155 -153
  1152. package/src/private-apis.ts +0 -4
  1153. package/src/query-controls/index.tsx +5 -1
  1154. package/src/radio-control/index.tsx +48 -7
  1155. package/src/radio-control/stories/index.story.tsx +23 -0
  1156. package/src/radio-control/style.scss +32 -3
  1157. package/src/radio-control/test/index.tsx +274 -0
  1158. package/src/radio-control/types.ts +4 -0
  1159. package/src/range-control/README.md +8 -0
  1160. package/src/range-control/index.tsx +1 -0
  1161. package/src/resizable-box/resize-tooltip/README.md +1 -1
  1162. package/src/select-control/README.md +16 -1
  1163. package/src/select-control/index.tsx +40 -22
  1164. package/src/select-control/stories/index.story.tsx +6 -0
  1165. package/src/select-control/styles/select-control-styles.ts +24 -1
  1166. package/src/select-control/test/select-control.tsx +148 -4
  1167. package/src/select-control/types.ts +76 -65
  1168. package/src/style.scss +1 -1
  1169. package/src/tab-panel/test/index.tsx +1 -8
  1170. package/src/tabs/styles.ts +10 -2
  1171. package/src/tabs/tablist.tsx +3 -243
  1172. package/src/tabs/test/index.tsx +68 -84
  1173. package/src/text-control/README.md +1 -0
  1174. package/src/text-control/index.tsx +1 -0
  1175. package/src/text-control/style.scss +5 -0
  1176. package/src/textarea-control/README.md +8 -0
  1177. package/src/textarea-control/index.tsx +1 -0
  1178. package/src/toggle-control/README.md +9 -0
  1179. package/src/toggle-control/index.tsx +37 -25
  1180. package/src/toggle-control/style.scss +12 -0
  1181. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +42 -12
  1182. package/src/toggle-group-control/test/index.tsx +112 -4
  1183. package/src/toggle-group-control/toggle-group-control/README.md +13 -1
  1184. package/src/toggle-group-control/toggle-group-control/component.tsx +6 -1
  1185. package/src/toggle-group-control/toggle-group-control-option/README.md +6 -1
  1186. package/src/toggle-group-control/toggle-group-control-option/component.tsx +6 -1
  1187. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +6 -1
  1188. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +5 -0
  1189. package/src/toggle-group-control/toggle-group-control-option-icon/README.md +1 -1
  1190. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +14 -14
  1191. package/src/tools-panel/tools-panel-header/component.tsx +1 -1
  1192. package/src/tooltip/index.tsx +15 -2
  1193. package/src/tooltip/test/index.tsx +0 -5
  1194. package/src/tooltip/test/utils/index.tsx +5 -5
  1195. package/src/tree-select/README.md +9 -0
  1196. package/src/tree-select/index.tsx +1 -1
  1197. package/src/utils/config-values.js +6 -0
  1198. package/src/utils/element-rect.ts +197 -0
  1199. package/src/utils/hooks/use-event.ts +38 -0
  1200. package/src/utils/hooks/use-on-value-update.ts +42 -0
  1201. package/tsconfig.tsbuildinfo +1 -1
  1202. package/build/custom-select-control-v2/default-component/index.js +0 -42
  1203. package/build/custom-select-control-v2/default-component/index.js.map +0 -1
  1204. package/build/custom-select-control-v2/legacy-component/index.js +0 -131
  1205. package/build/custom-select-control-v2/legacy-component/index.js.map +0 -1
  1206. package/build/date-time/time-input/index.js.map +0 -1
  1207. package/build-module/custom-select-control-v2/default-component/index.js +0 -31
  1208. package/build-module/custom-select-control-v2/default-component/index.js.map +0 -1
  1209. package/build-module/custom-select-control-v2/legacy-component/index.js +0 -122
  1210. package/build-module/custom-select-control-v2/legacy-component/index.js.map +0 -1
  1211. package/build-module/date-time/time-input/index.js.map +0 -1
  1212. package/build-types/custom-select-control-v2/default-component/index.d.ts +0 -9
  1213. package/build-types/custom-select-control-v2/default-component/index.d.ts.map +0 -1
  1214. package/build-types/custom-select-control-v2/legacy-component/index.d.ts +0 -5
  1215. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +0 -1
  1216. package/build-types/custom-select-control-v2/legacy-component/test/index.d.ts.map +0 -1
  1217. package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +0 -1
  1218. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts +0 -14
  1219. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +0 -1
  1220. package/build-types/date-time/stories/time-input.story.d.ts +0 -12
  1221. package/build-types/date-time/stories/time-input.story.d.ts.map +0 -1
  1222. package/build-types/date-time/time-input/index.d.ts.map +0 -1
  1223. package/build-types/date-time/time-input/test/index.d.ts.map +0 -1
  1224. package/src/custom-select-control/index.js +0 -240
  1225. package/src/custom-select-control/style.scss +0 -75
  1226. package/src/custom-select-control/test/index.js +0 -665
  1227. package/src/custom-select-control-v2/default-component/index.tsx +0 -29
  1228. package/src/custom-select-control-v2/legacy-component/index.tsx +0 -153
  1229. package/src/custom-select-control-v2/stories/legacy.story.tsx +0 -72
  1230. package/src/date-time/stories/time-input.story.tsx +0 -36
  1231. /package/build-types/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.d.ts +0 -0
  1232. /package/build-types/date-time/{time-input → time/time-input}/test/index.d.ts +0 -0
  1233. /package/src/date-time/{time-input → time/time-input}/test/index.tsx +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_compose","_i18n","_icons","_dom","ariaHelper","_interopRequireWildcard","_button","_styleProvider","_withIgnoreImeEvents","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalContext","createContext","bodyOpenClasses","Map","UnforwardedModal","props","forwardedRef","bodyOpenClassName","role","title","focusOnMount","shouldCloseOnEsc","shouldCloseOnClickOutside","isDismissible","aria","labelledby","undefined","describedby","onRequestClose","icon","closeButtonLabel","children","style","overlayClassName","className","contentLabel","onKeyDown","isFullScreen","size","headerActions","__experimentalHideHeader","ref","useRef","instanceId","useInstanceId","Modal","headingId","focusOnMountRef","useFocusOnMount","constrainedTabbingRef","useConstrainedTabbing","focusReturnRef","useFocusReturn","contentRef","childrenContainerRef","hasScrolledContent","setHasScrolledContent","useState","hasScrollableContent","setHasScrollableContent","sizeClass","isContentScrollable","useCallback","current","closestScrollContainer","getScrollContainer","useEffect","modalize","unmodalize","refOnRequestClose","dismissers","useContext","nestedDismissers","push","first","second","nested","shift","_bodyOpenClasses$get","theClass","oneMore","document","body","classList","add","oneLess","remove","delete","useLayoutEffect","window","ResizeObserver","resizeObserver","observe","disconnect","handleEscapeKeyDown","event","code","key","defaultPrevented","preventDefault","onContentContainerScroll","_e$currentTarget$scro","scrollY","currentTarget","scrollTop","pressTarget","overlayPressHandlers","onPointerDown","target","onPointerUp","button","isSameTarget","modal","jsx","useMergeRefs","clsx","withIgnoreIMEEvents","tabIndex","jsxs","onScroll","__","id","onClick","close","label","createPortal","Provider","value","exports","forwardRef","_default"],"sources":["@wordpress/components/src/modal/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type {\n\tForwardedRef,\n\tKeyboardEvent,\n\tMutableRefObject,\n\tUIEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreatePortal,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tforwardRef,\n\tuseLayoutEffect,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport {\n\tuseInstanceId,\n\tuseFocusReturn,\n\tuseFocusOnMount,\n\tuseConstrainedTabbing,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport type { ModalProps } from './types';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\nconst ModalContext = createContext<\n\tMutableRefObject< ModalProps[ 'onRequestClose' ] | undefined >[]\n>( [] );\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map< string, number >();\n\nfunction UnforwardedModal(\n\tprops: ModalProps,\n\tforwardedRef: ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbodyOpenClassName = 'modal-open',\n\t\trole = 'dialog',\n\t\ttitle = null,\n\t\tfocusOnMount = true,\n\t\tshouldCloseOnEsc = true,\n\t\tshouldCloseOnClickOutside = true,\n\t\tisDismissible = true,\n\t\t/* Accessibility. */\n\t\taria = {\n\t\t\tlabelledby: undefined,\n\t\t\tdescribedby: undefined,\n\t\t},\n\t\tonRequestClose,\n\t\ticon,\n\t\tcloseButtonLabel,\n\t\tchildren,\n\t\tstyle,\n\t\toverlayClassName,\n\t\tclassName,\n\t\tcontentLabel,\n\t\tonKeyDown,\n\t\tisFullScreen = false,\n\t\tsize,\n\t\theaderActions = null,\n\t\t__experimentalHideHeader = false,\n\t} = props;\n\n\tconst ref = useRef< HTMLDivElement >();\n\n\tconst instanceId = useInstanceId( Modal );\n\tconst headingId = title\n\t\t? `components-modal-header-${ instanceId }`\n\t\t: aria.labelledby;\n\n\t// The focus hook does not support 'firstContentElement' but this is a valid\n\t// value for the Modal's focusOnMount prop. The following code ensures the focus\n\t// hook will focus the first focusable node within the element to which it is applied.\n\t// When `firstContentElement` is passed as the value of the focusOnMount prop,\n\t// the focus hook is applied to the Modal's content element.\n\t// Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n\t// focus hook will focus the first element in the Modal's **content** when\n\t// `firstContentElement` is passed.\n\tconst focusOnMountRef = useFocusOnMount(\n\t\tfocusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount\n\t);\n\tconst constrainedTabbingRef = useConstrainedTabbing();\n\tconst focusReturnRef = useFocusReturn();\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst childrenContainerRef = useRef< HTMLDivElement >( null );\n\n\tconst [ hasScrolledContent, setHasScrolledContent ] = useState( false );\n\tconst [ hasScrollableContent, setHasScrollableContent ] = useState( false );\n\n\tlet sizeClass;\n\tif ( isFullScreen || size === 'fill' ) {\n\t\tsizeClass = 'is-full-screen';\n\t} else if ( size ) {\n\t\tsizeClass = `has-size-${ size }`;\n\t}\n\n\t// Determines whether the Modal content is scrollable and updates the state.\n\tconst isContentScrollable = useCallback( () => {\n\t\tif ( ! contentRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestScrollContainer = getScrollContainer( contentRef.current );\n\n\t\tif ( contentRef.current === closestScrollContainer ) {\n\t\t\tsetHasScrollableContent( true );\n\t\t} else {\n\t\t\tsetHasScrollableContent( false );\n\t\t}\n\t}, [ contentRef ] );\n\n\t// Accessibly isolates/unisolates the modal.\n\tuseEffect( () => {\n\t\tariaHelper.modalize( ref.current );\n\t\treturn () => ariaHelper.unmodalize();\n\t}, [] );\n\n\t// Keeps a fresh ref for the subsequent effect.\n\tconst refOnRequestClose = useRef< ModalProps[ 'onRequestClose' ] >();\n\tuseEffect( () => {\n\t\trefOnRequestClose.current = onRequestClose;\n\t}, [ onRequestClose ] );\n\n\t// The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n\t// one should remain open at a time and the list enables closing prior ones.\n\tconst dismissers = useContext( ModalContext );\n\t// Used for the tracking and dismissing any nested modals.\n\tconst nestedDismissers = useRef< typeof dismissers >( [] );\n\n\t// Updates the stack tracking open modals at this level and calls\n\t// onRequestClose for any prior and/or nested modals as applicable.\n\tuseEffect( () => {\n\t\tdismissers.push( refOnRequestClose );\n\t\tconst [ first, second ] = dismissers;\n\t\tif ( second ) {\n\t\t\tfirst?.current?.();\n\t\t}\n\n\t\tconst nested = nestedDismissers.current;\n\t\treturn () => {\n\t\t\tnested[ 0 ]?.current?.();\n\t\t\tdismissers.shift();\n\t\t};\n\t}, [ dismissers ] );\n\n\t// Adds/removes the value of bodyOpenClassName to body element.\n\tuseEffect( () => {\n\t\tconst theClass = bodyOpenClassName;\n\t\tconst oneMore = 1 + ( bodyOpenClasses.get( theClass ) ?? 0 );\n\t\tbodyOpenClasses.set( theClass, oneMore );\n\t\tdocument.body.classList.add( bodyOpenClassName );\n\t\treturn () => {\n\t\t\tconst oneLess = bodyOpenClasses.get( theClass )! - 1;\n\t\t\tif ( oneLess === 0 ) {\n\t\t\t\tdocument.body.classList.remove( theClass );\n\t\t\t\tbodyOpenClasses.delete( theClass );\n\t\t\t} else {\n\t\t\t\tbodyOpenClasses.set( theClass, oneLess );\n\t\t\t}\n\t\t};\n\t}, [ bodyOpenClassName ] );\n\n\t// Calls the isContentScrollable callback when the Modal children container resizes.\n\tuseLayoutEffect( () => {\n\t\tif ( ! window.ResizeObserver || ! childrenContainerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver( isContentScrollable );\n\t\tresizeObserver.observe( childrenContainerRef.current );\n\n\t\tisContentScrollable();\n\n\t\treturn () => {\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, [ isContentScrollable, childrenContainerRef ] );\n\n\tfunction handleEscapeKeyDown( event: KeyboardEvent< HTMLDivElement > ) {\n\t\tif (\n\t\t\tshouldCloseOnEsc &&\n\t\t\t( event.code === 'Escape' || event.key === 'Escape' ) &&\n\t\t\t! event.defaultPrevented\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tif ( onRequestClose ) {\n\t\t\t\tonRequestClose( event );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onContentContainerScroll = useCallback(\n\t\t( e: UIEvent< HTMLDivElement > ) => {\n\t\t\tconst scrollY = e?.currentTarget?.scrollTop ?? -1;\n\n\t\t\tif ( ! hasScrolledContent && scrollY > 0 ) {\n\t\t\t\tsetHasScrolledContent( true );\n\t\t\t} else if ( hasScrolledContent && scrollY <= 0 ) {\n\t\t\t\tsetHasScrolledContent( false );\n\t\t\t}\n\t\t},\n\t\t[ hasScrolledContent ]\n\t);\n\n\tlet pressTarget: EventTarget | null = null;\n\tconst overlayPressHandlers: {\n\t\tonPointerDown: React.PointerEventHandler< HTMLDivElement >;\n\t\tonPointerUp: React.PointerEventHandler< HTMLDivElement >;\n\t} = {\n\t\tonPointerDown: ( event ) => {\n\t\t\tif ( event.target === event.currentTarget ) {\n\t\t\t\tpressTarget = event.target;\n\t\t\t\t// Avoids focus changing so that focus return works as expected.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t// Closes the modal with two exceptions. 1. Opening the context menu on\n\t\t// the overlay. 2. Pressing on the overlay then dragging the pointer\n\t\t// over the modal and releasing. Due to the modal being a child of the\n\t\t// overlay, such a gesture is a `click` on the overlay and cannot be\n\t\t// excepted by a `click` handler. Thus the tactic of handling\n\t\t// `pointerup` and comparing its target to that of the `pointerdown`.\n\t\tonPointerUp: ( { target, button } ) => {\n\t\t\tconst isSameTarget = target === pressTarget;\n\t\t\tpressTarget = null;\n\t\t\tif ( button === 0 && isSameTarget ) {\n\t\t\t\tonRequestClose();\n\t\t\t}\n\t\t},\n\t};\n\n\tconst modal = (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-modal__screen-overlay',\n\t\t\t\toverlayClassName\n\t\t\t) }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( handleEscapeKeyDown ) }\n\t\t\t{ ...( shouldCloseOnClickOutside ? overlayPressHandlers : {} ) }\n\t\t>\n\t\t\t<StyleProvider document={ document }>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tsizeClass,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\tconstrainedTabbingRef,\n\t\t\t\t\t\tfocusReturnRef,\n\t\t\t\t\t\tfocusOnMount !== 'firstContentElement'\n\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t] ) }\n\t\t\t\t\trole={ role }\n\t\t\t\t\taria-label={ contentLabel }\n\t\t\t\t\taria-labelledby={ contentLabel ? undefined : headingId }\n\t\t\t\t\taria-describedby={ aria.describedby }\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<div\n\t\t\t\t\t\tclassName={ clsx( 'components-modal__content', {\n\t\t\t\t\t\t\t'hide-header': __experimentalHideHeader,\n\t\t\t\t\t\t\t'is-scrollable': hasScrollableContent,\n\t\t\t\t\t\t\t'has-scrolled-content': hasScrolledContent,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\trole=\"document\"\n\t\t\t\t\t\tonScroll={ onContentContainerScroll }\n\t\t\t\t\t\tref={ contentRef }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\thasScrollableContent\n\t\t\t\t\t\t\t\t? __( 'Scrollable section' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttabIndex={ hasScrollableContent ? 0 : undefined }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! __experimentalHideHeader && (\n\t\t\t\t\t\t\t<div className=\"components-modal__header\">\n\t\t\t\t\t\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__icon-container\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ icon }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\t\t\t\t\tid={ headingId }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__header-heading\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{ headerActions }\n\t\t\t\t\t\t\t\t{ isDismissible && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={ onRequestClose }\n\t\t\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tcloseButtonLabel || __( 'Close' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\t\t\tchildrenContainerRef,\n\t\t\t\t\t\t\t\tfocusOnMount === 'firstContentElement'\n\t\t\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t] ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</StyleProvider>\n\t\t</div>\n\t);\n\n\treturn createPortal(\n\t\t<ModalContext.Provider value={ nestedDismissers.current }>\n\t\t\t{ modal }\n\t\t</ModalContext.Provider>,\n\t\tdocument.body\n\t);\n}\n\n/**\n * Modals give users information and choices related to a task they’re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef( UnforwardedModal );\n\nexport default Modal;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAWA,IAAAC,QAAA,GAAAD,OAAA;AAWA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAC,uBAAA,CAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,cAAA,GAAAV,sBAAA,CAAAC,OAAA;AAEA,IAAAU,oBAAA,GAAAV,OAAA;AAAsE,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAY,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,O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,GACnC2B,eAAe,GACf,IAAI,CACN,CAAG;YAAAhB,QAAA,EAEHA;UAAQ,CACN,CAAC;QAAA,CACF;MAAC,CACF;IAAC,CACQ;EAAC,CACZ,CACL;EAED,OAAO,IAAA8F,qBAAY,gBAClB,IAAAxI,WAAA,CAAA4H,GAAA,EAACvG,YAAY,CAACoH,QAAQ;IAACC,KAAK,EAAGvD,gBAAgB,CAACT,OAAS;IAAAhC,QAAA,EACtDiF;EAAK,CACe,CAAC,EACxB/B,QAAQ,CAACC,IACV,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMrC,KAAK,GAAAmF,OAAA,CAAAnF,KAAA,GAAG,IAAAoF,mBAAU,EAAEnH,gBAAiB,CAAC;AAAC,IAAAoH,QAAA,GAAAF,OAAA,CAAApI,OAAA,GAErCiD,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_compose","_i18n","_icons","_dom","ariaHelper","_interopRequireWildcard","_button","_styleProvider","_withIgnoreImeEvents","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalContext","createContext","Set","bodyOpenClasses","Map","UnforwardedModal","props","forwardedRef","bodyOpenClassName","role","title","focusOnMount","shouldCloseOnEsc","shouldCloseOnClickOutside","isDismissible","aria","labelledby","undefined","describedby","onRequestClose","icon","closeButtonLabel","children","style","overlayClassName","className","contentLabel","onKeyDown","isFullScreen","size","headerActions","__experimentalHideHeader","ref","useRef","instanceId","useInstanceId","Modal","headingId","focusOnMountRef","useFocusOnMount","constrainedTabbingRef","useConstrainedTabbing","focusReturnRef","useFocusReturn","contentRef","childrenContainerRef","hasScrolledContent","setHasScrolledContent","useState","hasScrollableContent","setHasScrollableContent","sizeClass","isContentScrollable","useCallback","current","closestScrollContainer","getScrollContainer","useEffect","modalize","unmodalize","refOnRequestClose","dismissers","useContext","nestedDismissers","add","dismisser","delete","_bodyOpenClasses$get","theClass","oneMore","document","body","classList","oneLess","remove","useLayoutEffect","window","ResizeObserver","resizeObserver","observe","disconnect","handleEscapeKeyDown","event","code","key","defaultPrevented","preventDefault","onContentContainerScroll","_e$currentTarget$scro","scrollY","currentTarget","scrollTop","pressTarget","overlayPressHandlers","onPointerDown","target","onPointerUp","button","isSameTarget","modal","jsx","useMergeRefs","clsx","withIgnoreIMEEvents","tabIndex","jsxs","onScroll","__","id","onClick","close","label","createPortal","Provider","value","exports","forwardRef","_default"],"sources":["@wordpress/components/src/modal/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef, KeyboardEvent, RefObject, UIEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreatePortal,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tforwardRef,\n\tuseLayoutEffect,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport {\n\tuseInstanceId,\n\tuseFocusReturn,\n\tuseFocusOnMount,\n\tuseConstrainedTabbing,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport type { ModalProps } from './types';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\ntype Dismissers = Set<\n\tRefObject< ModalProps[ 'onRequestClose' ] | undefined >\n>;\nconst ModalContext = createContext< Dismissers >( new Set() );\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map< string, number >();\n\nfunction UnforwardedModal(\n\tprops: ModalProps,\n\tforwardedRef: ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbodyOpenClassName = 'modal-open',\n\t\trole = 'dialog',\n\t\ttitle = null,\n\t\tfocusOnMount = true,\n\t\tshouldCloseOnEsc = true,\n\t\tshouldCloseOnClickOutside = true,\n\t\tisDismissible = true,\n\t\t/* Accessibility. */\n\t\taria = {\n\t\t\tlabelledby: undefined,\n\t\t\tdescribedby: undefined,\n\t\t},\n\t\tonRequestClose,\n\t\ticon,\n\t\tcloseButtonLabel,\n\t\tchildren,\n\t\tstyle,\n\t\toverlayClassName,\n\t\tclassName,\n\t\tcontentLabel,\n\t\tonKeyDown,\n\t\tisFullScreen = false,\n\t\tsize,\n\t\theaderActions = null,\n\t\t__experimentalHideHeader = false,\n\t} = props;\n\n\tconst ref = useRef< HTMLDivElement >();\n\n\tconst instanceId = useInstanceId( Modal );\n\tconst headingId = title\n\t\t? `components-modal-header-${ instanceId }`\n\t\t: aria.labelledby;\n\n\t// The focus hook does not support 'firstContentElement' but this is a valid\n\t// value for the Modal's focusOnMount prop. The following code ensures the focus\n\t// hook will focus the first focusable node within the element to which it is applied.\n\t// When `firstContentElement` is passed as the value of the focusOnMount prop,\n\t// the focus hook is applied to the Modal's content element.\n\t// Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n\t// focus hook will focus the first element in the Modal's **content** when\n\t// `firstContentElement` is passed.\n\tconst focusOnMountRef = useFocusOnMount(\n\t\tfocusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount\n\t);\n\tconst constrainedTabbingRef = useConstrainedTabbing();\n\tconst focusReturnRef = useFocusReturn();\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst childrenContainerRef = useRef< HTMLDivElement >( null );\n\n\tconst [ hasScrolledContent, setHasScrolledContent ] = useState( false );\n\tconst [ hasScrollableContent, setHasScrollableContent ] = useState( false );\n\n\tlet sizeClass;\n\tif ( isFullScreen || size === 'fill' ) {\n\t\tsizeClass = 'is-full-screen';\n\t} else if ( size ) {\n\t\tsizeClass = `has-size-${ size }`;\n\t}\n\n\t// Determines whether the Modal content is scrollable and updates the state.\n\tconst isContentScrollable = useCallback( () => {\n\t\tif ( ! contentRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestScrollContainer = getScrollContainer( contentRef.current );\n\n\t\tif ( contentRef.current === closestScrollContainer ) {\n\t\t\tsetHasScrollableContent( true );\n\t\t} else {\n\t\t\tsetHasScrollableContent( false );\n\t\t}\n\t}, [ contentRef ] );\n\n\t// Accessibly isolates/unisolates the modal.\n\tuseEffect( () => {\n\t\tariaHelper.modalize( ref.current );\n\t\treturn () => ariaHelper.unmodalize();\n\t}, [] );\n\n\t// Keeps a fresh ref for the subsequent effect.\n\tconst refOnRequestClose = useRef< ModalProps[ 'onRequestClose' ] >();\n\tuseEffect( () => {\n\t\trefOnRequestClose.current = onRequestClose;\n\t}, [ onRequestClose ] );\n\n\t// The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n\t// one should remain open at a time and the list enables closing prior ones.\n\tconst dismissers = useContext( ModalContext );\n\t// Used for the tracking and dismissing any nested modals.\n\tconst [ nestedDismissers ] = useState< Dismissers >( () => new Set() );\n\n\t// Updates the stack tracking open modals at this level and calls\n\t// onRequestClose for any prior and/or nested modals as applicable.\n\tuseEffect( () => {\n\t\t// add this modal instance to the dismissers set\n\t\tdismissers.add( refOnRequestClose );\n\t\t// request that all the other modals close themselves\n\t\tfor ( const dismisser of dismissers ) {\n\t\t\tif ( dismisser !== refOnRequestClose ) {\n\t\t\t\tdismisser.current?.();\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\t// request that all the nested modals close themselves\n\t\t\tfor ( const dismisser of nestedDismissers ) {\n\t\t\t\tdismisser.current?.();\n\t\t\t}\n\t\t\t// remove this modal instance from the dismissers set\n\t\t\tdismissers.delete( refOnRequestClose );\n\t\t};\n\t}, [ dismissers, nestedDismissers ] );\n\n\t// Adds/removes the value of bodyOpenClassName to body element.\n\tuseEffect( () => {\n\t\tconst theClass = bodyOpenClassName;\n\t\tconst oneMore = 1 + ( bodyOpenClasses.get( theClass ) ?? 0 );\n\t\tbodyOpenClasses.set( theClass, oneMore );\n\t\tdocument.body.classList.add( bodyOpenClassName );\n\t\treturn () => {\n\t\t\tconst oneLess = bodyOpenClasses.get( theClass )! - 1;\n\t\t\tif ( oneLess === 0 ) {\n\t\t\t\tdocument.body.classList.remove( theClass );\n\t\t\t\tbodyOpenClasses.delete( theClass );\n\t\t\t} else {\n\t\t\t\tbodyOpenClasses.set( theClass, oneLess );\n\t\t\t}\n\t\t};\n\t}, [ bodyOpenClassName ] );\n\n\t// Calls the isContentScrollable callback when the Modal children container resizes.\n\tuseLayoutEffect( () => {\n\t\tif ( ! window.ResizeObserver || ! childrenContainerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver( isContentScrollable );\n\t\tresizeObserver.observe( childrenContainerRef.current );\n\n\t\tisContentScrollable();\n\n\t\treturn () => {\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, [ isContentScrollable, childrenContainerRef ] );\n\n\tfunction handleEscapeKeyDown( event: KeyboardEvent< HTMLDivElement > ) {\n\t\tif (\n\t\t\tshouldCloseOnEsc &&\n\t\t\t( event.code === 'Escape' || event.key === 'Escape' ) &&\n\t\t\t! event.defaultPrevented\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tif ( onRequestClose ) {\n\t\t\t\tonRequestClose( event );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onContentContainerScroll = useCallback(\n\t\t( e: UIEvent< HTMLDivElement > ) => {\n\t\t\tconst scrollY = e?.currentTarget?.scrollTop ?? -1;\n\n\t\t\tif ( ! hasScrolledContent && scrollY > 0 ) {\n\t\t\t\tsetHasScrolledContent( true );\n\t\t\t} else if ( hasScrolledContent && scrollY <= 0 ) {\n\t\t\t\tsetHasScrolledContent( false );\n\t\t\t}\n\t\t},\n\t\t[ hasScrolledContent ]\n\t);\n\n\tlet pressTarget: EventTarget | null = null;\n\tconst overlayPressHandlers: {\n\t\tonPointerDown: React.PointerEventHandler< HTMLDivElement >;\n\t\tonPointerUp: React.PointerEventHandler< HTMLDivElement >;\n\t} = {\n\t\tonPointerDown: ( event ) => {\n\t\t\tif ( event.target === event.currentTarget ) {\n\t\t\t\tpressTarget = event.target;\n\t\t\t\t// Avoids focus changing so that focus return works as expected.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t// Closes the modal with two exceptions. 1. Opening the context menu on\n\t\t// the overlay. 2. Pressing on the overlay then dragging the pointer\n\t\t// over the modal and releasing. Due to the modal being a child of the\n\t\t// overlay, such a gesture is a `click` on the overlay and cannot be\n\t\t// excepted by a `click` handler. Thus the tactic of handling\n\t\t// `pointerup` and comparing its target to that of the `pointerdown`.\n\t\tonPointerUp: ( { target, button } ) => {\n\t\t\tconst isSameTarget = target === pressTarget;\n\t\t\tpressTarget = null;\n\t\t\tif ( button === 0 && isSameTarget ) {\n\t\t\t\tonRequestClose();\n\t\t\t}\n\t\t},\n\t};\n\n\tconst modal = (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-modal__screen-overlay',\n\t\t\t\toverlayClassName\n\t\t\t) }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( handleEscapeKeyDown ) }\n\t\t\t{ ...( shouldCloseOnClickOutside ? overlayPressHandlers : {} ) }\n\t\t>\n\t\t\t<StyleProvider document={ document }>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tsizeClass,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\tconstrainedTabbingRef,\n\t\t\t\t\t\tfocusReturnRef,\n\t\t\t\t\t\tfocusOnMount !== 'firstContentElement'\n\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t] ) }\n\t\t\t\t\trole={ role }\n\t\t\t\t\taria-label={ contentLabel }\n\t\t\t\t\taria-labelledby={ contentLabel ? undefined : headingId }\n\t\t\t\t\taria-describedby={ aria.describedby }\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<div\n\t\t\t\t\t\tclassName={ clsx( 'components-modal__content', {\n\t\t\t\t\t\t\t'hide-header': __experimentalHideHeader,\n\t\t\t\t\t\t\t'is-scrollable': hasScrollableContent,\n\t\t\t\t\t\t\t'has-scrolled-content': hasScrolledContent,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\trole=\"document\"\n\t\t\t\t\t\tonScroll={ onContentContainerScroll }\n\t\t\t\t\t\tref={ contentRef }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\thasScrollableContent\n\t\t\t\t\t\t\t\t? __( 'Scrollable section' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttabIndex={ hasScrollableContent ? 0 : undefined }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! __experimentalHideHeader && (\n\t\t\t\t\t\t\t<div className=\"components-modal__header\">\n\t\t\t\t\t\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__icon-container\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ icon }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\t\t\t\t\tid={ headingId }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__header-heading\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{ headerActions }\n\t\t\t\t\t\t\t\t{ isDismissible && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={ onRequestClose }\n\t\t\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tcloseButtonLabel || __( 'Close' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\t\t\tchildrenContainerRef,\n\t\t\t\t\t\t\t\tfocusOnMount === 'firstContentElement'\n\t\t\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t] ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</StyleProvider>\n\t\t</div>\n\t);\n\n\treturn createPortal(\n\t\t<ModalContext.Provider value={ nestedDismissers }>\n\t\t\t{ modal }\n\t\t</ModalContext.Provider>,\n\t\tdocument.body\n\t);\n}\n\n/**\n * Modals give users information and choices related to a task they’re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef( UnforwardedModal );\n\nexport default Modal;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAWA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAC,uBAAA,CAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,cAAA,GAAAV,sBAAA,CAAAC,OAAA;AAEA,IAAAU,oBAAA,GAAAV,OAAA;AAAsE,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAY,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GA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AQ,CAACC,IACV,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMnC,KAAK,GAAA+E,OAAA,CAAA/E,KAAA,GAAG,IAAAgF,mBAAU,EAAE/G,gBAAiB,CAAC;AAAC,IAAAgH,QAAA,GAAAF,OAAA,CAAAjI,OAAA,GAErCkD,KAAK","ignoreList":[]}
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.privateApis = void 0;
8
8
  var _v = require("./composite/v2");
9
- var _customSelectControl = _interopRequireDefault(require("./custom-select-control"));
10
- var _legacyComponent = _interopRequireDefault(require("./custom-select-control-v2/legacy-component"));
11
9
  var _utils = require("./popover/utils");
12
10
  var _slotFill = require("./slot-fill");
13
11
  var _dropdownMenuV = require("./dropdown-menu-v2");
@@ -27,8 +25,6 @@ const privateApis = exports.privateApis = {};
27
25
  CompositeItemV2: _v.CompositeItem,
28
26
  CompositeRowV2: _v.CompositeRow,
29
27
  useCompositeStoreV2: _v.useCompositeStore,
30
- CustomSelectControlV2Legacy: _legacyComponent.default,
31
- CustomSelectControl: _customSelectControl.default,
32
28
  __experimentalPopoverLegacyPositionToPlacement: _utils.positionToPlacement,
33
29
  createPrivateSlotFill: _slotFill.createPrivateSlotFill,
34
30
  ComponentsContext: _contextSystemProvider.ComponentsContext,
@@ -1 +1 @@
1
- {"version":3,"names":["_v","require","_customSelectControl","_interopRequireDefault","_legacyComponent","_utils","_slotFill","_dropdownMenuV","_contextSystemProvider","_theme","_tabs","_strings","_lockUnlock","privateApis","exports","lock","CompositeV2","CompositeGroupV2","CompositeItemV2","CompositeRowV2","useCompositeStoreV2","CustomSelectControlV2Legacy","CustomSelectControl","__experimentalPopoverLegacyPositionToPlacement","createPrivateSlotFill","ComponentsContext","Tabs","Theme","DropdownMenuV2","DropdownMenuGroupV2","DropdownMenuItemV2","DropdownMenuCheckboxItemV2","DropdownMenuRadioItemV2","DropdownMenuSeparatorV2","DropdownMenuItemLabelV2","DropdownMenuItemHelpTextV2","kebabCase"],"sources":["@wordpress/components/src/private-apis.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tComposite as CompositeV2,\n\tCompositeGroup as CompositeGroupV2,\n\tCompositeItem as CompositeItemV2,\n\tCompositeRow as CompositeRowV2,\n\tuseCompositeStore as useCompositeStoreV2,\n} from './composite/v2';\nimport { default as CustomSelectControl } from './custom-select-control';\nimport { default as CustomSelectControlV2Legacy } from './custom-select-control-v2/legacy-component';\nimport { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils';\nimport { createPrivateSlotFill } from './slot-fill';\nimport {\n\tDropdownMenu as DropdownMenuV2,\n\tDropdownMenuGroup as DropdownMenuGroupV2,\n\tDropdownMenuItem as DropdownMenuItemV2,\n\tDropdownMenuCheckboxItem as DropdownMenuCheckboxItemV2,\n\tDropdownMenuRadioItem as DropdownMenuRadioItemV2,\n\tDropdownMenuSeparator as DropdownMenuSeparatorV2,\n\tDropdownMenuItemLabel as DropdownMenuItemLabelV2,\n\tDropdownMenuItemHelpText as DropdownMenuItemHelpTextV2,\n} from './dropdown-menu-v2';\nimport { ComponentsContext } from './context/context-system-provider';\nimport Theme from './theme';\nimport Tabs from './tabs';\nimport { kebabCase } from './utils/strings';\nimport { lock } from './lock-unlock';\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCompositeV2,\n\tCompositeGroupV2,\n\tCompositeItemV2,\n\tCompositeRowV2,\n\tuseCompositeStoreV2,\n\tCustomSelectControlV2Legacy,\n\tCustomSelectControl,\n\t__experimentalPopoverLegacyPositionToPlacement,\n\tcreatePrivateSlotFill,\n\tComponentsContext,\n\tTabs,\n\tTheme,\n\tDropdownMenuV2,\n\tDropdownMenuGroupV2,\n\tDropdownMenuItemV2,\n\tDropdownMenuCheckbox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EAAvBA,oCAAuB;EACvBC,0BAA0B,EAA1BA,uCAA0B;EAC1BC,SAAS,EAATA;AACD,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_v","require","_utils","_slotFill","_dropdownMenuV","_contextSystemProvider","_theme","_interopRequireDefault","_tabs","_strings","_lockUnlock","privateApis","exports","lock","CompositeV2","CompositeGroupV2","CompositeItemV2","CompositeRowV2","useCompositeStoreV2","__experimentalPopoverLegacyPositionToPlacement","createPrivateSlotFill","ComponentsContext","Tabs","Theme","DropdownMenuV2","DropdownMenuGroupV2","DropdownMenuItemV2","DropdownMenuCheckboxItemV2","DropdownMenuRadioItemV2","DropdownMenuSeparatorV2","DropdownMenuItemLabelV2","DropdownMenuItemHelpTextV2","kebabCase"],"sources":["@wordpress/components/src/private-apis.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tComposite as CompositeV2,\n\tCompositeGroup as CompositeGroupV2,\n\tCompositeItem as CompositeItemV2,\n\tCompositeRow as CompositeRowV2,\n\tuseCompositeStore as useCompositeStoreV2,\n} from './composite/v2';\nimport { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils';\nimport { createPrivateSlotFill } from './slot-fill';\nimport {\n\tDropdownMenu as DropdownMenuV2,\n\tDropdownMenuGroup as DropdownMenuGroupV2,\n\tDropdownMenuItem as DropdownMenuItemV2,\n\tDropdownMenuCheckboxItem as DropdownMenuCheckboxItemV2,\n\tDropdownMenuRadioItem as DropdownMenuRadioItemV2,\n\tDropdownMenuSeparator as DropdownMenuSeparatorV2,\n\tDropdownMenuItemLabel as DropdownMenuItemLabelV2,\n\tDropdownMenuItemHelpText as DropdownMenuItemHelpTextV2,\n} from './dropdown-menu-v2';\nimport { ComponentsContext } from './context/context-system-provider';\nimport Theme from './theme';\nimport Tabs from './tabs';\nimport { kebabCase } from './utils/strings';\nimport { lock } from './lock-unlock';\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCompositeV2,\n\tCompositeGroupV2,\n\tCompositeItemV2,\n\tCompositeRowV2,\n\tuseCompositeStoreV2,\n\t__experimentalPopoverLegacyPositionToPlacement,\n\tcreatePrivateSlotFill,\n\tComponentsContext,\n\tTabs,\n\tTheme,\n\tDropdownMenuV2,\n\tDropdownMenuGroupV2,\n\tDropdownMenuItemV2,\n\tDropdownMenuCheckboxItemV2,\n\tDropdownMenuRadioItemV2,\n\tDropdownMenuSeparatorV2,\n\tDropdownMenuItemLabelV2,\n\tDropdownMenuItemHelpTextV2,\n\tkebabCase,\n} );\n"],"mappings":";;;;;;;AAGA,IAAAA,EAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAUA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,KAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AA1BA;AACA;AACA;;AA0BO,MAAMU,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,CAAC,CAAC;AAC7B,IAAAE,gBAAI,EAAEF,WAAW,EAAE;EAClBG,WAAW,EAAXA,YAAW;EACXC,gBAAgB,EAAhBA,iBAAgB;EAChBC,eAAe,EAAfA,gBAAe;EACfC,cAAc,EAAdA,eAAc;EACdC,mBAAmB,EAAnBA,oBAAmB;EACnBC,8CAA8C,EAA9CA,0BAA8C;EAC9CC,qBAAqB,EAArBA,+BAAqB;EACrBC,iBAAiB,EAAjBA,wCAAiB;EACjBC,IAAI,EAAJA,aAAI;EACJC,KAAK,EAALA,cAAK;EACLC,cAAc,EAAdA,2BAAc;EACdC,mBAAmB,EAAnBA,gCAAmB;EACnBC,kBAAkB,EAAlBA,+BAAkB;EAClBC,0BAA0B,EAA1BA,uCAA0B;EAC1BC,uBAAuB,EAAvBA,oCAAuB;EACvBC,uBAAuB,EAAvBA,oCAAuB;EACvBC,uBAAuB,EAAvBA,oCAAuB;EACvBC,0BAA0B,EAA1BA,uCAA0B;EAC1BC,SAAS,EAATA;AACD,CAAE,CAAC","ignoreList":[]}
@@ -81,7 +81,7 @@ function QueryControls({
81
81
  __nextHasNoMarginBottom: true,
82
82
  __next40pxDefaultSize: __next40pxDefaultSize,
83
83
  label: (0, _i18n.__)('Order by'),
84
- value: `${orderBy}/${order}`,
84
+ value: orderBy === undefined || order === undefined ? undefined : `${orderBy}/${order}`,
85
85
  options: [{
86
86
  label: (0, _i18n.__)('Newest to oldest'),
87
87
  value: 'date/desc'
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_authorSelect","_interopRequireDefault","_categorySelect","_formTokenField","_rangeControl","_selectControl","_vStack","_jsxRuntime","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","MAX_CATEGORIES_SUGGESTIONS","isSingleCategorySelection","props","isMultipleCategorySelection","QueryControls","__next40pxDefaultSize","authorList","selectedAuthorId","numberOfItems","order","orderBy","maxItems","minItems","onAuthorChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","jsx","VStack","spacing","className","children","default","__nextHasNoMarginBottom","label","__","value","options","onChange","newOrderBy","newOrder","split","categoriesList","onCategoryChange","noOptionLabel","_x","selectedCategoryId","categorySuggestions","selectedCategories","map","item","id","name","suggestions","Object","keys","maxSuggestions","min","max","required","_default","exports"],"sources":["@wordpress/components/src/query-controls/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AuthorSelect from './author-select';\nimport CategorySelect from './category-select';\nimport FormTokenField from '../form-token-field';\nimport RangeControl from '../range-control';\nimport SelectControl from '../select-control';\nimport { VStack } from '../v-stack';\nimport type {\n\tQueryControlsProps,\n\tQueryControlsWithMultipleCategorySelectionProps,\n\tQueryControlsWithSingleCategorySelectionProps,\n} from './types';\n\nconst DEFAULT_MIN_ITEMS = 1;\nconst DEFAULT_MAX_ITEMS = 100;\nconst MAX_CATEGORIES_SUGGESTIONS = 20;\n\nfunction isSingleCategorySelection(\n\tprops: QueryControlsProps\n): props is QueryControlsWithSingleCategorySelectionProps {\n\treturn 'categoriesList' in props;\n}\n\nfunction isMultipleCategorySelection(\n\tprops: QueryControlsProps\n): props is QueryControlsWithMultipleCategorySelectionProps {\n\treturn 'categorySuggestions' in props;\n}\n\n/**\n * Controls to query for posts.\n *\n * ```jsx\n * const MyQueryControls = () => (\n * <QueryControls\n * { ...{ maxItems, minItems, numberOfItems, order, orderBy } }\n * onOrderByChange={ ( newOrderBy ) => {\n * updateQuery( { orderBy: newOrderBy } )\n * }\n * onOrderChange={ ( newOrder ) => {\n * updateQuery( { order: newOrder } )\n * }\n * categoriesList={ categories }\n * selectedCategoryId={ category }\n * onCategoryChange={ ( newCategory ) => {\n * updateQuery( { category: newCategory } )\n * }\n * onNumberOfItemsChange={ ( newNumberOfItems ) => {\n * updateQuery( { numberOfItems: newNumberOfItems } )\n * } }\n * />\n * );\n * ```\n */\nexport function QueryControls( {\n\t__next40pxDefaultSize = false,\n\tauthorList,\n\tselectedAuthorId,\n\tnumberOfItems,\n\torder,\n\torderBy,\n\tmaxItems = DEFAULT_MAX_ITEMS,\n\tminItems = DEFAULT_MIN_ITEMS,\n\tonAuthorChange,\n\tonNumberOfItemsChange,\n\tonOrderChange,\n\tonOrderByChange,\n\t// Props for single OR multiple category selection are not destructured here,\n\t// but instead are destructured inline where necessary.\n\t...props\n}: QueryControlsProps ) {\n\treturn (\n\t\t<VStack spacing=\"4\" className=\"components-query-controls\">\n\t\t\t{ [\n\t\t\t\tonOrderChange && onOrderByChange && (\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\tkey=\"query-controls-order-select\"\n\t\t\t\t\t\tlabel={ __( 'Order by' ) }\n\t\t\t\t\t\tvalue={ `${ orderBy }/${ order }` }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Newest to oldest' ),\n\t\t\t\t\t\t\t\tvalue: 'date/desc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Oldest to newest' ),\n\t\t\t\t\t\t\t\tvalue: 'date/asc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\t\t\t\t\t\t\tlabel: __( 'A → Z' ),\n\t\t\t\t\t\t\t\tvalue: 'title/asc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\t\t\t\t\t\t\tlabel: __( 'Z → A' ),\n\t\t\t\t\t\t\t\tvalue: 'title/desc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tif ( typeof value !== 'string' ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\t\t\t\tif ( newOrder !== order ) {\n\t\t\t\t\t\t\t\tonOrderChange(\n\t\t\t\t\t\t\t\t\tnewOrder as NonNullable<\n\t\t\t\t\t\t\t\t\t\tQueryControlsProps[ 'order' ]\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( newOrderBy !== orderBy ) {\n\t\t\t\t\t\t\t\tonOrderByChange(\n\t\t\t\t\t\t\t\t\tnewOrderBy as NonNullable<\n\t\t\t\t\t\t\t\t\t\tQueryControlsProps[ 'orderBy' ]\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tisSingleCategorySelection( props ) &&\n\t\t\t\t\tprops.categoriesList &&\n\t\t\t\t\tprops.onCategoryChange && (\n\t\t\t\t\t\t<CategorySelect\n\t\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\t\tkey=\"query-controls-category-select\"\n\t\t\t\t\t\t\tcategoriesList={ props.categoriesList }\n\t\t\t\t\t\t\tlabel={ __( 'Category' ) }\n\t\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'categories' ) }\n\t\t\t\t\t\t\tselectedCategoryId={ props.selectedCategoryId }\n\t\t\t\t\t\t\tonChange={ props.onCategoryChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\tisMultipleCategorySelection( props ) &&\n\t\t\t\t\tprops.categorySuggestions &&\n\t\t\t\t\tprops.onCategoryChange && (\n\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tkey=\"query-controls-categories-select\"\n\t\t\t\t\t\t\tlabel={ __( 'Categories' ) }\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tprops.selectedCategories &&\n\t\t\t\t\t\t\t\tprops.selectedCategories.map( ( item ) => ( {\n\t\t\t\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\t\t\t\t// Keeping the fallback to `item.value` for legacy reasons,\n\t\t\t\t\t\t\t\t\t// even if items of `selectedCategories` should not have a\n\t\t\t\t\t\t\t\t\t// `value` property.\n\t\t\t\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\t\t\t\tvalue: item.name || item.value,\n\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ Object.keys(\n\t\t\t\t\t\t\t\tprops.categorySuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonChange={ props.onCategoryChange }\n\t\t\t\t\t\t\tmaxSuggestions={ MAX_CATEGORIES_SUGGESTIONS }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\tonAuthorChange && (\n\t\t\t\t\t<AuthorSelect\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\tkey=\"query-controls-author-select\"\n\t\t\t\t\t\tauthorList={ authorList }\n\t\t\t\t\t\tlabel={ __( 'Author' ) }\n\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'authors' ) }\n\t\t\t\t\t\tselectedAuthorId={ selectedAuthorId }\n\t\t\t\t\t\tonChange={ onAuthorChange }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tonNumberOfItemsChange && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\tkey=\"query-controls-range-control\"\n\t\t\t\t\t\tlabel={ __( 'Number of items' ) }\n\t\t\t\t\t\tvalue={ numberOfItems }\n\t\t\t\t\t\tonChange={ onNumberOfItemsChange }\n\t\t\t\t\t\tmin={ minItems }\n\t\t\t\t\t\tmax={ maxItems }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t] }\n\t\t</VStack>\n\t);\n}\n\nexport default QueryControls;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,eAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,aAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,cAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,OAA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X;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA7B,OAAA,GAEclB,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_authorSelect","_interopRequireDefault","_categorySelect","_formTokenField","_rangeControl","_selectControl","_vStack","_jsxRuntime","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","MAX_CATEGORIES_SUGGESTIONS","isSingleCategorySelection","props","isMultipleCategorySelection","QueryControls","__next40pxDefaultSize","authorList","selectedAuthorId","numberOfItems","order","orderBy","maxItems","minItems","onAuthorChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","jsx","VStack","spacing","className","children","default","__nextHasNoMarginBottom","label","__","value","undefined","options","onChange","newOrderBy","newOrder","split","categoriesList","onCategoryChange","noOptionLabel","_x","selectedCategoryId","categorySuggestions","selectedCategories","map","item","id","name","suggestions","Object","keys","maxSuggestions","min","max","required","_default","exports"],"sources":["@wordpress/components/src/query-controls/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AuthorSelect from './author-select';\nimport CategorySelect from './category-select';\nimport FormTokenField from '../form-token-field';\nimport RangeControl from '../range-control';\nimport SelectControl from '../select-control';\nimport { VStack } from '../v-stack';\nimport type {\n\tQueryControlsProps,\n\tQueryControlsWithMultipleCategorySelectionProps,\n\tQueryControlsWithSingleCategorySelectionProps,\n} from './types';\n\nconst DEFAULT_MIN_ITEMS = 1;\nconst DEFAULT_MAX_ITEMS = 100;\nconst MAX_CATEGORIES_SUGGESTIONS = 20;\n\nfunction isSingleCategorySelection(\n\tprops: QueryControlsProps\n): props is QueryControlsWithSingleCategorySelectionProps {\n\treturn 'categoriesList' in props;\n}\n\nfunction isMultipleCategorySelection(\n\tprops: QueryControlsProps\n): props is QueryControlsWithMultipleCategorySelectionProps {\n\treturn 'categorySuggestions' in props;\n}\n\n/**\n * Controls to query for posts.\n *\n * ```jsx\n * const MyQueryControls = () => (\n * <QueryControls\n * { ...{ maxItems, minItems, numberOfItems, order, orderBy } }\n * onOrderByChange={ ( newOrderBy ) => {\n * updateQuery( { orderBy: newOrderBy } )\n * }\n * onOrderChange={ ( newOrder ) => {\n * updateQuery( { order: newOrder } )\n * }\n * categoriesList={ categories }\n * selectedCategoryId={ category }\n * onCategoryChange={ ( newCategory ) => {\n * updateQuery( { category: newCategory } )\n * }\n * onNumberOfItemsChange={ ( newNumberOfItems ) => {\n * updateQuery( { numberOfItems: newNumberOfItems } )\n * } }\n * />\n * );\n * ```\n */\nexport function QueryControls( {\n\t__next40pxDefaultSize = false,\n\tauthorList,\n\tselectedAuthorId,\n\tnumberOfItems,\n\torder,\n\torderBy,\n\tmaxItems = DEFAULT_MAX_ITEMS,\n\tminItems = DEFAULT_MIN_ITEMS,\n\tonAuthorChange,\n\tonNumberOfItemsChange,\n\tonOrderChange,\n\tonOrderByChange,\n\t// Props for single OR multiple category selection are not destructured here,\n\t// but instead are destructured inline where necessary.\n\t...props\n}: QueryControlsProps ) {\n\treturn (\n\t\t<VStack spacing=\"4\" className=\"components-query-controls\">\n\t\t\t{ [\n\t\t\t\tonOrderChange && onOrderByChange && (\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\tkey=\"query-controls-order-select\"\n\t\t\t\t\t\tlabel={ __( 'Order by' ) }\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\torderBy === undefined || order === undefined\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: `${ orderBy }/${ order }`\n\t\t\t\t\t\t}\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Newest to oldest' ),\n\t\t\t\t\t\t\t\tvalue: 'date/desc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Oldest to newest' ),\n\t\t\t\t\t\t\t\tvalue: 'date/asc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\t\t\t\t\t\t\tlabel: __( 'A → Z' ),\n\t\t\t\t\t\t\t\tvalue: 'title/asc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\t\t\t\t\t\t\tlabel: __( 'Z → A' ),\n\t\t\t\t\t\t\t\tvalue: 'title/desc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tif ( typeof value !== 'string' ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\t\t\t\tif ( newOrder !== order ) {\n\t\t\t\t\t\t\t\tonOrderChange(\n\t\t\t\t\t\t\t\t\tnewOrder as NonNullable<\n\t\t\t\t\t\t\t\t\t\tQueryControlsProps[ 'order' ]\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( newOrderBy !== orderBy ) {\n\t\t\t\t\t\t\t\tonOrderByChange(\n\t\t\t\t\t\t\t\t\tnewOrderBy as NonNullable<\n\t\t\t\t\t\t\t\t\t\tQueryControlsProps[ 'orderBy' ]\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tisSingleCategorySelection( props ) &&\n\t\t\t\t\tprops.categoriesList &&\n\t\t\t\t\tprops.onCategoryChange && (\n\t\t\t\t\t\t<CategorySelect\n\t\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\t\tkey=\"query-controls-category-select\"\n\t\t\t\t\t\t\tcategoriesList={ props.categoriesList }\n\t\t\t\t\t\t\tlabel={ __( 'Category' ) }\n\t\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'categories' ) }\n\t\t\t\t\t\t\tselectedCategoryId={ props.selectedCategoryId }\n\t\t\t\t\t\t\tonChange={ props.onCategoryChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\tisMultipleCategorySelection( props ) &&\n\t\t\t\t\tprops.categorySuggestions &&\n\t\t\t\t\tprops.onCategoryChange && (\n\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tkey=\"query-controls-categories-select\"\n\t\t\t\t\t\t\tlabel={ __( 'Categories' ) }\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tprops.selectedCategories &&\n\t\t\t\t\t\t\t\tprops.selectedCategories.map( ( item ) => ( {\n\t\t\t\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\t\t\t\t// Keeping the fallback to `item.value` for legacy reasons,\n\t\t\t\t\t\t\t\t\t// even if items of `selectedCategories` should not have a\n\t\t\t\t\t\t\t\t\t// `value` property.\n\t\t\t\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\t\t\t\tvalue: item.name || item.value,\n\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ Object.keys(\n\t\t\t\t\t\t\t\tprops.categorySuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonChange={ props.onCategoryChange }\n\t\t\t\t\t\t\tmaxSuggestions={ MAX_CATEGORIES_SUGGESTIONS }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\tonAuthorChange && (\n\t\t\t\t\t<AuthorSelect\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\tkey=\"query-controls-author-select\"\n\t\t\t\t\t\tauthorList={ authorList }\n\t\t\t\t\t\tlabel={ __( 'Author' ) }\n\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'authors' ) }\n\t\t\t\t\t\tselectedAuthorId={ selectedAuthorId }\n\t\t\t\t\t\tonChange={ onAuthorChange }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tonNumberOfItemsChange && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\tkey=\"query-controls-range-control\"\n\t\t\t\t\t\tlabel={ __( 'Number of items' ) }\n\t\t\t\t\t\tvalue={ numberOfItems }\n\t\t\t\t\t\tonChange={ onNumberOfItemsChange }\n\t\t\t\t\t\tmin={ minItems }\n\t\t\t\t\t\tmax={ maxItems }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t] }\n\t\t</VStack>\n\t);\n}\n\nexport default QueryControls;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,eAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,aAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,cAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAAoC,IAAAQ,WAAA,GAAAR,OAAA;AAbpC;AACA;AACA;;AAGA;AACA;AACA;;AAaA,MAAMS,iBAAiB,GAAG,CAAC;AAC3B,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,0BAA0B,GAAG,EAAE;AAErC,SAASC,yBAAyBA,CACjCC,KAAyB,EACgC;EACz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AAkB,IACxBrC,KAAK,CAACqC,kBAAkB,CAACC,GAAG,CAAIC,IAAI,KAAQ;QAC3CC,EAAE,EAAED,IAAI,CAACC,EAAE;QACX;QACA;QACA;QACA;QACAhB,KAAK,EAAEe,IAAI,CAACE,IAAI,IAAIF,IAAI,CAACf;MAC1B,CAAC,CAAG,CACJ;MACDkB,WAAW,EAAGC,MAAM,CAACC,IAAI,CACxB5C,KAAK,CAACoC,mBACP,CAAG;MACHT,QAAQ,EAAG3B,KAAK,CAACgC,gBAAkB;MACnCa,cAAc,EAAG/C;IAA4B,GAjBzC,kCAkBJ,CACD,EACFa,cAAc,iBACb,IAAAhB,WAAA,CAAAoB,GAAA,EAAC3B,aAAA,CAAAgC,OAAY;MACZjB,qBAAqB,EAAGA,qBAAuB;MAE/CC,UAAU,EAAGA,UAAY;MACzBkB,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS,CAAG;MACxBU,aAAa,EAAG,IAAAC,QAAE,EAAE,KAAK,EAAE,SAAU,CAAG;MACxC7B,gBAAgB,EAAGA,gBAAkB;MACrCsB,QAAQ,EAAGhB;IAAgB,GALvB,8BAMJ,CACD,EACDC,qBAAqB,iBACpB,IAAAjB,WAAA,CAAAoB,GAAA,EAACvB,aAAA,CAAA4B,OAAY;MACZC,uBAAuB;MACvBlB,qBAAqB,EAAGA,qBAAuB;MAE/CmB,KAAK,EAAG,IAAAC,QAAE,EAAE,iBAAkB,CAAG;MACjCC,KAAK,EAAGlB,aAAe;MACvBqB,QAAQ,EAAGf,qBAAuB;MAClCkC,GAAG,EAAGpC,QAAU;MAChBqC,GAAG,EAAGtC,QAAU;MAChBuC,QAAQ;IAAA,GANJ,8BAOJ,CACD;EACD,CACM,CAAC;AAEX;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA9B,OAAA,GAEclB,aAAa","ignoreList":[]}
@@ -10,6 +10,8 @@ var _clsx = _interopRequireDefault(require("clsx"));
10
10
  var _compose = require("@wordpress/compose");
11
11
  var _baseControl = _interopRequireDefault(require("../base-control"));
12
12
  var _vStack = require("../v-stack");
13
+ var _hooks = require("../base-control/hooks");
14
+ var _baseControlStyles = require("../base-control/styles/base-control-styles");
13
15
  var _jsxRuntime = require("react/jsx-runtime");
14
16
  /**
15
17
  * External dependencies
@@ -23,6 +25,13 @@ var _jsxRuntime = require("react/jsx-runtime");
23
25
  * Internal dependencies
24
26
  */
25
27
 
28
+ function generateOptionDescriptionId(radioGroupId, index) {
29
+ return `${radioGroupId}-${index}-option-description`;
30
+ }
31
+ function generateOptionId(radioGroupId, index) {
32
+ return `${radioGroupId}-${index}`;
33
+ }
34
+
26
35
  /**
27
36
  * Render a user interface to select the user type using radio inputs.
28
37
  *
@@ -57,11 +66,21 @@ function RadioControl(props) {
57
66
  onChange,
58
67
  hideLabelFromVision,
59
68
  options = [],
69
+ id: preferredId,
60
70
  ...additionalProps
61
71
  } = props;
62
- const instanceId = (0, _compose.useInstanceId)(RadioControl);
63
- const id = `inspector-radio-control-${instanceId}`;
72
+ const id = (0, _compose.useInstanceId)(RadioControl, 'inspector-radio-control', preferredId);
64
73
  const onChangeValue = event => onChange(event.target.value);
74
+
75
+ // Use `useBaseControlProps` to get the id of the help text.
76
+ const {
77
+ controlProps: {
78
+ 'aria-describedby': helpTextId
79
+ }
80
+ } = (0, _hooks.useBaseControlProps)({
81
+ id,
82
+ help
83
+ });
65
84
  if (!options?.length) {
66
85
  return null;
67
86
  }
@@ -74,24 +93,32 @@ function RadioControl(props) {
74
93
  className: (0, _clsx.default)(className, 'components-radio-control'),
75
94
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vStack.VStack, {
76
95
  spacing: 3,
96
+ className: (0, _clsx.default)('components-radio-control__group-wrapper', {
97
+ 'has-help': !!help
98
+ }),
77
99
  children: options.map((option, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
78
100
  className: "components-radio-control__option",
79
101
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
80
- id: `${id}-${index}`,
102
+ id: generateOptionId(id, index),
81
103
  className: "components-radio-control__input",
82
104
  type: "radio",
83
105
  name: id,
84
106
  value: option.value,
85
107
  onChange: onChangeValue,
86
108
  checked: option.value === selected,
87
- "aria-describedby": !!help ? `${id}__help` : undefined,
109
+ "aria-describedby": (0, _clsx.default)([!!option.description && generateOptionDescriptionId(id, index), helpTextId]) || undefined,
88
110
  ...additionalProps
89
111
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
90
112
  className: "components-radio-control__label",
91
- htmlFor: `${id}-${index}`,
113
+ htmlFor: generateOptionId(id, index),
92
114
  children: option.label
93
- })]
94
- }, `${id}-${index}`))
115
+ }), !!option.description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_baseControlStyles.StyledHelp, {
116
+ __nextHasNoMarginBottom: true,
117
+ id: generateOptionDescriptionId(id, index),
118
+ className: "components-radio-control__option-description",
119
+ children: option.description
120
+ }) : null]
121
+ }, generateOptionId(id, index)))
95
122
  })
96
123
  });
97
124
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_compose","_baseControl","_vStack","_jsxRuntime","RadioControl","props","label","className","selected","help","onChange","hideLabelFromVision","options","additionalProps","instanceId","useInstanceId","id","onChangeValue","event","target","value","length","jsx","default","__nextHasNoMarginBottom","clsx","children","VStack","spacing","map","option","index","jsxs","type","name","checked","undefined","htmlFor","_default","exports"],"sources":["@wordpress/components/src/radio-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( RadioControl );\n\tconst id = `inspector-radio-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\thelp={ help }\n\t\t\tclassName={ clsx( className, 'components-radio-control' ) }\n\t\t>\n\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ `${ id }-${ index }` }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ `${ id }-${ index }` }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! help ? `${ id }__help` : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tclassName=\"components-radio-control__label\"\n\t\t\t\t\t\t\thtmlFor={ `${ id }-${ index }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default RadioControl;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,OAAA,GAAAH,OAAA;AAAoC,IAAAI,WAAA,GAAAJ,OAAA;AAjBpC;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,YAAYA,CAC3BC,KAAmE,EAClE;EACD,MAAM;IACLC,KAAK;IACLC,SAAS;IACTC,QAAQ;IACRC,IAAI;IACJC,QAAQ;IACRC,mBAAmB;IACnBC,OAAO,GAAG,EAAE;IACZ,GAAGC;EACJ,CAAC,GAAGR,KAAK;EACT,MAAMS,UAAU,GAAG,IAAAC,sBAAa,EAAEX,YAAa,CAAC;EAChD,MAAMY,EAAE,GAAI,2BAA2BF,UAAY,EAAC;EACpD,MAAMG,aAAa,GAAKC,KAAsC,IAC7DR,QAAQ,CAAEQ,KAAK,CAACC,MAAM,CAACC,KAAM,CAAC;EAE/B,IAAK,CAAER,OAAO,EAAES,MAAM,EAAG;IACxB,OAAO,IAAI;EACZ;EAEA,oBACC,IAAAlB,WAAA,CAAAmB,GAAA,EAACrB,YAAA,CAAAsB,OAAW;IACXC,uBAAuB;IACvBlB,KAAK,EAAGA,KAAO;IACfU,EAAE,EAAGA,EAAI;IACTL,mBAAmB,EAAGA,mBAAqB;IAC3CF,IAAI,EAAGA,IAAM;IACbF,SAAS,EAAG,IAAAkB,aAAI,EAAElB,SAAS,EAAE,0BAA2B,CAAG;IAAAmB,QAAA,eAE3D,IAAAvB,WAAA,CAAAmB,GAAA,EAACpB,OAAA,CAAAyB,MAAM;MAACC,OAAO,EAAG,CAAG;MAAAF,QAAA,EAClBd,OAAO,CAACiB,GAAG,CAAE,CAAEC,MAAM,EAAEC,KAAK,kBAC7B,IAAA5B,WAAA,CAAA6B,IAAA;QAECzB,SAAS,EAAC,kCAAkC;QAAAmB,QAAA,gBAE5C,IAAAvB,WAAA,CAAAmB,GAAA;UACCN,EAAE,EAAI,GAAGA,EAAI,IAAIe,KAAO,EAAG;UAC3BxB,SAAS,EAAC,iCAAiC;UAC3C0B,IAAI,EAAC,OAAO;UACZC,IAAI,EAAGlB,EAAI;UACXI,KAAK,EAAGU,MAAM,CAACV,KAAO;UACtBV,QAAQ,EAAGO,aAAe;UAC1BkB,OAAO,EAAGL,MAAM,CAACV,KAAK,KAAKZ,QAAU;UACrC,oBACC,CAAC,CAAEC,IAAI,GAAI,GAAGO,EAAI,QAAO,GAAGoB,SAC5B;UAAA,GACIvB;QAAe,CACpB,CAAC,eACF,IAAAV,WAAA,CAAAmB,GAAA;UACCf,SAAS,EAAC,iCAAiC;UAC3C8B,OAAO,EAAI,GAAGrB,EAAI,IAAIe,KAAO,EAAG;UAAAL,QAAA,EAE9BI,MAAM,CAACxB;QAAK,CACR,CAAC;MAAA,GArBD,GAAGU,EAAI,IAAIe,KAAO,EAsBrB,CACJ;IAAC,CACI;EAAC,CACG,CAAC;AAEhB;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAhB,OAAA,GAEcnB,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_compose","_baseControl","_vStack","_hooks","_baseControlStyles","_jsxRuntime","generateOptionDescriptionId","radioGroupId","index","generateOptionId","RadioControl","props","label","className","selected","help","onChange","hideLabelFromVision","options","id","preferredId","additionalProps","useInstanceId","onChangeValue","event","target","value","controlProps","helpTextId","useBaseControlProps","length","jsx","default","__nextHasNoMarginBottom","clsx","children","VStack","spacing","map","option","jsxs","type","name","checked","description","undefined","htmlFor","StyledHelp","_default","exports"],"sources":["@wordpress/components/src/radio-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\nimport { useBaseControlProps } from '../base-control/hooks';\nimport { StyledHelp } from '../base-control/styles/base-control-styles';\n\nfunction generateOptionDescriptionId( radioGroupId: string, index: number ) {\n\treturn `${ radioGroupId }-${ index }-option-description`;\n}\n\nfunction generateOptionId( radioGroupId: string, index: number ) {\n\treturn `${ radioGroupId }-${ index }`;\n}\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\tid: preferredId,\n\t\t...additionalProps\n\t} = props;\n\tconst id = useInstanceId(\n\t\tRadioControl,\n\t\t'inspector-radio-control',\n\t\tpreferredId\n\t);\n\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\t// Use `useBaseControlProps` to get the id of the help text.\n\tconst {\n\t\tcontrolProps: { 'aria-describedby': helpTextId },\n\t} = useBaseControlProps( { id, help } );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\thelp={ help }\n\t\t\tclassName={ clsx( className, 'components-radio-control' ) }\n\t\t>\n\t\t\t<VStack\n\t\t\t\tspacing={ 3 }\n\t\t\t\tclassName={ clsx( 'components-radio-control__group-wrapper', {\n\t\t\t\t\t'has-help': !! help,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ generateOptionId( id, index ) }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ generateOptionId( id, index ) }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\tclsx( [\n\t\t\t\t\t\t\t\t\t!! option.description &&\n\t\t\t\t\t\t\t\t\t\tgenerateOptionDescriptionId(\n\t\t\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\thelpTextId,\n\t\t\t\t\t\t\t\t] ) || undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tclassName=\"components-radio-control__label\"\n\t\t\t\t\t\t\thtmlFor={ generateOptionId( id, index ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t{ !! option.description ? (\n\t\t\t\t\t\t\t<StyledHelp\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tid={ generateOptionDescriptionId( id, index ) }\n\t\t\t\t\t\t\t\tclassName=\"components-radio-control__option-description\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ option.description }\n\t\t\t\t\t\t\t</StyledHelp>\n\t\t\t\t\t\t) : null }\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default RadioControl;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AAAwE,IAAAM,WAAA,GAAAN,OAAA;AAnBxE;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;;AAQA,SAASO,2BAA2BA,CAAEC,YAAoB,EAAEC,KAAa,EAAG;EAC3E,OAAQ,GAAGD,YAAc,IAAIC,KAAO,qBAAoB;AACzD;AAEA,SAASC,gBAAgBA,CAAEF,YAAoB,EAAEC,KAAa,EAAG;EAChE,OAAQ,GAAGD,YAAc,IAAIC,KAAO,EAAC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { BaseControlProps } from '../base-control/types';\n\nexport type RadioControlProps = Pick<\n\tBaseControlProps,\n\t'label' | 'help' | 'hideLabelFromVision'\n> & {\n\t/**\n\t * A function that receives the value of the new option that is being\n\t * selected as input.\n\t */\n\tonChange: ( value: string ) => void;\n\t/**\n\t * An array of objects containing the value and label of the options.\n\t */\n\toptions?: {\n\t\t/**\n\t\t * The label to be shown to the user\n\t\t */\n\t\tlabel: string;\n\t\t/**\n\t\t * The internal value compared against select and passed to onChange\n\t\t */\n\t\tvalue: string;\n\t}[];\n\t/**\n\t * The value property of the currently selected option.\n\t */\n\tselected?: string;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/radio-control/types.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { BaseControlProps } from '../base-control/types';\n\nexport type RadioControlProps = Pick<\n\tBaseControlProps,\n\t'label' | 'help' | 'hideLabelFromVision'\n> & {\n\t/**\n\t * A function that receives the value of the new option that is being\n\t * selected as input.\n\t */\n\tonChange: ( value: string ) => void;\n\t/**\n\t * An array of objects containing the value and label of the options.\n\t */\n\toptions?: {\n\t\t/**\n\t\t * The label to be shown to the user\n\t\t */\n\t\tlabel: string;\n\t\t/**\n\t\t * The internal value compared against select and passed to onChange\n\t\t */\n\t\tvalue: string;\n\t\t/**\n\t\t * Optional help text to be shown in addition the label.\n\t\t */\n\t\tdescription?: string;\n\t}[];\n\t/**\n\t * The value property of the currently selected option.\n\t */\n\tselected?: string;\n};\n"],"mappings":"","ignoreList":[]}
@@ -290,6 +290,7 @@ function UnforwardedRangeControl(props, forwardedRef) {
290
290
  * const [ isChecked, setChecked ] = useState( true );
291
291
  * return (
292
292
  * <RangeControl
293
+ * __nextHasNoMarginBottom
293
294
  * help="Please select how transparent you would like this."
294
295
  * initialPosition={50}
295
296
  * label="Opacity"
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_compose","_baseControl","_button","_icon","_utils","_utils2","_math","_inputRange","_rail","_tooltip","_rangeControlStyles","_space","_jsxRuntime","noop","UnforwardedRangeControl","props","forwardedRef","__nextHasNoMarginBottom","afterIcon","allowReset","beforeIcon","className","color","colorProp","COLORS","theme","accent","currentInput","disabled","help","hideLabelFromVision","initialPosition","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseLeave","onMouseMove","railColor","renderTooltipContent","v","resetFallbackValue","__next40pxDefaultSize","shiftStep","showTooltip","showTooltipProp","step","trackColor","value","valueProp","withInputField","otherProps","setValue","useControlledRangeValue","initial","isResetPendent","useRef","hasTooltip","hasInputField","setShowTooltip","useState","isFocused","setIsFocused","inputRef","isCurrentlyFocused","current","matches","isThumbFocused","isValueReset","currentValue","undefined","inputSliderValue","rangeFillValue","fillValue","fillValueOffset","clamp","classes","clsx","wrapperClasses","id","useInstanceId","describedBy","enableTooltip","Number","isFinite","handleOnRangeChange","event","nextValue","parseFloat","target","handleOnChange","next","isNaN","floatClamp","handleOnInputNumberBlur","handleOnReset","resetValue","onChangeResetValue","handleShowTooltip","handleHideTooltip","handleOnBlur","handleOnFocus","offsetStyle","isRTL","jsx","default","children","jsxs","Root","BeforeIconWrapper","icon","Wrapper","ref","useMergeRefs","Track","style","width","ThumbWrapper","Thumb","tooltipPosition","show","AfterIconWrapper","InputNumber","inputMode","size","__unstableInputWidth","space","ActionRightWrapper","accessibleWhenDisabled","variant","onClick","__","RangeControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/range-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport {\n\tActionRightWrapper,\n\tAfterIconWrapper,\n\tBeforeIconWrapper,\n\tInputNumber,\n\tRoot,\n\tTrack,\n\tThumbWrapper,\n\tThumb,\n\tWrapper,\n} from './styles/range-control-styles';\n\nimport type { RangeControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { space } from '../utils/space';\n\nconst noop = () => {};\n\nfunction UnforwardedRangeControl(\n\tprops: WordPressComponentProps< RangeControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tafterIcon,\n\t\tallowReset = false,\n\t\tbeforeIcon,\n\t\tclassName,\n\t\tcolor: colorProp = COLORS.theme.accent,\n\t\tcurrentInput,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tinitialPosition,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmarks = false,\n\t\tmax = 100,\n\t\tmin = 0,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\tonMouseLeave = noop,\n\t\tonMouseMove = noop,\n\t\trailColor,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tresetFallbackValue,\n\t\t__next40pxDefaultSize = false,\n\t\tshiftStep = 10,\n\t\tshowTooltip: showTooltipProp,\n\t\tstep = 1,\n\t\ttrackColor,\n\t\tvalue: valueProp,\n\t\twithInputField = true,\n\t\t...otherProps\n\t} = props;\n\n\tconst [ value, setValue ] = useControlledRangeValue( {\n\t\tmin,\n\t\tmax,\n\t\tvalue: valueProp ?? null,\n\t\tinitial: initialPosition,\n\t} );\n\tconst isResetPendent = useRef( false );\n\n\tlet hasTooltip = showTooltipProp;\n\tlet hasInputField = withInputField;\n\n\tif ( step === 'any' ) {\n\t\t// The tooltip and number input field are hidden when the step is \"any\"\n\t\t// because the decimals get too lengthy to fit well.\n\t\thasTooltip = false;\n\t\thasInputField = false;\n\t}\n\n\tconst [ showTooltip, setShowTooltip ] = useState( hasTooltip );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst isCurrentlyFocused = inputRef.current?.matches( ':focus' );\n\tconst isThumbFocused = ! disabled && isFocused;\n\n\tconst isValueReset = value === null;\n\tconst currentValue = value !== undefined ? value : currentInput;\n\n\tconst inputSliderValue = isValueReset ? '' : currentValue;\n\tconst rangeFillValue = isValueReset ? ( max - min ) / 2 + min : value;\n\n\tconst fillValue = isValueReset\n\t\t? 50\n\t\t: ( ( value - min ) / ( max - min ) ) * 100;\n\tconst fillValueOffset = `${ clamp( fillValue, 0, 100 ) }%`;\n\n\tconst classes = clsx( 'components-range-control', className );\n\n\tconst wrapperClasses = clsx(\n\t\t'components-range-control__wrapper',\n\t\t!! marks && 'is-marked'\n\t);\n\n\tconst id = useInstanceId(\n\t\tUnforwardedRangeControl,\n\t\t'inspector-range-control'\n\t);\n\tconst describedBy = !! help ? `${ id }__help` : undefined;\n\tconst enableTooltip = hasTooltip !== false && Number.isFinite( value );\n\n\tconst handleOnRangeChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = parseFloat( event.target.value );\n\t\tsetValue( nextValue );\n\t\tonChange( nextValue );\n\t};\n\n\tconst handleOnChange = ( next?: string ) => {\n\t\t// @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n\t\t// potentially receive a NaN when next is undefined.\n\t\tlet nextValue = parseFloat( next );\n\t\tsetValue( nextValue );\n\n\t\t/*\n\t\t * Calls onChange only when nextValue is numeric\n\t\t * otherwise may queue a reset for the blur event.\n\t\t */\n\t\tif ( ! isNaN( nextValue ) ) {\n\t\t\tif ( nextValue < min || nextValue > max ) {\n\t\t\t\tnextValue = floatClamp( nextValue, min, max ) as number;\n\t\t\t}\n\n\t\t\tonChange( nextValue );\n\t\t\tisResetPendent.current = false;\n\t\t} else if ( allowReset ) {\n\t\t\tisResetPendent.current = true;\n\t\t}\n\t};\n\n\tconst handleOnInputNumberBlur = () => {\n\t\tif ( isResetPendent.current ) {\n\t\t\thandleOnReset();\n\t\t\tisResetPendent.current = false;\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tlet resetValue: number | null = parseFloat( `${ resetFallbackValue }` );\n\t\tlet onChangeResetValue: number | undefined = resetValue;\n\n\t\tif ( isNaN( resetValue ) ) {\n\t\t\tresetValue = null;\n\t\t\tonChangeResetValue = undefined;\n\t\t}\n\n\t\tsetValue( resetValue );\n\n\t\t/**\n\t\t * Previously, this callback would always receive undefined as\n\t\t * an argument. This behavior is unexpected, specifically\n\t\t * when resetFallbackValue is defined.\n\t\t *\n\t\t * The value of undefined is not ideal. Passing it through\n\t\t * to internal <input /> elements would change it from a\n\t\t * controlled component to an uncontrolled component.\n\t\t *\n\t\t * For now, to minimize unexpected regressions, we're going to\n\t\t * preserve the undefined callback argument, except when a\n\t\t * resetFallbackValue is defined.\n\t\t */\n\t\tonChange( onChangeResetValue );\n\t};\n\n\tconst handleShowTooltip = () => setShowTooltip( true );\n\tconst handleHideTooltip = () => setShowTooltip( false );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t\thandleHideTooltip();\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t\thandleShowTooltip();\n\t};\n\n\tconst offsetStyle = {\n\t\t[ isRTL() ? 'right' : 'left' ]: fillValueOffset,\n\t};\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tclassName={ classes }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ `${ id }` }\n\t\t\thelp={ help }\n\t\t>\n\t\t\t<Root\n\t\t\t\tclassName=\"components-range-control__root\"\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t{ beforeIcon && (\n\t\t\t\t\t<BeforeIconWrapper>\n\t\t\t\t\t\t<Icon icon={ beforeIcon } />\n\t\t\t\t\t</BeforeIconWrapper>\n\t\t\t\t) }\n\t\t\t\t<Wrapper\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\t\tcolor={ colorProp }\n\t\t\t\t\tmarks={ !! marks }\n\t\t\t\t>\n\t\t\t\t\t<InputRange\n\t\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t\tclassName=\"components-range-control__slider\"\n\t\t\t\t\t\tdescribedBy={ describedBy }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tid={ `${ id }` }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\t\tonChange={ handleOnRangeChange }\n\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\tonMouseMove={ onMouseMove }\n\t\t\t\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\t\t\t\tref={ useMergeRefs( [ inputRef, forwardedRef ] ) }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ inputSliderValue ?? undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeRail\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tmarks={ marks }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\trailColor={ railColor }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ rangeFillValue }\n\t\t\t\t\t/>\n\t\t\t\t\t<Track\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tclassName=\"components-range-control__track\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tstyle={ { width: fillValueOffset } }\n\t\t\t\t\t\ttrackColor={ trackColor }\n\t\t\t\t\t/>\n\t\t\t\t\t<ThumbWrapper\n\t\t\t\t\t\tclassName=\"components-range-control__thumb-wrapper\"\n\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thumb\n\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\tisFocused={ isThumbFocused }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ThumbWrapper>\n\t\t\t\t\t{ enableTooltip && (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tclassName=\"components-range-control__tooltip\"\n\t\t\t\t\t\t\tinputRef={ inputRef }\n\t\t\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\t\t\trenderTooltipContent={ renderTooltipContent }\n\t\t\t\t\t\t\tshow={ isCurrentlyFocused || showTooltip }\n\t\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Wrapper>\n\t\t\t\t{ afterIcon && (\n\t\t\t\t\t<AfterIconWrapper>\n\t\t\t\t\t\t<Icon icon={ afterIcon } />\n\t\t\t\t\t</AfterIconWrapper>\n\t\t\t\t) }\n\t\t\t\t{ hasInputField && (\n\t\t\t\t\t<InputNumber\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tclassName=\"components-range-control__number\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tisShiftStepEnabled={ isShiftStepEnabled }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnInputNumberBlur }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tshiftStep={ shiftStep }\n\t\t\t\t\t\tsize={\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t? '__unstable-large'\n\t\t\t\t\t\t\t\t: 'default'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t\t\t__next40pxDefaultSize ? space( 20 ) : space( 16 )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if the `null` value is necessary\n\t\t\t\t\t\tvalue={ inputSliderValue }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<ActionRightWrapper>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-range-control__reset\"\n\t\t\t\t\t\t\t// If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n\t\t\t\t\t\t\taccessibleWhenDisabled={ ! disabled }\n\t\t\t\t\t\t\tdisabled={ disabled || value === undefined }\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</ActionRightWrapper>\n\t\t\t\t) }\n\t\t\t</Root>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <RangeControl\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={50}\n * label=\"Opacity\"\n * max={100}\n * min={0}\n * onChange={() => {}}\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef( UnforwardedRangeControl );\n\nexport default RangeControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,KAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,KAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,QAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AAcA,IAAAc,MAAA,GAAAd,OAAA;AAAuC,IAAAe,WAAA,GAAAf,OAAA;AAvCvC;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;;AA0BA,MAAMgB,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,SAASC,uBAAuBA,CAC/BC,KAAmE,EACnEC,YAA8C,EAC7C;EACD,MAAM;IACLC,uBAAuB,GAAG,KAAK;IAC/BC,SAAS;IACTC,UAAU,GAAG,KAAK;IAClBC,UAAU;IACVC,SAAS;IACTC,KAAK,EAAEC,SAAS,GAAGC,aAAM,CAACC,KAAK,CAACC,MAAM;IACtCC,YAAY;IACZC,QAAQ,GAAG,KAAK;IAChBC,IAAI;IACJC,mBAAmB,GAAG,KAAK;IAC3BC,eAAe;IACfC,kBAAkB,GAAG,IAAI;IACzBC,KAAK;IACLC,KAAK,GAAG,KAAK;IACbC,GAAG,GAAG,GAAG;IACTC,GAA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AU,iBACX,IAAAP,WAAA,CAAAgG,GAAA,EAAClG,mBAAA,CAAAyH,kBAAkB;QAAArB,QAAA,eAClB,IAAAlG,WAAA,CAAAgG,GAAA,EAAC1G,OAAA,CAAA2G,OAAM;UACNxF,SAAS,EAAC;UACV;UAAA;UACA+G,sBAAsB,EAAG,CAAExG,QAAU;UACrCA,QAAQ,EAAGA,QAAQ,IAAIwB,KAAK,KAAKsB,SAAW;UAC5C2D,OAAO,EAAC,WAAW;UACnBL,IAAI,EAAC,OAAO;UACZM,OAAO,EAAGnC,aAAe;UAAAW,QAAA,EAEvB,IAAAyB,QAAE,EAAE,OAAQ;QAAC,CACR;MAAC,CACU,CACpB;IAAA,CACI;EAAC,CACK,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAU,EAAE5H,uBAAwB,CAAC;AAAC,IAAA6H,QAAA,GAAAF,OAAA,CAAA5B,OAAA,GAEnD2B,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_compose","_baseControl","_button","_icon","_utils","_utils2","_math","_inputRange","_rail","_tooltip","_rangeControlStyles","_space","_jsxRuntime","noop","UnforwardedRangeControl","props","forwardedRef","__nextHasNoMarginBottom","afterIcon","allowReset","beforeIcon","className","color","colorProp","COLORS","theme","accent","currentInput","disabled","help","hideLabelFromVision","initialPosition","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseLeave","onMouseMove","railColor","renderTooltipContent","v","resetFallbackValue","__next40pxDefaultSize","shiftStep","showTooltip","showTooltipProp","step","trackColor","value","valueProp","withInputField","otherProps","setValue","useControlledRangeValue","initial","isResetPendent","useRef","hasTooltip","hasInputField","setShowTooltip","useState","isFocused","setIsFocused","inputRef","isCurrentlyFocused","current","matches","isThumbFocused","isValueReset","currentValue","undefined","inputSliderValue","rangeFillValue","fillValue","fillValueOffset","clamp","classes","clsx","wrapperClasses","id","useInstanceId","describedBy","enableTooltip","Number","isFinite","handleOnRangeChange","event","nextValue","parseFloat","target","handleOnChange","next","isNaN","floatClamp","handleOnInputNumberBlur","handleOnReset","resetValue","onChangeResetValue","handleShowTooltip","handleHideTooltip","handleOnBlur","handleOnFocus","offsetStyle","isRTL","jsx","default","children","jsxs","Root","BeforeIconWrapper","icon","Wrapper","ref","useMergeRefs","Track","style","width","ThumbWrapper","Thumb","tooltipPosition","show","AfterIconWrapper","InputNumber","inputMode","size","__unstableInputWidth","space","ActionRightWrapper","accessibleWhenDisabled","variant","onClick","__","RangeControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/range-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport {\n\tActionRightWrapper,\n\tAfterIconWrapper,\n\tBeforeIconWrapper,\n\tInputNumber,\n\tRoot,\n\tTrack,\n\tThumbWrapper,\n\tThumb,\n\tWrapper,\n} from './styles/range-control-styles';\n\nimport type { RangeControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { space } from '../utils/space';\n\nconst noop = () => {};\n\nfunction UnforwardedRangeControl(\n\tprops: WordPressComponentProps< RangeControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tafterIcon,\n\t\tallowReset = false,\n\t\tbeforeIcon,\n\t\tclassName,\n\t\tcolor: colorProp = COLORS.theme.accent,\n\t\tcurrentInput,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tinitialPosition,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmarks = false,\n\t\tmax = 100,\n\t\tmin = 0,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\tonMouseLeave = noop,\n\t\tonMouseMove = noop,\n\t\trailColor,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tresetFallbackValue,\n\t\t__next40pxDefaultSize = false,\n\t\tshiftStep = 10,\n\t\tshowTooltip: showTooltipProp,\n\t\tstep = 1,\n\t\ttrackColor,\n\t\tvalue: valueProp,\n\t\twithInputField = true,\n\t\t...otherProps\n\t} = props;\n\n\tconst [ value, setValue ] = useControlledRangeValue( {\n\t\tmin,\n\t\tmax,\n\t\tvalue: valueProp ?? null,\n\t\tinitial: initialPosition,\n\t} );\n\tconst isResetPendent = useRef( false );\n\n\tlet hasTooltip = showTooltipProp;\n\tlet hasInputField = withInputField;\n\n\tif ( step === 'any' ) {\n\t\t// The tooltip and number input field are hidden when the step is \"any\"\n\t\t// because the decimals get too lengthy to fit well.\n\t\thasTooltip = false;\n\t\thasInputField = false;\n\t}\n\n\tconst [ showTooltip, setShowTooltip ] = useState( hasTooltip );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst isCurrentlyFocused = inputRef.current?.matches( ':focus' );\n\tconst isThumbFocused = ! disabled && isFocused;\n\n\tconst isValueReset = value === null;\n\tconst currentValue = value !== undefined ? value : currentInput;\n\n\tconst inputSliderValue = isValueReset ? '' : currentValue;\n\tconst rangeFillValue = isValueReset ? ( max - min ) / 2 + min : value;\n\n\tconst fillValue = isValueReset\n\t\t? 50\n\t\t: ( ( value - min ) / ( max - min ) ) * 100;\n\tconst fillValueOffset = `${ clamp( fillValue, 0, 100 ) }%`;\n\n\tconst classes = clsx( 'components-range-control', className );\n\n\tconst wrapperClasses = clsx(\n\t\t'components-range-control__wrapper',\n\t\t!! marks && 'is-marked'\n\t);\n\n\tconst id = useInstanceId(\n\t\tUnforwardedRangeControl,\n\t\t'inspector-range-control'\n\t);\n\tconst describedBy = !! help ? `${ id }__help` : undefined;\n\tconst enableTooltip = hasTooltip !== false && Number.isFinite( value );\n\n\tconst handleOnRangeChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = parseFloat( event.target.value );\n\t\tsetValue( nextValue );\n\t\tonChange( nextValue );\n\t};\n\n\tconst handleOnChange = ( next?: string ) => {\n\t\t// @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n\t\t// potentially receive a NaN when next is undefined.\n\t\tlet nextValue = parseFloat( next );\n\t\tsetValue( nextValue );\n\n\t\t/*\n\t\t * Calls onChange only when nextValue is numeric\n\t\t * otherwise may queue a reset for the blur event.\n\t\t */\n\t\tif ( ! isNaN( nextValue ) ) {\n\t\t\tif ( nextValue < min || nextValue > max ) {\n\t\t\t\tnextValue = floatClamp( nextValue, min, max ) as number;\n\t\t\t}\n\n\t\t\tonChange( nextValue );\n\t\t\tisResetPendent.current = false;\n\t\t} else if ( allowReset ) {\n\t\t\tisResetPendent.current = true;\n\t\t}\n\t};\n\n\tconst handleOnInputNumberBlur = () => {\n\t\tif ( isResetPendent.current ) {\n\t\t\thandleOnReset();\n\t\t\tisResetPendent.current = false;\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tlet resetValue: number | null = parseFloat( `${ resetFallbackValue }` );\n\t\tlet onChangeResetValue: number | undefined = resetValue;\n\n\t\tif ( isNaN( resetValue ) ) {\n\t\t\tresetValue = null;\n\t\t\tonChangeResetValue = undefined;\n\t\t}\n\n\t\tsetValue( resetValue );\n\n\t\t/**\n\t\t * Previously, this callback would always receive undefined as\n\t\t * an argument. This behavior is unexpected, specifically\n\t\t * when resetFallbackValue is defined.\n\t\t *\n\t\t * The value of undefined is not ideal. Passing it through\n\t\t * to internal <input /> elements would change it from a\n\t\t * controlled component to an uncontrolled component.\n\t\t *\n\t\t * For now, to minimize unexpected regressions, we're going to\n\t\t * preserve the undefined callback argument, except when a\n\t\t * resetFallbackValue is defined.\n\t\t */\n\t\tonChange( onChangeResetValue );\n\t};\n\n\tconst handleShowTooltip = () => setShowTooltip( true );\n\tconst handleHideTooltip = () => setShowTooltip( false );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t\thandleHideTooltip();\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t\thandleShowTooltip();\n\t};\n\n\tconst offsetStyle = {\n\t\t[ isRTL() ? 'right' : 'left' ]: fillValueOffset,\n\t};\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tclassName={ classes }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ `${ id }` }\n\t\t\thelp={ help }\n\t\t>\n\t\t\t<Root\n\t\t\t\tclassName=\"components-range-control__root\"\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t{ beforeIcon && (\n\t\t\t\t\t<BeforeIconWrapper>\n\t\t\t\t\t\t<Icon icon={ beforeIcon } />\n\t\t\t\t\t</BeforeIconWrapper>\n\t\t\t\t) }\n\t\t\t\t<Wrapper\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\t\tcolor={ colorProp }\n\t\t\t\t\tmarks={ !! marks }\n\t\t\t\t>\n\t\t\t\t\t<InputRange\n\t\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t\tclassName=\"components-range-control__slider\"\n\t\t\t\t\t\tdescribedBy={ describedBy }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tid={ `${ id }` }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\t\tonChange={ handleOnRangeChange }\n\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\tonMouseMove={ onMouseMove }\n\t\t\t\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\t\t\t\tref={ useMergeRefs( [ inputRef, forwardedRef ] ) }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ inputSliderValue ?? undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeRail\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tmarks={ marks }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\trailColor={ railColor }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ rangeFillValue }\n\t\t\t\t\t/>\n\t\t\t\t\t<Track\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tclassName=\"components-range-control__track\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tstyle={ { width: fillValueOffset } }\n\t\t\t\t\t\ttrackColor={ trackColor }\n\t\t\t\t\t/>\n\t\t\t\t\t<ThumbWrapper\n\t\t\t\t\t\tclassName=\"components-range-control__thumb-wrapper\"\n\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thumb\n\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\tisFocused={ isThumbFocused }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ThumbWrapper>\n\t\t\t\t\t{ enableTooltip && (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tclassName=\"components-range-control__tooltip\"\n\t\t\t\t\t\t\tinputRef={ inputRef }\n\t\t\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\t\t\trenderTooltipContent={ renderTooltipContent }\n\t\t\t\t\t\t\tshow={ isCurrentlyFocused || showTooltip }\n\t\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Wrapper>\n\t\t\t\t{ afterIcon && (\n\t\t\t\t\t<AfterIconWrapper>\n\t\t\t\t\t\t<Icon icon={ afterIcon } />\n\t\t\t\t\t</AfterIconWrapper>\n\t\t\t\t) }\n\t\t\t\t{ hasInputField && (\n\t\t\t\t\t<InputNumber\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tclassName=\"components-range-control__number\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tisShiftStepEnabled={ isShiftStepEnabled }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnInputNumberBlur }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tshiftStep={ shiftStep }\n\t\t\t\t\t\tsize={\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t? '__unstable-large'\n\t\t\t\t\t\t\t\t: 'default'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t\t\t__next40pxDefaultSize ? space( 20 ) : space( 16 )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if the `null` value is necessary\n\t\t\t\t\t\tvalue={ inputSliderValue }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<ActionRightWrapper>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-range-control__reset\"\n\t\t\t\t\t\t\t// If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n\t\t\t\t\t\t\taccessibleWhenDisabled={ ! disabled }\n\t\t\t\t\t\t\tdisabled={ disabled || value === undefined }\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</ActionRightWrapper>\n\t\t\t\t) }\n\t\t\t</Root>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <RangeControl\n * __nextHasNoMarginBottom\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={50}\n * label=\"Opacity\"\n * max={100}\n * min={0}\n * onChange={() => {}}\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef( UnforwardedRangeControl );\n\nexport default RangeControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,KAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA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,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAU,EAAE5H,uBAAwB,CAAC;AAAC,IAAA6H,QAAA,GAAAF,OAAA,CAAA5B,OAAA,GAEnD2B,YAAY","ignoreList":[]}
@@ -30,6 +30,23 @@ function useUniqueId(idProp) {
30
30
  const id = `inspector-select-control-${instanceId}`;
31
31
  return idProp || id;
32
32
  }
33
+ function SelectOptions({
34
+ options
35
+ }) {
36
+ return options.map(({
37
+ id,
38
+ label,
39
+ value,
40
+ ...optionProps
41
+ }, index) => {
42
+ const key = id || `${label}-${value}-${index}`;
43
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
44
+ value: value,
45
+ ...optionProps,
46
+ children: label
47
+ }, key);
48
+ });
49
+ }
33
50
  function UnforwardedSelectControl(props, ref) {
34
51
  const {
35
52
  className,
@@ -47,6 +64,7 @@ function UnforwardedSelectControl(props, ref) {
47
64
  children,
48
65
  prefix,
49
66
  suffix,
67
+ variant = 'default',
50
68
  __next40pxDefaultSize = false,
51
69
  __nextHasNoMarginBottom = false,
52
70
  ...restProps
@@ -85,11 +103,14 @@ function UnforwardedSelectControl(props, ref) {
85
103
  disabled: disabled,
86
104
  hideLabelFromVision: hideLabelFromVision,
87
105
  id: id,
106
+ isBorderless: variant === 'minimal',
88
107
  label: label,
89
108
  size: size,
90
109
  suffix: suffix || !multiple && /*#__PURE__*/(0, _jsxRuntime.jsx)(_chevronDown.default, {}),
91
110
  prefix: prefix,
92
111
  labelPosition: labelPosition,
112
+ __unstableInputWidth: variant === 'minimal' ? 'auto' : undefined,
113
+ variant: variant,
93
114
  __next40pxDefaultSize: __next40pxDefaultSize,
94
115
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectControlStyles.Select, {
95
116
  ...restProps,
@@ -103,14 +124,9 @@ function UnforwardedSelectControl(props, ref) {
103
124
  ref: ref,
104
125
  selectSize: size,
105
126
  value: valueProp,
106
- children: children || options.map((option, index) => {
107
- const key = option.id || `${option.label}-${option.value}-${index}`;
108
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
109
- value: option.value,
110
- disabled: option.disabled,
111
- hidden: option.hidden,
112
- children: option.label
113
- }, key);
127
+ variant: variant,
128
+ children: children || /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectOptions, {
129
+ options: options
114
130
  })
115
131
  })
116
132
  })
@@ -130,6 +146,7 @@ function UnforwardedSelectControl(props, ref) {
130
146
  *
131
147
  * return (
132
148
  * <SelectControl
149
+ * __nextHasNoMarginBottom
133
150
  * label="Size"
134
151
  * value={ size }
135
152
  * options={ [