@wordpress/components 32.0.1-next.v.0 → 32.1.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 (1188) hide show
  1. package/CHANGELOG.md +15 -2
  2. package/CONTRIBUTING.md +6 -0
  3. package/build/alignment-matrix-control/cell.cjs +6 -121
  4. package/build/alignment-matrix-control/cell.cjs.map +2 -2
  5. package/build/alignment-matrix-control/icon.cjs +2 -3
  6. package/build/alignment-matrix-control/icon.cjs.map +2 -2
  7. package/build/alignment-matrix-control/index.cjs +6 -121
  8. package/build/alignment-matrix-control/index.cjs.map +2 -2
  9. package/build/angle-picker-control/angle-circle.cjs +6 -85
  10. package/build/angle-picker-control/angle-circle.cjs.map +2 -2
  11. package/build/angle-picker-control/index.cjs +1 -0
  12. package/build/angle-picker-control/index.cjs.map +2 -2
  13. package/build/autocomplete/autocompleter-ui.cjs +1 -2
  14. package/build/autocomplete/autocompleter-ui.cjs.map +2 -2
  15. package/build/box-control/index.cjs +15 -7
  16. package/build/box-control/index.cjs.map +2 -2
  17. package/build/box-control/input-control.cjs +8 -12
  18. package/build/box-control/input-control.cjs.map +2 -2
  19. package/build/button/deprecated.cjs +12 -8
  20. package/build/button/deprecated.cjs.map +2 -2
  21. package/build/button/index.cjs +7 -12
  22. package/build/button/index.cjs.map +2 -2
  23. package/build/button-group/index.cjs +1 -0
  24. package/build/button-group/index.cjs.map +2 -2
  25. package/build/calendar/date-calendar/index.cjs +2 -2
  26. package/build/calendar/date-calendar/index.cjs.map +2 -2
  27. package/build/calendar/date-range-calendar/index.cjs +4 -6
  28. package/build/calendar/date-range-calendar/index.cjs.map +2 -2
  29. package/build/card/card/hook.cjs +1 -2
  30. package/build/card/card/hook.cjs.map +2 -2
  31. package/build/circular-option-picker/circular-option-picker-option.cjs +2 -1
  32. package/build/circular-option-picker/circular-option-picker-option.cjs.map +2 -2
  33. package/build/circular-option-picker/circular-option-picker.cjs +1 -0
  34. package/build/circular-option-picker/circular-option-picker.cjs.map +2 -2
  35. package/build/clipboard-button/index.cjs +11 -7
  36. package/build/clipboard-button/index.cjs.map +2 -2
  37. package/build/color-indicator/index.cjs +1 -0
  38. package/build/color-indicator/index.cjs.map +2 -2
  39. package/build/color-palette/index.cjs +1 -0
  40. package/build/color-palette/index.cjs.map +2 -2
  41. package/build/color-palette/utils.cjs +2 -2
  42. package/build/color-palette/utils.cjs.map +2 -2
  43. package/build/combobox-control/index.cjs +2 -3
  44. package/build/combobox-control/index.cjs.map +2 -2
  45. package/build/composite/group-label.cjs +1 -2
  46. package/build/composite/group-label.cjs.map +2 -2
  47. package/build/composite/group.cjs +1 -2
  48. package/build/composite/group.cjs.map +2 -2
  49. package/build/composite/hover.cjs +1 -2
  50. package/build/composite/hover.cjs.map +2 -2
  51. package/build/composite/index.cjs +1 -1
  52. package/build/composite/index.cjs.map +2 -2
  53. package/build/composite/item.cjs +1 -2
  54. package/build/composite/item.cjs.map +2 -2
  55. package/build/composite/legacy/index.cjs +1 -2
  56. package/build/composite/legacy/index.cjs.map +2 -2
  57. package/build/composite/row.cjs +1 -2
  58. package/build/composite/row.cjs.map +2 -2
  59. package/build/composite/typeahead.cjs +1 -2
  60. package/build/composite/typeahead.cjs.map +2 -2
  61. package/build/confirm-dialog/component.cjs +2 -2
  62. package/build/confirm-dialog/component.cjs.map +2 -2
  63. package/build/context/context-system-provider.cjs +1 -1
  64. package/build/context/context-system-provider.cjs.map +2 -2
  65. package/build/custom-gradient-picker/index.cjs +1 -2
  66. package/build/custom-gradient-picker/index.cjs.map +2 -2
  67. package/build/custom-gradient-picker/utils.cjs +1 -1
  68. package/build/custom-gradient-picker/utils.cjs.map +2 -2
  69. package/build/custom-select-control/index.cjs +2 -3
  70. package/build/custom-select-control/index.cjs.map +2 -2
  71. package/build/custom-select-control-v2/custom-select.cjs +1 -1
  72. package/build/custom-select-control-v2/custom-select.cjs.map +2 -2
  73. package/build/custom-select-control-v2/item.cjs +2 -3
  74. package/build/custom-select-control-v2/item.cjs.map +2 -2
  75. package/build/date-time/date/index.cjs +1 -1
  76. package/build/date-time/date/index.cjs.map +2 -2
  77. package/build/date-time/date-time/index.cjs +1 -0
  78. package/build/date-time/date-time/index.cjs.map +2 -2
  79. package/build/date-time/time/index.cjs +2 -2
  80. package/build/date-time/time/index.cjs.map +2 -2
  81. package/build/date-time/utils.cjs +1 -2
  82. package/build/date-time/utils.cjs.map +2 -2
  83. package/build/disclosure/index.cjs +1 -0
  84. package/build/disclosure/index.cjs.map +2 -2
  85. package/build/divider/styles.cjs +2 -2
  86. package/build/divider/styles.cjs.map +2 -2
  87. package/build/dropdown-menu/index.cjs +2 -3
  88. package/build/dropdown-menu/index.cjs.map +2 -2
  89. package/build/duotone-picker/duotone-picker.cjs +1 -1
  90. package/build/duotone-picker/duotone-picker.cjs.map +2 -2
  91. package/build/external-link/index.cjs +1 -0
  92. package/build/external-link/index.cjs.map +2 -2
  93. package/build/flex/flex/hook.cjs +1 -1
  94. package/build/flex/flex/hook.cjs.map +2 -2
  95. package/build/focal-point-picker/index.cjs +1 -2
  96. package/build/focal-point-picker/index.cjs.map +2 -2
  97. package/build/font-size-picker/font-size-picker-select.cjs +1 -2
  98. package/build/font-size-picker/font-size-picker-select.cjs.map +2 -2
  99. package/build/font-size-picker/index.cjs +3 -2
  100. package/build/font-size-picker/index.cjs.map +2 -2
  101. package/build/form-file-upload/index.cjs +9 -5
  102. package/build/form-file-upload/index.cjs.map +2 -2
  103. package/build/form-toggle/index.cjs +1 -0
  104. package/build/form-toggle/index.cjs.map +2 -2
  105. package/build/form-token-field/token-input.cjs +1 -0
  106. package/build/form-token-field/token-input.cjs.map +2 -2
  107. package/build/form-token-field/token.cjs.map +2 -2
  108. package/build/guide/index.cjs +2 -3
  109. package/build/guide/index.cjs.map +2 -2
  110. package/build/higher-order/navigate-regions/index.cjs +10 -9
  111. package/build/higher-order/navigate-regions/index.cjs.map +2 -2
  112. package/build/higher-order/with-fallback-styles/index.cjs +1 -1
  113. package/build/higher-order/with-fallback-styles/index.cjs.map +2 -2
  114. package/build/higher-order/with-focus-outside/index.cjs +1 -1
  115. package/build/higher-order/with-focus-outside/index.cjs.map +2 -2
  116. package/build/higher-order/with-spoken-messages/index.cjs +7 -5
  117. package/build/higher-order/with-spoken-messages/index.cjs.map +2 -2
  118. package/build/input-control/index.cjs +1 -0
  119. package/build/input-control/index.cjs.map +2 -2
  120. package/build/input-control/input-field.cjs +1 -1
  121. package/build/input-control/input-field.cjs.map +2 -2
  122. package/build/input-control/reducer/reducer.cjs +2 -4
  123. package/build/input-control/reducer/reducer.cjs.map +2 -2
  124. package/build/input-control/styles/input-control-styles.cjs +22 -22
  125. package/build/input-control/styles/input-control-styles.cjs.map +2 -2
  126. package/build/keyboard-shortcuts/index.cjs +1 -1
  127. package/build/keyboard-shortcuts/index.cjs.map +2 -2
  128. package/build/menu/index.cjs +1 -1
  129. package/build/menu/index.cjs.map +2 -2
  130. package/build/menu/item.cjs +1 -1
  131. package/build/menu/item.cjs.map +2 -2
  132. package/build/menu/popover.cjs +2 -2
  133. package/build/menu/popover.cjs.map +2 -2
  134. package/build/menu-item/index.cjs +1 -0
  135. package/build/menu-item/index.cjs.map +2 -2
  136. package/build/modal/index.cjs +3 -4
  137. package/build/modal/index.cjs.map +2 -2
  138. package/build/navigable-container/menu.cjs +1 -0
  139. package/build/navigable-container/menu.cjs.map +2 -2
  140. package/build/navigable-container/tabbable.cjs +1 -0
  141. package/build/navigable-container/tabbable.cjs.map +2 -2
  142. package/build/navigation/back-button/index.cjs +1 -0
  143. package/build/navigation/back-button/index.cjs.map +2 -2
  144. package/build/navigator/navigator/component.cjs +8 -13
  145. package/build/navigator/navigator/component.cjs.map +2 -2
  146. package/build/navigator/navigator-screen/component.cjs +1 -1
  147. package/build/navigator/navigator-screen/component.cjs.map +2 -2
  148. package/build/number-control/index.cjs +3 -3
  149. package/build/number-control/index.cjs.map +2 -2
  150. package/build/palette-edit/index.cjs +3 -4
  151. package/build/palette-edit/index.cjs.map +2 -2
  152. package/build/panel/body.cjs +1 -0
  153. package/build/panel/body.cjs.map +2 -2
  154. package/build/panel/index.cjs +1 -0
  155. package/build/panel/index.cjs.map +2 -2
  156. package/build/panel/row.cjs +1 -0
  157. package/build/panel/row.cjs.map +2 -2
  158. package/build/popover/index.cjs +1 -2
  159. package/build/popover/index.cjs.map +2 -2
  160. package/build/popover/overlay-middlewares.cjs +1 -2
  161. package/build/popover/overlay-middlewares.cjs.map +2 -2
  162. package/build/popover/utils.cjs +3 -8
  163. package/build/popover/utils.cjs.map +2 -2
  164. package/build/private-apis.cjs +1 -0
  165. package/build/private-apis.cjs.map +2 -2
  166. package/build/progress-bar/index.cjs +1 -0
  167. package/build/progress-bar/index.cjs.map +2 -2
  168. package/build/radio-group/index.cjs +2 -1
  169. package/build/radio-group/index.cjs.map +2 -2
  170. package/build/radio-group/radio.cjs +9 -4
  171. package/build/radio-group/radio.cjs.map +2 -2
  172. package/build/range-control/index.cjs +5 -4
  173. package/build/range-control/index.cjs.map +2 -2
  174. package/build/range-control/utils.cjs +1 -1
  175. package/build/range-control/utils.cjs.map +2 -2
  176. package/build/resizable-box/index.cjs +1 -0
  177. package/build/resizable-box/index.cjs.map +2 -2
  178. package/build/search-control/index.cjs +4 -3
  179. package/build/search-control/index.cjs.map +2 -2
  180. package/build/select-control/index.cjs +1 -0
  181. package/build/select-control/index.cjs.map +2 -2
  182. package/build/slot-fill/bubbles-virtually/slot.cjs +17 -5
  183. package/build/slot-fill/bubbles-virtually/slot.cjs.map +2 -2
  184. package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs +17 -4
  185. package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs.map +2 -2
  186. package/build/slot-fill/bubbles-virtually/use-slot.cjs +7 -3
  187. package/build/slot-fill/bubbles-virtually/use-slot.cjs.map +2 -2
  188. package/build/slot-fill/context.cjs +17 -6
  189. package/build/slot-fill/context.cjs.map +3 -3
  190. package/build/slot-fill/fill.cjs +28 -4
  191. package/build/slot-fill/fill.cjs.map +4 -4
  192. package/build/slot-fill/index.cjs +8 -23
  193. package/build/slot-fill/index.cjs.map +3 -3
  194. package/build/slot-fill/provider.cjs +33 -17
  195. package/build/slot-fill/provider.cjs.map +2 -2
  196. package/build/slot-fill/slot.cjs +8 -6
  197. package/build/slot-fill/slot.cjs.map +2 -2
  198. package/build/snackbar/index.cjs +1 -0
  199. package/build/snackbar/index.cjs.map +2 -2
  200. package/build/spinner/index.cjs +1 -0
  201. package/build/spinner/index.cjs.map +2 -2
  202. package/build/tab-panel/index.cjs +1 -0
  203. package/build/tab-panel/index.cjs.map +2 -2
  204. package/build/tabs/tab.cjs +1 -2
  205. package/build/tabs/tab.cjs.map +2 -2
  206. package/build/tabs/tablist.cjs +7 -11
  207. package/build/tabs/tablist.cjs.map +2 -2
  208. package/build/text-control/index.cjs +1 -0
  209. package/build/text-control/index.cjs.map +2 -2
  210. package/build/text-highlight/index.cjs +1 -0
  211. package/build/text-highlight/index.cjs.map +2 -2
  212. package/build/textarea-control/index.cjs +1 -0
  213. package/build/textarea-control/index.cjs.map +2 -2
  214. package/build/toggle-control/index.cjs +1 -0
  215. package/build/toggle-control/index.cjs.map +2 -2
  216. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs +1 -0
  217. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs.map +2 -2
  218. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs +2 -1
  219. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs.map +2 -2
  220. package/build/toggle-group-control/toggle-group-control/utils.cjs +1 -1
  221. package/build/toggle-group-control/toggle-group-control/utils.cjs.map +2 -2
  222. package/build/toggle-group-control/toggle-group-control-option/component.cjs +1 -0
  223. package/build/toggle-group-control/toggle-group-control-option/component.cjs.map +2 -2
  224. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs +1 -0
  225. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs.map +2 -2
  226. package/build/toolbar/toolbar/index.cjs +1 -0
  227. package/build/toolbar/toolbar/index.cjs.map +2 -2
  228. package/build/toolbar/toolbar/toolbar-container.cjs +1 -0
  229. package/build/toolbar/toolbar/toolbar-container.cjs.map +2 -2
  230. package/build/toolbar/toolbar-button/index.cjs +1 -0
  231. package/build/toolbar/toolbar-button/index.cjs.map +2 -2
  232. package/build/toolbar/toolbar-dropdown-menu/index.cjs +1 -0
  233. package/build/toolbar/toolbar-dropdown-menu/index.cjs.map +2 -2
  234. package/build/toolbar/toolbar-item/index.cjs +1 -0
  235. package/build/toolbar/toolbar-item/index.cjs.map +2 -2
  236. package/build/tooltip/index.cjs +1 -0
  237. package/build/tooltip/index.cjs.map +2 -2
  238. package/build/tree-grid/cell.cjs +1 -0
  239. package/build/tree-grid/cell.cjs.map +2 -2
  240. package/build/tree-grid/index.cjs +2 -2
  241. package/build/tree-grid/index.cjs.map +2 -2
  242. package/build/tree-grid/item.cjs +1 -0
  243. package/build/tree-grid/item.cjs.map +2 -2
  244. package/build/tree-grid/roving-tab-index-item.cjs +1 -0
  245. package/build/tree-grid/roving-tab-index-item.cjs.map +2 -2
  246. package/build/tree-grid/row.cjs +1 -0
  247. package/build/tree-grid/row.cjs.map +2 -2
  248. package/build/tree-select/index.cjs +12 -8
  249. package/build/tree-select/index.cjs.map +2 -2
  250. package/build/unit-control/index.cjs +5 -5
  251. package/build/unit-control/index.cjs.map +2 -2
  252. package/build/unit-control/utils.cjs +2 -2
  253. package/build/unit-control/utils.cjs.map +2 -2
  254. package/build/utils/dropdown-motion.cjs.map +2 -2
  255. package/build/utils/element-rect.cjs +3 -4
  256. package/build/utils/element-rect.cjs.map +2 -2
  257. package/build/utils/font.cjs +1 -2
  258. package/build/utils/font.cjs.map +2 -2
  259. package/build/utils/strings.cjs +1 -2
  260. package/build/utils/strings.cjs.map +2 -2
  261. package/build/utils/use-deprecated-props.cjs +1 -1
  262. package/build/utils/use-deprecated-props.cjs.map +2 -2
  263. package/build/utils/values.cjs +1 -2
  264. package/build/utils/values.cjs.map +2 -2
  265. package/build/validated-form-controls/components/checkbox-control.cjs +1 -0
  266. package/build/validated-form-controls/components/checkbox-control.cjs.map +2 -2
  267. package/build/validated-form-controls/components/combobox-control.cjs +2 -1
  268. package/build/validated-form-controls/components/combobox-control.cjs.map +2 -2
  269. package/build/validated-form-controls/components/custom-select-control.cjs +1 -0
  270. package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
  271. package/build/validated-form-controls/components/form-token-field.cjs +1 -0
  272. package/build/validated-form-controls/components/form-token-field.cjs.map +2 -2
  273. package/build/validated-form-controls/components/input-control.cjs +1 -0
  274. package/build/validated-form-controls/components/input-control.cjs.map +2 -2
  275. package/build/validated-form-controls/components/number-control.cjs +1 -0
  276. package/build/validated-form-controls/components/number-control.cjs.map +2 -2
  277. package/build/validated-form-controls/components/radio-control.cjs +1 -0
  278. package/build/validated-form-controls/components/radio-control.cjs.map +2 -2
  279. package/build/validated-form-controls/components/range-control.cjs +1 -0
  280. package/build/validated-form-controls/components/range-control.cjs.map +2 -2
  281. package/build/validated-form-controls/components/select-control.cjs +1 -0
  282. package/build/validated-form-controls/components/select-control.cjs.map +2 -2
  283. package/build/validated-form-controls/components/text-control.cjs +1 -0
  284. package/build/validated-form-controls/components/text-control.cjs.map +2 -2
  285. package/build/validated-form-controls/components/textarea-control.cjs +1 -0
  286. package/build/validated-form-controls/components/textarea-control.cjs.map +2 -2
  287. package/build/validated-form-controls/components/toggle-control.cjs +2 -1
  288. package/build/validated-form-controls/components/toggle-control.cjs.map +2 -2
  289. package/build/validated-form-controls/components/toggle-group-control.cjs +1 -0
  290. package/build/validated-form-controls/components/toggle-group-control.cjs.map +2 -2
  291. package/build/validated-form-controls/control-with-error.cjs +4 -6
  292. package/build/validated-form-controls/control-with-error.cjs.map +2 -2
  293. package/build-module/alignment-matrix-control/cell.mjs +6 -121
  294. package/build-module/alignment-matrix-control/cell.mjs.map +2 -2
  295. package/build-module/alignment-matrix-control/icon.mjs +2 -3
  296. package/build-module/alignment-matrix-control/icon.mjs.map +2 -2
  297. package/build-module/alignment-matrix-control/index.mjs +6 -121
  298. package/build-module/alignment-matrix-control/index.mjs.map +2 -2
  299. package/build-module/angle-picker-control/angle-circle.mjs +6 -85
  300. package/build-module/angle-picker-control/angle-circle.mjs.map +2 -2
  301. package/build-module/angle-picker-control/index.mjs +1 -0
  302. package/build-module/angle-picker-control/index.mjs.map +2 -2
  303. package/build-module/autocomplete/autocompleter-ui.mjs +1 -2
  304. package/build-module/autocomplete/autocompleter-ui.mjs.map +2 -2
  305. package/build-module/box-control/index.mjs +15 -7
  306. package/build-module/box-control/index.mjs.map +2 -2
  307. package/build-module/box-control/input-control.mjs +8 -12
  308. package/build-module/box-control/input-control.mjs.map +2 -2
  309. package/build-module/button/deprecated.mjs +12 -8
  310. package/build-module/button/deprecated.mjs.map +2 -2
  311. package/build-module/button/index.mjs +7 -12
  312. package/build-module/button/index.mjs.map +2 -2
  313. package/build-module/button-group/index.mjs +1 -0
  314. package/build-module/button-group/index.mjs.map +2 -2
  315. package/build-module/calendar/date-calendar/index.mjs +2 -2
  316. package/build-module/calendar/date-calendar/index.mjs.map +2 -2
  317. package/build-module/calendar/date-range-calendar/index.mjs +4 -6
  318. package/build-module/calendar/date-range-calendar/index.mjs.map +2 -2
  319. package/build-module/card/card/hook.mjs +1 -2
  320. package/build-module/card/card/hook.mjs.map +2 -2
  321. package/build-module/circular-option-picker/circular-option-picker-option.mjs +2 -1
  322. package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
  323. package/build-module/circular-option-picker/circular-option-picker.mjs +1 -0
  324. package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
  325. package/build-module/clipboard-button/index.mjs +11 -7
  326. package/build-module/clipboard-button/index.mjs.map +2 -2
  327. package/build-module/color-indicator/index.mjs +1 -0
  328. package/build-module/color-indicator/index.mjs.map +2 -2
  329. package/build-module/color-palette/index.mjs +1 -0
  330. package/build-module/color-palette/index.mjs.map +2 -2
  331. package/build-module/color-palette/utils.mjs +2 -2
  332. package/build-module/color-palette/utils.mjs.map +2 -2
  333. package/build-module/combobox-control/index.mjs +2 -3
  334. package/build-module/combobox-control/index.mjs.map +2 -2
  335. package/build-module/composite/group-label.mjs +1 -2
  336. package/build-module/composite/group-label.mjs.map +2 -2
  337. package/build-module/composite/group.mjs +1 -2
  338. package/build-module/composite/group.mjs.map +2 -2
  339. package/build-module/composite/hover.mjs +1 -2
  340. package/build-module/composite/hover.mjs.map +2 -2
  341. package/build-module/composite/index.mjs +1 -1
  342. package/build-module/composite/index.mjs.map +2 -2
  343. package/build-module/composite/item.mjs +1 -2
  344. package/build-module/composite/item.mjs.map +2 -2
  345. package/build-module/composite/legacy/index.mjs +1 -2
  346. package/build-module/composite/legacy/index.mjs.map +2 -2
  347. package/build-module/composite/row.mjs +1 -2
  348. package/build-module/composite/row.mjs.map +2 -2
  349. package/build-module/composite/typeahead.mjs +1 -2
  350. package/build-module/composite/typeahead.mjs.map +2 -2
  351. package/build-module/confirm-dialog/component.mjs +2 -2
  352. package/build-module/confirm-dialog/component.mjs.map +2 -2
  353. package/build-module/context/context-system-provider.mjs +1 -1
  354. package/build-module/context/context-system-provider.mjs.map +2 -2
  355. package/build-module/custom-gradient-picker/index.mjs +1 -2
  356. package/build-module/custom-gradient-picker/index.mjs.map +2 -2
  357. package/build-module/custom-gradient-picker/utils.mjs +1 -1
  358. package/build-module/custom-gradient-picker/utils.mjs.map +2 -2
  359. package/build-module/custom-select-control/index.mjs +2 -3
  360. package/build-module/custom-select-control/index.mjs.map +2 -2
  361. package/build-module/custom-select-control-v2/custom-select.mjs +1 -1
  362. package/build-module/custom-select-control-v2/custom-select.mjs.map +2 -2
  363. package/build-module/custom-select-control-v2/item.mjs +2 -3
  364. package/build-module/custom-select-control-v2/item.mjs.map +2 -2
  365. package/build-module/date-time/date/index.mjs +1 -1
  366. package/build-module/date-time/date/index.mjs.map +2 -2
  367. package/build-module/date-time/date-time/index.mjs +1 -0
  368. package/build-module/date-time/date-time/index.mjs.map +2 -2
  369. package/build-module/date-time/time/index.mjs +2 -2
  370. package/build-module/date-time/time/index.mjs.map +2 -2
  371. package/build-module/date-time/utils.mjs +1 -2
  372. package/build-module/date-time/utils.mjs.map +2 -2
  373. package/build-module/disclosure/index.mjs +1 -0
  374. package/build-module/disclosure/index.mjs.map +2 -2
  375. package/build-module/divider/styles.mjs +2 -2
  376. package/build-module/divider/styles.mjs.map +2 -2
  377. package/build-module/dropdown-menu/index.mjs +2 -3
  378. package/build-module/dropdown-menu/index.mjs.map +2 -2
  379. package/build-module/duotone-picker/duotone-picker.mjs +1 -1
  380. package/build-module/duotone-picker/duotone-picker.mjs.map +2 -2
  381. package/build-module/external-link/index.mjs +1 -0
  382. package/build-module/external-link/index.mjs.map +2 -2
  383. package/build-module/flex/flex/hook.mjs +1 -1
  384. package/build-module/flex/flex/hook.mjs.map +2 -2
  385. package/build-module/focal-point-picker/index.mjs +1 -2
  386. package/build-module/focal-point-picker/index.mjs.map +2 -2
  387. package/build-module/font-size-picker/font-size-picker-select.mjs +1 -2
  388. package/build-module/font-size-picker/font-size-picker-select.mjs.map +2 -2
  389. package/build-module/font-size-picker/index.mjs +3 -2
  390. package/build-module/font-size-picker/index.mjs.map +2 -2
  391. package/build-module/form-file-upload/index.mjs +9 -5
  392. package/build-module/form-file-upload/index.mjs.map +2 -2
  393. package/build-module/form-toggle/index.mjs +1 -0
  394. package/build-module/form-toggle/index.mjs.map +2 -2
  395. package/build-module/form-token-field/token-input.mjs +1 -0
  396. package/build-module/form-token-field/token-input.mjs.map +2 -2
  397. package/build-module/form-token-field/token.mjs.map +2 -2
  398. package/build-module/guide/index.mjs +2 -3
  399. package/build-module/guide/index.mjs.map +2 -2
  400. package/build-module/higher-order/navigate-regions/index.mjs +10 -9
  401. package/build-module/higher-order/navigate-regions/index.mjs.map +2 -2
  402. package/build-module/higher-order/with-fallback-styles/index.mjs +1 -1
  403. package/build-module/higher-order/with-fallback-styles/index.mjs.map +2 -2
  404. package/build-module/higher-order/with-focus-outside/index.mjs +1 -1
  405. package/build-module/higher-order/with-focus-outside/index.mjs.map +2 -2
  406. package/build-module/higher-order/with-spoken-messages/index.mjs +7 -5
  407. package/build-module/higher-order/with-spoken-messages/index.mjs.map +2 -2
  408. package/build-module/input-control/index.mjs +1 -0
  409. package/build-module/input-control/index.mjs.map +2 -2
  410. package/build-module/input-control/input-field.mjs +1 -1
  411. package/build-module/input-control/input-field.mjs.map +2 -2
  412. package/build-module/input-control/reducer/reducer.mjs +2 -4
  413. package/build-module/input-control/reducer/reducer.mjs.map +2 -2
  414. package/build-module/input-control/styles/input-control-styles.mjs +22 -22
  415. package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
  416. package/build-module/keyboard-shortcuts/index.mjs +1 -1
  417. package/build-module/keyboard-shortcuts/index.mjs.map +2 -2
  418. package/build-module/menu/index.mjs +1 -1
  419. package/build-module/menu/index.mjs.map +2 -2
  420. package/build-module/menu/item.mjs +1 -1
  421. package/build-module/menu/item.mjs.map +2 -2
  422. package/build-module/menu/popover.mjs +2 -2
  423. package/build-module/menu/popover.mjs.map +2 -2
  424. package/build-module/menu-item/index.mjs +1 -0
  425. package/build-module/menu-item/index.mjs.map +2 -2
  426. package/build-module/modal/index.mjs +3 -4
  427. package/build-module/modal/index.mjs.map +2 -2
  428. package/build-module/navigable-container/menu.mjs +1 -0
  429. package/build-module/navigable-container/menu.mjs.map +2 -2
  430. package/build-module/navigable-container/tabbable.mjs +1 -0
  431. package/build-module/navigable-container/tabbable.mjs.map +2 -2
  432. package/build-module/navigation/back-button/index.mjs +1 -0
  433. package/build-module/navigation/back-button/index.mjs.map +2 -2
  434. package/build-module/navigator/navigator/component.mjs +8 -13
  435. package/build-module/navigator/navigator/component.mjs.map +2 -2
  436. package/build-module/navigator/navigator-screen/component.mjs +1 -1
  437. package/build-module/navigator/navigator-screen/component.mjs.map +2 -2
  438. package/build-module/number-control/index.mjs +3 -3
  439. package/build-module/number-control/index.mjs.map +2 -2
  440. package/build-module/palette-edit/index.mjs +3 -4
  441. package/build-module/palette-edit/index.mjs.map +2 -2
  442. package/build-module/panel/body.mjs +1 -0
  443. package/build-module/panel/body.mjs.map +2 -2
  444. package/build-module/panel/index.mjs +1 -0
  445. package/build-module/panel/index.mjs.map +2 -2
  446. package/build-module/panel/row.mjs +1 -0
  447. package/build-module/panel/row.mjs.map +2 -2
  448. package/build-module/popover/index.mjs +1 -2
  449. package/build-module/popover/index.mjs.map +2 -2
  450. package/build-module/popover/overlay-middlewares.mjs +1 -2
  451. package/build-module/popover/overlay-middlewares.mjs.map +2 -2
  452. package/build-module/popover/utils.mjs +3 -8
  453. package/build-module/popover/utils.mjs.map +2 -2
  454. package/build-module/private-apis.mjs +2 -1
  455. package/build-module/private-apis.mjs.map +2 -2
  456. package/build-module/progress-bar/index.mjs +1 -0
  457. package/build-module/progress-bar/index.mjs.map +2 -2
  458. package/build-module/radio-group/index.mjs +2 -1
  459. package/build-module/radio-group/index.mjs.map +2 -2
  460. package/build-module/radio-group/radio.mjs +9 -4
  461. package/build-module/radio-group/radio.mjs.map +2 -2
  462. package/build-module/range-control/index.mjs +5 -4
  463. package/build-module/range-control/index.mjs.map +2 -2
  464. package/build-module/range-control/utils.mjs +1 -1
  465. package/build-module/range-control/utils.mjs.map +2 -2
  466. package/build-module/resizable-box/index.mjs +1 -0
  467. package/build-module/resizable-box/index.mjs.map +2 -2
  468. package/build-module/search-control/index.mjs +4 -3
  469. package/build-module/search-control/index.mjs.map +2 -2
  470. package/build-module/select-control/index.mjs +1 -0
  471. package/build-module/select-control/index.mjs.map +2 -2
  472. package/build-module/slot-fill/bubbles-virtually/slot.mjs +16 -4
  473. package/build-module/slot-fill/bubbles-virtually/slot.mjs.map +2 -2
  474. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs +17 -4
  475. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs.map +2 -2
  476. package/build-module/slot-fill/bubbles-virtually/use-slot.mjs +6 -2
  477. package/build-module/slot-fill/bubbles-virtually/use-slot.mjs.map +2 -2
  478. package/build-module/slot-fill/context.mjs +7 -2
  479. package/build-module/slot-fill/context.mjs.map +2 -2
  480. package/build-module/slot-fill/fill.mjs +29 -5
  481. package/build-module/slot-fill/fill.mjs.map +3 -3
  482. package/build-module/slot-fill/index.mjs +7 -21
  483. package/build-module/slot-fill/index.mjs.map +2 -2
  484. package/build-module/slot-fill/provider.mjs +33 -17
  485. package/build-module/slot-fill/provider.mjs.map +2 -2
  486. package/build-module/slot-fill/slot.mjs +8 -6
  487. package/build-module/slot-fill/slot.mjs.map +2 -2
  488. package/build-module/snackbar/index.mjs +1 -0
  489. package/build-module/snackbar/index.mjs.map +2 -2
  490. package/build-module/spinner/index.mjs +1 -0
  491. package/build-module/spinner/index.mjs.map +2 -2
  492. package/build-module/tab-panel/index.mjs +1 -0
  493. package/build-module/tab-panel/index.mjs.map +2 -2
  494. package/build-module/tabs/tab.mjs +1 -2
  495. package/build-module/tabs/tab.mjs.map +2 -2
  496. package/build-module/tabs/tablist.mjs +7 -11
  497. package/build-module/tabs/tablist.mjs.map +2 -2
  498. package/build-module/text-control/index.mjs +1 -0
  499. package/build-module/text-control/index.mjs.map +2 -2
  500. package/build-module/text-highlight/index.mjs +1 -0
  501. package/build-module/text-highlight/index.mjs.map +2 -2
  502. package/build-module/textarea-control/index.mjs +1 -0
  503. package/build-module/textarea-control/index.mjs.map +2 -2
  504. package/build-module/toggle-control/index.mjs +1 -0
  505. package/build-module/toggle-control/index.mjs.map +2 -2
  506. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs +1 -0
  507. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs.map +2 -2
  508. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs +2 -1
  509. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs.map +2 -2
  510. package/build-module/toggle-group-control/toggle-group-control/utils.mjs +1 -1
  511. package/build-module/toggle-group-control/toggle-group-control/utils.mjs.map +2 -2
  512. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs +1 -0
  513. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs.map +2 -2
  514. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs +1 -0
  515. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs.map +2 -2
  516. package/build-module/toolbar/toolbar/index.mjs +1 -0
  517. package/build-module/toolbar/toolbar/index.mjs.map +2 -2
  518. package/build-module/toolbar/toolbar/toolbar-container.mjs +1 -0
  519. package/build-module/toolbar/toolbar/toolbar-container.mjs.map +2 -2
  520. package/build-module/toolbar/toolbar-button/index.mjs +1 -0
  521. package/build-module/toolbar/toolbar-button/index.mjs.map +2 -2
  522. package/build-module/toolbar/toolbar-dropdown-menu/index.mjs +1 -0
  523. package/build-module/toolbar/toolbar-dropdown-menu/index.mjs.map +2 -2
  524. package/build-module/toolbar/toolbar-item/index.mjs +1 -0
  525. package/build-module/toolbar/toolbar-item/index.mjs.map +2 -2
  526. package/build-module/tooltip/index.mjs +1 -0
  527. package/build-module/tooltip/index.mjs.map +2 -2
  528. package/build-module/tree-grid/cell.mjs +1 -0
  529. package/build-module/tree-grid/cell.mjs.map +2 -2
  530. package/build-module/tree-grid/index.mjs +2 -2
  531. package/build-module/tree-grid/index.mjs.map +2 -2
  532. package/build-module/tree-grid/item.mjs +1 -0
  533. package/build-module/tree-grid/item.mjs.map +2 -2
  534. package/build-module/tree-grid/roving-tab-index-item.mjs +1 -0
  535. package/build-module/tree-grid/roving-tab-index-item.mjs.map +2 -2
  536. package/build-module/tree-grid/row.mjs +1 -0
  537. package/build-module/tree-grid/row.mjs.map +2 -2
  538. package/build-module/tree-select/index.mjs +12 -8
  539. package/build-module/tree-select/index.mjs.map +2 -2
  540. package/build-module/unit-control/index.mjs +5 -5
  541. package/build-module/unit-control/index.mjs.map +2 -2
  542. package/build-module/unit-control/utils.mjs +2 -2
  543. package/build-module/unit-control/utils.mjs.map +2 -2
  544. package/build-module/utils/dropdown-motion.mjs.map +2 -2
  545. package/build-module/utils/element-rect.mjs +3 -4
  546. package/build-module/utils/element-rect.mjs.map +2 -2
  547. package/build-module/utils/font.mjs +1 -2
  548. package/build-module/utils/font.mjs.map +2 -2
  549. package/build-module/utils/strings.mjs +1 -2
  550. package/build-module/utils/strings.mjs.map +2 -2
  551. package/build-module/utils/use-deprecated-props.mjs +1 -1
  552. package/build-module/utils/use-deprecated-props.mjs.map +2 -2
  553. package/build-module/utils/values.mjs +1 -2
  554. package/build-module/utils/values.mjs.map +2 -2
  555. package/build-module/validated-form-controls/components/checkbox-control.mjs +1 -0
  556. package/build-module/validated-form-controls/components/checkbox-control.mjs.map +2 -2
  557. package/build-module/validated-form-controls/components/combobox-control.mjs +2 -1
  558. package/build-module/validated-form-controls/components/combobox-control.mjs.map +2 -2
  559. package/build-module/validated-form-controls/components/custom-select-control.mjs +1 -0
  560. package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
  561. package/build-module/validated-form-controls/components/form-token-field.mjs +1 -0
  562. package/build-module/validated-form-controls/components/form-token-field.mjs.map +2 -2
  563. package/build-module/validated-form-controls/components/input-control.mjs +1 -0
  564. package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
  565. package/build-module/validated-form-controls/components/number-control.mjs +1 -0
  566. package/build-module/validated-form-controls/components/number-control.mjs.map +2 -2
  567. package/build-module/validated-form-controls/components/radio-control.mjs +1 -0
  568. package/build-module/validated-form-controls/components/radio-control.mjs.map +2 -2
  569. package/build-module/validated-form-controls/components/range-control.mjs +1 -0
  570. package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
  571. package/build-module/validated-form-controls/components/select-control.mjs +1 -0
  572. package/build-module/validated-form-controls/components/select-control.mjs.map +2 -2
  573. package/build-module/validated-form-controls/components/text-control.mjs +1 -0
  574. package/build-module/validated-form-controls/components/text-control.mjs.map +2 -2
  575. package/build-module/validated-form-controls/components/textarea-control.mjs +1 -0
  576. package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
  577. package/build-module/validated-form-controls/components/toggle-control.mjs +2 -1
  578. package/build-module/validated-form-controls/components/toggle-control.mjs.map +2 -2
  579. package/build-module/validated-form-controls/components/toggle-group-control.mjs +1 -0
  580. package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +2 -2
  581. package/build-module/validated-form-controls/control-with-error.mjs +4 -6
  582. package/build-module/validated-form-controls/control-with-error.mjs.map +2 -2
  583. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  584. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  585. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  586. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  587. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  588. package/build-types/animate/stories/index.story.d.ts +8 -8
  589. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  590. package/build-types/badge/stories/index.story.d.ts +1 -1
  591. package/build-types/badge/stories/index.story.d.ts.map +1 -1
  592. package/build-types/base-control/stories/index.story.d.ts +2 -2
  593. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  594. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  595. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  596. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  597. package/build-types/border-control/stories/index.story.d.ts +6 -6
  598. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  599. package/build-types/box-control/index.d.ts.map +1 -1
  600. package/build-types/box-control/stories/index.story.d.ts +8 -8
  601. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  602. package/build-types/button/deprecated.d.ts.map +1 -1
  603. package/build-types/button/index.d.ts +1 -1
  604. package/build-types/button/index.d.ts.map +1 -1
  605. package/build-types/button/stories/e2e/index.story.d.ts +2 -2
  606. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  607. package/build-types/button/stories/index.story.d.ts +9 -9
  608. package/build-types/button/stories/index.story.d.ts.map +1 -1
  609. package/build-types/button-group/index.d.ts.map +1 -1
  610. package/build-types/button-group/stories/index.story.d.ts +1 -1
  611. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  612. package/build-types/calendar/stories/date-calendar.story.d.ts +1 -1
  613. package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -1
  614. package/build-types/calendar/stories/date-range-calendar.story.d.ts +1 -1
  615. package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -1
  616. package/build-types/card/stories/index.story.d.ts +1 -1
  617. package/build-types/card/stories/index.story.d.ts.map +1 -1
  618. package/build-types/checkbox-control/stories/index.story.d.ts +1 -1
  619. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  620. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  621. package/build-types/circular-option-picker/circular-option-picker.d.ts +1 -0
  622. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  623. package/build-types/circular-option-picker/stories/index.story.d.ts +6 -6
  624. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  625. package/build-types/clipboard-button/index.d.ts.map +1 -1
  626. package/build-types/clipboard-button/types.d.ts +1 -0
  627. package/build-types/clipboard-button/types.d.ts.map +1 -1
  628. package/build-types/color-indicator/index.d.ts.map +1 -1
  629. package/build-types/color-indicator/stories/index.story.d.ts +1 -1
  630. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  631. package/build-types/color-palette/index.d.ts.map +1 -1
  632. package/build-types/color-palette/stories/index.story.d.ts +4 -4
  633. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  634. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  635. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  636. package/build-types/combobox-control/stories/index.story.d.ts +5 -5
  637. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  638. package/build-types/composite/legacy/stories/index.story.d.ts +1 -1
  639. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
  640. package/build-types/composite/legacy/stories/utils.d.ts +1 -1
  641. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  642. package/build-types/composite/stories/index.story.d.ts +1 -1
  643. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  644. package/build-types/confirm-dialog/stories/index.story.d.ts +3 -3
  645. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  646. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  647. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  648. package/build-types/custom-select-control/stories/index.story.d.ts +4 -4
  649. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  650. package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -4
  651. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  652. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  653. package/build-types/date-time/stories/date-time.story.d.ts +1 -1
  654. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  655. package/build-types/date-time/stories/date.story.d.ts +1 -1
  656. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  657. package/build-types/date-time/stories/time.story.d.ts +2 -2
  658. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  659. package/build-types/disabled/stories/index.story.d.ts +1 -1
  660. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  661. package/build-types/disclosure/index.d.ts.map +1 -1
  662. package/build-types/divider/stories/index.story.d.ts +1 -1
  663. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  664. package/build-types/draggable/stories/index.story.d.ts +1 -1
  665. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  666. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  667. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  668. package/build-types/dropdown/stories/index.story.d.ts +1 -1
  669. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  670. package/build-types/dropdown-menu/stories/index.story.d.ts +1 -1
  671. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  672. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  673. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  674. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +4 -4
  675. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  676. package/build-types/elevation/stories/index.story.d.ts +1 -1
  677. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  678. package/build-types/external-link/index.d.ts.map +1 -1
  679. package/build-types/external-link/stories/index.story.d.ts +1 -1
  680. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  681. package/build-types/flex/stories/index.story.d.ts +1 -1
  682. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  683. package/build-types/focal-point-picker/stories/index.story.d.ts +5 -5
  684. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  685. package/build-types/font-size-picker/index.d.ts.map +1 -1
  686. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +1 -1
  687. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  688. package/build-types/font-size-picker/stories/index.story.d.ts +1 -1
  689. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  690. package/build-types/form-file-upload/index.d.ts.map +1 -1
  691. package/build-types/form-file-upload/stories/index.story.d.ts +6 -6
  692. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  693. package/build-types/form-toggle/index.d.ts.map +1 -1
  694. package/build-types/form-toggle/stories/index.story.d.ts +1 -1
  695. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  696. package/build-types/form-token-field/stories/index.story.d.ts +1 -1
  697. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  698. package/build-types/form-token-field/token-input.d.ts.map +1 -1
  699. package/build-types/gradient-picker/stories/index.story.d.ts +4 -4
  700. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  701. package/build-types/grid/stories/index.story.d.ts +1 -1
  702. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  703. package/build-types/guide/stories/index.story.d.ts +2 -2
  704. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  705. package/build-types/h-stack/stories/e2e/index.story.d.ts +1 -1
  706. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  707. package/build-types/h-stack/stories/index.story.d.ts +1 -1
  708. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  709. package/build-types/heading/stories/index.story.d.ts +1 -1
  710. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  711. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  712. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  713. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  714. package/build-types/icon/stories/index.story.d.ts +5 -5
  715. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  716. package/build-types/input-control/index.d.ts.map +1 -1
  717. package/build-types/input-control/stories/index.story.d.ts +8 -8
  718. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  719. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  720. package/build-types/item-group/stories/index.story.d.ts +1 -1
  721. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  722. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  723. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  724. package/build-types/menu/stories/index.story.d.ts +1 -1
  725. package/build-types/menu/stories/index.story.d.ts.map +1 -1
  726. package/build-types/menu-group/stories/index.story.d.ts +2 -2
  727. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  728. package/build-types/menu-item/index.d.ts.map +1 -1
  729. package/build-types/menu-item/stories/index.story.d.ts +5 -5
  730. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  731. package/build-types/menu-items-choice/stories/index.story.d.ts +1 -1
  732. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  733. package/build-types/modal/index.d.ts.map +1 -1
  734. package/build-types/modal/stories/index.story.d.ts +1 -1
  735. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  736. package/build-types/navigable-container/menu.d.ts.map +1 -1
  737. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +1 -1
  738. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  739. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +1 -1
  740. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  741. package/build-types/navigable-container/tabbable.d.ts.map +1 -1
  742. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  743. package/build-types/navigation/stories/index.story.d.ts +7 -7
  744. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  745. package/build-types/navigation/stories/utils/controlled-state.d.ts +1 -1
  746. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  747. package/build-types/navigation/stories/utils/default.d.ts +1 -1
  748. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  749. package/build-types/navigation/stories/utils/group.d.ts +1 -1
  750. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  751. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +1 -1
  752. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  753. package/build-types/navigation/stories/utils/more-examples.d.ts +1 -1
  754. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  755. package/build-types/navigation/stories/utils/search.d.ts +1 -1
  756. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  757. package/build-types/navigator/stories/index.story.d.ts +1 -1
  758. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  759. package/build-types/notice/stories/index.story.d.ts +6 -6
  760. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  761. package/build-types/number-control/index.d.ts.map +1 -1
  762. package/build-types/number-control/stories/index.story.d.ts +2 -2
  763. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  764. package/build-types/palette-edit/stories/index.story.d.ts +3 -3
  765. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  766. package/build-types/panel/body.d.ts.map +1 -1
  767. package/build-types/panel/index.d.ts.map +1 -1
  768. package/build-types/panel/row.d.ts.map +1 -1
  769. package/build-types/panel/stories/index.story.d.ts +1 -1
  770. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  771. package/build-types/placeholder/stories/index.story.d.ts +1 -1
  772. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  773. package/build-types/popover/stories/index.story.d.ts +1 -1
  774. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  775. package/build-types/private-apis.d.ts.map +1 -1
  776. package/build-types/progress-bar/index.d.ts.map +1 -1
  777. package/build-types/progress-bar/stories/index.story.d.ts +2 -2
  778. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  779. package/build-types/query-controls/stories/index.story.d.ts +2 -2
  780. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  781. package/build-types/radio-control/stories/index.story.d.ts +1 -1
  782. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  783. package/build-types/radio-group/index.d.ts.map +1 -1
  784. package/build-types/radio-group/radio.d.ts.map +1 -1
  785. package/build-types/radio-group/stories/index.story.d.ts +1 -1
  786. package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
  787. package/build-types/range-control/index.d.ts.map +1 -1
  788. package/build-types/range-control/stories/index.story.d.ts +1 -1
  789. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  790. package/build-types/resizable-box/index.d.ts.map +1 -1
  791. package/build-types/resizable-box/stories/index.story.d.ts +3 -3
  792. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  793. package/build-types/responsive-wrapper/stories/index.story.d.ts +2 -2
  794. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  795. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  796. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  797. package/build-types/scroll-lock/stories/index.story.d.ts +1 -1
  798. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  799. package/build-types/scrollable/stories/index.story.d.ts +1 -1
  800. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  801. package/build-types/search-control/index.d.ts.map +1 -1
  802. package/build-types/search-control/stories/index.story.d.ts +2 -2
  803. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  804. package/build-types/select-control/index.d.ts.map +1 -1
  805. package/build-types/select-control/stories/index.story.d.ts +6 -6
  806. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  807. package/build-types/shortcut/stories/index.story.d.ts +2 -2
  808. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  809. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  810. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
  811. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
  812. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts +2 -3
  813. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  814. package/build-types/slot-fill/context.d.ts +2 -2
  815. package/build-types/slot-fill/context.d.ts.map +1 -1
  816. package/build-types/slot-fill/fill.d.ts +1 -1
  817. package/build-types/slot-fill/fill.d.ts.map +1 -1
  818. package/build-types/slot-fill/index.d.ts +3 -4
  819. package/build-types/slot-fill/index.d.ts.map +1 -1
  820. package/build-types/slot-fill/provider.d.ts.map +1 -1
  821. package/build-types/slot-fill/stories/index.story.d.ts +1 -1
  822. package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
  823. package/build-types/slot-fill/types.d.ts +23 -25
  824. package/build-types/slot-fill/types.d.ts.map +1 -1
  825. package/build-types/snackbar/index.d.ts.map +1 -1
  826. package/build-types/snackbar/stories/index.story.d.ts +1 -1
  827. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  828. package/build-types/snackbar/stories/list.story.d.ts +1 -1
  829. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  830. package/build-types/spacer/stories/index.story.d.ts +1 -1
  831. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  832. package/build-types/spinner/index.d.ts.map +1 -1
  833. package/build-types/spinner/stories/index.story.d.ts +1 -1
  834. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  835. package/build-types/surface/stories/index.story.d.ts +1 -1
  836. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  837. package/build-types/tab-panel/index.d.ts.map +1 -1
  838. package/build-types/tab-panel/stories/index.story.d.ts +5 -5
  839. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  840. package/build-types/tabs/stories/index.story.d.ts +8 -8
  841. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  842. package/build-types/text/stories/index.story.d.ts +4 -4
  843. package/build-types/text/stories/index.story.d.ts.map +1 -1
  844. package/build-types/text-control/index.d.ts.map +1 -1
  845. package/build-types/text-control/stories/index.story.d.ts +1 -1
  846. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  847. package/build-types/text-highlight/index.d.ts +4 -1
  848. package/build-types/text-highlight/index.d.ts.map +1 -1
  849. package/build-types/text-highlight/stories/index.story.d.ts +1 -1
  850. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  851. package/build-types/textarea-control/index.d.ts.map +1 -1
  852. package/build-types/textarea-control/stories/index.story.d.ts +1 -1
  853. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  854. package/build-types/theme/stories/index.story.d.ts +2 -2
  855. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  856. package/build-types/tip/stories/index.story.d.ts +1 -1
  857. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  858. package/build-types/toggle-control/index.d.ts.map +1 -1
  859. package/build-types/toggle-control/stories/index.story.d.ts +3 -3
  860. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  861. package/build-types/toggle-group-control/stories/index.story.d.ts +1 -1
  862. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  863. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  864. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  865. package/build-types/toolbar/stories/index.story.d.ts +4 -4
  866. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  867. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  868. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  869. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  870. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  871. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  872. package/build-types/tools-panel/stories/index.story.d.ts +1 -1
  873. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  874. package/build-types/tooltip/index.d.ts.map +1 -1
  875. package/build-types/tooltip/stories/index.story.d.ts +2 -2
  876. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  877. package/build-types/tree-grid/cell.d.ts.map +1 -1
  878. package/build-types/tree-grid/index.d.ts.map +1 -1
  879. package/build-types/tree-grid/item.d.ts.map +1 -1
  880. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  881. package/build-types/tree-grid/row.d.ts.map +1 -1
  882. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  883. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  884. package/build-types/tree-select/index.d.ts.map +1 -1
  885. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  886. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  887. package/build-types/truncate/stories/index.story.d.ts +1 -1
  888. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  889. package/build-types/unit-control/index.d.ts.map +1 -1
  890. package/build-types/unit-control/stories/index.story.d.ts +1 -1
  891. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  892. package/build-types/utils/dropdown-motion.d.ts.map +1 -1
  893. package/build-types/v-stack/stories/e2e/index.story.d.ts +1 -1
  894. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  895. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  896. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  897. package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
  898. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts +1 -1
  899. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -1
  900. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +1 -1
  901. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -1
  902. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +1 -1
  903. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -1
  904. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +1 -1
  905. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +1 -1
  906. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +1 -1
  907. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -1
  908. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts +1 -1
  909. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -1
  910. package/build-types/validated-form-controls/components/stories/overview.story.d.ts +1 -1
  911. package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
  912. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts +1 -1
  913. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -1
  914. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +1 -1
  915. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -1
  916. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts +1 -1
  917. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -1
  918. package/build-types/validated-form-controls/components/stories/story-utils.d.ts +1 -1
  919. package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +1 -1
  920. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts +1 -1
  921. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -1
  922. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +1 -1
  923. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -1
  924. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +1 -1
  925. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -1
  926. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +1 -1
  927. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -1
  928. package/build-types/view/stories/index.story.d.ts +1 -1
  929. package/build-types/view/stories/index.story.d.ts.map +1 -1
  930. package/build-types/visually-hidden/stories/index.story.d.ts +1 -1
  931. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  932. package/build-types/z-stack/stories/index.story.d.ts +1 -1
  933. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  934. package/package.json +26 -24
  935. package/src/alignment-matrix-control/stories/index.story.tsx +1 -1
  936. package/src/angle-picker-control/index.tsx +1 -0
  937. package/src/angle-picker-control/stories/index.story.tsx +1 -1
  938. package/src/animate/stories/index.story.tsx +1 -1
  939. package/src/badge/stories/index.story.tsx +1 -1
  940. package/src/base-control/stories/index.story.tsx +4 -2
  941. package/src/border-box-control/border-box-control-split-controls/component.tsx +9 -0
  942. package/src/border-box-control/stories/index.story.tsx +3 -1
  943. package/src/border-box-control/test/index.tsx +51 -20
  944. package/src/border-control/stories/index.story.tsx +2 -1
  945. package/src/border-control/test/index.js +37 -34
  946. package/src/box-control/index.tsx +6 -0
  947. package/src/box-control/stories/index.story.tsx +3 -2
  948. package/src/button/deprecated.tsx +2 -0
  949. package/src/button/index.tsx +16 -15
  950. package/src/button/stories/e2e/index.story.tsx +9 -5
  951. package/src/button/stories/index.story.tsx +14 -11
  952. package/src/button/test/index.tsx +0 -5
  953. package/src/button-group/index.tsx +1 -0
  954. package/src/button-group/stories/index.story.tsx +5 -3
  955. package/src/calendar/stories/date-calendar.story.tsx +1 -1
  956. package/src/calendar/stories/date-range-calendar.story.tsx +1 -1
  957. package/src/card/stories/index.story.tsx +4 -2
  958. package/src/checkbox-control/stories/index.story.tsx +1 -1
  959. package/src/circular-option-picker/circular-option-picker-option.tsx +2 -1
  960. package/src/circular-option-picker/circular-option-picker.tsx +2 -0
  961. package/src/circular-option-picker/stories/index.story.tsx +1 -1
  962. package/src/clipboard-button/index.tsx +2 -0
  963. package/src/clipboard-button/types.ts +1 -0
  964. package/src/color-indicator/index.tsx +1 -0
  965. package/src/color-indicator/stories/index.story.tsx +1 -1
  966. package/src/color-palette/index.tsx +1 -0
  967. package/src/color-palette/stories/index.story.tsx +1 -1
  968. package/src/color-picker/stories/index.story.tsx +1 -1
  969. package/src/combobox-control/index.tsx +1 -1
  970. package/src/combobox-control/stories/index.story.tsx +2 -1
  971. package/src/composite/legacy/stories/index.story.tsx +1 -1
  972. package/src/composite/legacy/stories/utils.tsx +1 -1
  973. package/src/composite/stories/index.story.tsx +1 -1
  974. package/src/confirm-dialog/stories/index.story.tsx +6 -2
  975. package/src/custom-gradient-picker/stories/index.story.tsx +1 -1
  976. package/src/custom-select-control/stories/index.story.tsx +2 -1
  977. package/src/custom-select-control-v2/stories/index.story.tsx +1 -1
  978. package/src/date-time/date-time/index.tsx +1 -0
  979. package/src/date-time/stories/date-time.story.tsx +1 -1
  980. package/src/date-time/stories/date.story.tsx +1 -1
  981. package/src/date-time/stories/time.story.tsx +1 -1
  982. package/src/disabled/stories/index.story.tsx +1 -1
  983. package/src/disclosure/index.tsx +1 -0
  984. package/src/divider/stories/index.story.tsx +1 -1
  985. package/src/draggable/stories/index.story.tsx +1 -1
  986. package/src/drop-zone/stories/index.story.tsx +1 -1
  987. package/src/dropdown/stories/index.story.tsx +2 -1
  988. package/src/dropdown-menu/stories/index.story.tsx +1 -1
  989. package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
  990. package/src/duotone-picker/stories/duotone-swatch.story.tsx +1 -1
  991. package/src/elevation/stories/index.story.tsx +1 -1
  992. package/src/external-link/index.tsx +1 -0
  993. package/src/external-link/stories/index.story.tsx +1 -1
  994. package/src/flex/stories/index.story.tsx +1 -1
  995. package/src/focal-point-picker/stories/index.story.tsx +1 -1
  996. package/src/font-size-picker/index.tsx +1 -0
  997. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -1
  998. package/src/font-size-picker/stories/index.story.tsx +2 -1
  999. package/src/form-file-upload/index.tsx +2 -0
  1000. package/src/form-file-upload/stories/index.story.tsx +2 -2
  1001. package/src/form-toggle/index.tsx +1 -0
  1002. package/src/form-toggle/stories/index.story.tsx +1 -1
  1003. package/src/form-token-field/stories/index.story.tsx +3 -1
  1004. package/src/form-token-field/token-input.tsx +1 -0
  1005. package/src/form-token-field/token.tsx +2 -2
  1006. package/src/gradient-picker/stories/index.story.tsx +1 -1
  1007. package/src/grid/stories/index.story.tsx +1 -1
  1008. package/src/guide/stories/index.story.tsx +6 -2
  1009. package/src/h-stack/stories/e2e/index.story.tsx +1 -1
  1010. package/src/h-stack/stories/index.story.tsx +1 -1
  1011. package/src/heading/stories/index.story.tsx +1 -1
  1012. package/src/higher-order/navigate-regions/index.tsx +7 -5
  1013. package/src/higher-order/with-fallback-styles/index.tsx +1 -1
  1014. package/src/higher-order/with-focus-outside/index.tsx +25 -24
  1015. package/src/higher-order/with-spoken-messages/index.tsx +10 -7
  1016. package/src/icon/stories/index.story.tsx +1 -1
  1017. package/src/input-control/index.tsx +1 -0
  1018. package/src/input-control/stories/index.story.tsx +3 -2
  1019. package/src/input-control/styles/input-control-styles.tsx +0 -4
  1020. package/src/item-group/stories/index.story.tsx +1 -1
  1021. package/src/keyboard-shortcuts/stories/index.story.tsx +1 -1
  1022. package/src/menu/stories/index.story.tsx +5 -2
  1023. package/src/menu-group/stories/index.story.tsx +1 -1
  1024. package/src/menu-item/index.tsx +1 -0
  1025. package/src/menu-item/stories/index.story.tsx +1 -1
  1026. package/src/menu-items-choice/stories/index.story.tsx +1 -1
  1027. package/src/modal/index.tsx +1 -0
  1028. package/src/modal/stories/index.story.tsx +11 -3
  1029. package/src/navigable-container/menu.tsx +1 -0
  1030. package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
  1031. package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
  1032. package/src/navigable-container/tabbable.tsx +1 -0
  1033. package/src/navigation/back-button/index.tsx +1 -0
  1034. package/src/navigation/stories/index.story.tsx +1 -1
  1035. package/src/navigation/stories/utils/controlled-state.tsx +4 -1
  1036. package/src/navigation/stories/utils/default.tsx +1 -1
  1037. package/src/navigation/stories/utils/group.tsx +1 -1
  1038. package/src/navigation/stories/utils/hide-if-empty.tsx +1 -1
  1039. package/src/navigation/stories/utils/more-examples.tsx +1 -1
  1040. package/src/navigation/stories/utils/search.tsx +1 -1
  1041. package/src/navigator/stories/index.story.tsx +2 -1
  1042. package/src/navigator/test/index.tsx +1 -1
  1043. package/src/notice/stories/index.story.tsx +1 -1
  1044. package/src/number-control/index.tsx +1 -0
  1045. package/src/number-control/stories/index.story.tsx +2 -1
  1046. package/src/palette-edit/stories/index.story.tsx +1 -1
  1047. package/src/panel/body.tsx +1 -0
  1048. package/src/panel/index.tsx +1 -0
  1049. package/src/panel/row.tsx +1 -0
  1050. package/src/panel/stories/index.story.tsx +1 -1
  1051. package/src/placeholder/stories/index.story.tsx +1 -1
  1052. package/src/popover/stories/index.story.tsx +9 -2
  1053. package/src/private-apis.ts +2 -0
  1054. package/src/progress-bar/index.tsx +1 -0
  1055. package/src/progress-bar/stories/index.story.tsx +1 -1
  1056. package/src/query-controls/stories/index.story.tsx +1 -1
  1057. package/src/radio-control/stories/index.story.tsx +1 -1
  1058. package/src/radio-group/index.tsx +1 -0
  1059. package/src/radio-group/radio.tsx +3 -0
  1060. package/src/radio-group/stories/index.story.tsx +1 -1
  1061. package/src/range-control/index.tsx +1 -0
  1062. package/src/range-control/stories/index.story.tsx +5 -1
  1063. package/src/resizable-box/index.tsx +1 -0
  1064. package/src/resizable-box/stories/index.story.tsx +1 -1
  1065. package/src/responsive-wrapper/stories/index.story.tsx +1 -1
  1066. package/src/sandbox/stories/index.story.tsx +1 -1
  1067. package/src/scroll-lock/stories/index.story.tsx +6 -2
  1068. package/src/scrollable/stories/index.story.tsx +1 -1
  1069. package/src/search-control/index.tsx +1 -0
  1070. package/src/search-control/stories/index.story.tsx +1 -1
  1071. package/src/select-control/index.tsx +3 -0
  1072. package/src/select-control/stories/index.story.tsx +3 -1
  1073. package/src/shortcut/stories/index.story.tsx +1 -1
  1074. package/src/slot-fill/bubbles-virtually/slot.tsx +16 -9
  1075. package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +30 -4
  1076. package/src/slot-fill/bubbles-virtually/use-slot.ts +7 -3
  1077. package/src/slot-fill/context.ts +15 -4
  1078. package/src/slot-fill/fill.tsx +74 -0
  1079. package/src/slot-fill/index.tsx +17 -33
  1080. package/src/slot-fill/provider.tsx +49 -35
  1081. package/src/slot-fill/slot.tsx +4 -4
  1082. package/src/slot-fill/stories/index.story.tsx +1 -1
  1083. package/src/slot-fill/test/__snapshots__/slot.js.snap +14 -0
  1084. package/src/slot-fill/test/slot.js +24 -1
  1085. package/src/slot-fill/types.ts +16 -32
  1086. package/src/snackbar/index.tsx +1 -0
  1087. package/src/snackbar/stories/index.story.tsx +1 -1
  1088. package/src/snackbar/stories/list.story.tsx +1 -1
  1089. package/src/spacer/stories/index.story.tsx +1 -1
  1090. package/src/spinner/index.tsx +1 -0
  1091. package/src/spinner/stories/index.story.tsx +1 -1
  1092. package/src/surface/stories/index.story.tsx +1 -1
  1093. package/src/tab-panel/index.tsx +1 -0
  1094. package/src/tab-panel/stories/index.story.tsx +1 -1
  1095. package/src/tabs/stories/index.story.tsx +11 -3
  1096. package/src/text/stories/index.story.tsx +1 -1
  1097. package/src/text-control/index.tsx +1 -0
  1098. package/src/text-control/stories/index.story.tsx +2 -1
  1099. package/src/text-highlight/index.tsx +2 -0
  1100. package/src/text-highlight/stories/index.story.tsx +1 -1
  1101. package/src/textarea-control/index.tsx +1 -0
  1102. package/src/textarea-control/stories/index.story.tsx +1 -1
  1103. package/src/theme/stories/index.story.tsx +8 -4
  1104. package/src/tip/stories/index.story.tsx +1 -1
  1105. package/src/toggle-control/index.tsx +1 -0
  1106. package/src/toggle-control/stories/index.story.tsx +1 -1
  1107. package/src/toggle-group-control/stories/index.story.tsx +1 -1
  1108. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +1 -0
  1109. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -0
  1110. package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -0
  1111. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -0
  1112. package/src/toolbar/stories/index.story.tsx +1 -1
  1113. package/src/toolbar/toolbar/index.tsx +1 -0
  1114. package/src/toolbar/toolbar/toolbar-container.tsx +1 -0
  1115. package/src/toolbar/toolbar-button/index.tsx +1 -0
  1116. package/src/toolbar/toolbar-dropdown-menu/index.tsx +1 -0
  1117. package/src/toolbar/toolbar-item/index.tsx +1 -0
  1118. package/src/tools-panel/stories/index.story.tsx +1 -1
  1119. package/src/tooltip/index.tsx +1 -0
  1120. package/src/tooltip/stories/index.story.tsx +14 -4
  1121. package/src/tree-grid/cell.tsx +1 -0
  1122. package/src/tree-grid/index.tsx +1 -0
  1123. package/src/tree-grid/item.tsx +1 -0
  1124. package/src/tree-grid/roving-tab-index-item.tsx +1 -0
  1125. package/src/tree-grid/row.tsx +1 -0
  1126. package/src/tree-grid/stories/index.story.tsx +6 -2
  1127. package/src/tree-select/index.tsx +2 -0
  1128. package/src/tree-select/stories/index.story.tsx +2 -1
  1129. package/src/truncate/stories/index.story.tsx +1 -1
  1130. package/src/unit-control/index.tsx +1 -0
  1131. package/src/unit-control/stories/index.story.tsx +3 -1
  1132. package/src/utils/dropdown-motion.ts +1 -0
  1133. package/src/v-stack/stories/e2e/index.story.tsx +1 -1
  1134. package/src/v-stack/stories/index.story.tsx +1 -1
  1135. package/src/validated-form-controls/components/checkbox-control.tsx +1 -0
  1136. package/src/validated-form-controls/components/combobox-control.tsx +1 -0
  1137. package/src/validated-form-controls/components/custom-select-control.tsx +1 -0
  1138. package/src/validated-form-controls/components/form-token-field.tsx +1 -0
  1139. package/src/validated-form-controls/components/input-control.tsx +1 -0
  1140. package/src/validated-form-controls/components/number-control.tsx +1 -0
  1141. package/src/validated-form-controls/components/radio-control.tsx +1 -0
  1142. package/src/validated-form-controls/components/range-control.tsx +1 -0
  1143. package/src/validated-form-controls/components/select-control.tsx +1 -0
  1144. package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +1 -1
  1145. package/src/validated-form-controls/components/stories/combobox-control.story.tsx +1 -1
  1146. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +1 -1
  1147. package/src/validated-form-controls/components/stories/form-token-field.story.tsx +1 -1
  1148. package/src/validated-form-controls/components/stories/input-control.story.tsx +1 -1
  1149. package/src/validated-form-controls/components/stories/number-control.story.tsx +1 -1
  1150. package/src/validated-form-controls/components/stories/overview.story.tsx +1 -1
  1151. package/src/validated-form-controls/components/stories/radio-control.story.tsx +1 -1
  1152. package/src/validated-form-controls/components/stories/range-control.story.tsx +1 -1
  1153. package/src/validated-form-controls/components/stories/select-control.story.tsx +1 -1
  1154. package/src/validated-form-controls/components/stories/story-utils.tsx +1 -1
  1155. package/src/validated-form-controls/components/stories/text-control.story.tsx +1 -1
  1156. package/src/validated-form-controls/components/stories/textarea-control.story.tsx +1 -1
  1157. package/src/validated-form-controls/components/stories/toggle-control.story.tsx +1 -1
  1158. package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +1 -1
  1159. package/src/validated-form-controls/components/text-control.tsx +1 -0
  1160. package/src/validated-form-controls/components/textarea-control.tsx +1 -0
  1161. package/src/validated-form-controls/components/toggle-control.tsx +1 -0
  1162. package/src/validated-form-controls/components/toggle-group-control.tsx +1 -0
  1163. package/src/validated-form-controls/control-with-error.tsx +1 -0
  1164. package/src/view/stories/index.story.tsx +1 -1
  1165. package/src/visually-hidden/stories/index.story.tsx +1 -1
  1166. package/src/z-stack/stories/index.story.tsx +1 -1
  1167. package/build/slot-fill/bubbles-virtually/fill.cjs +0 -63
  1168. package/build/slot-fill/bubbles-virtually/fill.cjs.map +0 -7
  1169. package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs +0 -59
  1170. package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs.map +0 -7
  1171. package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs +0 -105
  1172. package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs.map +0 -7
  1173. package/build-module/slot-fill/bubbles-virtually/fill.mjs +0 -32
  1174. package/build-module/slot-fill/bubbles-virtually/fill.mjs.map +0 -7
  1175. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs +0 -28
  1176. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs.map +0 -7
  1177. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs +0 -74
  1178. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs.map +0 -7
  1179. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -3
  1180. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +0 -1
  1181. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -7
  1182. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +0 -1
  1183. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -3
  1184. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +0 -1
  1185. package/src/slot-fill/bubbles-virtually/fill.tsx +0 -50
  1186. package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +0 -34
  1187. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +0 -106
  1188. package/src/slot-fill/fill.ts +0 -32
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/custom-gradient-picker/utils.ts"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport gradientParser from 'gradient-parser';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * Internal dependencies\n */\nimport { DEFAULT_GRADIENT, HORIZONTAL_GRADIENT_ORIENTATION, DIRECTIONAL_ORIENTATION_ANGLE_MAP } from './constants';\nimport { serializeGradient } from './serializer';\nextend([namesPlugin]);\nexport function getLinearGradientRepresentation(gradientAST) {\n return serializeGradient({\n type: 'linear-gradient',\n orientation: HORIZONTAL_GRADIENT_ORIENTATION,\n colorStops: gradientAST.colorStops\n });\n}\nfunction hasUnsupportedLength(item) {\n return item.length === undefined || item.length.type !== '%';\n}\nexport function getGradientAstWithDefault(value) {\n // gradientAST will contain the gradient AST as parsed by gradient-parser npm module.\n // More information of its structure available at https://www.npmjs.com/package/gradient-parser#ast.\n let gradientAST;\n let hasGradient = !!value;\n const valueToParse = value !== null && value !== void 0 ? value : DEFAULT_GRADIENT;\n try {\n gradientAST = gradientParser.parse(valueToParse)[0];\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn('wp.components.CustomGradientPicker failed to parse the gradient with error', error);\n gradientAST = gradientParser.parse(DEFAULT_GRADIENT)[0];\n hasGradient = false;\n }\n if (!Array.isArray(gradientAST.orientation) && gradientAST.orientation?.type === 'directional') {\n gradientAST.orientation = {\n type: 'angular',\n value: DIRECTIONAL_ORIENTATION_ANGLE_MAP[gradientAST.orientation.value].toString()\n };\n }\n if (gradientAST.colorStops.some(hasUnsupportedLength)) {\n const {\n colorStops\n } = gradientAST;\n const step = 100 / (colorStops.length - 1);\n colorStops.forEach((stop, index) => {\n stop.length = {\n value: `${step * index}`,\n type: '%'\n };\n });\n }\n return {\n gradientAST,\n hasGradient\n };\n}\nexport function getGradientAstWithControlPoints(gradientAST, newControlPoints) {\n return {\n ...gradientAST,\n colorStops: newControlPoints.map(({\n position,\n color\n }) => {\n const {\n r,\n g,\n b,\n a\n } = colord(color).toRgb();\n return {\n length: {\n type: '%',\n value: position?.toString()\n },\n type: a < 1 ? 'rgba' : 'rgb',\n value: a < 1 ? [`${r}`, `${g}`, `${b}`, `${a}`] : [`${r}`, `${g}`, `${b}`]\n };\n })\n };\n}\nexport function getStopCssColor(colorStop) {\n switch (colorStop.type) {\n case 'hex':\n return `#${colorStop.value}`;\n case 'literal':\n return colorStop.value;\n case 'var':\n return `${colorStop.type}(${colorStop.value})`;\n case 'rgb':\n case 'rgba':\n return `${colorStop.type}(${colorStop.value.join(',')})`;\n case 'hsl':\n {\n const [hue, saturation, lightness] = colorStop.value;\n return `hsl(${hue},${saturation}%,${lightness}%)`;\n }\n case 'hsla':\n {\n const [hue, saturation, lightness, alpha] = colorStop.value;\n return `hsla(${hue},${saturation}%,${lightness}%,${alpha})`;\n }\n default:\n // Should be unreachable if passing an AST from gradient-parser.\n // See https://github.com/rafaelcaricio/gradient-parser#ast.\n return 'transparent';\n }\n}"],
5
- "mappings": ";AAGA,OAAO,oBAAoB;AAC3B,SAAS,QAAQ,cAAc;AAC/B,OAAO,iBAAiB;AAKxB,SAAS,kBAAkB,iCAAiC,yCAAyC;AACrG,SAAS,yBAAyB;AAClC,OAAO,CAAC,WAAW,CAAC;AACb,SAAS,gCAAgC,aAAa;AAC3D,SAAO,kBAAkB;AAAA,IACvB,MAAM;AAAA,IACN,aAAa;AAAA,IACb,YAAY,YAAY;AAAA,EAC1B,CAAC;AACH;AACA,SAAS,qBAAqB,MAAM;AAClC,SAAO,KAAK,WAAW,UAAa,KAAK,OAAO,SAAS;AAC3D;AACO,SAAS,0BAA0B,OAAO;AAG/C,MAAI;AACJ,MAAI,cAAc,CAAC,CAAC;AACpB,QAAM,eAAe,UAAU,QAAQ,UAAU,SAAS,QAAQ;AAClE,MAAI;AACF,kBAAc,eAAe,MAAM,YAAY,EAAE,CAAC;AAAA,EACpD,SAAS,OAAO;AAEd,YAAQ,KAAK,8EAA8E,KAAK;AAChG,kBAAc,eAAe,MAAM,gBAAgB,EAAE,CAAC;AACtD,kBAA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AU;AAAA,IACnB,KAAK;AACH,aAAO,GAAG,UAAU,IAAI,IAAI,UAAU,KAAK;AAAA,IAC7C,KAAK;AAAA,IACL,KAAK;AACH,aAAO,GAAG,UAAU,IAAI,IAAI,UAAU,MAAM,KAAK,GAAG,CAAC;AAAA,IACvD,KAAK,OACH;AACE,YAAM,CAAC,KAAK,YAAY,SAAS,IAAI,UAAU;AAC/C,aAAO,OAAO,GAAG,IAAI,UAAU,KAAK,SAAS;AAAA,IAC/C;AAAA,IACF,KAAK,QACH;AACE,YAAM,CAAC,KAAK,YAAY,WAAW,KAAK,IAAI,UAAU;AACtD,aAAO,QAAQ,GAAG,IAAI,UAAU,KAAK,SAAS,KAAK,KAAK;AAAA,IAC1D;AAAA,IACF;AAGE,aAAO;AAAA,EACX;AACF;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport gradientParser from 'gradient-parser';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * Internal dependencies\n */\nimport { DEFAULT_GRADIENT, HORIZONTAL_GRADIENT_ORIENTATION, DIRECTIONAL_ORIENTATION_ANGLE_MAP } from './constants';\nimport { serializeGradient } from './serializer';\nextend([namesPlugin]);\nexport function getLinearGradientRepresentation(gradientAST) {\n return serializeGradient({\n type: 'linear-gradient',\n orientation: HORIZONTAL_GRADIENT_ORIENTATION,\n colorStops: gradientAST.colorStops\n });\n}\nfunction hasUnsupportedLength(item) {\n return item.length === undefined || item.length.type !== '%';\n}\nexport function getGradientAstWithDefault(value) {\n // gradientAST will contain the gradient AST as parsed by gradient-parser npm module.\n // More information of its structure available at https://www.npmjs.com/package/gradient-parser#ast.\n let gradientAST;\n let hasGradient = !!value;\n const valueToParse = value ?? DEFAULT_GRADIENT;\n try {\n gradientAST = gradientParser.parse(valueToParse)[0];\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn('wp.components.CustomGradientPicker failed to parse the gradient with error', error);\n gradientAST = gradientParser.parse(DEFAULT_GRADIENT)[0];\n hasGradient = false;\n }\n if (!Array.isArray(gradientAST.orientation) && gradientAST.orientation?.type === 'directional') {\n gradientAST.orientation = {\n type: 'angular',\n value: DIRECTIONAL_ORIENTATION_ANGLE_MAP[gradientAST.orientation.value].toString()\n };\n }\n if (gradientAST.colorStops.some(hasUnsupportedLength)) {\n const {\n colorStops\n } = gradientAST;\n const step = 100 / (colorStops.length - 1);\n colorStops.forEach((stop, index) => {\n stop.length = {\n value: `${step * index}`,\n type: '%'\n };\n });\n }\n return {\n gradientAST,\n hasGradient\n };\n}\nexport function getGradientAstWithControlPoints(gradientAST, newControlPoints) {\n return {\n ...gradientAST,\n colorStops: newControlPoints.map(({\n position,\n color\n }) => {\n const {\n r,\n g,\n b,\n a\n } = colord(color).toRgb();\n return {\n length: {\n type: '%',\n value: position?.toString()\n },\n type: a < 1 ? 'rgba' : 'rgb',\n value: a < 1 ? [`${r}`, `${g}`, `${b}`, `${a}`] : [`${r}`, `${g}`, `${b}`]\n };\n })\n };\n}\nexport function getStopCssColor(colorStop) {\n switch (colorStop.type) {\n case 'hex':\n return `#${colorStop.value}`;\n case 'literal':\n return colorStop.value;\n case 'var':\n return `${colorStop.type}(${colorStop.value})`;\n case 'rgb':\n case 'rgba':\n return `${colorStop.type}(${colorStop.value.join(',')})`;\n case 'hsl':\n {\n const [hue, saturation, lightness] = colorStop.value;\n return `hsl(${hue},${saturation}%,${lightness}%)`;\n }\n case 'hsla':\n {\n const [hue, saturation, lightness, alpha] = colorStop.value;\n return `hsla(${hue},${saturation}%,${lightness}%,${alpha})`;\n }\n default:\n // Should be unreachable if passing an AST from gradient-parser.\n // See https://github.com/rafaelcaricio/gradient-parser#ast.\n return 'transparent';\n }\n}"],
5
+ "mappings": ";AAGA,OAAO,oBAAoB;AAC3B,SAAS,QAAQ,cAAc;AAC/B,OAAO,iBAAiB;AAKxB,SAAS,kBAAkB,iCAAiC,yCAAyC;AACrG,SAAS,yBAAyB;AAClC,OAAO,CAAC,WAAW,CAAC;AACb,SAAS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AAAA,QACL,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,OAAO,UAAU,SAAS;AAAA,QAC5B;AAAA,QACA,MAAM,IAAI,IAAI,SAAS;AAAA,QACvB,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE;AAAA,MAC3E;AAAA,IACF,CAAC;AAAA,EACH;AACF;AACO,SAAS,gBAAgB,WAAW;AACzC,UAAQ,UAAU,MAAM;AAAA,IACtB,KAAK;AACH,aAAO,IAAI,UAAU,KAAK;AAAA,IAC5B,KAAK;AACH,aAAO,UAAU;AAAA,IACnB,KAAK;AACH,aAAO,GAAG,UAAU,IAAI,IAAI,UAAU,KAAK;AAAA,IAC7C,KAAK;AAAA,IACL,KAAK;AACH,aAAO,GAAG,UAAU,IAAI,IAAI,UAAU,MAAM,KAAK,GAAG,CAAC;AAAA,IACvD,KAAK,OACH;AACE,YAAM,CAAC,KAAK,YAAY,SAAS,IAAI,UAAU;AAC/C,aAAO,OAAO,GAAG,IAAI,UAAU,KAAK,SAAS;AAAA,IAC/C;AAAA,IACF,KAAK,QACH;AACE,YAAM,CAAC,KAAK,YAAY,WAAW,KAAK,IAAI,UAAU;AACtD,aAAO,QAAQ,GAAG,IAAI,UAAU,KAAK,SAAS,KAAK,KAAK;AAAA,IAC1D;AAAA,IACF;AAGE,aAAO;AAAA,EACX;AACF;",
6
6
  "names": []
7
7
  }
@@ -34,7 +34,6 @@ function getDescribedBy(currentName, describedBy) {
34
34
  return sprintf(__("Currently selected: %s"), currentName);
35
35
  }
36
36
  function CustomSelectControl(props) {
37
- var _options$map$find;
38
37
  const {
39
38
  __next40pxDefaultSize = false,
40
39
  __shouldNotWarnDeprecated36pxSize,
@@ -109,9 +108,9 @@ function CustomSelectControl(props) {
109
108
  }, key);
110
109
  });
111
110
  const currentValue = Ariakit.useStoreState(store, "value");
112
- const selectedOption = (_options$map$find = options?.map(applyOptionDeprecations)?.find(({
111
+ const selectedOption = options?.map(applyOptionDeprecations)?.find(({
113
112
  key
114
- }) => currentValue === key)) !== null && _options$map$find !== void 0 ? _options$map$find : options[0];
113
+ }) => currentValue === key) ?? options[0];
115
114
  const renderSelectedValue = () => {
116
115
  if (!showSelectedHint || !selectedOption.hint) {
117
116
  return selectedOption?.name;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/custom-select-control/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\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 { VisuallyHidden } from '../visually-hidden';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nfunction useDeprecatedProps({\n __experimentalShowSelectedHint,\n ...otherProps\n}) {\n return {\n showSelectedHint: __experimentalShowSelectedHint,\n ...otherProps\n };\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 __experimentalHint,\n ...rest\n}) {\n return {\n hint: __experimentalHint,\n ...rest\n };\n}\nfunction getDescribedBy(currentName, describedBy) {\n if (describedBy) {\n return describedBy;\n }\n\n // translators: %s: The selected option.\n return sprintf(__('Currently selected: %s'), currentName);\n}\nfunction CustomSelectControl(props) {\n var _options$map$find;\n const {\n __next40pxDefaultSize = false,\n __shouldNotWarnDeprecated36pxSize,\n describedBy,\n options,\n onChange,\n size = 'default',\n value,\n className: classNameProp,\n showSelectedHint = false,\n ...restProps\n } = useDeprecatedProps(props);\n maybeWarnDeprecated36pxSize({\n componentName: 'CustomSelectControl',\n __next40pxDefaultSize,\n size,\n __shouldNotWarnDeprecated36pxSize\n });\n const descriptionId = useInstanceId(CustomSelectControl, 'custom-select-control__description');\n\n // Forward props + store from v2 implementation\n const store = Ariakit.useSelectStore({\n async setValue(nextValue) {\n const nextOption = options.find(item => item.key === nextValue);\n if (!onChange || !nextOption) {\n return;\n }\n\n // Executes the logic in a microtask after the popup is closed.\n // This is simply to ensure the isOpen state matches the one from the\n // previous legacy implementation.\n await Promise.resolve();\n const state = store.getState();\n const changeObject = {\n highlightedIndex: state.renderedItems.findIndex(item => item.value === nextValue),\n inputValue: '',\n isOpen: state.open,\n selectedItem: nextOption,\n type: ''\n };\n onChange(changeObject);\n },\n value: value?.key,\n // Setting the first option as a default value when no value is provided\n // is already done natively by the underlying Ariakit component,\n // but doing this explicitly avoids the `onChange` callback from firing\n // on initial render, thus making this implementation closer to the v1.\n defaultValue: options[0]?.key\n });\n const children = options.map(applyOptionDeprecations).map(({\n name,\n key,\n hint,\n style,\n className\n }) => {\n const withHint = /*#__PURE__*/_jsxs(Styled.WithHintItemWrapper, {\n children: [/*#__PURE__*/_jsx(\"span\", {\n children: name\n }), /*#__PURE__*/_jsx(Styled.WithHintItemHint, {\n // Keeping the classname for legacy reasons\n className: \"components-custom-select-control__item-hint\",\n children: hint\n })]\n });\n return /*#__PURE__*/_jsx(CustomSelectItem, {\n value: key,\n children: hint ? withHint : name,\n style: style,\n className: clsx(className,\n // Keeping the classnames for legacy reasons\n 'components-custom-select-control__item', {\n 'has-hint': hint\n })\n }, key);\n });\n const currentValue = Ariakit.useStoreState(store, 'value');\n const selectedOption = (_options$map$find = options?.map(applyOptionDeprecations)?.find(({\n key\n }) => currentValue === key)) !== null && _options$map$find !== void 0 ? _options$map$find : options[0];\n const renderSelectedValue = () => {\n if (!showSelectedHint || !selectedOption.hint) {\n return selectedOption?.name;\n }\n return /*#__PURE__*/_jsxs(Styled.SelectedExperimentalHintWrapper, {\n children: [selectedOption?.name, /*#__PURE__*/_jsx(Styled.SelectedExperimentalHintItem, {\n // Keeping the classname for legacy reasons\n className: \"components-custom-select-control__hint\",\n children: selectedOption?.hint\n })]\n });\n };\n const translatedSize = (() => {\n if (__next40pxDefaultSize && size === 'default' || size === '__unstable-large') {\n return 'default';\n }\n if (!__next40pxDefaultSize && size === 'default') {\n return 'compact';\n }\n return size;\n })();\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(_CustomSelect, {\n \"aria-describedby\": descriptionId,\n renderSelectedValue: renderSelectedValue,\n size: translatedSize,\n store: store,\n className: clsx(\n // Keeping the classname for legacy reasons\n 'components-custom-select-control', classNameProp),\n isLegacy: true,\n ...restProps,\n children: children\n }), /*#__PURE__*/_jsx(VisuallyHidden, {\n children: /*#__PURE__*/_jsx(\"span\", {\n id: descriptionId,\n children: getDescribedBy(selectedOption?.name, describedBy)\n })\n })]\n });\n}\nexport default CustomSelectControl;"],
5
- "mappings": ";AAGA,YAAY,aAAa;AACzB,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,IAAI,eAAe;AAK5B,OAAO,mBAAmB;AAC1B,OAAO,sBAAsB;AAC7B,YAAY,YAAY;AACxB,SAAS,sBAAsB;AAC/B,SAAS,mCAAmC;AAC5C,SAAS,OAAO,MAAM,QAAQ,OAAO,YAAY,iBAAiB;AAClE,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAAG;AACD,SAAO;AAAA,IACL,kBAAkB;AAAA,IAClB,GAAG;AAAA,EACL;AACF;AAKA,SAAS,wBAAwB;AAAA,EAC/B;AAAA,EACA,GAAG;AACL,GAAG;AACD,SAAO;AAAA,IACL,MAAM;AAAA,IACN,GAAG;AAAA,EACL;AACF;AACA,SAAS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AG;AAAA,MACH;AAAA,IACF,CAAC,GAAgB,qBAAK,gBAAgB;AAAA,MACpC,UAAuB,qBAAK,QAAQ;AAAA,QAClC,IAAI;AAAA,QACJ,UAAU,eAAe,gBAAgB,MAAM,WAAW;AAAA,MAC5D,CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACA,IAAO,gCAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\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 { VisuallyHidden } from '../visually-hidden';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nfunction useDeprecatedProps({\n __experimentalShowSelectedHint,\n ...otherProps\n}) {\n return {\n showSelectedHint: __experimentalShowSelectedHint,\n ...otherProps\n };\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 __experimentalHint,\n ...rest\n}) {\n return {\n hint: __experimentalHint,\n ...rest\n };\n}\nfunction getDescribedBy(currentName, describedBy) {\n if (describedBy) {\n return describedBy;\n }\n\n // translators: %s: The selected option.\n return sprintf(__('Currently selected: %s'), currentName);\n}\nfunction CustomSelectControl(props) {\n const {\n __next40pxDefaultSize = false,\n __shouldNotWarnDeprecated36pxSize,\n describedBy,\n options,\n onChange,\n size = 'default',\n value,\n className: classNameProp,\n showSelectedHint = false,\n ...restProps\n } = useDeprecatedProps(props);\n maybeWarnDeprecated36pxSize({\n componentName: 'CustomSelectControl',\n __next40pxDefaultSize,\n size,\n __shouldNotWarnDeprecated36pxSize\n });\n const descriptionId = useInstanceId(CustomSelectControl, 'custom-select-control__description');\n\n // Forward props + store from v2 implementation\n const store = Ariakit.useSelectStore({\n async setValue(nextValue) {\n const nextOption = options.find(item => item.key === nextValue);\n if (!onChange || !nextOption) {\n return;\n }\n\n // Executes the logic in a microtask after the popup is closed.\n // This is simply to ensure the isOpen state matches the one from the\n // previous legacy implementation.\n await Promise.resolve();\n const state = store.getState();\n const changeObject = {\n highlightedIndex: state.renderedItems.findIndex(item => item.value === nextValue),\n inputValue: '',\n isOpen: state.open,\n selectedItem: nextOption,\n type: ''\n };\n onChange(changeObject);\n },\n value: value?.key,\n // Setting the first option as a default value when no value is provided\n // is already done natively by the underlying Ariakit component,\n // but doing this explicitly avoids the `onChange` callback from firing\n // on initial render, thus making this implementation closer to the v1.\n defaultValue: options[0]?.key\n });\n const children = options.map(applyOptionDeprecations).map(({\n name,\n key,\n hint,\n style,\n className\n }) => {\n const withHint = /*#__PURE__*/_jsxs(Styled.WithHintItemWrapper, {\n children: [/*#__PURE__*/_jsx(\"span\", {\n children: name\n }), /*#__PURE__*/_jsx(Styled.WithHintItemHint, {\n // Keeping the classname for legacy reasons\n className: \"components-custom-select-control__item-hint\",\n children: hint\n })]\n });\n return /*#__PURE__*/_jsx(CustomSelectItem, {\n value: key,\n children: hint ? withHint : name,\n style: style,\n className: clsx(className,\n // Keeping the classnames for legacy reasons\n 'components-custom-select-control__item', {\n 'has-hint': hint\n })\n }, key);\n });\n const currentValue = Ariakit.useStoreState(store, 'value');\n const selectedOption = options?.map(applyOptionDeprecations)?.find(({\n key\n }) => currentValue === key) ?? options[0];\n const renderSelectedValue = () => {\n if (!showSelectedHint || !selectedOption.hint) {\n return selectedOption?.name;\n }\n return /*#__PURE__*/_jsxs(Styled.SelectedExperimentalHintWrapper, {\n children: [selectedOption?.name, /*#__PURE__*/_jsx(Styled.SelectedExperimentalHintItem, {\n // Keeping the classname for legacy reasons\n className: \"components-custom-select-control__hint\",\n children: selectedOption?.hint\n })]\n });\n };\n const translatedSize = (() => {\n if (__next40pxDefaultSize && size === 'default' || size === '__unstable-large') {\n return 'default';\n }\n if (!__next40pxDefaultSize && size === 'default') {\n return 'compact';\n }\n return size;\n })();\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(_CustomSelect, {\n \"aria-describedby\": descriptionId,\n renderSelectedValue: renderSelectedValue,\n size: translatedSize,\n store: store,\n className: clsx(\n // Keeping the classname for legacy reasons\n 'components-custom-select-control', classNameProp),\n isLegacy: true,\n ...restProps,\n children: children\n }), /*#__PURE__*/_jsx(VisuallyHidden, {\n children: /*#__PURE__*/_jsx(\"span\", {\n id: descriptionId,\n children: getDescribedBy(selectedOption?.name, describedBy)\n })\n })]\n });\n}\nexport default CustomSelectControl;"],
5
+ "mappings": ";AAGA,YAAY,aAAa;AACzB,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,IAAI,eAAe;AAK5B,OAAO,mBAAmB;AAC1B,OAAO,sBAAsB;AAC7B,YAAY,YAAY;AACxB,SAAS,sBAAsB;AAC/B,SAAS,mCAAmC;AAC5C,SAAS,OAAO,MAAM,QAAQ,OAAO,YAAY,iBAAiB;AAClE,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAAG;AACD,SAAO;AAAA,IACL,kBAAkB;AAAA,IAClB,GAAG;AAAA,EACL;AACF;AAKA,SAAS,wBAAwB;AAAA,EAC/B;AAAA,EACA,GAAG;AACL,GAAG;AACD,SAAO;AAAA,IACL,MAAM;AAAA,IACN,GAAG;AAAA,EACL;AACF;AACA,SAAS,eAAe,aAAa,aAAa;AAChD,MAAI,aAAa;AACf,WAAO;AAAA,EACT;AAGA,SAAO,QAAQ,GAAG,wBAAwB,GAAG,WAAW;AAC1D;AACA,SAAS,oBAAoB,OAAO;AAClC,QAAM;AAAA,IACJ,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ACH;AACA,IAAO,gCAAQ;",
6
6
  "names": []
7
7
  }
@@ -33,7 +33,7 @@ var CustomSelectButton = ({
33
33
  const {
34
34
  value: currentValue
35
35
  } = Ariakit.useStoreState(store);
36
- const computedRenderSelectedValue = useMemo(() => renderSelectedValue !== null && renderSelectedValue !== void 0 ? renderSelectedValue : defaultRenderSelectedValue, [renderSelectedValue]);
36
+ const computedRenderSelectedValue = useMemo(() => renderSelectedValue ?? defaultRenderSelectedValue, [renderSelectedValue]);
37
37
  return /* @__PURE__ */ _jsx(Styled.Select, {
38
38
  ...restProps,
39
39
  size,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/custom-select-control-v2/custom-select.tsx"],
4
- "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 { __, _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport * as Styled from './styles';\nimport InputBase from '../input-control/input-base';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport BaseControl from '../base-control';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const CustomSelectContext = createContext(undefined);\nCustomSelectContext.displayName = 'CustomSelectContext';\nfunction defaultRenderSelectedValue(value) {\n const isValueEmpty = Array.isArray(value) ? value.length === 0 : value === undefined || value === null;\n if (isValueEmpty) {\n return __('Select an item');\n }\n if (Array.isArray(value)) {\n return value.length === 1 ? value[0] : sprintf(\n // translators: %d: number of items selected (it will always be 2 or more items)\n _n('%d item selected', '%d items selected', value.length), value.length);\n }\n return value;\n}\nconst CustomSelectButton = ({\n renderSelectedValue,\n size = 'default',\n store,\n ...restProps\n}) => {\n const {\n value: currentValue\n } = Ariakit.useStoreState(store);\n const computedRenderSelectedValue = useMemo(() => renderSelectedValue !== null && renderSelectedValue !== void 0 ? renderSelectedValue : defaultRenderSelectedValue, [renderSelectedValue]);\n return /*#__PURE__*/_jsx(Styled.Select, {\n ...restProps,\n size: size,\n hasCustomRenderProp: !!renderSelectedValue,\n store: store,\n children: computedRenderSelectedValue(currentValue)\n });\n};\nfunction _CustomSelect(props) {\n const {\n children,\n hideLabelFromVision = false,\n label,\n size,\n store,\n className,\n isLegacy = false,\n ...restProps\n } = props;\n const onSelectPopoverKeyDown = useCallback(e => {\n if (isLegacy) {\n e.stopPropagation();\n }\n }, [isLegacy]);\n const contextValue = useMemo(() => ({\n store,\n size\n }), [store, size]);\n return (\n /*#__PURE__*/\n // Where should `restProps` be forwarded to?\n _jsxs(\"div\", {\n className: className,\n children: [/*#__PURE__*/_jsx(Ariakit.SelectLabel, {\n store: store,\n render: hideLabelFromVision ?\n /*#__PURE__*/\n // @ts-expect-error `children` are passed via the render prop\n _jsx(VisuallyHidden, {}) :\n /*#__PURE__*/\n // @ts-expect-error `children` are passed via the render prop\n _jsx(BaseControl.VisualLabel, {\n as: \"div\"\n }),\n children: label\n }), /*#__PURE__*/_jsxs(InputBase, {\n __next40pxDefaultSize: true,\n size: size,\n suffix: /*#__PURE__*/_jsx(SelectControlChevronDown, {}),\n children: [/*#__PURE__*/_jsx(CustomSelectButton, {\n ...restProps,\n size: size,\n store: store\n // Match legacy behavior (move selection rather than open the popover)\n ,\n showOnKeyDown: !isLegacy\n }), /*#__PURE__*/_jsx(Styled.SelectPopover, {\n gutter: 12,\n store: store,\n sameWidth: true,\n slide: false,\n onKeyDown: onSelectPopoverKeyDown\n // Match legacy behavior\n ,\n flip: !isLegacy,\n children: /*#__PURE__*/_jsx(CustomSelectContext.Provider, {\n value: contextValue,\n children: children\n })\n })]\n })]\n })\n );\n}\nexport default _CustomSelect;"],
5
- "mappings": ";AAGA,YAAY,aAAa;AAKzB,SAAS,eAAe,aAAa,eAAe;AACpD,SAAS,IAAI,IAAI,eAAe;AAKhC,SAAS,sBAAsB;AAC/B,YAAY,YAAY;AACxB,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A,IAClC;AAAA,IACA;AAAA,EACF,IAAI,CAAC,OAAO,IAAI,CAAC;AACjB;AAAA;AAAA,IAGE,sBAAM,OAAO;AAAA,MACX;AAAA,MACA,UAAU,CAAc,qBAAa,qBAAa;AAAA,QAChD;AAAA,QACA,QAAQ;AAAA;AAAA,UAGR,qBAAK,gBAAgB,CAAC,CAAC;AAAA;AAAA;AAAA,UAGvB,qBAAK,YAAY,aAAa;AAAA,YAC5B,IAAI;AAAA,UACN,CAAC;AAAA;AAAA,QACD,UAAU;AAAA,MACZ,CAAC,GAAgB,sBAAM,WAAW;AAAA,QAChC,uBAAuB;AAAA,QACvB;AAAA,QACA,QAAqB,qBAAK,0BAA0B,CAAC,CAAC;AAAA,QACtD,UAAU,CAAc,qBAAK,oBAAoB;AAAA,UAC/C,GAAG;AAAA,UACH;AAAA,UACA;AAAA,UAGA,eAAe,CAAC;AAAA,QAClB,CAAC,GAAgB,qBAAY,sBAAe;AAAA,UAC1C,QAAQ;AAAA,UACR;AAAA,UACA,WAAW;AAAA,UACX,OAAO;AAAA,UACP,WAAW;AAAA,UAGX,MAAM,CAAC;AAAA,UACP,UAAuB,qBAAK,oBAAoB,UAAU;AAAA,YACxD,OAAO;AAAA,YACP;AAAA,UACF,CAAC;AAAA,QACH,CAAC,CAAC;AAAA,MACJ,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA;AAEL;AACA,IAAO,wBAAQ;",
4
+ "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 { __, _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport * as Styled from './styles';\nimport InputBase from '../input-control/input-base';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport BaseControl from '../base-control';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const CustomSelectContext = createContext(undefined);\nCustomSelectContext.displayName = 'CustomSelectContext';\nfunction defaultRenderSelectedValue(value) {\n const isValueEmpty = Array.isArray(value) ? value.length === 0 : value === undefined || value === null;\n if (isValueEmpty) {\n return __('Select an item');\n }\n if (Array.isArray(value)) {\n return value.length === 1 ? value[0] : sprintf(\n // translators: %d: number of items selected (it will always be 2 or more items)\n _n('%d item selected', '%d items selected', value.length), value.length);\n }\n return value;\n}\nconst CustomSelectButton = ({\n renderSelectedValue,\n size = 'default',\n store,\n ...restProps\n}) => {\n const {\n value: currentValue\n } = Ariakit.useStoreState(store);\n const computedRenderSelectedValue = useMemo(() => renderSelectedValue ?? defaultRenderSelectedValue, [renderSelectedValue]);\n return /*#__PURE__*/_jsx(Styled.Select, {\n ...restProps,\n size: size,\n hasCustomRenderProp: !!renderSelectedValue,\n store: store,\n children: computedRenderSelectedValue(currentValue)\n });\n};\nfunction _CustomSelect(props) {\n const {\n children,\n hideLabelFromVision = false,\n label,\n size,\n store,\n className,\n isLegacy = false,\n ...restProps\n } = props;\n const onSelectPopoverKeyDown = useCallback(e => {\n if (isLegacy) {\n e.stopPropagation();\n }\n }, [isLegacy]);\n const contextValue = useMemo(() => ({\n store,\n size\n }), [store, size]);\n return (\n /*#__PURE__*/\n // Where should `restProps` be forwarded to?\n _jsxs(\"div\", {\n className: className,\n children: [/*#__PURE__*/_jsx(Ariakit.SelectLabel, {\n store: store,\n render: hideLabelFromVision ?\n /*#__PURE__*/\n // @ts-expect-error `children` are passed via the render prop\n _jsx(VisuallyHidden, {}) :\n /*#__PURE__*/\n // @ts-expect-error `children` are passed via the render prop\n _jsx(BaseControl.VisualLabel, {\n as: \"div\"\n }),\n children: label\n }), /*#__PURE__*/_jsxs(InputBase, {\n __next40pxDefaultSize: true,\n size: size,\n suffix: /*#__PURE__*/_jsx(SelectControlChevronDown, {}),\n children: [/*#__PURE__*/_jsx(CustomSelectButton, {\n ...restProps,\n size: size,\n store: store\n // Match legacy behavior (move selection rather than open the popover)\n ,\n showOnKeyDown: !isLegacy\n }), /*#__PURE__*/_jsx(Styled.SelectPopover, {\n gutter: 12,\n store: store,\n sameWidth: true,\n slide: false,\n onKeyDown: onSelectPopoverKeyDown\n // Match legacy behavior\n ,\n flip: !isLegacy,\n children: /*#__PURE__*/_jsx(CustomSelectContext.Provider, {\n value: contextValue,\n children: children\n })\n })]\n })]\n })\n );\n}\nexport default _CustomSelect;"],
5
+ "mappings": ";AAGA,YAAY,aAAa;AAKzB,SAAS,eAAe,aAAa,eAAe;AACpD,SAAS,IAAI,IAAI,eAAe;AAKhC,SAAS,sBAAsB;AAC/B,YAAY,YAAY;AACxB,OAAO,eAAe;AACtB,OAAO,8BAA8B;AACrC,OAAO,iBAAiB;AACxB,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,IAAM,sBAAsB,cAAc,MAAS;AAC1D,oBAAoB,cAAc;AAClC,SAAS,2BAA2B,OAAO;AACzC,QAAM,eAAe,MAAM,QAAQ,KAAK,IAAI,MAAM,WAAW,IAAI,UAAU,UAAa,UAAU;AAClG,MAAI,cAAc;AAChB,WAAO,GAAG,gBAAgB;AAAA,EAC5B;AACA,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,WAAO,MAAM,WAAW,IAAI,MAAM,CAAC,IAAI;AAAA;AAAA,MAEvC,GAAG,oBAAoB,qBAAqB,MAAM,MAAM;AAAA,MAAG,MAAM;AAAA,IAAM;AAAA,EACzE;AACA,SAAO;AACT;AACA,IAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM;AAAA,IACJ,OAAO;AAAA,EACT,IAAY,sBAAc,KAAK;AAC/B,QAAM,8BAA8B,QAAQ,MAAM,uBAAuB,4BAA4B,CAAC,mBAAmB,CAAC;AAC1H,SAAoB,qBAAY,eAAQ;AAAA,IACtC,GAAG;AAAA,IACH;AAAA,IACA,qBAAqB,CAAC,CAAC;AAAA,IACvB;AAAA,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AAQ;",
6
6
  "names": []
7
7
  }
@@ -8,13 +8,12 @@ function CustomSelectItem({
8
8
  children,
9
9
  ...props
10
10
  }) {
11
- var _customSelectContext$;
12
11
  const customSelectContext = useContext(CustomSelectContext);
13
12
  return /* @__PURE__ */ _jsxs(Styled.SelectItem, {
14
13
  store: customSelectContext?.store,
15
- size: (_customSelectContext$ = customSelectContext?.size) !== null && _customSelectContext$ !== void 0 ? _customSelectContext$ : "default",
14
+ size: customSelectContext?.size ?? "default",
16
15
  ...props,
17
- children: [children !== null && children !== void 0 ? children : props.value, /* @__PURE__ */ _jsx(Styled.SelectedItemCheck, {
16
+ children: [children ?? props.value, /* @__PURE__ */ _jsx(Styled.SelectedItemCheck, {
18
17
  children: /* @__PURE__ */ _jsx(Icon, {
19
18
  icon: check
20
19
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/custom-select-control-v2/item.tsx"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n/**\n * Internal dependencies\n */\n\nimport * as Styled from './styles';\nimport { CustomSelectContext } from './custom-select';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function CustomSelectItem({\n children,\n ...props\n}) {\n var _customSelectContext$;\n const customSelectContext = useContext(CustomSelectContext);\n return /*#__PURE__*/_jsxs(Styled.SelectItem, {\n store: customSelectContext?.store,\n size: (_customSelectContext$ = customSelectContext?.size) !== null && _customSelectContext$ !== void 0 ? _customSelectContext$ : 'default',\n ...props,\n children: [children !== null && children !== void 0 ? children : props.value, /*#__PURE__*/_jsx(Styled.SelectedItemCheck, {\n children: /*#__PURE__*/_jsx(Icon, {\n icon: check\n })\n })]\n });\n}\nCustomSelectItem.displayName = 'CustomSelectControlV2.Item';\nexport default CustomSelectItem;"],
5
- "mappings": ";AAGA,SAAS,kBAAkB;AAC3B,SAAS,MAAM,aAAa;AAK5B,YAAY,YAAY;AACxB,SAAS,2BAA2B;AACpC,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,GAAG;AACL,GAAG;AACD,MAAI;AACJ,QAAM,sBAAsB,WAAW,mBAAmB;AAC1D,SAAoB,sBAAa,mBAAY;AAAA,IAC3C,OAAO,qBAAqB;AAAA,IAC5B,OAAO,wBAAwB,qBAAqB,UAAU,QAAQ,0BAA0B,SAAS,wBAAwB;AAAA,IACjI,GAAG;AAAA,IACH,UAAU,CAAC,aAAa,QAAQ,aAAa,SAAS,WAAW,MAAM,OAAoB,qBAAY,0BAAmB;AAAA,MACxH,UAAuB,qBAAK,MAAM;AAAA,QAChC,MAAM;AAAA,MACR,CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACA,iBAAiB,cAAc;AAC/B,IAAO,eAAQ;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n/**\n * Internal dependencies\n */\n\nimport * as Styled from './styles';\nimport { CustomSelectContext } from './custom-select';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function CustomSelectItem({\n children,\n ...props\n}) {\n const customSelectContext = useContext(CustomSelectContext);\n return /*#__PURE__*/_jsxs(Styled.SelectItem, {\n store: customSelectContext?.store,\n size: customSelectContext?.size ?? 'default',\n ...props,\n children: [children ?? props.value, /*#__PURE__*/_jsx(Styled.SelectedItemCheck, {\n children: /*#__PURE__*/_jsx(Icon, {\n icon: check\n })\n })]\n });\n}\nCustomSelectItem.displayName = 'CustomSelectControlV2.Item';\nexport default CustomSelectItem;"],
5
+ "mappings": ";AAGA,SAAS,kBAAkB;AAC3B,SAAS,MAAM,aAAa;AAK5B,YAAY,YAAY;AACxB,SAAS,2BAA2B;AACpC,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,sBAAsB,WAAW,mBAAmB;AAC1D,SAAoB,sBAAa,mBAAY;AAAA,IAC3C,OAAO,qBAAqB;AAAA,IAC5B,MAAM,qBAAqB,QAAQ;AAAA,IACnC,GAAG;AAAA,IACH,UAAU,CAAC,YAAY,MAAM,OAAoB,qBAAY,0BAAmB;AAAA,MAC9E,UAAuB,qBAAK,MAAM;AAAA,QAChC,MAAM;AAAA,MACR,CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACA,iBAAiB,cAAc;AAC/B,IAAO,eAAQ;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,7 @@ function DatePicker({
17
17
  onMonthPreviewed,
18
18
  startOfWeek: weekStartsOn = 0
19
19
  }) {
20
- const date = inputToDate(currentDate !== null && currentDate !== void 0 ? currentDate : /* @__PURE__ */ new Date());
20
+ const date = inputToDate(currentDate ?? /* @__PURE__ */ new Date());
21
21
  const {
22
22
  calendar,
23
23
  viewing,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/date-time/date/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport { isSameDay, subMonths, addMonths, isEqual, addDays, subDays, subWeeks, addWeeks, isSameMonth } from 'date-fns';\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf, isRTL } from '@wordpress/i18n';\nimport { arrowLeft, arrowRight } from '@wordpress/icons';\nimport { dateI18n, date as formatDate, getSettings } from '@wordpress/date';\nimport { useState, useRef, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useLilius } from './use-lilius';\nimport { Wrapper, Navigator, ViewPreviousMonthButton, ViewNextMonthButton, NavigatorHeading, Calendar, DayOfWeek, DayButton } from './styles';\nimport { inputToDate, setInConfiguredTimezone, startOfDayInConfiguredTimezone } from '../utils';\nimport { TIMEZONELESS_FORMAT } from '../constants';\n\n/**\n * DatePicker is a React component that renders a calendar for date selection.\n *\n * ```jsx\n * import { DatePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDatePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DatePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * />\n * );\n * };\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function DatePicker({\n currentDate,\n onChange,\n events = [],\n isInvalidDate,\n onMonthPreviewed,\n startOfWeek: weekStartsOn = 0\n}) {\n const date = inputToDate(currentDate !== null && currentDate !== void 0 ? currentDate : new Date());\n const {\n calendar,\n viewing,\n setSelected,\n setViewing,\n isSelected,\n viewPreviousMonth,\n viewNextMonth\n } = useLilius({\n selected: [startOfDayInConfiguredTimezone(date)],\n viewing: startOfDayInConfiguredTimezone(date),\n weekStartsOn\n });\n\n // Used to implement a roving tab index. Tracks the day that receives focus\n // when the user tabs into the calendar.\n const [focusable, setFocusable] = useState(startOfDayInConfiguredTimezone(date));\n\n // Allows us to only programmatically focus() a day when focus was already\n // within the calendar. This stops us stealing focus from e.g. a TimePicker\n // input.\n const [isFocusWithinCalendar, setIsFocusWithinCalendar] = useState(false);\n\n // Update internal state when currentDate prop changes.\n const [prevCurrentDate, setPrevCurrentDate] = useState(currentDate);\n if (currentDate !== prevCurrentDate) {\n setPrevCurrentDate(currentDate);\n setSelected([startOfDayInConfiguredTimezone(date)]);\n setViewing(startOfDayInConfiguredTimezone(date));\n setFocusable(startOfDayInConfiguredTimezone(date));\n }\n return /*#__PURE__*/_jsxs(Wrapper, {\n className: \"components-datetime__date\",\n role: \"application\",\n \"aria-label\": __('Calendar'),\n children: [/*#__PURE__*/_jsxs(Navigator, {\n children: [/*#__PURE__*/_jsx(ViewPreviousMonthButton, {\n icon: isRTL() ? arrowRight : arrowLeft,\n variant: \"tertiary\",\n \"aria-label\": __('View previous month'),\n onClick: () => {\n viewPreviousMonth();\n setFocusable(subMonths(focusable, 1));\n const prevMonth = subMonths(viewing, 1);\n onMonthPreviewed?.(dateI18n(TIMEZONELESS_FORMAT, prevMonth, -prevMonth.getTimezoneOffset()));\n },\n size: \"compact\"\n }), /*#__PURE__*/_jsxs(NavigatorHeading, {\n level: 3,\n children: [/*#__PURE__*/_jsx(\"strong\", {\n children: dateI18n('F', viewing, -viewing.getTimezoneOffset())\n }), ' ', dateI18n('Y', viewing, -viewing.getTimezoneOffset())]\n }), /*#__PURE__*/_jsx(ViewNextMonthButton, {\n icon: isRTL() ? arrowLeft : arrowRight,\n variant: \"tertiary\",\n \"aria-label\": __('View next month'),\n onClick: () => {\n viewNextMonth();\n setFocusable(addMonths(focusable, 1));\n const nextMonth = addMonths(viewing, 1);\n onMonthPreviewed?.(dateI18n(TIMEZONELESS_FORMAT, nextMonth, -nextMonth.getTimezoneOffset()));\n },\n size: \"compact\"\n })]\n }), /*#__PURE__*/_jsxs(Calendar, {\n onFocus: () => setIsFocusWithinCalendar(true),\n onBlur: () => setIsFocusWithinCalendar(false),\n children: [calendar[0][0].map(day => /*#__PURE__*/_jsx(DayOfWeek, {\n children: dateI18n('D', day, -day.getTimezoneOffset())\n }, day.toString())), calendar[0].map(week => week.map((day, index) => {\n if (!isSameMonth(day, viewing)) {\n return null;\n }\n return /*#__PURE__*/_jsx(Day, {\n day: day,\n column: index + 1,\n isSelected: isSelected(day),\n isFocusable: isEqual(day, focusable),\n isFocusAllowed: isFocusWithinCalendar,\n isToday: isSameDay(day, startOfDayInConfiguredTimezone(new Date())),\n isInvalid: isInvalidDate ? isInvalidDate(day) : false,\n numEvents: events.filter(event => isSameDay(event.date, day)).length,\n onClick: () => {\n setSelected([day]);\n setFocusable(day);\n const newDate = setInConfiguredTimezone(date, {\n year: day.getFullYear(),\n month: day.getMonth(),\n date: day.getDate()\n });\n onChange?.(formatDate(TIMEZONELESS_FORMAT, newDate));\n },\n onKeyDown: event => {\n let nextFocusable;\n if (event.key === 'ArrowLeft') {\n nextFocusable = addDays(day, isRTL() ? 1 : -1);\n }\n if (event.key === 'ArrowRight') {\n nextFocusable = addDays(day, isRTL() ? -1 : 1);\n }\n if (event.key === 'ArrowUp') {\n nextFocusable = subWeeks(day, 1);\n }\n if (event.key === 'ArrowDown') {\n nextFocusable = addWeeks(day, 1);\n }\n if (event.key === 'PageUp') {\n nextFocusable = subMonths(day, 1);\n }\n if (event.key === 'PageDown') {\n nextFocusable = addMonths(day, 1);\n }\n if (event.key === 'Home') {\n const dayOfWeek = day.getDay();\n const daysToSubtract = (dayOfWeek - weekStartsOn + 7) % 7;\n nextFocusable = subDays(day, daysToSubtract);\n }\n if (event.key === 'End') {\n const dayOfWeek = day.getDay();\n const daysToAdd = (weekStartsOn + 6 - dayOfWeek) % 7;\n nextFocusable = addDays(day, daysToAdd);\n }\n if (nextFocusable) {\n event.preventDefault();\n setFocusable(nextFocusable);\n if (!isSameMonth(nextFocusable, viewing)) {\n setViewing(nextFocusable);\n onMonthPreviewed?.(dateI18n(TIMEZONELESS_FORMAT, nextFocusable, -nextFocusable.getTimezoneOffset()));\n }\n }\n }\n }, day.toString());\n }))]\n })]\n });\n}\nfunction Day({\n day,\n column,\n isSelected,\n isFocusable,\n isFocusAllowed,\n isToday,\n isInvalid,\n numEvents,\n onClick,\n onKeyDown\n}) {\n const ref = useRef();\n\n // Focus the day when it becomes focusable, e.g. because an arrow key is\n // pressed. Only do this if focus is allowed - this stops us stealing focus\n // from e.g. a TimePicker input.\n useEffect(() => {\n if (ref.current && isFocusable && isFocusAllowed) {\n ref.current.focus();\n }\n // isFocusAllowed is not a dep as there is no point calling focus() on\n // an already focused element.\n }, [isFocusable]);\n return /*#__PURE__*/_jsx(DayButton, {\n __next40pxDefaultSize: true,\n ref: ref,\n className: \"components-datetime__date__day\" // Unused, for backwards compatibility.\n ,\n disabled: isInvalid,\n tabIndex: isFocusable ? 0 : -1,\n \"aria-label\": getDayLabel(day, isSelected, isToday, numEvents),\n column: column,\n isSelected: isSelected,\n isToday: isToday,\n hasEvents: numEvents > 0,\n onClick: onClick,\n onKeyDown: onKeyDown,\n children: dateI18n('j', day, -day.getTimezoneOffset())\n });\n}\nfunction getDayLabel(date, isSelected, isToday, numEvents) {\n const {\n formats\n } = getSettings();\n const localizedDate = dateI18n(formats.date, date, -date.getTimezoneOffset());\n const parts = [localizedDate];\n if (isSelected) {\n parts.push(__('Selected'));\n }\n if (isToday) {\n parts.push(__('Today'));\n }\n if (numEvents > 0) {\n parts.push(sprintf(\n // translators: %d: Number of events on the calendar date.\n _n('There is %d event', 'There are %d events', numEvents), numEvents));\n }\n return parts.join('. ');\n}\nexport default DatePicker;"],
5
- "mappings": ";AAGA,SAAS,WAAW,WAAW,WAAW,SAAS,SAAS,SAAS,UAAU,UAAU,mBAAmB;AAI5G,SAAS,IAAI,IAAI,SAAS,aAAa;AACvC,SAAS,WAAW,kBAAkB;AACtC,SAAS,UAAU,QAAQ,YAAY,mBAAmB;AAC1D,SAAS,UAAU,QAAQ,iBAAiB;AAK5C,SAAS,iBAAiB;AAC1B,SAAS,SAAS,WAAW,yBAAyB,qBAAqB,kBAAkB,UAAU,WAAW,iBAAiB;AACnI,SAAS,aAAa,yBAAyB,sCAAsC;AACrF,SAAS,2BAA2B;AAqBpC,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,SAAS,CAAC;AAAA,EACV;AAAA,EACA;AAAA,EACA,aAAa,eAAe;AAC9B,GAAG;AACD,QAAM,OAAO,YAAY,gBAAgB,QAAQ,gBAAgB,SAAS,cAAc,oBAAI,KAAK,CAAC;AAClG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,UAAU;AAAA,IACZ,UAAU,CAAC,+BAA+B,IAAI,CAAC;AAAA,IAC/C,SAAS,+BAA+B,IAAI;AAAA,IAC5C;AAAA,EACF,CAAC;AAID,QAAM,CAAC,WAAW,YAAY,I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AAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,MAAM,OAAO;AAKnB,YAAU,MAAM;AACd,QAAI,IAAI,WAAW,eAAe,gBAAgB;AAChD,UAAI,QAAQ,MAAM;AAAA,IACpB;AAAA,EAGF,GAAG,CAAC,WAAW,CAAC;AAChB,SAAoB,qBAAK,WAAW;AAAA,IAClC,uBAAuB;AAAA,IACvB;AAAA,IACA,WAAW;AAAA,IAEX,UAAU;AAAA,IACV,UAAU,cAAc,IAAI;AAAA,IAC5B,cAAc,YAAY,KAAK,YAAY,SAAS,SAAS;AAAA,IAC7D;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,YAAY;AAAA,IACvB;AAAA,IACA;AAAA,IACA,UAAU,SAAS,KAAK,KAAK,CAAC,IAAI,kBAAkB,CAAC;AAAA,EACvD,CAAC;AACH;AACA,SAAS,YAAY,MAAM,YAAY,SAAS,WAAW;AACzD,QAAM;AAAA,IACJ;AAAA,EACF,IAAI,YAAY;AAChB,QAAM,gBAAgB,SAAS,QAAQ,MAAM,MAAM,CAAC,KAAK,kBAAkB,CAAC;AAC5E,QAAM,QAAQ,CAAC,aAAa;AAC5B,MAAI,YAAY;AACd,UAAM,KAAK,GAAG,UAAU,CAAC;AAAA,EAC3B;AACA,MAAI,SAAS;AACX,UAAM,KAAK,GAAG,OAAO,CAAC;AAAA,EACxB;AACA,MAAI,YAAY,GAAG;AACjB,UAAM,KAAK;AAAA;AAAA,MAEX,GAAG,qBAAqB,uBAAuB,SAAS;AAAA,MAAG;AAAA,IAAS,CAAC;AAAA,EACvE;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;AACA,IAAO,eAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { isSameDay, subMonths, addMonths, isEqual, addDays, subDays, subWeeks, addWeeks, isSameMonth } from 'date-fns';\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf, isRTL } from '@wordpress/i18n';\nimport { arrowLeft, arrowRight } from '@wordpress/icons';\nimport { dateI18n, date as formatDate, getSettings } from '@wordpress/date';\nimport { useState, useRef, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useLilius } from './use-lilius';\nimport { Wrapper, Navigator, ViewPreviousMonthButton, ViewNextMonthButton, NavigatorHeading, Calendar, DayOfWeek, DayButton } from './styles';\nimport { inputToDate, setInConfiguredTimezone, startOfDayInConfiguredTimezone } from '../utils';\nimport { TIMEZONELESS_FORMAT } from '../constants';\n\n/**\n * DatePicker is a React component that renders a calendar for date selection.\n *\n * ```jsx\n * import { DatePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDatePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DatePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * />\n * );\n * };\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function DatePicker({\n currentDate,\n onChange,\n events = [],\n isInvalidDate,\n onMonthPreviewed,\n startOfWeek: weekStartsOn = 0\n}) {\n const date = inputToDate(currentDate ?? new Date());\n const {\n calendar,\n viewing,\n setSelected,\n setViewing,\n isSelected,\n viewPreviousMonth,\n viewNextMonth\n } = useLilius({\n selected: [startOfDayInConfiguredTimezone(date)],\n viewing: startOfDayInConfiguredTimezone(date),\n weekStartsOn\n });\n\n // Used to implement a roving tab index. Tracks the day that receives focus\n // when the user tabs into the calendar.\n const [focusable, setFocusable] = useState(startOfDayInConfiguredTimezone(date));\n\n // Allows us to only programmatically focus() a day when focus was already\n // within the calendar. This stops us stealing focus from e.g. a TimePicker\n // input.\n const [isFocusWithinCalendar, setIsFocusWithinCalendar] = useState(false);\n\n // Update internal state when currentDate prop changes.\n const [prevCurrentDate, setPrevCurrentDate] = useState(currentDate);\n if (currentDate !== prevCurrentDate) {\n setPrevCurrentDate(currentDate);\n setSelected([startOfDayInConfiguredTimezone(date)]);\n setViewing(startOfDayInConfiguredTimezone(date));\n setFocusable(startOfDayInConfiguredTimezone(date));\n }\n return /*#__PURE__*/_jsxs(Wrapper, {\n className: \"components-datetime__date\",\n role: \"application\",\n \"aria-label\": __('Calendar'),\n children: [/*#__PURE__*/_jsxs(Navigator, {\n children: [/*#__PURE__*/_jsx(ViewPreviousMonthButton, {\n icon: isRTL() ? arrowRight : arrowLeft,\n variant: \"tertiary\",\n \"aria-label\": __('View previous month'),\n onClick: () => {\n viewPreviousMonth();\n setFocusable(subMonths(focusable, 1));\n const prevMonth = subMonths(viewing, 1);\n onMonthPreviewed?.(dateI18n(TIMEZONELESS_FORMAT, prevMonth, -prevMonth.getTimezoneOffset()));\n },\n size: \"compact\"\n }), /*#__PURE__*/_jsxs(NavigatorHeading, {\n level: 3,\n children: [/*#__PURE__*/_jsx(\"strong\", {\n children: dateI18n('F', viewing, -viewing.getTimezoneOffset())\n }), ' ', dateI18n('Y', viewing, -viewing.getTimezoneOffset())]\n }), /*#__PURE__*/_jsx(ViewNextMonthButton, {\n icon: isRTL() ? arrowLeft : arrowRight,\n variant: \"tertiary\",\n \"aria-label\": __('View next month'),\n onClick: () => {\n viewNextMonth();\n setFocusable(addMonths(focusable, 1));\n const nextMonth = addMonths(viewing, 1);\n onMonthPreviewed?.(dateI18n(TIMEZONELESS_FORMAT, nextMonth, -nextMonth.getTimezoneOffset()));\n },\n size: \"compact\"\n })]\n }), /*#__PURE__*/_jsxs(Calendar, {\n onFocus: () => setIsFocusWithinCalendar(true),\n onBlur: () => setIsFocusWithinCalendar(false),\n children: [calendar[0][0].map(day => /*#__PURE__*/_jsx(DayOfWeek, {\n children: dateI18n('D', day, -day.getTimezoneOffset())\n }, day.toString())), calendar[0].map(week => week.map((day, index) => {\n if (!isSameMonth(day, viewing)) {\n return null;\n }\n return /*#__PURE__*/_jsx(Day, {\n day: day,\n column: index + 1,\n isSelected: isSelected(day),\n isFocusable: isEqual(day, focusable),\n isFocusAllowed: isFocusWithinCalendar,\n isToday: isSameDay(day, startOfDayInConfiguredTimezone(new Date())),\n isInvalid: isInvalidDate ? isInvalidDate(day) : false,\n numEvents: events.filter(event => isSameDay(event.date, day)).length,\n onClick: () => {\n setSelected([day]);\n setFocusable(day);\n const newDate = setInConfiguredTimezone(date, {\n year: day.getFullYear(),\n month: day.getMonth(),\n date: day.getDate()\n });\n onChange?.(formatDate(TIMEZONELESS_FORMAT, newDate));\n },\n onKeyDown: event => {\n let nextFocusable;\n if (event.key === 'ArrowLeft') {\n nextFocusable = addDays(day, isRTL() ? 1 : -1);\n }\n if (event.key === 'ArrowRight') {\n nextFocusable = addDays(day, isRTL() ? -1 : 1);\n }\n if (event.key === 'ArrowUp') {\n nextFocusable = subWeeks(day, 1);\n }\n if (event.key === 'ArrowDown') {\n nextFocusable = addWeeks(day, 1);\n }\n if (event.key === 'PageUp') {\n nextFocusable = subMonths(day, 1);\n }\n if (event.key === 'PageDown') {\n nextFocusable = addMonths(day, 1);\n }\n if (event.key === 'Home') {\n const dayOfWeek = day.getDay();\n const daysToSubtract = (dayOfWeek - weekStartsOn + 7) % 7;\n nextFocusable = subDays(day, daysToSubtract);\n }\n if (event.key === 'End') {\n const dayOfWeek = day.getDay();\n const daysToAdd = (weekStartsOn + 6 - dayOfWeek) % 7;\n nextFocusable = addDays(day, daysToAdd);\n }\n if (nextFocusable) {\n event.preventDefault();\n setFocusable(nextFocusable);\n if (!isSameMonth(nextFocusable, viewing)) {\n setViewing(nextFocusable);\n onMonthPreviewed?.(dateI18n(TIMEZONELESS_FORMAT, nextFocusable, -nextFocusable.getTimezoneOffset()));\n }\n }\n }\n }, day.toString());\n }))]\n })]\n });\n}\nfunction Day({\n day,\n column,\n isSelected,\n isFocusable,\n isFocusAllowed,\n isToday,\n isInvalid,\n numEvents,\n onClick,\n onKeyDown\n}) {\n const ref = useRef();\n\n // Focus the day when it becomes focusable, e.g. because an arrow key is\n // pressed. Only do this if focus is allowed - this stops us stealing focus\n // from e.g. a TimePicker input.\n useEffect(() => {\n if (ref.current && isFocusable && isFocusAllowed) {\n ref.current.focus();\n }\n // isFocusAllowed is not a dep as there is no point calling focus() on\n // an already focused element.\n }, [isFocusable]);\n return /*#__PURE__*/_jsx(DayButton, {\n __next40pxDefaultSize: true,\n ref: ref,\n className: \"components-datetime__date__day\" // Unused, for backwards compatibility.\n ,\n disabled: isInvalid,\n tabIndex: isFocusable ? 0 : -1,\n \"aria-label\": getDayLabel(day, isSelected, isToday, numEvents),\n column: column,\n isSelected: isSelected,\n isToday: isToday,\n hasEvents: numEvents > 0,\n onClick: onClick,\n onKeyDown: onKeyDown,\n children: dateI18n('j', day, -day.getTimezoneOffset())\n });\n}\nfunction getDayLabel(date, isSelected, isToday, numEvents) {\n const {\n formats\n } = getSettings();\n const localizedDate = dateI18n(formats.date, date, -date.getTimezoneOffset());\n const parts = [localizedDate];\n if (isSelected) {\n parts.push(__('Selected'));\n }\n if (isToday) {\n parts.push(__('Today'));\n }\n if (numEvents > 0) {\n parts.push(sprintf(\n // translators: %d: Number of events on the calendar date.\n _n('There is %d event', 'There are %d events', numEvents), numEvents));\n }\n return parts.join('. ');\n}\nexport default DatePicker;"],
5
+ "mappings": ";AAGA,SAAS,WAAW,WAAW,WAAW,SAAS,SAAS,SAAS,UAAU,UAAU,mBAAmB;AAI5G,SAAS,IAAI,IAAI,SAAS,aAAa;AACvC,SAAS,WAAW,kBAAkB;AACtC,SAAS,UAAU,QAAQ,YAAY,mBAAmB;AAC1D,SAAS,UAAU,QAAQ,iBAAiB;AAK5C,SAAS,iBAAiB;AAC1B,SAAS,SAAS,WAAW,yBAAyB,qBAAqB,kBAAkB,UAAU,WAAW,iBAAiB;AACnI,SAAS,aAAa,yBAAyB,sCAAsC;AACrF,SAAS,2BAA2B;AAqBpC,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,SAAS,CAAC;AAAA,EACV;AAAA,EACA;AAAA,EACA,aAAa,eAAe;AAC9B,GAAG;AACD,QAAM,OAAO,YAAY,eAA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C;AAAA,EACvE;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;AACA,IAAO,eAAQ;",
6
6
  "names": []
7
7
  }
@@ -38,6 +38,7 @@ function UnforwardedDateTimePicker({
38
38
  });
39
39
  }
40
40
  var DateTimePicker = forwardRef(UnforwardedDateTimePicker);
41
+ DateTimePicker.displayName = "DateTimePicker";
41
42
  var date_time_default = DateTimePicker;
42
43
  export {
43
44
  DatePicker,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/date-time/date-time/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport { Wrapper } from './styles';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport { DatePicker, TimePicker };\nconst noop = () => {};\nfunction UnforwardedDateTimePicker({\n currentDate,\n is12Hour,\n dateOrder,\n isInvalidDate,\n onMonthPreviewed = noop,\n onChange,\n events,\n startOfWeek\n}, ref) {\n return /*#__PURE__*/_jsx(Wrapper, {\n ref: ref,\n className: \"components-datetime\",\n spacing: 4,\n children: /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(TimePicker, {\n currentTime: currentDate,\n onChange: onChange,\n is12Hour: is12Hour,\n dateOrder: dateOrder\n }), /*#__PURE__*/_jsx(DatePicker, {\n currentDate: currentDate,\n onChange: onChange,\n isInvalidDate: isInvalidDate,\n events: events,\n onMonthPreviewed: onMonthPreviewed,\n startOfWeek: startOfWeek\n })]\n })\n });\n}\n\n/**\n * DateTimePicker is a React component that renders a calendar and clock for\n * date and time selection. The calendar and clock components can be accessed\n * individually using the `DatePicker` and `TimePicker` components respectively.\n *\n * ```jsx\n * import { DateTimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDateTimePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DateTimePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * is12Hour\n * />\n * );\n * };\n * ```\n */\nexport const DateTimePicker = forwardRef(UnforwardedDateTimePicker);\nexport default DateTimePicker;"],
5
- "mappings": ";AAOA,SAAS,kBAAkB;AAK3B,SAAS,WAAW,kBAAkB;AACtC,SAAS,WAAW,kBAAkB;AACtC,SAAS,eAAe;AACxB,SAAS,OAAO,MAAM,YAAY,WAAW,QAAQ,aAAa;AAElE,IAAM,OAAO,MAAM;AAAC;AACpB,SAAS,0BAA0B;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,SAAoB,qBAAK,SAAS;AAAA,IAChC;AAAA,IACA,WAAW;AAAA,IACX,SAAS;AAAA,IACT,UAAuB,sBAAM,WAAW;AAAA,MACtC,UAAU,CAAc,qBAAK,YAAY;AAAA,QACvC,aAAa;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,GAAgB,qBAAK,YAAY;AAAA,QAChC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;AAwBO,IAAM,iBAAiB,WAAW,yBAAyB;AAClE,IAAO,oBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport { Wrapper } from './styles';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport { DatePicker, TimePicker };\nconst noop = () => {};\nfunction UnforwardedDateTimePicker({\n currentDate,\n is12Hour,\n dateOrder,\n isInvalidDate,\n onMonthPreviewed = noop,\n onChange,\n events,\n startOfWeek\n}, ref) {\n return /*#__PURE__*/_jsx(Wrapper, {\n ref: ref,\n className: \"components-datetime\",\n spacing: 4,\n children: /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(TimePicker, {\n currentTime: currentDate,\n onChange: onChange,\n is12Hour: is12Hour,\n dateOrder: dateOrder\n }), /*#__PURE__*/_jsx(DatePicker, {\n currentDate: currentDate,\n onChange: onChange,\n isInvalidDate: isInvalidDate,\n events: events,\n onMonthPreviewed: onMonthPreviewed,\n startOfWeek: startOfWeek\n })]\n })\n });\n}\n\n/**\n * DateTimePicker is a React component that renders a calendar and clock for\n * date and time selection. The calendar and clock components can be accessed\n * individually using the `DatePicker` and `TimePicker` components respectively.\n *\n * ```jsx\n * import { DateTimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDateTimePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DateTimePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * is12Hour\n * />\n * );\n * };\n * ```\n */\nexport const DateTimePicker = forwardRef(UnforwardedDateTimePicker);\nDateTimePicker.displayName = 'DateTimePicker';\nexport default DateTimePicker;"],
5
+ "mappings": ";AAOA,SAAS,kBAAkB;AAK3B,SAAS,WAAW,kBAAkB;AACtC,SAAS,WAAW,kBAAkB;AACtC,SAAS,eAAe;AACxB,SAAS,OAAO,MAAM,YAAY,WAAW,QAAQ,aAAa;AAElE,IAAM,OAAO,MAAM;AAAC;AACpB,SAAS,0BAA0B;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,SAAoB,qBAAK,SAAS;AAAA,IAChC;AAAA,IACA,WAAW;AAAA,IACX,SAAS;AAAA,IACT,UAAuB,sBAAM,WAAW;AAAA,MACtC,UAAU,CAAc,qBAAK,YAAY;AAAA,QACvC,aAAa;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,GAAgB,qBAAK,YAAY;AAAA,QAChC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;AAwBO,IAAM,iBAAiB,WAAW,yBAAyB;AAClE,eAAe,cAAc;AAC7B,IAAO,oBAAQ;",
6
6
  "names": []
7
7
  }
@@ -24,10 +24,10 @@ function TimePicker({
24
24
  }) {
25
25
  const [date, setDate] = useState(() => (
26
26
  // Truncate the date at the minutes, see: #15495.
27
- startOfMinute(inputToDate(currentTime !== null && currentTime !== void 0 ? currentTime : /* @__PURE__ */ new Date()))
27
+ startOfMinute(inputToDate(currentTime ?? /* @__PURE__ */ new Date()))
28
28
  ));
29
29
  useEffect(() => {
30
- setDate(startOfMinute(inputToDate(currentTime !== null && currentTime !== void 0 ? currentTime : /* @__PURE__ */ new Date())));
30
+ setDate(startOfMinute(inputToDate(currentTime ?? /* @__PURE__ */ new Date())));
31
31
  }, [currentTime]);
32
32
  const monthOptions = [{
33
33
  value: "01",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/date-time/time/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport { startOfMinute } from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { date as formatDate } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../../base-control';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport SelectControl from '../../select-control';\nimport TimeZone from './timezone';\nimport { Wrapper, Fieldset, MonthSelectWrapper, DayInput, YearInput } from './styles';\nimport { HStack } from '../../h-stack';\nimport { Spacer } from '../../spacer';\nimport { inputToDate, buildPadInputStateReducer, validateInputElementTarget, setInConfiguredTimezone } from '../utils';\nimport { TIMEZONELESS_FORMAT } from '../constants';\nimport { TimeInput } from './time-input';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst VALID_DATE_ORDERS = ['dmy', 'mdy', 'ymd'];\n\n/**\n * TimePicker is a React component that renders a clock for time selection.\n *\n * ```jsx\n * import { TimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTimePicker = () => {\n * const [ time, setTime ] = useState( new Date() );\n *\n * return (\n * <TimePicker\n * currentTime={ date }\n * onChange={ ( newTime ) => setTime( newTime ) }\n * is12Hour\n * />\n * );\n * };\n * ```\n */\nexport function TimePicker({\n is12Hour,\n currentTime,\n onChange,\n dateOrder: dateOrderProp,\n hideLabelFromVision = false\n}) {\n const [date, setDate] = useState(() =>\n // Truncate the date at the minutes, see: #15495.\n startOfMinute(inputToDate(currentTime !== null && currentTime !== void 0 ? currentTime : new Date())));\n\n // Reset the state when currentTime changed.\n // TODO: useEffect() shouldn't be used like this, causes an unnecessary render\n useEffect(() => {\n setDate(startOfMinute(inputToDate(currentTime !== null && currentTime !== void 0 ? currentTime : new Date())));\n }, [currentTime]);\n const monthOptions = [{\n value: '01',\n label: __('January')\n }, {\n value: '02',\n label: __('February')\n }, {\n value: '03',\n label: __('March')\n }, {\n value: '04',\n label: __('April')\n }, {\n value: '05',\n label: __('May')\n }, {\n value: '06',\n label: __('June')\n }, {\n value: '07',\n label: __('July')\n }, {\n value: '08',\n label: __('August')\n }, {\n value: '09',\n label: __('September')\n }, {\n value: '10',\n label: __('October')\n }, {\n value: '11',\n label: __('November')\n }, {\n value: '12',\n label: __('December')\n }];\n const {\n day,\n month,\n year,\n minutes,\n hours\n } = useMemo(() => ({\n day: formatDate('d', date),\n month: formatDate('m', date),\n year: formatDate('Y', date),\n minutes: formatDate('i', date),\n hours: formatDate('H', date)\n }), [date]);\n const buildNumberControlChangeCallback = method => {\n const callback = (value, {\n event\n }) => {\n if (!validateInputElementTarget(event)) {\n return;\n }\n\n // We can safely assume value is a number if target is valid.\n const numberValue = Number(value);\n\n // Internal date is UTC-normalized, but the field should be updated\n // as if in the configured timezone.\n const newDate = setInConfiguredTimezone(date, {\n [method]: numberValue\n });\n setDate(newDate);\n onChange?.(formatDate(TIMEZONELESS_FORMAT, newDate));\n };\n return callback;\n };\n const onTimeInputChangeCallback = ({\n hours: newHours,\n minutes: newMinutes\n }) => {\n // Internal date is UTC-normalized, but the field should be updated\n // as if in the configured timezone.\n const newDate = setInConfiguredTimezone(date, {\n hours: newHours,\n minutes: newMinutes\n });\n setDate(newDate);\n onChange?.(formatDate(TIMEZONELESS_FORMAT, newDate));\n };\n const dayField = /*#__PURE__*/_jsx(DayInput, {\n className: \"components-datetime__time-field components-datetime__time-field-day\" // Unused, for backwards compatibility.\n ,\n label: __('Day'),\n hideLabelFromVision: true,\n __next40pxDefaultSize: true,\n value: day,\n step: 1,\n min: 1,\n max: 31,\n required: true,\n spinControls: \"none\",\n isPressEnterToChange: true,\n isDragEnabled: false,\n isShiftStepEnabled: false,\n onChange: buildNumberControlChangeCallback('date')\n }, \"day\");\n const monthField = /*#__PURE__*/_jsx(MonthSelectWrapper, {\n children: /*#__PURE__*/_jsx(SelectControl, {\n className: \"components-datetime__time-field components-datetime__time-field-month\" // Unused, for backwards compatibility.\n ,\n label: __('Month'),\n hideLabelFromVision: true,\n __next40pxDefaultSize: true,\n value: month,\n options: monthOptions,\n onChange: value => {\n // Internal date is UTC-normalized, but the field should be updated\n // as if in the configured timezone.\n const newDate = setInConfiguredTimezone(date, {\n month: Number(value) - 1\n });\n setDate(newDate);\n onChange?.(formatDate(TIMEZONELESS_FORMAT, newDate));\n }\n })\n }, \"month\");\n const yearField = /*#__PURE__*/_jsx(YearInput, {\n className: \"components-datetime__time-field components-datetime__time-field-year\" // Unused, for backwards compatibility.\n ,\n label: __('Year'),\n hideLabelFromVision: true,\n __next40pxDefaultSize: true,\n value: year,\n step: 1,\n min: 1,\n max: 9999,\n required: true,\n spinControls: \"none\",\n isPressEnterToChange: true,\n isDragEnabled: false,\n isShiftStepEnabled: false,\n onChange: buildNumberControlChangeCallback('year'),\n __unstableStateReducer: buildPadInputStateReducer(4)\n }, \"year\");\n const defaultDateOrder = is12Hour ? 'mdy' : 'dmy';\n const dateOrder = dateOrderProp && VALID_DATE_ORDERS.includes(dateOrderProp) ? dateOrderProp : defaultDateOrder;\n const fields = dateOrder.split('').map(field => {\n switch (field) {\n case 'd':\n return dayField;\n case 'm':\n return monthField;\n case 'y':\n return yearField;\n default:\n return null;\n }\n });\n return /*#__PURE__*/_jsxs(Wrapper, {\n className: \"components-datetime__time\" // Unused, for backwards compatibility.\n ,\n children: [/*#__PURE__*/_jsxs(Fieldset, {\n children: [hideLabelFromVision ? /*#__PURE__*/_jsx(VisuallyHidden, {\n as: \"legend\",\n children: __('Time')\n }) : /*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n as: \"legend\",\n className: \"components-datetime__time-legend\" // Unused, for backwards compatibility.\n ,\n children: __('Time')\n }), /*#__PURE__*/_jsxs(HStack, {\n className: \"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n ,\n children: [/*#__PURE__*/_jsx(TimeInput, {\n value: {\n hours: Number(hours),\n minutes: Number(minutes)\n },\n is12Hour: is12Hour,\n onChange: onTimeInputChangeCallback\n }), /*#__PURE__*/_jsx(Spacer, {}), /*#__PURE__*/_jsx(TimeZone, {})]\n })]\n }), /*#__PURE__*/_jsxs(Fieldset, {\n children: [hideLabelFromVision ? /*#__PURE__*/_jsx(VisuallyHidden, {\n as: \"legend\",\n children: __('Date')\n }) : /*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n as: \"legend\",\n className: \"components-datetime__time-legend\" // Unused, for backwards compatibility.\n ,\n children: __('Date')\n }), /*#__PURE__*/_jsx(HStack, {\n className: \"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n ,\n children: fields\n })]\n })]\n });\n}\n\n/**\n * A component to input a time.\n *\n * Values are passed as an object in 24-hour format (`{ hours: number, minutes: number }`).\n *\n * ```jsx\n * import { TimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTimeInput = () => {\n * \tconst [ time, setTime ] = useState( { hours: 13, minutes: 30 } );\n *\n * \treturn (\n * \t\t<TimePicker.TimeInput\n * \t\t\tvalue={ time }\n * \t\t\tonChange={ setTime }\n * \t\t\tlabel=\"Time\"\n * \t\t/>\n * \t);\n * };\n * ```\n */\nTimePicker.TimeInput = TimeInput;\nObject.assign(TimePicker.TimeInput, {\n displayName: 'TimePicker.TimeInput'\n});\nexport default TimePicker;"],
5
- "mappings": ";AAGA,SAAS,qBAAqB;AAK9B,SAAS,UAAU,SAAS,iBAAiB;AAC7C,SAAS,UAAU;AACnB,SAAS,QAAQ,kBAAkB;AAKnC,OAAO,iBAAiB;AACxB,SAAS,sBAAsB;AAC/B,OAAO,mBAAmB;AAC1B,OAAO,cAAc;AACrB,SAAS,SAAS,UAAU,oBAAoB,UAAU,iBAAiB;AAC3E,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,aAAa,2BAA2B,4BAA4B,+BAA+B;AAC5G,SAAS,2BAA2B;AACpC,SAAS,iBAAiB;AAC1B,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,IAAM,oBAAoB,CAAC,OAAO,OAAO,KAAK;AAsBvC,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,sBAAsB;AACxB,GAAG;AACD,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS;AAAA;AAAA,IAEjC,cAAc,YAAY,gBAAgB,QAAQ,gBAAgB,SAAS,cAAc,oBAAI,KAAK,CAAC,CAAC;AAAA,GAAC;AAIrG,YAAU,MAAM;AACd,YAAQ,cAAc,YAAY,gBAAgB,QAAQ,gBAAgB,SAAS,cAAc,oBAAI,KAAK,CAAC,CAAC,CAAC;AAAA,EAC/G,GAAG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U,CAAC,CAAC,CAAC;AAAA,MACpE,CAAC,CAAC;AAAA,IACJ,CAAC,GAAgB,sBAAM,UAAU;AAAA,MAC/B,UAAU,CAAC,sBAAmC,qBAAK,gBAAgB;AAAA,QACjE,IAAI;AAAA,QACJ,UAAU,GAAG,MAAM;AAAA,MACrB,CAAC,IAAiB,qBAAK,YAAY,aAAa;AAAA,QAC9C,IAAI;AAAA,QACJ,WAAW;AAAA,QAEX,UAAU,GAAG,MAAM;AAAA,MACrB,CAAC,GAAgB,qBAAK,QAAQ;AAAA,QAC5B,WAAW;AAAA,QAEX,UAAU;AAAA,MACZ,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAwBA,WAAW,YAAY;AACvB,OAAO,OAAO,WAAW,WAAW;AAAA,EAClC,aAAa;AACf,CAAC;AACD,IAAO,eAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { startOfMinute } from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { date as formatDate } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../../base-control';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport SelectControl from '../../select-control';\nimport TimeZone from './timezone';\nimport { Wrapper, Fieldset, MonthSelectWrapper, DayInput, YearInput } from './styles';\nimport { HStack } from '../../h-stack';\nimport { Spacer } from '../../spacer';\nimport { inputToDate, buildPadInputStateReducer, validateInputElementTarget, setInConfiguredTimezone } from '../utils';\nimport { TIMEZONELESS_FORMAT } from '../constants';\nimport { TimeInput } from './time-input';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst VALID_DATE_ORDERS = ['dmy', 'mdy', 'ymd'];\n\n/**\n * TimePicker is a React component that renders a clock for time selection.\n *\n * ```jsx\n * import { TimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTimePicker = () => {\n * const [ time, setTime ] = useState( new Date() );\n *\n * return (\n * <TimePicker\n * currentTime={ date }\n * onChange={ ( newTime ) => setTime( newTime ) }\n * is12Hour\n * />\n * );\n * };\n * ```\n */\nexport function TimePicker({\n is12Hour,\n currentTime,\n onChange,\n dateOrder: dateOrderProp,\n hideLabelFromVision = false\n}) {\n const [date, setDate] = useState(() =>\n // Truncate the date at the minutes, see: #15495.\n startOfMinute(inputToDate(currentTime ?? new Date())));\n\n // Reset the state when currentTime changed.\n // TODO: useEffect() shouldn't be used like this, causes an unnecessary render\n useEffect(() => {\n setDate(startOfMinute(inputToDate(currentTime ?? new Date())));\n }, [currentTime]);\n const monthOptions = [{\n value: '01',\n label: __('January')\n }, {\n value: '02',\n label: __('February')\n }, {\n value: '03',\n label: __('March')\n }, {\n value: '04',\n label: __('April')\n }, {\n value: '05',\n label: __('May')\n }, {\n value: '06',\n label: __('June')\n }, {\n value: '07',\n label: __('July')\n }, {\n value: '08',\n label: __('August')\n }, {\n value: '09',\n label: __('September')\n }, {\n value: '10',\n label: __('October')\n }, {\n value: '11',\n label: __('November')\n }, {\n value: '12',\n label: __('December')\n }];\n const {\n day,\n month,\n year,\n minutes,\n hours\n } = useMemo(() => ({\n day: formatDate('d', date),\n month: formatDate('m', date),\n year: formatDate('Y', date),\n minutes: formatDate('i', date),\n hours: formatDate('H', date)\n }), [date]);\n const buildNumberControlChangeCallback = method => {\n const callback = (value, {\n event\n }) => {\n if (!validateInputElementTarget(event)) {\n return;\n }\n\n // We can safely assume value is a number if target is valid.\n const numberValue = Number(value);\n\n // Internal date is UTC-normalized, but the field should be updated\n // as if in the configured timezone.\n const newDate = setInConfiguredTimezone(date, {\n [method]: numberValue\n });\n setDate(newDate);\n onChange?.(formatDate(TIMEZONELESS_FORMAT, newDate));\n };\n return callback;\n };\n const onTimeInputChangeCallback = ({\n hours: newHours,\n minutes: newMinutes\n }) => {\n // Internal date is UTC-normalized, but the field should be updated\n // as if in the configured timezone.\n const newDate = setInConfiguredTimezone(date, {\n hours: newHours,\n minutes: newMinutes\n });\n setDate(newDate);\n onChange?.(formatDate(TIMEZONELESS_FORMAT, newDate));\n };\n const dayField = /*#__PURE__*/_jsx(DayInput, {\n className: \"components-datetime__time-field components-datetime__time-field-day\" // Unused, for backwards compatibility.\n ,\n label: __('Day'),\n hideLabelFromVision: true,\n __next40pxDefaultSize: true,\n value: day,\n step: 1,\n min: 1,\n max: 31,\n required: true,\n spinControls: \"none\",\n isPressEnterToChange: true,\n isDragEnabled: false,\n isShiftStepEnabled: false,\n onChange: buildNumberControlChangeCallback('date')\n }, \"day\");\n const monthField = /*#__PURE__*/_jsx(MonthSelectWrapper, {\n children: /*#__PURE__*/_jsx(SelectControl, {\n className: \"components-datetime__time-field components-datetime__time-field-month\" // Unused, for backwards compatibility.\n ,\n label: __('Month'),\n hideLabelFromVision: true,\n __next40pxDefaultSize: true,\n value: month,\n options: monthOptions,\n onChange: value => {\n // Internal date is UTC-normalized, but the field should be updated\n // as if in the configured timezone.\n const newDate = setInConfiguredTimezone(date, {\n month: Number(value) - 1\n });\n setDate(newDate);\n onChange?.(formatDate(TIMEZONELESS_FORMAT, newDate));\n }\n })\n }, \"month\");\n const yearField = /*#__PURE__*/_jsx(YearInput, {\n className: \"components-datetime__time-field components-datetime__time-field-year\" // Unused, for backwards compatibility.\n ,\n label: __('Year'),\n hideLabelFromVision: true,\n __next40pxDefaultSize: true,\n value: year,\n step: 1,\n min: 1,\n max: 9999,\n required: true,\n spinControls: \"none\",\n isPressEnterToChange: true,\n isDragEnabled: false,\n isShiftStepEnabled: false,\n onChange: buildNumberControlChangeCallback('year'),\n __unstableStateReducer: buildPadInputStateReducer(4)\n }, \"year\");\n const defaultDateOrder = is12Hour ? 'mdy' : 'dmy';\n const dateOrder = dateOrderProp && VALID_DATE_ORDERS.includes(dateOrderProp) ? dateOrderProp : defaultDateOrder;\n const fields = dateOrder.split('').map(field => {\n switch (field) {\n case 'd':\n return dayField;\n case 'm':\n return monthField;\n case 'y':\n return yearField;\n default:\n return null;\n }\n });\n return /*#__PURE__*/_jsxs(Wrapper, {\n className: \"components-datetime__time\" // Unused, for backwards compatibility.\n ,\n children: [/*#__PURE__*/_jsxs(Fieldset, {\n children: [hideLabelFromVision ? /*#__PURE__*/_jsx(VisuallyHidden, {\n as: \"legend\",\n children: __('Time')\n }) : /*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n as: \"legend\",\n className: \"components-datetime__time-legend\" // Unused, for backwards compatibility.\n ,\n children: __('Time')\n }), /*#__PURE__*/_jsxs(HStack, {\n className: \"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n ,\n children: [/*#__PURE__*/_jsx(TimeInput, {\n value: {\n hours: Number(hours),\n minutes: Number(minutes)\n },\n is12Hour: is12Hour,\n onChange: onTimeInputChangeCallback\n }), /*#__PURE__*/_jsx(Spacer, {}), /*#__PURE__*/_jsx(TimeZone, {})]\n })]\n }), /*#__PURE__*/_jsxs(Fieldset, {\n children: [hideLabelFromVision ? /*#__PURE__*/_jsx(VisuallyHidden, {\n as: \"legend\",\n children: __('Date')\n }) : /*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n as: \"legend\",\n className: \"components-datetime__time-legend\" // Unused, for backwards compatibility.\n ,\n children: __('Date')\n }), /*#__PURE__*/_jsx(HStack, {\n className: \"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n ,\n children: fields\n })]\n })]\n });\n}\n\n/**\n * A component to input a time.\n *\n * Values are passed as an object in 24-hour format (`{ hours: number, minutes: number }`).\n *\n * ```jsx\n * import { TimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTimeInput = () => {\n * \tconst [ time, setTime ] = useState( { hours: 13, minutes: 30 } );\n *\n * \treturn (\n * \t\t<TimePicker.TimeInput\n * \t\t\tvalue={ time }\n * \t\t\tonChange={ setTime }\n * \t\t\tlabel=\"Time\"\n * \t\t/>\n * \t);\n * };\n * ```\n */\nTimePicker.TimeInput = TimeInput;\nObject.assign(Tim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AAC,CAAC;AAAA,EACJ,CAAC;AACH;AAwBA,WAAW,YAAY;AACvB,OAAO,OAAO,WAAW,WAAW;AAAA,EAClC,aAAa;AACf,CAAC;AACD,IAAO,eAAQ;",
6
6
  "names": []
7
7
  }
@@ -58,8 +58,7 @@ function setInConfiguredTimezone(date, updates) {
58
58
  return new UTCDateMini(getDate(timezoneless).getTime());
59
59
  }
60
60
  function validateInputElementTarget(event) {
61
- var _ownerDocument$defaul;
62
- const HTMLInputElementInstance = (_ownerDocument$defaul = event.target?.ownerDocument.defaultView?.HTMLInputElement) !== null && _ownerDocument$defaul !== void 0 ? _ownerDocument$defaul : HTMLInputElement;
61
+ const HTMLInputElementInstance = event.target?.ownerDocument.defaultView?.HTMLInputElement ?? HTMLInputElement;
63
62
  if (!(event.target instanceof HTMLInputElementInstance)) {
64
63
  return false;
65
64
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/date-time/utils.ts"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport { UTCDateMini } from '@date-fns/utc';\n\n/**\n * WordPress dependencies\n */\nimport { date as formatDate, getDate } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\n\nimport { COMMIT, PRESS_DOWN, PRESS_UP } from '../input-control/reducer/actions';\n\n/**\n * Converts a date input to a UTC-normalized date for consistent date\n * manipulation. Timezoneless strings are interpreted using the timezone\n * offset from @wordpress/date settings. Date objects and timestamps\n * represent specific UTC instants.\n *\n * @param input Value to turn into a date.\n */\nexport function inputToDate(input) {\n if (typeof input === 'string') {\n // Note that JavaScript doesn't fully support ISO-8601 time strings, so\n // the behavior of passing these through to the Date constructor is\n // non-deterministic.\n //\n // See: https://tc39.es/ecma262/#sec-date-time-string-format\n const hasTimezone = /Z|[+-]\\d{2}(:?\\d{2})?$/.test(input);\n if (hasTimezone) {\n return new UTCDateMini(new Date(input));\n }\n\n // Strings without timezone indicators are interpreted using configured\n // timezone offset, then converted to UTC for internal storage.\n return new UTCDateMini(getDate(input).getTime());\n }\n\n // Date objects and number timestamps represent specific UTC moments.\n // Convert to milliseconds since epoch for consistent UTC handling.\n const time = input instanceof Date ? input.getTime() : input;\n return new UTCDateMini(time);\n}\n\n/**\n * Returns the start of day (midnight) as a browser-local Date for the calendar\n * day in the configured timezone in @wordpress/date settings. This is necessary\n * because date-fns's startOfDay operates in browser local time, which can cause\n * off-by-one-day bugs when browser and configured timezones differ.\n *\n * For example, if the UTC time is Nov 16, 01:00 UTC and configured timezone\n * is UTC-5, the date is Nov 15. This function returns a browser-local Date\n * at Nov 15, 00:00 (browser local midnight) so it matches calendar days.\n *\n * @param date A Date object normalized to UTC\n * @return A browser-local Date at midnight for the configured timezone date\n */\nexport function startOfDayInConfiguredTimezone(date) {\n // Determine the calendar day in the configured WordPress timezone and\n // return a browser-local Date at midnight for that calendar day.\n const year = Number(formatDate('Y', date));\n const month = Number(formatDate('n', date)) - 1;\n const day = Number(formatDate('j', date));\n return new Date(year, month, day, 0, 0, 0, 0);\n}\n\n/**\n * Converts a 12-hour time to a 24-hour time.\n * @param hours\n * @param isPm\n */\nexport function from12hTo24h(hours, isPm) {\n return isPm ? (hours % 12 + 12) % 24 : hours % 12;\n}\n\n/**\n * Converts a 24-hour time to a 12-hour time.\n * @param hours\n */\nexport function from24hTo12h(hours) {\n return hours % 12 || 12;\n}\n\n/**\n * Creates an InputControl reducer used to pad an input so that it is always a\n * given width. For example, the hours and minutes inputs are padded to 2 so\n * that '4' appears as '04'.\n *\n * @param pad How many digits the value should be.\n */\nexport function buildPadInputStateReducer(pad) {\n return (state, action) => {\n const nextState = {\n ...state\n };\n if (action.type === COMMIT || action.type === PRESS_UP || action.type === PRESS_DOWN) {\n if (nextState.value !== undefined) {\n nextState.value = nextState.value.toString().padStart(pad, '0');\n }\n }\n return nextState;\n };\n}\n\n/**\n * Updates specific date fields in the configured timezone and returns a new\n * UTC date.\n *\n * @param date A Date object\n * @param updates Object with fields to update\n * @return A Date object normalized to UTC with the updated values\n */\nexport function setInConfiguredTimezone(date, updates) {\n const values = {\n year: Number(formatDate('Y', date)),\n month: Number(formatDate('n', date)) - 1,\n date: Number(formatDate('j', date)),\n hours: Number(formatDate('H', date)),\n minutes: Number(formatDate('i', date)),\n seconds: Number(formatDate('s', date)),\n ...updates\n };\n const year = String(values.year);\n const month = String(values.month + 1).padStart(2, '0');\n const day = String(values.date).padStart(2, '0');\n const hours = String(values.hours).padStart(2, '0');\n const minutes = String(values.minutes).padStart(2, '0');\n const seconds = String(values.seconds).padStart(2, '0');\n const timezoneless = `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`;\n\n // Parse as WordPress-configured timezone time and convert to a UTC instant.\n return new UTCDateMini(getDate(timezoneless).getTime());\n}\n\n/**\n * Validates the target of a React event to ensure it is an input element and\n * that the input is valid.\n * @param event\n */\nexport function validateInputElementTarget(event) {\n var _ownerDocument$defaul;\n // `instanceof` checks need to get the instance definition from the\n // corresponding window object \u2014 therefore, the following logic makes\n // the component work correctly even when rendered inside an iframe.\n const HTMLInputElementInstance = (_ownerDocument$defaul = event.target?.ownerDocument.defaultView?.HTMLInputElement) !== null && _ownerDocument$defaul !== void 0 ? _ownerDocument$defaul : HTMLInputElement;\n if (!(event.target instanceof HTMLInputElementInstance)) {\n return false;\n }\n return event.target.validity.valid;\n}"],
5
- "mappings": ";AAGA,SAAS,mBAAmB;AAK5B,SAAS,QAAQ,YAAY,eAAe;AAM5C,SAAS,QAAQ,YAAY,gBAAgB;AAUtC,SAAS,YAAY,OAAO;AACjC,MAAI,OAAO,UAAU,UAAU;AAM7B,UAAM,cAAc,yBAAyB,KAAK,KAAK;AACvD,QAAI,aAAa;AACf,aAAO,IAAI,YAAY,IAAI,KAAK,KAAK,CAAC;AAAA,IACxC;AAIA,WAAO,IAAI,YAAY,QAAQ,KAAK,EAAE,QAAQ,CAAC;AAAA,EACjD;AAIA,QAAM,OAAO,iBAAiB,OAAO,MAAM,QAAQ,IAAI;AACvD,SAAO,IAAI,YAAY,IAAI;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E,SAAS,GAAG,GAAG;AAC/C,QAAM,QAAQ,OAAO,OAAO,KAAK,EAAE,SAAS,GAAG,GAAG;AAClD,QAAM,UAAU,OAAO,OAAO,OAAO,EAAE,SAAS,GAAG,GAAG;AACtD,QAAM,UAAU,OAAO,OAAO,OAAO,EAAE,SAAS,GAAG,GAAG;AACtD,QAAM,eAAe,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,IAAI,KAAK,IAAI,OAAO,IAAI,OAAO;AAG3E,SAAO,IAAI,YAAY,QAAQ,YAAY,EAAE,QAAQ,CAAC;AACxD;AAOO,SAAS,2BAA2B,OAAO;AAChD,MAAI;AAIJ,QAAM,4BAA4B,wBAAwB,MAAM,QAAQ,cAAc,aAAa,sBAAsB,QAAQ,0BAA0B,SAAS,wBAAwB;AAC5L,MAAI,EAAE,MAAM,kBAAkB,2BAA2B;AACvD,WAAO;AAAA,EACT;AACA,SAAO,MAAM,OAAO,SAAS;AAC/B;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { UTCDateMini } from '@date-fns/utc';\n\n/**\n * WordPress dependencies\n */\nimport { date as formatDate, getDate } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\n\nimport { COMMIT, PRESS_DOWN, PRESS_UP } from '../input-control/reducer/actions';\n\n/**\n * Converts a date input to a UTC-normalized date for consistent date\n * manipulation. Timezoneless strings are interpreted using the timezone\n * offset from @wordpress/date settings. Date objects and timestamps\n * represent specific UTC instants.\n *\n * @param input Value to turn into a date.\n */\nexport function inputToDate(input) {\n if (typeof input === 'string') {\n // Note that JavaScript doesn't fully support ISO-8601 time strings, so\n // the behavior of passing these through to the Date constructor is\n // non-deterministic.\n //\n // See: https://tc39.es/ecma262/#sec-date-time-string-format\n const hasTimezone = /Z|[+-]\\d{2}(:?\\d{2})?$/.test(input);\n if (hasTimezone) {\n return new UTCDateMini(new Date(input));\n }\n\n // Strings without timezone indicators are interpreted using configured\n // timezone offset, then converted to UTC for internal storage.\n return new UTCDateMini(getDate(input).getTime());\n }\n\n // Date objects and number timestamps represent specific UTC moments.\n // Convert to milliseconds since epoch for consistent UTC handling.\n const time = input instanceof Date ? input.getTime() : input;\n return new UTCDateMini(time);\n}\n\n/**\n * Returns the start of day (midnight) as a browser-local Date for the calendar\n * day in the configured timezone in @wordpress/date settings. This is necessary\n * because date-fns's startOfDay operates in browser local time, which can cause\n * off-by-one-day bugs when browser and configured timezones differ.\n *\n * For example, if the UTC time is Nov 16, 01:00 UTC and configured timezone\n * is UTC-5, the date is Nov 15. This function returns a browser-local Date\n * at Nov 15, 00:00 (browser local midnight) so it matches calendar days.\n *\n * @param date A Date object normalized to UTC\n * @return A browser-local Date at midnight for the configured timezone date\n */\nexport function startOfDayInConfiguredTimezone(date) {\n // Determine the calendar day in the configured WordPress timezone and\n // return a browser-local Date at midnight for that calendar day.\n const year = Number(formatDate('Y', date));\n const month = Number(formatDate('n', date)) - 1;\n const day = Number(formatDate('j', date));\n return new Date(year, month, day, 0, 0, 0, 0);\n}\n\n/**\n * Converts a 12-hour time to a 24-hour time.\n * @param hours\n * @param isPm\n */\nexport function from12hTo24h(hours, isPm) {\n return isPm ? (hours % 12 + 12) % 24 : hours % 12;\n}\n\n/**\n * Converts a 24-hour time to a 12-hour time.\n * @param hours\n */\nexport function from24hTo12h(hours) {\n return hours % 12 || 12;\n}\n\n/**\n * Creates an InputControl reducer used to pad an input so that it is always a\n * given width. For example, the hours and minutes inputs are padded to 2 so\n * that '4' appears as '04'.\n *\n * @param pad How many digits the value should be.\n */\nexport function buildPadInputStateReducer(pad) {\n return (state, action) => {\n const nextState = {\n ...state\n };\n if (action.type === COMMIT || action.type === PRESS_UP || action.type === PRESS_DOWN) {\n if (nextState.value !== undefined) {\n nextState.value = nextState.value.toString().padStart(pad, '0');\n }\n }\n return nextState;\n };\n}\n\n/**\n * Updates specific date fields in the configured timezone and returns a new\n * UTC date.\n *\n * @param date A Date object\n * @param updates Object with fields to update\n * @return A Date object normalized to UTC with the updated values\n */\nexport function setInConfiguredTimezone(date, updates) {\n const values = {\n year: Number(formatDate('Y', date)),\n month: Number(formatDate('n', date)) - 1,\n date: Number(formatDate('j', date)),\n hours: Number(formatDate('H', date)),\n minutes: Number(formatDate('i', date)),\n seconds: Number(formatDate('s', date)),\n ...updates\n };\n const year = String(values.year);\n const month = String(values.month + 1).padStart(2, '0');\n const day = String(values.date).padStart(2, '0');\n const hours = String(values.hours).padStart(2, '0');\n const minutes = String(values.minutes).padStart(2, '0');\n const seconds = String(values.seconds).padStart(2, '0');\n const timezoneless = `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`;\n\n // Parse as WordPress-configured timezone time and convert to a UTC instant.\n return new UTCDateMini(getDate(timezoneless).getTime());\n}\n\n/**\n * Validates the target of a React event to ensure it is an input element and\n * that the input is valid.\n * @param event\n */\nexport function validateInputElementTarget(event) {\n // `instanceof` checks need to get the instance definition from the\n // corresponding window object \u2014 therefore, the following logic makes\n // the component work correctly even when rendered inside an iframe.\n const HTMLInputElementInstance = event.target?.ownerDocument.defaultView?.HTMLInputElement ?? HTMLInputElement;\n if (!(event.target instanceof HTMLInputElementInstance)) {\n return false;\n }\n return event.target.validity.valid;\n}"],
5
+ "mappings": ";AAGA,SAAS,mBAAmB;AAK5B,SAAS,QAAQ,YAAY,eAAe;AAM5C,SAAS,QAAQ,YAAY,gBAAgB;AAUtC,SAAS,YAAY,OAAO;AACjC,MAAI,OAAO,UAAU,UAAU;AAM7B,UAAM,cAAc,yBAAyB,KAAK,KAAK;AACvD,QAAI,aAAa;AACf,aAAO,IAAI,YAAY,IAAI,KAAK,KAAK,CAAC;AAAA,IACxC;AAIA,WAAO,IAAI,YAAY,QAAQ,KAAK,EAAE,QAAQ,CAAC;AAAA,EACjD;AAIA,QAAM,OAAO,iBAAiB,OAAO,MAAM,QAAQ,IAAI;AACvD,SAAO,IAAI,YAAY,IAAI;AAC7B;AAeO,SAAS,+BAA+B,MAAM;AAGnD,QAAM,OAAO,OAAO,WAAW,KAAK,IAAI,CAAC;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AAClD,QAAM,UAAU,OAAO,OAAO,OAAO,EAAE,SAAS,GAAG,GAAG;AACtD,QAAM,UAAU,OAAO,OAAO,OAAO,EAAE,SAAS,GAAG,GAAG;AACtD,QAAM,eAAe,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,IAAI,KAAK,IAAI,OAAO,IAAI,OAAO;AAG3E,SAAO,IAAI,YAAY,QAAQ,YAAY,EAAE,QAAQ,CAAC;AACxD;AAOO,SAAS,2BAA2B,OAAO;AAIhD,QAAM,2BAA2B,MAAM,QAAQ,cAAc,aAAa,oBAAoB;AAC9F,MAAI,EAAE,MAAM,kBAAkB,2BAA2B;AACvD,WAAO;AAAA,EACT;AACA,SAAO,MAAM,OAAO,SAAS;AAC/B;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,7 @@ var UnforwardedDisclosureContent = ({
18
18
  });
19
19
  };
20
20
  var DisclosureContent2 = forwardRef(UnforwardedDisclosureContent);
21
+ DisclosureContent2.displayName = "DisclosureContent";
21
22
  var disclosure_default = DisclosureContent2;
22
23
  export {
23
24
  DisclosureContent2 as DisclosureContent,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/disclosure/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Accessible Disclosure component that controls visibility of a section of\n * content. It follows the WAI-ARIA Disclosure Pattern.\n */\nconst UnforwardedDisclosureContent = ({\n visible,\n children,\n ...props\n}, ref) => {\n const disclosure = Ariakit.useDisclosureStore({\n open: visible\n });\n return /*#__PURE__*/_jsx(Ariakit.DisclosureContent, {\n store: disclosure,\n ref: ref,\n ...props,\n children: children\n });\n};\nexport const DisclosureContent = forwardRef(UnforwardedDisclosureContent);\nexport default DisclosureContent;"],
5
- "mappings": ";AAGA,YAAY,aAAa;AAKzB,SAAS,kBAAkB;AAK3B,SAAS,OAAO,YAAY;AAK5B,IAAM,+BAA+B,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,QAAQ;AACT,QAAM,aAAqB,2BAAmB;AAAA,IAC5C,MAAM;AAAA,EACR,CAAC;AACD,SAAoB,qBAAa,2BAAmB;AAAA,IAClD,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH;AACO,IAAMA,qBAAoB,WAAW,4BAA4B;AACxE,IAAO,qBAAQA;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Accessible Disclosure component that controls visibility of a section of\n * content. It follows the WAI-ARIA Disclosure Pattern.\n */\nconst UnforwardedDisclosureContent = ({\n visible,\n children,\n ...props\n}, ref) => {\n const disclosure = Ariakit.useDisclosureStore({\n open: visible\n });\n return /*#__PURE__*/_jsx(Ariakit.DisclosureContent, {\n store: disclosure,\n ref: ref,\n ...props,\n children: children\n });\n};\nexport const DisclosureContent = forwardRef(UnforwardedDisclosureContent);\nDisclosureContent.displayName = 'DisclosureContent';\nexport default DisclosureContent;"],
5
+ "mappings": ";AAGA,YAAY,aAAa;AAKzB,SAAS,kBAAkB;AAK3B,SAAS,OAAO,YAAY;AAK5B,IAAM,+BAA+B,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,QAAQ;AACT,QAAM,aAAqB,2BAAmB;AAAA,IAC5C,MAAM;AAAA,EACR,CAAC;AACD,SAAoB,qBAAa,2BAAmB;AAAA,IAClD,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH;AACO,IAAMA,qBAAoB,WAAW,4BAA4B;AACxEA,mBAAkB,cAAc;AAChC,IAAO,qBAAQA;",
6
6
  "names": ["DisclosureContent"]
7
7
  }
@@ -22,8 +22,8 @@ var renderMargin = ({
22
22
  marginStart,
23
23
  marginEnd
24
24
  }) => /* @__PURE__ */ css(rtl({
25
- [MARGIN_DIRECTIONS[orientation].start]: space(marginStart !== null && marginStart !== void 0 ? marginStart : margin),
26
- [MARGIN_DIRECTIONS[orientation].end]: space(marginEnd !== null && marginEnd !== void 0 ? marginEnd : margin)
25
+ [MARGIN_DIRECTIONS[orientation].start]: space(marginStart ?? margin),
26
+ [MARGIN_DIRECTIONS[orientation].end]: space(marginEnd ?? margin)
27
27
  })(), process.env.NODE_ENV === "production" ? "" : ";label:renderMargin;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQ0MiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgRGl2aWRlclByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IE1BUkdJTl9ESVJFQ1RJT05TOiBSZWNvcmQ8XG5cdE5vbk51bGxhYmxlPCBEaXZpZGVyUHJvcHNbICdvcmllbnRhdGlvbicgXSA+LFxuXHRSZWN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
  var _ref = process.env.NODE_ENV === "production" ? {
29
29
  name: "1u4hpl4",