@wordpress/components 28.2.0 → 28.4.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 (1329) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/CONTRIBUTING.md +1 -1
  3. package/build/animation/index.js.map +1 -1
  4. package/build/autocomplete/autocompleter-ui.js +1 -0
  5. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  6. package/build/autocomplete/index.js.map +1 -1
  7. package/build/autocomplete/types.js.map +1 -1
  8. package/build/base-control/index.js +14 -7
  9. package/build/base-control/index.js.map +1 -1
  10. package/build/base-control/types.js.map +1 -1
  11. package/build/border-box-control/border-box-control-visualizer/component.js +0 -4
  12. package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  13. package/build/button/index.js +14 -10
  14. package/build/button/index.js.map +1 -1
  15. package/build/button/types.js.map +1 -1
  16. package/build/checkbox-control/index.js +1 -0
  17. package/build/checkbox-control/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 +13 -1
  21. package/build/combobox-control/index.js.map +1 -1
  22. package/build/composite/current/index.js.map +1 -1
  23. package/build/custom-select-control/index.js +125 -174
  24. package/build/custom-select-control/index.js.map +1 -1
  25. package/build/custom-select-control/types.js +6 -0
  26. package/build/custom-select-control/types.js.map +1 -0
  27. package/build/custom-select-control-v2/custom-select.js +60 -33
  28. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  29. package/build/custom-select-control-v2/index.js +35 -7
  30. package/build/custom-select-control-v2/index.js.map +1 -1
  31. package/build/custom-select-control-v2/item.js +2 -0
  32. package/build/custom-select-control-v2/item.js.map +1 -1
  33. package/build/custom-select-control-v2/styles.js +106 -78
  34. package/build/custom-select-control-v2/styles.js.map +1 -1
  35. package/build/custom-select-control-v2/types.js.map +1 -1
  36. package/build/date-time/date-time/index.js +3 -1
  37. package/build/date-time/date-time/index.js.map +1 -1
  38. package/build/date-time/index.js +7 -0
  39. package/build/date-time/index.js.map +1 -1
  40. package/build/date-time/time/index.js +62 -145
  41. package/build/date-time/time/index.js.map +1 -1
  42. package/build/date-time/time-input/index.js +159 -0
  43. package/build/date-time/time-input/index.js.map +1 -0
  44. package/build/date-time/types.js.map +1 -1
  45. package/build/date-time/utils.js +64 -0
  46. package/build/date-time/utils.js.map +1 -1
  47. package/build/disclosure/index.js +0 -1
  48. package/build/disclosure/index.js.map +1 -1
  49. package/build/divider/component.js +0 -1
  50. package/build/divider/component.js.map +1 -1
  51. package/build/divider/types.js.map +1 -1
  52. package/build/dropdown-menu/index.js +1 -0
  53. package/build/dropdown-menu/index.js.map +1 -1
  54. package/build/dropdown-menu-v2/index.js +0 -1
  55. package/build/dropdown-menu-v2/index.js.map +1 -1
  56. package/build/dropdown-menu-v2/styles.js +15 -16
  57. package/build/dropdown-menu-v2/styles.js.map +1 -1
  58. package/build/dropdown-menu-v2/types.js.map +1 -1
  59. package/build/focal-point-picker/index.js +1 -0
  60. package/build/focal-point-picker/index.js.map +1 -1
  61. package/build/font-size-picker/font-size-picker-select.js +2 -2
  62. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  63. package/build/font-size-picker/index.js +37 -25
  64. package/build/font-size-picker/index.js.map +1 -1
  65. package/build/font-size-picker/types.js.map +1 -1
  66. package/build/font-size-picker/utils.js +0 -4
  67. package/build/font-size-picker/utils.js.map +1 -1
  68. package/build/form-token-field/index.js +8 -0
  69. package/build/form-token-field/index.js.map +1 -1
  70. package/build/form-token-field/token.js +4 -1
  71. package/build/form-token-field/token.js.map +1 -1
  72. package/build/higher-order/with-spoken-messages/index.js +1 -2
  73. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  74. package/build/index.js +2 -2
  75. package/build/index.js.map +1 -1
  76. package/build/menu-items-choice/types.js.map +1 -1
  77. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  78. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  79. package/build/popover/index.js +0 -4
  80. package/build/popover/index.js.map +1 -1
  81. package/build/popover/utils.js +0 -1
  82. package/build/popover/utils.js.map +1 -1
  83. package/build/private-apis.js +0 -6
  84. package/build/private-apis.js.map +1 -1
  85. package/build/progress-bar/styles.js +19 -13
  86. package/build/progress-bar/styles.js.map +1 -1
  87. package/build/radio-control/index.js +1 -1
  88. package/build/radio-control/index.js.map +1 -1
  89. package/build/radio-group/context.js +0 -1
  90. package/build/radio-group/context.js.map +1 -1
  91. package/build/radio-group/index.js +0 -1
  92. package/build/radio-group/index.js.map +1 -1
  93. package/build/radio-group/radio.js +0 -1
  94. package/build/radio-group/radio.js.map +1 -1
  95. package/build/range-control/index.js +5 -1
  96. package/build/range-control/index.js.map +1 -1
  97. package/build/range-control/styles/range-control-styles.js +34 -28
  98. package/build/range-control/styles/range-control-styles.js.map +1 -1
  99. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  100. package/build/select-control/index.js +6 -2
  101. package/build/select-control/index.js.map +1 -1
  102. package/build/select-control/styles/select-control-styles.js +49 -13
  103. package/build/select-control/styles/select-control-styles.js.map +1 -1
  104. package/build/select-control/types.js.map +1 -1
  105. package/build/tab-panel/index.js +0 -1
  106. package/build/tab-panel/index.js.map +1 -1
  107. package/build/tabs/index.js +0 -1
  108. package/build/tabs/index.js.map +1 -1
  109. package/build/tabs/styles.js +3 -5
  110. package/build/tabs/styles.js.map +1 -1
  111. package/build/tabs/tablist.js +4 -78
  112. package/build/tabs/tablist.js.map +1 -1
  113. package/build/tabs/types.js.map +1 -1
  114. package/build/textarea-control/index.js +1 -0
  115. package/build/textarea-control/index.js.map +1 -1
  116. package/build/toggle-control/index.js +10 -4
  117. package/build/toggle-control/index.js.map +1 -1
  118. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +0 -2
  119. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  120. package/build/toggle-group-control/toggle-group-control/component.js +0 -2
  121. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  122. package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -4
  123. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  124. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  125. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  126. package/build/toolbar/toolbar/toolbar-container.js +0 -1
  127. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  128. package/build/toolbar/toolbar/types.js.map +1 -1
  129. package/build/toolbar/toolbar-button/index.js +27 -19
  130. package/build/toolbar/toolbar-button/index.js.map +1 -1
  131. package/build/toolbar/toolbar-button/types.js.map +1 -1
  132. package/build/toolbar/toolbar-context/index.js +0 -1
  133. package/build/toolbar/toolbar-context/index.js.map +1 -1
  134. package/build/toolbar/toolbar-item/index.js +1 -1
  135. package/build/toolbar/toolbar-item/index.js.map +1 -1
  136. package/build/tools-panel/tools-panel-header/component.js +1 -1
  137. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  138. package/build/tooltip/index.js +3 -2
  139. package/build/tooltip/index.js.map +1 -1
  140. package/build/tooltip/types.js.map +1 -1
  141. package/build/tree-select/index.js +1 -0
  142. package/build/tree-select/index.js.map +1 -1
  143. package/build/unit-control/index.js +3 -3
  144. package/build/unit-control/index.js.map +1 -1
  145. package/build/unit-control/styles/unit-control-styles.js +7 -7
  146. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  147. package/build/utils/element-rect.js +157 -0
  148. package/build/utils/element-rect.js.map +1 -0
  149. package/build/utils/hooks/use-event.js +41 -0
  150. package/build/utils/hooks/use-event.js.map +1 -0
  151. package/build/utils/hooks/use-on-value-update.js +46 -0
  152. package/build/utils/hooks/use-on-value-update.js.map +1 -0
  153. package/build/utils/hooks/use-update-effect.js +4 -1
  154. package/build/utils/hooks/use-update-effect.js.map +1 -1
  155. package/build-module/animation/index.js +0 -1
  156. package/build-module/animation/index.js.map +1 -1
  157. package/build-module/autocomplete/autocompleter-ui.js +1 -0
  158. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  159. package/build-module/autocomplete/index.js.map +1 -1
  160. package/build-module/autocomplete/types.js.map +1 -1
  161. package/build-module/base-control/index.js +13 -6
  162. package/build-module/base-control/index.js.map +1 -1
  163. package/build-module/base-control/types.js.map +1 -1
  164. package/build-module/border-box-control/border-box-control-visualizer/component.js +0 -4
  165. package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  166. package/build-module/button/index.js +14 -10
  167. package/build-module/button/index.js.map +1 -1
  168. package/build-module/button/types.js.map +1 -1
  169. package/build-module/checkbox-control/index.js +1 -0
  170. package/build-module/checkbox-control/index.js.map +1 -1
  171. package/build-module/color-picker/component.js +9 -18
  172. package/build-module/color-picker/component.js.map +1 -1
  173. package/build-module/combobox-control/index.js +13 -1
  174. package/build-module/combobox-control/index.js.map +1 -1
  175. package/build-module/composite/current/index.js +0 -3
  176. package/build-module/composite/current/index.js.map +1 -1
  177. package/build-module/custom-select-control/index.js +123 -173
  178. package/build-module/custom-select-control/index.js.map +1 -1
  179. package/build-module/custom-select-control/types.js +2 -0
  180. package/build-module/custom-select-control/types.js.map +1 -0
  181. package/build-module/custom-select-control-v2/custom-select.js +61 -35
  182. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  183. package/build-module/custom-select-control-v2/index.js +27 -1
  184. package/build-module/custom-select-control-v2/index.js.map +1 -1
  185. package/build-module/custom-select-control-v2/item.js +2 -0
  186. package/build-module/custom-select-control-v2/item.js.map +1 -1
  187. package/build-module/custom-select-control-v2/styles.js +105 -77
  188. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  189. package/build-module/custom-select-control-v2/types.js.map +1 -1
  190. package/build-module/date-time/date-time/index.js +4 -1
  191. package/build-module/date-time/date-time/index.js.map +1 -1
  192. package/build-module/date-time/index.js +2 -1
  193. package/build-module/date-time/index.js.map +1 -1
  194. package/build-module/date-time/time/index.js +65 -149
  195. package/build-module/date-time/time/index.js.map +1 -1
  196. package/build-module/date-time/time-input/index.js +151 -0
  197. package/build-module/date-time/time-input/index.js.map +1 -0
  198. package/build-module/date-time/types.js.map +1 -1
  199. package/build-module/date-time/utils.js +61 -0
  200. package/build-module/date-time/utils.js.map +1 -1
  201. package/build-module/disclosure/index.js +0 -1
  202. package/build-module/disclosure/index.js.map +1 -1
  203. package/build-module/divider/component.js +0 -1
  204. package/build-module/divider/component.js.map +1 -1
  205. package/build-module/divider/types.js.map +1 -1
  206. package/build-module/dropdown-menu/index.js +1 -0
  207. package/build-module/dropdown-menu/index.js.map +1 -1
  208. package/build-module/dropdown-menu-v2/index.js +0 -1
  209. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  210. package/build-module/dropdown-menu-v2/styles.js +14 -15
  211. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  212. package/build-module/dropdown-menu-v2/types.js.map +1 -1
  213. package/build-module/focal-point-picker/index.js +1 -0
  214. package/build-module/focal-point-picker/index.js.map +1 -1
  215. package/build-module/font-size-picker/font-size-picker-select.js +2 -2
  216. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  217. package/build-module/font-size-picker/index.js +37 -25
  218. package/build-module/font-size-picker/index.js.map +1 -1
  219. package/build-module/font-size-picker/types.js.map +1 -1
  220. package/build-module/font-size-picker/utils.js +0 -4
  221. package/build-module/font-size-picker/utils.js.map +1 -1
  222. package/build-module/form-token-field/index.js +8 -0
  223. package/build-module/form-token-field/index.js.map +1 -1
  224. package/build-module/form-token-field/token.js +4 -1
  225. package/build-module/form-token-field/token.js.map +1 -1
  226. package/build-module/higher-order/with-spoken-messages/index.js +1 -2
  227. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  228. package/build-module/index.js +1 -1
  229. package/build-module/index.js.map +1 -1
  230. package/build-module/menu-items-choice/types.js.map +1 -1
  231. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  232. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  233. package/build-module/popover/index.js +0 -3
  234. package/build-module/popover/index.js.map +1 -1
  235. package/build-module/popover/utils.js +0 -1
  236. package/build-module/popover/utils.js.map +1 -1
  237. package/build-module/private-apis.js +0 -6
  238. package/build-module/private-apis.js.map +1 -1
  239. package/build-module/progress-bar/styles.js +21 -13
  240. package/build-module/progress-bar/styles.js.map +1 -1
  241. package/build-module/radio-control/index.js +1 -1
  242. package/build-module/radio-control/index.js.map +1 -1
  243. package/build-module/radio-group/context.js +0 -1
  244. package/build-module/radio-group/context.js.map +1 -1
  245. package/build-module/radio-group/index.js +0 -1
  246. package/build-module/radio-group/index.js.map +1 -1
  247. package/build-module/radio-group/radio.js +0 -1
  248. package/build-module/radio-group/radio.js.map +1 -1
  249. package/build-module/range-control/index.js +5 -1
  250. package/build-module/range-control/index.js.map +1 -1
  251. package/build-module/range-control/styles/range-control-styles.js +34 -28
  252. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  253. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  254. package/build-module/select-control/index.js +7 -3
  255. package/build-module/select-control/index.js.map +1 -1
  256. package/build-module/select-control/styles/select-control-styles.js +47 -7
  257. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  258. package/build-module/select-control/types.js.map +1 -1
  259. package/build-module/tab-panel/index.js +0 -1
  260. package/build-module/tab-panel/index.js.map +1 -1
  261. package/build-module/tabs/index.js +0 -1
  262. package/build-module/tabs/index.js.map +1 -1
  263. package/build-module/tabs/styles.js +3 -4
  264. package/build-module/tabs/styles.js.map +1 -1
  265. package/build-module/tabs/tablist.js +4 -78
  266. package/build-module/tabs/tablist.js.map +1 -1
  267. package/build-module/tabs/types.js.map +1 -1
  268. package/build-module/textarea-control/index.js +1 -0
  269. package/build-module/textarea-control/index.js.map +1 -1
  270. package/build-module/toggle-control/index.js +10 -4
  271. package/build-module/toggle-control/index.js.map +1 -1
  272. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +0 -1
  273. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  274. package/build-module/toggle-group-control/toggle-group-control/component.js +0 -1
  275. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  276. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +3 -2
  277. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  278. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  279. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  280. package/build-module/toolbar/toolbar/toolbar-container.js +0 -1
  281. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  282. package/build-module/toolbar/toolbar/types.js.map +1 -1
  283. package/build-module/toolbar/toolbar-button/index.js +27 -19
  284. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  285. package/build-module/toolbar/toolbar-button/types.js.map +1 -1
  286. package/build-module/toolbar/toolbar-context/index.js +0 -1
  287. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  288. package/build-module/toolbar/toolbar-item/index.js +1 -1
  289. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  290. package/build-module/tools-panel/tools-panel-header/component.js +1 -1
  291. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  292. package/build-module/tooltip/index.js +3 -2
  293. package/build-module/tooltip/index.js.map +1 -1
  294. package/build-module/tooltip/types.js.map +1 -1
  295. package/build-module/tree-select/index.js +1 -0
  296. package/build-module/tree-select/index.js.map +1 -1
  297. package/build-module/unit-control/index.js +3 -3
  298. package/build-module/unit-control/index.js.map +1 -1
  299. package/build-module/unit-control/styles/unit-control-styles.js +7 -7
  300. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  301. package/build-module/utils/element-rect.js +147 -0
  302. package/build-module/utils/element-rect.js.map +1 -0
  303. package/build-module/utils/hooks/use-event.js +35 -0
  304. package/build-module/utils/hooks/use-event.js.map +1 -0
  305. package/build-module/utils/hooks/use-on-value-update.js +39 -0
  306. package/build-module/utils/hooks/use-on-value-update.js.map +1 -0
  307. package/build-module/utils/hooks/use-update-effect.js +4 -1
  308. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  309. package/build-style/style-rtl.css +80 -95
  310. package/build-style/style.css +80 -95
  311. package/build-types/alignment-matrix-control/cell.d.ts +0 -1
  312. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
  313. package/build-types/alignment-matrix-control/icon.d.ts +0 -1
  314. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
  315. package/build-types/alignment-matrix-control/index.d.ts +0 -1
  316. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  317. package/build-types/alignment-matrix-control/stories/index.story.d.ts +0 -1
  318. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  319. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +8 -9
  320. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +1 -1
  321. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +10 -11
  322. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
  323. package/build-types/angle-picker-control/angle-circle.d.ts +0 -1
  324. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  325. package/build-types/angle-picker-control/index.d.ts +0 -1
  326. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  327. package/build-types/angle-picker-control/stories/index.story.d.ts +0 -1
  328. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  329. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +7 -8
  330. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  331. package/build-types/animate/index.d.ts +0 -1
  332. package/build-types/animate/index.d.ts.map +1 -1
  333. package/build-types/animate/types.d.ts +0 -1
  334. package/build-types/animate/types.d.ts.map +1 -1
  335. package/build-types/animation/index.d.ts.map +1 -1
  336. package/build-types/autocomplete/autocompleter-ui.d.ts +0 -1
  337. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  338. package/build-types/autocomplete/index.d.ts +2 -3
  339. package/build-types/autocomplete/index.d.ts.map +1 -1
  340. package/build-types/autocomplete/types.d.ts +2 -3
  341. package/build-types/autocomplete/types.d.ts.map +1 -1
  342. package/build-types/base-control/hooks.d.ts +3 -4
  343. package/build-types/base-control/hooks.d.ts.map +1 -1
  344. package/build-types/base-control/index.d.ts +6 -21
  345. package/build-types/base-control/index.d.ts.map +1 -1
  346. package/build-types/base-control/stories/index.story.d.ts +0 -1
  347. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  348. package/build-types/base-control/styles/base-control-styles.d.ts +10 -11
  349. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  350. package/build-types/base-control/types.d.ts +1 -1
  351. package/build-types/border-box-control/border-box-control/component.d.ts +4 -5
  352. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  353. package/build-types/border-box-control/border-box-control/hook.d.ts +14 -16
  354. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  355. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts +0 -1
  356. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts.map +1 -1
  357. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +12 -14
  358. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  359. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +5 -6
  360. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  361. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +14 -16
  362. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  363. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts +1 -2
  364. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts.map +1 -1
  365. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +9 -11
  366. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  367. package/build-types/border-box-control/stories/index.story.d.ts +4 -5
  368. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  369. package/build-types/border-box-control/styles.d.ts +3 -3
  370. package/build-types/border-box-control/utils.d.ts.map +1 -1
  371. package/build-types/border-control/border-control/component.d.ts +14 -15
  372. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  373. package/build-types/border-control/border-control/hook.d.ts +17 -19
  374. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  375. package/build-types/border-control/border-control-dropdown/component.d.ts +6 -7
  376. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  377. package/build-types/border-control/border-control-dropdown/hook.d.ts +12 -14
  378. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  379. package/build-types/border-control/border-control-style-picker/component.d.ts +2 -3
  380. package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
  381. package/build-types/border-control/stories/index.story.d.ts +84 -85
  382. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  383. package/build-types/border-control/styles.d.ts +2 -2
  384. package/build-types/box-control/all-input-control.d.ts +0 -1
  385. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  386. package/build-types/box-control/axial-input-controls.d.ts +0 -1
  387. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  388. package/build-types/box-control/icon.d.ts +0 -1
  389. package/build-types/box-control/icon.d.ts.map +1 -1
  390. package/build-types/box-control/index.d.ts +0 -1
  391. package/build-types/box-control/index.d.ts.map +1 -1
  392. package/build-types/box-control/input-controls.d.ts +0 -1
  393. package/build-types/box-control/input-controls.d.ts.map +1 -1
  394. package/build-types/box-control/linked-button.d.ts +0 -1
  395. package/build-types/box-control/linked-button.d.ts.map +1 -1
  396. package/build-types/box-control/stories/index.story.d.ts +312 -350
  397. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  398. package/build-types/box-control/styles/box-control-icon-styles.d.ts +16 -17
  399. package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
  400. package/build-types/box-control/styles/box-control-styles.d.ts +44 -45
  401. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  402. package/build-types/box-control/types.d.ts +0 -1
  403. package/build-types/box-control/types.d.ts.map +1 -1
  404. package/build-types/button/deprecated.d.ts +69 -70
  405. package/build-types/button/deprecated.d.ts.map +1 -1
  406. package/build-types/button/index.d.ts.map +1 -1
  407. package/build-types/button/stories/e2e/index.story.d.ts +0 -1
  408. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  409. package/build-types/button/stories/index.story.d.ts +0 -1
  410. package/build-types/button/stories/index.story.d.ts.map +1 -1
  411. package/build-types/button/types.d.ts +36 -12
  412. package/build-types/button/types.d.ts.map +1 -1
  413. package/build-types/button-group/index.d.ts +0 -1
  414. package/build-types/button-group/index.d.ts.map +1 -1
  415. package/build-types/card/card/component.d.ts +5 -6
  416. package/build-types/card/card/component.d.ts.map +1 -1
  417. package/build-types/card/card/hook.d.ts +10 -12
  418. package/build-types/card/card/hook.d.ts.map +1 -1
  419. package/build-types/card/card-body/component.d.ts +4 -5
  420. package/build-types/card/card-body/component.d.ts.map +1 -1
  421. package/build-types/card/card-body/hook.d.ts +10 -12
  422. package/build-types/card/card-body/hook.d.ts.map +1 -1
  423. package/build-types/card/card-divider/component.d.ts +4 -5
  424. package/build-types/card/card-divider/component.d.ts.map +1 -1
  425. package/build-types/card/card-divider/hook.d.ts +15 -17
  426. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  427. package/build-types/card/card-footer/component.d.ts +5 -6
  428. package/build-types/card/card-footer/component.d.ts.map +1 -1
  429. package/build-types/card/card-footer/hook.d.ts +10 -12
  430. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  431. package/build-types/card/card-header/component.d.ts +4 -5
  432. package/build-types/card/card-header/component.d.ts.map +1 -1
  433. package/build-types/card/card-header/hook.d.ts +10 -12
  434. package/build-types/card/card-header/hook.d.ts.map +1 -1
  435. package/build-types/card/card-media/component.d.ts +0 -1
  436. package/build-types/card/card-media/component.d.ts.map +1 -1
  437. package/build-types/card/card-media/hook.d.ts +10 -12
  438. package/build-types/card/card-media/hook.d.ts.map +1 -1
  439. package/build-types/card/context.d.ts +0 -1
  440. package/build-types/card/context.d.ts.map +1 -1
  441. package/build-types/card/stories/index.story.d.ts +3 -22
  442. package/build-types/card/stories/index.story.d.ts.map +1 -1
  443. package/build-types/checkbox-control/index.d.ts +1 -1
  444. package/build-types/checkbox-control/index.d.ts.map +1 -1
  445. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +0 -1
  446. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  447. package/build-types/circular-option-picker/circular-option-picker-context.d.ts +0 -1
  448. package/build-types/circular-option-picker/circular-option-picker-context.d.ts.map +1 -1
  449. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +0 -1
  450. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -1
  451. package/build-types/circular-option-picker/circular-option-picker-option.d.ts +0 -1
  452. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  453. package/build-types/circular-option-picker/circular-option-picker.d.ts +0 -1
  454. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  455. package/build-types/clipboard-button/index.d.ts +0 -1
  456. package/build-types/clipboard-button/index.d.ts.map +1 -1
  457. package/build-types/color-indicator/index.d.ts +0 -1
  458. package/build-types/color-indicator/index.d.ts.map +1 -1
  459. package/build-types/color-palette/index.d.ts +0 -1
  460. package/build-types/color-palette/index.d.ts.map +1 -1
  461. package/build-types/color-palette/stories/index.story.d.ts +0 -1
  462. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  463. package/build-types/color-palette/styles.d.ts +5 -6
  464. package/build-types/color-palette/styles.d.ts.map +1 -1
  465. package/build-types/color-palette/utils.d.ts +1 -1
  466. package/build-types/color-palette/utils.d.ts.map +1 -1
  467. package/build-types/color-picker/color-copy-button.d.ts +0 -1
  468. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  469. package/build-types/color-picker/color-input.d.ts +0 -1
  470. package/build-types/color-picker/color-input.d.ts.map +1 -1
  471. package/build-types/color-picker/component.d.ts +5 -6
  472. package/build-types/color-picker/component.d.ts.map +1 -1
  473. package/build-types/color-picker/hex-input.d.ts +0 -1
  474. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  475. package/build-types/color-picker/hsl-input.d.ts +0 -1
  476. package/build-types/color-picker/hsl-input.d.ts.map +1 -1
  477. package/build-types/color-picker/input-with-slider.d.ts +0 -1
  478. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  479. package/build-types/color-picker/legacy-adapter.d.ts +0 -1
  480. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
  481. package/build-types/color-picker/picker.d.ts +0 -1
  482. package/build-types/color-picker/picker.d.ts.map +1 -1
  483. package/build-types/color-picker/rgb-input.d.ts +0 -1
  484. package/build-types/color-picker/rgb-input.d.ts.map +1 -1
  485. package/build-types/color-picker/stories/index.story.d.ts +2 -9
  486. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  487. package/build-types/color-picker/styles.d.ts +52 -53
  488. package/build-types/color-picker/styles.d.ts.map +1 -1
  489. package/build-types/combobox-control/index.d.ts +1 -1
  490. package/build-types/combobox-control/index.d.ts.map +1 -1
  491. package/build-types/combobox-control/stories/index.story.d.ts +41 -41
  492. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  493. package/build-types/combobox-control/styles.d.ts +1 -2
  494. package/build-types/combobox-control/styles.d.ts.map +1 -1
  495. package/build-types/combobox-control/types.d.ts +0 -1
  496. package/build-types/combobox-control/types.d.ts.map +1 -1
  497. package/build-types/composite/current/index.d.ts.map +1 -1
  498. package/build-types/composite/current/stories/utils.d.ts +0 -1
  499. package/build-types/composite/current/stories/utils.d.ts.map +1 -1
  500. package/build-types/composite/legacy/index.d.ts +0 -1
  501. package/build-types/composite/legacy/index.d.ts.map +1 -1
  502. package/build-types/composite/legacy/stories/utils.d.ts +0 -1
  503. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  504. package/build-types/confirm-dialog/component.d.ts +0 -1
  505. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  506. package/build-types/confirm-dialog/stories/index.story.d.ts +0 -1
  507. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  508. package/build-types/context/context-system-provider.d.ts +1 -1
  509. package/build-types/context/context-system-provider.d.ts.map +1 -1
  510. package/build-types/context/get-styled-class-name-from-key.d.ts +9 -1
  511. package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
  512. package/build-types/context/use-context-system.d.ts +1 -1
  513. package/build-types/context/use-context-system.d.ts.map +1 -1
  514. package/build-types/context/utils.d.ts.map +1 -1
  515. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +0 -1
  516. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  517. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +0 -1
  518. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  519. package/build-types/custom-gradient-picker/index.d.ts +0 -1
  520. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  521. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -3
  522. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -1
  523. package/build-types/custom-gradient-picker/types.d.ts +0 -1
  524. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  525. package/build-types/custom-gradient-picker/utils.d.ts.map +1 -1
  526. package/build-types/custom-select-control/index.d.ts +3 -2
  527. package/build-types/custom-select-control/index.d.ts.map +1 -1
  528. package/build-types/custom-select-control/stories/index.story.d.ts +6 -42
  529. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  530. package/build-types/custom-select-control/test/index.d.ts.map +1 -0
  531. package/build-types/custom-select-control/types.d.ts +122 -0
  532. package/build-types/custom-select-control/types.d.ts.map +1 -0
  533. package/build-types/custom-select-control-v2/custom-select.d.ts +2 -3
  534. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  535. package/build-types/custom-select-control-v2/index.d.ts +7 -4
  536. package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
  537. package/build-types/custom-select-control-v2/item.d.ts +0 -1
  538. package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
  539. package/build-types/custom-select-control-v2/stories/{default.story.d.ts → index.story.d.ts} +13 -11
  540. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -0
  541. package/build-types/custom-select-control-v2/styles.d.ts +39 -48
  542. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  543. package/build-types/custom-select-control-v2/types.d.ts +12 -108
  544. package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
  545. package/build-types/dashicon/index.d.ts +0 -1
  546. package/build-types/dashicon/index.d.ts.map +1 -1
  547. package/build-types/date-time/date/index.d.ts +0 -1
  548. package/build-types/date-time/date/index.d.ts.map +1 -1
  549. package/build-types/date-time/date/styles.d.ts +15 -16
  550. package/build-types/date-time/date/styles.d.ts.map +1 -1
  551. package/build-types/date-time/date-time/index.d.ts +1 -2
  552. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  553. package/build-types/date-time/date-time/styles.d.ts +3 -4
  554. package/build-types/date-time/date-time/styles.d.ts.map +1 -1
  555. package/build-types/date-time/index.d.ts +2 -1
  556. package/build-types/date-time/index.d.ts.map +1 -1
  557. package/build-types/date-time/stories/time-input.story.d.ts +12 -0
  558. package/build-types/date-time/stories/time-input.story.d.ts.map +1 -0
  559. package/build-types/date-time/time/index.d.ts +1 -2
  560. package/build-types/date-time/time/index.d.ts.map +1 -1
  561. package/build-types/date-time/time/styles.d.ts +64 -65
  562. package/build-types/date-time/time/styles.d.ts.map +1 -1
  563. package/build-types/date-time/time/timezone.d.ts +0 -1
  564. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  565. package/build-types/date-time/time-input/index.d.ts +4 -0
  566. package/build-types/date-time/time-input/index.d.ts.map +1 -0
  567. package/build-types/date-time/time-input/test/index.d.ts +2 -0
  568. package/build-types/date-time/time-input/test/index.d.ts.map +1 -0
  569. package/build-types/date-time/types.d.ts +53 -0
  570. package/build-types/date-time/types.d.ts.map +1 -1
  571. package/build-types/date-time/utils.d.ts +39 -0
  572. package/build-types/date-time/utils.d.ts.map +1 -1
  573. package/build-types/dimension-control/index.d.ts +0 -1
  574. package/build-types/dimension-control/index.d.ts.map +1 -1
  575. package/build-types/disabled/index.d.ts +0 -1
  576. package/build-types/disabled/index.d.ts.map +1 -1
  577. package/build-types/disabled/types.d.ts +0 -1
  578. package/build-types/disabled/types.d.ts.map +1 -1
  579. package/build-types/disclosure/index.d.ts +0 -1
  580. package/build-types/disclosure/index.d.ts.map +1 -1
  581. package/build-types/disclosure/types.d.ts +0 -1
  582. package/build-types/disclosure/types.d.ts.map +1 -1
  583. package/build-types/divider/component.d.ts +4 -5
  584. package/build-types/divider/component.d.ts.map +1 -1
  585. package/build-types/divider/styles.d.ts +6 -7
  586. package/build-types/divider/styles.d.ts.map +1 -1
  587. package/build-types/divider/types.d.ts.map +1 -1
  588. package/build-types/draggable/index.d.ts +0 -1
  589. package/build-types/draggable/index.d.ts.map +1 -1
  590. package/build-types/drop-zone/index.d.ts +0 -1
  591. package/build-types/drop-zone/index.d.ts.map +1 -1
  592. package/build-types/drop-zone/provider.d.ts +0 -1
  593. package/build-types/drop-zone/provider.d.ts.map +1 -1
  594. package/build-types/drop-zone/stories/index.story.d.ts +0 -1
  595. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  596. package/build-types/dropdown/dropdown-content-wrapper.d.ts +0 -1
  597. package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
  598. package/build-types/dropdown/index.d.ts +0 -1
  599. package/build-types/dropdown/index.d.ts.map +1 -1
  600. package/build-types/dropdown/stories/index.story.d.ts +5 -6
  601. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  602. package/build-types/dropdown/styles.d.ts +2 -3
  603. package/build-types/dropdown/styles.d.ts.map +1 -1
  604. package/build-types/dropdown-menu/index.d.ts +0 -1
  605. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  606. package/build-types/dropdown-menu/stories/index.story.d.ts +3 -4
  607. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  608. package/build-types/dropdown-menu-v2/index.d.ts +0 -1
  609. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  610. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  611. package/build-types/dropdown-menu-v2/styles.d.ts +41 -42
  612. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  613. package/build-types/dropdown-menu-v2/types.d.ts +0 -1
  614. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  615. package/build-types/duotone-picker/color-list-picker/index.d.ts +0 -1
  616. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  617. package/build-types/duotone-picker/custom-duotone-bar.d.ts +0 -1
  618. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
  619. package/build-types/duotone-picker/duotone-picker.d.ts +0 -1
  620. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  621. package/build-types/duotone-picker/duotone-swatch.d.ts +0 -1
  622. package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -1
  623. package/build-types/elevation/component.d.ts +0 -1
  624. package/build-types/elevation/component.d.ts.map +1 -1
  625. package/build-types/elevation/hook.d.ts +9 -11
  626. package/build-types/elevation/hook.d.ts.map +1 -1
  627. package/build-types/external-link/index.d.ts +0 -1
  628. package/build-types/external-link/index.d.ts.map +1 -1
  629. package/build-types/flex/context.d.ts +2 -3
  630. package/build-types/flex/context.d.ts.map +1 -1
  631. package/build-types/flex/flex/component.d.ts +0 -1
  632. package/build-types/flex/flex/component.d.ts.map +1 -1
  633. package/build-types/flex/flex/hook.d.ts +9 -11
  634. package/build-types/flex/flex/hook.d.ts.map +1 -1
  635. package/build-types/flex/flex-block/component.d.ts +0 -1
  636. package/build-types/flex/flex-block/component.d.ts.map +1 -1
  637. package/build-types/flex/flex-block/hook.d.ts +9 -11
  638. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  639. package/build-types/flex/flex-item/component.d.ts +0 -1
  640. package/build-types/flex/flex-item/component.d.ts.map +1 -1
  641. package/build-types/flex/flex-item/hook.d.ts +9 -11
  642. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  643. package/build-types/focal-point-picker/controls.d.ts +0 -1
  644. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  645. package/build-types/focal-point-picker/focal-point.d.ts +0 -1
  646. package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
  647. package/build-types/focal-point-picker/grid.d.ts +0 -1
  648. package/build-types/focal-point-picker/grid.d.ts.map +1 -1
  649. package/build-types/focal-point-picker/index.d.ts +1 -1
  650. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  651. package/build-types/focal-point-picker/media.d.ts +0 -1
  652. package/build-types/focal-point-picker/media.d.ts.map +1 -1
  653. package/build-types/focal-point-picker/stories/index.story.d.ts +32 -33
  654. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  655. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +26 -27
  656. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  657. package/build-types/focal-point-picker/styles/focal-point-style.d.ts +2 -3
  658. package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
  659. package/build-types/focusable-iframe/index.d.ts +0 -1
  660. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  661. package/build-types/font-size-picker/font-size-picker-select.d.ts +0 -1
  662. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  663. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts +0 -1
  664. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  665. package/build-types/font-size-picker/index.d.ts +0 -1
  666. package/build-types/font-size-picker/index.d.ts.map +1 -1
  667. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +0 -1
  668. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  669. package/build-types/font-size-picker/styles.d.ts +10 -11
  670. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  671. package/build-types/font-size-picker/types.d.ts +6 -5
  672. package/build-types/font-size-picker/types.d.ts.map +1 -1
  673. package/build-types/font-size-picker/utils.d.ts.map +1 -1
  674. package/build-types/form-file-upload/index.d.ts +0 -1
  675. package/build-types/form-file-upload/index.d.ts.map +1 -1
  676. package/build-types/form-file-upload/stories/index.story.d.ts +0 -1
  677. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  678. package/build-types/form-token-field/index.d.ts +0 -1
  679. package/build-types/form-token-field/index.d.ts.map +1 -1
  680. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  681. package/build-types/form-token-field/styles.d.ts +1 -2
  682. package/build-types/form-token-field/styles.d.ts.map +1 -1
  683. package/build-types/form-token-field/suggestions-list.d.ts +0 -1
  684. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  685. package/build-types/form-token-field/token.d.ts +0 -1
  686. package/build-types/form-token-field/token.d.ts.map +1 -1
  687. package/build-types/gradient-picker/index.d.ts +0 -1
  688. package/build-types/gradient-picker/index.d.ts.map +1 -1
  689. package/build-types/gradient-picker/types.d.ts +0 -1
  690. package/build-types/gradient-picker/types.d.ts.map +1 -1
  691. package/build-types/grid/component.d.ts +0 -1
  692. package/build-types/grid/component.d.ts.map +1 -1
  693. package/build-types/grid/hook.d.ts +9 -11
  694. package/build-types/grid/hook.d.ts.map +1 -1
  695. package/build-types/guide/icons.d.ts +0 -1
  696. package/build-types/guide/icons.d.ts.map +1 -1
  697. package/build-types/guide/index.d.ts +0 -1
  698. package/build-types/guide/index.d.ts.map +1 -1
  699. package/build-types/guide/page-control.d.ts +0 -1
  700. package/build-types/guide/page-control.d.ts.map +1 -1
  701. package/build-types/guide/page.d.ts +0 -1
  702. package/build-types/guide/page.d.ts.map +1 -1
  703. package/build-types/h-stack/component.d.ts +2 -3
  704. package/build-types/h-stack/component.d.ts.map +1 -1
  705. package/build-types/h-stack/hook.d.ts +9 -11
  706. package/build-types/h-stack/hook.d.ts.map +1 -1
  707. package/build-types/heading/component.d.ts +4 -5
  708. package/build-types/heading/component.d.ts.map +1 -1
  709. package/build-types/heading/hook.d.ts +9 -11
  710. package/build-types/heading/hook.d.ts.map +1 -1
  711. package/build-types/higher-order/navigate-regions/index.d.ts +1 -2
  712. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  713. package/build-types/higher-order/with-constrained-tabbing/index.d.ts +0 -1
  714. package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
  715. package/build-types/higher-order/with-fallback-styles/index.d.ts +3 -4
  716. package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -1
  717. package/build-types/higher-order/with-filters/index.d.ts +4 -5
  718. package/build-types/higher-order/with-filters/index.d.ts.map +1 -1
  719. package/build-types/higher-order/with-focus-outside/index.d.ts +0 -1
  720. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  721. package/build-types/higher-order/with-focus-return/index.d.ts +0 -1
  722. package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -1
  723. package/build-types/higher-order/with-notices/index.d.ts +0 -1
  724. package/build-types/higher-order/with-notices/index.d.ts.map +1 -1
  725. package/build-types/higher-order/with-notices/types.d.ts +0 -1
  726. package/build-types/higher-order/with-notices/types.d.ts.map +1 -1
  727. package/build-types/higher-order/with-spoken-messages/index.d.ts +1 -3
  728. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  729. package/build-types/index.d.ts +1 -1
  730. package/build-types/index.d.ts.map +1 -1
  731. package/build-types/input-control/backdrop.d.ts +0 -1
  732. package/build-types/input-control/backdrop.d.ts.map +1 -1
  733. package/build-types/input-control/input-base.d.ts +0 -1
  734. package/build-types/input-control/input-base.d.ts.map +1 -1
  735. package/build-types/input-control/input-field.d.ts +0 -1
  736. package/build-types/input-control/input-field.d.ts.map +1 -1
  737. package/build-types/input-control/input-prefix-wrapper.d.ts +0 -1
  738. package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
  739. package/build-types/input-control/input-suffix-wrapper.d.ts +0 -1
  740. package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
  741. package/build-types/input-control/label.d.ts +0 -1
  742. package/build-types/input-control/label.d.ts.map +1 -1
  743. package/build-types/input-control/reducer/reducer.d.ts +9 -9
  744. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  745. package/build-types/input-control/stories/index.story.d.ts +0 -1
  746. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  747. package/build-types/input-control/styles/input-control-styles.d.ts +13 -13
  748. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  749. package/build-types/isolated-event-container/index.d.ts +0 -1
  750. package/build-types/isolated-event-container/index.d.ts.map +1 -1
  751. package/build-types/item-group/context.d.ts +0 -1
  752. package/build-types/item-group/context.d.ts.map +1 -1
  753. package/build-types/item-group/item/component.d.ts +0 -1
  754. package/build-types/item-group/item/component.d.ts.map +1 -1
  755. package/build-types/item-group/item/hook.d.ts +10 -12
  756. package/build-types/item-group/item/hook.d.ts.map +1 -1
  757. package/build-types/item-group/item-group/component.d.ts +0 -1
  758. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  759. package/build-types/item-group/item-group/hook.d.ts +11 -13
  760. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  761. package/build-types/item-group/styles.d.ts +1 -1
  762. package/build-types/item-group/types.d.ts +0 -1
  763. package/build-types/item-group/types.d.ts.map +1 -1
  764. package/build-types/keyboard-shortcuts/index.d.ts +0 -1
  765. package/build-types/keyboard-shortcuts/index.d.ts.map +1 -1
  766. package/build-types/keyboard-shortcuts/types.d.ts +0 -1
  767. package/build-types/keyboard-shortcuts/types.d.ts.map +1 -1
  768. package/build-types/menu-group/index.d.ts +0 -1
  769. package/build-types/menu-group/index.d.ts.map +1 -1
  770. package/build-types/menu-item/index.d.ts +8 -9
  771. package/build-types/menu-item/index.d.ts.map +1 -1
  772. package/build-types/menu-item/stories/index.story.d.ts +32 -33
  773. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  774. package/build-types/menu-items-choice/index.d.ts +0 -1
  775. package/build-types/menu-items-choice/index.d.ts.map +1 -1
  776. package/build-types/menu-items-choice/types.d.ts +1 -1
  777. package/build-types/menu-items-choice/types.d.ts.map +1 -1
  778. package/build-types/modal/index.d.ts +0 -1
  779. package/build-types/modal/index.d.ts.map +1 -1
  780. package/build-types/navigable-container/container.d.ts +8 -8
  781. package/build-types/navigable-container/menu.d.ts +7 -7
  782. package/build-types/navigable-container/tabbable.d.ts +6 -6
  783. package/build-types/navigation/back-button/index.d.ts +0 -1
  784. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  785. package/build-types/navigation/context.d.ts +0 -1
  786. package/build-types/navigation/context.d.ts.map +1 -1
  787. package/build-types/navigation/group/context.d.ts +0 -1
  788. package/build-types/navigation/group/context.d.ts.map +1 -1
  789. package/build-types/navigation/group/index.d.ts +0 -1
  790. package/build-types/navigation/group/index.d.ts.map +1 -1
  791. package/build-types/navigation/index.d.ts +0 -1
  792. package/build-types/navigation/index.d.ts.map +1 -1
  793. package/build-types/navigation/item/base-content.d.ts +0 -1
  794. package/build-types/navigation/item/base-content.d.ts.map +1 -1
  795. package/build-types/navigation/item/base.d.ts +0 -1
  796. package/build-types/navigation/item/base.d.ts.map +1 -1
  797. package/build-types/navigation/item/index.d.ts +0 -1
  798. package/build-types/navigation/item/index.d.ts.map +1 -1
  799. package/build-types/navigation/menu/context.d.ts +0 -1
  800. package/build-types/navigation/menu/context.d.ts.map +1 -1
  801. package/build-types/navigation/menu/index.d.ts +0 -1
  802. package/build-types/navigation/menu/index.d.ts.map +1 -1
  803. package/build-types/navigation/menu/menu-title-search.d.ts +0 -1
  804. package/build-types/navigation/menu/menu-title-search.d.ts.map +1 -1
  805. package/build-types/navigation/menu/menu-title.d.ts +0 -1
  806. package/build-types/navigation/menu/menu-title.d.ts.map +1 -1
  807. package/build-types/navigation/menu/search-no-results-found.d.ts +0 -1
  808. package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -1
  809. package/build-types/navigation/styles/navigation-styles.d.ts +25 -26
  810. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  811. package/build-types/navigation/types.d.ts +0 -1
  812. package/build-types/navigation/types.d.ts.map +1 -1
  813. package/build-types/navigation/use-navigation-tree-nodes.d.ts +0 -1
  814. package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +1 -1
  815. package/build-types/navigator/context.d.ts +0 -1
  816. package/build-types/navigator/context.d.ts.map +1 -1
  817. package/build-types/navigator/navigator-back-button/component.d.ts +17 -18
  818. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  819. package/build-types/navigator/navigator-back-button/hook.d.ts +29 -31
  820. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  821. package/build-types/navigator/navigator-button/component.d.ts +18 -19
  822. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  823. package/build-types/navigator/navigator-button/hook.d.ts +29 -31
  824. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  825. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  826. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  827. package/build-types/navigator/navigator-screen/component.d.ts +0 -1
  828. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  829. package/build-types/navigator/navigator-to-parent-button/component.d.ts +17 -18
  830. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  831. package/build-types/navigator/stories/index.story.d.ts +4 -4
  832. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  833. package/build-types/notice/index.d.ts +0 -1
  834. package/build-types/notice/index.d.ts.map +1 -1
  835. package/build-types/notice/list.d.ts +0 -1
  836. package/build-types/notice/list.d.ts.map +1 -1
  837. package/build-types/number-control/index.d.ts +12 -13
  838. package/build-types/number-control/index.d.ts.map +1 -1
  839. package/build-types/number-control/stories/index.story.d.ts +12 -13
  840. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  841. package/build-types/number-control/styles/number-control-styles.d.ts +2 -3
  842. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  843. package/build-types/palette-edit/index.d.ts +0 -1
  844. package/build-types/palette-edit/index.d.ts.map +1 -1
  845. package/build-types/palette-edit/styles.d.ts +16 -18
  846. package/build-types/palette-edit/styles.d.ts.map +1 -1
  847. package/build-types/panel/body.d.ts +0 -1
  848. package/build-types/panel/body.d.ts.map +1 -1
  849. package/build-types/panel/header.d.ts +0 -1
  850. package/build-types/panel/header.d.ts.map +1 -1
  851. package/build-types/panel/index.d.ts +0 -1
  852. package/build-types/panel/index.d.ts.map +1 -1
  853. package/build-types/panel/row.d.ts +0 -1
  854. package/build-types/panel/row.d.ts.map +1 -1
  855. package/build-types/panel/types.d.ts +0 -1
  856. package/build-types/panel/types.d.ts.map +1 -1
  857. package/build-types/placeholder/index.d.ts +0 -1
  858. package/build-types/placeholder/index.d.ts.map +1 -1
  859. package/build-types/popover/index.d.ts +0 -1
  860. package/build-types/popover/index.d.ts.map +1 -1
  861. package/build-types/popover/overlay-middlewares.d.ts +1 -11
  862. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  863. package/build-types/popover/stories/e2e/index.story.d.ts +0 -1
  864. package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
  865. package/build-types/popover/stories/index.story.d.ts +6 -6
  866. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  867. package/build-types/popover/test/utils/index.d.ts +0 -1
  868. package/build-types/popover/test/utils/index.d.ts.map +1 -1
  869. package/build-types/popover/utils.d.ts +3 -3
  870. package/build-types/popover/utils.d.ts.map +1 -1
  871. package/build-types/private-apis.d.ts.map +1 -1
  872. package/build-types/progress-bar/index.d.ts +0 -1
  873. package/build-types/progress-bar/index.d.ts.map +1 -1
  874. package/build-types/progress-bar/stories/index.story.d.ts +0 -1
  875. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  876. package/build-types/progress-bar/styles.d.ts +6 -7
  877. package/build-types/progress-bar/styles.d.ts.map +1 -1
  878. package/build-types/query-controls/author-select.d.ts +0 -1
  879. package/build-types/query-controls/author-select.d.ts.map +1 -1
  880. package/build-types/query-controls/category-select.d.ts +0 -1
  881. package/build-types/query-controls/category-select.d.ts.map +1 -1
  882. package/build-types/query-controls/index.d.ts +0 -1
  883. package/build-types/query-controls/index.d.ts.map +1 -1
  884. package/build-types/radio-control/index.d.ts +0 -1
  885. package/build-types/radio-control/index.d.ts.map +1 -1
  886. package/build-types/radio-group/context.d.ts +2 -3
  887. package/build-types/radio-group/context.d.ts.map +1 -1
  888. package/build-types/radio-group/index.d.ts +0 -1
  889. package/build-types/radio-group/index.d.ts.map +1 -1
  890. package/build-types/radio-group/radio.d.ts +0 -1
  891. package/build-types/radio-group/radio.d.ts.map +1 -1
  892. package/build-types/radio-group/types.d.ts +0 -1
  893. package/build-types/radio-group/types.d.ts.map +1 -1
  894. package/build-types/range-control/index.d.ts +29 -29
  895. package/build-types/range-control/index.d.ts.map +1 -1
  896. package/build-types/range-control/input-range.d.ts +0 -1
  897. package/build-types/range-control/input-range.d.ts.map +1 -1
  898. package/build-types/range-control/mark.d.ts +0 -1
  899. package/build-types/range-control/mark.d.ts.map +1 -1
  900. package/build-types/range-control/rail.d.ts +0 -1
  901. package/build-types/range-control/rail.d.ts.map +1 -1
  902. package/build-types/range-control/styles/range-control-styles.d.ts +48 -49
  903. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  904. package/build-types/range-control/tooltip.d.ts +0 -1
  905. package/build-types/range-control/tooltip.d.ts.map +1 -1
  906. package/build-types/resizable-box/index.d.ts +7 -20
  907. package/build-types/resizable-box/index.d.ts.map +1 -1
  908. package/build-types/resizable-box/resize-tooltip/label.d.ts +0 -1
  909. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  910. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +7 -8
  911. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  912. package/build-types/resizable-box/resize-tooltip/utils.d.ts +2 -3
  913. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  914. package/build-types/resizable-box/stories/index.story.d.ts +32 -39
  915. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  916. package/build-types/responsive-wrapper/index.d.ts +0 -1
  917. package/build-types/responsive-wrapper/index.d.ts.map +1 -1
  918. package/build-types/responsive-wrapper/types.d.ts +0 -1
  919. package/build-types/responsive-wrapper/types.d.ts.map +1 -1
  920. package/build-types/sandbox/index.d.ts +0 -1
  921. package/build-types/sandbox/index.d.ts.map +1 -1
  922. package/build-types/sandbox/types.d.ts +0 -1
  923. package/build-types/sandbox/types.d.ts.map +1 -1
  924. package/build-types/scrollable/component.d.ts +0 -1
  925. package/build-types/scrollable/component.d.ts.map +1 -1
  926. package/build-types/scrollable/hook.d.ts +9 -11
  927. package/build-types/scrollable/hook.d.ts.map +1 -1
  928. package/build-types/search-control/index.d.ts +0 -1
  929. package/build-types/search-control/index.d.ts.map +1 -1
  930. package/build-types/search-control/stories/index.story.d.ts +0 -1
  931. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  932. package/build-types/search-control/styles.d.ts +3 -4
  933. package/build-types/search-control/styles.d.ts.map +1 -1
  934. package/build-types/search-control/types.d.ts +0 -1
  935. package/build-types/search-control/types.d.ts.map +1 -1
  936. package/build-types/select-control/chevron-down.d.ts +0 -1
  937. package/build-types/select-control/chevron-down.d.ts.map +1 -1
  938. package/build-types/select-control/index.d.ts +0 -1
  939. package/build-types/select-control/index.d.ts.map +1 -1
  940. package/build-types/select-control/stories/index.story.d.ts +1 -1
  941. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  942. package/build-types/select-control/styles/select-control-styles.d.ts +11 -7
  943. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  944. package/build-types/select-control/types.d.ts +6 -0
  945. package/build-types/select-control/types.d.ts.map +1 -1
  946. package/build-types/shortcut/index.d.ts +0 -1
  947. package/build-types/shortcut/index.d.ts.map +1 -1
  948. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -1
  949. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  950. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -1
  951. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  952. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -1
  953. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  954. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -2
  955. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  956. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  957. package/build-types/slot-fill/context.d.ts +0 -1
  958. package/build-types/slot-fill/context.d.ts.map +1 -1
  959. package/build-types/slot-fill/index.d.ts +4 -4
  960. package/build-types/slot-fill/index.d.ts.map +1 -1
  961. package/build-types/slot-fill/provider.d.ts +0 -1
  962. package/build-types/slot-fill/provider.d.ts.map +1 -1
  963. package/build-types/slot-fill/slot.d.ts +1 -2
  964. package/build-types/slot-fill/slot.d.ts.map +1 -1
  965. package/build-types/slot-fill/use-slot.d.ts +0 -1
  966. package/build-types/slot-fill/use-slot.d.ts.map +1 -1
  967. package/build-types/snackbar/index.d.ts +5 -6
  968. package/build-types/snackbar/index.d.ts.map +1 -1
  969. package/build-types/snackbar/list.d.ts +0 -1
  970. package/build-types/snackbar/list.d.ts.map +1 -1
  971. package/build-types/spacer/component.d.ts +0 -1
  972. package/build-types/spacer/component.d.ts.map +1 -1
  973. package/build-types/spacer/hook.d.ts +9 -11
  974. package/build-types/spacer/hook.d.ts.map +1 -1
  975. package/build-types/spinner/styles.d.ts +6 -7
  976. package/build-types/spinner/styles.d.ts.map +1 -1
  977. package/build-types/style-provider/index.d.ts +0 -1
  978. package/build-types/style-provider/index.d.ts.map +1 -1
  979. package/build-types/surface/component.d.ts +0 -1
  980. package/build-types/surface/component.d.ts.map +1 -1
  981. package/build-types/surface/hook.d.ts +10 -12
  982. package/build-types/surface/hook.d.ts.map +1 -1
  983. package/build-types/surface/types.d.ts +0 -1
  984. package/build-types/surface/types.d.ts.map +1 -1
  985. package/build-types/tab-panel/index.d.ts +0 -1
  986. package/build-types/tab-panel/index.d.ts.map +1 -1
  987. package/build-types/tab-panel/stories/index.story.d.ts +0 -1
  988. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  989. package/build-types/tabs/context.d.ts +0 -1
  990. package/build-types/tabs/context.d.ts.map +1 -1
  991. package/build-types/tabs/index.d.ts +0 -1
  992. package/build-types/tabs/index.d.ts.map +1 -1
  993. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  994. package/build-types/tabs/styles.d.ts +12 -13
  995. package/build-types/tabs/styles.d.ts.map +1 -1
  996. package/build-types/tabs/tab.d.ts +0 -1
  997. package/build-types/tabs/tab.d.ts.map +1 -1
  998. package/build-types/tabs/tablist.d.ts +0 -1
  999. package/build-types/tabs/tablist.d.ts.map +1 -1
  1000. package/build-types/tabs/tabpanel.d.ts +0 -1
  1001. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  1002. package/build-types/tabs/types.d.ts +0 -1
  1003. package/build-types/tabs/types.d.ts.map +1 -1
  1004. package/build-types/text/component.d.ts +0 -1
  1005. package/build-types/text/component.d.ts.map +1 -1
  1006. package/build-types/text/hook.d.ts +9 -9
  1007. package/build-types/text/stories/index.story.d.ts +0 -1
  1008. package/build-types/text/stories/index.story.d.ts.map +1 -1
  1009. package/build-types/text/utils.d.ts +0 -1
  1010. package/build-types/text/utils.d.ts.map +1 -1
  1011. package/build-types/text-control/index.d.ts +2 -3
  1012. package/build-types/text-control/index.d.ts.map +1 -1
  1013. package/build-types/text-highlight/index.d.ts +0 -1
  1014. package/build-types/text-highlight/index.d.ts.map +1 -1
  1015. package/build-types/textarea-control/index.d.ts +2 -2
  1016. package/build-types/textarea-control/index.d.ts.map +1 -1
  1017. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +2 -3
  1018. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
  1019. package/build-types/theme/color-algorithms.d.ts +1 -9
  1020. package/build-types/theme/color-algorithms.d.ts.map +1 -1
  1021. package/build-types/theme/index.d.ts +0 -1
  1022. package/build-types/theme/index.d.ts.map +1 -1
  1023. package/build-types/theme/stories/index.story.d.ts +0 -1
  1024. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  1025. package/build-types/theme/styles.d.ts +2 -3
  1026. package/build-types/theme/styles.d.ts.map +1 -1
  1027. package/build-types/tip/index.d.ts +0 -1
  1028. package/build-types/tip/index.d.ts.map +1 -1
  1029. package/build-types/toggle-control/index.d.ts.map +1 -1
  1030. package/build-types/toggle-control/stories/index.story.d.ts +0 -1
  1031. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  1032. package/build-types/toggle-group-control/context.d.ts +0 -1
  1033. package/build-types/toggle-group-control/context.d.ts.map +1 -1
  1034. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +0 -1
  1035. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  1036. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +0 -1
  1037. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  1038. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +8 -9
  1039. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  1040. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +5 -6
  1041. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  1042. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +0 -1
  1043. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  1044. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -2
  1045. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  1046. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +5 -6
  1047. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  1048. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +0 -1
  1049. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  1050. package/build-types/toolbar/stories/index.story.d.ts +0 -1
  1051. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  1052. package/build-types/toolbar/toolbar/index.d.ts +0 -1
  1053. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  1054. package/build-types/toolbar/toolbar/toolbar-container.d.ts +0 -1
  1055. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  1056. package/build-types/toolbar/toolbar/types.d.ts +6 -0
  1057. package/build-types/toolbar/toolbar/types.d.ts.map +1 -1
  1058. package/build-types/toolbar/toolbar-button/index.d.ts +3 -97
  1059. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  1060. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +0 -1
  1061. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
  1062. package/build-types/toolbar/toolbar-button/types.d.ts +18 -0
  1063. package/build-types/toolbar/toolbar-button/types.d.ts.map +1 -1
  1064. package/build-types/toolbar/toolbar-context/index.d.ts +0 -1
  1065. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  1066. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +0 -1
  1067. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  1068. package/build-types/toolbar/toolbar-group/index.d.ts +0 -1
  1069. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
  1070. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +0 -1
  1071. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
  1072. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +1 -2
  1073. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
  1074. package/build-types/toolbar/toolbar-item/index.d.ts +2 -5
  1075. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  1076. package/build-types/tools-panel/context.d.ts +0 -1
  1077. package/build-types/tools-panel/context.d.ts.map +1 -1
  1078. package/build-types/tools-panel/styles.d.ts +2 -3
  1079. package/build-types/tools-panel/styles.d.ts.map +1 -1
  1080. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  1081. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  1082. package/build-types/tools-panel/tools-panel/hook.d.ts +10 -12
  1083. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  1084. package/build-types/tools-panel/tools-panel-header/component.d.ts +0 -1
  1085. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  1086. package/build-types/tools-panel/tools-panel-header/hook.d.ts +11 -13
  1087. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  1088. package/build-types/tools-panel/tools-panel-item/component.d.ts +3 -4
  1089. package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
  1090. package/build-types/tools-panel/tools-panel-item/hook.d.ts +9 -11
  1091. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  1092. package/build-types/tooltip/index.d.ts +0 -1
  1093. package/build-types/tooltip/index.d.ts.map +1 -1
  1094. package/build-types/tooltip/stories/index.story.d.ts +0 -1
  1095. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  1096. package/build-types/tooltip/types.d.ts +4 -1
  1097. package/build-types/tooltip/types.d.ts.map +1 -1
  1098. package/build-types/tree-grid/cell.d.ts +0 -1
  1099. package/build-types/tree-grid/cell.d.ts.map +1 -1
  1100. package/build-types/tree-grid/index.d.ts +0 -1
  1101. package/build-types/tree-grid/index.d.ts.map +1 -1
  1102. package/build-types/tree-grid/item.d.ts +0 -1
  1103. package/build-types/tree-grid/item.d.ts.map +1 -1
  1104. package/build-types/tree-grid/roving-tab-index-context.d.ts +0 -1
  1105. package/build-types/tree-grid/roving-tab-index-context.d.ts.map +1 -1
  1106. package/build-types/tree-grid/roving-tab-index-item.d.ts +0 -1
  1107. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  1108. package/build-types/tree-grid/roving-tab-index.d.ts +0 -1
  1109. package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -1
  1110. package/build-types/tree-grid/row.d.ts +0 -1
  1111. package/build-types/tree-grid/row.d.ts.map +1 -1
  1112. package/build-types/tree-grid/stories/index.story.d.ts +0 -1
  1113. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  1114. package/build-types/tree-grid/types.d.ts +0 -1
  1115. package/build-types/tree-grid/types.d.ts.map +1 -1
  1116. package/build-types/tree-select/index.d.ts +1 -1
  1117. package/build-types/tree-select/index.d.ts.map +1 -1
  1118. package/build-types/truncate/component.d.ts +0 -1
  1119. package/build-types/truncate/component.d.ts.map +1 -1
  1120. package/build-types/truncate/hook.d.ts +9 -11
  1121. package/build-types/truncate/hook.d.ts.map +1 -1
  1122. package/build-types/truncate/utils.d.ts.map +1 -1
  1123. package/build-types/unit-control/index.d.ts +7 -8
  1124. package/build-types/unit-control/index.d.ts.map +1 -1
  1125. package/build-types/unit-control/styles/unit-control-styles.d.ts +17 -18
  1126. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  1127. package/build-types/unit-control/unit-select-control.d.ts +0 -1
  1128. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  1129. package/build-types/unit-control/utils.d.ts.map +1 -1
  1130. package/build-types/utils/breakpoint.d.ts +1 -10
  1131. package/build-types/utils/breakpoint.d.ts.map +1 -1
  1132. package/build-types/utils/element-rect.d.ts +111 -0
  1133. package/build-types/utils/element-rect.d.ts.map +1 -0
  1134. package/build-types/utils/font.d.ts +1 -6
  1135. package/build-types/utils/font.d.ts.map +1 -1
  1136. package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
  1137. package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
  1138. package/build-types/utils/hooks/use-controlled-value.d.ts +0 -1
  1139. package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
  1140. package/build-types/utils/hooks/use-event.d.ts +20 -0
  1141. package/build-types/utils/hooks/use-event.d.ts.map +1 -0
  1142. package/build-types/utils/hooks/use-on-value-update.d.ts +19 -0
  1143. package/build-types/utils/hooks/use-on-value-update.d.ts.map +1 -0
  1144. package/build-types/utils/hooks/use-update-effect.d.ts +2 -2
  1145. package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
  1146. package/build-types/utils/math.d.ts.map +1 -1
  1147. package/build-types/utils/rtl.d.ts +2 -2
  1148. package/build-types/utils/values.d.ts +2 -2
  1149. package/build-types/utils/values.d.ts.map +1 -1
  1150. package/build-types/utils/with-ignore-ime-events.d.ts +0 -1
  1151. package/build-types/utils/with-ignore-ime-events.d.ts.map +1 -1
  1152. package/build-types/v-stack/component.d.ts +2 -3
  1153. package/build-types/v-stack/component.d.ts.map +1 -1
  1154. package/build-types/v-stack/hook.d.ts +9 -11
  1155. package/build-types/v-stack/hook.d.ts.map +1 -1
  1156. package/build-types/v-stack/stories/index.story.d.ts +2 -3
  1157. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  1158. package/build-types/view/component.d.ts +0 -2
  1159. package/build-types/view/component.d.ts.map +1 -1
  1160. package/build-types/visually-hidden/component.d.ts +0 -1
  1161. package/build-types/visually-hidden/component.d.ts.map +1 -1
  1162. package/build-types/z-stack/component.d.ts +0 -1
  1163. package/build-types/z-stack/component.d.ts.map +1 -1
  1164. package/build-types/z-stack/styles.d.ts +4 -5
  1165. package/build-types/z-stack/styles.d.ts.map +1 -1
  1166. package/package.json +19 -20
  1167. package/src/animation/index.tsx +0 -1
  1168. package/src/autocomplete/README.md +2 -2
  1169. package/src/autocomplete/autocompleter-ui.tsx +1 -0
  1170. package/src/autocomplete/index.tsx +0 -1
  1171. package/src/autocomplete/types.ts +2 -3
  1172. package/src/base-control/README.md +1 -1
  1173. package/src/base-control/index.tsx +16 -6
  1174. package/src/base-control/stories/index.story.tsx +0 -1
  1175. package/src/base-control/types.ts +1 -1
  1176. package/src/border-box-control/border-box-control-visualizer/component.tsx +0 -5
  1177. package/src/button/README.md +14 -1
  1178. package/src/button/index.tsx +15 -11
  1179. package/src/button/stories/e2e/index.story.tsx +2 -1
  1180. package/src/button/test/index.tsx +34 -6
  1181. package/src/button/types.ts +36 -12
  1182. package/src/card/card/README.md +1 -1
  1183. package/src/card/stories/index.story.tsx +43 -42
  1184. package/src/checkbox-control/README.md +8 -0
  1185. package/src/checkbox-control/index.tsx +1 -0
  1186. package/src/checkbox-control/style.scss +3 -1
  1187. package/src/color-picker/component.tsx +12 -22
  1188. package/src/color-picker/stories/index.story.tsx +2 -22
  1189. package/src/combobox-control/README.md +9 -0
  1190. package/src/combobox-control/index.tsx +13 -0
  1191. package/src/combobox-control/test/index.tsx +127 -1
  1192. package/src/composite/current/index.ts +0 -2
  1193. package/src/custom-select-control/README.md +34 -32
  1194. package/src/custom-select-control/index.tsx +176 -0
  1195. package/src/custom-select-control/stories/index.story.tsx +26 -18
  1196. package/src/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.tsx +89 -57
  1197. package/src/custom-select-control/types.ts +123 -0
  1198. package/src/custom-select-control-v2/custom-select.tsx +59 -22
  1199. package/src/custom-select-control-v2/index.tsx +26 -1
  1200. package/src/custom-select-control-v2/item.tsx +5 -1
  1201. package/src/custom-select-control-v2/stories/{default.story.tsx → index.story.tsx} +1 -1
  1202. package/src/custom-select-control-v2/styles.ts +179 -84
  1203. package/src/custom-select-control-v2/test/index.tsx +35 -5
  1204. package/src/custom-select-control-v2/types.ts +18 -115
  1205. package/src/date-time/README.md +8 -0
  1206. package/src/date-time/date-time/index.tsx +2 -1
  1207. package/src/date-time/index.ts +2 -1
  1208. package/src/date-time/stories/time-input.story.tsx +36 -0
  1209. package/src/date-time/time/index.tsx +77 -194
  1210. package/src/date-time/time/test/index.tsx +61 -0
  1211. package/src/date-time/time-input/index.tsx +196 -0
  1212. package/src/date-time/time-input/test/index.tsx +171 -0
  1213. package/src/date-time/types.ts +63 -0
  1214. package/src/date-time/utils.ts +69 -0
  1215. package/src/dimension-control/test/__snapshots__/index.test.js.snap +120 -96
  1216. package/src/disabled/README.md +1 -1
  1217. package/src/disclosure/index.tsx +0 -1
  1218. package/src/divider/component.tsx +0 -1
  1219. package/src/divider/types.ts +0 -1
  1220. package/src/dropdown/stories/index.story.tsx +55 -50
  1221. package/src/dropdown-menu/index.tsx +1 -0
  1222. package/src/dropdown-menu/stories/index.story.tsx +52 -55
  1223. package/src/dropdown-menu-v2/index.tsx +0 -1
  1224. package/src/dropdown-menu-v2/stories/index.story.tsx +0 -12
  1225. package/src/dropdown-menu-v2/styles.ts +3 -4
  1226. package/src/dropdown-menu-v2/types.ts +0 -1
  1227. package/src/focal-point-picker/README.md +9 -0
  1228. package/src/focal-point-picker/index.tsx +1 -0
  1229. package/src/font-size-picker/README.md +1 -1
  1230. package/src/font-size-picker/font-size-picker-select.tsx +2 -2
  1231. package/src/font-size-picker/index.tsx +69 -65
  1232. package/src/font-size-picker/test/index.tsx +89 -21
  1233. package/src/font-size-picker/types.ts +6 -5
  1234. package/src/font-size-picker/utils.ts +0 -5
  1235. package/src/form-toggle/style.scss +14 -9
  1236. package/src/form-token-field/README.md +2 -1
  1237. package/src/form-token-field/index.tsx +9 -0
  1238. package/src/form-token-field/stories/index.story.tsx +2 -0
  1239. package/src/form-token-field/token.tsx +2 -0
  1240. package/src/higher-order/navigate-regions/style.scss +14 -14
  1241. package/src/higher-order/with-spoken-messages/index.tsx +1 -2
  1242. package/src/index.ts +1 -1
  1243. package/src/menu-items-choice/types.ts +2 -1
  1244. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  1245. package/src/navigator/stories/index.story.tsx +240 -242
  1246. package/src/notice/test/__snapshots__/index.tsx.snap +1 -1
  1247. package/src/palette-edit/test/index.tsx +1 -0
  1248. package/src/popover/index.tsx +0 -2
  1249. package/src/popover/stories/index.story.tsx +155 -153
  1250. package/src/popover/utils.ts +0 -1
  1251. package/src/private-apis.ts +0 -7
  1252. package/src/progress-bar/styles.ts +18 -9
  1253. package/src/radio-control/index.tsx +1 -1
  1254. package/src/radio-control/style.scss +6 -1
  1255. package/src/radio-group/context.tsx +0 -1
  1256. package/src/radio-group/index.tsx +0 -1
  1257. package/src/radio-group/radio.tsx +0 -1
  1258. package/src/range-control/README.md +8 -0
  1259. package/src/range-control/index.tsx +3 -0
  1260. package/src/range-control/styles/range-control-styles.ts +6 -2
  1261. package/src/resizable-box/resize-tooltip/README.md +1 -1
  1262. package/src/resizable-box/resize-tooltip/utils.ts +1 -1
  1263. package/src/select-control/README.md +8 -0
  1264. package/src/select-control/index.tsx +10 -4
  1265. package/src/select-control/stories/index.story.tsx +6 -0
  1266. package/src/select-control/styles/select-control-styles.ts +41 -7
  1267. package/src/select-control/types.ts +6 -0
  1268. package/src/style.scss +1 -1
  1269. package/src/tab-panel/index.tsx +0 -1
  1270. package/src/tabs/index.tsx +0 -1
  1271. package/src/tabs/stories/index.story.tsx +25 -18
  1272. package/src/tabs/styles.ts +28 -16
  1273. package/src/tabs/tablist.tsx +4 -100
  1274. package/src/tabs/types.ts +0 -1
  1275. package/src/textarea-control/README.md +8 -0
  1276. package/src/textarea-control/index.tsx +1 -0
  1277. package/src/theme/stories/index.story.tsx +2 -0
  1278. package/src/toggle-control/index.tsx +12 -3
  1279. package/src/toggle-control/style.scss +11 -0
  1280. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +36 -6
  1281. package/src/toggle-group-control/test/index.tsx +114 -0
  1282. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +0 -1
  1283. package/src/toggle-group-control/toggle-group-control/component.tsx +0 -2
  1284. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +6 -3
  1285. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +5 -0
  1286. package/src/toolbar/toolbar/README.md +9 -0
  1287. package/src/toolbar/toolbar/style.scss +7 -0
  1288. package/src/toolbar/toolbar/toolbar-container.tsx +0 -1
  1289. package/src/toolbar/toolbar/types.ts +6 -0
  1290. package/src/toolbar/toolbar-button/index.tsx +30 -17
  1291. package/src/toolbar/toolbar-button/types.ts +19 -0
  1292. package/src/toolbar/toolbar-context/index.ts +0 -1
  1293. package/src/toolbar/toolbar-item/index.tsx +1 -1
  1294. package/src/tools-panel/tools-panel-header/component.tsx +1 -1
  1295. package/src/tooltip/index.tsx +3 -2
  1296. package/src/tooltip/test/index.tsx +18 -0
  1297. package/src/tooltip/types.ts +4 -0
  1298. package/src/tree-select/README.md +9 -0
  1299. package/src/tree-select/index.tsx +1 -0
  1300. package/src/unit-control/index.tsx +3 -2
  1301. package/src/unit-control/styles/unit-control-styles.ts +10 -4
  1302. package/src/utils/element-rect.ts +197 -0
  1303. package/src/utils/hooks/use-event.ts +38 -0
  1304. package/src/utils/hooks/use-on-value-update.ts +42 -0
  1305. package/src/utils/hooks/use-update-effect.js +8 -1
  1306. package/tsconfig.tsbuildinfo +1 -1
  1307. package/build/custom-select-control-v2/default-component/index.js +0 -43
  1308. package/build/custom-select-control-v2/default-component/index.js.map +0 -1
  1309. package/build/custom-select-control-v2/legacy-component/index.js +0 -119
  1310. package/build/custom-select-control-v2/legacy-component/index.js.map +0 -1
  1311. package/build-module/custom-select-control-v2/default-component/index.js +0 -32
  1312. package/build-module/custom-select-control-v2/default-component/index.js.map +0 -1
  1313. package/build-module/custom-select-control-v2/legacy-component/index.js +0 -110
  1314. package/build-module/custom-select-control-v2/legacy-component/index.js.map +0 -1
  1315. package/build-types/custom-select-control-v2/default-component/index.d.ts +0 -9
  1316. package/build-types/custom-select-control-v2/default-component/index.d.ts.map +0 -1
  1317. package/build-types/custom-select-control-v2/legacy-component/index.d.ts +0 -5
  1318. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +0 -1
  1319. package/build-types/custom-select-control-v2/legacy-component/test/index.d.ts.map +0 -1
  1320. package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +0 -1
  1321. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts +0 -14
  1322. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +0 -1
  1323. package/src/custom-select-control/index.js +0 -240
  1324. package/src/custom-select-control/style.scss +0 -75
  1325. package/src/custom-select-control/test/index.js +0 -629
  1326. package/src/custom-select-control-v2/default-component/index.tsx +0 -30
  1327. package/src/custom-select-control-v2/legacy-component/index.tsx +0 -132
  1328. package/src/custom-select-control-v2/stories/legacy.story.tsx +0 -72
  1329. /package/build-types/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_deprecated","_element","_compose","_tooltip","_icon","_visuallyHidden","_utils","_jsxRuntime","disabledEventsOnDisabledButton","useDeprecatedProps","isDefault","isPrimary","isSecondary","isTertiary","isLink","isPressed","isSmall","size","variant","otherProps","computedSize","computedVariant","newProps","_computedSize","_computedVariant","_computedVariant2","_computedVariant3","_computedVariant4","deprecated","since","alternative","_computedVariant5","UnforwardedButton","props","ref","__next40pxDefaultSize","isBusy","isDestructive","className","disabled","icon","iconPosition","iconSize","showTooltip","tooltipPosition","shortcut","label","children","text","__experimentalIsFocusable","isFocusable","describedBy","buttonOrAnchorProps","href","target","ariaChecked","ariaPressed","ariaSelected","additionalProps","undefined","instanceId","useInstanceId","Button","hasChildren","Array","isArray","truthyAriaPressedValues","classes","clsx","includes","trulyDisabled","Tag","buttonProps","type","anchorProps","disableEventProps","disabledEvent","event","stopPropagation","preventDefault","shouldShowTooltip","length","descriptionId","describedById","commonProps","elementChildren","jsxs","Fragment","jsx","default","element","tooltipProps","placement","positionToPlacement","VisuallyHidden","id","exports","forwardRef","_default"],"sources":["@wordpress/components/src/button/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type {\n\tComponentPropsWithoutRef,\n\tForwardedRef,\n\tHTMLAttributes,\n\tMouseEvent,\n\tReactElement,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../tooltip';\nimport Icon from '../icon';\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { ButtonProps, DeprecatedButtonProps } from './types';\nimport { positionToPlacement } from '../popover/utils';\n\nconst disabledEventsOnDisabledButton = [ 'onMouseDown', 'onClick' ] as const;\n\nfunction useDeprecatedProps( {\n\tisDefault,\n\tisPrimary,\n\tisSecondary,\n\tisTertiary,\n\tisLink,\n\tisPressed,\n\tisSmall,\n\tsize,\n\tvariant,\n\t...otherProps\n}: ButtonProps & DeprecatedButtonProps ): ButtonProps {\n\tlet computedSize = size;\n\tlet computedVariant = variant;\n\n\tconst newProps: { 'aria-pressed'?: boolean } = {\n\t\t// @todo Mark `isPressed` as deprecated\n\t\t'aria-pressed': isPressed,\n\t};\n\n\tif ( isSmall ) {\n\t\tcomputedSize ??= 'small';\n\t}\n\n\tif ( isPrimary ) {\n\t\tcomputedVariant ??= 'primary';\n\t}\n\n\tif ( isTertiary ) {\n\t\tcomputedVariant ??= 'tertiary';\n\t}\n\n\tif ( isSecondary ) {\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isDefault ) {\n\t\tdeprecated( 'wp.components.Button `isDefault` prop', {\n\t\t\tsince: '5.4',\n\t\t\talternative: 'variant=\"secondary\"',\n\t\t} );\n\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isLink ) {\n\t\tcomputedVariant ??= 'link';\n\t}\n\n\treturn {\n\t\t...newProps,\n\t\t...otherProps,\n\t\tsize: computedSize,\n\t\tvariant: computedVariant,\n\t};\n}\n\nexport function UnforwardedButton(\n\tprops: ButtonProps & DeprecatedButtonProps,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\t__next40pxDefaultSize,\n\t\tisBusy,\n\t\tisDestructive,\n\t\tclassName,\n\t\tdisabled,\n\t\ticon,\n\t\ticonPosition = 'left',\n\t\ticonSize,\n\t\tshowTooltip,\n\t\ttooltipPosition,\n\t\tshortcut,\n\t\tlabel,\n\t\tchildren,\n\t\tsize = 'default',\n\t\ttext,\n\t\tvariant,\n\t\t__experimentalIsFocusable: isFocusable,\n\t\tdescribedBy,\n\t\t...buttonOrAnchorProps\n\t} = useDeprecatedProps( props );\n\n\tconst {\n\t\thref,\n\t\ttarget,\n\t\t'aria-checked': ariaChecked,\n\t\t'aria-pressed': ariaPressed,\n\t\t'aria-selected': ariaSelected,\n\t\t...additionalProps\n\t} = 'href' in buttonOrAnchorProps\n\t\t? buttonOrAnchorProps\n\t\t: { href: undefined, target: undefined, ...buttonOrAnchorProps };\n\n\tconst instanceId = useInstanceId(\n\t\tButton,\n\t\t'components-button__description'\n\t);\n\n\tconst hasChildren =\n\t\t( 'string' === typeof children && !! children ) ||\n\t\t( Array.isArray( children ) &&\n\t\t\tchildren?.[ 0 ] &&\n\t\t\tchildren[ 0 ] !== null &&\n\t\t\t// Tooltip should not considered as a child\n\t\t\tchildren?.[ 0 ]?.props?.className !== 'components-tooltip' );\n\n\tconst truthyAriaPressedValues: ( typeof ariaPressed )[] = [\n\t\ttrue,\n\t\t'true',\n\t\t'mixed',\n\t];\n\n\tconst classes = clsx( 'components-button', className, {\n\t\t'is-next-40px-default-size': __next40pxDefaultSize,\n\t\t'is-secondary': variant === 'secondary',\n\t\t'is-primary': variant === 'primary',\n\t\t'is-small': size === 'small',\n\t\t'is-compact': size === 'compact',\n\t\t'is-tertiary': variant === 'tertiary',\n\n\t\t'is-pressed': truthyAriaPressedValues.includes( ariaPressed ),\n\t\t'is-pressed-mixed': ariaPressed === 'mixed',\n\n\t\t'is-busy': isBusy,\n\t\t'is-link': variant === 'link',\n\t\t'is-destructive': isDestructive,\n\t\t'has-text': !! icon && ( hasChildren || text ),\n\t\t'has-icon': !! icon,\n\t} );\n\n\tconst trulyDisabled = disabled && ! isFocusable;\n\tconst Tag = href !== undefined && ! trulyDisabled ? 'a' : 'button';\n\tconst buttonProps: ComponentPropsWithoutRef< 'button' > =\n\t\tTag === 'button'\n\t\t\t? {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tdisabled: trulyDisabled,\n\t\t\t\t\t'aria-checked': ariaChecked,\n\t\t\t\t\t'aria-pressed': ariaPressed,\n\t\t\t\t\t'aria-selected': ariaSelected,\n\t\t\t }\n\t\t\t: {};\n\tconst anchorProps: ComponentPropsWithoutRef< 'a' > =\n\t\tTag === 'a' ? { href, target } : {};\n\n\tconst disableEventProps: {\n\t\t[ key: string ]: ( event: MouseEvent ) => void;\n\t} = {};\n\tif ( disabled && isFocusable ) {\n\t\t// In this case, the button will be disabled, but still focusable and\n\t\t// perceivable by screen reader users.\n\t\tbuttonProps[ 'aria-disabled' ] = true;\n\t\tanchorProps[ 'aria-disabled' ] = true;\n\t\tfor ( const disabledEvent of disabledEventsOnDisabledButton ) {\n\t\t\tdisableEventProps[ disabledEvent ] = ( event: MouseEvent ) => {\n\t\t\t\tif ( event ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\n\t// Should show the tooltip if...\n\tconst shouldShowTooltip =\n\t\t! trulyDisabled &&\n\t\t// An explicit tooltip is passed or...\n\t\t( ( showTooltip && !! label ) ||\n\t\t\t// There's a shortcut or...\n\t\t\t!! shortcut ||\n\t\t\t// There's a label and...\n\t\t\t( !! label &&\n\t\t\t\t// The children are empty and...\n\t\t\t\t! ( children as string | ReactElement[] )?.length &&\n\t\t\t\t// The tooltip is not explicitly disabled.\n\t\t\t\tfalse !== showTooltip ) );\n\n\tconst descriptionId = describedBy ? instanceId : undefined;\n\n\tconst describedById =\n\t\tadditionalProps[ 'aria-describedby' ] || descriptionId;\n\n\tconst commonProps = {\n\t\tclassName: classes,\n\t\t'aria-label': additionalProps[ 'aria-label' ] || label,\n\t\t'aria-describedby': describedById,\n\t\tref,\n\t};\n\n\tconst elementChildren = (\n\t\t<>\n\t\t\t{ icon && iconPosition === 'left' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ text && <>{ text }</> }\n\t\t\t{ children }\n\t\t\t{ icon && iconPosition === 'right' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t</>\n\t);\n\n\tconst element =\n\t\tTag === 'a' ? (\n\t\t\t<a\n\t\t\t\t{ ...anchorProps }\n\t\t\t\t{ ...( additionalProps as HTMLAttributes< HTMLAnchorElement > ) }\n\t\t\t\t{ ...disableEventProps }\n\t\t\t\t{ ...commonProps }\n\t\t\t>\n\t\t\t\t{ elementChildren }\n\t\t\t</a>\n\t\t) : (\n\t\t\t<button\n\t\t\t\t{ ...buttonProps }\n\t\t\t\t{ ...( additionalProps as HTMLAttributes< HTMLButtonElement > ) }\n\t\t\t\t{ ...disableEventProps }\n\t\t\t\t{ ...commonProps }\n\t\t\t>\n\t\t\t\t{ elementChildren }\n\t\t\t</button>\n\t\t);\n\n\t// In order to avoid some React reconciliation issues, we are always rendering\n\t// the `Tooltip` component even when `shouldShowTooltip` is `false`.\n\t// In order to make sure that the tooltip doesn't show when it shouldn't,\n\t// we don't pass the props to the `Tooltip` component.\n\tconst tooltipProps = shouldShowTooltip\n\t\t? {\n\t\t\t\ttext:\n\t\t\t\t\t( children as string | ReactElement[] )?.length &&\n\t\t\t\t\tdescribedBy\n\t\t\t\t\t\t? describedBy\n\t\t\t\t\t\t: label,\n\t\t\t\tshortcut,\n\t\t\t\tplacement:\n\t\t\t\t\ttooltipPosition &&\n\t\t\t\t\t// Convert legacy `position` values to be used with the new `placement` prop\n\t\t\t\t\tpositionToPlacement( tooltipPosition ),\n\t\t }\n\t\t: {};\n\n\treturn (\n\t\t<>\n\t\t\t<Tooltip { ...tooltipProps }>{ element }</Tooltip>\n\t\t\t{ describedBy && (\n\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t<span id={ descriptionId }>{ describedBy }</span>\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n/**\n * Lets users take actions and make choices with a single click or tap.\n *\n * ```jsx\n * import { Button } from '@wordpress/components';\n * const Mybutton = () => (\n * <Button\n * variant=\"primary\"\n * onClick={ handleClick }\n * >\n * Click here\n * </Button>\n * );\n * ```\n */\nexport const Button = forwardRef( UnforwardedButton );\nexport default Button;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAYA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,QAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,KAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAEA,IAAAO,MAAA,GAAAP,OAAA;AAAuD,IAAAQ,WAAA,GAAAR,OAAA;AA1BvD;AACA;AACA;;AAUA;AACA;AACA;;AAKA;AACA;AACA;;AAOA,MAAMS,8BAA8B,GAAG,CAAE,aAAa,EAAE,SAAS,CAAW;AAE5E,SAASC,kBAAkBA,CAAE;EAC5BC,SAAS;EACTC,SAAS;EACTC,WAAW;EACXC,UAAU;EACVC,MAAM;EACNC,SAAS;EACTC,OAAO;EACPC,IAAI;EACJC,OAAO;EACP,GAAGC;AACiC,CAAC,EAAgB;EACrD,IA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deprecated","_element","_compose","_tooltip","_icon","_visuallyHidden","_utils","_jsxRuntime","disabledEventsOnDisabledButton","useDeprecatedProps","__experimentalIsFocusable","isDefault","isPrimary","isSecondary","isTertiary","isLink","isPressed","isSmall","size","variant","describedBy","otherProps","computedSize","computedVariant","newProps","accessibleWhenDisabled","description","_computedSize","_computedVariant","_computedVariant2","_computedVariant3","_computedVariant4","deprecated","since","alternative","_computedVariant5","UnforwardedButton","props","ref","__next40pxDefaultSize","isBusy","isDestructive","className","disabled","icon","iconPosition","iconSize","showTooltip","tooltipPosition","shortcut","label","children","text","buttonOrAnchorProps","href","target","ariaChecked","ariaPressed","ariaSelected","additionalProps","undefined","instanceId","useInstanceId","Button","hasChildren","Array","isArray","truthyAriaPressedValues","classes","clsx","includes","trulyDisabled","Tag","buttonProps","type","anchorProps","disableEventProps","disabledEvent","event","stopPropagation","preventDefault","shouldShowTooltip","length","descriptionId","describedById","commonProps","elementChildren","jsxs","Fragment","jsx","default","element","tooltipProps","placement","positionToPlacement","VisuallyHidden","id","exports","forwardRef","_default"],"sources":["@wordpress/components/src/button/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type {\n\tComponentPropsWithoutRef,\n\tForwardedRef,\n\tHTMLAttributes,\n\tMouseEvent,\n\tReactElement,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../tooltip';\nimport Icon from '../icon';\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { ButtonProps, DeprecatedButtonProps } from './types';\nimport { positionToPlacement } from '../popover/utils';\n\nconst disabledEventsOnDisabledButton = [ 'onMouseDown', 'onClick' ] as const;\n\nfunction useDeprecatedProps( {\n\t__experimentalIsFocusable,\n\tisDefault,\n\tisPrimary,\n\tisSecondary,\n\tisTertiary,\n\tisLink,\n\tisPressed,\n\tisSmall,\n\tsize,\n\tvariant,\n\tdescribedBy,\n\t...otherProps\n}: ButtonProps & DeprecatedButtonProps ): ButtonProps {\n\tlet computedSize = size;\n\tlet computedVariant = variant;\n\n\tconst newProps = {\n\t\taccessibleWhenDisabled: __experimentalIsFocusable,\n\t\t// @todo Mark `isPressed` as deprecated\n\t\t'aria-pressed': isPressed,\n\t\tdescription: describedBy,\n\t};\n\n\tif ( isSmall ) {\n\t\tcomputedSize ??= 'small';\n\t}\n\n\tif ( isPrimary ) {\n\t\tcomputedVariant ??= 'primary';\n\t}\n\n\tif ( isTertiary ) {\n\t\tcomputedVariant ??= 'tertiary';\n\t}\n\n\tif ( isSecondary ) {\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isDefault ) {\n\t\tdeprecated( 'wp.components.Button `isDefault` prop', {\n\t\t\tsince: '5.4',\n\t\t\talternative: 'variant=\"secondary\"',\n\t\t} );\n\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isLink ) {\n\t\tcomputedVariant ??= 'link';\n\t}\n\n\treturn {\n\t\t...newProps,\n\t\t...otherProps,\n\t\tsize: computedSize,\n\t\tvariant: computedVariant,\n\t};\n}\n\nexport function UnforwardedButton(\n\tprops: ButtonProps & DeprecatedButtonProps,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\t__next40pxDefaultSize,\n\t\taccessibleWhenDisabled,\n\t\tisBusy,\n\t\tisDestructive,\n\t\tclassName,\n\t\tdisabled,\n\t\ticon,\n\t\ticonPosition = 'left',\n\t\ticonSize,\n\t\tshowTooltip,\n\t\ttooltipPosition,\n\t\tshortcut,\n\t\tlabel,\n\t\tchildren,\n\t\tsize = 'default',\n\t\ttext,\n\t\tvariant,\n\t\tdescription,\n\t\t...buttonOrAnchorProps\n\t} = useDeprecatedProps( props );\n\n\tconst {\n\t\thref,\n\t\ttarget,\n\t\t'aria-checked': ariaChecked,\n\t\t'aria-pressed': ariaPressed,\n\t\t'aria-selected': ariaSelected,\n\t\t...additionalProps\n\t} = 'href' in buttonOrAnchorProps\n\t\t? buttonOrAnchorProps\n\t\t: { href: undefined, target: undefined, ...buttonOrAnchorProps };\n\n\tconst instanceId = useInstanceId(\n\t\tButton,\n\t\t'components-button__description'\n\t);\n\n\tconst hasChildren =\n\t\t( 'string' === typeof children && !! children ) ||\n\t\t( Array.isArray( children ) &&\n\t\t\tchildren?.[ 0 ] &&\n\t\t\tchildren[ 0 ] !== null &&\n\t\t\t// Tooltip should not considered as a child\n\t\t\tchildren?.[ 0 ]?.props?.className !== 'components-tooltip' );\n\n\tconst truthyAriaPressedValues: ( typeof ariaPressed )[] = [\n\t\ttrue,\n\t\t'true',\n\t\t'mixed',\n\t];\n\n\tconst classes = clsx( 'components-button', className, {\n\t\t'is-next-40px-default-size': __next40pxDefaultSize,\n\t\t'is-secondary': variant === 'secondary',\n\t\t'is-primary': variant === 'primary',\n\t\t'is-small': size === 'small',\n\t\t'is-compact': size === 'compact',\n\t\t'is-tertiary': variant === 'tertiary',\n\n\t\t'is-pressed': truthyAriaPressedValues.includes( ariaPressed ),\n\t\t'is-pressed-mixed': ariaPressed === 'mixed',\n\n\t\t'is-busy': isBusy,\n\t\t'is-link': variant === 'link',\n\t\t'is-destructive': isDestructive,\n\t\t'has-text': !! icon && ( hasChildren || text ),\n\t\t'has-icon': !! icon,\n\t} );\n\n\tconst trulyDisabled = disabled && ! accessibleWhenDisabled;\n\tconst Tag = href !== undefined && ! disabled ? 'a' : 'button';\n\tconst buttonProps: ComponentPropsWithoutRef< 'button' > =\n\t\tTag === 'button'\n\t\t\t? {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tdisabled: trulyDisabled,\n\t\t\t\t\t'aria-checked': ariaChecked,\n\t\t\t\t\t'aria-pressed': ariaPressed,\n\t\t\t\t\t'aria-selected': ariaSelected,\n\t\t\t }\n\t\t\t: {};\n\tconst anchorProps: ComponentPropsWithoutRef< 'a' > =\n\t\tTag === 'a' ? { href, target } : {};\n\n\tconst disableEventProps: {\n\t\t[ key: string ]: ( event: MouseEvent ) => void;\n\t} = {};\n\tif ( disabled && accessibleWhenDisabled ) {\n\t\t// In this case, the button will be disabled, but still focusable and\n\t\t// perceivable by screen reader users.\n\t\tbuttonProps[ 'aria-disabled' ] = true;\n\t\tanchorProps[ 'aria-disabled' ] = true;\n\t\tfor ( const disabledEvent of disabledEventsOnDisabledButton ) {\n\t\t\tdisableEventProps[ disabledEvent ] = ( event: MouseEvent ) => {\n\t\t\t\tif ( event ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\n\t// Should show the tooltip if...\n\tconst shouldShowTooltip =\n\t\t! trulyDisabled &&\n\t\t// An explicit tooltip is passed or...\n\t\t( ( showTooltip && !! label ) ||\n\t\t\t// There's a shortcut or...\n\t\t\t!! shortcut ||\n\t\t\t// There's a label and...\n\t\t\t( !! label &&\n\t\t\t\t// The children are empty and...\n\t\t\t\t! ( children as string | ReactElement[] )?.length &&\n\t\t\t\t// The tooltip is not explicitly disabled.\n\t\t\t\tfalse !== showTooltip ) );\n\n\tconst descriptionId = description ? instanceId : undefined;\n\n\tconst describedById =\n\t\tadditionalProps[ 'aria-describedby' ] || descriptionId;\n\n\tconst commonProps = {\n\t\tclassName: classes,\n\t\t'aria-label': additionalProps[ 'aria-label' ] || label,\n\t\t'aria-describedby': describedById,\n\t\tref,\n\t};\n\n\tconst elementChildren = (\n\t\t<>\n\t\t\t{ icon && iconPosition === 'left' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ text && <>{ text }</> }\n\t\t\t{ children }\n\t\t\t{ icon && iconPosition === 'right' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t</>\n\t);\n\n\tconst element =\n\t\tTag === 'a' ? (\n\t\t\t<a\n\t\t\t\t{ ...anchorProps }\n\t\t\t\t{ ...( additionalProps as HTMLAttributes< HTMLAnchorElement > ) }\n\t\t\t\t{ ...disableEventProps }\n\t\t\t\t{ ...commonProps }\n\t\t\t>\n\t\t\t\t{ elementChildren }\n\t\t\t</a>\n\t\t) : (\n\t\t\t<button\n\t\t\t\t{ ...buttonProps }\n\t\t\t\t{ ...( additionalProps as HTMLAttributes< HTMLButtonElement > ) }\n\t\t\t\t{ ...disableEventProps }\n\t\t\t\t{ ...commonProps }\n\t\t\t>\n\t\t\t\t{ elementChildren }\n\t\t\t</button>\n\t\t);\n\n\t// In order to avoid some React reconciliation issues, we are always rendering\n\t// the `Tooltip` component even when `shouldShowTooltip` is `false`.\n\t// In order to make sure that the tooltip doesn't show when it shouldn't,\n\t// we don't pass the props to the `Tooltip` component.\n\tconst tooltipProps = shouldShowTooltip\n\t\t? {\n\t\t\t\ttext:\n\t\t\t\t\t( children as string | ReactElement[] )?.length &&\n\t\t\t\t\tdescription\n\t\t\t\t\t\t? description\n\t\t\t\t\t\t: label,\n\t\t\t\tshortcut,\n\t\t\t\tplacement:\n\t\t\t\t\ttooltipPosition &&\n\t\t\t\t\t// Convert legacy `position` values to be used with the new `placement` prop\n\t\t\t\t\tpositionToPlacement( tooltipPosition ),\n\t\t }\n\t\t: {};\n\n\treturn (\n\t\t<>\n\t\t\t<Tooltip { ...tooltipProps }>{ element }</Tooltip>\n\t\t\t{ description && (\n\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t<span id={ descriptionId }>{ description }</span>\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n/**\n * Lets users take actions and make choices with a single click or tap.\n *\n * ```jsx\n * import { Button } from '@wordpress/components';\n * const Mybutton = () => (\n * <Button\n * variant=\"primary\"\n * onClick={ handleClick }\n * >\n * Click here\n * </Button>\n * );\n * ```\n */\nexport const Button = forwardRef( UnforwardedButton );\nexport default Button;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAYA,IAAAC,WAAA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AhF,WAAA,CAAAiF,QAAA;IAAArC,QAAA,gBACC,IAAA5C,WAAA,CAAAkF,GAAA,EAACtF,QAAA,CAAAuF,OAAO;MAAA,GAAME,YAAY;MAAAzC,QAAA,EAAKwC;IAAO,CAAW,CAAC,EAChDjE,WAAW,iBACZ,IAAAnB,WAAA,CAAAkF,GAAA,EAACpF,eAAA,CAAA0F,cAAc;MAAA5C,QAAA,eACd,IAAA5C,WAAA,CAAAkF,GAAA;QAAMO,EAAE,EAAGb,aAAe;QAAAhC,QAAA,EAAGzB;MAAW,CAAQ;IAAC,CAClC,CAChB;EAAA,CACA,CAAC;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMqC,MAAM,GAAAkC,OAAA,CAAAlC,MAAA,GAAG,IAAAmC,mBAAU,EAAE9D,iBAAkB,CAAC;AAAC,IAAA+D,QAAA,GAAAF,OAAA,CAAAP,OAAA,GACvC3B,MAAM","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/button/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { Props as IconProps } from '../icon';\nimport type { PopoverProps } from '../popover/types';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\n\nexport type ButtonProps =\n\t| WordPressComponentProps< ButtonAsButtonProps, 'button', false >\n\t| WordPressComponentProps< ButtonAsAnchorProps, 'a', false >;\n\nexport type ButtonAsButtonProps = BaseButtonProps & _ButtonProps;\nexport type ButtonAsAnchorProps = BaseButtonProps & AnchorProps;\n\ntype BaseButtonProps = {\n\t/**\n\t * Start opting into the larger default height that will become the\n\t * default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n\t/**\n\t * The button's children.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * An accessible description for the button.\n\t */\n\tdescribedBy?: string;\n\t/**\n\t * If provided, renders an Icon component inside the button.\n\t */\n\ticon?: IconProps[ 'icon' ];\n\t/**\n\t * If provided with `icon`, sets the position of icon relative to the `text`.\n\t *\n\t * @default 'left'\n\t */\n\ticonPosition?: 'left' | 'right';\n\t/**\n\t * If provided with `icon`, sets the icon size.\n\t * Please refer to the Icon component for more details regarding\n\t * the default value of its `size` prop.\n\t */\n\ticonSize?: IconProps[ 'size' ];\n\t/**\n\t * Indicates activity while a action is being performed.\n\t */\n\tisBusy?: boolean;\n\t/**\n\t * Renders a red text-based button style to indicate destructive behavior.\n\t */\n\tisDestructive?: boolean;\n\t/**\n\t * Renders a pressed button style.\n\t */\n\tisPressed?: boolean;\n\t/**\n\t * Sets the `aria-label` of the component, if none is provided.\n\t * Sets the Tooltip content if `showTooltip` is provided.\n\t */\n\tlabel?: string;\n\t/**\n\t * If provided with `showTooltip`, appends the Shortcut label to the tooltip content.\n\t * If an object is provided, it should contain `display` and `ariaLabel` keys.\n\t */\n\tshortcut?: string | { display: string; ariaLabel: string };\n\t/**\n\t * If provided, renders a Tooltip component for the button.\n\t */\n\tshowTooltip?: boolean;\n\t/**\n\t * The size of the button.\n\t *\n\t * - `'default'`: For normal text-label buttons, unless it is a toggle button.\n\t * - `'compact'`: For toggle buttons, icon buttons, and buttons when used in context of either.\n\t * - `'small'`: For icon buttons associated with more advanced or auxiliary features.\n\t *\n\t * If the deprecated `isSmall` prop is also defined, this prop will take precedence.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'compact' | 'small';\n\t/**\n\t * If provided, displays the given text inside the button. If the button contains children elements, the text is displayed before them.\n\t */\n\ttext?: string;\n\t/**\n\t * If provided with `showTooltip`, sets the position of the tooltip.\n\t * Please refer to the Tooltip component for more details regarding the defaults.\n\t */\n\ttooltipPosition?: PopoverProps[ 'position' ];\n\t/**\n\t * Specifies the button's style.\n\t * The accepted values are:\n\t * 'primary' (the primary button styles)\n\t * 'secondary' (the default button styles)\n\t * 'tertiary' (the text-based button styles)\n\t * 'link' (the link button styles)\n\t */\n\tvariant?: 'primary' | 'secondary' | 'tertiary' | 'link';\n\t/**\n\t * Whether to keep the button focusable when disabled.\n\t *\n\t * @default false\n\t */\n\t__experimentalIsFocusable?: boolean;\n};\n\ntype _ButtonProps = {\n\t/**\n\t * Whether the button is disabled.\n\t *\n\t * If `true`, this will force a `button` element to be rendered, even when an `href` is given.\n\t */\n\tdisabled?: boolean;\n};\n\ntype AnchorProps = {\n\t/**\n\t * Whether the button is disabled.\n\t *\n\t * If `true`, this will force a `button` element to be rendered, even when an `href` is given.\n\t */\n\tdisabled?: false;\n\t/**\n\t * If provided, renders `a` instead of `button`.\n\t */\n\thref: string;\n\t/**\n\t * If provided with `href`, sets the `target` attribute to the `a`.\n\t */\n\ttarget?: string;\n};\n\nexport type DeprecatedButtonProps = {\n\t/**\n\t * Gives the button a default style.\n\t *\n\t * @deprecated Use the `'secondary'` value on the `variant` prop instead.\n\t * @ignore\n\t */\n\tisDefault?: boolean;\n\t/**\n\t * Gives the button a link style.\n\t *\n\t * @deprecated Use the `'link'` value on the `variant` prop instead.\n\t * @ignore\n\t */\n\tisLink?: boolean;\n\t/**\n\t * Gives the button a primary style.\n\t *\n\t * @deprecated Use the `'primary'` value on the `variant` prop instead.\n\t * @ignore\n\t */\n\tisPrimary?: boolean;\n\t/**\n\t * Gives the button a default style.\n\t *\n\t * @deprecated Use the `'secondary'` value on the `variant` prop instead.\n\t * @ignore\n\t */\n\tisSecondary?: boolean;\n\t/**\n\t * Gives the button a text-based style.\n\t *\n\t * @deprecated Use the `'tertiary'` value on the `variant` prop instead.\n\t * @ignore\n\t */\n\tisTertiary?: boolean;\n\t/**\n\t * Decreases the size of the button.\n\t *\n\t * @deprecated Use the `'small'` value on the `size` prop instead.\n\t * @ignore\n\t */\n\tisSmall?: boolean;\n};\n\nexport type DeprecatedIconButtonProps = {\n\tlabelPosition: ButtonProps[ 'tooltipPosition' ];\n\tshowTooltip?: boolean;\n\tsize: ButtonProps[ 'iconSize' ];\n\tlabel: ButtonProps[ 'label' ];\n\ttooltip: ButtonProps[ 'label' ];\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/button/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { Props as IconProps } from '../icon';\nimport type { PopoverProps } from '../popover/types';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\n\nexport type ButtonProps =\n\t| WordPressComponentProps< ButtonAsButtonProps, 'button', false >\n\t| WordPressComponentProps< ButtonAsAnchorProps, 'a', false >;\n\nexport type ButtonAsButtonProps = BaseButtonProps & _ButtonProps;\nexport type ButtonAsAnchorProps = BaseButtonProps & AnchorProps;\n\ntype BaseButtonProps = {\n\t/**\n\t * Start opting into the larger default height that will become the\n\t * default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n\t/**\n\t * Whether to keep the button focusable when disabled.\n\t *\n\t * In most cases, it is recommended to set this to `true`. Disabling a control without maintaining focusability\n\t * can cause accessibility issues, by hiding their presence from screen reader users,\n\t * or by preventing focus from returning to a trigger element.\n\t *\n\t * Learn more about the [focusability of disabled controls](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#focusabilityofdisabledcontrols)\n\t * in the WAI-ARIA Authoring Practices Guide.\n\t *\n\t * @default false\n\t */\n\taccessibleWhenDisabled?: boolean;\n\t/**\n\t * The button's children.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * A visually hidden accessible description for the button.\n\t */\n\tdescription?: string;\n\t/**\n\t * If provided, renders an Icon component inside the button.\n\t */\n\ticon?: IconProps[ 'icon' ];\n\t/**\n\t * If provided with `icon`, sets the position of icon relative to the `text`.\n\t *\n\t * @default 'left'\n\t */\n\ticonPosition?: 'left' | 'right';\n\t/**\n\t * If provided with `icon`, sets the icon size.\n\t * Please refer to the Icon component for more details regarding\n\t * the default value of its `size` prop.\n\t */\n\ticonSize?: IconProps[ 'size' ];\n\t/**\n\t * Indicates activity while a action is being performed.\n\t */\n\tisBusy?: boolean;\n\t/**\n\t * Renders a red text-based button style to indicate destructive behavior.\n\t */\n\tisDestructive?: boolean;\n\t/**\n\t * Renders a pressed button style.\n\t */\n\tisPressed?: boolean;\n\t/**\n\t * Sets the `aria-label` of the component, if none is provided.\n\t * Sets the Tooltip content if `showTooltip` is provided.\n\t */\n\tlabel?: string;\n\t/**\n\t * If provided with `showTooltip`, appends the Shortcut label to the tooltip content.\n\t * If an object is provided, it should contain `display` and `ariaLabel` keys.\n\t */\n\tshortcut?: string | { display: string; ariaLabel: string };\n\t/**\n\t * If provided, renders a Tooltip component for the button.\n\t */\n\tshowTooltip?: boolean;\n\t/**\n\t * The size of the button.\n\t *\n\t * - `'default'`: For normal text-label buttons, unless it is a toggle button.\n\t * - `'compact'`: For toggle buttons, icon buttons, and buttons when used in context of either.\n\t * - `'small'`: For icon buttons associated with more advanced or auxiliary features.\n\t *\n\t * If the deprecated `isSmall` prop is also defined, this prop will take precedence.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'compact' | 'small';\n\t/**\n\t * If provided, displays the given text inside the button. If the button contains children elements, the text is displayed before them.\n\t */\n\ttext?: string;\n\t/**\n\t * If provided with `showTooltip`, sets the position of the tooltip.\n\t * Please refer to the Tooltip component for more details regarding the defaults.\n\t */\n\ttooltipPosition?: PopoverProps[ 'position' ];\n\t/**\n\t * Specifies the button's style.\n\t * The accepted values are:\n\t * 'primary' (the primary button styles)\n\t * 'secondary' (the default button styles)\n\t * 'tertiary' (the text-based button styles)\n\t * 'link' (the link button styles)\n\t */\n\tvariant?: 'primary' | 'secondary' | 'tertiary' | 'link';\n};\n\ntype _ButtonProps = {\n\t/**\n\t * Whether the button is disabled. If `true`, this will force a `button` element\n\t * to be rendered, even when an `href` is given.\n\t *\n\t * In most cases, it is recommended to also set the `accessibleWhenDisabled` prop to `true`.\n\t */\n\tdisabled?: boolean;\n};\n\ntype AnchorProps = {\n\t/**\n\t * Whether the button is disabled. If `true`, this will force a `button` element\n\t * to be rendered, even when an `href` is given.\n\t *\n\t * In most cases, it is recommended to also set the `accessibleWhenDisabled` prop to `true`.\n\t */\n\tdisabled?: false;\n\t/**\n\t * If provided, renders `a` instead of `button`.\n\t */\n\thref: string;\n\t/**\n\t * If provided with `href`, sets the `target` attribute to the `a`.\n\t */\n\ttarget?: string;\n};\n\nexport type DeprecatedButtonProps = {\n\t/**\n\t * Whether to keep the button focusable when disabled.\n\t *\n\t * @default false\n\t * @deprecated Use the `accessibleWhenDisabled` prop instead.\n\t * @ignore\n\t */\n\t__experimentalIsFocusable?: boolean;\n\t/**\n\t * Gives the button a default style.\n\t *\n\t * @deprecated Use the `'secondary'` value on the `variant` prop instead.\n\t * @ignore\n\t */\n\tisDefault?: boolean;\n\t/**\n\t * Gives the button a link style.\n\t *\n\t * @deprecated Use the `'link'` value on the `variant` prop instead.\n\t * @ignore\n\t */\n\tisLink?: boolean;\n\t/**\n\t * Gives the button a primary style.\n\t *\n\t * @deprecated Use the `'primary'` value on the `variant` prop instead.\n\t * @ignore\n\t */\n\tisPrimary?: boolean;\n\t/**\n\t * Gives the button a default style.\n\t *\n\t * @deprecated Use the `'secondary'` value on the `variant` prop instead.\n\t * @ignore\n\t */\n\tisSecondary?: boolean;\n\t/**\n\t * Gives the button a text-based style.\n\t *\n\t * @deprecated Use the `'tertiary'` value on the `variant` prop instead.\n\t * @ignore\n\t */\n\tisTertiary?: boolean;\n\t/**\n\t * Decreases the size of the button.\n\t *\n\t * @deprecated Use the `'small'` value on the `size` prop instead.\n\t * @ignore\n\t */\n\tisSmall?: boolean;\n\t/**\n\t * A visually hidden accessible description for the button.\n\t *\n\t * @deprecated Use the `description` prop instead.\n\t * @ignore\n\t */\n\tdescribedBy?: string;\n};\n\nexport type DeprecatedIconButtonProps = {\n\tlabelPosition: ButtonProps[ 'tooltipPosition' ];\n\tshowTooltip?: boolean;\n\tsize: ButtonProps[ 'iconSize' ];\n\tlabel: ButtonProps[ 'label' ];\n\ttooltip: ButtonProps[ 'label' ];\n};\n"],"mappings":"","ignoreList":[]}
@@ -37,6 +37,7 @@ var _jsxRuntime = require("react/jsx-runtime");
37
37
  * const [ isChecked, setChecked ] = useState( true );
38
38
  * return (
39
39
  * <CheckboxControl
40
+ * __nextHasNoMarginBottom
40
41
  * label="Is author"
41
42
  * help="Is the user a author or not?"
42
43
  * checked={ isChecked }
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_compose","_deprecated","_icons","_baseControl","_hStack","_jsxRuntime","CheckboxControl","props","__nextHasNoMarginBottom","label","className","heading","checked","indeterminate","help","id","idProp","onChange","additionalProps","deprecated","alternative","since","showCheckedIcon","setShowCheckedIcon","useState","showIndeterminateIcon","setShowIndeterminateIcon","ref","useRefEffect","node","matches","useInstanceId","onChangeValue","event","target","jsx","default","children","clsx","jsxs","HStack","spacing","justify","alignment","type","value","undefined","Icon","icon","reset","role","check","htmlFor","_default","exports"],"sources":["@wordpress/components/src/checkbox-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { useInstanceId, useRefEffect } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\nimport { Icon, check, reset } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { HStack } from '../h-stack';\nimport type { CheckboxControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * Checkboxes allow the user to select one or more items from a set.\n *\n * ```jsx\n * import { CheckboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyCheckboxControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <CheckboxControl\n * label=\"Is author\"\n * help=\"Is the user a author or not?\"\n * checked={ isChecked }\n * onChange={ setChecked }\n * />\n * );\n * };\n * ```\n */\nexport function CheckboxControl(\n\tprops: WordPressComponentProps< CheckboxControlProps, 'input', false >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\tclassName,\n\t\theading,\n\t\tchecked,\n\t\tindeterminate,\n\t\thelp,\n\t\tid: idProp,\n\t\tonChange,\n\t\t...additionalProps\n\t} = props;\n\n\tif ( heading ) {\n\t\tdeprecated( '`heading` prop in `CheckboxControl`', {\n\t\t\talternative: 'a separate element to implement a heading',\n\t\t\tsince: '5.8',\n\t\t} );\n\t}\n\n\tconst [ showCheckedIcon, setShowCheckedIcon ] = useState( false );\n\tconst [ showIndeterminateIcon, setShowIndeterminateIcon ] =\n\t\tuseState( false );\n\n\t// Run the following callback every time the `ref` (and the additional\n\t// dependencies) change.\n\tconst ref = useRefEffect< HTMLInputElement >(\n\t\t( node ) => {\n\t\t\tif ( ! node ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// It cannot be set using an HTML attribute.\n\t\t\tnode.indeterminate = !! indeterminate;\n\n\t\t\tsetShowCheckedIcon( node.matches( ':checked' ) );\n\t\t\tsetShowIndeterminateIcon( node.matches( ':indeterminate' ) );\n\t\t},\n\t\t[ checked, indeterminate ]\n\t);\n\tconst id = useInstanceId(\n\t\tCheckboxControl,\n\t\t'inspector-checkbox-control',\n\t\tidProp\n\t);\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.checked );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ heading }\n\t\t\tid={ id }\n\t\t\thelp={\n\t\t\t\thelp && (\n\t\t\t\t\t<span className=\"components-checkbox-control__help\">\n\t\t\t\t\t\t{ help }\n\t\t\t\t\t</span>\n\t\t\t\t)\n\t\t\t}\n\t\t\tclassName={ clsx( 'components-checkbox-control', className ) }\n\t\t>\n\t\t\t<HStack spacing={ 0 } justify=\"start\" alignment=\"top\">\n\t\t\t\t<span className=\"components-checkbox-control__input-container\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\tclassName=\"components-checkbox-control__input\"\n\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\tvalue=\"1\"\n\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\tchecked={ checked }\n\t\t\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t/>\n\t\t\t\t\t{ showIndeterminateIcon ? (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ reset }\n\t\t\t\t\t\t\tclassName=\"components-checkbox-control__indeterminate\"\n\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null }\n\t\t\t\t\t{ showCheckedIcon ? (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\tclassName=\"components-checkbox-control__checked\"\n\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null }\n\t\t\t\t</span>\n\t\t\t\t{ label && (\n\t\t\t\t\t<label\n\t\t\t\t\t\tclassName=\"components-checkbox-control__label\"\n\t\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</label>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default CheckboxControl;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,YAAA,GAAAN,sBAAA,CAAAC,OAAA;A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IAAI,EAAGG,YAAO;UACdzC,SAAS,EAAC,sCAAsC;UAChDwC,IAAI,EAAC;QAAc,CACnB,CAAC,GACC,IAAI;MAAA,CACH,CAAC,EACLzC,KAAK,iBACN,IAAAJ,WAAA,CAAA8B,GAAA;QACCzB,SAAS,EAAC,oCAAoC;QAC9C0C,OAAO,EAAGrC,EAAI;QAAAsB,QAAA,EAEZ5B;MAAK,CACD,CACP;IAAA,CACM;EAAC,CACG,CAAC;AAEhB;AAAC,IAAA4C,QAAA,GAAAC,OAAA,CAAAlB,OAAA,GAEc9B,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_compose","_deprecated","_icons","_baseControl","_hStack","_jsxRuntime","CheckboxControl","props","__nextHasNoMarginBottom","label","className","heading","checked","indeterminate","help","id","idProp","onChange","additionalProps","deprecated","alternative","since","showCheckedIcon","setShowCheckedIcon","useState","showIndeterminateIcon","setShowIndeterminateIcon","ref","useRefEffect","node","matches","useInstanceId","onChangeValue","event","target","jsx","default","children","clsx","jsxs","HStack","spacing","justify","alignment","type","value","undefined","Icon","icon","reset","role","check","htmlFor","_default","exports"],"sources":["@wordpress/components/src/checkbox-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { useInstanceId, useRefEffect } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\nimport { Icon, check, reset } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { HStack } from '../h-stack';\nimport type { CheckboxControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * Checkboxes allow the user to select one or more items from a set.\n *\n * ```jsx\n * import { CheckboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyCheckboxControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <CheckboxControl\n * __nextHasNoMarginBottom\n * label=\"Is author\"\n * help=\"Is the user a author or not?\"\n * checked={ isChecked }\n * onChange={ setChecked }\n * />\n * );\n * };\n * ```\n */\nexport function CheckboxControl(\n\tprops: WordPressComponentProps< CheckboxControlProps, 'input', false >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\tclassName,\n\t\theading,\n\t\tchecked,\n\t\tindeterminate,\n\t\thelp,\n\t\tid: idProp,\n\t\tonChange,\n\t\t...additionalProps\n\t} = props;\n\n\tif ( heading ) {\n\t\tdeprecated( '`heading` prop in `CheckboxControl`', {\n\t\t\talternative: 'a separate element to implement a heading',\n\t\t\tsince: '5.8',\n\t\t} );\n\t}\n\n\tconst [ showCheckedIcon, setShowCheckedIcon ] = useState( false );\n\tconst [ showIndeterminateIcon, setShowIndeterminateIcon ] =\n\t\tuseState( false );\n\n\t// Run the following callback every time the `ref` (and the additional\n\t// dependencies) change.\n\tconst ref = useRefEffect< HTMLInputElement >(\n\t\t( node ) => {\n\t\t\tif ( ! node ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// It cannot be set using an HTML attribute.\n\t\t\tnode.indeterminate = !! indeterminate;\n\n\t\t\tsetShowCheckedIcon( node.matches( ':checked' ) );\n\t\t\tsetShowIndeterminateIcon( node.matches( ':indeterminate' ) );\n\t\t},\n\t\t[ checked, indeterminate ]\n\t);\n\tconst id = useInstanceId(\n\t\tCheckboxControl,\n\t\t'inspector-checkbox-control',\n\t\tidProp\n\t);\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.checked );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ heading }\n\t\t\tid={ id }\n\t\t\thelp={\n\t\t\t\thelp && (\n\t\t\t\t\t<span className=\"components-checkbox-control__help\">\n\t\t\t\t\t\t{ help }\n\t\t\t\t\t</span>\n\t\t\t\t)\n\t\t\t}\n\t\t\tclassName={ clsx( 'components-checkbox-control', className ) }\n\t\t>\n\t\t\t<HStack spacing={ 0 } justify=\"start\" alignment=\"top\">\n\t\t\t\t<span className=\"components-checkbox-control__input-container\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\tclassName=\"components-checkbox-control__input\"\n\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\tvalue=\"1\"\n\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\tchecked={ checked }\n\t\t\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t/>\n\t\t\t\t\t{ showIndeterminateIcon ? (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ reset }\n\t\t\t\t\t\t\tclassName=\"components-checkbox-control__indeterminate\"\n\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null }\n\t\t\t\t\t{ showCheckedIcon ? (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\tclassName=\"components-checkbox-control__checked\"\n\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null }\n\t\t\t\t</span>\n\t\t\t\t{ label && (\n\t\t\t\t\t<label\n\t\t\t\t\t\tclassName=\"components-checkbox-control__label\"\n\t\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</label>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default CheckboxControl;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAA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,CAAC,GACC,IAAI,EACN5B,eAAe,gBAChB,IAAAjB,WAAA,CAAA8B,GAAA,EAACjC,MAAA,CAAA6C,IAAI;UACJC,IAAI,EAAGG,YAAO;UACdzC,SAAS,EAAC,sCAAsC;UAChDwC,IAAI,EAAC;QAAc,CACnB,CAAC,GACC,IAAI;MAAA,CACH,CAAC,EACLzC,KAAK,iBACN,IAAAJ,WAAA,CAAA8B,GAAA;QACCzB,SAAS,EAAC,oCAAoC;QAC9C0C,OAAO,EAAGrC,EAAI;QAAAsB,QAAA,EAEZ5B;MAAK,CACD,CACP;IAAA,CACM;EAAC,CACG,CAAC;AAEhB;AAAC,IAAA4C,QAAA,GAAAC,OAAA,CAAAlB,OAAA,GAEc9B,eAAe","ignoreList":[]}
@@ -40,13 +40,6 @@ const options = [{
40
40
  label: 'Hex',
41
41
  value: 'hex'
42
42
  }];
43
-
44
- // `isBorderless` is still experimental and not a public prop for InputControl yet.
45
- const BORDERLESS_SELECT_CONTROL_CONTEXT = {
46
- InputBase: {
47
- isBorderless: true
48
- }
49
- };
50
43
  const UnconnectedColorPicker = (props, forwardedRef) => {
51
44
  const {
52
45
  enableAlpha = false,
@@ -81,16 +74,14 @@ const UnconnectedColorPicker = (props, forwardedRef) => {
81
74
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.AuxiliaryColorArtefactWrapper, {
82
75
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.AuxiliaryColorArtefactHStackHeader, {
83
76
  justify: "space-between",
84
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_context.ContextSystemProvider, {
85
- value: BORDERLESS_SELECT_CONTROL_CONTEXT,
86
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SelectControl, {
87
- __nextHasNoMarginBottom: true,
88
- options: options,
89
- value: colorType,
90
- onChange: nextColorType => setColorType(nextColorType),
91
- label: (0, _i18n.__)('Color format'),
92
- hideLabelFromVision: true
93
- })
77
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SelectControl, {
78
+ __nextHasNoMarginBottom: true,
79
+ options: options,
80
+ value: colorType,
81
+ onChange: nextColorType => setColorType(nextColorType),
82
+ label: (0, _i18n.__)('Color format'),
83
+ hideLabelFromVision: true,
84
+ variant: "minimal"
94
85
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_colorCopyButton.ColorCopyButton, {
95
86
  color: safeColordColor,
96
87
  colorType: copyFormat || colorType
@@ -1 +1 @@
1
- {"version":3,"names":["_colord","require","_names","_interopRequireDefault","_element","_compose","_i18n","_context","_styles","_colorCopyButton","_colorInput","_picker","_hooks","_jsxRuntime","extend","namesPlugin","options","label","value","BORDERLESS_SELECT_CONTROL_CONTEXT","InputBase","isBorderless","UnconnectedColorPicker","props","forwardedRef","enableAlpha","color","colorProp","onChange","defaultValue","copyFormat","divProps","useContextSystem","setColor","useControlledValue","safeColordColor","useMemo","colord","debouncedSetColor","useDebounce","handleChange","useCallback","nextValue","toHex","colorType","setColorType","useState","jsxs","ColorfulWrapper","ref","children","jsx","Picker","AuxiliaryColorArtefactWrapper","AuxiliaryColorArtefactHStackHeader","justify","ContextSystemProvider","SelectControl","__nextHasNoMarginBottom","nextColorType","__","hideLabelFromVision","ColorCopyButton","ColorInputWrapper","direction","gap","ColorInput","ColorPicker","exports","contextConnect","_default","default"],"sources":["@wordpress/components/src/color-picker/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport type { Colord } from 'colord';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useState, useMemo } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseContextSystem,\n\tcontextConnect,\n\tContextSystemProvider,\n} from '../context';\nimport {\n\tColorfulWrapper,\n\tSelectControl,\n\tAuxiliaryColorArtefactWrapper,\n\tAuxiliaryColorArtefactHStackHeader,\n\tColorInputWrapper,\n} from './styles';\nimport { ColorCopyButton } from './color-copy-button';\nimport { ColorInput } from './color-input';\nimport { Picker } from './picker';\nimport { useControlledValue } from '../utils/hooks';\n\nimport type { ColorPickerProps, ColorType } from './types';\n\nextend( [ namesPlugin ] );\n\nconst options = [\n\t{ label: 'RGB', value: 'rgb' as const },\n\t{ label: 'HSL', value: 'hsl' as const },\n\t{ label: 'Hex', value: 'hex' as const },\n];\n\n// `isBorderless` is still experimental and not a public prop for InputControl yet.\nconst BORDERLESS_SELECT_CONTROL_CONTEXT = { InputBase: { isBorderless: true } };\n\nconst UnconnectedColorPicker = (\n\tprops: ColorPickerProps,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tenableAlpha = false,\n\t\tcolor: colorProp,\n\t\tonChange,\n\t\tdefaultValue = '#fff',\n\t\tcopyFormat,\n\t\t...divProps\n\t} = useContextSystem( props, 'ColorPicker' );\n\n\t// Use a safe default value for the color and remove the possibility of `undefined`.\n\tconst [ color, setColor ] = useControlledValue( {\n\t\tonChange,\n\t\tvalue: colorProp,\n\t\tdefaultValue,\n\t} );\n\n\tconst safeColordColor = useMemo( () => {\n\t\treturn colord( color || '' );\n\t}, [ color ] );\n\n\tconst debouncedSetColor = useDebounce( setColor );\n\n\tconst handleChange = useCallback(\n\t\t( nextValue: Colord ) => {\n\t\t\tdebouncedSetColor( nextValue.toHex() );\n\t\t},\n\t\t[ debouncedSetColor ]\n\t);\n\n\tconst [ colorType, setColorType ] = useState< ColorType >(\n\t\tcopyFormat || 'hex'\n\t);\n\n\treturn (\n\t\t<ColorfulWrapper ref={ forwardedRef } { ...divProps }>\n\t\t\t<Picker\n\t\t\t\tonChange={ handleChange }\n\t\t\t\tcolor={ safeColordColor }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t/>\n\t\t\t<AuxiliaryColorArtefactWrapper>\n\t\t\t\t<AuxiliaryColorArtefactHStackHeader justify=\"space-between\">\n\t\t\t\t\t<ContextSystemProvider\n\t\t\t\t\t\tvalue={ BORDERLESS_SELECT_CONTROL_CONTEXT }\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\t\tvalue={ colorType }\n\t\t\t\t\t\t\tonChange={ ( nextColorType ) =>\n\t\t\t\t\t\t\t\tsetColorType( nextColorType as ColorType )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlabel={ __( 'Color format' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ContextSystemProvider>\n\t\t\t\t\t<ColorCopyButton\n\t\t\t\t\t\tcolor={ safeColordColor }\n\t\t\t\t\t\tcolorType={ copyFormat || colorType }\n\t\t\t\t\t/>\n\t\t\t\t</AuxiliaryColorArtefactHStackHeader>\n\t\t\t\t<ColorInputWrapper direction=\"column\" gap={ 2 }>\n\t\t\t\t\t<ColorInput\n\t\t\t\t\t\tcolorType={ colorType }\n\t\t\t\t\t\tcolor={ safeColordColor }\n\t\t\t\t\t\tonChange={ handleChange }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t/>\n\t\t\t\t</ColorInputWrapper>\n\t\t\t</AuxiliaryColorArtefactWrapper>\n\t\t</ColorfulWrapper>\n\t);\n};\n\nexport const ColorPicker = contextConnect(\n\tUnconnectedColorPicker,\n\t'ColorPicker'\n);\n\nexport default ColorPicker;\n"],"mappings":";;;;;;;AAKA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAKA,IAAAM,QAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAP,OAAA;AAOA,IAAAQ,gBAAA,GAAAR,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ACrC,IAAA/B,WAAA,CAAAsC,GAAA,EAAC3C,OAAA,CAAAuD,iBAAiB;QAACC,SAAS,EAAC,QAAQ;QAACC,GAAG,EAAG,CAAG;QAAAf,QAAA,eAC9C,IAAArC,WAAA,CAAAsC,GAAA,EAACzC,WAAA,CAAAwD,UAAU;UACVtB,SAAS,EAAGA,SAAW;UACvBlB,KAAK,EAAGS,eAAiB;UACzBP,QAAQ,EAAGY,YAAc;UACzBf,WAAW,EAAGA;QAAa,CAC3B;MAAC,CACgB,CAAC;IAAA,CACU,CAAC;EAAA,CAChB,CAAC;AAEpB,CAAC;AAEM,MAAM0C,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,uBAAc,EACxC/C,sBAAsB,EACtB,aACD,CAAC;AAAC,IAAAgD,QAAA,GAAAF,OAAA,CAAAG,OAAA,GAEaJ,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["_colord","require","_names","_interopRequireDefault","_element","_compose","_i18n","_context","_styles","_colorCopyButton","_colorInput","_picker","_hooks","_jsxRuntime","extend","namesPlugin","options","label","value","UnconnectedColorPicker","props","forwardedRef","enableAlpha","color","colorProp","onChange","defaultValue","copyFormat","divProps","useContextSystem","setColor","useControlledValue","safeColordColor","useMemo","colord","debouncedSetColor","useDebounce","handleChange","useCallback","nextValue","toHex","colorType","setColorType","useState","jsxs","ColorfulWrapper","ref","children","jsx","Picker","AuxiliaryColorArtefactWrapper","AuxiliaryColorArtefactHStackHeader","justify","SelectControl","__nextHasNoMarginBottom","nextColorType","__","hideLabelFromVision","variant","ColorCopyButton","ColorInputWrapper","direction","gap","ColorInput","ColorPicker","exports","contextConnect","_default","default"],"sources":["@wordpress/components/src/color-picker/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport type { Colord } from 'colord';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useState, useMemo } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, contextConnect } from '../context';\nimport {\n\tColorfulWrapper,\n\tSelectControl,\n\tAuxiliaryColorArtefactWrapper,\n\tAuxiliaryColorArtefactHStackHeader,\n\tColorInputWrapper,\n} from './styles';\nimport { ColorCopyButton } from './color-copy-button';\nimport { ColorInput } from './color-input';\nimport { Picker } from './picker';\nimport { useControlledValue } from '../utils/hooks';\n\nimport type { ColorPickerProps, ColorType } from './types';\n\nextend( [ namesPlugin ] );\n\nconst options = [\n\t{ label: 'RGB', value: 'rgb' as const },\n\t{ label: 'HSL', value: 'hsl' as const },\n\t{ label: 'Hex', value: 'hex' as const },\n];\n\nconst UnconnectedColorPicker = (\n\tprops: ColorPickerProps,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tenableAlpha = false,\n\t\tcolor: colorProp,\n\t\tonChange,\n\t\tdefaultValue = '#fff',\n\t\tcopyFormat,\n\t\t...divProps\n\t} = useContextSystem( props, 'ColorPicker' );\n\n\t// Use a safe default value for the color and remove the possibility of `undefined`.\n\tconst [ color, setColor ] = useControlledValue( {\n\t\tonChange,\n\t\tvalue: colorProp,\n\t\tdefaultValue,\n\t} );\n\n\tconst safeColordColor = useMemo( () => {\n\t\treturn colord( color || '' );\n\t}, [ color ] );\n\n\tconst debouncedSetColor = useDebounce( setColor );\n\n\tconst handleChange = useCallback(\n\t\t( nextValue: Colord ) => {\n\t\t\tdebouncedSetColor( nextValue.toHex() );\n\t\t},\n\t\t[ debouncedSetColor ]\n\t);\n\n\tconst [ colorType, setColorType ] = useState< ColorType >(\n\t\tcopyFormat || 'hex'\n\t);\n\n\treturn (\n\t\t<ColorfulWrapper ref={ forwardedRef } { ...divProps }>\n\t\t\t<Picker\n\t\t\t\tonChange={ handleChange }\n\t\t\t\tcolor={ safeColordColor }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t/>\n\t\t\t<AuxiliaryColorArtefactWrapper>\n\t\t\t\t<AuxiliaryColorArtefactHStackHeader justify=\"space-between\">\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\tvalue={ colorType }\n\t\t\t\t\t\tonChange={ ( nextColorType ) =>\n\t\t\t\t\t\t\tsetColorType( nextColorType as ColorType )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabel={ __( 'Color format' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvariant=\"minimal\"\n\t\t\t\t\t/>\n\t\t\t\t\t<ColorCopyButton\n\t\t\t\t\t\tcolor={ safeColordColor }\n\t\t\t\t\t\tcolorType={ copyFormat || colorType }\n\t\t\t\t\t/>\n\t\t\t\t</AuxiliaryColorArtefactHStackHeader>\n\t\t\t\t<ColorInputWrapper direction=\"column\" gap={ 2 }>\n\t\t\t\t\t<ColorInput\n\t\t\t\t\t\tcolorType={ colorType }\n\t\t\t\t\t\tcolor={ safeColordColor }\n\t\t\t\t\t\tonChange={ handleChange }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t/>\n\t\t\t\t</ColorInputWrapper>\n\t\t\t</AuxiliaryColorArtefactWrapper>\n\t\t</ColorfulWrapper>\n\t);\n};\n\nexport const ColorPicker = contextConnect(\n\tUnconnectedColorPicker,\n\t'ColorPicker'\n);\n\nexport default ColorPicker;\n"],"mappings":";;;;;;;AAKA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAKA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAOA,IAAAQ,gBAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IA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AiB;UACzBP,QAAQ,EAAGY,YAAc;UACzBf,WAAW,EAAGA;QAAa,CAC3B;MAAC,CACgB,CAAC;IAAA,CACU,CAAC;EAAA,CAChB,CAAC;AAEpB,CAAC;AAEM,MAAM0C,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,uBAAc,EACxC/C,sBAAsB,EACtB,aACD,CAAC;AAAC,IAAAgD,QAAA,GAAAF,OAAA,CAAAG,OAAA,GAEaJ,WAAW","ignoreList":[]}
@@ -76,6 +76,7 @@ const getIndexOfMatchingSuggestion = (selectedSuggestion, matchingSuggestions) =
76
76
  * const [ filteredOptions, setFilteredOptions ] = useState( options );
77
77
  * return (
78
78
  * <ComboboxControl
79
+ * __nextHasNoMarginBottom
79
80
  * label="Font Size"
80
81
  * value={ fontSize }
81
82
  * onChange={ setFontSize }
@@ -226,6 +227,13 @@ function ComboboxControl(props) {
226
227
  inputContainer.current?.focus();
227
228
  };
228
229
 
230
+ // Stop propagation of the keydown event when pressing Enter on the Reset
231
+ // button to prevent calling the onKeydown callback on the container div
232
+ // element which actually sets the selected suggestion.
233
+ const handleResetStopPropagation = event => {
234
+ event.stopPropagation();
235
+ };
236
+
229
237
  // Update current selections when the filter input changes.
230
238
  (0, _element.useEffect)(() => {
231
239
  const hasMatchingSuggestions = matchingSuggestions.length > 0;
@@ -281,9 +289,13 @@ function ComboboxControl(props) {
281
289
  }), allowReset && /*#__PURE__*/(0, _jsxRuntime.jsx)(_flex.FlexItem, {
282
290
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
283
291
  className: "components-combobox-control__reset",
284
- icon: _icons.closeSmall,
292
+ icon: _icons.closeSmall
293
+ // Disable reason: Focus returns to input field when reset is clicked.
294
+ // eslint-disable-next-line no-restricted-syntax
295
+ ,
285
296
  disabled: !value,
286
297
  onClick: handleOnReset,
298
+ onKeyDown: handleResetStopPropagation,
287
299
  label: (0, _i18n.__)('Reset')
288
300
  })
289
301
  })]
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_compose","_a11y","_icons","_styles","_tokenInput","_suggestionsList","_baseControl","_button","_flex","_withFocusOutside","_hooks","_strings","_useDeprecatedProps","_withIgnoreImeEvents","_jsxRuntime","noop","DetectOutside","withFocusOutside","Component","handleFocusOutside","event","props","onFocusOutside","render","children","getIndexOfMatchingSuggestion","selectedSuggestion","matchingSuggestions","indexOf","ComboboxControl","_currentOption$label","__nextHasNoMarginBottom","__next40pxDefaultSize","value","valueProp","label","options","onChange","onChangeProp","onFilterValueChange","hideLabelFromVision","help","allowReset","className","messages","selected","__","__experimentalRenderItem","expandOnFocus","useDeprecated36pxDefaultSizeProp","setValue","useControlledValue","currentOption","find","option","currentLabel","instanceId","useInstanceId","setSelectedSuggestion","useState","isExpanded","setIsExpanded","inputHasFocus","setInputHasFocus","inputValue","setInputValue","inputContainer","useRef","useMemo","startsWithMatch","containsMatch","match","normalizeTextString","forEach","index","push","concat","onSuggestionSelected","newSelectedSuggestion","disabled","speak","handleArrowNavigation","offset","nextIndex","length","onKeyDown","withIgnoreIMEEvents","preventDefault","defaultPrevented","code","onBlur","onFocus","onClick","onInputChange","text","handleOnReset","current","focus","useEffect","hasMatchingSuggestions","hasSelectedMatchingSuggestions","message","sprintf","_n","jsx","default","clsx","id","jsxs","tabIndex","InputWrapperFlex","FlexBlock","ref","selectedSuggestionIndex","FlexItem","icon","closeSmall","displayTransform","suggestion","suggestions","selectedIndex","onHover","onSelect","scrollIntoView","_default","exports"],"sources":["@wordpress/components/src/combobox-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tComponent,\n\tuseState,\n\tuseMemo,\n\tuseRef,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock, FlexItem } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport type { ComboboxControlOption, ComboboxControlProps } from './types';\nimport type { TokenInputProps } from '../form-token-field/types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\nconst noop = () => {};\n\ninterface DetectOutsideComponentProps {\n\tonFocusOutside: ( event: React.FocusEvent ) => void;\n\tchildren?: React.ReactNode;\n}\n\nconst DetectOutside = withFocusOutside(\n\tclass extends Component< DetectOutsideComponentProps > {\n\t\thandleFocusOutside( event: React.FocusEvent ) {\n\t\t\tthis.props.onFocusOutside( event );\n\t\t}\n\n\t\trender() {\n\t\t\treturn this.props.children;\n\t\t}\n\t}\n);\n\nconst getIndexOfMatchingSuggestion = (\n\tselectedSuggestion: ComboboxControlOption | null,\n\tmatchingSuggestions: ComboboxControlOption[]\n) =>\n\tselectedSuggestion === null\n\t\t? -1\n\t\t: matchingSuggestions.indexOf( selectedSuggestion );\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl( props: ComboboxControlProps ) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\tvalue: valueProp,\n\t\tlabel,\n\t\toptions,\n\t\tonChange: onChangeProp,\n\t\tonFilterValueChange = noop,\n\t\thideLabelFromVision,\n\t\thelp,\n\t\tallowReset = true,\n\t\tclassName,\n\t\tmessages = {\n\t\t\tselected: __( 'Item selected.' ),\n\t\t},\n\t\t__experimentalRenderItem,\n\t\texpandOnFocus = true,\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst [ value, setValue ] = useControlledValue( {\n\t\tvalue: valueProp,\n\t\tonChange: onChangeProp,\n\t} );\n\n\tconst currentOption = options.find( ( option ) => option.value === value );\n\tconst currentLabel = currentOption?.label ?? '';\n\t// Use a custom prefix when generating the `instanceId` to avoid having\n\t// duplicate input IDs when rendering this component and `FormTokenField`\n\t// in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n\tconst instanceId = useInstanceId( ComboboxControl, 'combobox-control' );\n\tconst [ selectedSuggestion, setSelectedSuggestion ] = useState(\n\t\tcurrentOption || null\n\t);\n\tconst [ isExpanded, setIsExpanded ] = useState( false );\n\tconst [ inputHasFocus, setInputHasFocus ] = useState( false );\n\tconst [ inputValue, setInputValue ] = useState( '' );\n\tconst inputContainer = useRef< HTMLInputElement >( null );\n\n\tconst matchingSuggestions = useMemo( () => {\n\t\tconst startsWithMatch: ComboboxControlOption[] = [];\n\t\tconst containsMatch: ComboboxControlOption[] = [];\n\t\tconst match = normalizeTextString( inputValue );\n\t\toptions.forEach( ( option ) => {\n\t\t\tconst index = normalizeTextString( option.label ).indexOf( match );\n\t\t\tif ( index === 0 ) {\n\t\t\t\tstartsWithMatch.push( option );\n\t\t\t} else if ( index > 0 ) {\n\t\t\t\tcontainsMatch.push( option );\n\t\t\t}\n\t\t} );\n\n\t\treturn startsWithMatch.concat( containsMatch );\n\t}, [ inputValue, options ] );\n\n\tconst onSuggestionSelected = (\n\t\tnewSelectedSuggestion: ComboboxControlOption\n\t) => {\n\t\tif ( newSelectedSuggestion.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetValue( newSelectedSuggestion.value );\n\t\tspeak( messages.selected, 'assertive' );\n\t\tsetSelectedSuggestion( newSelectedSuggestion );\n\t\tsetInputValue( '' );\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst handleArrowNavigation = ( offset = 1 ) => {\n\t\tconst index = getIndexOfMatchingSuggestion(\n\t\t\tselectedSuggestion,\n\t\t\tmatchingSuggestions\n\t\t);\n\t\tlet nextIndex = index + offset;\n\t\tif ( nextIndex < 0 ) {\n\t\t\tnextIndex = matchingSuggestions.length - 1;\n\t\t} else if ( nextIndex >= matchingSuggestions.length ) {\n\t\t\tnextIndex = 0;\n\t\t}\n\t\tsetSelectedSuggestion( matchingSuggestions[ nextIndex ] );\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onKeyDown: React.KeyboardEventHandler< HTMLDivElement > =\n\t\twithIgnoreIMEEvents( ( event ) => {\n\t\t\tlet preventDefault = false;\n\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tswitch ( event.code ) {\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tif ( selectedSuggestion ) {\n\t\t\t\t\t\tonSuggestionSelected( selectedSuggestion );\n\t\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\thandleArrowNavigation( -1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\thandleArrowNavigation( 1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tsetIsExpanded( false );\n\t\t\t\t\tsetSelectedSuggestion( null );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\n\tconst onBlur = () => {\n\t\tsetInputHasFocus( false );\n\t};\n\n\tconst onFocus = () => {\n\t\tsetInputHasFocus( true );\n\t\tif ( expandOnFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\n\t\tonFilterValueChange( '' );\n\t\tsetInputValue( '' );\n\t};\n\n\tconst onClick = () => {\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onFocusOutside = () => {\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst onInputChange: TokenInputProps[ 'onChange' ] = ( event ) => {\n\t\tconst text = event.value;\n\t\tsetInputValue( text );\n\t\tonFilterValueChange( text );\n\t\tif ( inputHasFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tsetValue( null );\n\t\tinputContainer.current?.focus();\n\t};\n\n\t// Update current selections when the filter input changes.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tconst hasSelectedMatchingSuggestions =\n\t\t\tgetIndexOfMatchingSuggestion(\n\t\t\t\tselectedSuggestion,\n\t\t\t\tmatchingSuggestions\n\t\t\t) > 0;\n\n\t\tif ( hasMatchingSuggestions && ! hasSelectedMatchingSuggestions ) {\n\t\t\t// If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n\t\t\tsetSelectedSuggestion( matchingSuggestions[ 0 ] );\n\t\t}\n\t}, [ matchingSuggestions, selectedSuggestion ] );\n\n\t// Announcements.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tif ( isExpanded ) {\n\t\t\tconst message = hasMatchingSuggestions\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t )\n\t\t\t\t: __( 'No results.' );\n\n\t\t\tspeak( message, 'polite' );\n\t\t}\n\t}, [ matchingSuggestions, isExpanded ] );\n\n\t// Disable reason: There is no appropriate role which describes the\n\t// input container intended accessible usability.\n\t// TODO: Refactor click detection to use blur to stop propagation.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<DetectOutside onFocusOutside={ onFocusOutside }>\n\t\t\t<BaseControl\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\tclassName={ clsx( className, 'components-combobox-control' ) }\n\t\t\t\tlabel={ label }\n\t\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\thelp={ help }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-combobox-control__suggestions-container\"\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<InputWrapperFlex\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexBlock>\n\t\t\t\t\t\t\t<TokenInput\n\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__input\"\n\t\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t\tref={ inputContainer }\n\t\t\t\t\t\t\t\tvalue={ isExpanded ? inputValue : currentLabel }\n\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tselectedSuggestionIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t\t{ allowReset && (\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__reset\"\n\t\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\t\tdisabled={ ! value }\n\t\t\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Reset' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</InputWrapperFlex>\n\t\t\t\t\t{ isExpanded && (\n\t\t\t\t\t\t<SuggestionsList\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t// The empty string for `value` here is not actually used, but is\n\t\t\t\t\t\t\t// just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n\t\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n\t\t\t\t\t\t\tmatch={ { label: inputValue, value: '' } }\n\t\t\t\t\t\t\tdisplayTransform={ ( suggestion ) =>\n\t\t\t\t\t\t\t\tsuggestion.label\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ matchingSuggestions }\n\t\t\t\t\t\t\tselectedIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonHover={ setSelectedSuggestion }\n\t\t\t\t\t\t\tonSelect={ onSuggestionSelected }\n\t\t\t\t\t\t\tscrollIntoView\n\t\t\t\t\t\t\t__experimentalRenderItem={\n\t\t\t\t\t\t\t\t__experimentalRenderItem\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</BaseControl>\n\t\t</DetectOutside>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n}\n\nexport default ComboboxControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,gBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,YAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,OAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,KAAA,GAAAX,OAAA;AACA,IAAAY,iBAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,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AAM;cACN9D,SAAS,EAAC,oCAAoC;cAC9CwE,IAAI,EAAGC,iBAAY;cACnBrC,QAAQ,EAAG,CAAE9C,KAAO;cACpB2D,OAAO,EAAGG,aAAe;cACzB5D,KAAK,EAAG,IAAAW,QAAE,EAAE,OAAQ;YAAG,CACvB;UAAC,CACO,CACV;QAAA,CACgB,CAAC,EACjBc,UAAU,iBACX,IAAA9C,WAAA,CAAA0F,GAAA,EAACnG,gBAAA,CAAAoG,OAAe;UACfjD,UAAU,EAAGA;UACb;UACA;UACA;UAAA;UACAe,KAAK,EAAG;YAAEpC,KAAK,EAAE6B,UAAU;YAAE/B,KAAK,EAAE;UAAG,CAAG;UAC1CoF,gBAAgB,EAAKC,UAAU,IAC9BA,UAAU,CAACnF,KACX;UACDoF,WAAW,EAAG5F,mBAAqB;UACnC6F,aAAa,EAAG/F,4BAA4B,CAC3CC,kBAAkB,EAClBC,mBACD,CAAG;UACH8F,OAAO,EAAG/D,qBAAuB;UACjCgE,QAAQ,EAAG7C,oBAAsB;UACjC8C,cAAc;UACd5E,wBAAwB,EACvBA;QACA,CACD,CACD;MAAA,CACG;IAAC,CACM;EAAC,CACA,CAAC;EAEjB;AACD;AAAC,IAAA6E,QAAA,GAAAC,OAAA,CAAApB,OAAA,GAEc5E,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_compose","_a11y","_icons","_styles","_tokenInput","_suggestionsList","_baseControl","_button","_flex","_withFocusOutside","_hooks","_strings","_useDeprecatedProps","_withIgnoreImeEvents","_jsxRuntime","noop","DetectOutside","withFocusOutside","Component","handleFocusOutside","event","props","onFocusOutside","render","children","getIndexOfMatchingSuggestion","selectedSuggestion","matchingSuggestions","indexOf","ComboboxControl","_currentOption$label","__nextHasNoMarginBottom","__next40pxDefaultSize","value","valueProp","label","options","onChange","onChangeProp","onFilterValueChange","hideLabelFromVision","help","allowReset","className","messages","selected","__","__experimentalRenderItem","expandOnFocus","useDeprecated36pxDefaultSizeProp","setValue","useControlledValue","currentOption","find","option","currentLabel","instanceId","useInstanceId","setSelectedSuggestion","useState","isExpanded","setIsExpanded","inputHasFocus","setInputHasFocus","inputValue","setInputValue","inputContainer","useRef","useMemo","startsWithMatch","containsMatch","match","normalizeTextString","forEach","index","push","concat","onSuggestionSelected","newSelectedSuggestion","disabled","speak","handleArrowNavigation","offset","nextIndex","length","onKeyDown","withIgnoreIMEEvents","preventDefault","defaultPrevented","code","onBlur","onFocus","onClick","onInputChange","text","handleOnReset","current","focus","handleResetStopPropagation","stopPropagation","useEffect","hasMatchingSuggestions","hasSelectedMatchingSuggestions","message","sprintf","_n","jsx","default","clsx","id","jsxs","tabIndex","InputWrapperFlex","FlexBlock","ref","selectedSuggestionIndex","FlexItem","icon","closeSmall","displayTransform","suggestion","suggestions","selectedIndex","onHover","onSelect","scrollIntoView","_default","exports"],"sources":["@wordpress/components/src/combobox-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tComponent,\n\tuseState,\n\tuseMemo,\n\tuseRef,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock, FlexItem } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport type { ComboboxControlOption, ComboboxControlProps } from './types';\nimport type { TokenInputProps } from '../form-token-field/types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\nconst noop = () => {};\n\ninterface DetectOutsideComponentProps {\n\tonFocusOutside: ( event: React.FocusEvent ) => void;\n\tchildren?: React.ReactNode;\n}\n\nconst DetectOutside = withFocusOutside(\n\tclass extends Component< DetectOutsideComponentProps > {\n\t\thandleFocusOutside( event: React.FocusEvent ) {\n\t\t\tthis.props.onFocusOutside( event );\n\t\t}\n\n\t\trender() {\n\t\t\treturn this.props.children;\n\t\t}\n\t}\n);\n\nconst getIndexOfMatchingSuggestion = (\n\tselectedSuggestion: ComboboxControlOption | null,\n\tmatchingSuggestions: ComboboxControlOption[]\n) =>\n\tselectedSuggestion === null\n\t\t? -1\n\t\t: matchingSuggestions.indexOf( selectedSuggestion );\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\t__nextHasNoMarginBottom\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl( props: ComboboxControlProps ) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\tvalue: valueProp,\n\t\tlabel,\n\t\toptions,\n\t\tonChange: onChangeProp,\n\t\tonFilterValueChange = noop,\n\t\thideLabelFromVision,\n\t\thelp,\n\t\tallowReset = true,\n\t\tclassName,\n\t\tmessages = {\n\t\t\tselected: __( 'Item selected.' ),\n\t\t},\n\t\t__experimentalRenderItem,\n\t\texpandOnFocus = true,\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst [ value, setValue ] = useControlledValue( {\n\t\tvalue: valueProp,\n\t\tonChange: onChangeProp,\n\t} );\n\n\tconst currentOption = options.find( ( option ) => option.value === value );\n\tconst currentLabel = currentOption?.label ?? '';\n\t// Use a custom prefix when generating the `instanceId` to avoid having\n\t// duplicate input IDs when rendering this component and `FormTokenField`\n\t// in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n\tconst instanceId = useInstanceId( ComboboxControl, 'combobox-control' );\n\tconst [ selectedSuggestion, setSelectedSuggestion ] = useState(\n\t\tcurrentOption || null\n\t);\n\tconst [ isExpanded, setIsExpanded ] = useState( false );\n\tconst [ inputHasFocus, setInputHasFocus ] = useState( false );\n\tconst [ inputValue, setInputValue ] = useState( '' );\n\tconst inputContainer = useRef< HTMLInputElement >( null );\n\n\tconst matchingSuggestions = useMemo( () => {\n\t\tconst startsWithMatch: ComboboxControlOption[] = [];\n\t\tconst containsMatch: ComboboxControlOption[] = [];\n\t\tconst match = normalizeTextString( inputValue );\n\t\toptions.forEach( ( option ) => {\n\t\t\tconst index = normalizeTextString( option.label ).indexOf( match );\n\t\t\tif ( index === 0 ) {\n\t\t\t\tstartsWithMatch.push( option );\n\t\t\t} else if ( index > 0 ) {\n\t\t\t\tcontainsMatch.push( option );\n\t\t\t}\n\t\t} );\n\n\t\treturn startsWithMatch.concat( containsMatch );\n\t}, [ inputValue, options ] );\n\n\tconst onSuggestionSelected = (\n\t\tnewSelectedSuggestion: ComboboxControlOption\n\t) => {\n\t\tif ( newSelectedSuggestion.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetValue( newSelectedSuggestion.value );\n\t\tspeak( messages.selected, 'assertive' );\n\t\tsetSelectedSuggestion( newSelectedSuggestion );\n\t\tsetInputValue( '' );\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst handleArrowNavigation = ( offset = 1 ) => {\n\t\tconst index = getIndexOfMatchingSuggestion(\n\t\t\tselectedSuggestion,\n\t\t\tmatchingSuggestions\n\t\t);\n\t\tlet nextIndex = index + offset;\n\t\tif ( nextIndex < 0 ) {\n\t\t\tnextIndex = matchingSuggestions.length - 1;\n\t\t} else if ( nextIndex >= matchingSuggestions.length ) {\n\t\t\tnextIndex = 0;\n\t\t}\n\t\tsetSelectedSuggestion( matchingSuggestions[ nextIndex ] );\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onKeyDown: React.KeyboardEventHandler< HTMLDivElement > =\n\t\twithIgnoreIMEEvents( ( event ) => {\n\t\t\tlet preventDefault = false;\n\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tswitch ( event.code ) {\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tif ( selectedSuggestion ) {\n\t\t\t\t\t\tonSuggestionSelected( selectedSuggestion );\n\t\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\thandleArrowNavigation( -1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\thandleArrowNavigation( 1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tsetIsExpanded( false );\n\t\t\t\t\tsetSelectedSuggestion( null );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\n\tconst onBlur = () => {\n\t\tsetInputHasFocus( false );\n\t};\n\n\tconst onFocus = () => {\n\t\tsetInputHasFocus( true );\n\t\tif ( expandOnFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\n\t\tonFilterValueChange( '' );\n\t\tsetInputValue( '' );\n\t};\n\n\tconst onClick = () => {\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onFocusOutside = () => {\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst onInputChange: TokenInputProps[ 'onChange' ] = ( event ) => {\n\t\tconst text = event.value;\n\t\tsetInputValue( text );\n\t\tonFilterValueChange( text );\n\t\tif ( inputHasFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tsetValue( null );\n\t\tinputContainer.current?.focus();\n\t};\n\n\t// Stop propagation of the keydown event when pressing Enter on the Reset\n\t// button to prevent calling the onKeydown callback on the container div\n\t// element which actually sets the selected suggestion.\n\tconst handleResetStopPropagation: React.KeyboardEventHandler<\n\t\tHTMLButtonElement\n\t> = ( event ) => {\n\t\tevent.stopPropagation();\n\t};\n\n\t// Update current selections when the filter input changes.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tconst hasSelectedMatchingSuggestions =\n\t\t\tgetIndexOfMatchingSuggestion(\n\t\t\t\tselectedSuggestion,\n\t\t\t\tmatchingSuggestions\n\t\t\t) > 0;\n\n\t\tif ( hasMatchingSuggestions && ! hasSelectedMatchingSuggestions ) {\n\t\t\t// If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n\t\t\tsetSelectedSuggestion( matchingSuggestions[ 0 ] );\n\t\t}\n\t}, [ matchingSuggestions, selectedSuggestion ] );\n\n\t// Announcements.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tif ( isExpanded ) {\n\t\t\tconst message = hasMatchingSuggestions\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t )\n\t\t\t\t: __( 'No results.' );\n\n\t\t\tspeak( message, 'polite' );\n\t\t}\n\t}, [ matchingSuggestions, isExpanded ] );\n\n\t// Disable reason: There is no appropriate role which describes the\n\t// input container intended accessible usability.\n\t// TODO: Refactor click detection to use blur to stop propagation.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<DetectOutside onFocusOutside={ onFocusOutside }>\n\t\t\t<BaseControl\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\tclassName={ clsx( className, 'components-combobox-control' ) }\n\t\t\t\tlabel={ label }\n\t\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\thelp={ help }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-combobox-control__suggestions-container\"\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<InputWrapperFlex\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexBlock>\n\t\t\t\t\t\t\t<TokenInput\n\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__input\"\n\t\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t\tref={ inputContainer }\n\t\t\t\t\t\t\t\tvalue={ isExpanded ? inputValue : currentLabel }\n\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tselectedSuggestionIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t\t{ allowReset && (\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__reset\"\n\t\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\t\t// Disable reason: Focus returns to input field when reset is clicked.\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\t\t\t\t\t\t\tdisabled={ ! value }\n\t\t\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t\t\t\tonKeyDown={ handleResetStopPropagation }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Reset' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</InputWrapperFlex>\n\t\t\t\t\t{ isExpanded && (\n\t\t\t\t\t\t<SuggestionsList\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t// The empty string for `value` here is not actually used, but is\n\t\t\t\t\t\t\t// just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n\t\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n\t\t\t\t\t\t\tmatch={ { label: inputValue, value: '' } }\n\t\t\t\t\t\t\tdisplayTransform={ ( suggestion ) =>\n\t\t\t\t\t\t\t\tsuggestion.label\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ matchingSuggestions }\n\t\t\t\t\t\t\tselectedIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonHover={ setSelectedSuggestion }\n\t\t\t\t\t\t\tonSelect={ onSuggestionSelected }\n\t\t\t\t\t\t\tscrollIntoView\n\t\t\t\t\t\t\t__experimentalRenderItem={\n\t\t\t\t\t\t\t\t__experimentalRenderItem\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</BaseControl>\n\t\t</DetectOutside>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n}\n\nexport default ComboboxControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,gBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,YAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,OAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,KAAA,GAAAX,OAAA;AACA,IAAAY,iBAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,QAAA,GAAAd,OAAA;AAGA,IAAAe,m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Q;YAAA5F,QAAA,eACR,IAAAV,WAAA,CAAA4F,GAAA,EAACnG,OAAA,CAAAoG,OAAM;cACNhE,SAAS,EAAC,oCAAoC;cAC9C0E,IAAI,EAAGC;cACP;cACA;cAAA;cACAvC,QAAQ,EAAG,CAAE9C,KAAO;cACpB2D,OAAO,EAAGG,aAAe;cACzBV,SAAS,EAAGa,0BAA4B;cACxC/D,KAAK,EAAG,IAAAW,QAAE,EAAE,OAAQ;YAAG,CACvB;UAAC,CACO,CACV;QAAA,CACgB,CAAC,EACjBc,UAAU,iBACX,IAAA9C,WAAA,CAAA4F,GAAA,EAACrG,gBAAA,CAAAsG,OAAe;UACfnD,UAAU,EAAGA;UACb;UACA;UACA;UAAA;UACAe,KAAK,EAAG;YAAEpC,KAAK,EAAE6B,UAAU;YAAE/B,KAAK,EAAE;UAAG,CAAG;UAC1CsF,gBAAgB,EAAKC,UAAU,IAC9BA,UAAU,CAACrF,KACX;UACDsF,WAAW,EAAG9F,mBAAqB;UACnC+F,aAAa,EAAGjG,4BAA4B,CAC3CC,kBAAkB,EAClBC,mBACD,CAAG;UACHgG,OAAO,EAAGjE,qBAAuB;UACjCkE,QAAQ,EAAG/C,oBAAsB;UACjCgD,cAAc;UACd9E,wBAAwB,EACvBA;QACA,CACD,CACD;MAAA,CACG;IAAC,CACM;EAAC,CACA,CAAC;EAEjB;AACD;AAAC,IAAA+E,QAAA,GAAAC,OAAA,CAAApB,OAAA,GAEc9E,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require"],"sources":["@wordpress/components/src/composite/current/index.ts"],"sourcesContent":["/**\n * Composite is a component that may contain navigable items represented by\n * CompositeItem. It's inspired by the WAI-ARIA Composite Role and implements\n * all the keyboard navigation mechanisms to ensure that there's only one\n * tab stop for the whole Composite element. This means that it can behave as\n * a roving tabindex or aria-activedescendant container.\n *\n * @see https://ariakit.org/components/composite\n */\n\n/* eslint-disable-next-line no-restricted-imports */\nexport {\n\tComposite,\n\tCompositeGroup,\n\tCompositeGroupLabel,\n\tCompositeItem,\n\tCompositeRow,\n\tuseCompositeStore,\n} from '@ariakit/react';\n\n/* eslint-disable-next-line no-restricted-imports */\nexport type { CompositeStore, CompositeStoreProps } from '@ariakit/react';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAAA,MAAA,GAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require"],"sources":["@wordpress/components/src/composite/current/index.ts"],"sourcesContent":["/**\n * Composite is a component that may contain navigable items represented by\n * CompositeItem. It's inspired by the WAI-ARIA Composite Role and implements\n * all the keyboard navigation mechanisms to ensure that there's only one\n * tab stop for the whole Composite element. This means that it can behave as\n * a roving tabindex or aria-activedescendant container.\n *\n * @see https://ariakit.org/components/composite\n */\n\nexport {\n\tComposite,\n\tCompositeGroup,\n\tCompositeGroupLabel,\n\tCompositeItem,\n\tCompositeRow,\n\tuseCompositeStore,\n} from '@ariakit/react';\n\nexport type { CompositeStore, CompositeStoreProps } from '@ariakit/react';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAAA,MAAA,GAAAC,OAAA","ignoreList":[]}