@wordpress/components 28.2.0 → 28.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1329) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/CONTRIBUTING.md +1 -1
  3. package/build/animation/index.js.map +1 -1
  4. package/build/autocomplete/autocompleter-ui.js +1 -0
  5. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  6. package/build/autocomplete/index.js.map +1 -1
  7. package/build/autocomplete/types.js.map +1 -1
  8. package/build/base-control/index.js +14 -7
  9. package/build/base-control/index.js.map +1 -1
  10. package/build/base-control/types.js.map +1 -1
  11. package/build/border-box-control/border-box-control-visualizer/component.js +0 -4
  12. package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  13. package/build/button/index.js +14 -10
  14. package/build/button/index.js.map +1 -1
  15. package/build/button/types.js.map +1 -1
  16. package/build/checkbox-control/index.js +1 -0
  17. package/build/checkbox-control/index.js.map +1 -1
  18. package/build/color-picker/component.js +8 -17
  19. package/build/color-picker/component.js.map +1 -1
  20. package/build/combobox-control/index.js +13 -1
  21. package/build/combobox-control/index.js.map +1 -1
  22. package/build/composite/current/index.js.map +1 -1
  23. package/build/custom-select-control/index.js +125 -174
  24. package/build/custom-select-control/index.js.map +1 -1
  25. package/build/custom-select-control/types.js +6 -0
  26. package/build/custom-select-control/types.js.map +1 -0
  27. package/build/custom-select-control-v2/custom-select.js +60 -33
  28. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  29. package/build/custom-select-control-v2/index.js +35 -7
  30. package/build/custom-select-control-v2/index.js.map +1 -1
  31. package/build/custom-select-control-v2/item.js +2 -0
  32. package/build/custom-select-control-v2/item.js.map +1 -1
  33. package/build/custom-select-control-v2/styles.js +106 -78
  34. package/build/custom-select-control-v2/styles.js.map +1 -1
  35. package/build/custom-select-control-v2/types.js.map +1 -1
  36. package/build/date-time/date-time/index.js +3 -1
  37. package/build/date-time/date-time/index.js.map +1 -1
  38. package/build/date-time/index.js +7 -0
  39. package/build/date-time/index.js.map +1 -1
  40. package/build/date-time/time/index.js +62 -145
  41. package/build/date-time/time/index.js.map +1 -1
  42. package/build/date-time/time-input/index.js +159 -0
  43. package/build/date-time/time-input/index.js.map +1 -0
  44. package/build/date-time/types.js.map +1 -1
  45. package/build/date-time/utils.js +64 -0
  46. package/build/date-time/utils.js.map +1 -1
  47. package/build/disclosure/index.js +0 -1
  48. package/build/disclosure/index.js.map +1 -1
  49. package/build/divider/component.js +0 -1
  50. package/build/divider/component.js.map +1 -1
  51. package/build/divider/types.js.map +1 -1
  52. package/build/dropdown-menu/index.js +1 -0
  53. package/build/dropdown-menu/index.js.map +1 -1
  54. package/build/dropdown-menu-v2/index.js +0 -1
  55. package/build/dropdown-menu-v2/index.js.map +1 -1
  56. package/build/dropdown-menu-v2/styles.js +15 -16
  57. package/build/dropdown-menu-v2/styles.js.map +1 -1
  58. package/build/dropdown-menu-v2/types.js.map +1 -1
  59. package/build/focal-point-picker/index.js +1 -0
  60. package/build/focal-point-picker/index.js.map +1 -1
  61. package/build/font-size-picker/font-size-picker-select.js +2 -2
  62. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  63. package/build/font-size-picker/index.js +37 -25
  64. package/build/font-size-picker/index.js.map +1 -1
  65. package/build/font-size-picker/types.js.map +1 -1
  66. package/build/font-size-picker/utils.js +0 -4
  67. package/build/font-size-picker/utils.js.map +1 -1
  68. package/build/form-token-field/index.js +8 -0
  69. package/build/form-token-field/index.js.map +1 -1
  70. package/build/form-token-field/token.js +4 -1
  71. package/build/form-token-field/token.js.map +1 -1
  72. package/build/higher-order/with-spoken-messages/index.js +1 -2
  73. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  74. package/build/index.js +2 -2
  75. package/build/index.js.map +1 -1
  76. package/build/menu-items-choice/types.js.map +1 -1
  77. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  78. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  79. package/build/popover/index.js +0 -4
  80. package/build/popover/index.js.map +1 -1
  81. package/build/popover/utils.js +0 -1
  82. package/build/popover/utils.js.map +1 -1
  83. package/build/private-apis.js +0 -6
  84. package/build/private-apis.js.map +1 -1
  85. package/build/progress-bar/styles.js +19 -13
  86. package/build/progress-bar/styles.js.map +1 -1
  87. package/build/radio-control/index.js +1 -1
  88. package/build/radio-control/index.js.map +1 -1
  89. package/build/radio-group/context.js +0 -1
  90. package/build/radio-group/context.js.map +1 -1
  91. package/build/radio-group/index.js +0 -1
  92. package/build/radio-group/index.js.map +1 -1
  93. package/build/radio-group/radio.js +0 -1
  94. package/build/radio-group/radio.js.map +1 -1
  95. package/build/range-control/index.js +5 -1
  96. package/build/range-control/index.js.map +1 -1
  97. package/build/range-control/styles/range-control-styles.js +34 -28
  98. package/build/range-control/styles/range-control-styles.js.map +1 -1
  99. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  100. package/build/select-control/index.js +6 -2
  101. package/build/select-control/index.js.map +1 -1
  102. package/build/select-control/styles/select-control-styles.js +49 -13
  103. package/build/select-control/styles/select-control-styles.js.map +1 -1
  104. package/build/select-control/types.js.map +1 -1
  105. package/build/tab-panel/index.js +0 -1
  106. package/build/tab-panel/index.js.map +1 -1
  107. package/build/tabs/index.js +0 -1
  108. package/build/tabs/index.js.map +1 -1
  109. package/build/tabs/styles.js +3 -5
  110. package/build/tabs/styles.js.map +1 -1
  111. package/build/tabs/tablist.js +4 -78
  112. package/build/tabs/tablist.js.map +1 -1
  113. package/build/tabs/types.js.map +1 -1
  114. package/build/textarea-control/index.js +1 -0
  115. package/build/textarea-control/index.js.map +1 -1
  116. package/build/toggle-control/index.js +10 -4
  117. package/build/toggle-control/index.js.map +1 -1
  118. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +0 -2
  119. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  120. package/build/toggle-group-control/toggle-group-control/component.js +0 -2
  121. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  122. package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -4
  123. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  124. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  125. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  126. package/build/toolbar/toolbar/toolbar-container.js +0 -1
  127. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  128. package/build/toolbar/toolbar/types.js.map +1 -1
  129. package/build/toolbar/toolbar-button/index.js +27 -19
  130. package/build/toolbar/toolbar-button/index.js.map +1 -1
  131. package/build/toolbar/toolbar-button/types.js.map +1 -1
  132. package/build/toolbar/toolbar-context/index.js +0 -1
  133. package/build/toolbar/toolbar-context/index.js.map +1 -1
  134. package/build/toolbar/toolbar-item/index.js +1 -1
  135. package/build/toolbar/toolbar-item/index.js.map +1 -1
  136. package/build/tools-panel/tools-panel-header/component.js +1 -1
  137. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  138. package/build/tooltip/index.js +3 -2
  139. package/build/tooltip/index.js.map +1 -1
  140. package/build/tooltip/types.js.map +1 -1
  141. package/build/tree-select/index.js +1 -0
  142. package/build/tree-select/index.js.map +1 -1
  143. package/build/unit-control/index.js +3 -3
  144. package/build/unit-control/index.js.map +1 -1
  145. package/build/unit-control/styles/unit-control-styles.js +7 -7
  146. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  147. package/build/utils/element-rect.js +157 -0
  148. package/build/utils/element-rect.js.map +1 -0
  149. package/build/utils/hooks/use-event.js +41 -0
  150. package/build/utils/hooks/use-event.js.map +1 -0
  151. package/build/utils/hooks/use-on-value-update.js +46 -0
  152. package/build/utils/hooks/use-on-value-update.js.map +1 -0
  153. package/build/utils/hooks/use-update-effect.js +4 -1
  154. package/build/utils/hooks/use-update-effect.js.map +1 -1
  155. package/build-module/animation/index.js +0 -1
  156. package/build-module/animation/index.js.map +1 -1
  157. package/build-module/autocomplete/autocompleter-ui.js +1 -0
  158. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  159. package/build-module/autocomplete/index.js.map +1 -1
  160. package/build-module/autocomplete/types.js.map +1 -1
  161. package/build-module/base-control/index.js +13 -6
  162. package/build-module/base-control/index.js.map +1 -1
  163. package/build-module/base-control/types.js.map +1 -1
  164. package/build-module/border-box-control/border-box-control-visualizer/component.js +0 -4
  165. package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  166. package/build-module/button/index.js +14 -10
  167. package/build-module/button/index.js.map +1 -1
  168. package/build-module/button/types.js.map +1 -1
  169. package/build-module/checkbox-control/index.js +1 -0
  170. package/build-module/checkbox-control/index.js.map +1 -1
  171. package/build-module/color-picker/component.js +9 -18
  172. package/build-module/color-picker/component.js.map +1 -1
  173. package/build-module/combobox-control/index.js +13 -1
  174. package/build-module/combobox-control/index.js.map +1 -1
  175. package/build-module/composite/current/index.js +0 -3
  176. package/build-module/composite/current/index.js.map +1 -1
  177. package/build-module/custom-select-control/index.js +123 -173
  178. package/build-module/custom-select-control/index.js.map +1 -1
  179. package/build-module/custom-select-control/types.js +2 -0
  180. package/build-module/custom-select-control/types.js.map +1 -0
  181. package/build-module/custom-select-control-v2/custom-select.js +61 -35
  182. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  183. package/build-module/custom-select-control-v2/index.js +27 -1
  184. package/build-module/custom-select-control-v2/index.js.map +1 -1
  185. package/build-module/custom-select-control-v2/item.js +2 -0
  186. package/build-module/custom-select-control-v2/item.js.map +1 -1
  187. package/build-module/custom-select-control-v2/styles.js +105 -77
  188. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  189. package/build-module/custom-select-control-v2/types.js.map +1 -1
  190. package/build-module/date-time/date-time/index.js +4 -1
  191. package/build-module/date-time/date-time/index.js.map +1 -1
  192. package/build-module/date-time/index.js +2 -1
  193. package/build-module/date-time/index.js.map +1 -1
  194. package/build-module/date-time/time/index.js +65 -149
  195. package/build-module/date-time/time/index.js.map +1 -1
  196. package/build-module/date-time/time-input/index.js +151 -0
  197. package/build-module/date-time/time-input/index.js.map +1 -0
  198. package/build-module/date-time/types.js.map +1 -1
  199. package/build-module/date-time/utils.js +61 -0
  200. package/build-module/date-time/utils.js.map +1 -1
  201. package/build-module/disclosure/index.js +0 -1
  202. package/build-module/disclosure/index.js.map +1 -1
  203. package/build-module/divider/component.js +0 -1
  204. package/build-module/divider/component.js.map +1 -1
  205. package/build-module/divider/types.js.map +1 -1
  206. package/build-module/dropdown-menu/index.js +1 -0
  207. package/build-module/dropdown-menu/index.js.map +1 -1
  208. package/build-module/dropdown-menu-v2/index.js +0 -1
  209. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  210. package/build-module/dropdown-menu-v2/styles.js +14 -15
  211. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  212. package/build-module/dropdown-menu-v2/types.js.map +1 -1
  213. package/build-module/focal-point-picker/index.js +1 -0
  214. package/build-module/focal-point-picker/index.js.map +1 -1
  215. package/build-module/font-size-picker/font-size-picker-select.js +2 -2
  216. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  217. package/build-module/font-size-picker/index.js +37 -25
  218. package/build-module/font-size-picker/index.js.map +1 -1
  219. package/build-module/font-size-picker/types.js.map +1 -1
  220. package/build-module/font-size-picker/utils.js +0 -4
  221. package/build-module/font-size-picker/utils.js.map +1 -1
  222. package/build-module/form-token-field/index.js +8 -0
  223. package/build-module/form-token-field/index.js.map +1 -1
  224. package/build-module/form-token-field/token.js +4 -1
  225. package/build-module/form-token-field/token.js.map +1 -1
  226. package/build-module/higher-order/with-spoken-messages/index.js +1 -2
  227. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  228. package/build-module/index.js +1 -1
  229. package/build-module/index.js.map +1 -1
  230. package/build-module/menu-items-choice/types.js.map +1 -1
  231. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  232. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  233. package/build-module/popover/index.js +0 -3
  234. package/build-module/popover/index.js.map +1 -1
  235. package/build-module/popover/utils.js +0 -1
  236. package/build-module/popover/utils.js.map +1 -1
  237. package/build-module/private-apis.js +0 -6
  238. package/build-module/private-apis.js.map +1 -1
  239. package/build-module/progress-bar/styles.js +21 -13
  240. package/build-module/progress-bar/styles.js.map +1 -1
  241. package/build-module/radio-control/index.js +1 -1
  242. package/build-module/radio-control/index.js.map +1 -1
  243. package/build-module/radio-group/context.js +0 -1
  244. package/build-module/radio-group/context.js.map +1 -1
  245. package/build-module/radio-group/index.js +0 -1
  246. package/build-module/radio-group/index.js.map +1 -1
  247. package/build-module/radio-group/radio.js +0 -1
  248. package/build-module/radio-group/radio.js.map +1 -1
  249. package/build-module/range-control/index.js +5 -1
  250. package/build-module/range-control/index.js.map +1 -1
  251. package/build-module/range-control/styles/range-control-styles.js +34 -28
  252. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  253. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  254. package/build-module/select-control/index.js +7 -3
  255. package/build-module/select-control/index.js.map +1 -1
  256. package/build-module/select-control/styles/select-control-styles.js +47 -7
  257. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  258. package/build-module/select-control/types.js.map +1 -1
  259. package/build-module/tab-panel/index.js +0 -1
  260. package/build-module/tab-panel/index.js.map +1 -1
  261. package/build-module/tabs/index.js +0 -1
  262. package/build-module/tabs/index.js.map +1 -1
  263. package/build-module/tabs/styles.js +3 -4
  264. package/build-module/tabs/styles.js.map +1 -1
  265. package/build-module/tabs/tablist.js +4 -78
  266. package/build-module/tabs/tablist.js.map +1 -1
  267. package/build-module/tabs/types.js.map +1 -1
  268. package/build-module/textarea-control/index.js +1 -0
  269. package/build-module/textarea-control/index.js.map +1 -1
  270. package/build-module/toggle-control/index.js +10 -4
  271. package/build-module/toggle-control/index.js.map +1 -1
  272. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +0 -1
  273. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  274. package/build-module/toggle-group-control/toggle-group-control/component.js +0 -1
  275. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  276. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +3 -2
  277. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  278. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  279. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  280. package/build-module/toolbar/toolbar/toolbar-container.js +0 -1
  281. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  282. package/build-module/toolbar/toolbar/types.js.map +1 -1
  283. package/build-module/toolbar/toolbar-button/index.js +27 -19
  284. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  285. package/build-module/toolbar/toolbar-button/types.js.map +1 -1
  286. package/build-module/toolbar/toolbar-context/index.js +0 -1
  287. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  288. package/build-module/toolbar/toolbar-item/index.js +1 -1
  289. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  290. package/build-module/tools-panel/tools-panel-header/component.js +1 -1
  291. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  292. package/build-module/tooltip/index.js +3 -2
  293. package/build-module/tooltip/index.js.map +1 -1
  294. package/build-module/tooltip/types.js.map +1 -1
  295. package/build-module/tree-select/index.js +1 -0
  296. package/build-module/tree-select/index.js.map +1 -1
  297. package/build-module/unit-control/index.js +3 -3
  298. package/build-module/unit-control/index.js.map +1 -1
  299. package/build-module/unit-control/styles/unit-control-styles.js +7 -7
  300. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  301. package/build-module/utils/element-rect.js +147 -0
  302. package/build-module/utils/element-rect.js.map +1 -0
  303. package/build-module/utils/hooks/use-event.js +35 -0
  304. package/build-module/utils/hooks/use-event.js.map +1 -0
  305. package/build-module/utils/hooks/use-on-value-update.js +39 -0
  306. package/build-module/utils/hooks/use-on-value-update.js.map +1 -0
  307. package/build-module/utils/hooks/use-update-effect.js +4 -1
  308. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  309. package/build-style/style-rtl.css +80 -95
  310. package/build-style/style.css +80 -95
  311. package/build-types/alignment-matrix-control/cell.d.ts +0 -1
  312. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
  313. package/build-types/alignment-matrix-control/icon.d.ts +0 -1
  314. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
  315. package/build-types/alignment-matrix-control/index.d.ts +0 -1
  316. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  317. package/build-types/alignment-matrix-control/stories/index.story.d.ts +0 -1
  318. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  319. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +8 -9
  320. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +1 -1
  321. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +10 -11
  322. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
  323. package/build-types/angle-picker-control/angle-circle.d.ts +0 -1
  324. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  325. package/build-types/angle-picker-control/index.d.ts +0 -1
  326. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  327. package/build-types/angle-picker-control/stories/index.story.d.ts +0 -1
  328. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  329. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +7 -8
  330. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  331. package/build-types/animate/index.d.ts +0 -1
  332. package/build-types/animate/index.d.ts.map +1 -1
  333. package/build-types/animate/types.d.ts +0 -1
  334. package/build-types/animate/types.d.ts.map +1 -1
  335. package/build-types/animation/index.d.ts.map +1 -1
  336. package/build-types/autocomplete/autocompleter-ui.d.ts +0 -1
  337. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  338. package/build-types/autocomplete/index.d.ts +2 -3
  339. package/build-types/autocomplete/index.d.ts.map +1 -1
  340. package/build-types/autocomplete/types.d.ts +2 -3
  341. package/build-types/autocomplete/types.d.ts.map +1 -1
  342. package/build-types/base-control/hooks.d.ts +3 -4
  343. package/build-types/base-control/hooks.d.ts.map +1 -1
  344. package/build-types/base-control/index.d.ts +6 -21
  345. package/build-types/base-control/index.d.ts.map +1 -1
  346. package/build-types/base-control/stories/index.story.d.ts +0 -1
  347. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  348. package/build-types/base-control/styles/base-control-styles.d.ts +10 -11
  349. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  350. package/build-types/base-control/types.d.ts +1 -1
  351. package/build-types/border-box-control/border-box-control/component.d.ts +4 -5
  352. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  353. package/build-types/border-box-control/border-box-control/hook.d.ts +14 -16
  354. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  355. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts +0 -1
  356. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts.map +1 -1
  357. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +12 -14
  358. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  359. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +5 -6
  360. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  361. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +14 -16
  362. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  363. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts +1 -2
  364. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts.map +1 -1
  365. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +9 -11
  366. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  367. package/build-types/border-box-control/stories/index.story.d.ts +4 -5
  368. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  369. package/build-types/border-box-control/styles.d.ts +3 -3
  370. package/build-types/border-box-control/utils.d.ts.map +1 -1
  371. package/build-types/border-control/border-control/component.d.ts +14 -15
  372. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  373. package/build-types/border-control/border-control/hook.d.ts +17 -19
  374. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  375. package/build-types/border-control/border-control-dropdown/component.d.ts +6 -7
  376. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  377. package/build-types/border-control/border-control-dropdown/hook.d.ts +12 -14
  378. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  379. package/build-types/border-control/border-control-style-picker/component.d.ts +2 -3
  380. package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
  381. package/build-types/border-control/stories/index.story.d.ts +84 -85
  382. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  383. package/build-types/border-control/styles.d.ts +2 -2
  384. package/build-types/box-control/all-input-control.d.ts +0 -1
  385. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  386. package/build-types/box-control/axial-input-controls.d.ts +0 -1
  387. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  388. package/build-types/box-control/icon.d.ts +0 -1
  389. package/build-types/box-control/icon.d.ts.map +1 -1
  390. package/build-types/box-control/index.d.ts +0 -1
  391. package/build-types/box-control/index.d.ts.map +1 -1
  392. package/build-types/box-control/input-controls.d.ts +0 -1
  393. package/build-types/box-control/input-controls.d.ts.map +1 -1
  394. package/build-types/box-control/linked-button.d.ts +0 -1
  395. package/build-types/box-control/linked-button.d.ts.map +1 -1
  396. package/build-types/box-control/stories/index.story.d.ts +312 -350
  397. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  398. package/build-types/box-control/styles/box-control-icon-styles.d.ts +16 -17
  399. package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
  400. package/build-types/box-control/styles/box-control-styles.d.ts +44 -45
  401. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  402. package/build-types/box-control/types.d.ts +0 -1
  403. package/build-types/box-control/types.d.ts.map +1 -1
  404. package/build-types/button/deprecated.d.ts +69 -70
  405. package/build-types/button/deprecated.d.ts.map +1 -1
  406. package/build-types/button/index.d.ts.map +1 -1
  407. package/build-types/button/stories/e2e/index.story.d.ts +0 -1
  408. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  409. package/build-types/button/stories/index.story.d.ts +0 -1
  410. package/build-types/button/stories/index.story.d.ts.map +1 -1
  411. package/build-types/button/types.d.ts +36 -12
  412. package/build-types/button/types.d.ts.map +1 -1
  413. package/build-types/button-group/index.d.ts +0 -1
  414. package/build-types/button-group/index.d.ts.map +1 -1
  415. package/build-types/card/card/component.d.ts +5 -6
  416. package/build-types/card/card/component.d.ts.map +1 -1
  417. package/build-types/card/card/hook.d.ts +10 -12
  418. package/build-types/card/card/hook.d.ts.map +1 -1
  419. package/build-types/card/card-body/component.d.ts +4 -5
  420. package/build-types/card/card-body/component.d.ts.map +1 -1
  421. package/build-types/card/card-body/hook.d.ts +10 -12
  422. package/build-types/card/card-body/hook.d.ts.map +1 -1
  423. package/build-types/card/card-divider/component.d.ts +4 -5
  424. package/build-types/card/card-divider/component.d.ts.map +1 -1
  425. package/build-types/card/card-divider/hook.d.ts +15 -17
  426. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  427. package/build-types/card/card-footer/component.d.ts +5 -6
  428. package/build-types/card/card-footer/component.d.ts.map +1 -1
  429. package/build-types/card/card-footer/hook.d.ts +10 -12
  430. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  431. package/build-types/card/card-header/component.d.ts +4 -5
  432. package/build-types/card/card-header/component.d.ts.map +1 -1
  433. package/build-types/card/card-header/hook.d.ts +10 -12
  434. package/build-types/card/card-header/hook.d.ts.map +1 -1
  435. package/build-types/card/card-media/component.d.ts +0 -1
  436. package/build-types/card/card-media/component.d.ts.map +1 -1
  437. package/build-types/card/card-media/hook.d.ts +10 -12
  438. package/build-types/card/card-media/hook.d.ts.map +1 -1
  439. package/build-types/card/context.d.ts +0 -1
  440. package/build-types/card/context.d.ts.map +1 -1
  441. package/build-types/card/stories/index.story.d.ts +3 -22
  442. package/build-types/card/stories/index.story.d.ts.map +1 -1
  443. package/build-types/checkbox-control/index.d.ts +1 -1
  444. package/build-types/checkbox-control/index.d.ts.map +1 -1
  445. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +0 -1
  446. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  447. package/build-types/circular-option-picker/circular-option-picker-context.d.ts +0 -1
  448. package/build-types/circular-option-picker/circular-option-picker-context.d.ts.map +1 -1
  449. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +0 -1
  450. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -1
  451. package/build-types/circular-option-picker/circular-option-picker-option.d.ts +0 -1
  452. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  453. package/build-types/circular-option-picker/circular-option-picker.d.ts +0 -1
  454. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  455. package/build-types/clipboard-button/index.d.ts +0 -1
  456. package/build-types/clipboard-button/index.d.ts.map +1 -1
  457. package/build-types/color-indicator/index.d.ts +0 -1
  458. package/build-types/color-indicator/index.d.ts.map +1 -1
  459. package/build-types/color-palette/index.d.ts +0 -1
  460. package/build-types/color-palette/index.d.ts.map +1 -1
  461. package/build-types/color-palette/stories/index.story.d.ts +0 -1
  462. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  463. package/build-types/color-palette/styles.d.ts +5 -6
  464. package/build-types/color-palette/styles.d.ts.map +1 -1
  465. package/build-types/color-palette/utils.d.ts +1 -1
  466. package/build-types/color-palette/utils.d.ts.map +1 -1
  467. package/build-types/color-picker/color-copy-button.d.ts +0 -1
  468. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  469. package/build-types/color-picker/color-input.d.ts +0 -1
  470. package/build-types/color-picker/color-input.d.ts.map +1 -1
  471. package/build-types/color-picker/component.d.ts +5 -6
  472. package/build-types/color-picker/component.d.ts.map +1 -1
  473. package/build-types/color-picker/hex-input.d.ts +0 -1
  474. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  475. package/build-types/color-picker/hsl-input.d.ts +0 -1
  476. package/build-types/color-picker/hsl-input.d.ts.map +1 -1
  477. package/build-types/color-picker/input-with-slider.d.ts +0 -1
  478. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  479. package/build-types/color-picker/legacy-adapter.d.ts +0 -1
  480. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
  481. package/build-types/color-picker/picker.d.ts +0 -1
  482. package/build-types/color-picker/picker.d.ts.map +1 -1
  483. package/build-types/color-picker/rgb-input.d.ts +0 -1
  484. package/build-types/color-picker/rgb-input.d.ts.map +1 -1
  485. package/build-types/color-picker/stories/index.story.d.ts +2 -9
  486. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  487. package/build-types/color-picker/styles.d.ts +52 -53
  488. package/build-types/color-picker/styles.d.ts.map +1 -1
  489. package/build-types/combobox-control/index.d.ts +1 -1
  490. package/build-types/combobox-control/index.d.ts.map +1 -1
  491. package/build-types/combobox-control/stories/index.story.d.ts +41 -41
  492. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  493. package/build-types/combobox-control/styles.d.ts +1 -2
  494. package/build-types/combobox-control/styles.d.ts.map +1 -1
  495. package/build-types/combobox-control/types.d.ts +0 -1
  496. package/build-types/combobox-control/types.d.ts.map +1 -1
  497. package/build-types/composite/current/index.d.ts.map +1 -1
  498. package/build-types/composite/current/stories/utils.d.ts +0 -1
  499. package/build-types/composite/current/stories/utils.d.ts.map +1 -1
  500. package/build-types/composite/legacy/index.d.ts +0 -1
  501. package/build-types/composite/legacy/index.d.ts.map +1 -1
  502. package/build-types/composite/legacy/stories/utils.d.ts +0 -1
  503. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  504. package/build-types/confirm-dialog/component.d.ts +0 -1
  505. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  506. package/build-types/confirm-dialog/stories/index.story.d.ts +0 -1
  507. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  508. package/build-types/context/context-system-provider.d.ts +1 -1
  509. package/build-types/context/context-system-provider.d.ts.map +1 -1
  510. package/build-types/context/get-styled-class-name-from-key.d.ts +9 -1
  511. package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
  512. package/build-types/context/use-context-system.d.ts +1 -1
  513. package/build-types/context/use-context-system.d.ts.map +1 -1
  514. package/build-types/context/utils.d.ts.map +1 -1
  515. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +0 -1
  516. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  517. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +0 -1
  518. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  519. package/build-types/custom-gradient-picker/index.d.ts +0 -1
  520. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  521. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -3
  522. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -1
  523. package/build-types/custom-gradient-picker/types.d.ts +0 -1
  524. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  525. package/build-types/custom-gradient-picker/utils.d.ts.map +1 -1
  526. package/build-types/custom-select-control/index.d.ts +3 -2
  527. package/build-types/custom-select-control/index.d.ts.map +1 -1
  528. package/build-types/custom-select-control/stories/index.story.d.ts +6 -42
  529. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  530. package/build-types/custom-select-control/test/index.d.ts.map +1 -0
  531. package/build-types/custom-select-control/types.d.ts +122 -0
  532. package/build-types/custom-select-control/types.d.ts.map +1 -0
  533. package/build-types/custom-select-control-v2/custom-select.d.ts +2 -3
  534. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  535. package/build-types/custom-select-control-v2/index.d.ts +7 -4
  536. package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
  537. package/build-types/custom-select-control-v2/item.d.ts +0 -1
  538. package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
  539. package/build-types/custom-select-control-v2/stories/{default.story.d.ts → index.story.d.ts} +13 -11
  540. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -0
  541. package/build-types/custom-select-control-v2/styles.d.ts +39 -48
  542. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  543. package/build-types/custom-select-control-v2/types.d.ts +12 -108
  544. package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
  545. package/build-types/dashicon/index.d.ts +0 -1
  546. package/build-types/dashicon/index.d.ts.map +1 -1
  547. package/build-types/date-time/date/index.d.ts +0 -1
  548. package/build-types/date-time/date/index.d.ts.map +1 -1
  549. package/build-types/date-time/date/styles.d.ts +15 -16
  550. package/build-types/date-time/date/styles.d.ts.map +1 -1
  551. package/build-types/date-time/date-time/index.d.ts +1 -2
  552. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  553. package/build-types/date-time/date-time/styles.d.ts +3 -4
  554. package/build-types/date-time/date-time/styles.d.ts.map +1 -1
  555. package/build-types/date-time/index.d.ts +2 -1
  556. package/build-types/date-time/index.d.ts.map +1 -1
  557. package/build-types/date-time/stories/time-input.story.d.ts +12 -0
  558. package/build-types/date-time/stories/time-input.story.d.ts.map +1 -0
  559. package/build-types/date-time/time/index.d.ts +1 -2
  560. package/build-types/date-time/time/index.d.ts.map +1 -1
  561. package/build-types/date-time/time/styles.d.ts +64 -65
  562. package/build-types/date-time/time/styles.d.ts.map +1 -1
  563. package/build-types/date-time/time/timezone.d.ts +0 -1
  564. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  565. package/build-types/date-time/time-input/index.d.ts +4 -0
  566. package/build-types/date-time/time-input/index.d.ts.map +1 -0
  567. package/build-types/date-time/time-input/test/index.d.ts +2 -0
  568. package/build-types/date-time/time-input/test/index.d.ts.map +1 -0
  569. package/build-types/date-time/types.d.ts +53 -0
  570. package/build-types/date-time/types.d.ts.map +1 -1
  571. package/build-types/date-time/utils.d.ts +39 -0
  572. package/build-types/date-time/utils.d.ts.map +1 -1
  573. package/build-types/dimension-control/index.d.ts +0 -1
  574. package/build-types/dimension-control/index.d.ts.map +1 -1
  575. package/build-types/disabled/index.d.ts +0 -1
  576. package/build-types/disabled/index.d.ts.map +1 -1
  577. package/build-types/disabled/types.d.ts +0 -1
  578. package/build-types/disabled/types.d.ts.map +1 -1
  579. package/build-types/disclosure/index.d.ts +0 -1
  580. package/build-types/disclosure/index.d.ts.map +1 -1
  581. package/build-types/disclosure/types.d.ts +0 -1
  582. package/build-types/disclosure/types.d.ts.map +1 -1
  583. package/build-types/divider/component.d.ts +4 -5
  584. package/build-types/divider/component.d.ts.map +1 -1
  585. package/build-types/divider/styles.d.ts +6 -7
  586. package/build-types/divider/styles.d.ts.map +1 -1
  587. package/build-types/divider/types.d.ts.map +1 -1
  588. package/build-types/draggable/index.d.ts +0 -1
  589. package/build-types/draggable/index.d.ts.map +1 -1
  590. package/build-types/drop-zone/index.d.ts +0 -1
  591. package/build-types/drop-zone/index.d.ts.map +1 -1
  592. package/build-types/drop-zone/provider.d.ts +0 -1
  593. package/build-types/drop-zone/provider.d.ts.map +1 -1
  594. package/build-types/drop-zone/stories/index.story.d.ts +0 -1
  595. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  596. package/build-types/dropdown/dropdown-content-wrapper.d.ts +0 -1
  597. package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
  598. package/build-types/dropdown/index.d.ts +0 -1
  599. package/build-types/dropdown/index.d.ts.map +1 -1
  600. package/build-types/dropdown/stories/index.story.d.ts +5 -6
  601. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  602. package/build-types/dropdown/styles.d.ts +2 -3
  603. package/build-types/dropdown/styles.d.ts.map +1 -1
  604. package/build-types/dropdown-menu/index.d.ts +0 -1
  605. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  606. package/build-types/dropdown-menu/stories/index.story.d.ts +3 -4
  607. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  608. package/build-types/dropdown-menu-v2/index.d.ts +0 -1
  609. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  610. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  611. package/build-types/dropdown-menu-v2/styles.d.ts +41 -42
  612. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  613. package/build-types/dropdown-menu-v2/types.d.ts +0 -1
  614. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  615. package/build-types/duotone-picker/color-list-picker/index.d.ts +0 -1
  616. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  617. package/build-types/duotone-picker/custom-duotone-bar.d.ts +0 -1
  618. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
  619. package/build-types/duotone-picker/duotone-picker.d.ts +0 -1
  620. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  621. package/build-types/duotone-picker/duotone-swatch.d.ts +0 -1
  622. package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -1
  623. package/build-types/elevation/component.d.ts +0 -1
  624. package/build-types/elevation/component.d.ts.map +1 -1
  625. package/build-types/elevation/hook.d.ts +9 -11
  626. package/build-types/elevation/hook.d.ts.map +1 -1
  627. package/build-types/external-link/index.d.ts +0 -1
  628. package/build-types/external-link/index.d.ts.map +1 -1
  629. package/build-types/flex/context.d.ts +2 -3
  630. package/build-types/flex/context.d.ts.map +1 -1
  631. package/build-types/flex/flex/component.d.ts +0 -1
  632. package/build-types/flex/flex/component.d.ts.map +1 -1
  633. package/build-types/flex/flex/hook.d.ts +9 -11
  634. package/build-types/flex/flex/hook.d.ts.map +1 -1
  635. package/build-types/flex/flex-block/component.d.ts +0 -1
  636. package/build-types/flex/flex-block/component.d.ts.map +1 -1
  637. package/build-types/flex/flex-block/hook.d.ts +9 -11
  638. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  639. package/build-types/flex/flex-item/component.d.ts +0 -1
  640. package/build-types/flex/flex-item/component.d.ts.map +1 -1
  641. package/build-types/flex/flex-item/hook.d.ts +9 -11
  642. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  643. package/build-types/focal-point-picker/controls.d.ts +0 -1
  644. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  645. package/build-types/focal-point-picker/focal-point.d.ts +0 -1
  646. package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
  647. package/build-types/focal-point-picker/grid.d.ts +0 -1
  648. package/build-types/focal-point-picker/grid.d.ts.map +1 -1
  649. package/build-types/focal-point-picker/index.d.ts +1 -1
  650. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  651. package/build-types/focal-point-picker/media.d.ts +0 -1
  652. package/build-types/focal-point-picker/media.d.ts.map +1 -1
  653. package/build-types/focal-point-picker/stories/index.story.d.ts +32 -33
  654. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  655. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +26 -27
  656. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  657. package/build-types/focal-point-picker/styles/focal-point-style.d.ts +2 -3
  658. package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
  659. package/build-types/focusable-iframe/index.d.ts +0 -1
  660. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  661. package/build-types/font-size-picker/font-size-picker-select.d.ts +0 -1
  662. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  663. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts +0 -1
  664. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  665. package/build-types/font-size-picker/index.d.ts +0 -1
  666. package/build-types/font-size-picker/index.d.ts.map +1 -1
  667. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +0 -1
  668. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  669. package/build-types/font-size-picker/styles.d.ts +10 -11
  670. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  671. package/build-types/font-size-picker/types.d.ts +6 -5
  672. package/build-types/font-size-picker/types.d.ts.map +1 -1
  673. package/build-types/font-size-picker/utils.d.ts.map +1 -1
  674. package/build-types/form-file-upload/index.d.ts +0 -1
  675. package/build-types/form-file-upload/index.d.ts.map +1 -1
  676. package/build-types/form-file-upload/stories/index.story.d.ts +0 -1
  677. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  678. package/build-types/form-token-field/index.d.ts +0 -1
  679. package/build-types/form-token-field/index.d.ts.map +1 -1
  680. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  681. package/build-types/form-token-field/styles.d.ts +1 -2
  682. package/build-types/form-token-field/styles.d.ts.map +1 -1
  683. package/build-types/form-token-field/suggestions-list.d.ts +0 -1
  684. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  685. package/build-types/form-token-field/token.d.ts +0 -1
  686. package/build-types/form-token-field/token.d.ts.map +1 -1
  687. package/build-types/gradient-picker/index.d.ts +0 -1
  688. package/build-types/gradient-picker/index.d.ts.map +1 -1
  689. package/build-types/gradient-picker/types.d.ts +0 -1
  690. package/build-types/gradient-picker/types.d.ts.map +1 -1
  691. package/build-types/grid/component.d.ts +0 -1
  692. package/build-types/grid/component.d.ts.map +1 -1
  693. package/build-types/grid/hook.d.ts +9 -11
  694. package/build-types/grid/hook.d.ts.map +1 -1
  695. package/build-types/guide/icons.d.ts +0 -1
  696. package/build-types/guide/icons.d.ts.map +1 -1
  697. package/build-types/guide/index.d.ts +0 -1
  698. package/build-types/guide/index.d.ts.map +1 -1
  699. package/build-types/guide/page-control.d.ts +0 -1
  700. package/build-types/guide/page-control.d.ts.map +1 -1
  701. package/build-types/guide/page.d.ts +0 -1
  702. package/build-types/guide/page.d.ts.map +1 -1
  703. package/build-types/h-stack/component.d.ts +2 -3
  704. package/build-types/h-stack/component.d.ts.map +1 -1
  705. package/build-types/h-stack/hook.d.ts +9 -11
  706. package/build-types/h-stack/hook.d.ts.map +1 -1
  707. package/build-types/heading/component.d.ts +4 -5
  708. package/build-types/heading/component.d.ts.map +1 -1
  709. package/build-types/heading/hook.d.ts +9 -11
  710. package/build-types/heading/hook.d.ts.map +1 -1
  711. package/build-types/higher-order/navigate-regions/index.d.ts +1 -2
  712. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  713. package/build-types/higher-order/with-constrained-tabbing/index.d.ts +0 -1
  714. package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
  715. package/build-types/higher-order/with-fallback-styles/index.d.ts +3 -4
  716. package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -1
  717. package/build-types/higher-order/with-filters/index.d.ts +4 -5
  718. package/build-types/higher-order/with-filters/index.d.ts.map +1 -1
  719. package/build-types/higher-order/with-focus-outside/index.d.ts +0 -1
  720. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  721. package/build-types/higher-order/with-focus-return/index.d.ts +0 -1
  722. package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -1
  723. package/build-types/higher-order/with-notices/index.d.ts +0 -1
  724. package/build-types/higher-order/with-notices/index.d.ts.map +1 -1
  725. package/build-types/higher-order/with-notices/types.d.ts +0 -1
  726. package/build-types/higher-order/with-notices/types.d.ts.map +1 -1
  727. package/build-types/higher-order/with-spoken-messages/index.d.ts +1 -3
  728. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  729. package/build-types/index.d.ts +1 -1
  730. package/build-types/index.d.ts.map +1 -1
  731. package/build-types/input-control/backdrop.d.ts +0 -1
  732. package/build-types/input-control/backdrop.d.ts.map +1 -1
  733. package/build-types/input-control/input-base.d.ts +0 -1
  734. package/build-types/input-control/input-base.d.ts.map +1 -1
  735. package/build-types/input-control/input-field.d.ts +0 -1
  736. package/build-types/input-control/input-field.d.ts.map +1 -1
  737. package/build-types/input-control/input-prefix-wrapper.d.ts +0 -1
  738. package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
  739. package/build-types/input-control/input-suffix-wrapper.d.ts +0 -1
  740. package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
  741. package/build-types/input-control/label.d.ts +0 -1
  742. package/build-types/input-control/label.d.ts.map +1 -1
  743. package/build-types/input-control/reducer/reducer.d.ts +9 -9
  744. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  745. package/build-types/input-control/stories/index.story.d.ts +0 -1
  746. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  747. package/build-types/input-control/styles/input-control-styles.d.ts +13 -13
  748. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  749. package/build-types/isolated-event-container/index.d.ts +0 -1
  750. package/build-types/isolated-event-container/index.d.ts.map +1 -1
  751. package/build-types/item-group/context.d.ts +0 -1
  752. package/build-types/item-group/context.d.ts.map +1 -1
  753. package/build-types/item-group/item/component.d.ts +0 -1
  754. package/build-types/item-group/item/component.d.ts.map +1 -1
  755. package/build-types/item-group/item/hook.d.ts +10 -12
  756. package/build-types/item-group/item/hook.d.ts.map +1 -1
  757. package/build-types/item-group/item-group/component.d.ts +0 -1
  758. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  759. package/build-types/item-group/item-group/hook.d.ts +11 -13
  760. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  761. package/build-types/item-group/styles.d.ts +1 -1
  762. package/build-types/item-group/types.d.ts +0 -1
  763. package/build-types/item-group/types.d.ts.map +1 -1
  764. package/build-types/keyboard-shortcuts/index.d.ts +0 -1
  765. package/build-types/keyboard-shortcuts/index.d.ts.map +1 -1
  766. package/build-types/keyboard-shortcuts/types.d.ts +0 -1
  767. package/build-types/keyboard-shortcuts/types.d.ts.map +1 -1
  768. package/build-types/menu-group/index.d.ts +0 -1
  769. package/build-types/menu-group/index.d.ts.map +1 -1
  770. package/build-types/menu-item/index.d.ts +8 -9
  771. package/build-types/menu-item/index.d.ts.map +1 -1
  772. package/build-types/menu-item/stories/index.story.d.ts +32 -33
  773. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  774. package/build-types/menu-items-choice/index.d.ts +0 -1
  775. package/build-types/menu-items-choice/index.d.ts.map +1 -1
  776. package/build-types/menu-items-choice/types.d.ts +1 -1
  777. package/build-types/menu-items-choice/types.d.ts.map +1 -1
  778. package/build-types/modal/index.d.ts +0 -1
  779. package/build-types/modal/index.d.ts.map +1 -1
  780. package/build-types/navigable-container/container.d.ts +8 -8
  781. package/build-types/navigable-container/menu.d.ts +7 -7
  782. package/build-types/navigable-container/tabbable.d.ts +6 -6
  783. package/build-types/navigation/back-button/index.d.ts +0 -1
  784. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  785. package/build-types/navigation/context.d.ts +0 -1
  786. package/build-types/navigation/context.d.ts.map +1 -1
  787. package/build-types/navigation/group/context.d.ts +0 -1
  788. package/build-types/navigation/group/context.d.ts.map +1 -1
  789. package/build-types/navigation/group/index.d.ts +0 -1
  790. package/build-types/navigation/group/index.d.ts.map +1 -1
  791. package/build-types/navigation/index.d.ts +0 -1
  792. package/build-types/navigation/index.d.ts.map +1 -1
  793. package/build-types/navigation/item/base-content.d.ts +0 -1
  794. package/build-types/navigation/item/base-content.d.ts.map +1 -1
  795. package/build-types/navigation/item/base.d.ts +0 -1
  796. package/build-types/navigation/item/base.d.ts.map +1 -1
  797. package/build-types/navigation/item/index.d.ts +0 -1
  798. package/build-types/navigation/item/index.d.ts.map +1 -1
  799. package/build-types/navigation/menu/context.d.ts +0 -1
  800. package/build-types/navigation/menu/context.d.ts.map +1 -1
  801. package/build-types/navigation/menu/index.d.ts +0 -1
  802. package/build-types/navigation/menu/index.d.ts.map +1 -1
  803. package/build-types/navigation/menu/menu-title-search.d.ts +0 -1
  804. package/build-types/navigation/menu/menu-title-search.d.ts.map +1 -1
  805. package/build-types/navigation/menu/menu-title.d.ts +0 -1
  806. package/build-types/navigation/menu/menu-title.d.ts.map +1 -1
  807. package/build-types/navigation/menu/search-no-results-found.d.ts +0 -1
  808. package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -1
  809. package/build-types/navigation/styles/navigation-styles.d.ts +25 -26
  810. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  811. package/build-types/navigation/types.d.ts +0 -1
  812. package/build-types/navigation/types.d.ts.map +1 -1
  813. package/build-types/navigation/use-navigation-tree-nodes.d.ts +0 -1
  814. package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +1 -1
  815. package/build-types/navigator/context.d.ts +0 -1
  816. package/build-types/navigator/context.d.ts.map +1 -1
  817. package/build-types/navigator/navigator-back-button/component.d.ts +17 -18
  818. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  819. package/build-types/navigator/navigator-back-button/hook.d.ts +29 -31
  820. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  821. package/build-types/navigator/navigator-button/component.d.ts +18 -19
  822. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  823. package/build-types/navigator/navigator-button/hook.d.ts +29 -31
  824. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  825. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  826. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  827. package/build-types/navigator/navigator-screen/component.d.ts +0 -1
  828. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  829. package/build-types/navigator/navigator-to-parent-button/component.d.ts +17 -18
  830. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  831. package/build-types/navigator/stories/index.story.d.ts +4 -4
  832. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  833. package/build-types/notice/index.d.ts +0 -1
  834. package/build-types/notice/index.d.ts.map +1 -1
  835. package/build-types/notice/list.d.ts +0 -1
  836. package/build-types/notice/list.d.ts.map +1 -1
  837. package/build-types/number-control/index.d.ts +12 -13
  838. package/build-types/number-control/index.d.ts.map +1 -1
  839. package/build-types/number-control/stories/index.story.d.ts +12 -13
  840. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  841. package/build-types/number-control/styles/number-control-styles.d.ts +2 -3
  842. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  843. package/build-types/palette-edit/index.d.ts +0 -1
  844. package/build-types/palette-edit/index.d.ts.map +1 -1
  845. package/build-types/palette-edit/styles.d.ts +16 -18
  846. package/build-types/palette-edit/styles.d.ts.map +1 -1
  847. package/build-types/panel/body.d.ts +0 -1
  848. package/build-types/panel/body.d.ts.map +1 -1
  849. package/build-types/panel/header.d.ts +0 -1
  850. package/build-types/panel/header.d.ts.map +1 -1
  851. package/build-types/panel/index.d.ts +0 -1
  852. package/build-types/panel/index.d.ts.map +1 -1
  853. package/build-types/panel/row.d.ts +0 -1
  854. package/build-types/panel/row.d.ts.map +1 -1
  855. package/build-types/panel/types.d.ts +0 -1
  856. package/build-types/panel/types.d.ts.map +1 -1
  857. package/build-types/placeholder/index.d.ts +0 -1
  858. package/build-types/placeholder/index.d.ts.map +1 -1
  859. package/build-types/popover/index.d.ts +0 -1
  860. package/build-types/popover/index.d.ts.map +1 -1
  861. package/build-types/popover/overlay-middlewares.d.ts +1 -11
  862. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  863. package/build-types/popover/stories/e2e/index.story.d.ts +0 -1
  864. package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
  865. package/build-types/popover/stories/index.story.d.ts +6 -6
  866. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  867. package/build-types/popover/test/utils/index.d.ts +0 -1
  868. package/build-types/popover/test/utils/index.d.ts.map +1 -1
  869. package/build-types/popover/utils.d.ts +3 -3
  870. package/build-types/popover/utils.d.ts.map +1 -1
  871. package/build-types/private-apis.d.ts.map +1 -1
  872. package/build-types/progress-bar/index.d.ts +0 -1
  873. package/build-types/progress-bar/index.d.ts.map +1 -1
  874. package/build-types/progress-bar/stories/index.story.d.ts +0 -1
  875. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  876. package/build-types/progress-bar/styles.d.ts +6 -7
  877. package/build-types/progress-bar/styles.d.ts.map +1 -1
  878. package/build-types/query-controls/author-select.d.ts +0 -1
  879. package/build-types/query-controls/author-select.d.ts.map +1 -1
  880. package/build-types/query-controls/category-select.d.ts +0 -1
  881. package/build-types/query-controls/category-select.d.ts.map +1 -1
  882. package/build-types/query-controls/index.d.ts +0 -1
  883. package/build-types/query-controls/index.d.ts.map +1 -1
  884. package/build-types/radio-control/index.d.ts +0 -1
  885. package/build-types/radio-control/index.d.ts.map +1 -1
  886. package/build-types/radio-group/context.d.ts +2 -3
  887. package/build-types/radio-group/context.d.ts.map +1 -1
  888. package/build-types/radio-group/index.d.ts +0 -1
  889. package/build-types/radio-group/index.d.ts.map +1 -1
  890. package/build-types/radio-group/radio.d.ts +0 -1
  891. package/build-types/radio-group/radio.d.ts.map +1 -1
  892. package/build-types/radio-group/types.d.ts +0 -1
  893. package/build-types/radio-group/types.d.ts.map +1 -1
  894. package/build-types/range-control/index.d.ts +29 -29
  895. package/build-types/range-control/index.d.ts.map +1 -1
  896. package/build-types/range-control/input-range.d.ts +0 -1
  897. package/build-types/range-control/input-range.d.ts.map +1 -1
  898. package/build-types/range-control/mark.d.ts +0 -1
  899. package/build-types/range-control/mark.d.ts.map +1 -1
  900. package/build-types/range-control/rail.d.ts +0 -1
  901. package/build-types/range-control/rail.d.ts.map +1 -1
  902. package/build-types/range-control/styles/range-control-styles.d.ts +48 -49
  903. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  904. package/build-types/range-control/tooltip.d.ts +0 -1
  905. package/build-types/range-control/tooltip.d.ts.map +1 -1
  906. package/build-types/resizable-box/index.d.ts +7 -20
  907. package/build-types/resizable-box/index.d.ts.map +1 -1
  908. package/build-types/resizable-box/resize-tooltip/label.d.ts +0 -1
  909. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  910. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +7 -8
  911. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  912. package/build-types/resizable-box/resize-tooltip/utils.d.ts +2 -3
  913. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  914. package/build-types/resizable-box/stories/index.story.d.ts +32 -39
  915. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  916. package/build-types/responsive-wrapper/index.d.ts +0 -1
  917. package/build-types/responsive-wrapper/index.d.ts.map +1 -1
  918. package/build-types/responsive-wrapper/types.d.ts +0 -1
  919. package/build-types/responsive-wrapper/types.d.ts.map +1 -1
  920. package/build-types/sandbox/index.d.ts +0 -1
  921. package/build-types/sandbox/index.d.ts.map +1 -1
  922. package/build-types/sandbox/types.d.ts +0 -1
  923. package/build-types/sandbox/types.d.ts.map +1 -1
  924. package/build-types/scrollable/component.d.ts +0 -1
  925. package/build-types/scrollable/component.d.ts.map +1 -1
  926. package/build-types/scrollable/hook.d.ts +9 -11
  927. package/build-types/scrollable/hook.d.ts.map +1 -1
  928. package/build-types/search-control/index.d.ts +0 -1
  929. package/build-types/search-control/index.d.ts.map +1 -1
  930. package/build-types/search-control/stories/index.story.d.ts +0 -1
  931. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  932. package/build-types/search-control/styles.d.ts +3 -4
  933. package/build-types/search-control/styles.d.ts.map +1 -1
  934. package/build-types/search-control/types.d.ts +0 -1
  935. package/build-types/search-control/types.d.ts.map +1 -1
  936. package/build-types/select-control/chevron-down.d.ts +0 -1
  937. package/build-types/select-control/chevron-down.d.ts.map +1 -1
  938. package/build-types/select-control/index.d.ts +0 -1
  939. package/build-types/select-control/index.d.ts.map +1 -1
  940. package/build-types/select-control/stories/index.story.d.ts +1 -1
  941. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  942. package/build-types/select-control/styles/select-control-styles.d.ts +11 -7
  943. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  944. package/build-types/select-control/types.d.ts +6 -0
  945. package/build-types/select-control/types.d.ts.map +1 -1
  946. package/build-types/shortcut/index.d.ts +0 -1
  947. package/build-types/shortcut/index.d.ts.map +1 -1
  948. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -1
  949. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  950. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -1
  951. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  952. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -1
  953. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  954. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -2
  955. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  956. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  957. package/build-types/slot-fill/context.d.ts +0 -1
  958. package/build-types/slot-fill/context.d.ts.map +1 -1
  959. package/build-types/slot-fill/index.d.ts +4 -4
  960. package/build-types/slot-fill/index.d.ts.map +1 -1
  961. package/build-types/slot-fill/provider.d.ts +0 -1
  962. package/build-types/slot-fill/provider.d.ts.map +1 -1
  963. package/build-types/slot-fill/slot.d.ts +1 -2
  964. package/build-types/slot-fill/slot.d.ts.map +1 -1
  965. package/build-types/slot-fill/use-slot.d.ts +0 -1
  966. package/build-types/slot-fill/use-slot.d.ts.map +1 -1
  967. package/build-types/snackbar/index.d.ts +5 -6
  968. package/build-types/snackbar/index.d.ts.map +1 -1
  969. package/build-types/snackbar/list.d.ts +0 -1
  970. package/build-types/snackbar/list.d.ts.map +1 -1
  971. package/build-types/spacer/component.d.ts +0 -1
  972. package/build-types/spacer/component.d.ts.map +1 -1
  973. package/build-types/spacer/hook.d.ts +9 -11
  974. package/build-types/spacer/hook.d.ts.map +1 -1
  975. package/build-types/spinner/styles.d.ts +6 -7
  976. package/build-types/spinner/styles.d.ts.map +1 -1
  977. package/build-types/style-provider/index.d.ts +0 -1
  978. package/build-types/style-provider/index.d.ts.map +1 -1
  979. package/build-types/surface/component.d.ts +0 -1
  980. package/build-types/surface/component.d.ts.map +1 -1
  981. package/build-types/surface/hook.d.ts +10 -12
  982. package/build-types/surface/hook.d.ts.map +1 -1
  983. package/build-types/surface/types.d.ts +0 -1
  984. package/build-types/surface/types.d.ts.map +1 -1
  985. package/build-types/tab-panel/index.d.ts +0 -1
  986. package/build-types/tab-panel/index.d.ts.map +1 -1
  987. package/build-types/tab-panel/stories/index.story.d.ts +0 -1
  988. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  989. package/build-types/tabs/context.d.ts +0 -1
  990. package/build-types/tabs/context.d.ts.map +1 -1
  991. package/build-types/tabs/index.d.ts +0 -1
  992. package/build-types/tabs/index.d.ts.map +1 -1
  993. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  994. package/build-types/tabs/styles.d.ts +12 -13
  995. package/build-types/tabs/styles.d.ts.map +1 -1
  996. package/build-types/tabs/tab.d.ts +0 -1
  997. package/build-types/tabs/tab.d.ts.map +1 -1
  998. package/build-types/tabs/tablist.d.ts +0 -1
  999. package/build-types/tabs/tablist.d.ts.map +1 -1
  1000. package/build-types/tabs/tabpanel.d.ts +0 -1
  1001. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  1002. package/build-types/tabs/types.d.ts +0 -1
  1003. package/build-types/tabs/types.d.ts.map +1 -1
  1004. package/build-types/text/component.d.ts +0 -1
  1005. package/build-types/text/component.d.ts.map +1 -1
  1006. package/build-types/text/hook.d.ts +9 -9
  1007. package/build-types/text/stories/index.story.d.ts +0 -1
  1008. package/build-types/text/stories/index.story.d.ts.map +1 -1
  1009. package/build-types/text/utils.d.ts +0 -1
  1010. package/build-types/text/utils.d.ts.map +1 -1
  1011. package/build-types/text-control/index.d.ts +2 -3
  1012. package/build-types/text-control/index.d.ts.map +1 -1
  1013. package/build-types/text-highlight/index.d.ts +0 -1
  1014. package/build-types/text-highlight/index.d.ts.map +1 -1
  1015. package/build-types/textarea-control/index.d.ts +2 -2
  1016. package/build-types/textarea-control/index.d.ts.map +1 -1
  1017. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +2 -3
  1018. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
  1019. package/build-types/theme/color-algorithms.d.ts +1 -9
  1020. package/build-types/theme/color-algorithms.d.ts.map +1 -1
  1021. package/build-types/theme/index.d.ts +0 -1
  1022. package/build-types/theme/index.d.ts.map +1 -1
  1023. package/build-types/theme/stories/index.story.d.ts +0 -1
  1024. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  1025. package/build-types/theme/styles.d.ts +2 -3
  1026. package/build-types/theme/styles.d.ts.map +1 -1
  1027. package/build-types/tip/index.d.ts +0 -1
  1028. package/build-types/tip/index.d.ts.map +1 -1
  1029. package/build-types/toggle-control/index.d.ts.map +1 -1
  1030. package/build-types/toggle-control/stories/index.story.d.ts +0 -1
  1031. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  1032. package/build-types/toggle-group-control/context.d.ts +0 -1
  1033. package/build-types/toggle-group-control/context.d.ts.map +1 -1
  1034. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +0 -1
  1035. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  1036. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +0 -1
  1037. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  1038. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +8 -9
  1039. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  1040. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +5 -6
  1041. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  1042. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +0 -1
  1043. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  1044. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -2
  1045. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  1046. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +5 -6
  1047. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  1048. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +0 -1
  1049. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  1050. package/build-types/toolbar/stories/index.story.d.ts +0 -1
  1051. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  1052. package/build-types/toolbar/toolbar/index.d.ts +0 -1
  1053. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  1054. package/build-types/toolbar/toolbar/toolbar-container.d.ts +0 -1
  1055. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  1056. package/build-types/toolbar/toolbar/types.d.ts +6 -0
  1057. package/build-types/toolbar/toolbar/types.d.ts.map +1 -1
  1058. package/build-types/toolbar/toolbar-button/index.d.ts +3 -97
  1059. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  1060. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +0 -1
  1061. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
  1062. package/build-types/toolbar/toolbar-button/types.d.ts +18 -0
  1063. package/build-types/toolbar/toolbar-button/types.d.ts.map +1 -1
  1064. package/build-types/toolbar/toolbar-context/index.d.ts +0 -1
  1065. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  1066. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +0 -1
  1067. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  1068. package/build-types/toolbar/toolbar-group/index.d.ts +0 -1
  1069. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
  1070. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +0 -1
  1071. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
  1072. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +1 -2
  1073. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
  1074. package/build-types/toolbar/toolbar-item/index.d.ts +2 -5
  1075. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  1076. package/build-types/tools-panel/context.d.ts +0 -1
  1077. package/build-types/tools-panel/context.d.ts.map +1 -1
  1078. package/build-types/tools-panel/styles.d.ts +2 -3
  1079. package/build-types/tools-panel/styles.d.ts.map +1 -1
  1080. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  1081. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  1082. package/build-types/tools-panel/tools-panel/hook.d.ts +10 -12
  1083. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  1084. package/build-types/tools-panel/tools-panel-header/component.d.ts +0 -1
  1085. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  1086. package/build-types/tools-panel/tools-panel-header/hook.d.ts +11 -13
  1087. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  1088. package/build-types/tools-panel/tools-panel-item/component.d.ts +3 -4
  1089. package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
  1090. package/build-types/tools-panel/tools-panel-item/hook.d.ts +9 -11
  1091. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  1092. package/build-types/tooltip/index.d.ts +0 -1
  1093. package/build-types/tooltip/index.d.ts.map +1 -1
  1094. package/build-types/tooltip/stories/index.story.d.ts +0 -1
  1095. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  1096. package/build-types/tooltip/types.d.ts +4 -1
  1097. package/build-types/tooltip/types.d.ts.map +1 -1
  1098. package/build-types/tree-grid/cell.d.ts +0 -1
  1099. package/build-types/tree-grid/cell.d.ts.map +1 -1
  1100. package/build-types/tree-grid/index.d.ts +0 -1
  1101. package/build-types/tree-grid/index.d.ts.map +1 -1
  1102. package/build-types/tree-grid/item.d.ts +0 -1
  1103. package/build-types/tree-grid/item.d.ts.map +1 -1
  1104. package/build-types/tree-grid/roving-tab-index-context.d.ts +0 -1
  1105. package/build-types/tree-grid/roving-tab-index-context.d.ts.map +1 -1
  1106. package/build-types/tree-grid/roving-tab-index-item.d.ts +0 -1
  1107. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  1108. package/build-types/tree-grid/roving-tab-index.d.ts +0 -1
  1109. package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -1
  1110. package/build-types/tree-grid/row.d.ts +0 -1
  1111. package/build-types/tree-grid/row.d.ts.map +1 -1
  1112. package/build-types/tree-grid/stories/index.story.d.ts +0 -1
  1113. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  1114. package/build-types/tree-grid/types.d.ts +0 -1
  1115. package/build-types/tree-grid/types.d.ts.map +1 -1
  1116. package/build-types/tree-select/index.d.ts +1 -1
  1117. package/build-types/tree-select/index.d.ts.map +1 -1
  1118. package/build-types/truncate/component.d.ts +0 -1
  1119. package/build-types/truncate/component.d.ts.map +1 -1
  1120. package/build-types/truncate/hook.d.ts +9 -11
  1121. package/build-types/truncate/hook.d.ts.map +1 -1
  1122. package/build-types/truncate/utils.d.ts.map +1 -1
  1123. package/build-types/unit-control/index.d.ts +7 -8
  1124. package/build-types/unit-control/index.d.ts.map +1 -1
  1125. package/build-types/unit-control/styles/unit-control-styles.d.ts +17 -18
  1126. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  1127. package/build-types/unit-control/unit-select-control.d.ts +0 -1
  1128. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  1129. package/build-types/unit-control/utils.d.ts.map +1 -1
  1130. package/build-types/utils/breakpoint.d.ts +1 -10
  1131. package/build-types/utils/breakpoint.d.ts.map +1 -1
  1132. package/build-types/utils/element-rect.d.ts +111 -0
  1133. package/build-types/utils/element-rect.d.ts.map +1 -0
  1134. package/build-types/utils/font.d.ts +1 -6
  1135. package/build-types/utils/font.d.ts.map +1 -1
  1136. package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
  1137. package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
  1138. package/build-types/utils/hooks/use-controlled-value.d.ts +0 -1
  1139. package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
  1140. package/build-types/utils/hooks/use-event.d.ts +20 -0
  1141. package/build-types/utils/hooks/use-event.d.ts.map +1 -0
  1142. package/build-types/utils/hooks/use-on-value-update.d.ts +19 -0
  1143. package/build-types/utils/hooks/use-on-value-update.d.ts.map +1 -0
  1144. package/build-types/utils/hooks/use-update-effect.d.ts +2 -2
  1145. package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
  1146. package/build-types/utils/math.d.ts.map +1 -1
  1147. package/build-types/utils/rtl.d.ts +2 -2
  1148. package/build-types/utils/values.d.ts +2 -2
  1149. package/build-types/utils/values.d.ts.map +1 -1
  1150. package/build-types/utils/with-ignore-ime-events.d.ts +0 -1
  1151. package/build-types/utils/with-ignore-ime-events.d.ts.map +1 -1
  1152. package/build-types/v-stack/component.d.ts +2 -3
  1153. package/build-types/v-stack/component.d.ts.map +1 -1
  1154. package/build-types/v-stack/hook.d.ts +9 -11
  1155. package/build-types/v-stack/hook.d.ts.map +1 -1
  1156. package/build-types/v-stack/stories/index.story.d.ts +2 -3
  1157. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  1158. package/build-types/view/component.d.ts +0 -2
  1159. package/build-types/view/component.d.ts.map +1 -1
  1160. package/build-types/visually-hidden/component.d.ts +0 -1
  1161. package/build-types/visually-hidden/component.d.ts.map +1 -1
  1162. package/build-types/z-stack/component.d.ts +0 -1
  1163. package/build-types/z-stack/component.d.ts.map +1 -1
  1164. package/build-types/z-stack/styles.d.ts +4 -5
  1165. package/build-types/z-stack/styles.d.ts.map +1 -1
  1166. package/package.json +19 -20
  1167. package/src/animation/index.tsx +0 -1
  1168. package/src/autocomplete/README.md +2 -2
  1169. package/src/autocomplete/autocompleter-ui.tsx +1 -0
  1170. package/src/autocomplete/index.tsx +0 -1
  1171. package/src/autocomplete/types.ts +2 -3
  1172. package/src/base-control/README.md +1 -1
  1173. package/src/base-control/index.tsx +16 -6
  1174. package/src/base-control/stories/index.story.tsx +0 -1
  1175. package/src/base-control/types.ts +1 -1
  1176. package/src/border-box-control/border-box-control-visualizer/component.tsx +0 -5
  1177. package/src/button/README.md +14 -1
  1178. package/src/button/index.tsx +15 -11
  1179. package/src/button/stories/e2e/index.story.tsx +2 -1
  1180. package/src/button/test/index.tsx +34 -6
  1181. package/src/button/types.ts +36 -12
  1182. package/src/card/card/README.md +1 -1
  1183. package/src/card/stories/index.story.tsx +43 -42
  1184. package/src/checkbox-control/README.md +8 -0
  1185. package/src/checkbox-control/index.tsx +1 -0
  1186. package/src/checkbox-control/style.scss +3 -1
  1187. package/src/color-picker/component.tsx +12 -22
  1188. package/src/color-picker/stories/index.story.tsx +2 -22
  1189. package/src/combobox-control/README.md +9 -0
  1190. package/src/combobox-control/index.tsx +13 -0
  1191. package/src/combobox-control/test/index.tsx +127 -1
  1192. package/src/composite/current/index.ts +0 -2
  1193. package/src/custom-select-control/README.md +34 -32
  1194. package/src/custom-select-control/index.tsx +176 -0
  1195. package/src/custom-select-control/stories/index.story.tsx +26 -18
  1196. package/src/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.tsx +89 -57
  1197. package/src/custom-select-control/types.ts +123 -0
  1198. package/src/custom-select-control-v2/custom-select.tsx +59 -22
  1199. package/src/custom-select-control-v2/index.tsx +26 -1
  1200. package/src/custom-select-control-v2/item.tsx +5 -1
  1201. package/src/custom-select-control-v2/stories/{default.story.tsx → index.story.tsx} +1 -1
  1202. package/src/custom-select-control-v2/styles.ts +179 -84
  1203. package/src/custom-select-control-v2/test/index.tsx +35 -5
  1204. package/src/custom-select-control-v2/types.ts +18 -115
  1205. package/src/date-time/README.md +8 -0
  1206. package/src/date-time/date-time/index.tsx +2 -1
  1207. package/src/date-time/index.ts +2 -1
  1208. package/src/date-time/stories/time-input.story.tsx +36 -0
  1209. package/src/date-time/time/index.tsx +77 -194
  1210. package/src/date-time/time/test/index.tsx +61 -0
  1211. package/src/date-time/time-input/index.tsx +196 -0
  1212. package/src/date-time/time-input/test/index.tsx +171 -0
  1213. package/src/date-time/types.ts +63 -0
  1214. package/src/date-time/utils.ts +69 -0
  1215. package/src/dimension-control/test/__snapshots__/index.test.js.snap +120 -96
  1216. package/src/disabled/README.md +1 -1
  1217. package/src/disclosure/index.tsx +0 -1
  1218. package/src/divider/component.tsx +0 -1
  1219. package/src/divider/types.ts +0 -1
  1220. package/src/dropdown/stories/index.story.tsx +55 -50
  1221. package/src/dropdown-menu/index.tsx +1 -0
  1222. package/src/dropdown-menu/stories/index.story.tsx +52 -55
  1223. package/src/dropdown-menu-v2/index.tsx +0 -1
  1224. package/src/dropdown-menu-v2/stories/index.story.tsx +0 -12
  1225. package/src/dropdown-menu-v2/styles.ts +3 -4
  1226. package/src/dropdown-menu-v2/types.ts +0 -1
  1227. package/src/focal-point-picker/README.md +9 -0
  1228. package/src/focal-point-picker/index.tsx +1 -0
  1229. package/src/font-size-picker/README.md +1 -1
  1230. package/src/font-size-picker/font-size-picker-select.tsx +2 -2
  1231. package/src/font-size-picker/index.tsx +69 -65
  1232. package/src/font-size-picker/test/index.tsx +89 -21
  1233. package/src/font-size-picker/types.ts +6 -5
  1234. package/src/font-size-picker/utils.ts +0 -5
  1235. package/src/form-toggle/style.scss +14 -9
  1236. package/src/form-token-field/README.md +2 -1
  1237. package/src/form-token-field/index.tsx +9 -0
  1238. package/src/form-token-field/stories/index.story.tsx +2 -0
  1239. package/src/form-token-field/token.tsx +2 -0
  1240. package/src/higher-order/navigate-regions/style.scss +14 -14
  1241. package/src/higher-order/with-spoken-messages/index.tsx +1 -2
  1242. package/src/index.ts +1 -1
  1243. package/src/menu-items-choice/types.ts +2 -1
  1244. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  1245. package/src/navigator/stories/index.story.tsx +240 -242
  1246. package/src/notice/test/__snapshots__/index.tsx.snap +1 -1
  1247. package/src/palette-edit/test/index.tsx +1 -0
  1248. package/src/popover/index.tsx +0 -2
  1249. package/src/popover/stories/index.story.tsx +155 -153
  1250. package/src/popover/utils.ts +0 -1
  1251. package/src/private-apis.ts +0 -7
  1252. package/src/progress-bar/styles.ts +18 -9
  1253. package/src/radio-control/index.tsx +1 -1
  1254. package/src/radio-control/style.scss +6 -1
  1255. package/src/radio-group/context.tsx +0 -1
  1256. package/src/radio-group/index.tsx +0 -1
  1257. package/src/radio-group/radio.tsx +0 -1
  1258. package/src/range-control/README.md +8 -0
  1259. package/src/range-control/index.tsx +3 -0
  1260. package/src/range-control/styles/range-control-styles.ts +6 -2
  1261. package/src/resizable-box/resize-tooltip/README.md +1 -1
  1262. package/src/resizable-box/resize-tooltip/utils.ts +1 -1
  1263. package/src/select-control/README.md +8 -0
  1264. package/src/select-control/index.tsx +10 -4
  1265. package/src/select-control/stories/index.story.tsx +6 -0
  1266. package/src/select-control/styles/select-control-styles.ts +41 -7
  1267. package/src/select-control/types.ts +6 -0
  1268. package/src/style.scss +1 -1
  1269. package/src/tab-panel/index.tsx +0 -1
  1270. package/src/tabs/index.tsx +0 -1
  1271. package/src/tabs/stories/index.story.tsx +25 -18
  1272. package/src/tabs/styles.ts +28 -16
  1273. package/src/tabs/tablist.tsx +4 -100
  1274. package/src/tabs/types.ts +0 -1
  1275. package/src/textarea-control/README.md +8 -0
  1276. package/src/textarea-control/index.tsx +1 -0
  1277. package/src/theme/stories/index.story.tsx +2 -0
  1278. package/src/toggle-control/index.tsx +12 -3
  1279. package/src/toggle-control/style.scss +11 -0
  1280. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +36 -6
  1281. package/src/toggle-group-control/test/index.tsx +114 -0
  1282. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +0 -1
  1283. package/src/toggle-group-control/toggle-group-control/component.tsx +0 -2
  1284. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +6 -3
  1285. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +5 -0
  1286. package/src/toolbar/toolbar/README.md +9 -0
  1287. package/src/toolbar/toolbar/style.scss +7 -0
  1288. package/src/toolbar/toolbar/toolbar-container.tsx +0 -1
  1289. package/src/toolbar/toolbar/types.ts +6 -0
  1290. package/src/toolbar/toolbar-button/index.tsx +30 -17
  1291. package/src/toolbar/toolbar-button/types.ts +19 -0
  1292. package/src/toolbar/toolbar-context/index.ts +0 -1
  1293. package/src/toolbar/toolbar-item/index.tsx +1 -1
  1294. package/src/tools-panel/tools-panel-header/component.tsx +1 -1
  1295. package/src/tooltip/index.tsx +3 -2
  1296. package/src/tooltip/test/index.tsx +18 -0
  1297. package/src/tooltip/types.ts +4 -0
  1298. package/src/tree-select/README.md +9 -0
  1299. package/src/tree-select/index.tsx +1 -0
  1300. package/src/unit-control/index.tsx +3 -2
  1301. package/src/unit-control/styles/unit-control-styles.ts +10 -4
  1302. package/src/utils/element-rect.ts +197 -0
  1303. package/src/utils/hooks/use-event.ts +38 -0
  1304. package/src/utils/hooks/use-on-value-update.ts +42 -0
  1305. package/src/utils/hooks/use-update-effect.js +8 -1
  1306. package/tsconfig.tsbuildinfo +1 -1
  1307. package/build/custom-select-control-v2/default-component/index.js +0 -43
  1308. package/build/custom-select-control-v2/default-component/index.js.map +0 -1
  1309. package/build/custom-select-control-v2/legacy-component/index.js +0 -119
  1310. package/build/custom-select-control-v2/legacy-component/index.js.map +0 -1
  1311. package/build-module/custom-select-control-v2/default-component/index.js +0 -32
  1312. package/build-module/custom-select-control-v2/default-component/index.js.map +0 -1
  1313. package/build-module/custom-select-control-v2/legacy-component/index.js +0 -110
  1314. package/build-module/custom-select-control-v2/legacy-component/index.js.map +0 -1
  1315. package/build-types/custom-select-control-v2/default-component/index.d.ts +0 -9
  1316. package/build-types/custom-select-control-v2/default-component/index.d.ts.map +0 -1
  1317. package/build-types/custom-select-control-v2/legacy-component/index.d.ts +0 -5
  1318. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +0 -1
  1319. package/build-types/custom-select-control-v2/legacy-component/test/index.d.ts.map +0 -1
  1320. package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +0 -1
  1321. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts +0 -14
  1322. package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +0 -1
  1323. package/src/custom-select-control/index.js +0 -240
  1324. package/src/custom-select-control/style.scss +0 -75
  1325. package/src/custom-select-control/test/index.js +0 -629
  1326. package/src/custom-select-control-v2/default-component/index.tsx +0 -30
  1327. package/src/custom-select-control-v2/legacy-component/index.tsx +0 -132
  1328. package/src/custom-select-control-v2/stories/legacy.story.tsx +0 -72
  1329. /package/build-types/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.d.ts +0 -0
@@ -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,sBAAA,CAAAF,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,mBAAA,GAAAV,OAAA;AACA,IAAAW,UAAA,GAAAT,sBAAA,CAAAF,OAAA;AAAoD,IAAAY,WAAA,GAAAZ,OAAA;AAtBpD;AACA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;;AAQA,MAAMa,YAAY,GAAKC,IAAI,IAAMA,IAAI,EAAEC,IAAI;AAC3C;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAGA,CACpB;EAAEC;AAAa,CAAC,EAChB;EAAEC,IAAI;EAAEC,OAAO;EAAEC,KAAK,EAAE;IAAEC;EAAM;AAAE,CAAC,KAC/B;EACJ,QAASH,IAAI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,IAAI,EAAEoE,KAAK,kBACvB,IAAAtE,WAAA,CAAAyD,IAAA;YAAA,GAEMjB,YAAY,CAAE;cAClBtC,IAAI;cACJoE,KAAK;cACLjD,SAAS,EAAE,IAAAqC,aAAI,EACdxD,IAAI,CAACmB,SAAS,EACd,wCAAwC,EACxC;gBACC,gBAAgB,EACfiD,KAAK,KAAK5B,gBAAgB;gBAC3B,UAAU,EACT,CAAC,CAAExC,IAAI,CAACkE,kBAAkB;gBAC3B,2BAA2B,EAC1BhD;cACF,CACD,CAAC;cACDmD,KAAK,EAAErE,IAAI,CAACqE;YACb,CAAE,CAAC;YAAAZ,QAAA,GAEDzD,IAAI,CAACC,IAAI,EACTD,IAAI,CAACkE,kBAAkB,iBACxB,IAAApE,WAAA,CAAA4D,GAAA;cAAMvC,SAAS,EAAC,6CAA6C;cAAAsC,QAAA,EAC1DzD,IAAI,CAACkE;YAAkB,CACpB,CACN,EACClE,IAAI,KAAKG,YAAY,iBACtB,IAAAL,WAAA,CAAA4D,GAAA,EAACrE,MAAA,CAAAiF,IAAI;cACJC,IAAI,EAAGC,YAAO;cACdrD,SAAS,EAAC;YAA6C,CACvD,CACD;UAAA,GA9BKnB,IAAI,CAACyE,GA+BR,CACH;QAAC,CACD;MAAC,CACD,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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AAAC,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":[]}
@@ -5,15 +5,21 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = exports.CustomSelectContext = void 0;
8
+ var Ariakit = _interopRequireWildcard(require("@ariakit/react"));
8
9
  var _element = require("@wordpress/element");
9
10
  var _i18n = require("@wordpress/i18n");
10
11
  var _ = require("..");
11
12
  var Styled = _interopRequireWildcard(require("./styles"));
12
13
  var _inputBase = _interopRequireDefault(require("../input-control/input-base"));
13
14
  var _chevronDown = _interopRequireDefault(require("../select-control/chevron-down"));
15
+ var _baseControl = _interopRequireDefault(require("../base-control"));
14
16
  var _jsxRuntime = require("react/jsx-runtime");
15
17
  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); }
16
18
  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; }
19
+ /**
20
+ * External dependencies
21
+ */
22
+
17
23
  /**
18
24
  * WordPress dependencies
19
25
  */
@@ -49,11 +55,7 @@ const CustomSelectButton = ({
49
55
  ...restProps,
50
56
  size: size,
51
57
  hasCustomRenderProp: !!renderSelectedValue,
52
- store: store
53
- // to match legacy behavior where using arrow keys
54
- // move selection rather than open the popover
55
- ,
56
- showOnKeyDown: false,
58
+ store: store,
57
59
  children: computedRenderSelectedValue(currentValue)
58
60
  });
59
61
  };
@@ -64,39 +66,64 @@ function _CustomSelect(props) {
64
66
  label,
65
67
  size,
66
68
  store,
69
+ className,
70
+ isLegacy = false,
67
71
  ...restProps
68
72
  } = props;
69
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
70
- children: [hideLabelFromVision ?
73
+ const onSelectPopoverKeyDown = (0, _element.useCallback)(e => {
74
+ if (isLegacy) {
75
+ e.stopPropagation();
76
+ }
77
+ }, [isLegacy]);
78
+ const contextValue = (0, _element.useMemo)(() => ({
79
+ store,
80
+ size
81
+ }), [store, size]);
82
+ return (
71
83
  /*#__PURE__*/
72
- // TODO: Replace with BaseControl
73
- (0, _jsxRuntime.jsx)(_.VisuallyHidden, {
74
- as: "label",
75
- children: label
76
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(Styled.SelectLabel, {
77
- store: store,
78
- children: label
79
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_inputBase.default, {
80
- __next40pxDefaultSize: true,
81
- size: size,
82
- suffix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_chevronDown.default, {}),
83
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomSelectButton, {
84
- ...restProps,
85
- size: size,
86
- store: store
87
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Styled.SelectPopover, {
88
- gutter: 12,
84
+ // Where should `restProps` be forwarded to?
85
+ (0, _jsxRuntime.jsxs)("div", {
86
+ className: className,
87
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Ariakit.SelectLabel, {
89
88
  store: store,
90
- sameWidth: true,
91
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomSelectContext.Provider, {
92
- value: {
93
- store
94
- },
95
- children: children
96
- })
89
+ render: hideLabelFromVision ?
90
+ /*#__PURE__*/
91
+ // @ts-expect-error `children` are passed via the render prop
92
+ (0, _jsxRuntime.jsx)(_.VisuallyHidden, {}) :
93
+ /*#__PURE__*/
94
+ // @ts-expect-error `children` are passed via the render prop
95
+ (0, _jsxRuntime.jsx)(_baseControl.default.VisualLabel, {
96
+ as: "div"
97
+ }),
98
+ children: label
99
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_inputBase.default, {
100
+ __next40pxDefaultSize: true,
101
+ size: size,
102
+ suffix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_chevronDown.default, {}),
103
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomSelectButton, {
104
+ ...restProps,
105
+ size: size,
106
+ store: store
107
+ // Match legacy behavior (move selection rather than open the popover)
108
+ ,
109
+ showOnKeyDown: !isLegacy
110
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Styled.SelectPopover, {
111
+ gutter: 12,
112
+ store: store,
113
+ sameWidth: true,
114
+ slide: false,
115
+ onKeyDown: onSelectPopoverKeyDown
116
+ // Match legacy behavior
117
+ ,
118
+ flip: !isLegacy,
119
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomSelectContext.Provider, {
120
+ value: contextValue,
121
+ children: children
122
+ })
123
+ })]
97
124
  })]
98
- })]
99
- });
125
+ })
126
+ );
100
127
  }
101
128
  var _default = exports.default = _CustomSelect;
102
129
  //# sourceMappingURL=custom-select.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_i18n","_","Styled","_interopRequireWildcard","_inputBase","_interopRequireDefault","_chevronDown","_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","showOnKeyDown","children","_CustomSelect","props","hideLabelFromVision","label","jsxs","Fragment","VisuallyHidden","as","SelectLabel","__next40pxDefaultSize","suffix","SelectPopover","gutter","sameWidth","Provider","_default"],"sources":["@wordpress/components/src/custom-select-control-v2/custom-select.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, 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_CustomSelectProps,\n} from './types';\nimport type { WordPressComponentProps } from '../context';\nimport InputBase from '../input-control/input-base';\nimport SelectControlChevronDown from '../select-control/chevron-down';\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\tWordPressComponentProps<\n\t\tCustomSelectButtonProps & CustomSelectButtonSize & CustomSelectStore,\n\t\t'button',\n\t\tfalse\n\t>,\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\t// to match legacy behavior where using arrow keys\n\t\t\t// move selection rather than open the popover\n\t\t\tshowOnKeyDown={ false }\n\t\t>\n\t\t\t{ computedRenderSelectedValue( currentValue ) }\n\t\t</Styled.Select>\n\t);\n};\n\nfunction _CustomSelect(\n\tprops: _CustomSelectProps & CustomSelectStore & CustomSelectButtonSize\n) {\n\tconst {\n\t\tchildren,\n\t\thideLabelFromVision = false,\n\t\tlabel,\n\t\tsize,\n\t\tstore,\n\t\t...restProps\n\t} = props;\n\n\treturn (\n\t\t<>\n\t\t\t{ hideLabelFromVision ? ( // TODO: Replace with BaseControl\n\t\t\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t<Styled.SelectLabel store={ store }>\n\t\t\t\t\t{ label }\n\t\t\t\t</Styled.SelectLabel>\n\t\t\t) }\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/>\n\t\t\t\t<Styled.SelectPopover gutter={ 12 } store={ store } sameWidth>\n\t\t\t\t\t<CustomSelectContext.Provider value={ { store } }>\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</>\n\t);\n}\n\nexport default _CustomSelect;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,CAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AASA,IAAAK,UAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,YAAA,GAAAD,sBAAA,CAAAN,OAAA;AAAsE,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAA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,CAAG;MAAAuC,QAAA,gBAEvC,IAAA9C,WAAA,CAAA0C,GAAA,EAACT,kBAAkB;QAAA,GACbI,SAAS;QACdF,IAAI,EAAGA,IAAM;QACbC,KAAK,EAAGA;MAAO,CACf,CAAC,eACF,IAAApC,WAAA,CAAA0C,GAAA,EAAC/C,MAAM,CAAC+D,aAAa;QAACC,MAAM,EAAG,EAAI;QAACvB,KAAK,EAAGA,KAAO;QAACwB,SAAS;QAAAd,QAAA,eAC5D,IAAA9C,WAAA,CAAA0C,GAAA,EAACrB,mBAAmB,CAACwC,QAAQ;UAACnC,KAAK,EAAG;YAAEU;UAAM,CAAG;UAAAU,QAAA,EAC9CA;QAAQ,CACmB;MAAC,CACV,CAAC;IAAA,CACb,CAAC;EAAA,CACX,CAAC;AAEL;AAAC,IAAAgB,QAAA,GAAAxC,OAAA,CAAAf,OAAA,GAEcwC,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,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAA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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