@wordpress/components 28.3.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 (1084) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/CONTRIBUTING.md +1 -1
  3. package/build/autocomplete/types.js.map +1 -1
  4. package/build/base-control/types.js.map +1 -1
  5. package/build/button/index.js +9 -7
  6. package/build/button/index.js.map +1 -1
  7. package/build/button/types.js.map +1 -1
  8. package/build/checkbox-control/index.js +1 -0
  9. package/build/checkbox-control/index.js.map +1 -1
  10. package/build/color-picker/component.js +8 -17
  11. package/build/color-picker/component.js.map +1 -1
  12. package/build/combobox-control/index.js +9 -0
  13. package/build/combobox-control/index.js.map +1 -1
  14. package/build/custom-select-control/index.js +125 -174
  15. package/build/custom-select-control/index.js.map +1 -1
  16. package/build/custom-select-control/types.js +6 -0
  17. package/build/custom-select-control/types.js.map +1 -0
  18. package/build/custom-select-control-v2/custom-select.js +4 -1
  19. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  20. package/build/custom-select-control-v2/index.js +35 -7
  21. package/build/custom-select-control-v2/index.js.map +1 -1
  22. package/build/custom-select-control-v2/styles.js +25 -9
  23. package/build/custom-select-control-v2/styles.js.map +1 -1
  24. package/build/custom-select-control-v2/types.js.map +1 -1
  25. package/build/dropdown-menu-v2/styles.js +14 -14
  26. package/build/dropdown-menu-v2/styles.js.map +1 -1
  27. package/build/focal-point-picker/index.js +1 -0
  28. package/build/focal-point-picker/index.js.map +1 -1
  29. package/build/font-size-picker/font-size-picker-select.js +4 -4
  30. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  31. package/build/font-size-picker/index.js +36 -24
  32. package/build/font-size-picker/index.js.map +1 -1
  33. package/build/font-size-picker/types.js.map +1 -1
  34. package/build/form-token-field/index.js +8 -0
  35. package/build/form-token-field/index.js.map +1 -1
  36. package/build/index.js +2 -2
  37. package/build/index.js.map +1 -1
  38. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  39. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  40. package/build/private-apis.js +0 -4
  41. package/build/private-apis.js.map +1 -1
  42. package/build/radio-control/index.js +1 -1
  43. package/build/radio-control/index.js.map +1 -1
  44. package/build/range-control/index.js +1 -0
  45. package/build/range-control/index.js.map +1 -1
  46. package/build/select-control/index.js +5 -0
  47. package/build/select-control/index.js.map +1 -1
  48. package/build/select-control/styles/select-control-styles.js +42 -11
  49. package/build/select-control/styles/select-control-styles.js.map +1 -1
  50. package/build/select-control/types.js.map +1 -1
  51. package/build/tabs/styles.js +3 -3
  52. package/build/tabs/styles.js.map +1 -1
  53. package/build/tabs/tablist.js +4 -189
  54. package/build/tabs/tablist.js.map +1 -1
  55. package/build/textarea-control/index.js +1 -0
  56. package/build/textarea-control/index.js.map +1 -1
  57. package/build/toggle-control/index.js +10 -4
  58. package/build/toggle-control/index.js.map +1 -1
  59. package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -0
  60. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  61. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  62. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  63. package/build/tools-panel/tools-panel-header/component.js +1 -1
  64. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  65. package/build/tree-select/index.js +1 -0
  66. package/build/tree-select/index.js.map +1 -1
  67. package/build/utils/element-rect.js +157 -0
  68. package/build/utils/element-rect.js.map +1 -0
  69. package/build/utils/hooks/use-event.js +41 -0
  70. package/build/utils/hooks/use-event.js.map +1 -0
  71. package/build/utils/hooks/use-on-value-update.js +46 -0
  72. package/build/utils/hooks/use-on-value-update.js.map +1 -0
  73. package/build-module/autocomplete/types.js.map +1 -1
  74. package/build-module/base-control/types.js.map +1 -1
  75. package/build-module/button/index.js +9 -7
  76. package/build-module/button/index.js.map +1 -1
  77. package/build-module/button/types.js.map +1 -1
  78. package/build-module/checkbox-control/index.js +1 -0
  79. package/build-module/checkbox-control/index.js.map +1 -1
  80. package/build-module/color-picker/component.js +9 -18
  81. package/build-module/color-picker/component.js.map +1 -1
  82. package/build-module/combobox-control/index.js +9 -0
  83. package/build-module/combobox-control/index.js.map +1 -1
  84. package/build-module/custom-select-control/index.js +123 -173
  85. package/build-module/custom-select-control/index.js.map +1 -1
  86. package/build-module/custom-select-control/types.js +2 -0
  87. package/build-module/custom-select-control/types.js.map +1 -0
  88. package/build-module/custom-select-control-v2/custom-select.js +4 -1
  89. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  90. package/build-module/custom-select-control-v2/index.js +27 -1
  91. package/build-module/custom-select-control-v2/index.js.map +1 -1
  92. package/build-module/custom-select-control-v2/styles.js +26 -10
  93. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  94. package/build-module/custom-select-control-v2/types.js.map +1 -1
  95. package/build-module/dropdown-menu-v2/styles.js +14 -14
  96. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  97. package/build-module/focal-point-picker/index.js +1 -0
  98. package/build-module/focal-point-picker/index.js.map +1 -1
  99. package/build-module/font-size-picker/font-size-picker-select.js +3 -3
  100. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  101. package/build-module/font-size-picker/index.js +36 -24
  102. package/build-module/font-size-picker/index.js.map +1 -1
  103. package/build-module/font-size-picker/types.js.map +1 -1
  104. package/build-module/form-token-field/index.js +8 -0
  105. package/build-module/form-token-field/index.js.map +1 -1
  106. package/build-module/index.js +1 -1
  107. package/build-module/index.js.map +1 -1
  108. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  109. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  110. package/build-module/private-apis.js +0 -4
  111. package/build-module/private-apis.js.map +1 -1
  112. package/build-module/radio-control/index.js +1 -1
  113. package/build-module/radio-control/index.js.map +1 -1
  114. package/build-module/range-control/index.js +1 -0
  115. package/build-module/range-control/index.js.map +1 -1
  116. package/build-module/select-control/index.js +5 -0
  117. package/build-module/select-control/index.js.map +1 -1
  118. package/build-module/select-control/styles/select-control-styles.js +41 -6
  119. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  120. package/build-module/select-control/types.js.map +1 -1
  121. package/build-module/tabs/styles.js +3 -3
  122. package/build-module/tabs/styles.js.map +1 -1
  123. package/build-module/tabs/tablist.js +3 -188
  124. package/build-module/tabs/tablist.js.map +1 -1
  125. package/build-module/textarea-control/index.js +1 -0
  126. package/build-module/textarea-control/index.js.map +1 -1
  127. package/build-module/toggle-control/index.js +10 -4
  128. package/build-module/toggle-control/index.js.map +1 -1
  129. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +3 -0
  130. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  131. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  132. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  133. package/build-module/tools-panel/tools-panel-header/component.js +1 -1
  134. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  135. package/build-module/tree-select/index.js +1 -0
  136. package/build-module/tree-select/index.js.map +1 -1
  137. package/build-module/utils/element-rect.js +147 -0
  138. package/build-module/utils/element-rect.js.map +1 -0
  139. package/build-module/utils/hooks/use-event.js +35 -0
  140. package/build-module/utils/hooks/use-event.js.map +1 -0
  141. package/build-module/utils/hooks/use-on-value-update.js +39 -0
  142. package/build-module/utils/hooks/use-on-value-update.js.map +1 -0
  143. package/build-style/style-rtl.css +67 -100
  144. package/build-style/style.css +67 -100
  145. package/build-types/alignment-matrix-control/cell.d.ts +0 -1
  146. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
  147. package/build-types/alignment-matrix-control/icon.d.ts +0 -1
  148. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
  149. package/build-types/alignment-matrix-control/index.d.ts +0 -1
  150. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  151. package/build-types/alignment-matrix-control/stories/index.story.d.ts +0 -1
  152. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  153. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +8 -9
  154. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +1 -1
  155. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +10 -11
  156. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
  157. package/build-types/angle-picker-control/angle-circle.d.ts +0 -1
  158. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  159. package/build-types/angle-picker-control/index.d.ts +0 -1
  160. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  161. package/build-types/angle-picker-control/stories/index.story.d.ts +0 -1
  162. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  163. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +7 -8
  164. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  165. package/build-types/animate/index.d.ts +0 -1
  166. package/build-types/animate/index.d.ts.map +1 -1
  167. package/build-types/animate/types.d.ts +0 -1
  168. package/build-types/animate/types.d.ts.map +1 -1
  169. package/build-types/autocomplete/autocompleter-ui.d.ts +0 -1
  170. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  171. package/build-types/autocomplete/index.d.ts +2 -3
  172. package/build-types/autocomplete/index.d.ts.map +1 -1
  173. package/build-types/autocomplete/types.d.ts +2 -3
  174. package/build-types/autocomplete/types.d.ts.map +1 -1
  175. package/build-types/base-control/hooks.d.ts +3 -4
  176. package/build-types/base-control/hooks.d.ts.map +1 -1
  177. package/build-types/base-control/index.d.ts +0 -1
  178. package/build-types/base-control/index.d.ts.map +1 -1
  179. package/build-types/base-control/stories/index.story.d.ts +0 -1
  180. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  181. package/build-types/base-control/styles/base-control-styles.d.ts +10 -11
  182. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  183. package/build-types/base-control/types.d.ts +1 -1
  184. package/build-types/border-box-control/border-box-control/component.d.ts +4 -5
  185. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  186. package/build-types/border-box-control/border-box-control/hook.d.ts +14 -16
  187. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  188. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts +0 -1
  189. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts.map +1 -1
  190. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +12 -14
  191. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  192. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +5 -6
  193. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  194. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +14 -16
  195. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  196. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts +1 -2
  197. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts.map +1 -1
  198. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +9 -11
  199. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  200. package/build-types/border-box-control/stories/index.story.d.ts +4 -5
  201. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  202. package/build-types/border-box-control/styles.d.ts +3 -3
  203. package/build-types/border-box-control/utils.d.ts.map +1 -1
  204. package/build-types/border-control/border-control/component.d.ts +14 -15
  205. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  206. package/build-types/border-control/border-control/hook.d.ts +17 -19
  207. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  208. package/build-types/border-control/border-control-dropdown/component.d.ts +6 -7
  209. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  210. package/build-types/border-control/border-control-dropdown/hook.d.ts +12 -14
  211. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  212. package/build-types/border-control/border-control-style-picker/component.d.ts +2 -3
  213. package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
  214. package/build-types/border-control/stories/index.story.d.ts +84 -85
  215. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  216. package/build-types/border-control/styles.d.ts +2 -2
  217. package/build-types/box-control/all-input-control.d.ts +0 -1
  218. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  219. package/build-types/box-control/axial-input-controls.d.ts +0 -1
  220. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  221. package/build-types/box-control/icon.d.ts +0 -1
  222. package/build-types/box-control/icon.d.ts.map +1 -1
  223. package/build-types/box-control/index.d.ts +0 -1
  224. package/build-types/box-control/index.d.ts.map +1 -1
  225. package/build-types/box-control/input-controls.d.ts +0 -1
  226. package/build-types/box-control/input-controls.d.ts.map +1 -1
  227. package/build-types/box-control/linked-button.d.ts +0 -1
  228. package/build-types/box-control/linked-button.d.ts.map +1 -1
  229. package/build-types/box-control/stories/index.story.d.ts +312 -350
  230. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  231. package/build-types/box-control/styles/box-control-icon-styles.d.ts +16 -17
  232. package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
  233. package/build-types/box-control/styles/box-control-styles.d.ts +44 -45
  234. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  235. package/build-types/box-control/types.d.ts +0 -1
  236. package/build-types/box-control/types.d.ts.map +1 -1
  237. package/build-types/button/deprecated.d.ts +69 -70
  238. package/build-types/button/deprecated.d.ts.map +1 -1
  239. package/build-types/button/index.d.ts.map +1 -1
  240. package/build-types/button/stories/e2e/index.story.d.ts +0 -1
  241. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  242. package/build-types/button/stories/index.story.d.ts +0 -1
  243. package/build-types/button/stories/index.story.d.ts.map +1 -1
  244. package/build-types/button/types.d.ts +9 -2
  245. package/build-types/button/types.d.ts.map +1 -1
  246. package/build-types/button-group/index.d.ts +0 -1
  247. package/build-types/button-group/index.d.ts.map +1 -1
  248. package/build-types/card/card/component.d.ts +5 -6
  249. package/build-types/card/card/component.d.ts.map +1 -1
  250. package/build-types/card/card/hook.d.ts +10 -12
  251. package/build-types/card/card/hook.d.ts.map +1 -1
  252. package/build-types/card/card-body/component.d.ts +4 -5
  253. package/build-types/card/card-body/component.d.ts.map +1 -1
  254. package/build-types/card/card-body/hook.d.ts +10 -12
  255. package/build-types/card/card-body/hook.d.ts.map +1 -1
  256. package/build-types/card/card-divider/component.d.ts +4 -5
  257. package/build-types/card/card-divider/component.d.ts.map +1 -1
  258. package/build-types/card/card-divider/hook.d.ts +15 -17
  259. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  260. package/build-types/card/card-footer/component.d.ts +5 -6
  261. package/build-types/card/card-footer/component.d.ts.map +1 -1
  262. package/build-types/card/card-footer/hook.d.ts +10 -12
  263. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  264. package/build-types/card/card-header/component.d.ts +4 -5
  265. package/build-types/card/card-header/component.d.ts.map +1 -1
  266. package/build-types/card/card-header/hook.d.ts +10 -12
  267. package/build-types/card/card-header/hook.d.ts.map +1 -1
  268. package/build-types/card/card-media/component.d.ts +0 -1
  269. package/build-types/card/card-media/component.d.ts.map +1 -1
  270. package/build-types/card/card-media/hook.d.ts +10 -12
  271. package/build-types/card/card-media/hook.d.ts.map +1 -1
  272. package/build-types/card/context.d.ts +0 -1
  273. package/build-types/card/context.d.ts.map +1 -1
  274. package/build-types/card/stories/index.story.d.ts +3 -22
  275. package/build-types/card/stories/index.story.d.ts.map +1 -1
  276. package/build-types/checkbox-control/index.d.ts +1 -1
  277. package/build-types/checkbox-control/index.d.ts.map +1 -1
  278. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +0 -1
  279. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  280. package/build-types/circular-option-picker/circular-option-picker-context.d.ts +0 -1
  281. package/build-types/circular-option-picker/circular-option-picker-context.d.ts.map +1 -1
  282. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +0 -1
  283. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -1
  284. package/build-types/circular-option-picker/circular-option-picker-option.d.ts +0 -1
  285. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  286. package/build-types/circular-option-picker/circular-option-picker.d.ts +0 -1
  287. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  288. package/build-types/clipboard-button/index.d.ts +0 -1
  289. package/build-types/clipboard-button/index.d.ts.map +1 -1
  290. package/build-types/color-indicator/index.d.ts +0 -1
  291. package/build-types/color-indicator/index.d.ts.map +1 -1
  292. package/build-types/color-palette/index.d.ts +0 -1
  293. package/build-types/color-palette/index.d.ts.map +1 -1
  294. package/build-types/color-palette/stories/index.story.d.ts +0 -1
  295. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  296. package/build-types/color-palette/styles.d.ts +5 -6
  297. package/build-types/color-palette/styles.d.ts.map +1 -1
  298. package/build-types/color-palette/utils.d.ts +1 -1
  299. package/build-types/color-palette/utils.d.ts.map +1 -1
  300. package/build-types/color-picker/color-copy-button.d.ts +0 -1
  301. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  302. package/build-types/color-picker/color-input.d.ts +0 -1
  303. package/build-types/color-picker/color-input.d.ts.map +1 -1
  304. package/build-types/color-picker/component.d.ts +5 -6
  305. package/build-types/color-picker/component.d.ts.map +1 -1
  306. package/build-types/color-picker/hex-input.d.ts +0 -1
  307. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  308. package/build-types/color-picker/hsl-input.d.ts +0 -1
  309. package/build-types/color-picker/hsl-input.d.ts.map +1 -1
  310. package/build-types/color-picker/input-with-slider.d.ts +0 -1
  311. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  312. package/build-types/color-picker/legacy-adapter.d.ts +0 -1
  313. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
  314. package/build-types/color-picker/picker.d.ts +0 -1
  315. package/build-types/color-picker/picker.d.ts.map +1 -1
  316. package/build-types/color-picker/rgb-input.d.ts +0 -1
  317. package/build-types/color-picker/rgb-input.d.ts.map +1 -1
  318. package/build-types/color-picker/stories/index.story.d.ts +2 -9
  319. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  320. package/build-types/color-picker/styles.d.ts +52 -53
  321. package/build-types/color-picker/styles.d.ts.map +1 -1
  322. package/build-types/combobox-control/index.d.ts +1 -1
  323. package/build-types/combobox-control/index.d.ts.map +1 -1
  324. package/build-types/combobox-control/stories/index.story.d.ts +41 -41
  325. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  326. package/build-types/combobox-control/styles.d.ts +1 -2
  327. package/build-types/combobox-control/styles.d.ts.map +1 -1
  328. package/build-types/combobox-control/types.d.ts +0 -1
  329. package/build-types/combobox-control/types.d.ts.map +1 -1
  330. package/build-types/composite/current/stories/utils.d.ts +0 -1
  331. package/build-types/composite/current/stories/utils.d.ts.map +1 -1
  332. package/build-types/composite/legacy/index.d.ts +0 -1
  333. package/build-types/composite/legacy/index.d.ts.map +1 -1
  334. package/build-types/composite/legacy/stories/utils.d.ts +0 -1
  335. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  336. package/build-types/confirm-dialog/component.d.ts +0 -1
  337. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  338. package/build-types/confirm-dialog/stories/index.story.d.ts +0 -1
  339. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  340. package/build-types/context/context-system-provider.d.ts +1 -1
  341. package/build-types/context/context-system-provider.d.ts.map +1 -1
  342. package/build-types/context/get-styled-class-name-from-key.d.ts +9 -1
  343. package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
  344. package/build-types/context/use-context-system.d.ts +1 -1
  345. package/build-types/context/use-context-system.d.ts.map +1 -1
  346. package/build-types/context/utils.d.ts.map +1 -1
  347. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +0 -1
  348. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  349. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +0 -1
  350. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  351. package/build-types/custom-gradient-picker/index.d.ts +0 -1
  352. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  353. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -3
  354. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -1
  355. package/build-types/custom-gradient-picker/types.d.ts +0 -1
  356. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  357. package/build-types/custom-gradient-picker/utils.d.ts.map +1 -1
  358. package/build-types/custom-select-control/index.d.ts +3 -2
  359. package/build-types/custom-select-control/index.d.ts.map +1 -1
  360. package/build-types/custom-select-control/stories/index.story.d.ts +6 -42
  361. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  362. package/build-types/custom-select-control/test/index.d.ts.map +1 -0
  363. package/build-types/custom-select-control/types.d.ts +122 -0
  364. package/build-types/custom-select-control/types.d.ts.map +1 -0
  365. package/build-types/custom-select-control-v2/custom-select.d.ts +0 -1
  366. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  367. package/build-types/custom-select-control-v2/index.d.ts +7 -4
  368. package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
  369. package/build-types/custom-select-control-v2/item.d.ts +0 -1
  370. package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
  371. package/build-types/custom-select-control-v2/stories/{default.story.d.ts → index.story.d.ts} +10 -11
  372. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -0
  373. package/build-types/custom-select-control-v2/styles.d.ts +30 -31
  374. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  375. package/build-types/custom-select-control-v2/types.d.ts +0 -106
  376. package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
  377. package/build-types/dashicon/index.d.ts +0 -1
  378. package/build-types/dashicon/index.d.ts.map +1 -1
  379. package/build-types/date-time/date/index.d.ts +0 -1
  380. package/build-types/date-time/date/index.d.ts.map +1 -1
  381. package/build-types/date-time/date/styles.d.ts +15 -16
  382. package/build-types/date-time/date/styles.d.ts.map +1 -1
  383. package/build-types/date-time/date-time/index.d.ts +1 -2
  384. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  385. package/build-types/date-time/date-time/styles.d.ts +3 -4
  386. package/build-types/date-time/date-time/styles.d.ts.map +1 -1
  387. package/build-types/date-time/time/index.d.ts +0 -1
  388. package/build-types/date-time/time/index.d.ts.map +1 -1
  389. package/build-types/date-time/time/styles.d.ts +64 -65
  390. package/build-types/date-time/time/styles.d.ts.map +1 -1
  391. package/build-types/date-time/time/timezone.d.ts +0 -1
  392. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  393. package/build-types/date-time/time-input/index.d.ts +0 -1
  394. package/build-types/date-time/time-input/index.d.ts.map +1 -1
  395. package/build-types/date-time/types.d.ts +0 -1
  396. package/build-types/date-time/types.d.ts.map +1 -1
  397. package/build-types/date-time/utils.d.ts +3 -4
  398. package/build-types/date-time/utils.d.ts.map +1 -1
  399. package/build-types/dimension-control/index.d.ts +0 -1
  400. package/build-types/dimension-control/index.d.ts.map +1 -1
  401. package/build-types/disabled/index.d.ts +0 -1
  402. package/build-types/disabled/index.d.ts.map +1 -1
  403. package/build-types/disabled/types.d.ts +0 -1
  404. package/build-types/disabled/types.d.ts.map +1 -1
  405. package/build-types/disclosure/index.d.ts +0 -1
  406. package/build-types/disclosure/index.d.ts.map +1 -1
  407. package/build-types/disclosure/types.d.ts +0 -1
  408. package/build-types/disclosure/types.d.ts.map +1 -1
  409. package/build-types/divider/component.d.ts +4 -5
  410. package/build-types/divider/component.d.ts.map +1 -1
  411. package/build-types/divider/styles.d.ts +6 -7
  412. package/build-types/divider/styles.d.ts.map +1 -1
  413. package/build-types/draggable/index.d.ts +0 -1
  414. package/build-types/draggable/index.d.ts.map +1 -1
  415. package/build-types/drop-zone/index.d.ts +0 -1
  416. package/build-types/drop-zone/index.d.ts.map +1 -1
  417. package/build-types/drop-zone/provider.d.ts +0 -1
  418. package/build-types/drop-zone/provider.d.ts.map +1 -1
  419. package/build-types/drop-zone/stories/index.story.d.ts +0 -1
  420. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  421. package/build-types/dropdown/dropdown-content-wrapper.d.ts +0 -1
  422. package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
  423. package/build-types/dropdown/index.d.ts +0 -1
  424. package/build-types/dropdown/index.d.ts.map +1 -1
  425. package/build-types/dropdown/stories/index.story.d.ts +5 -6
  426. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  427. package/build-types/dropdown/styles.d.ts +2 -3
  428. package/build-types/dropdown/styles.d.ts.map +1 -1
  429. package/build-types/dropdown-menu/index.d.ts +0 -1
  430. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  431. package/build-types/dropdown-menu/stories/index.story.d.ts +3 -4
  432. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  433. package/build-types/dropdown-menu-v2/index.d.ts +0 -1
  434. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  435. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  436. package/build-types/dropdown-menu-v2/styles.d.ts +41 -42
  437. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  438. package/build-types/dropdown-menu-v2/types.d.ts +0 -1
  439. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  440. package/build-types/duotone-picker/color-list-picker/index.d.ts +0 -1
  441. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  442. package/build-types/duotone-picker/custom-duotone-bar.d.ts +0 -1
  443. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
  444. package/build-types/duotone-picker/duotone-picker.d.ts +0 -1
  445. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  446. package/build-types/duotone-picker/duotone-swatch.d.ts +0 -1
  447. package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -1
  448. package/build-types/elevation/component.d.ts +0 -1
  449. package/build-types/elevation/component.d.ts.map +1 -1
  450. package/build-types/elevation/hook.d.ts +9 -11
  451. package/build-types/elevation/hook.d.ts.map +1 -1
  452. package/build-types/external-link/index.d.ts +0 -1
  453. package/build-types/external-link/index.d.ts.map +1 -1
  454. package/build-types/flex/context.d.ts +2 -3
  455. package/build-types/flex/context.d.ts.map +1 -1
  456. package/build-types/flex/flex/component.d.ts +0 -1
  457. package/build-types/flex/flex/component.d.ts.map +1 -1
  458. package/build-types/flex/flex/hook.d.ts +9 -11
  459. package/build-types/flex/flex/hook.d.ts.map +1 -1
  460. package/build-types/flex/flex-block/component.d.ts +0 -1
  461. package/build-types/flex/flex-block/component.d.ts.map +1 -1
  462. package/build-types/flex/flex-block/hook.d.ts +9 -11
  463. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  464. package/build-types/flex/flex-item/component.d.ts +0 -1
  465. package/build-types/flex/flex-item/component.d.ts.map +1 -1
  466. package/build-types/flex/flex-item/hook.d.ts +9 -11
  467. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  468. package/build-types/focal-point-picker/controls.d.ts +0 -1
  469. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  470. package/build-types/focal-point-picker/focal-point.d.ts +0 -1
  471. package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
  472. package/build-types/focal-point-picker/grid.d.ts +0 -1
  473. package/build-types/focal-point-picker/grid.d.ts.map +1 -1
  474. package/build-types/focal-point-picker/index.d.ts +1 -1
  475. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  476. package/build-types/focal-point-picker/media.d.ts +0 -1
  477. package/build-types/focal-point-picker/media.d.ts.map +1 -1
  478. package/build-types/focal-point-picker/stories/index.story.d.ts +32 -33
  479. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  480. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +26 -27
  481. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  482. package/build-types/focal-point-picker/styles/focal-point-style.d.ts +2 -3
  483. package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
  484. package/build-types/focusable-iframe/index.d.ts +0 -1
  485. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  486. package/build-types/font-size-picker/font-size-picker-select.d.ts +0 -1
  487. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  488. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts +0 -1
  489. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  490. package/build-types/font-size-picker/index.d.ts +0 -1
  491. package/build-types/font-size-picker/index.d.ts.map +1 -1
  492. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +0 -1
  493. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  494. package/build-types/font-size-picker/styles.d.ts +9 -10
  495. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  496. package/build-types/font-size-picker/types.d.ts +6 -5
  497. package/build-types/font-size-picker/types.d.ts.map +1 -1
  498. package/build-types/form-file-upload/index.d.ts +0 -1
  499. package/build-types/form-file-upload/index.d.ts.map +1 -1
  500. package/build-types/form-file-upload/stories/index.story.d.ts +0 -1
  501. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  502. package/build-types/form-token-field/index.d.ts +0 -1
  503. package/build-types/form-token-field/index.d.ts.map +1 -1
  504. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  505. package/build-types/form-token-field/styles.d.ts +1 -2
  506. package/build-types/form-token-field/styles.d.ts.map +1 -1
  507. package/build-types/form-token-field/suggestions-list.d.ts +0 -1
  508. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  509. package/build-types/form-token-field/token.d.ts +0 -1
  510. package/build-types/form-token-field/token.d.ts.map +1 -1
  511. package/build-types/gradient-picker/index.d.ts +0 -1
  512. package/build-types/gradient-picker/index.d.ts.map +1 -1
  513. package/build-types/gradient-picker/types.d.ts +0 -1
  514. package/build-types/gradient-picker/types.d.ts.map +1 -1
  515. package/build-types/grid/component.d.ts +0 -1
  516. package/build-types/grid/component.d.ts.map +1 -1
  517. package/build-types/grid/hook.d.ts +9 -11
  518. package/build-types/grid/hook.d.ts.map +1 -1
  519. package/build-types/guide/icons.d.ts +0 -1
  520. package/build-types/guide/icons.d.ts.map +1 -1
  521. package/build-types/guide/index.d.ts +0 -1
  522. package/build-types/guide/index.d.ts.map +1 -1
  523. package/build-types/guide/page-control.d.ts +0 -1
  524. package/build-types/guide/page-control.d.ts.map +1 -1
  525. package/build-types/guide/page.d.ts +0 -1
  526. package/build-types/guide/page.d.ts.map +1 -1
  527. package/build-types/h-stack/component.d.ts +2 -3
  528. package/build-types/h-stack/component.d.ts.map +1 -1
  529. package/build-types/h-stack/hook.d.ts +9 -11
  530. package/build-types/h-stack/hook.d.ts.map +1 -1
  531. package/build-types/heading/component.d.ts +4 -5
  532. package/build-types/heading/component.d.ts.map +1 -1
  533. package/build-types/heading/hook.d.ts +9 -11
  534. package/build-types/heading/hook.d.ts.map +1 -1
  535. package/build-types/higher-order/navigate-regions/index.d.ts +1 -2
  536. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  537. package/build-types/higher-order/with-constrained-tabbing/index.d.ts +0 -1
  538. package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
  539. package/build-types/higher-order/with-fallback-styles/index.d.ts +3 -4
  540. package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -1
  541. package/build-types/higher-order/with-filters/index.d.ts +4 -5
  542. package/build-types/higher-order/with-filters/index.d.ts.map +1 -1
  543. package/build-types/higher-order/with-focus-outside/index.d.ts +0 -1
  544. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  545. package/build-types/higher-order/with-focus-return/index.d.ts +0 -1
  546. package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -1
  547. package/build-types/higher-order/with-notices/index.d.ts +0 -1
  548. package/build-types/higher-order/with-notices/index.d.ts.map +1 -1
  549. package/build-types/higher-order/with-notices/types.d.ts +0 -1
  550. package/build-types/higher-order/with-notices/types.d.ts.map +1 -1
  551. package/build-types/higher-order/with-spoken-messages/index.d.ts +0 -1
  552. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  553. package/build-types/index.d.ts +1 -1
  554. package/build-types/index.d.ts.map +1 -1
  555. package/build-types/input-control/backdrop.d.ts +0 -1
  556. package/build-types/input-control/backdrop.d.ts.map +1 -1
  557. package/build-types/input-control/input-base.d.ts +0 -1
  558. package/build-types/input-control/input-base.d.ts.map +1 -1
  559. package/build-types/input-control/input-field.d.ts +0 -1
  560. package/build-types/input-control/input-field.d.ts.map +1 -1
  561. package/build-types/input-control/input-prefix-wrapper.d.ts +0 -1
  562. package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
  563. package/build-types/input-control/input-suffix-wrapper.d.ts +0 -1
  564. package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
  565. package/build-types/input-control/label.d.ts +0 -1
  566. package/build-types/input-control/label.d.ts.map +1 -1
  567. package/build-types/input-control/reducer/reducer.d.ts +9 -9
  568. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  569. package/build-types/input-control/stories/index.story.d.ts +0 -1
  570. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  571. package/build-types/input-control/styles/input-control-styles.d.ts +13 -13
  572. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  573. package/build-types/isolated-event-container/index.d.ts +0 -1
  574. package/build-types/isolated-event-container/index.d.ts.map +1 -1
  575. package/build-types/item-group/context.d.ts +0 -1
  576. package/build-types/item-group/context.d.ts.map +1 -1
  577. package/build-types/item-group/item/component.d.ts +0 -1
  578. package/build-types/item-group/item/component.d.ts.map +1 -1
  579. package/build-types/item-group/item/hook.d.ts +10 -12
  580. package/build-types/item-group/item/hook.d.ts.map +1 -1
  581. package/build-types/item-group/item-group/component.d.ts +0 -1
  582. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  583. package/build-types/item-group/item-group/hook.d.ts +11 -13
  584. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  585. package/build-types/item-group/styles.d.ts +1 -1
  586. package/build-types/item-group/types.d.ts +0 -1
  587. package/build-types/item-group/types.d.ts.map +1 -1
  588. package/build-types/keyboard-shortcuts/index.d.ts +0 -1
  589. package/build-types/keyboard-shortcuts/index.d.ts.map +1 -1
  590. package/build-types/keyboard-shortcuts/types.d.ts +0 -1
  591. package/build-types/keyboard-shortcuts/types.d.ts.map +1 -1
  592. package/build-types/menu-group/index.d.ts +0 -1
  593. package/build-types/menu-group/index.d.ts.map +1 -1
  594. package/build-types/menu-item/index.d.ts +8 -9
  595. package/build-types/menu-item/index.d.ts.map +1 -1
  596. package/build-types/menu-item/stories/index.story.d.ts +32 -33
  597. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  598. package/build-types/menu-items-choice/index.d.ts +0 -1
  599. package/build-types/menu-items-choice/index.d.ts.map +1 -1
  600. package/build-types/modal/index.d.ts +0 -1
  601. package/build-types/modal/index.d.ts.map +1 -1
  602. package/build-types/navigable-container/container.d.ts +8 -8
  603. package/build-types/navigable-container/menu.d.ts +7 -7
  604. package/build-types/navigable-container/tabbable.d.ts +6 -6
  605. package/build-types/navigation/back-button/index.d.ts +0 -1
  606. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  607. package/build-types/navigation/context.d.ts +0 -1
  608. package/build-types/navigation/context.d.ts.map +1 -1
  609. package/build-types/navigation/group/context.d.ts +0 -1
  610. package/build-types/navigation/group/context.d.ts.map +1 -1
  611. package/build-types/navigation/group/index.d.ts +0 -1
  612. package/build-types/navigation/group/index.d.ts.map +1 -1
  613. package/build-types/navigation/index.d.ts +0 -1
  614. package/build-types/navigation/index.d.ts.map +1 -1
  615. package/build-types/navigation/item/base-content.d.ts +0 -1
  616. package/build-types/navigation/item/base-content.d.ts.map +1 -1
  617. package/build-types/navigation/item/base.d.ts +0 -1
  618. package/build-types/navigation/item/base.d.ts.map +1 -1
  619. package/build-types/navigation/item/index.d.ts +0 -1
  620. package/build-types/navigation/item/index.d.ts.map +1 -1
  621. package/build-types/navigation/menu/context.d.ts +0 -1
  622. package/build-types/navigation/menu/context.d.ts.map +1 -1
  623. package/build-types/navigation/menu/index.d.ts +0 -1
  624. package/build-types/navigation/menu/index.d.ts.map +1 -1
  625. package/build-types/navigation/menu/menu-title-search.d.ts +0 -1
  626. package/build-types/navigation/menu/menu-title-search.d.ts.map +1 -1
  627. package/build-types/navigation/menu/menu-title.d.ts +0 -1
  628. package/build-types/navigation/menu/menu-title.d.ts.map +1 -1
  629. package/build-types/navigation/menu/search-no-results-found.d.ts +0 -1
  630. package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -1
  631. package/build-types/navigation/styles/navigation-styles.d.ts +25 -26
  632. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  633. package/build-types/navigation/types.d.ts +0 -1
  634. package/build-types/navigation/types.d.ts.map +1 -1
  635. package/build-types/navigation/use-navigation-tree-nodes.d.ts +0 -1
  636. package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +1 -1
  637. package/build-types/navigator/context.d.ts +0 -1
  638. package/build-types/navigator/context.d.ts.map +1 -1
  639. package/build-types/navigator/navigator-back-button/component.d.ts +17 -18
  640. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  641. package/build-types/navigator/navigator-back-button/hook.d.ts +29 -31
  642. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  643. package/build-types/navigator/navigator-button/component.d.ts +18 -19
  644. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  645. package/build-types/navigator/navigator-button/hook.d.ts +29 -31
  646. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  647. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  648. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  649. package/build-types/navigator/navigator-screen/component.d.ts +0 -1
  650. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  651. package/build-types/navigator/navigator-to-parent-button/component.d.ts +17 -18
  652. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  653. package/build-types/navigator/stories/index.story.d.ts +4 -4
  654. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  655. package/build-types/notice/index.d.ts +0 -1
  656. package/build-types/notice/index.d.ts.map +1 -1
  657. package/build-types/notice/list.d.ts +0 -1
  658. package/build-types/notice/list.d.ts.map +1 -1
  659. package/build-types/number-control/index.d.ts +12 -13
  660. package/build-types/number-control/index.d.ts.map +1 -1
  661. package/build-types/number-control/stories/index.story.d.ts +12 -13
  662. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  663. package/build-types/number-control/styles/number-control-styles.d.ts +2 -3
  664. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  665. package/build-types/palette-edit/index.d.ts +0 -1
  666. package/build-types/palette-edit/index.d.ts.map +1 -1
  667. package/build-types/palette-edit/styles.d.ts +16 -18
  668. package/build-types/palette-edit/styles.d.ts.map +1 -1
  669. package/build-types/panel/body.d.ts +0 -1
  670. package/build-types/panel/body.d.ts.map +1 -1
  671. package/build-types/panel/header.d.ts +0 -1
  672. package/build-types/panel/header.d.ts.map +1 -1
  673. package/build-types/panel/index.d.ts +0 -1
  674. package/build-types/panel/index.d.ts.map +1 -1
  675. package/build-types/panel/row.d.ts +0 -1
  676. package/build-types/panel/row.d.ts.map +1 -1
  677. package/build-types/panel/types.d.ts +0 -1
  678. package/build-types/panel/types.d.ts.map +1 -1
  679. package/build-types/placeholder/index.d.ts +0 -1
  680. package/build-types/placeholder/index.d.ts.map +1 -1
  681. package/build-types/popover/index.d.ts +0 -1
  682. package/build-types/popover/index.d.ts.map +1 -1
  683. package/build-types/popover/overlay-middlewares.d.ts +1 -11
  684. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  685. package/build-types/popover/stories/e2e/index.story.d.ts +0 -1
  686. package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
  687. package/build-types/popover/stories/index.story.d.ts +6 -6
  688. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  689. package/build-types/popover/test/utils/index.d.ts +0 -1
  690. package/build-types/popover/test/utils/index.d.ts.map +1 -1
  691. package/build-types/popover/utils.d.ts +3 -3
  692. package/build-types/popover/utils.d.ts.map +1 -1
  693. package/build-types/private-apis.d.ts.map +1 -1
  694. package/build-types/progress-bar/index.d.ts +0 -1
  695. package/build-types/progress-bar/index.d.ts.map +1 -1
  696. package/build-types/progress-bar/stories/index.story.d.ts +0 -1
  697. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  698. package/build-types/progress-bar/styles.d.ts +6 -7
  699. package/build-types/progress-bar/styles.d.ts.map +1 -1
  700. package/build-types/query-controls/author-select.d.ts +0 -1
  701. package/build-types/query-controls/author-select.d.ts.map +1 -1
  702. package/build-types/query-controls/category-select.d.ts +0 -1
  703. package/build-types/query-controls/category-select.d.ts.map +1 -1
  704. package/build-types/query-controls/index.d.ts +0 -1
  705. package/build-types/query-controls/index.d.ts.map +1 -1
  706. package/build-types/radio-control/index.d.ts +0 -1
  707. package/build-types/radio-control/index.d.ts.map +1 -1
  708. package/build-types/radio-group/context.d.ts +2 -3
  709. package/build-types/radio-group/context.d.ts.map +1 -1
  710. package/build-types/radio-group/index.d.ts +0 -1
  711. package/build-types/radio-group/index.d.ts.map +1 -1
  712. package/build-types/radio-group/radio.d.ts +0 -1
  713. package/build-types/radio-group/radio.d.ts.map +1 -1
  714. package/build-types/radio-group/types.d.ts +0 -1
  715. package/build-types/radio-group/types.d.ts.map +1 -1
  716. package/build-types/range-control/index.d.ts +29 -29
  717. package/build-types/range-control/index.d.ts.map +1 -1
  718. package/build-types/range-control/input-range.d.ts +0 -1
  719. package/build-types/range-control/input-range.d.ts.map +1 -1
  720. package/build-types/range-control/mark.d.ts +0 -1
  721. package/build-types/range-control/mark.d.ts.map +1 -1
  722. package/build-types/range-control/rail.d.ts +0 -1
  723. package/build-types/range-control/rail.d.ts.map +1 -1
  724. package/build-types/range-control/styles/range-control-styles.d.ts +48 -49
  725. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  726. package/build-types/range-control/tooltip.d.ts +0 -1
  727. package/build-types/range-control/tooltip.d.ts.map +1 -1
  728. package/build-types/resizable-box/index.d.ts +7 -20
  729. package/build-types/resizable-box/index.d.ts.map +1 -1
  730. package/build-types/resizable-box/resize-tooltip/label.d.ts +0 -1
  731. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  732. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +7 -8
  733. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  734. package/build-types/resizable-box/resize-tooltip/utils.d.ts +0 -1
  735. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  736. package/build-types/resizable-box/stories/index.story.d.ts +32 -39
  737. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  738. package/build-types/responsive-wrapper/index.d.ts +0 -1
  739. package/build-types/responsive-wrapper/index.d.ts.map +1 -1
  740. package/build-types/responsive-wrapper/types.d.ts +0 -1
  741. package/build-types/responsive-wrapper/types.d.ts.map +1 -1
  742. package/build-types/sandbox/index.d.ts +0 -1
  743. package/build-types/sandbox/index.d.ts.map +1 -1
  744. package/build-types/sandbox/types.d.ts +0 -1
  745. package/build-types/sandbox/types.d.ts.map +1 -1
  746. package/build-types/scrollable/component.d.ts +0 -1
  747. package/build-types/scrollable/component.d.ts.map +1 -1
  748. package/build-types/scrollable/hook.d.ts +9 -11
  749. package/build-types/scrollable/hook.d.ts.map +1 -1
  750. package/build-types/search-control/index.d.ts +0 -1
  751. package/build-types/search-control/index.d.ts.map +1 -1
  752. package/build-types/search-control/stories/index.story.d.ts +0 -1
  753. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  754. package/build-types/search-control/styles.d.ts +3 -4
  755. package/build-types/search-control/styles.d.ts.map +1 -1
  756. package/build-types/search-control/types.d.ts +0 -1
  757. package/build-types/search-control/types.d.ts.map +1 -1
  758. package/build-types/select-control/chevron-down.d.ts +0 -1
  759. package/build-types/select-control/chevron-down.d.ts.map +1 -1
  760. package/build-types/select-control/index.d.ts +0 -1
  761. package/build-types/select-control/index.d.ts.map +1 -1
  762. package/build-types/select-control/stories/index.story.d.ts +1 -1
  763. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  764. package/build-types/select-control/styles/select-control-styles.d.ts +7 -8
  765. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  766. package/build-types/select-control/types.d.ts +6 -0
  767. package/build-types/select-control/types.d.ts.map +1 -1
  768. package/build-types/shortcut/index.d.ts +0 -1
  769. package/build-types/shortcut/index.d.ts.map +1 -1
  770. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -1
  771. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  772. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -1
  773. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  774. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -1
  775. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  776. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -2
  777. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  778. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  779. package/build-types/slot-fill/context.d.ts +0 -1
  780. package/build-types/slot-fill/context.d.ts.map +1 -1
  781. package/build-types/slot-fill/index.d.ts +4 -4
  782. package/build-types/slot-fill/index.d.ts.map +1 -1
  783. package/build-types/slot-fill/provider.d.ts +0 -1
  784. package/build-types/slot-fill/provider.d.ts.map +1 -1
  785. package/build-types/slot-fill/slot.d.ts +1 -2
  786. package/build-types/slot-fill/slot.d.ts.map +1 -1
  787. package/build-types/slot-fill/use-slot.d.ts +0 -1
  788. package/build-types/slot-fill/use-slot.d.ts.map +1 -1
  789. package/build-types/snackbar/index.d.ts +5 -6
  790. package/build-types/snackbar/index.d.ts.map +1 -1
  791. package/build-types/snackbar/list.d.ts +0 -1
  792. package/build-types/snackbar/list.d.ts.map +1 -1
  793. package/build-types/spacer/component.d.ts +0 -1
  794. package/build-types/spacer/component.d.ts.map +1 -1
  795. package/build-types/spacer/hook.d.ts +9 -11
  796. package/build-types/spacer/hook.d.ts.map +1 -1
  797. package/build-types/spinner/styles.d.ts +6 -7
  798. package/build-types/spinner/styles.d.ts.map +1 -1
  799. package/build-types/style-provider/index.d.ts +0 -1
  800. package/build-types/style-provider/index.d.ts.map +1 -1
  801. package/build-types/surface/component.d.ts +0 -1
  802. package/build-types/surface/component.d.ts.map +1 -1
  803. package/build-types/surface/hook.d.ts +10 -12
  804. package/build-types/surface/hook.d.ts.map +1 -1
  805. package/build-types/surface/types.d.ts +0 -1
  806. package/build-types/surface/types.d.ts.map +1 -1
  807. package/build-types/tab-panel/index.d.ts +0 -1
  808. package/build-types/tab-panel/index.d.ts.map +1 -1
  809. package/build-types/tab-panel/stories/index.story.d.ts +0 -1
  810. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  811. package/build-types/tabs/context.d.ts +0 -1
  812. package/build-types/tabs/context.d.ts.map +1 -1
  813. package/build-types/tabs/index.d.ts +0 -1
  814. package/build-types/tabs/index.d.ts.map +1 -1
  815. package/build-types/tabs/styles.d.ts +12 -13
  816. package/build-types/tabs/styles.d.ts.map +1 -1
  817. package/build-types/tabs/tab.d.ts +0 -1
  818. package/build-types/tabs/tab.d.ts.map +1 -1
  819. package/build-types/tabs/tablist.d.ts +0 -1
  820. package/build-types/tabs/tablist.d.ts.map +1 -1
  821. package/build-types/tabs/tabpanel.d.ts +0 -1
  822. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  823. package/build-types/tabs/types.d.ts +0 -1
  824. package/build-types/tabs/types.d.ts.map +1 -1
  825. package/build-types/text/component.d.ts +0 -1
  826. package/build-types/text/component.d.ts.map +1 -1
  827. package/build-types/text/hook.d.ts +9 -9
  828. package/build-types/text/stories/index.story.d.ts +0 -1
  829. package/build-types/text/stories/index.story.d.ts.map +1 -1
  830. package/build-types/text/utils.d.ts +0 -1
  831. package/build-types/text/utils.d.ts.map +1 -1
  832. package/build-types/text-control/index.d.ts +2 -3
  833. package/build-types/text-control/index.d.ts.map +1 -1
  834. package/build-types/text-highlight/index.d.ts +0 -1
  835. package/build-types/text-highlight/index.d.ts.map +1 -1
  836. package/build-types/textarea-control/index.d.ts +2 -2
  837. package/build-types/textarea-control/index.d.ts.map +1 -1
  838. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +2 -3
  839. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
  840. package/build-types/theme/color-algorithms.d.ts +1 -9
  841. package/build-types/theme/color-algorithms.d.ts.map +1 -1
  842. package/build-types/theme/index.d.ts +0 -1
  843. package/build-types/theme/index.d.ts.map +1 -1
  844. package/build-types/theme/stories/index.story.d.ts +0 -1
  845. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  846. package/build-types/theme/styles.d.ts +2 -3
  847. package/build-types/theme/styles.d.ts.map +1 -1
  848. package/build-types/tip/index.d.ts +0 -1
  849. package/build-types/tip/index.d.ts.map +1 -1
  850. package/build-types/toggle-control/index.d.ts.map +1 -1
  851. package/build-types/toggle-control/stories/index.story.d.ts +0 -1
  852. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  853. package/build-types/toggle-group-control/context.d.ts +0 -1
  854. package/build-types/toggle-group-control/context.d.ts.map +1 -1
  855. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +0 -1
  856. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  857. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +0 -1
  858. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  859. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +8 -9
  860. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  861. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +5 -6
  862. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  863. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +0 -1
  864. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  865. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -2
  866. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  867. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +5 -6
  868. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  869. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +0 -1
  870. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  871. package/build-types/toolbar/stories/index.story.d.ts +0 -1
  872. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  873. package/build-types/toolbar/toolbar/index.d.ts +0 -1
  874. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  875. package/build-types/toolbar/toolbar/toolbar-container.d.ts +0 -1
  876. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  877. package/build-types/toolbar/toolbar-button/index.d.ts +0 -1
  878. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  879. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +0 -1
  880. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
  881. package/build-types/toolbar/toolbar-context/index.d.ts +0 -1
  882. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  883. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +0 -1
  884. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  885. package/build-types/toolbar/toolbar-group/index.d.ts +0 -1
  886. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
  887. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +0 -1
  888. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
  889. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +1 -2
  890. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
  891. package/build-types/toolbar/toolbar-item/index.d.ts +2 -3
  892. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  893. package/build-types/tools-panel/context.d.ts +0 -1
  894. package/build-types/tools-panel/context.d.ts.map +1 -1
  895. package/build-types/tools-panel/styles.d.ts +2 -3
  896. package/build-types/tools-panel/styles.d.ts.map +1 -1
  897. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  898. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  899. package/build-types/tools-panel/tools-panel/hook.d.ts +10 -12
  900. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  901. package/build-types/tools-panel/tools-panel-header/component.d.ts +0 -1
  902. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  903. package/build-types/tools-panel/tools-panel-header/hook.d.ts +11 -13
  904. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  905. package/build-types/tools-panel/tools-panel-item/component.d.ts +3 -4
  906. package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
  907. package/build-types/tools-panel/tools-panel-item/hook.d.ts +9 -11
  908. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  909. package/build-types/tooltip/index.d.ts +0 -1
  910. package/build-types/tooltip/index.d.ts.map +1 -1
  911. package/build-types/tooltip/stories/index.story.d.ts +0 -1
  912. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  913. package/build-types/tooltip/types.d.ts +0 -1
  914. package/build-types/tooltip/types.d.ts.map +1 -1
  915. package/build-types/tree-grid/cell.d.ts +0 -1
  916. package/build-types/tree-grid/cell.d.ts.map +1 -1
  917. package/build-types/tree-grid/index.d.ts +0 -1
  918. package/build-types/tree-grid/index.d.ts.map +1 -1
  919. package/build-types/tree-grid/item.d.ts +0 -1
  920. package/build-types/tree-grid/item.d.ts.map +1 -1
  921. package/build-types/tree-grid/roving-tab-index-context.d.ts +0 -1
  922. package/build-types/tree-grid/roving-tab-index-context.d.ts.map +1 -1
  923. package/build-types/tree-grid/roving-tab-index-item.d.ts +0 -1
  924. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  925. package/build-types/tree-grid/roving-tab-index.d.ts +0 -1
  926. package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -1
  927. package/build-types/tree-grid/row.d.ts +0 -1
  928. package/build-types/tree-grid/row.d.ts.map +1 -1
  929. package/build-types/tree-grid/stories/index.story.d.ts +0 -1
  930. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  931. package/build-types/tree-grid/types.d.ts +0 -1
  932. package/build-types/tree-grid/types.d.ts.map +1 -1
  933. package/build-types/tree-select/index.d.ts +1 -1
  934. package/build-types/tree-select/index.d.ts.map +1 -1
  935. package/build-types/truncate/component.d.ts +0 -1
  936. package/build-types/truncate/component.d.ts.map +1 -1
  937. package/build-types/truncate/hook.d.ts +9 -11
  938. package/build-types/truncate/hook.d.ts.map +1 -1
  939. package/build-types/truncate/utils.d.ts.map +1 -1
  940. package/build-types/unit-control/index.d.ts +7 -8
  941. package/build-types/unit-control/index.d.ts.map +1 -1
  942. package/build-types/unit-control/styles/unit-control-styles.d.ts +17 -18
  943. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  944. package/build-types/unit-control/unit-select-control.d.ts +0 -1
  945. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  946. package/build-types/unit-control/utils.d.ts.map +1 -1
  947. package/build-types/utils/breakpoint.d.ts +1 -10
  948. package/build-types/utils/breakpoint.d.ts.map +1 -1
  949. package/build-types/utils/element-rect.d.ts +111 -0
  950. package/build-types/utils/element-rect.d.ts.map +1 -0
  951. package/build-types/utils/font.d.ts +1 -6
  952. package/build-types/utils/font.d.ts.map +1 -1
  953. package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
  954. package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
  955. package/build-types/utils/hooks/use-controlled-value.d.ts +0 -1
  956. package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
  957. package/build-types/utils/hooks/use-event.d.ts +20 -0
  958. package/build-types/utils/hooks/use-event.d.ts.map +1 -0
  959. package/build-types/utils/hooks/use-on-value-update.d.ts +19 -0
  960. package/build-types/utils/hooks/use-on-value-update.d.ts.map +1 -0
  961. package/build-types/utils/hooks/use-update-effect.d.ts +1 -1
  962. package/build-types/utils/math.d.ts.map +1 -1
  963. package/build-types/utils/rtl.d.ts +2 -2
  964. package/build-types/utils/values.d.ts +2 -2
  965. package/build-types/utils/values.d.ts.map +1 -1
  966. package/build-types/utils/with-ignore-ime-events.d.ts +0 -1
  967. package/build-types/utils/with-ignore-ime-events.d.ts.map +1 -1
  968. package/build-types/v-stack/component.d.ts +2 -3
  969. package/build-types/v-stack/component.d.ts.map +1 -1
  970. package/build-types/v-stack/hook.d.ts +9 -11
  971. package/build-types/v-stack/hook.d.ts.map +1 -1
  972. package/build-types/v-stack/stories/index.story.d.ts +2 -3
  973. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  974. package/build-types/view/component.d.ts +0 -2
  975. package/build-types/view/component.d.ts.map +1 -1
  976. package/build-types/visually-hidden/component.d.ts +0 -1
  977. package/build-types/visually-hidden/component.d.ts.map +1 -1
  978. package/build-types/z-stack/component.d.ts +0 -1
  979. package/build-types/z-stack/component.d.ts.map +1 -1
  980. package/build-types/z-stack/styles.d.ts +4 -5
  981. package/build-types/z-stack/styles.d.ts.map +1 -1
  982. package/package.json +19 -20
  983. package/src/autocomplete/README.md +2 -2
  984. package/src/autocomplete/types.ts +2 -3
  985. package/src/base-control/README.md +1 -1
  986. package/src/base-control/types.ts +1 -1
  987. package/src/button/README.md +1 -1
  988. package/src/button/index.tsx +9 -7
  989. package/src/button/test/index.tsx +17 -4
  990. package/src/button/types.ts +9 -2
  991. package/src/card/card/README.md +1 -1
  992. package/src/card/stories/index.story.tsx +43 -42
  993. package/src/checkbox-control/README.md +8 -0
  994. package/src/checkbox-control/index.tsx +1 -0
  995. package/src/checkbox-control/style.scss +3 -1
  996. package/src/color-picker/component.tsx +12 -22
  997. package/src/color-picker/stories/index.story.tsx +2 -22
  998. package/src/combobox-control/README.md +9 -0
  999. package/src/combobox-control/index.tsx +11 -0
  1000. package/src/combobox-control/test/index.tsx +127 -1
  1001. package/src/custom-select-control/README.md +34 -32
  1002. package/src/{custom-select-control-v2/legacy-component → custom-select-control}/index.tsx +60 -37
  1003. package/src/custom-select-control/stories/index.story.tsx +26 -18
  1004. package/src/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.tsx +57 -61
  1005. package/src/custom-select-control/types.ts +123 -0
  1006. package/src/custom-select-control-v2/custom-select.tsx +2 -0
  1007. package/src/custom-select-control-v2/index.tsx +26 -1
  1008. package/src/custom-select-control-v2/stories/{default.story.tsx → index.story.tsx} +1 -1
  1009. package/src/custom-select-control-v2/styles.ts +28 -3
  1010. package/src/custom-select-control-v2/types.ts +0 -109
  1011. package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -0
  1012. package/src/disabled/README.md +1 -1
  1013. package/src/dropdown/stories/index.story.tsx +55 -50
  1014. package/src/dropdown-menu/stories/index.story.tsx +52 -55
  1015. package/src/dropdown-menu-v2/stories/index.story.tsx +0 -12
  1016. package/src/dropdown-menu-v2/styles.ts +3 -3
  1017. package/src/focal-point-picker/README.md +9 -0
  1018. package/src/focal-point-picker/index.tsx +1 -0
  1019. package/src/font-size-picker/README.md +1 -1
  1020. package/src/font-size-picker/font-size-picker-select.tsx +3 -3
  1021. package/src/font-size-picker/index.tsx +68 -64
  1022. package/src/font-size-picker/test/index.tsx +83 -15
  1023. package/src/font-size-picker/types.ts +6 -5
  1024. package/src/form-toggle/style.scss +14 -9
  1025. package/src/form-token-field/README.md +2 -1
  1026. package/src/form-token-field/index.tsx +9 -0
  1027. package/src/form-token-field/stories/index.story.tsx +2 -0
  1028. package/src/higher-order/navigate-regions/style.scss +3 -15
  1029. package/src/index.ts +1 -1
  1030. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  1031. package/src/navigator/stories/index.story.tsx +240 -242
  1032. package/src/notice/test/__snapshots__/index.tsx.snap +1 -1
  1033. package/src/popover/stories/index.story.tsx +155 -153
  1034. package/src/private-apis.ts +0 -4
  1035. package/src/radio-control/index.tsx +1 -1
  1036. package/src/radio-control/style.scss +6 -1
  1037. package/src/range-control/README.md +8 -0
  1038. package/src/range-control/index.tsx +1 -0
  1039. package/src/resizable-box/resize-tooltip/README.md +1 -1
  1040. package/src/select-control/README.md +8 -0
  1041. package/src/select-control/index.tsx +7 -0
  1042. package/src/select-control/stories/index.story.tsx +6 -0
  1043. package/src/select-control/styles/select-control-styles.ts +24 -1
  1044. package/src/select-control/types.ts +6 -0
  1045. package/src/style.scss +1 -1
  1046. package/src/tabs/styles.ts +10 -2
  1047. package/src/tabs/tablist.tsx +3 -243
  1048. package/src/textarea-control/README.md +8 -0
  1049. package/src/textarea-control/index.tsx +1 -0
  1050. package/src/toggle-control/index.tsx +12 -3
  1051. package/src/toggle-control/style.scss +11 -0
  1052. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +36 -6
  1053. package/src/toggle-group-control/test/index.tsx +114 -0
  1054. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +6 -1
  1055. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +5 -0
  1056. package/src/tools-panel/tools-panel-header/component.tsx +1 -1
  1057. package/src/tree-select/README.md +9 -0
  1058. package/src/tree-select/index.tsx +1 -0
  1059. package/src/utils/element-rect.ts +197 -0
  1060. package/src/utils/hooks/use-event.ts +38 -0
  1061. package/src/utils/hooks/use-on-value-update.ts +42 -0
  1062. package/tsconfig.tsbuildinfo +1 -1
  1063. package/build/custom-select-control-v2/default-component/index.js +0 -42
  1064. package/build/custom-select-control-v2/default-component/index.js.map +0 -1
  1065. package/build/custom-select-control-v2/legacy-component/index.js +0 -131
  1066. package/build/custom-select-control-v2/legacy-component/index.js.map +0 -1
  1067. package/build-module/custom-select-control-v2/default-component/index.js +0 -31
  1068. package/build-module/custom-select-control-v2/default-component/index.js.map +0 -1
  1069. package/build-module/custom-select-control-v2/legacy-component/index.js +0 -122
  1070. package/build-module/custom-select-control-v2/legacy-component/index.js.map +0 -1
  1071. package/build-types/custom-select-control-v2/default-component/index.d.ts +0 -9
  1072. package/build-types/custom-select-control-v2/default-component/index.d.ts.map +0 -1
  1073. package/build-types/custom-select-control-v2/legacy-component/index.d.ts +0 -5
  1074. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +0 -1
  1075. package/build-types/custom-select-control-v2/legacy-component/test/index.d.ts.map +0 -1
  1076. package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +0 -1
  1077. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts +0 -14
  1078. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +0 -1
  1079. package/src/custom-select-control/index.js +0 -240
  1080. package/src/custom-select-control/style.scss +0 -75
  1081. package/src/custom-select-control/test/index.js +0 -665
  1082. package/src/custom-select-control-v2/default-component/index.tsx +0 -29
  1083. package/src/custom-select-control-v2/stories/legacy.story.tsx +0 -72
  1084. /package/build-types/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.d.ts +0 -0
@@ -4,199 +4,150 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.StableCustomSelectControl = StableCustomSelectControl;
8
- exports.default = CustomSelectControl;
9
- var _downshift = require("downshift");
7
+ exports.default = void 0;
8
+ var Ariakit = _interopRequireWildcard(require("@ariakit/react"));
10
9
  var _clsx = _interopRequireDefault(require("clsx"));
11
- var _icons = require("@wordpress/icons");
12
- var _i18n = require("@wordpress/i18n");
13
- var _element = require("@wordpress/element");
14
- var _visuallyHidden = require("../visually-hidden");
15
- var _selectControlStyles = require("../select-control/styles/select-control-styles");
16
- var _chevronDown = _interopRequireDefault(require("../select-control/chevron-down"));
17
- var _baseControlStyles = require("../base-control/styles/base-control-styles");
18
- var _useDeprecatedProps = require("../utils/use-deprecated-props");
19
- var _inputBase = _interopRequireDefault(require("../input-control/input-base"));
10
+ var _customSelect = _interopRequireDefault(require("../custom-select-control-v2/custom-select"));
11
+ var _item = _interopRequireDefault(require("../custom-select-control-v2/item"));
12
+ var Styled = _interopRequireWildcard(require("../custom-select-control-v2/styles"));
20
13
  var _jsxRuntime = require("react/jsx-runtime");
21
- // @ts-nocheck
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
16
  /**
23
17
  * External dependencies
24
18
  */
25
19
 
26
- /**
27
- * WordPress dependencies
28
- */
29
-
30
20
  /**
31
21
  * Internal dependencies
32
22
  */
33
23
 
34
- const itemToString = item => item?.name;
35
- // This is needed so that in Windows, where
36
- // the menu does not necessarily open on
37
- // key up/down, you can still switch between
38
- // options with the menu closed.
39
- const stateReducer = ({
40
- selectedItem
41
- }, {
42
- type,
43
- changes,
44
- props: {
45
- items
46
- }
47
- }) => {
48
- switch (type) {
49
- case _downshift.useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:
50
- // If we already have a selected item, try to select the next one,
51
- // without circular navigation. Otherwise, select the first item.
52
- return {
53
- selectedItem: items[selectedItem ? Math.min(items.indexOf(selectedItem) + 1, items.length - 1) : 0]
54
- };
55
- case _downshift.useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:
56
- // If we already have a selected item, try to select the previous one,
57
- // without circular navigation. Otherwise, select the last item.
58
- return {
59
- selectedItem: items[selectedItem ? Math.max(items.indexOf(selectedItem) - 1, 0) : items.length - 1]
60
- };
61
- default:
62
- return changes;
63
- }
64
- };
24
+ function useDeprecatedProps({
25
+ __experimentalShowSelectedHint,
26
+ ...otherProps
27
+ }) {
28
+ return {
29
+ showSelectedHint: __experimentalShowSelectedHint,
30
+ ...otherProps
31
+ };
32
+ }
33
+
34
+ // The removal of `__experimentalHint` in favour of `hint` doesn't happen in
35
+ // the `useDeprecatedProps` hook in order not to break consumers that rely
36
+ // on object identity (see https://github.com/WordPress/gutenberg/pull/63248#discussion_r1672213131)
37
+ function applyOptionDeprecations({
38
+ __experimentalHint,
39
+ ...rest
40
+ }) {
41
+ return {
42
+ hint: __experimentalHint,
43
+ ...rest
44
+ };
45
+ }
65
46
  function CustomSelectControl(props) {
66
47
  const {
67
- /** Start opting into the larger default height that will become the default size in a future version. */
68
48
  __next40pxDefaultSize = false,
69
- className,
70
- hideLabelFromVision,
71
- label,
72
49
  describedBy,
73
- options: items,
74
- onChange: onSelectedItemChange,
75
- /** @type {import('../select-control/types').SelectControlProps.size} */
50
+ options,
51
+ onChange,
76
52
  size = 'default',
77
- value: _selectedItem,
78
- onMouseOver,
79
- onMouseOut,
80
- onFocus,
81
- onBlur,
82
- __experimentalShowSelectedHint = false
83
- } = (0, _useDeprecatedProps.useDeprecated36pxDefaultSizeProp)(props);
84
- const {
85
- getLabelProps,
86
- getToggleButtonProps,
87
- getMenuProps,
88
- getItemProps,
89
- isOpen,
90
- highlightedIndex,
91
- selectedItem
92
- } = (0, _downshift.useSelect)({
93
- initialSelectedItem: items[0],
94
- items,
95
- itemToString,
96
- onSelectedItemChange,
97
- ...(typeof _selectedItem !== 'undefined' && _selectedItem !== null ? {
98
- selectedItem: _selectedItem
99
- } : undefined),
100
- stateReducer
101
- });
102
- function getDescribedBy() {
103
- if (describedBy) {
104
- return describedBy;
105
- }
106
- if (!selectedItem) {
107
- return (0, _i18n.__)('No selection');
108
- }
53
+ value,
54
+ className: classNameProp,
55
+ showSelectedHint = false,
56
+ ...restProps
57
+ } = useDeprecatedProps(props);
109
58
 
110
- // translators: %s: The selected option.
111
- return (0, _i18n.sprintf)((0, _i18n.__)('Currently selected: %s'), selectedItem.name);
112
- }
113
- let menuProps = getMenuProps({
114
- className: 'components-custom-select-control__menu',
115
- 'aria-hidden': !isOpen
116
- });
117
- const onKeyDownHandler = (0, _element.useCallback)(e => {
118
- e.stopPropagation();
119
- menuProps?.onKeyDown?.(e);
120
- }, [menuProps]);
59
+ // Forward props + store from v2 implementation
60
+ const store = Ariakit.useSelectStore({
61
+ async setValue(nextValue) {
62
+ const nextOption = options.find(item => item.name === nextValue);
63
+ if (!onChange || !nextOption) {
64
+ return;
65
+ }
121
66
 
122
- // We need this here, because the null active descendant is not fully ARIA compliant.
123
- if (menuProps['aria-activedescendant']?.startsWith('downshift-null')) {
124
- const {
125
- 'aria-activedescendant': ariaActivedescendant,
126
- ...restMenuProps
127
- } = menuProps;
128
- menuProps = restMenuProps;
129
- }
130
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
131
- className: (0, _clsx.default)('components-custom-select-control', className),
132
- children: [hideLabelFromVision ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_visuallyHidden.VisuallyHidden, {
133
- as: "label",
134
- ...getLabelProps(),
135
- children: label
136
- }) :
137
- /*#__PURE__*/
138
- /* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */
139
- (0, _jsxRuntime.jsx)(_baseControlStyles.StyledLabel, {
140
- ...getLabelProps({
141
- className: 'components-custom-select-control__label'
142
- }),
143
- children: label
144
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_inputBase.default, {
145
- __next40pxDefaultSize: __next40pxDefaultSize,
146
- size: size,
147
- suffix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_chevronDown.default, {}),
148
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_selectControlStyles.Select, {
149
- onMouseOver: onMouseOver,
150
- onMouseOut: onMouseOut,
151
- as: "button",
152
- onFocus: onFocus,
153
- onBlur: onBlur,
154
- selectSize: size,
155
- __next40pxDefaultSize: __next40pxDefaultSize,
156
- ...getToggleButtonProps({
157
- // This is needed because some speech recognition software don't support `aria-labelledby`.
158
- 'aria-label': label,
159
- 'aria-labelledby': undefined,
160
- className: 'components-custom-select-control__button',
161
- describedBy: getDescribedBy()
162
- }),
163
- children: [itemToString(selectedItem), __experimentalShowSelectedHint && selectedItem.__experimentalHint && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
164
- className: "components-custom-select-control__hint",
165
- children: selectedItem.__experimentalHint
166
- })]
167
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
168
- className: "components-custom-select-control__menu-wrapper",
169
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
170
- ...menuProps,
171
- onKeyDown: onKeyDownHandler,
172
- children: isOpen && items.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
173
- ...getItemProps({
174
- item,
175
- index,
176
- className: (0, _clsx.default)(item.className, 'components-custom-select-control__item', {
177
- 'is-highlighted': index === highlightedIndex,
178
- 'has-hint': !!item.__experimentalHint,
179
- 'is-next-40px-default-size': __next40pxDefaultSize
180
- }),
181
- style: item.style
182
- }),
183
- children: [item.name, item.__experimentalHint && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
184
- className: "components-custom-select-control__item-hint",
185
- children: item.__experimentalHint
186
- }), item === selectedItem && /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.Icon, {
187
- icon: _icons.check,
188
- className: "components-custom-select-control__item-icon"
189
- })]
190
- }, item.key))
191
- })
67
+ // Executes the logic in a microtask after the popup is closed.
68
+ // This is simply to ensure the isOpen state matches the one from the
69
+ // previous legacy implementation.
70
+ await Promise.resolve();
71
+ const state = store.getState();
72
+ const changeObject = {
73
+ highlightedIndex: state.renderedItems.findIndex(item => item.value === nextValue),
74
+ inputValue: '',
75
+ isOpen: state.open,
76
+ selectedItem: nextOption,
77
+ type: ''
78
+ };
79
+ onChange(changeObject);
80
+ },
81
+ value: value?.name,
82
+ // Setting the first option as a default value when no value is provided
83
+ // is already done natively by the underlying Ariakit component,
84
+ // but doing this explicitly avoids the `onChange` callback from firing
85
+ // on initial render, thus making this implementation closer to the v1.
86
+ defaultValue: options[0]?.name
87
+ });
88
+ const children = options.map(applyOptionDeprecations).map(({
89
+ name,
90
+ key,
91
+ hint,
92
+ style,
93
+ className
94
+ }) => {
95
+ const withHint = /*#__PURE__*/(0, _jsxRuntime.jsxs)(Styled.WithHintItemWrapper, {
96
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
97
+ children: name
98
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Styled.WithHintItemHint, {
99
+ // Keeping the classname for legacy reasons
100
+ className: "components-custom-select-control__item-hint",
101
+ children: hint
192
102
  })]
193
- })]
103
+ });
104
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_item.default, {
105
+ value: name,
106
+ children: hint ? withHint : name,
107
+ style: style,
108
+ className: (0, _clsx.default)(className,
109
+ // Keeping the classnames for legacy reasons
110
+ 'components-custom-select-control__item', {
111
+ 'has-hint': hint
112
+ })
113
+ }, key);
194
114
  });
195
- }
196
- function StableCustomSelectControl(props) {
197
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomSelectControl, {
198
- ...props,
199
- __experimentalShowSelectedHint: false
115
+ const renderSelectedValueHint = () => {
116
+ const {
117
+ value: currentValue
118
+ } = store.getState();
119
+ const selectedOptionHint = options?.map(applyOptionDeprecations)?.find(({
120
+ name
121
+ }) => currentValue === name)?.hint;
122
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Styled.SelectedExperimentalHintWrapper, {
123
+ children: [currentValue, selectedOptionHint && /*#__PURE__*/(0, _jsxRuntime.jsx)(Styled.SelectedExperimentalHintItem, {
124
+ // Keeping the classname for legacy reasons
125
+ className: "components-custom-select-control__hint",
126
+ children: selectedOptionHint
127
+ })]
128
+ });
129
+ };
130
+ const translatedSize = (() => {
131
+ if (__next40pxDefaultSize && size === 'default' || size === '__unstable-large') {
132
+ return 'default';
133
+ }
134
+ if (!__next40pxDefaultSize && size === 'default') {
135
+ return 'compact';
136
+ }
137
+ return size;
138
+ })();
139
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_customSelect.default, {
140
+ "aria-describedby": describedBy,
141
+ renderSelectedValue: showSelectedHint ? renderSelectedValueHint : undefined,
142
+ size: translatedSize,
143
+ store: store,
144
+ className: (0, _clsx.default)(
145
+ // Keeping the classname for legacy reasons
146
+ 'components-custom-select-control', classNameProp),
147
+ isLegacy: true,
148
+ ...restProps,
149
+ children: children
200
150
  });
201
151
  }
152
+ var _default = exports.default = CustomSelectControl;
202
153
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_downshift","require","_clsx","_interopRequireDefault","_icons","_i18n","_element","_visuallyHidden","_selectControlStyles","_chevronDown","_baseControlStyles","_useDeprecatedProps","_inputBase","_jsxRuntime","itemToString","item","name","stateReducer","selectedItem","type","changes","props","items","useSelect","stateChangeTypes","ToggleButtonKeyDownArrowDown","Math","min","indexOf","length","ToggleButtonKeyDownArrowUp","max","CustomSelectControl","__next40pxDefaultSize","className","hideLabelFromVision","label","describedBy","options","onChange","onSelectedItemChange","size","value","_selectedItem","onMouseOver","onMouseOut","onFocus","onBlur","__experimentalShowSelectedHint","useDeprecated36pxDefaultSizeProp","getLabelProps","getToggleButtonProps","getMenuProps","getItemProps","isOpen","highlightedIndex","initialSelectedItem","undefined","getDescribedBy","__","sprintf","menuProps","onKeyDownHandler","useCallback","e","stopPropagation","onKeyDown","startsWith","ariaActivedescendant","restMenuProps","jsxs","clsx","children","jsx","VisuallyHidden","as","StyledLabel","default","suffix","Select","selectSize","__experimentalHint","map","index","style","Icon","icon","check","key","StableCustomSelectControl"],"sources":["@wordpress/components/src/custom-select-control/index.js"],"sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport { useSelect } from 'downshift';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, check } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport { Select as SelectControlSelect } from '../select-control/styles/select-control-styles';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport { StyledLabel } from '../base-control/styles/base-control-styles';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport InputBase from '../input-control/input-base';\n\nconst itemToString = ( item ) => item?.name;\n// This is needed so that in Windows, where\n// the menu does not necessarily open on\n// key up/down, you can still switch between\n// options with the menu closed.\nconst stateReducer = (\n\t{ selectedItem },\n\t{ type, changes, props: { items } }\n) => {\n\tswitch ( type ) {\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:\n\t\t\t// If we already have a selected item, try to select the next one,\n\t\t\t// without circular navigation. Otherwise, select the first item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.min(\n\t\t\t\t\t\t\t\t\titems.indexOf( selectedItem ) + 1,\n\t\t\t\t\t\t\t\t\titems.length - 1\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: 0\n\t\t\t\t\t],\n\t\t\t};\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:\n\t\t\t// If we already have a selected item, try to select the previous one,\n\t\t\t// without circular navigation. Otherwise, select the last item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.max( items.indexOf( selectedItem ) - 1, 0 )\n\t\t\t\t\t\t\t: items.length - 1\n\t\t\t\t\t],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn changes;\n\t}\n};\n\nexport default function CustomSelectControl( props ) {\n\tconst {\n\t\t/** Start opting into the larger default height that will become the default size in a future version. */\n\t\t__next40pxDefaultSize = false,\n\t\tclassName,\n\t\thideLabelFromVision,\n\t\tlabel,\n\t\tdescribedBy,\n\t\toptions: items,\n\t\tonChange: onSelectedItemChange,\n\t\t/** @type {import('../select-control/types').SelectControlProps.size} */\n\t\tsize = 'default',\n\t\tvalue: _selectedItem,\n\t\tonMouseOver,\n\t\tonMouseOut,\n\t\tonFocus,\n\t\tonBlur,\n\t\t__experimentalShowSelectedHint = false,\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst {\n\t\tgetLabelProps,\n\t\tgetToggleButtonProps,\n\t\tgetMenuProps,\n\t\tgetItemProps,\n\t\tisOpen,\n\t\thighlightedIndex,\n\t\tselectedItem,\n\t} = useSelect( {\n\t\tinitialSelectedItem: items[ 0 ],\n\t\titems,\n\t\titemToString,\n\t\tonSelectedItemChange,\n\t\t...( typeof _selectedItem !== 'undefined' && _selectedItem !== null\n\t\t\t? { selectedItem: _selectedItem }\n\t\t\t: undefined ),\n\t\tstateReducer,\n\t} );\n\n\tfunction getDescribedBy() {\n\t\tif ( describedBy ) {\n\t\t\treturn describedBy;\n\t\t}\n\n\t\tif ( ! selectedItem ) {\n\t\t\treturn __( 'No selection' );\n\t\t}\n\n\t\t// translators: %s: The selected option.\n\t\treturn sprintf( __( 'Currently selected: %s' ), selectedItem.name );\n\t}\n\n\tlet menuProps = getMenuProps( {\n\t\tclassName: 'components-custom-select-control__menu',\n\t\t'aria-hidden': ! isOpen,\n\t} );\n\n\tconst onKeyDownHandler = useCallback(\n\t\t( e ) => {\n\t\t\te.stopPropagation();\n\t\t\tmenuProps?.onKeyDown?.( e );\n\t\t},\n\t\t[ menuProps ]\n\t);\n\n\t// We need this here, because the null active descendant is not fully ARIA compliant.\n\tif (\n\t\tmenuProps[ 'aria-activedescendant' ]?.startsWith( 'downshift-null' )\n\t) {\n\t\tconst {\n\t\t\t'aria-activedescendant': ariaActivedescendant,\n\t\t\t...restMenuProps\n\t\t} = menuProps;\n\t\tmenuProps = restMenuProps;\n\t}\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'components-custom-select-control', className ) }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"label\" { ...getLabelProps() }>\n\t\t\t\t\t{ label }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */\n\t\t\t\t<StyledLabel\n\t\t\t\t\t{ ...getLabelProps( {\n\t\t\t\t\t\tclassName: 'components-custom-select-control__label',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</StyledLabel>\n\t\t\t) }\n\t\t\t<InputBase\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ <SelectControlChevronDown /> }\n\t\t\t>\n\t\t\t\t<SelectControlSelect\n\t\t\t\t\tonMouseOver={ onMouseOver }\n\t\t\t\t\tonMouseOut={ onMouseOut }\n\t\t\t\t\tas=\"button\"\n\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t{ ...getToggleButtonProps( {\n\t\t\t\t\t\t// This is needed because some speech recognition software don't support `aria-labelledby`.\n\t\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t\t'aria-labelledby': undefined,\n\t\t\t\t\t\tclassName: 'components-custom-select-control__button',\n\t\t\t\t\t\tdescribedBy: getDescribedBy(),\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ itemToString( selectedItem ) }\n\t\t\t\t\t{ __experimentalShowSelectedHint &&\n\t\t\t\t\t\tselectedItem.__experimentalHint && (\n\t\t\t\t\t\t\t<span className=\"components-custom-select-control__hint\">\n\t\t\t\t\t\t\t\t{ selectedItem.__experimentalHint }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) }\n\t\t\t\t</SelectControlSelect>\n\t\t\t\t<div className=\"components-custom-select-control__menu-wrapper\">\n\t\t\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t\t\t<ul { ...menuProps } onKeyDown={ onKeyDownHandler }>\n\t\t\t\t\t\t{ isOpen &&\n\t\t\t\t\t\t\titems.map( ( item, index ) => (\n\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\tkey={ item.key }\n\t\t\t\t\t\t\t\t\t{ ...getItemProps( {\n\t\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t\t\t\t\t\titem.className,\n\t\t\t\t\t\t\t\t\t\t\t'components-custom-select-control__item',\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t'is-highlighted':\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex === highlightedIndex,\n\t\t\t\t\t\t\t\t\t\t\t\t'has-hint':\n\t\t\t\t\t\t\t\t\t\t\t\t\t!! item.__experimentalHint,\n\t\t\t\t\t\t\t\t\t\t\t\t'is-next-40px-default-size':\n\t\t\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tstyle: item.style,\n\t\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ item.name }\n\t\t\t\t\t\t\t\t\t{ item.__experimentalHint && (\n\t\t\t\t\t\t\t\t\t\t<span className=\"components-custom-select-control__item-hint\">\n\t\t\t\t\t\t\t\t\t\t\t{ item.__experimentalHint }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ item === selectedItem && (\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-custom-select-control__item-icon\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</InputBase>\n\t\t</div>\n\t);\n}\n\nexport function StableCustomSelectControl( props ) {\n\treturn (\n\t\t<CustomSelectControl\n\t\t\t{ ...props }\n\t\t\t__experimentalShowSelectedHint={ false }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAN,sBAA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D,CAAC;IAAA,CACI,CAAC;EAAA,CACR,CAAC;AAER;AAEO,SAASC,yBAAyBA,CAAEpE,KAAK,EAAG;EAClD,oBACC,IAAAR,WAAA,CAAA4D,GAAA,EAACzC,mBAAmB;IAAA,GACdX,KAAK;IACV2B,8BAA8B,EAAG;EAAO,CACxC,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_clsx","_interopRequireDefault","_customSelect","_item","Styled","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useDeprecatedProps","__experimentalShowSelectedHint","otherProps","showSelectedHint","applyOptionDeprecations","__experimentalHint","rest","hint","CustomSelectControl","props","__next40pxDefaultSize","describedBy","options","onChange","size","value","className","classNameProp","restProps","store","useSelectStore","setValue","nextValue","nextOption","find","item","name","Promise","resolve","state","getState","changeObject","highlightedIndex","renderedItems","findIndex","inputValue","isOpen","open","selectedItem","type","defaultValue","children","map","key","style","withHint","jsxs","WithHintItemWrapper","jsx","WithHintItemHint","clsx","renderSelectedValueHint","currentValue","selectedOptionHint","SelectedExperimentalHintWrapper","SelectedExperimentalHintItem","translatedSize","renderSelectedValue","undefined","isLegacy","_default","exports"],"sources":["@wordpress/components/src/custom-select-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport _CustomSelect from '../custom-select-control-v2/custom-select';\nimport CustomSelectItem from '../custom-select-control-v2/item';\nimport * as Styled from '../custom-select-control-v2/styles';\nimport type { CustomSelectProps } from './types';\n\nfunction useDeprecatedProps( {\n\t__experimentalShowSelectedHint,\n\t...otherProps\n}: CustomSelectProps ) {\n\treturn {\n\t\tshowSelectedHint: __experimentalShowSelectedHint,\n\t\t...otherProps,\n\t};\n}\n\n// The removal of `__experimentalHint` in favour of `hint` doesn't happen in\n// the `useDeprecatedProps` hook in order not to break consumers that rely\n// on object identity (see https://github.com/WordPress/gutenberg/pull/63248#discussion_r1672213131)\nfunction applyOptionDeprecations( {\n\t__experimentalHint,\n\t...rest\n}: CustomSelectProps[ 'options' ][ number ] ) {\n\treturn {\n\t\thint: __experimentalHint,\n\t\t...rest,\n\t};\n}\n\nfunction CustomSelectControl( props: CustomSelectProps ) {\n\tconst {\n\t\t__next40pxDefaultSize = false,\n\t\tdescribedBy,\n\t\toptions,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\tclassName: classNameProp,\n\t\tshowSelectedHint = false,\n\t\t...restProps\n\t} = useDeprecatedProps( props );\n\n\t// Forward props + store from v2 implementation\n\tconst store = Ariakit.useSelectStore( {\n\t\tasync setValue( nextValue ) {\n\t\t\tconst nextOption = options.find(\n\t\t\t\t( item ) => item.name === nextValue\n\t\t\t);\n\n\t\t\tif ( ! onChange || ! nextOption ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Executes the logic in a microtask after the popup is closed.\n\t\t\t// This is simply to ensure the isOpen state matches the one from the\n\t\t\t// previous legacy implementation.\n\t\t\tawait Promise.resolve();\n\t\t\tconst state = store.getState();\n\n\t\t\tconst changeObject = {\n\t\t\t\thighlightedIndex: state.renderedItems.findIndex(\n\t\t\t\t\t( item ) => item.value === nextValue\n\t\t\t\t),\n\t\t\t\tinputValue: '',\n\t\t\t\tisOpen: state.open,\n\t\t\t\tselectedItem: nextOption,\n\t\t\t\ttype: '',\n\t\t\t};\n\t\t\tonChange( changeObject );\n\t\t},\n\t\tvalue: value?.name,\n\t\t// Setting the first option as a default value when no value is provided\n\t\t// is already done natively by the underlying Ariakit component,\n\t\t// but doing this explicitly avoids the `onChange` callback from firing\n\t\t// on initial render, thus making this implementation closer to the v1.\n\t\tdefaultValue: options[ 0 ]?.name,\n\t} );\n\n\tconst children = options\n\t\t.map( applyOptionDeprecations )\n\t\t.map( ( { name, key, hint, style, className } ) => {\n\t\t\tconst withHint = (\n\t\t\t\t<Styled.WithHintItemWrapper>\n\t\t\t\t\t<span>{ name }</span>\n\t\t\t\t\t<Styled.WithHintItemHint\n\t\t\t\t\t\t// Keeping the classname for legacy reasons\n\t\t\t\t\t\tclassName=\"components-custom-select-control__item-hint\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ hint }\n\t\t\t\t\t</Styled.WithHintItemHint>\n\t\t\t\t</Styled.WithHintItemWrapper>\n\t\t\t);\n\n\t\t\treturn (\n\t\t\t\t<CustomSelectItem\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvalue={ name }\n\t\t\t\t\tchildren={ hint ? withHint : name }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t// Keeping the classnames for legacy reasons\n\t\t\t\t\t\t'components-custom-select-control__item',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'has-hint': hint,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t);\n\t\t} );\n\n\tconst renderSelectedValueHint = () => {\n\t\tconst { value: currentValue } = store.getState();\n\n\t\tconst selectedOptionHint = options\n\t\t\t?.map( applyOptionDeprecations )\n\t\t\t?.find( ( { name } ) => currentValue === name )?.hint;\n\n\t\treturn (\n\t\t\t<Styled.SelectedExperimentalHintWrapper>\n\t\t\t\t{ currentValue }\n\t\t\t\t{ selectedOptionHint && (\n\t\t\t\t\t<Styled.SelectedExperimentalHintItem\n\t\t\t\t\t\t// Keeping the classname for legacy reasons\n\t\t\t\t\t\tclassName=\"components-custom-select-control__hint\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ selectedOptionHint }\n\t\t\t\t\t</Styled.SelectedExperimentalHintItem>\n\t\t\t\t) }\n\t\t\t</Styled.SelectedExperimentalHintWrapper>\n\t\t);\n\t};\n\n\tconst translatedSize = ( () => {\n\t\tif (\n\t\t\t( __next40pxDefaultSize && size === 'default' ) ||\n\t\t\tsize === '__unstable-large'\n\t\t) {\n\t\t\treturn 'default';\n\t\t}\n\t\tif ( ! __next40pxDefaultSize && size === 'default' ) {\n\t\t\treturn 'compact';\n\t\t}\n\t\treturn size;\n\t} )();\n\n\treturn (\n\t\t<_CustomSelect\n\t\t\taria-describedby={ describedBy }\n\t\t\trenderSelectedValue={\n\t\t\t\tshowSelectedHint ? renderSelectedValueHint : undefined\n\t\t\t}\n\t\t\tsize={ translatedSize }\n\t\t\tstore={ store }\n\t\t\tclassName={ clsx(\n\t\t\t\t// Keeping the classname for legacy reasons\n\t\t\t\t'components-custom-select-control',\n\t\t\t\tclassNameProp\n\t\t\t) }\n\t\t\tisLegacy\n\t\t\t{ ...restProps }\n\t\t>\n\t\t\t{ children }\n\t\t</_CustomSelect>\n\t);\n}\n\nexport default CustomSelectControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,aAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAN,uBAAA,CAAAC,OAAA;AAA6D,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,G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AAG;MACpD,OAAO,SAAS;IACjB;IACA,OAAOA,IAAI;EACZ,CAAC,EAAG,CAAC;EAEL,oBACC,IAAAnC,WAAA,CAAAqE,GAAA,EAACxE,aAAA,CAAAU,OAAa;IACb,oBAAmByB,WAAa;IAChC8C,mBAAmB,EAClBtD,gBAAgB,GAAGgD,uBAAuB,GAAGO,SAC7C;IACD5C,IAAI,EAAG0C,cAAgB;IACvBrC,KAAK,EAAGA,KAAO;IACfH,SAAS,EAAG,IAAAkC,aAAI;IACf;IACA,kCAAkC,EAClCjC,aACD,CAAG;IACH0C,QAAQ;IAAA,GACHzC,SAAS;IAAAuB,QAAA,EAEZA;EAAQ,CACI,CAAC;AAElB;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAA3E,OAAA,GAEcsB,mBAAmB","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/custom-select-control/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { FocusEventHandler, MouseEventHandler } from 'react';\n\n/**\n * The object structure for the options array.\n */\ntype Option = {\n\tkey: string;\n\tname: string;\n\tstyle?: React.CSSProperties;\n\tclassName?: string;\n\thint?: string;\n\t/**\n\t * Use the `hint` property instead\n\t * @deprecated\n\t * @ignore\n\t */\n\t__experimentalHint?: string;\n\t[ key: string ]: any;\n};\n\n/**\n * The object returned from the onChange event.\n */\ntype ChangeObject = {\n\thighlightedIndex?: number;\n\tinputValue?: string;\n\tisOpen?: boolean;\n\ttype?: string;\n\tselectedItem: Option;\n};\n\nexport type CustomSelectProps = {\n\t/**\n\t * Optional classname for the component.\n\t */\n\tclassName?: string;\n\t/**\n\t * Hide the label visually, while keeping available to assistive technology.\n\t */\n\thideLabelFromVision?: boolean;\n\t/**\n\t * Description for the select trigger button used by assistive technology.\n\t * If no value is passed, the text \"Currently selected: selectedItem.name\"\n\t * will be used fully translated.\n\t */\n\tdescribedBy?: string;\n\t/**\n\t * Label for the control.\n\t */\n\tlabel: string;\n\t/**\n\t * Function called with the control's internal state changes. The `selectedItem`\n\t * property contains the next selected item.\n\t */\n\tonChange?: ( newValue: ChangeObject ) => void;\n\t/**\n\t * A handler for `blur` events on the trigger button.\n\t *\n\t * @ignore\n\t */\n\tonBlur?: FocusEventHandler< HTMLButtonElement >;\n\t/**\n\t * A handler for `focus` events on the trigger button.\n\t *\n\t * @ignore\n\t */\n\tonFocus?: FocusEventHandler< HTMLButtonElement >;\n\t/**\n\t * A handler for `mouseout` events on the trigger button.\n\t *\n\t * @ignore\n\t */\n\tonMouseOut?: MouseEventHandler< HTMLButtonElement >;\n\t/**\n\t * A handler for `mouseover` events on the trigger button.\n\t *\n\t * @ignore\n\t */\n\tonMouseOver?: MouseEventHandler< HTMLButtonElement >;\n\t/**\n\t * The list of options that can be chosen from.\n\t */\n\toptions: Array< Option >;\n\t/**\n\t * The size of the control.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'small' | '__unstable-large';\n\t/**\n\t * Can be used to externally control the value of the control.\n\t */\n\tvalue?: Option;\n\t/**\n\t * Use the `showSelectedHint` property instead.\n\t * @deprecated\n\t * @ignore\n\t */\n\t__experimentalShowSelectedHint?: boolean;\n\t/**\n\t * Show the hint of the selected item in the trigger button.\n\t *\n\t * @default false\n\t */\n\tshowSelectedHint?: boolean;\n\t/**\n\t * Opt-in prop for an unconstrained width style which became the default in\n\t * WordPress 6.5. The prop is no longer needed and can be safely removed.\n\t *\n\t * @deprecated\n\t * @ignore\n\t */\n\t__nextUnconstrainedWidth?: boolean;\n\t/**\n\t * Start opting into the larger default height that will become the default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
@@ -112,7 +112,10 @@ function _CustomSelect(props) {
112
112
  store: store,
113
113
  sameWidth: true,
114
114
  slide: false,
115
- onKeyDown: onSelectPopoverKeyDown,
115
+ onKeyDown: onSelectPopoverKeyDown
116
+ // Match legacy behavior
117
+ ,
118
+ flip: !isLegacy,
116
119
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomSelectContext.Provider, {
117
120
  value: contextValue,
118
121
  children: children
@@ -1 +1 @@
1
- {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_element","_i18n","_","Styled","_inputBase","_interopRequireDefault","_chevronDown","_baseControl","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CustomSelectContext","exports","createContext","undefined","defaultRenderSelectedValue","value","isValueEmpty","Array","isArray","length","__","sprintf","CustomSelectButton","renderSelectedValue","size","store","restProps","currentValue","useState","computedRenderSelectedValue","useMemo","jsx","Select","hasCustomRenderProp","children","_CustomSelect","props","hideLabelFromVision","label","className","isLegacy","onSelectPopoverKeyDown","useCallback","stopPropagation","contextValue","jsxs","SelectLabel","render","VisuallyHidden","VisualLabel","as","__next40pxDefaultSize","suffix","showOnKeyDown","SelectPopover","gutter","sameWidth","slide","onKeyDown","Provider","_default"],"sources":["@wordpress/components/src/custom-select-control-v2/custom-select.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { createContext, useCallback, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '..';\nimport * as Styled from './styles';\nimport type {\n\tCustomSelectContext as CustomSelectContextType,\n\tCustomSelectStore,\n\tCustomSelectButtonProps,\n\tCustomSelectButtonSize,\n\t_CustomSelectInternalProps,\n\t_CustomSelectProps,\n} from './types';\nimport InputBase from '../input-control/input-base';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport BaseControl from '../base-control';\n\nexport const CustomSelectContext =\n\tcreateContext< CustomSelectContextType >( undefined );\n\nfunction defaultRenderSelectedValue(\n\tvalue: CustomSelectButtonProps[ 'value' ]\n) {\n\tconst isValueEmpty = Array.isArray( value )\n\t\t? value.length === 0\n\t\t: value === undefined || value === null;\n\n\tif ( isValueEmpty ) {\n\t\treturn __( 'Select an item' );\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.length === 1\n\t\t\t? value[ 0 ]\n\t\t\t: // translators: %s: number of items selected (it will always be 2 or more items)\n\t\t\t sprintf( __( '%s items selected' ), value.length );\n\t}\n\n\treturn value;\n}\n\nconst CustomSelectButton = ( {\n\trenderSelectedValue,\n\tsize = 'default',\n\tstore,\n\t...restProps\n}: Omit<\n\tReact.ComponentProps< typeof Ariakit.Select > &\n\t\tCustomSelectButtonProps &\n\t\tCustomSelectButtonSize &\n\t\tCustomSelectStore,\n\t'onChange'\n> ) => {\n\tconst { value: currentValue } = store.useState();\n\n\tconst computedRenderSelectedValue = useMemo(\n\t\t() => renderSelectedValue ?? defaultRenderSelectedValue,\n\t\t[ renderSelectedValue ]\n\t);\n\n\treturn (\n\t\t<Styled.Select\n\t\t\t{ ...restProps }\n\t\t\tsize={ size }\n\t\t\thasCustomRenderProp={ !! renderSelectedValue }\n\t\t\tstore={ store }\n\t\t>\n\t\t\t{ computedRenderSelectedValue( currentValue ) }\n\t\t</Styled.Select>\n\t);\n};\n\nfunction _CustomSelect(\n\tprops: _CustomSelectInternalProps &\n\t\t_CustomSelectProps &\n\t\tCustomSelectStore &\n\t\tCustomSelectButtonSize\n) {\n\tconst {\n\t\tchildren,\n\t\thideLabelFromVision = false,\n\t\tlabel,\n\t\tsize,\n\t\tstore,\n\t\tclassName,\n\t\tisLegacy = false,\n\t\t...restProps\n\t} = props;\n\n\tconst onSelectPopoverKeyDown: React.KeyboardEventHandler< HTMLDivElement > =\n\t\tuseCallback(\n\t\t\t( e ) => {\n\t\t\t\tif ( isLegacy ) {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t},\n\t\t\t[ isLegacy ]\n\t\t);\n\n\tconst contextValue = useMemo( () => ( { store, size } ), [ store, size ] );\n\n\treturn (\n\t\t// Where should `restProps` be forwarded to?\n\t\t<div className={ className }>\n\t\t\t<Ariakit.SelectLabel\n\t\t\t\tstore={ store }\n\t\t\t\trender={\n\t\t\t\t\thideLabelFromVision ? (\n\t\t\t\t\t\t// @ts-expect-error `children` are passed via the render prop\n\t\t\t\t\t\t<VisuallyHidden />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// @ts-expect-error `children` are passed via the render prop\n\t\t\t\t\t\t<BaseControl.VisualLabel as=\"div\" />\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</Ariakit.SelectLabel>\n\t\t\t<InputBase\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ <SelectControlChevronDown /> }\n\t\t\t>\n\t\t\t\t<CustomSelectButton\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tsize={ size }\n\t\t\t\t\tstore={ store }\n\t\t\t\t\t// Match legacy behavior (move selection rather than open the popover)\n\t\t\t\t\tshowOnKeyDown={ ! isLegacy }\n\t\t\t\t/>\n\t\t\t\t<Styled.SelectPopover\n\t\t\t\t\tgutter={ 12 }\n\t\t\t\t\tstore={ store }\n\t\t\t\t\tsameWidth\n\t\t\t\t\tslide={ false }\n\t\t\t\t\tonKeyDown={ onSelectPopoverKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<CustomSelectContext.Provider value={ contextValue }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</CustomSelectContext.Provider>\n\t\t\t\t</Styled.SelectPopover>\n\t\t\t</InputBase>\n\t\t</div>\n\t);\n}\n\nexport default _CustomSelect;\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KA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AM;QACb4B,MAAM,eAAG,IAAA/D,WAAA,CAAA0C,GAAA,EAAC5C,YAAA,CAAAS,OAAwB,IAAE,CAAG;QAAAsC,QAAA,gBAEvC,IAAA7C,WAAA,CAAA0C,GAAA,EAACT,kBAAkB;UAAA,GACbI,SAAS;UACdF,IAAI,EAAGA,IAAM;UACbC,KAAK,EAAGA;UACR;UAAA;UACA4B,aAAa,EAAG,CAAEb;QAAU,CAC5B,CAAC,eACF,IAAAnD,WAAA,CAAA0C,GAAA,EAAC/C,MAAM,CAACsE,aAAa;UACpBC,MAAM,EAAG,EAAI;UACb9B,KAAK,EAAGA,KAAO;UACf+B,SAAS;UACTC,KAAK,EAAG,KAAO;UACfC,SAAS,EAAGjB,sBAAwB;UAAAP,QAAA,eAEpC,IAAA7C,WAAA,CAAA0C,GAAA,EAACrB,mBAAmB,CAACiD,QAAQ;YAAC5C,KAAK,EAAG6B,YAAc;YAAAV,QAAA,EACjDA;UAAQ,CACmB;QAAC,CACV,CAAC;MAAA,CACb,CAAC;IAAA,CACR;EAAC;AAER;AAAC,IAAA0B,QAAA,GAAAjD,OAAA,CAAAf,OAAA,GAEcuC,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_element","_i18n","_","Styled","_inputBase","_interopRequireDefault","_chevronDown","_baseControl","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CustomSelectContext","exports","createContext","undefined","defaultRenderSelectedValue","value","isValueEmpty","Array","isArray","length","__","sprintf","CustomSelectButton","renderSelectedValue","size","store","restProps","currentValue","useState","computedRenderSelectedValue","useMemo","jsx","Select","hasCustomRenderProp","children","_CustomSelect","props","hideLabelFromVision","label","className","isLegacy","onSelectPopoverKeyDown","useCallback","stopPropagation","contextValue","jsxs","SelectLabel","render","VisuallyHidden","VisualLabel","as","__next40pxDefaultSize","suffix","showOnKeyDown","SelectPopover","gutter","sameWidth","slide","onKeyDown","flip","Provider","_default"],"sources":["@wordpress/components/src/custom-select-control-v2/custom-select.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { createContext, useCallback, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '..';\nimport * as Styled from './styles';\nimport type {\n\tCustomSelectContext as CustomSelectContextType,\n\tCustomSelectStore,\n\tCustomSelectButtonProps,\n\tCustomSelectButtonSize,\n\t_CustomSelectInternalProps,\n\t_CustomSelectProps,\n} from './types';\nimport InputBase from '../input-control/input-base';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport BaseControl from '../base-control';\n\nexport const CustomSelectContext =\n\tcreateContext< CustomSelectContextType >( undefined );\n\nfunction defaultRenderSelectedValue(\n\tvalue: CustomSelectButtonProps[ 'value' ]\n) {\n\tconst isValueEmpty = Array.isArray( value )\n\t\t? value.length === 0\n\t\t: value === undefined || value === null;\n\n\tif ( isValueEmpty ) {\n\t\treturn __( 'Select an item' );\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.length === 1\n\t\t\t? value[ 0 ]\n\t\t\t: // translators: %s: number of items selected (it will always be 2 or more items)\n\t\t\t sprintf( __( '%s items selected' ), value.length );\n\t}\n\n\treturn value;\n}\n\nconst CustomSelectButton = ( {\n\trenderSelectedValue,\n\tsize = 'default',\n\tstore,\n\t...restProps\n}: Omit<\n\tReact.ComponentProps< typeof Ariakit.Select > &\n\t\tCustomSelectButtonProps &\n\t\tCustomSelectButtonSize &\n\t\tCustomSelectStore,\n\t'onChange'\n> ) => {\n\tconst { value: currentValue } = store.useState();\n\n\tconst computedRenderSelectedValue = useMemo(\n\t\t() => renderSelectedValue ?? defaultRenderSelectedValue,\n\t\t[ renderSelectedValue ]\n\t);\n\n\treturn (\n\t\t<Styled.Select\n\t\t\t{ ...restProps }\n\t\t\tsize={ size }\n\t\t\thasCustomRenderProp={ !! renderSelectedValue }\n\t\t\tstore={ store }\n\t\t>\n\t\t\t{ computedRenderSelectedValue( currentValue ) }\n\t\t</Styled.Select>\n\t);\n};\n\nfunction _CustomSelect(\n\tprops: _CustomSelectInternalProps &\n\t\t_CustomSelectProps &\n\t\tCustomSelectStore &\n\t\tCustomSelectButtonSize\n) {\n\tconst {\n\t\tchildren,\n\t\thideLabelFromVision = false,\n\t\tlabel,\n\t\tsize,\n\t\tstore,\n\t\tclassName,\n\t\tisLegacy = false,\n\t\t...restProps\n\t} = props;\n\n\tconst onSelectPopoverKeyDown: React.KeyboardEventHandler< HTMLDivElement > =\n\t\tuseCallback(\n\t\t\t( e ) => {\n\t\t\t\tif ( isLegacy ) {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t},\n\t\t\t[ isLegacy ]\n\t\t);\n\n\tconst contextValue = useMemo( () => ( { store, size } ), [ store, size ] );\n\n\treturn (\n\t\t// Where should `restProps` be forwarded to?\n\t\t<div className={ className }>\n\t\t\t<Ariakit.SelectLabel\n\t\t\t\tstore={ store }\n\t\t\t\trender={\n\t\t\t\t\thideLabelFromVision ? (\n\t\t\t\t\t\t// @ts-expect-error `children` are passed via the render prop\n\t\t\t\t\t\t<VisuallyHidden />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// @ts-expect-error `children` are passed via the render prop\n\t\t\t\t\t\t<BaseControl.VisualLabel as=\"div\" />\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</Ariakit.SelectLabel>\n\t\t\t<InputBase\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ <SelectControlChevronDown /> }\n\t\t\t>\n\t\t\t\t<CustomSelectButton\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tsize={ size }\n\t\t\t\t\tstore={ store }\n\t\t\t\t\t// Match legacy behavior (move selection rather than open the popover)\n\t\t\t\t\tshowOnKeyDown={ ! isLegacy }\n\t\t\t\t/>\n\t\t\t\t<Styled.SelectPopover\n\t\t\t\t\tgutter={ 12 }\n\t\t\t\t\tstore={ store }\n\t\t\t\t\tsameWidth\n\t\t\t\t\tslide={ false }\n\t\t\t\t\tonKeyDown={ onSelectPopoverKeyDown }\n\t\t\t\t\t// Match legacy behavior\n\t\t\t\t\tflip={ ! isLegacy }\n\t\t\t\t>\n\t\t\t\t\t<CustomSelectContext.Provider value={ contextValue }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</CustomSelectContext.Provider>\n\t\t\t\t</Styled.SelectPopover>\n\t\t\t</InputBase>\n\t\t</div>\n\t);\n}\n\nexport default _CustomSelect;\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,CAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAL,uBAAA,CAAAC,OAAA;AASA,IAAAK,UAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,YAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,YAAA,GAAAF,sBAAA,CAAAN,OAAA;AAA0C,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAA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b,CAAC;IAAA,CACR;EAAC;AAER;AAAC,IAAA2B,QAAA,GAAAlD,OAAA,CAAAf,OAAA,GAEcuC,aAAa","ignoreList":[]}
@@ -4,11 +4,39 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function () {
10
- return _defaultComponent.default;
11
- }
12
- });
13
- var _defaultComponent = _interopRequireDefault(require("./default-component"));
7
+ exports.default = void 0;
8
+ var Ariakit = _interopRequireWildcard(require("@ariakit/react"));
9
+ var _customSelect = _interopRequireDefault(require("./custom-select"));
10
+ var _item = _interopRequireDefault(require("./item"));
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
+ /**
15
+ * External dependencies
16
+ */
17
+
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+
22
+ function CustomSelectControlV2(props) {
23
+ const {
24
+ defaultValue,
25
+ onChange,
26
+ value,
27
+ ...restProps
28
+ } = props;
29
+ // Forward props + store from v2 implementation
30
+ const store = Ariakit.useSelectStore({
31
+ setValue: nextValue => onChange?.(nextValue),
32
+ defaultValue,
33
+ value
34
+ });
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_customSelect.default, {
36
+ ...restProps,
37
+ store: store
38
+ });
39
+ }
40
+ CustomSelectControlV2.Item = _item.default;
41
+ var _default = exports.default = CustomSelectControlV2;
14
42
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_defaultComponent","_interopRequireDefault","require"],"sources":["@wordpress/components/src/custom-select-control-v2/index.tsx"],"sourcesContent":["/**\n * Internal dependencies\n */\nexport { default } from './default-component';\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_customSelect","_interopRequireDefault","_item","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CustomSelectControlV2","props","defaultValue","onChange","value","restProps","store","useSelectStore","setValue","nextValue","jsx","Item","_default","exports"],"sources":["@wordpress/components/src/custom-select-control-v2/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n/**\n * Internal dependencies\n */\nimport _CustomSelect from './custom-select';\nimport type { CustomSelectProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport Item from './item';\n\nfunction CustomSelectControlV2(\n\tprops: WordPressComponentProps< CustomSelectProps, 'button', false >\n) {\n\tconst { defaultValue, onChange, value, ...restProps } = props;\n\t// Forward props + store from v2 implementation\n\tconst store = Ariakit.useSelectStore( {\n\t\tsetValue: ( nextValue ) => onChange?.( nextValue ),\n\t\tdefaultValue,\n\t\tvalue,\n\t} );\n\n\treturn <_CustomSelect { ...restProps } store={ store } />;\n}\n\nCustomSelectControlV2.Item = Item;\n\nexport default CustomSelectControlV2;\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,KAAA,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