@wordpress/components 28.2.0 → 28.3.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 (424) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/build/animation/index.js.map +1 -1
  3. package/build/autocomplete/autocompleter-ui.js +1 -0
  4. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  5. package/build/autocomplete/index.js.map +1 -1
  6. package/build/base-control/index.js +14 -7
  7. package/build/base-control/index.js.map +1 -1
  8. package/build/border-box-control/border-box-control-visualizer/component.js +0 -4
  9. package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  10. package/build/button/index.js +5 -3
  11. package/build/button/index.js.map +1 -1
  12. package/build/button/types.js.map +1 -1
  13. package/build/combobox-control/index.js +4 -1
  14. package/build/combobox-control/index.js.map +1 -1
  15. package/build/composite/current/index.js.map +1 -1
  16. package/build/custom-select-control-v2/custom-select.js +57 -33
  17. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  18. package/build/custom-select-control-v2/default-component/index.js +0 -1
  19. package/build/custom-select-control-v2/default-component/index.js.map +1 -1
  20. package/build/custom-select-control-v2/item.js +2 -0
  21. package/build/custom-select-control-v2/item.js.map +1 -1
  22. package/build/custom-select-control-v2/legacy-component/index.js +18 -6
  23. package/build/custom-select-control-v2/legacy-component/index.js.map +1 -1
  24. package/build/custom-select-control-v2/styles.js +90 -78
  25. package/build/custom-select-control-v2/styles.js.map +1 -1
  26. package/build/custom-select-control-v2/types.js.map +1 -1
  27. package/build/date-time/date-time/index.js +3 -1
  28. package/build/date-time/date-time/index.js.map +1 -1
  29. package/build/date-time/index.js +7 -0
  30. package/build/date-time/index.js.map +1 -1
  31. package/build/date-time/time/index.js +62 -145
  32. package/build/date-time/time/index.js.map +1 -1
  33. package/build/date-time/time-input/index.js +159 -0
  34. package/build/date-time/time-input/index.js.map +1 -0
  35. package/build/date-time/types.js.map +1 -1
  36. package/build/date-time/utils.js +64 -0
  37. package/build/date-time/utils.js.map +1 -1
  38. package/build/disclosure/index.js +0 -1
  39. package/build/disclosure/index.js.map +1 -1
  40. package/build/divider/component.js +0 -1
  41. package/build/divider/component.js.map +1 -1
  42. package/build/divider/types.js.map +1 -1
  43. package/build/dropdown-menu/index.js +1 -0
  44. package/build/dropdown-menu/index.js.map +1 -1
  45. package/build/dropdown-menu-v2/index.js +0 -1
  46. package/build/dropdown-menu-v2/index.js.map +1 -1
  47. package/build/dropdown-menu-v2/styles.js +15 -16
  48. package/build/dropdown-menu-v2/styles.js.map +1 -1
  49. package/build/dropdown-menu-v2/types.js.map +1 -1
  50. package/build/font-size-picker/font-size-picker-select.js +2 -2
  51. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  52. package/build/font-size-picker/index.js +1 -1
  53. package/build/font-size-picker/index.js.map +1 -1
  54. package/build/font-size-picker/utils.js +0 -4
  55. package/build/font-size-picker/utils.js.map +1 -1
  56. package/build/form-token-field/token.js +4 -1
  57. package/build/form-token-field/token.js.map +1 -1
  58. package/build/higher-order/with-spoken-messages/index.js +1 -2
  59. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  60. package/build/menu-items-choice/types.js.map +1 -1
  61. package/build/popover/index.js +0 -4
  62. package/build/popover/index.js.map +1 -1
  63. package/build/popover/utils.js +0 -1
  64. package/build/popover/utils.js.map +1 -1
  65. package/build/private-apis.js +2 -4
  66. package/build/private-apis.js.map +1 -1
  67. package/build/progress-bar/styles.js +19 -13
  68. package/build/progress-bar/styles.js.map +1 -1
  69. package/build/radio-group/context.js +0 -1
  70. package/build/radio-group/context.js.map +1 -1
  71. package/build/radio-group/index.js +0 -1
  72. package/build/radio-group/index.js.map +1 -1
  73. package/build/radio-group/radio.js +0 -1
  74. package/build/radio-group/radio.js.map +1 -1
  75. package/build/range-control/index.js +4 -1
  76. package/build/range-control/index.js.map +1 -1
  77. package/build/range-control/styles/range-control-styles.js +34 -28
  78. package/build/range-control/styles/range-control-styles.js.map +1 -1
  79. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  80. package/build/select-control/index.js +1 -2
  81. package/build/select-control/index.js.map +1 -1
  82. package/build/select-control/styles/select-control-styles.js +13 -8
  83. package/build/select-control/styles/select-control-styles.js.map +1 -1
  84. package/build/tab-panel/index.js +0 -1
  85. package/build/tab-panel/index.js.map +1 -1
  86. package/build/tabs/index.js +0 -1
  87. package/build/tabs/index.js.map +1 -1
  88. package/build/tabs/styles.js +3 -5
  89. package/build/tabs/styles.js.map +1 -1
  90. package/build/tabs/tablist.js +148 -37
  91. package/build/tabs/tablist.js.map +1 -1
  92. package/build/tabs/types.js.map +1 -1
  93. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +0 -2
  94. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  95. package/build/toggle-group-control/toggle-group-control/component.js +0 -2
  96. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  97. package/build/toggle-group-control/toggle-group-control-option-base/component.js +0 -4
  98. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  99. package/build/toolbar/toolbar/toolbar-container.js +0 -1
  100. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  101. package/build/toolbar/toolbar/types.js.map +1 -1
  102. package/build/toolbar/toolbar-button/index.js +27 -19
  103. package/build/toolbar/toolbar-button/index.js.map +1 -1
  104. package/build/toolbar/toolbar-button/types.js.map +1 -1
  105. package/build/toolbar/toolbar-context/index.js +0 -1
  106. package/build/toolbar/toolbar-context/index.js.map +1 -1
  107. package/build/toolbar/toolbar-item/index.js +1 -1
  108. package/build/toolbar/toolbar-item/index.js.map +1 -1
  109. package/build/tooltip/index.js +3 -2
  110. package/build/tooltip/index.js.map +1 -1
  111. package/build/tooltip/types.js.map +1 -1
  112. package/build/unit-control/index.js +3 -3
  113. package/build/unit-control/index.js.map +1 -1
  114. package/build/unit-control/styles/unit-control-styles.js +7 -7
  115. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  116. package/build/utils/hooks/use-update-effect.js +4 -1
  117. package/build/utils/hooks/use-update-effect.js.map +1 -1
  118. package/build-module/animation/index.js +0 -1
  119. package/build-module/animation/index.js.map +1 -1
  120. package/build-module/autocomplete/autocompleter-ui.js +1 -0
  121. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  122. package/build-module/autocomplete/index.js.map +1 -1
  123. package/build-module/base-control/index.js +13 -6
  124. package/build-module/base-control/index.js.map +1 -1
  125. package/build-module/border-box-control/border-box-control-visualizer/component.js +0 -4
  126. package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  127. package/build-module/button/index.js +5 -3
  128. package/build-module/button/index.js.map +1 -1
  129. package/build-module/button/types.js.map +1 -1
  130. package/build-module/combobox-control/index.js +4 -1
  131. package/build-module/combobox-control/index.js.map +1 -1
  132. package/build-module/composite/current/index.js +0 -3
  133. package/build-module/composite/current/index.js.map +1 -1
  134. package/build-module/custom-select-control-v2/custom-select.js +58 -35
  135. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  136. package/build-module/custom-select-control-v2/default-component/index.js +0 -1
  137. package/build-module/custom-select-control-v2/default-component/index.js.map +1 -1
  138. package/build-module/custom-select-control-v2/item.js +2 -0
  139. package/build-module/custom-select-control-v2/item.js.map +1 -1
  140. package/build-module/custom-select-control-v2/legacy-component/index.js +18 -6
  141. package/build-module/custom-select-control-v2/legacy-component/index.js.map +1 -1
  142. package/build-module/custom-select-control-v2/styles.js +88 -76
  143. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  144. package/build-module/custom-select-control-v2/types.js.map +1 -1
  145. package/build-module/date-time/date-time/index.js +4 -1
  146. package/build-module/date-time/date-time/index.js.map +1 -1
  147. package/build-module/date-time/index.js +2 -1
  148. package/build-module/date-time/index.js.map +1 -1
  149. package/build-module/date-time/time/index.js +65 -149
  150. package/build-module/date-time/time/index.js.map +1 -1
  151. package/build-module/date-time/time-input/index.js +151 -0
  152. package/build-module/date-time/time-input/index.js.map +1 -0
  153. package/build-module/date-time/types.js.map +1 -1
  154. package/build-module/date-time/utils.js +61 -0
  155. package/build-module/date-time/utils.js.map +1 -1
  156. package/build-module/disclosure/index.js +0 -1
  157. package/build-module/disclosure/index.js.map +1 -1
  158. package/build-module/divider/component.js +0 -1
  159. package/build-module/divider/component.js.map +1 -1
  160. package/build-module/divider/types.js.map +1 -1
  161. package/build-module/dropdown-menu/index.js +1 -0
  162. package/build-module/dropdown-menu/index.js.map +1 -1
  163. package/build-module/dropdown-menu-v2/index.js +0 -1
  164. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  165. package/build-module/dropdown-menu-v2/styles.js +14 -15
  166. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  167. package/build-module/dropdown-menu-v2/types.js.map +1 -1
  168. package/build-module/font-size-picker/font-size-picker-select.js +1 -1
  169. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  170. package/build-module/font-size-picker/index.js +1 -1
  171. package/build-module/font-size-picker/index.js.map +1 -1
  172. package/build-module/font-size-picker/utils.js +0 -4
  173. package/build-module/font-size-picker/utils.js.map +1 -1
  174. package/build-module/form-token-field/token.js +4 -1
  175. package/build-module/form-token-field/token.js.map +1 -1
  176. package/build-module/higher-order/with-spoken-messages/index.js +1 -2
  177. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  178. package/build-module/menu-items-choice/types.js.map +1 -1
  179. package/build-module/popover/index.js +0 -3
  180. package/build-module/popover/index.js.map +1 -1
  181. package/build-module/popover/utils.js +0 -1
  182. package/build-module/popover/utils.js.map +1 -1
  183. package/build-module/private-apis.js +2 -4
  184. package/build-module/private-apis.js.map +1 -1
  185. package/build-module/progress-bar/styles.js +21 -13
  186. package/build-module/progress-bar/styles.js.map +1 -1
  187. package/build-module/radio-group/context.js +0 -1
  188. package/build-module/radio-group/context.js.map +1 -1
  189. package/build-module/radio-group/index.js +0 -1
  190. package/build-module/radio-group/index.js.map +1 -1
  191. package/build-module/radio-group/radio.js +0 -1
  192. package/build-module/radio-group/radio.js.map +1 -1
  193. package/build-module/range-control/index.js +4 -1
  194. package/build-module/range-control/index.js.map +1 -1
  195. package/build-module/range-control/styles/range-control-styles.js +34 -28
  196. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  197. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  198. package/build-module/select-control/index.js +2 -3
  199. package/build-module/select-control/index.js.map +1 -1
  200. package/build-module/select-control/styles/select-control-styles.js +12 -7
  201. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  202. package/build-module/tab-panel/index.js +0 -1
  203. package/build-module/tab-panel/index.js.map +1 -1
  204. package/build-module/tabs/index.js +0 -1
  205. package/build-module/tabs/index.js.map +1 -1
  206. package/build-module/tabs/styles.js +3 -4
  207. package/build-module/tabs/styles.js.map +1 -1
  208. package/build-module/tabs/tablist.js +149 -38
  209. package/build-module/tabs/tablist.js.map +1 -1
  210. package/build-module/tabs/types.js.map +1 -1
  211. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +0 -1
  212. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  213. package/build-module/toggle-group-control/toggle-group-control/component.js +0 -1
  214. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  215. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +0 -2
  216. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  217. package/build-module/toolbar/toolbar/toolbar-container.js +0 -1
  218. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  219. package/build-module/toolbar/toolbar/types.js.map +1 -1
  220. package/build-module/toolbar/toolbar-button/index.js +27 -19
  221. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  222. package/build-module/toolbar/toolbar-button/types.js.map +1 -1
  223. package/build-module/toolbar/toolbar-context/index.js +0 -1
  224. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  225. package/build-module/toolbar/toolbar-item/index.js +1 -1
  226. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  227. package/build-module/tooltip/index.js +3 -2
  228. package/build-module/tooltip/index.js.map +1 -1
  229. package/build-module/tooltip/types.js.map +1 -1
  230. package/build-module/unit-control/index.js +3 -3
  231. package/build-module/unit-control/index.js.map +1 -1
  232. package/build-module/unit-control/styles/unit-control-styles.js +7 -7
  233. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  234. package/build-module/utils/hooks/use-update-effect.js +4 -1
  235. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  236. package/build-style/style-rtl.css +18 -0
  237. package/build-style/style.css +18 -0
  238. package/build-types/animation/index.d.ts.map +1 -1
  239. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  240. package/build-types/autocomplete/index.d.ts.map +1 -1
  241. package/build-types/base-control/index.d.ts +6 -20
  242. package/build-types/base-control/index.d.ts.map +1 -1
  243. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  244. package/build-types/border-box-control/border-box-control-visualizer/component.d.ts.map +1 -1
  245. package/build-types/button/deprecated.d.ts +4 -4
  246. package/build-types/button/index.d.ts.map +1 -1
  247. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  248. package/build-types/button/types.d.ts +27 -10
  249. package/build-types/button/types.d.ts.map +1 -1
  250. package/build-types/combobox-control/index.d.ts.map +1 -1
  251. package/build-types/composite/current/index.d.ts.map +1 -1
  252. package/build-types/custom-select-control-v2/custom-select.d.ts +2 -2
  253. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  254. package/build-types/custom-select-control-v2/default-component/index.d.ts.map +1 -1
  255. package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
  256. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +1 -1
  257. package/build-types/custom-select-control-v2/stories/default.story.d.ts +6 -3
  258. package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +1 -1
  259. package/build-types/custom-select-control-v2/styles.d.ts +18 -26
  260. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  261. package/build-types/custom-select-control-v2/types.d.ts +12 -2
  262. package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
  263. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  264. package/build-types/date-time/index.d.ts +2 -1
  265. package/build-types/date-time/index.d.ts.map +1 -1
  266. package/build-types/date-time/stories/time-input.story.d.ts +12 -0
  267. package/build-types/date-time/stories/time-input.story.d.ts.map +1 -0
  268. package/build-types/date-time/time/index.d.ts +1 -1
  269. package/build-types/date-time/time/index.d.ts.map +1 -1
  270. package/build-types/date-time/time-input/index.d.ts +5 -0
  271. package/build-types/date-time/time-input/index.d.ts.map +1 -0
  272. package/build-types/date-time/time-input/test/index.d.ts +2 -0
  273. package/build-types/date-time/time-input/test/index.d.ts.map +1 -0
  274. package/build-types/date-time/types.d.ts +54 -0
  275. package/build-types/date-time/types.d.ts.map +1 -1
  276. package/build-types/date-time/utils.d.ts +40 -0
  277. package/build-types/date-time/utils.d.ts.map +1 -1
  278. package/build-types/disclosure/index.d.ts.map +1 -1
  279. package/build-types/divider/component.d.ts.map +1 -1
  280. package/build-types/divider/types.d.ts.map +1 -1
  281. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  282. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  283. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  284. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  285. package/build-types/font-size-picker/styles.d.ts +1 -1
  286. package/build-types/font-size-picker/utils.d.ts.map +1 -1
  287. package/build-types/form-token-field/token.d.ts.map +1 -1
  288. package/build-types/higher-order/with-spoken-messages/index.d.ts +1 -2
  289. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  290. package/build-types/menu-items-choice/types.d.ts +1 -1
  291. package/build-types/menu-items-choice/types.d.ts.map +1 -1
  292. package/build-types/navigator/navigator-back-button/component.d.ts +1 -1
  293. package/build-types/navigator/navigator-back-button/hook.d.ts +1 -1
  294. package/build-types/navigator/navigator-button/component.d.ts +1 -1
  295. package/build-types/navigator/navigator-button/hook.d.ts +1 -1
  296. package/build-types/navigator/navigator-to-parent-button/component.d.ts +1 -1
  297. package/build-types/popover/index.d.ts.map +1 -1
  298. package/build-types/popover/utils.d.ts.map +1 -1
  299. package/build-types/private-apis.d.ts.map +1 -1
  300. package/build-types/progress-bar/styles.d.ts.map +1 -1
  301. package/build-types/radio-group/context.d.ts.map +1 -1
  302. package/build-types/radio-group/index.d.ts.map +1 -1
  303. package/build-types/radio-group/radio.d.ts.map +1 -1
  304. package/build-types/range-control/index.d.ts.map +1 -1
  305. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  306. package/build-types/resizable-box/resize-tooltip/utils.d.ts +2 -2
  307. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  308. package/build-types/select-control/index.d.ts.map +1 -1
  309. package/build-types/select-control/styles/select-control-styles.d.ts +5 -0
  310. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  311. package/build-types/tab-panel/index.d.ts.map +1 -1
  312. package/build-types/tabs/index.d.ts.map +1 -1
  313. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  314. package/build-types/tabs/styles.d.ts.map +1 -1
  315. package/build-types/tabs/tablist.d.ts.map +1 -1
  316. package/build-types/tabs/types.d.ts.map +1 -1
  317. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  318. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  319. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  320. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  321. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  322. package/build-types/toolbar/toolbar/types.d.ts +6 -0
  323. package/build-types/toolbar/toolbar/types.d.ts.map +1 -1
  324. package/build-types/toolbar/toolbar-button/index.d.ts +3 -96
  325. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  326. package/build-types/toolbar/toolbar-button/types.d.ts +18 -0
  327. package/build-types/toolbar/toolbar-button/types.d.ts.map +1 -1
  328. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  329. package/build-types/toolbar/toolbar-item/index.d.ts +1 -3
  330. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  331. package/build-types/tooltip/index.d.ts.map +1 -1
  332. package/build-types/tooltip/types.d.ts +4 -0
  333. package/build-types/tooltip/types.d.ts.map +1 -1
  334. package/build-types/unit-control/index.d.ts.map +1 -1
  335. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  336. package/build-types/utils/hooks/use-update-effect.d.ts +1 -1
  337. package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
  338. package/package.json +19 -19
  339. package/src/animation/index.tsx +0 -1
  340. package/src/autocomplete/autocompleter-ui.tsx +1 -0
  341. package/src/autocomplete/index.tsx +0 -1
  342. package/src/base-control/index.tsx +16 -6
  343. package/src/base-control/stories/index.story.tsx +0 -1
  344. package/src/border-box-control/border-box-control-visualizer/component.tsx +0 -5
  345. package/src/button/README.md +13 -0
  346. package/src/button/index.tsx +6 -4
  347. package/src/button/stories/e2e/index.story.tsx +2 -1
  348. package/src/button/test/index.tsx +17 -2
  349. package/src/button/types.ts +27 -10
  350. package/src/combobox-control/index.tsx +2 -0
  351. package/src/composite/current/index.ts +0 -2
  352. package/src/custom-select-control/test/index.js +42 -6
  353. package/src/custom-select-control-v2/custom-select.tsx +57 -22
  354. package/src/custom-select-control-v2/default-component/index.tsx +0 -1
  355. package/src/custom-select-control-v2/item.tsx +5 -1
  356. package/src/custom-select-control-v2/legacy-component/index.tsx +28 -7
  357. package/src/custom-select-control-v2/legacy-component/test/index.tsx +44 -8
  358. package/src/custom-select-control-v2/styles.ts +153 -83
  359. package/src/custom-select-control-v2/test/index.tsx +35 -5
  360. package/src/custom-select-control-v2/types.ts +18 -6
  361. package/src/date-time/README.md +8 -0
  362. package/src/date-time/date-time/index.tsx +2 -1
  363. package/src/date-time/index.ts +2 -1
  364. package/src/date-time/stories/time-input.story.tsx +36 -0
  365. package/src/date-time/time/index.tsx +77 -194
  366. package/src/date-time/time/test/index.tsx +61 -0
  367. package/src/date-time/time-input/index.tsx +196 -0
  368. package/src/date-time/time-input/test/index.tsx +171 -0
  369. package/src/date-time/types.ts +63 -0
  370. package/src/date-time/utils.ts +69 -0
  371. package/src/dimension-control/test/__snapshots__/index.test.js.snap +116 -96
  372. package/src/disclosure/index.tsx +0 -1
  373. package/src/divider/component.tsx +0 -1
  374. package/src/divider/types.ts +0 -1
  375. package/src/dropdown-menu/index.tsx +1 -0
  376. package/src/dropdown-menu-v2/index.tsx +0 -1
  377. package/src/dropdown-menu-v2/styles.ts +0 -1
  378. package/src/dropdown-menu-v2/types.ts +0 -1
  379. package/src/font-size-picker/font-size-picker-select.tsx +1 -1
  380. package/src/font-size-picker/index.tsx +1 -1
  381. package/src/font-size-picker/test/index.tsx +6 -6
  382. package/src/font-size-picker/utils.ts +0 -5
  383. package/src/form-token-field/token.tsx +2 -0
  384. package/src/higher-order/navigate-regions/style.scss +25 -13
  385. package/src/higher-order/with-spoken-messages/index.tsx +1 -2
  386. package/src/menu-items-choice/types.ts +2 -1
  387. package/src/palette-edit/test/index.tsx +1 -0
  388. package/src/popover/index.tsx +0 -2
  389. package/src/popover/utils.ts +0 -1
  390. package/src/private-apis.ts +2 -5
  391. package/src/progress-bar/styles.ts +18 -9
  392. package/src/radio-group/context.tsx +0 -1
  393. package/src/radio-group/index.tsx +0 -1
  394. package/src/radio-group/radio.tsx +0 -1
  395. package/src/range-control/index.tsx +2 -0
  396. package/src/range-control/styles/range-control-styles.ts +6 -2
  397. package/src/resizable-box/resize-tooltip/utils.ts +1 -1
  398. package/src/select-control/index.tsx +3 -4
  399. package/src/select-control/styles/select-control-styles.ts +17 -6
  400. package/src/tab-panel/index.tsx +0 -1
  401. package/src/tabs/index.tsx +0 -1
  402. package/src/tabs/stories/index.story.tsx +25 -18
  403. package/src/tabs/styles.ts +18 -14
  404. package/src/tabs/tablist.tsx +187 -43
  405. package/src/tabs/types.ts +0 -1
  406. package/src/theme/stories/index.story.tsx +2 -0
  407. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +0 -1
  408. package/src/toggle-group-control/toggle-group-control/component.tsx +0 -2
  409. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +0 -2
  410. package/src/toolbar/toolbar/README.md +9 -0
  411. package/src/toolbar/toolbar/style.scss +7 -0
  412. package/src/toolbar/toolbar/toolbar-container.tsx +0 -1
  413. package/src/toolbar/toolbar/types.ts +6 -0
  414. package/src/toolbar/toolbar-button/index.tsx +30 -17
  415. package/src/toolbar/toolbar-button/types.ts +19 -0
  416. package/src/toolbar/toolbar-context/index.ts +0 -1
  417. package/src/toolbar/toolbar-item/index.tsx +1 -1
  418. package/src/tooltip/index.tsx +3 -2
  419. package/src/tooltip/test/index.tsx +18 -0
  420. package/src/tooltip/types.ts +4 -0
  421. package/src/unit-control/index.tsx +3 -2
  422. package/src/unit-control/styles/unit-control-styles.ts +10 -4
  423. package/src/utils/hooks/use-update-effect.js +8 -1
  424. package/tsconfig.tsbuildinfo +1 -1
@@ -204,14 +204,14 @@ describe.each( [
204
204
  await press.Enter();
205
205
  expect(
206
206
  screen.getByRole( 'listbox', {
207
- name: 'label!',
207
+ name: legacyProps.label,
208
208
  } )
209
209
  ).toBeVisible();
210
210
 
211
211
  await press.Escape();
212
212
  expect(
213
213
  screen.queryByRole( 'listbox', {
214
- name: 'label!',
214
+ name: legacyProps.label,
215
215
  } )
216
216
  ).not.toBeInTheDocument();
217
217
 
@@ -453,9 +453,18 @@ describe.each( [
453
453
  );
454
454
  } );
455
455
 
456
+ it( 'Should label the component correctly even when the label is not visible', () => {
457
+ render( <Component { ...legacyProps } hideLabelFromVision /> );
458
+
459
+ expect(
460
+ screen.getByRole( 'combobox', {
461
+ name: legacyProps.label,
462
+ } )
463
+ ).toBeVisible();
464
+ } );
465
+
456
466
  describe( 'Keyboard behavior and accessibility', () => {
457
- // skip reason: legacy v2 doesn't currently implement this behavior
458
- it.skip( 'Captures the keypress event and does not let it propagate', async () => {
467
+ it( 'Captures the keypress event and does not let it propagate', async () => {
459
468
  const onKeyDown = jest.fn();
460
469
 
461
470
  render(
@@ -473,7 +482,7 @@ describe.each( [
473
482
  await click( currentSelectedItem );
474
483
 
475
484
  const customSelect = screen.getByRole( 'listbox', {
476
- name: 'label!',
485
+ name: legacyProps.label,
477
486
  } );
478
487
  expect( customSelect ).toHaveFocus();
479
488
  await press.Enter();
@@ -495,7 +504,7 @@ describe.each( [
495
504
  await press.Enter();
496
505
  expect(
497
506
  screen.getByRole( 'listbox', {
498
- name: 'label!',
507
+ name: legacyProps.label,
499
508
  } )
500
509
  ).toHaveFocus();
501
510
 
@@ -519,7 +528,7 @@ describe.each( [
519
528
  await press.Enter();
520
529
  expect(
521
530
  screen.getByRole( 'listbox', {
522
- name: 'label!',
531
+ name: legacyProps.label,
523
532
  } )
524
533
  ).toHaveFocus();
525
534
 
@@ -547,7 +556,7 @@ describe.each( [
547
556
 
548
557
  expect(
549
558
  screen.queryByRole( 'listbox', {
550
- name: 'label!',
559
+ name: legacyProps.label,
551
560
  hidden: true,
552
561
  } )
553
562
  ).not.toBeInTheDocument();
@@ -558,6 +567,33 @@ describe.each( [
558
567
  expect( currentSelectedItem ).toHaveTextContent( 'amber' );
559
568
  } );
560
569
 
570
+ it( 'Can change selection with a focused input and closed dropdown while pressing arrow keys', async () => {
571
+ render( <Component { ...legacyProps } /> );
572
+
573
+ const currentSelectedItem = screen.getByRole( 'combobox', {
574
+ expanded: false,
575
+ } );
576
+
577
+ await sleep();
578
+ await press.Tab();
579
+ expect( currentSelectedItem ).toHaveFocus();
580
+ expect( currentSelectedItem ).toHaveTextContent(
581
+ legacyProps.options[ 0 ].name
582
+ );
583
+
584
+ await press.ArrowDown();
585
+ await press.ArrowDown();
586
+ expect(
587
+ screen.queryByRole( 'listbox', {
588
+ name: legacyProps.label,
589
+ } )
590
+ ).not.toBeInTheDocument();
591
+
592
+ expect( currentSelectedItem ).toHaveTextContent(
593
+ legacyProps.options[ 2 ].name
594
+ );
595
+ } );
596
+
561
597
  it( 'Should have correct aria-selected value for selections', async () => {
562
598
  render( <Component { ...legacyProps } /> );
563
599
 
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- // eslint-disable-next-line no-restricted-imports
5
4
  import * as Ariakit from '@ariakit/react';
6
5
  import { css } from '@emotion/react';
7
6
  import styled from '@emotion/styled';
@@ -11,124 +10,195 @@ import styled from '@emotion/styled';
11
10
  import { COLORS, CONFIG } from '../utils';
12
11
  import { space } from '../utils/space';
13
12
  import { chevronIconSize } from '../select-control/styles/select-control-styles';
13
+ import { fontSizeStyles } from '../input-control/styles/input-control-styles';
14
14
  import type { CustomSelectButtonSize } from './types';
15
15
 
16
- const ITEM_PADDING = space( 2 );
17
-
18
- const truncateStyles = css`
19
- overflow: hidden;
20
- text-overflow: ellipsis;
21
- white-space: nowrap;
22
- `;
23
-
24
- export const WithHintWrapper = styled.div`
25
- display: flex;
26
- justify-content: space-between;
27
- flex: 1;
28
- `;
29
-
30
- export const SelectedExperimentalHintWrapper = styled.div`
31
- ${ truncateStyles }
32
- `;
33
-
34
- export const SelectedExperimentalHintItem = styled.span`
35
- color: ${ COLORS.theme.gray[ 600 ] };
36
- margin-inline-start: ${ space( 2 ) };
37
- `;
16
+ const INLINE_PADDING = {
17
+ compact: 8, // space(2)
18
+ small: 8, // space(2)
19
+ default: 16, // space(4)
20
+ };
21
+
22
+ const getSelectSize = (
23
+ size: NonNullable< CustomSelectButtonSize[ 'size' ] >,
24
+ heightProperty: 'minHeight' | 'height'
25
+ ) => {
26
+ const sizes = {
27
+ compact: {
28
+ [ heightProperty ]: 32,
29
+ paddingInlineStart: INLINE_PADDING.compact,
30
+ paddingInlineEnd: INLINE_PADDING.compact + chevronIconSize,
31
+ },
32
+ default: {
33
+ [ heightProperty ]: 40,
34
+ paddingInlineStart: INLINE_PADDING.default,
35
+ paddingInlineEnd: INLINE_PADDING.default + chevronIconSize,
36
+ },
37
+ small: {
38
+ [ heightProperty ]: 24,
39
+ paddingInlineStart: INLINE_PADDING.small,
40
+ paddingInlineEnd: INLINE_PADDING.small + chevronIconSize,
41
+ },
42
+ };
38
43
 
39
- export const ExperimentalHintItem = styled.span`
40
- color: ${ COLORS.theme.gray[ 600 ] };
41
- text-align: right;
42
- margin-inline-end: ${ space( 1 ) };
43
- `;
44
+ return sizes[ size ] || sizes.default;
45
+ };
46
+
47
+ const getSelectItemSize = (
48
+ size: NonNullable< CustomSelectButtonSize[ 'size' ] >
49
+ ) => {
50
+ // Used to visually align the checkmark with the chevron
51
+ const checkmarkCorrection = 6;
52
+ const sizes = {
53
+ compact: {
54
+ paddingInlineStart: INLINE_PADDING.compact,
55
+ paddingInlineEnd: INLINE_PADDING.compact - checkmarkCorrection,
56
+ },
57
+ default: {
58
+ paddingInlineStart: INLINE_PADDING.default,
59
+ paddingInlineEnd: INLINE_PADDING.default - checkmarkCorrection,
60
+ },
61
+ small: {
62
+ paddingInlineStart: INLINE_PADDING.small,
63
+ paddingInlineEnd: INLINE_PADDING.small - checkmarkCorrection,
64
+ },
65
+ };
44
66
 
45
- export const SelectLabel = styled( Ariakit.SelectLabel )`
46
- font-size: 11px;
47
- font-weight: 500;
48
- line-height: 1.4;
49
- text-transform: uppercase;
50
- margin-bottom: ${ space( 2 ) };
51
- `;
67
+ return sizes[ size ] || sizes.default;
68
+ };
52
69
 
53
70
  export const Select = styled( Ariakit.Select, {
54
71
  // Do not forward `hasCustomRenderProp` to the underlying Ariakit.Select component
55
72
  shouldForwardProp: ( prop ) => prop !== 'hasCustomRenderProp',
56
- } )( ( {
57
- size,
58
- hasCustomRenderProp,
59
- }: {
60
- size: NonNullable< CustomSelectButtonSize[ 'size' ] >;
61
- hasCustomRenderProp: boolean;
62
- } ) => {
63
- const heightProperty = hasCustomRenderProp ? 'minHeight' : 'height';
64
-
65
- const getSize = () => {
66
- const sizes = {
67
- compact: {
68
- [ heightProperty ]: 32,
69
- paddingInlineStart: 8,
70
- paddingInlineEnd: 8 + chevronIconSize,
71
- },
72
- default: {
73
- [ heightProperty ]: 40,
74
- paddingInlineStart: 16,
75
- paddingInlineEnd: 16 + chevronIconSize,
76
- },
77
- small: {
78
- [ heightProperty ]: 24,
79
- paddingInlineStart: 8,
80
- paddingInlineEnd: 8 + chevronIconSize,
81
- },
82
- };
83
-
84
- return sizes[ size ] || sizes.default;
85
- };
86
-
87
- return css`
73
+ } )(
74
+ ( {
75
+ size,
76
+ hasCustomRenderProp,
77
+ }: {
78
+ size: NonNullable< CustomSelectButtonSize[ 'size' ] >;
79
+ hasCustomRenderProp: boolean;
80
+ } ) => css`
88
81
  display: block;
89
82
  background-color: ${ COLORS.theme.background };
90
83
  border: none;
91
84
  color: ${ COLORS.theme.foreground };
92
85
  cursor: pointer;
93
86
  font-family: inherit;
94
- font-size: ${ CONFIG.fontSize };
95
- text-align: left;
87
+ text-align: start;
88
+ user-select: none;
96
89
  width: 100%;
97
90
 
98
91
  &[data-focus-visible] {
99
92
  outline: none; // handled by InputBase component
100
93
  }
101
94
 
102
- ${ getSize() }
95
+ ${ getSelectSize( size, hasCustomRenderProp ? 'minHeight' : 'height' ) }
103
96
  ${ ! hasCustomRenderProp && truncateStyles }
104
- `;
105
- } );
97
+ ${ fontSizeStyles( { inputSize: size } ) }
98
+ `
99
+ );
106
100
 
107
101
  export const SelectPopover = styled( Ariakit.SelectPopover )`
102
+ display: flex;
103
+ flex-direction: column;
104
+
105
+ background-color: ${ COLORS.theme.background };
108
106
  border-radius: 2px;
109
- background: ${ COLORS.theme.background };
110
107
  border: 1px solid ${ COLORS.theme.foreground };
111
108
 
109
+ /* z-index(".components-popover") */
110
+ z-index: 1000000;
111
+
112
+ max-height: min( var( --popover-available-height, 400px ), 400px );
113
+ overflow: auto;
114
+ overscroll-behavior: contain;
115
+
116
+ // The smallest size without overflowing the container.
117
+ min-width: min-content;
118
+
112
119
  &[data-focus-visible] {
113
120
  outline: none; // outline will be on the trigger, rather than the popover
114
121
  }
115
122
  `;
116
123
 
117
- export const SelectItem = styled( Ariakit.SelectItem )`
124
+ export const SelectItem = styled( Ariakit.SelectItem )(
125
+ ( {
126
+ size,
127
+ }: {
128
+ size: NonNullable< CustomSelectButtonSize[ 'size' ] >;
129
+ } ) => css`
130
+ cursor: default;
131
+ display: flex;
132
+ align-items: center;
133
+ justify-content: space-between;
134
+ font-size: ${ CONFIG.fontSize };
135
+ // TODO: reassess line-height for non-legacy v2
136
+ line-height: 28px;
137
+ padding-block: ${ space( 2 ) };
138
+ scroll-margin: ${ space( 1 ) };
139
+ user-select: none;
140
+
141
+ &[aria-disabled='true'] {
142
+ cursor: not-allowed;
143
+ }
144
+
145
+ &[data-active-item] {
146
+ background-color: ${ COLORS.theme.gray[ 300 ] };
147
+ }
148
+
149
+ ${ getSelectItemSize( size ) }
150
+ `
151
+ );
152
+
153
+ const truncateStyles = css`
154
+ overflow: hidden;
155
+ text-overflow: ellipsis;
156
+ white-space: nowrap;
157
+ `;
158
+
159
+ export const SelectedExperimentalHintWrapper = styled.div`
160
+ ${ truncateStyles }
161
+ `;
162
+
163
+ export const SelectedExperimentalHintItem = styled.span`
164
+ color: ${ COLORS.theme.gray[ 600 ] };
165
+ margin-inline-start: ${ space( 2 ) };
166
+ `;
167
+
168
+ export const WithHintItemWrapper = styled.div`
118
169
  display: flex;
119
- align-items: center;
120
170
  justify-content: space-between;
121
- padding: ${ ITEM_PADDING };
122
- font-size: ${ CONFIG.fontSize };
123
- line-height: 2.15rem; // TODO: Remove this in default but keep for back-compat in legacy
124
- &[data-active-item] {
125
- background-color: ${ COLORS.theme.gray[ 300 ] };
126
- }
171
+ align-items: center;
172
+ flex-wrap: wrap;
173
+ flex: 1;
174
+ column-gap: ${ space( 4 ) };
175
+ `;
176
+
177
+ export const WithHintItemHint = styled.span`
178
+ color: ${ COLORS.theme.gray[ 600 ] };
179
+ text-align: initial;
180
+ line-height: ${ CONFIG.fontLineHeightBase };
181
+ padding-inline-end: ${ space( 1 ) };
182
+ margin-block: ${ space( 1 ) };
127
183
  `;
128
184
 
129
185
  export const SelectedItemCheck = styled( Ariakit.SelectItemCheck )`
130
186
  display: flex;
131
187
  align-items: center;
132
- margin-inline-start: ${ ITEM_PADDING };
133
- font-size: 24px; // Size of checkmark icon
188
+ margin-inline-start: ${ space( 2 ) };
189
+
190
+ // Keep the checkmark vertically aligned at the top. Since the item text has a
191
+ // 28px line height and the checkmark is 24px tall, a (28-24)/2 = 2px margin
192
+ // is applied to keep the correct alignment between the text and the checkmark.
193
+ align-self: start;
194
+ margin-block-start: 2px;
195
+
196
+ // Since the checkmark's dimensions are applied with 'em' units, setting a
197
+ // font size of 0 allows the space reserved for the checkmark to collapse for
198
+ // items that are not selected or that don't have an associated item hint.
199
+ font-size: 0;
200
+ ${ WithHintItemWrapper } ~ &,
201
+ &:not(:empty) {
202
+ font-size: 24px; // Size of checkmark icon
203
+ }
134
204
  `;
@@ -105,14 +105,14 @@ describe.each( [
105
105
  await press.Enter();
106
106
  expect(
107
107
  screen.getByRole( 'listbox', {
108
- name: 'label!',
108
+ name: defaultProps.label,
109
109
  } )
110
110
  ).toBeVisible();
111
111
 
112
112
  await press.Escape();
113
113
  expect(
114
114
  screen.queryByRole( 'listbox', {
115
- name: 'label!',
115
+ name: defaultProps.label,
116
116
  } )
117
117
  ).not.toBeInTheDocument();
118
118
 
@@ -134,7 +134,7 @@ describe.each( [
134
134
  await press.Enter();
135
135
  expect(
136
136
  screen.getByRole( 'listbox', {
137
- name: 'label!',
137
+ name: defaultProps.label,
138
138
  } )
139
139
  ).toHaveFocus();
140
140
 
@@ -156,7 +156,7 @@ describe.each( [
156
156
  await press.Enter();
157
157
  expect(
158
158
  screen.getByRole( 'listbox', {
159
- name: 'label!',
159
+ name: defaultProps.label,
160
160
  } )
161
161
  ).toHaveFocus();
162
162
 
@@ -182,7 +182,7 @@ describe.each( [
182
182
 
183
183
  expect(
184
184
  screen.queryByRole( 'listbox', {
185
- name: 'label!',
185
+ name: defaultProps.label,
186
186
  hidden: true,
187
187
  } )
188
188
  ).not.toBeInTheDocument();
@@ -416,4 +416,34 @@ describe.each( [
416
416
  screen.getByRole( 'option', { name: 'july-9' } )
417
417
  ).toBeVisible();
418
418
  } );
419
+
420
+ it( 'Should open the select popover when focussing the trigger button and pressing arrow down', async () => {
421
+ render( <Component { ...defaultProps } /> );
422
+
423
+ const currentSelectedItem = screen.getByRole( 'combobox', {
424
+ expanded: false,
425
+ } );
426
+
427
+ await sleep();
428
+ await press.Tab();
429
+ expect( currentSelectedItem ).toHaveFocus();
430
+ expect( currentSelectedItem ).toHaveTextContent( items[ 0 ].value );
431
+
432
+ await press.ArrowDown();
433
+ expect(
434
+ screen.getByRole( 'listbox', {
435
+ name: defaultProps.label,
436
+ } )
437
+ ).toBeVisible();
438
+ } );
439
+
440
+ it( 'Should label the component correctly even when the label is not visible', () => {
441
+ render( <Component { ...defaultProps } hideLabelFromVision /> );
442
+
443
+ expect(
444
+ screen.getByRole( 'combobox', {
445
+ name: defaultProps.label,
446
+ } )
447
+ ).toBeVisible();
448
+ } );
419
449
  } );
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- // eslint-disable-next-line no-restricted-imports
5
4
  import type * as Ariakit from '@ariakit/react';
6
5
  import type { FocusEventHandler, MouseEventHandler } from 'react';
7
6
 
@@ -12,8 +11,6 @@ export type CustomSelectStore = {
12
11
  store: Ariakit.SelectStore;
13
12
  };
14
13
 
15
- export type CustomSelectContext = CustomSelectStore | undefined;
16
-
17
14
  type CustomSelectSize< Size = 'compact' | 'default' > = {
18
15
  /**
19
16
  * The size of the control.
@@ -27,6 +24,10 @@ export type CustomSelectButtonSize = CustomSelectSize<
27
24
  'compact' | 'default' | 'small'
28
25
  >;
29
26
 
27
+ export type CustomSelectContext =
28
+ | ( CustomSelectStore & CustomSelectButtonSize )
29
+ | undefined;
30
+
30
31
  export type CustomSelectButtonProps = {
31
32
  /**
32
33
  * An optional default value for the control when used in uncontrolled mode.
@@ -49,7 +50,20 @@ export type CustomSelectButtonProps = {
49
50
  value?: string | string[];
50
51
  };
51
52
 
53
+ // Props only exposed on the internal implementation
54
+ export type _CustomSelectInternalProps = {
55
+ /**
56
+ * True if the consumer is emulating the legacy component behavior and look
57
+ */
58
+ isLegacy?: boolean;
59
+ };
60
+
61
+ // Props that are exposed in exported components
52
62
  export type _CustomSelectProps = CustomSelectButtonProps & {
63
+ /**
64
+ * Additional className added to the root wrapper element.
65
+ */
66
+ className?: string;
53
67
  /**
54
68
  * The child elements. This should be composed of `CustomSelectItem` components.
55
69
  */
@@ -66,9 +80,7 @@ export type _CustomSelectProps = CustomSelectButtonProps & {
66
80
  label: string;
67
81
  };
68
82
 
69
- export type CustomSelectProps = _CustomSelectProps &
70
- CustomSelectButtonProps &
71
- CustomSelectSize;
83
+ export type CustomSelectProps = _CustomSelectProps & CustomSelectSize;
72
84
 
73
85
  /**
74
86
  * The legacy object structure for the options array.
@@ -56,6 +56,14 @@ Whether we use a 12-hour clock. With a 12-hour clock, an AM/PM widget is display
56
56
  - Required: No
57
57
  - Default: false
58
58
 
59
+ ### `dateOrder`: `'dmy' | 'mdy' | 'ymd'`
60
+
61
+ The order of day, month, and year. This prop overrides the time format determined by `is12Hour` prop.
62
+
63
+ - Type: `string`
64
+ - Required: No
65
+ - Default: `'dmy'`
66
+
59
67
  ### `isInvalidDate`: `( date: Date ) => boolean`
60
68
 
61
69
  A callback function which receives a Date object representing a day as an argument, and should return a Boolean to signify if the day is valid or not.
@@ -7,7 +7,6 @@ import type { ForwardedRef } from 'react';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import { forwardRef } from '@wordpress/element';
10
- import { __, _x } from '@wordpress/i18n';
11
10
 
12
11
  /**
13
12
  * Internal dependencies
@@ -25,6 +24,7 @@ function UnforwardedDateTimePicker(
25
24
  {
26
25
  currentDate,
27
26
  is12Hour,
27
+ dateOrder,
28
28
  isInvalidDate,
29
29
  onMonthPreviewed = noop,
30
30
  onChange,
@@ -40,6 +40,7 @@ function UnforwardedDateTimePicker(
40
40
  currentTime={ currentDate }
41
41
  onChange={ onChange }
42
42
  is12Hour={ is12Hour }
43
+ dateOrder={ dateOrder }
43
44
  />
44
45
  <DatePicker
45
46
  currentDate={ currentDate }
@@ -3,7 +3,8 @@
3
3
  */
4
4
  import { default as DatePicker } from './date';
5
5
  import { default as TimePicker } from './time';
6
+ import { default as TimeInput } from './time-input';
6
7
  import { default as DateTimePicker } from './date-time';
7
8
 
8
- export { DatePicker, TimePicker };
9
+ export { DatePicker, TimePicker, TimeInput };
9
10
  export default DateTimePicker;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { Meta, StoryFn } from '@storybook/react';
5
+ import { action } from '@storybook/addon-actions';
6
+
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+ import { TimeInput } from '../time-input';
11
+
12
+ const meta: Meta< typeof TimeInput > = {
13
+ title: 'Components/TimeInput',
14
+ component: TimeInput,
15
+ argTypes: {
16
+ onChange: { action: 'onChange', control: { type: null } },
17
+ },
18
+ tags: [ 'status-wip' ],
19
+ parameters: {
20
+ controls: { expanded: true },
21
+ docs: { canvas: { sourceState: 'shown' } },
22
+ },
23
+ args: {
24
+ onChange: action( 'onChange' ),
25
+ },
26
+ };
27
+ export default meta;
28
+
29
+ const Template: StoryFn< typeof TimeInput > = ( args ) => {
30
+ return <TimeInput { ...args } />;
31
+ };
32
+
33
+ export const Default: StoryFn< typeof TimeInput > = Template.bind( {} );
34
+ Default.args = {
35
+ label: 'Time',
36
+ };