@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
@@ -1 +1 @@
1
- {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_react2","_utils","_space","_selectControlStyles","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_EMOTION_STRINGIFIED_CSS_ERROR__","ITEM_PADDING","space","truncateStyles","process","env","NODE_ENV","name","styles","map","toString","WithHintWrapper","exports","_base","target","label","SelectedExperimentalHintWrapper","SelectedExperimentalHintItem","COLORS","theme","gray","ExperimentalHintItem","SelectLabel","Select","shouldForwardProp","prop","size","hasCustomRenderProp","heightProperty","getSize","sizes","compact","paddingInlineStart","paddingInlineEnd","chevronIconSize","small","css","background","foreground","CONFIG","fontSize","SelectPopover","SelectItem","SelectedItemCheck","SelectItemCheck"],"sources":["@wordpress/components/src/custom-select-control-v2/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\nimport { space } from '../utils/space';\nimport { chevronIconSize } from '../select-control/styles/select-control-styles';\nimport type { CustomSelectButtonSize } from './types';\n\nconst ITEM_PADDING = space( 2 );\n\nconst truncateStyles = css`\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n`;\n\nexport const WithHintWrapper = styled.div`\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex: 1;\n`;\n\nexport const SelectedExperimentalHintWrapper = styled.div`\n\t${ truncateStyles }\n`;\n\nexport const SelectedExperimentalHintItem = styled.span`\n\tcolor: ${ COLORS.theme.gray[ 600 ] };\n\tmargin-inline-start: ${ space( 2 ) };\n`;\n\nexport const ExperimentalHintItem = styled.span`\n\tcolor: ${ COLORS.theme.gray[ 600 ] };\n\ttext-align: right;\n\tmargin-inline-end: ${ space( 1 ) };\n`;\n\nexport const SelectLabel = styled( Ariakit.SelectLabel )`\n\tfont-size: 11px;\n\tfont-weight: 500;\n\tline-height: 1.4;\n\ttext-transform: uppercase;\n\tmargin-bottom: ${ space( 2 ) };\n`;\n\nexport const Select = styled( Ariakit.Select, {\n\t// Do not forward `hasCustomRenderProp` to the underlying Ariakit.Select component\n\tshouldForwardProp: ( prop ) => prop !== 'hasCustomRenderProp',\n} )( ( {\n\tsize,\n\thasCustomRenderProp,\n}: {\n\tsize: NonNullable< CustomSelectButtonSize[ 'size' ] >;\n\thasCustomRenderProp: boolean;\n} ) => {\n\tconst heightProperty = hasCustomRenderProp ? 'minHeight' : 'height';\n\n\tconst getSize = () => {\n\t\tconst sizes = {\n\t\t\tcompact: {\n\t\t\t\t[ heightProperty ]: 32,\n\t\t\t\tpaddingInlineStart: 8,\n\t\t\t\tpaddingInlineEnd: 8 + chevronIconSize,\n\t\t\t},\n\t\t\tdefault: {\n\t\t\t\t[ heightProperty ]: 40,\n\t\t\t\tpaddingInlineStart: 16,\n\t\t\t\tpaddingInlineEnd: 16 + chevronIconSize,\n\t\t\t},\n\t\t\tsmall: {\n\t\t\t\t[ heightProperty ]: 24,\n\t\t\t\tpaddingInlineStart: 8,\n\t\t\t\tpaddingInlineEnd: 8 + chevronIconSize,\n\t\t\t},\n\t\t};\n\n\t\treturn sizes[ size ] || sizes.default;\n\t};\n\n\treturn css`\n\t\tdisplay: block;\n\t\tbackground-color: ${ COLORS.theme.background };\n\t\tborder: none;\n\t\tcolor: ${ COLORS.theme.foreground };\n\t\tcursor: pointer;\n\t\tfont-family: inherit;\n\t\tfont-size: ${ CONFIG.fontSize };\n\t\ttext-align: left;\n\t\twidth: 100%;\n\n\t\t&[data-focus-visible] {\n\t\t\toutline: none; // handled by InputBase component\n\t\t}\n\n\t\t${ getSize() }\n\t\t${ ! hasCustomRenderProp && truncateStyles }\n\t`;\n} );\n\nexport const SelectPopover = styled( Ariakit.SelectPopover )`\n\tborder-radius: 2px;\n\tbackground: ${ COLORS.theme.background };\n\tborder: 1px solid ${ COLORS.theme.foreground };\n\n\t&[data-focus-visible] {\n\t\toutline: none; // outline will be on the trigger, rather than the popover\n\t}\n`;\n\nexport const SelectItem = styled( Ariakit.SelectItem )`\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tpadding: ${ ITEM_PADDING };\n\tfont-size: ${ CONFIG.fontSize };\n\tline-height: 2.15rem; // TODO: Remove this in default but keep for back-compat in legacy\n\t&[data-active-item] {\n\t\tbackground-color: ${ COLORS.theme.gray[ 300 ] };\n\t}\n`;\n\nexport const SelectedItemCheck = styled( Ariakit.SelectItemCheck )`\n\tdisplay: flex;\n\talign-items: center;\n\tmargin-inline-start: ${ ITEM_PADDING };\n\tfont-size: 24px; // Size of checkmark icon\n`;\n"],"mappings":";;;;;;;;AAIA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA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I,CAAE,GAAG,CAAE,UAAAhB,OAAA,CAAAC,GAAA,CAAAC,QAAA,olKAE9C;AAEM,MAAMqC,iBAAiB,GAAA/B,OAAA,CAAA+B,iBAAA,gBAAG,IAAA9B,KAAA,CAAA3B,OAAA,EAAQb,OAAO,CAACuE,eAAe,EAAAxC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAQ,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,yDAGzCd,YAAY,wBAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA,olKAEpC","ignoreList":[]}
1
+ {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_react2","_utils","_space","_selectControlStyles","_inputControlStyles","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_EMOTION_STRINGIFIED_CSS_ERROR__","INLINE_PADDING","compact","small","getSelectSize","size","heightProperty","sizes","paddingInlineStart","paddingInlineEnd","chevronIconSize","getSelectItemSize","checkmarkCorrection","Select","exports","_base","process","env","NODE_ENV","shouldForwardProp","prop","target","label","hasCustomRenderProp","css","COLORS","theme","background","foreground","truncateStyles","fontSizeStyles","inputSize","SelectPopover","SelectItem","CONFIG","fontSize","space","gray","name","styles","map","toString","SelectedExperimentalHintWrapper","SelectedExperimentalHintItem","WithHintItemWrapper","WithHintItemHint","fontLineHeightBase","SelectedItemCheck","SelectItemCheck"],"sources":["@wordpress/components/src/custom-select-control-v2/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\nimport { space } from '../utils/space';\nimport { chevronIconSize } from '../select-control/styles/select-control-styles';\nimport { fontSizeStyles } from '../input-control/styles/input-control-styles';\nimport type { CustomSelectButtonSize } from './types';\n\nconst INLINE_PADDING = {\n\tcompact: 8, // space(2)\n\tsmall: 8, // space(2)\n\tdefault: 16, // space(4)\n};\n\nconst getSelectSize = (\n\tsize: NonNullable< CustomSelectButtonSize[ 'size' ] >,\n\theightProperty: 'minHeight' | 'height'\n) => {\n\tconst sizes = {\n\t\tcompact: {\n\t\t\t[ heightProperty ]: 32,\n\t\t\tpaddingInlineStart: INLINE_PADDING.compact,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.compact + chevronIconSize,\n\t\t},\n\t\tdefault: {\n\t\t\t[ heightProperty ]: 40,\n\t\t\tpaddingInlineStart: INLINE_PADDING.default,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.default + chevronIconSize,\n\t\t},\n\t\tsmall: {\n\t\t\t[ heightProperty ]: 24,\n\t\t\tpaddingInlineStart: INLINE_PADDING.small,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.small + chevronIconSize,\n\t\t},\n\t};\n\n\treturn sizes[ size ] || sizes.default;\n};\n\nconst getSelectItemSize = (\n\tsize: NonNullable< CustomSelectButtonSize[ 'size' ] >\n) => {\n\t// Used to visually align the checkmark with the chevron\n\tconst checkmarkCorrection = 6;\n\tconst sizes = {\n\t\tcompact: {\n\t\t\tpaddingInlineStart: INLINE_PADDING.compact,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.compact - checkmarkCorrection,\n\t\t},\n\t\tdefault: {\n\t\t\tpaddingInlineStart: INLINE_PADDING.default,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.default - checkmarkCorrection,\n\t\t},\n\t\tsmall: {\n\t\t\tpaddingInlineStart: INLINE_PADDING.small,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.small - checkmarkCorrection,\n\t\t},\n\t};\n\n\treturn sizes[ size ] || sizes.default;\n};\n\nexport const Select = styled( Ariakit.Select, {\n\t// Do not forward `hasCustomRenderProp` to the underlying Ariakit.Select component\n\tshouldForwardProp: ( prop ) => prop !== 'hasCustomRenderProp',\n} )(\n\t( {\n\t\tsize,\n\t\thasCustomRenderProp,\n\t}: {\n\t\tsize: NonNullable< CustomSelectButtonSize[ 'size' ] >;\n\t\thasCustomRenderProp: boolean;\n\t} ) => css`\n\t\tdisplay: block;\n\t\tbackground-color: ${ COLORS.theme.background };\n\t\tborder: none;\n\t\tcolor: ${ COLORS.theme.foreground };\n\t\tcursor: pointer;\n\t\tfont-family: inherit;\n\t\ttext-align: start;\n\t\tuser-select: none;\n\t\twidth: 100%;\n\n\t\t&[data-focus-visible] {\n\t\t\toutline: none; // handled by InputBase component\n\t\t}\n\n\t\t${ getSelectSize( size, hasCustomRenderProp ? 'minHeight' : 'height' ) }\n\t\t${ ! hasCustomRenderProp && truncateStyles }\n\t\t${ fontSizeStyles( { inputSize: size } ) }\n\t`\n);\n\nexport const SelectPopover = styled( Ariakit.SelectPopover )`\n\tdisplay: flex;\n\tflex-direction: column;\n\n\tbackground-color: ${ COLORS.theme.background };\n\tborder-radius: 2px;\n\tborder: 1px solid ${ COLORS.theme.foreground };\n\n\t/* z-index(\".components-popover\") */\n\tz-index: 1000000;\n\n\tmax-height: min( var( --popover-available-height, 400px ), 400px );\n\toverflow: auto;\n\toverscroll-behavior: contain;\n\n\t// The smallest size without overflowing the container.\n\tmin-width: min-content;\n\n\t&[data-focus-visible] {\n\t\toutline: none; // outline will be on the trigger, rather than the popover\n\t}\n`;\n\nexport const SelectItem = styled( Ariakit.SelectItem )(\n\t( {\n\t\tsize,\n\t}: {\n\t\tsize: NonNullable< CustomSelectButtonSize[ 'size' ] >;\n\t} ) => css`\n\t\tcursor: default;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tfont-size: ${ CONFIG.fontSize };\n\t\t// TODO: reassess line-height for non-legacy v2\n\t\tline-height: 28px;\n\t\tpadding-block: ${ space( 2 ) };\n\t\tscroll-margin: ${ space( 1 ) };\n\t\tuser-select: none;\n\n\t\t&[aria-disabled='true'] {\n\t\t\tcursor: not-allowed;\n\t\t}\n\n\t\t&[data-active-item] {\n\t\t\tbackground-color: ${ COLORS.theme.gray[ 300 ] };\n\t\t}\n\n\t\t${ getSelectItemSize( size ) }\n\t`\n);\n\nconst truncateStyles = css`\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n`;\n\nexport const SelectedExperimentalHintWrapper = styled.div`\n\t${ truncateStyles }\n`;\n\nexport const SelectedExperimentalHintItem = styled.span`\n\tcolor: ${ COLORS.theme.gray[ 600 ] };\n\tmargin-inline-start: ${ space( 2 ) };\n`;\n\nexport const WithHintItemWrapper = styled.div`\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tflex-wrap: wrap;\n\tflex: 1;\n\tcolumn-gap: ${ space( 4 ) };\n`;\n\nexport const WithHintItemHint = styled.span`\n\tcolor: ${ COLORS.theme.gray[ 600 ] };\n\ttext-align: initial;\n\tline-height: ${ CONFIG.fontLineHeightBase };\n\tpadding-inline-end: ${ space( 1 ) };\n\tmargin-block: ${ space( 1 ) };\n`;\n\nexport const SelectedItemCheck = styled( Ariakit.SelectItemCheck )`\n\tdisplay: flex;\n\talign-items: center;\n\tmargin-inline-start: ${ space( 2 ) };\n\n\t// Keep the checkmark vertically aligned at the top. Since the item text has a\n\t// 28px line height and the checkmark is 24px tall, a (28-24)/2 = 2px margin\n\t// is applied to keep the correct alignment between the text and the checkmark.\n\talign-self: start;\n\tmargin-block-start: 2px;\n\n\t// Since the checkmark's dimensions are applied with 'em' units, setting a\n\t// font size of 0 allows the space reserved for the checkmark to collapse for\n\t// items that are not selected or that don't have an associated item hint.\n\tfont-size: 0;\n\t${ WithHintItemWrapper } ~ &,\n\t&:not(:empty) {\n\t\tfont-size: 24px; // Size of checkmark icon\n\t}\n`;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,oBAA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AAAC,QAAA,o+PAClC;AAEM,MAAM0B,mBAAmB,GAAA9B,OAAA,CAAA8B,mBAAA,oBAAA7B,KAAA,CAAA7B,OAAA,SAAA8B,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,sGAMhB,IAAAc,YAAK,EAAE,CAAE,CAAC,SAAApB,OAAA,CAAAC,GAAA,CAAAC,QAAA,o+PACzB;AAEM,MAAM2B,gBAAgB,GAAA/B,OAAA,CAAA+B,gBAAA,oBAAA9B,KAAA,CAAA7B,OAAA,UAAA8B,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,aAClBG,aAAM,CAACC,KAAK,CAACW,IAAI,CAAE,GAAG,CAAE,sCAElBH,aAAM,CAACY,kBAAkB,0BAClB,IAAAV,YAAK,EAAE,CAAE,CAAC,oBAChB,IAAAA,YAAK,EAAE,CAAE,CAAC,SAAApB,OAAA,CAAAC,GAAA,CAAAC,QAAA,o+PAC3B;AAEM,MAAM6B,iBAAiB,GAAAjC,OAAA,CAAAiC,iBAAA,gBAAG,IAAAhC,KAAA,CAAA7B,OAAA,EAAQd,OAAO,CAAC4E,eAAe,EAAAhC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,yDAGzC,IAAAc,YAAK,EAAE,CAAE,CAAC,2DAY/BQ,mBAAmB,yCAAA5B,OAAA,CAAAC,GAAA,CAAAC,QAAA,o+PAItB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/custom-select-control-v2/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type * as Ariakit from '@ariakit/react';\nimport type { FocusEventHandler, MouseEventHandler } from 'react';\n\nexport type CustomSelectStore = {\n\t/**\n\t * The store object returned by Ariakit's `useSelectStore` hook.\n\t */\n\tstore: Ariakit.SelectStore;\n};\n\nexport type CustomSelectContext = CustomSelectStore | undefined;\n\ntype CustomSelectSize< Size = 'compact' | 'default' > = {\n\t/**\n\t * The size of the control.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: Size;\n};\n\nexport type CustomSelectButtonSize = CustomSelectSize<\n\t'compact' | 'default' | 'small'\n>;\n\nexport type CustomSelectButtonProps = {\n\t/**\n\t * An optional default value for the control when used in uncontrolled mode.\n\t * If left `undefined`, the first non-disabled item will be used.\n\t */\n\tdefaultValue?: string | string[];\n\t/**\n\t * A function that receives the new value of the input.\n\t */\n\tonChange?: ( newValue: string | string[] ) => void;\n\t/**\n\t * Can be used to render select UI with custom styled values.\n\t */\n\trenderSelectedValue?: (\n\t\tselectedValue: string | string[]\n\t) => React.ReactNode;\n\t/**\n\t * The value of the control when used in uncontrolled mode.\n\t */\n\tvalue?: string | string[];\n};\n\nexport type _CustomSelectProps = CustomSelectButtonProps & {\n\t/**\n\t * The child elements. This should be composed of `CustomSelectItem` components.\n\t */\n\tchildren: React.ReactNode;\n\t/**\n\t * Used to visually hide the label. It will always be visible to screen readers.\n\t *\n\t * @default false\n\t */\n\thideLabelFromVision?: boolean;\n\t/**\n\t * Accessible label for the control.\n\t */\n\tlabel: string;\n};\n\nexport type CustomSelectProps = _CustomSelectProps &\n\tCustomSelectButtonProps &\n\tCustomSelectSize;\n\n/**\n * The legacy object structure for the options array.\n */\ntype LegacyOption = {\n\tkey: string;\n\tname: string;\n\tstyle?: React.CSSProperties;\n\tclassName?: string;\n\t__experimentalHint?: string;\n\t[ key: string ]: any;\n};\n\n/**\n * The legacy object returned from the onChange event.\n */\ntype LegacyOnChangeObject = {\n\thighlightedIndex?: number;\n\tinputValue?: string;\n\tisOpen?: boolean;\n\ttype?: string;\n\tselectedItem: LegacyOption;\n};\n\nexport type LegacyCustomSelectProps = {\n\t/**\n\t * Optional classname for the component.\n\t */\n\tclassName?: string;\n\t/**\n\t * Used to visually hide the label. It will always be visible to screen readers.\n\t *\n\t */\n\thideLabelFromVision?: boolean;\n\t/**\n\t * Pass in a description that will be shown to screen readers associated with the\n\t * select trigger button. If no value is passed, the text \"Currently selected:\n\t * selectedItem.name\" will be used fully translated.\n\t */\n\tdescribedBy?: string;\n\t/**\n\t * Label for the control.\n\t */\n\tlabel: string;\n\t/**\n\t * Function called with the control's internal state changes. The `selectedItem`\n\t * property contains the next selected item.\n\t */\n\tonChange?: ( newValue: LegacyOnChangeObject ) => void;\n\t/**\n\t * A handler for `onBlur` events.\n\t *\n\t * @ignore\n\t */\n\tonBlur?: FocusEventHandler< HTMLButtonElement >;\n\t/**\n\t * A handler for `onFocus` events.\n\t *\n\t * @ignore\n\t */\n\tonFocus?: FocusEventHandler< HTMLButtonElement >;\n\t/**\n\t * A handler for `onMouseOver` events.\n\t *\n\t * @ignore\n\t */\n\tonMouseOut?: MouseEventHandler< HTMLButtonElement >;\n\t/**\n\t * A handler for `onMouseOut` events.\n\t *\n\t * @ignore\n\t */\n\tonMouseOver?: MouseEventHandler< HTMLButtonElement >;\n\t/**\n\t * The options that can be chosen from.\n\t */\n\toptions: Array< LegacyOption >;\n\t/**\n\t * The size of the control.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'small' | '__unstable-large';\n\t/**\n\t * Can be used to externally control the value of the control.\n\t */\n\tvalue?: LegacyOption;\n\t/**\n\t * Legacy way to add additional text to the right of each option.\n\t *\n\t * @default false\n\t */\n\t__experimentalShowSelectedHint?: boolean;\n\t/**\n\t * Opt-in prop for an unconstrained width style which became the default in\n\t * WordPress 6.5. The prop is no longer needed and can be safely removed.\n\t *\n\t * @deprecated\n\t * @ignore\n\t */\n\t__nextUnconstrainedWidth?: boolean;\n\t/**\n\t * Start opting into the larger default height that will become the default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n};\n\nexport type CustomSelectItemProps = {\n\t/**\n\t * The value of the select item. This will be used as the children if\n\t * children are left `undefined`.\n\t */\n\tvalue: string;\n\t/**\n\t * The children to display for each select item. The `value` will be\n\t * used if left `undefined`.\n\t */\n\tchildren?: React.ReactNode;\n\t/**\n\t * If true, the item will be disabled.\n\t *\n\t * You will need to add your own styles (e.g. reduced opacity) to visually show that they are disabled.\n\t * @default false\n\t */\n\tdisabled?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/custom-select-control-v2/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type * as Ariakit from '@ariakit/react';\nimport type { FocusEventHandler, MouseEventHandler } from 'react';\n\nexport type CustomSelectStore = {\n\t/**\n\t * The store object returned by Ariakit's `useSelectStore` hook.\n\t */\n\tstore: Ariakit.SelectStore;\n};\n\ntype CustomSelectSize< Size = 'compact' | 'default' > = {\n\t/**\n\t * The size of the control.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: Size;\n};\n\nexport type CustomSelectButtonSize = CustomSelectSize<\n\t'compact' | 'default' | 'small'\n>;\n\nexport type CustomSelectContext =\n\t| ( CustomSelectStore & CustomSelectButtonSize )\n\t| undefined;\n\nexport type CustomSelectButtonProps = {\n\t/**\n\t * An optional default value for the control when used in uncontrolled mode.\n\t * If left `undefined`, the first non-disabled item will be used.\n\t */\n\tdefaultValue?: string | string[];\n\t/**\n\t * A function that receives the new value of the input.\n\t */\n\tonChange?: ( newValue: string | string[] ) => void;\n\t/**\n\t * Can be used to render select UI with custom styled values.\n\t */\n\trenderSelectedValue?: (\n\t\tselectedValue: string | string[]\n\t) => React.ReactNode;\n\t/**\n\t * The value of the control when used in uncontrolled mode.\n\t */\n\tvalue?: string | string[];\n};\n\n// Props only exposed on the internal implementation\nexport type _CustomSelectInternalProps = {\n\t/**\n\t * True if the consumer is emulating the legacy component behavior and look\n\t */\n\tisLegacy?: boolean;\n};\n\n// Props that are exposed in exported components\nexport type _CustomSelectProps = CustomSelectButtonProps & {\n\t/**\n\t * Additional className added to the root wrapper element.\n\t */\n\tclassName?: string;\n\t/**\n\t * The child elements. This should be composed of `CustomSelectItem` components.\n\t */\n\tchildren: React.ReactNode;\n\t/**\n\t * Used to visually hide the label. It will always be visible to screen readers.\n\t *\n\t * @default false\n\t */\n\thideLabelFromVision?: boolean;\n\t/**\n\t * Accessible label for the control.\n\t */\n\tlabel: string;\n};\n\nexport type CustomSelectProps = _CustomSelectProps & CustomSelectSize;\n\n/**\n * The legacy object structure for the options array.\n */\ntype LegacyOption = {\n\tkey: string;\n\tname: string;\n\tstyle?: React.CSSProperties;\n\tclassName?: string;\n\t__experimentalHint?: string;\n\t[ key: string ]: any;\n};\n\n/**\n * The legacy object returned from the onChange event.\n */\ntype LegacyOnChangeObject = {\n\thighlightedIndex?: number;\n\tinputValue?: string;\n\tisOpen?: boolean;\n\ttype?: string;\n\tselectedItem: LegacyOption;\n};\n\nexport type LegacyCustomSelectProps = {\n\t/**\n\t * Optional classname for the component.\n\t */\n\tclassName?: string;\n\t/**\n\t * Used to visually hide the label. It will always be visible to screen readers.\n\t *\n\t */\n\thideLabelFromVision?: boolean;\n\t/**\n\t * Pass in a description that will be shown to screen readers associated with the\n\t * select trigger button. If no value is passed, the text \"Currently selected:\n\t * selectedItem.name\" will be used fully translated.\n\t */\n\tdescribedBy?: string;\n\t/**\n\t * Label for the control.\n\t */\n\tlabel: string;\n\t/**\n\t * Function called with the control's internal state changes. The `selectedItem`\n\t * property contains the next selected item.\n\t */\n\tonChange?: ( newValue: LegacyOnChangeObject ) => void;\n\t/**\n\t * A handler for `onBlur` events.\n\t *\n\t * @ignore\n\t */\n\tonBlur?: FocusEventHandler< HTMLButtonElement >;\n\t/**\n\t * A handler for `onFocus` events.\n\t *\n\t * @ignore\n\t */\n\tonFocus?: FocusEventHandler< HTMLButtonElement >;\n\t/**\n\t * A handler for `onMouseOver` events.\n\t *\n\t * @ignore\n\t */\n\tonMouseOut?: MouseEventHandler< HTMLButtonElement >;\n\t/**\n\t * A handler for `onMouseOut` events.\n\t *\n\t * @ignore\n\t */\n\tonMouseOver?: MouseEventHandler< HTMLButtonElement >;\n\t/**\n\t * The options that can be chosen from.\n\t */\n\toptions: Array< LegacyOption >;\n\t/**\n\t * The size of the control.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'small' | '__unstable-large';\n\t/**\n\t * Can be used to externally control the value of the control.\n\t */\n\tvalue?: LegacyOption;\n\t/**\n\t * Legacy way to add additional text to the right of each option.\n\t *\n\t * @default false\n\t */\n\t__experimentalShowSelectedHint?: boolean;\n\t/**\n\t * Opt-in prop for an unconstrained width style which became the default in\n\t * WordPress 6.5. The prop is no longer needed and can be safely removed.\n\t *\n\t * @deprecated\n\t * @ignore\n\t */\n\t__nextUnconstrainedWidth?: boolean;\n\t/**\n\t * Start opting into the larger default height that will become the default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n};\n\nexport type CustomSelectItemProps = {\n\t/**\n\t * The value of the select item. This will be used as the children if\n\t * children are left `undefined`.\n\t */\n\tvalue: string;\n\t/**\n\t * The children to display for each select item. The `value` will be\n\t * used if left `undefined`.\n\t */\n\tchildren?: React.ReactNode;\n\t/**\n\t * If true, the item will be disabled.\n\t *\n\t * You will need to add your own styles (e.g. reduced opacity) to visually show that they are disabled.\n\t * @default false\n\t */\n\tdisabled?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
@@ -39,6 +39,7 @@ const noop = () => {};
39
39
  function UnforwardedDateTimePicker({
40
40
  currentDate,
41
41
  is12Hour,
42
+ dateOrder,
42
43
  isInvalidDate,
43
44
  onMonthPreviewed = noop,
44
45
  onChange,
@@ -53,7 +54,8 @@ function UnforwardedDateTimePicker({
53
54
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_time.default, {
54
55
  currentTime: currentDate,
55
56
  onChange: onChange,
56
- is12Hour: is12Hour
57
+ is12Hour: is12Hour,
58
+ dateOrder: dateOrder
57
59
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_date.default, {
58
60
  currentDate: currentDate,
59
61
  onChange: onChange,
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_date","_interopRequireDefault","_time","_styles","_jsxRuntime","noop","UnforwardedDateTimePicker","currentDate","is12Hour","isInvalidDate","onMonthPreviewed","onChange","events","startOfWeek","ref","jsx","Wrapper","className","spacing","children","jsxs","Fragment","default","currentTime","DateTimePicker","exports","forwardRef","_default"],"sources":["@wordpress/components/src/date-time/date-time/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport type { DateTimePickerProps } from '../types';\nimport { Wrapper } from './styles';\n\nexport { DatePicker, TimePicker };\n\nconst noop = () => {};\n\nfunction UnforwardedDateTimePicker(\n\t{\n\t\tcurrentDate,\n\t\tis12Hour,\n\t\tisInvalidDate,\n\t\tonMonthPreviewed = noop,\n\t\tonChange,\n\t\tevents,\n\t\tstartOfWeek,\n\t}: DateTimePickerProps,\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Wrapper ref={ ref } className=\"components-datetime\" spacing={ 4 }>\n\t\t\t<>\n\t\t\t\t<TimePicker\n\t\t\t\t\tcurrentTime={ currentDate }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tis12Hour={ is12Hour }\n\t\t\t\t/>\n\t\t\t\t<DatePicker\n\t\t\t\t\tcurrentDate={ currentDate }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tisInvalidDate={ isInvalidDate }\n\t\t\t\t\tevents={ events }\n\t\t\t\t\tonMonthPreviewed={ onMonthPreviewed }\n\t\t\t\t\tstartOfWeek={ startOfWeek }\n\t\t\t\t/>\n\t\t\t</>\n\t\t</Wrapper>\n\t);\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 );\n\nexport default DateTimePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAAmC,IAAAK,WAAA,GAAAL,OAAA;AAjBnC;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAQA,MAAMM,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,SAASC,yBAAyBA,CACjC;EACCC,WAAW;EACXC,QAAQ;EACRC,aAAa;EACbC,gBAAgB,GAAGL,IAAI;EACvBM,QAAQ;EACRC,MAAM;EACNC;AACoB,CAAC,EACtBC,GAAwB,EACvB;EACD,oBACC,IAAAV,WAAA,CAAAW,GAAA,EAACZ,OAAA,CAAAa,OAAO;IAACF,GAAG,EAAGA,GAAK;IAACG,SAAS,EAAC,qBAAqB;IAACC,OAAO,EAAG,CAAG;IAAAC,QAAA,eACjE,IAAAf,WAAA,CAAAgB,IAAA,EAAAhB,WAAA,CAAAiB,QAAA;MAAAF,QAAA,gBACC,IAAAf,WAAA,CAAAW,GAAA,EAACb,KAAA,CAAAoB,OAAU;QACVC,WAAW,EAAGhB,WAAa;QAC3BI,QAAQ,EAAGA,QAAU;QACrBH,QAAQ,EAAGA;MAAU,CACrB,CAAC,eACF,IAAAJ,WAAA,CAAAW,GAAA,EAACf,KAAA,CAAAsB,OAAU;QACVf,WAAW,EAAGA,WAAa;QAC3BI,QAAQ,EAAGA,QAAU;QACrBF,aAAa,EAAGA,aAAe;QAC/BG,MAAM,EAAGA,MAAQ;QACjBF,gBAAgB,EAAGA,gBAAkB;QACrCG,WAAW,EAAGA;MAAa,CAC3B,CAAC;IAAA,CACD;EAAC,CACK,CAAC;AAEZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMW,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,mBAAU,EAAEpB,yBAA0B,CAAC;AAAC,IAAAqB,QAAA,GAAAF,OAAA,CAAAH,OAAA,GAEvDE,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_date","_interopRequireDefault","_time","_styles","_jsxRuntime","noop","UnforwardedDateTimePicker","currentDate","is12Hour","dateOrder","isInvalidDate","onMonthPreviewed","onChange","events","startOfWeek","ref","jsx","Wrapper","className","spacing","children","jsxs","Fragment","default","currentTime","DateTimePicker","exports","forwardRef","_default"],"sources":["@wordpress/components/src/date-time/date-time/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\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 type { DateTimePickerProps } from '../types';\nimport { Wrapper } from './styles';\n\nexport { DatePicker, TimePicker };\n\nconst noop = () => {};\n\nfunction UnforwardedDateTimePicker(\n\t{\n\t\tcurrentDate,\n\t\tis12Hour,\n\t\tdateOrder,\n\t\tisInvalidDate,\n\t\tonMonthPreviewed = noop,\n\t\tonChange,\n\t\tevents,\n\t\tstartOfWeek,\n\t}: DateTimePickerProps,\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Wrapper ref={ ref } className=\"components-datetime\" spacing={ 4 }>\n\t\t\t<>\n\t\t\t\t<TimePicker\n\t\t\t\t\tcurrentTime={ currentDate }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tis12Hour={ is12Hour }\n\t\t\t\t\tdateOrder={ dateOrder }\n\t\t\t\t/>\n\t\t\t\t<DatePicker\n\t\t\t\t\tcurrentDate={ currentDate }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tisInvalidDate={ isInvalidDate }\n\t\t\t\t\tevents={ events }\n\t\t\t\t\tonMonthPreviewed={ onMonthPreviewed }\n\t\t\t\t\tstartOfWeek={ startOfWeek }\n\t\t\t\t/>\n\t\t\t</>\n\t\t</Wrapper>\n\t);\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 );\n\nexport default DateTimePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAAmC,IAAAK,WAAA,GAAAL,OAAA;AAhBnC;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAQA,MAAMM,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,SAASC,yBAAyBA,CACjC;EACCC,WAAW;EACXC,QAAQ;EACRC,SAAS;EACTC,aAAa;EACbC,gBAAgB,GAAGN,IAAI;EACvBO,QAAQ;EACRC,MAAM;EACNC;AACoB,CAAC,EACtBC,GAAwB,EACvB;EACD,oBACC,IAAAX,WAAA,CAAAY,GAAA,EAACb,OAAA,CAAAc,OAAO;IAACF,GAAG,EAAGA,GAAK;IAACG,SAAS,EAAC,qBAAqB;IAACC,OAAO,EAAG,CAAG;IAAAC,QAAA,eACjE,IAAAhB,WAAA,CAAAiB,IAAA,EAAAjB,WAAA,CAAAkB,QAAA;MAAAF,QAAA,gBACC,IAAAhB,WAAA,CAAAY,GAAA,EAACd,KAAA,CAAAqB,OAAU;QACVC,WAAW,EAAGjB,WAAa;QAC3BK,QAAQ,EAAGA,QAAU;QACrBJ,QAAQ,EAAGA,QAAU;QACrBC,SAAS,EAAGA;MAAW,CACvB,CAAC,eACF,IAAAL,WAAA,CAAAY,GAAA,EAAChB,KAAA,CAAAuB,OAAU;QACVhB,WAAW,EAAGA,WAAa;QAC3BK,QAAQ,EAAGA,QAAU;QACrBF,aAAa,EAAGA,aAAe;QAC/BG,MAAM,EAAGA,MAAQ;QACjBF,gBAAgB,EAAGA,gBAAkB;QACrCG,WAAW,EAAGA;MAAa,CAC3B,CAAC;IAAA,CACD;EAAC,CACK,CAAC;AAEZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMW,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,mBAAU,EAAErB,yBAA0B,CAAC;AAAC,IAAAsB,QAAA,GAAAF,OAAA,CAAAH,OAAA,GAEvDE,cAAc","ignoreList":[]}
@@ -10,6 +10,12 @@ Object.defineProperty(exports, "DatePicker", {
10
10
  return _date.default;
11
11
  }
12
12
  });
13
+ Object.defineProperty(exports, "TimeInput", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _timeInput.default;
17
+ }
18
+ });
13
19
  Object.defineProperty(exports, "TimePicker", {
14
20
  enumerable: true,
15
21
  get: function () {
@@ -19,6 +25,7 @@ Object.defineProperty(exports, "TimePicker", {
19
25
  exports.default = void 0;
20
26
  var _date = _interopRequireDefault(require("./date"));
21
27
  var _time = _interopRequireDefault(require("./time"));
28
+ var _timeInput = _interopRequireDefault(require("./time-input"));
22
29
  var _dateTime = _interopRequireDefault(require("./date-time"));
23
30
  /**
24
31
  * Internal dependencies
@@ -1 +1 @@
1
- {"version":3,"names":["_date","_interopRequireDefault","require","_time","_dateTime","_default","exports","default","DateTimePicker"],"sources":["@wordpress/components/src/date-time/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { default as DatePicker } from './date';\nimport { default as TimePicker } from './time';\nimport { default as DateTimePicker } from './date-time';\n\nexport { DatePicker, TimePicker };\nexport default DateTimePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AALA;AACA;AACA;AAFA,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAQeC,iBAAc","ignoreList":[]}
1
+ {"version":3,"names":["_date","_interopRequireDefault","require","_time","_timeInput","_dateTime","_default","exports","default","DateTimePicker"],"sources":["@wordpress/components/src/date-time/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { default as DatePicker } from './date';\nimport { default as TimePicker } from './time';\nimport { default as TimeInput } from './time-input';\nimport { default as DateTimePicker } from './date-time';\n\nexport { DatePicker, TimePicker, TimeInput };\nexport default DateTimePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAJ,sBAAA,CAAAC,OAAA;AANA;AACA;AACA;AAFA,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GASeC,iBAAc","ignoreList":[]}
@@ -10,16 +10,14 @@ var _dateFns = require("date-fns");
10
10
  var _element = require("@wordpress/element");
11
11
  var _i18n = require("@wordpress/i18n");
12
12
  var _baseControl = _interopRequireDefault(require("../../base-control"));
13
- var _button = _interopRequireDefault(require("../../button"));
14
- var _buttonGroup = _interopRequireDefault(require("../../button-group"));
15
13
  var _selectControl = _interopRequireDefault(require("../../select-control"));
16
14
  var _timezone = _interopRequireDefault(require("./timezone"));
17
15
  var _styles = require("./styles");
18
16
  var _hStack = require("../../h-stack");
19
17
  var _spacer = require("../../spacer");
20
- var _actions = require("../../input-control/reducer/actions");
21
18
  var _utils = require("../utils");
22
19
  var _constants = require("../constants");
20
+ var _timeInput = require("../time-input");
23
21
  var _jsxRuntime = require("react/jsx-runtime");
24
22
  /**
25
23
  * External dependencies
@@ -33,30 +31,7 @@ var _jsxRuntime = require("react/jsx-runtime");
33
31
  * Internal dependencies
34
32
  */
35
33
 
36
- function from12hTo24h(hours, isPm) {
37
- return isPm ? (hours % 12 + 12) % 24 : hours % 12;
38
- }
39
-
40
- /**
41
- * Creates an InputControl reducer used to pad an input so that it is always a
42
- * given width. For example, the hours and minutes inputs are padded to 2 so
43
- * that '4' appears as '04'.
44
- *
45
- * @param pad How many digits the value should be.
46
- */
47
- function buildPadInputStateReducer(pad) {
48
- return (state, action) => {
49
- const nextState = {
50
- ...state
51
- };
52
- if (action.type === _actions.COMMIT || action.type === _actions.PRESS_UP || action.type === _actions.PRESS_DOWN) {
53
- if (nextState.value !== undefined) {
54
- nextState.value = nextState.value.toString().padStart(pad, '0');
55
- }
56
- }
57
- return nextState;
58
- };
59
- }
34
+ const VALID_DATE_ORDERS = ['dmy', 'mdy', 'ymd'];
60
35
 
61
36
  /**
62
37
  * TimePicker is a React component that renders a clock for time selection.
@@ -81,7 +56,8 @@ function buildPadInputStateReducer(pad) {
81
56
  function TimePicker({
82
57
  is12Hour,
83
58
  currentTime,
84
- onChange
59
+ onChange,
60
+ dateOrder: dateOrderProp
85
61
  }) {
86
62
  const [date, setDate] = (0, _element.useState)(() =>
87
63
  // Truncate the date at the minutes, see: #15495.
@@ -97,41 +73,25 @@ function TimePicker({
97
73
  month,
98
74
  year,
99
75
  minutes,
100
- hours,
101
- am
76
+ hours
102
77
  } = (0, _element.useMemo)(() => ({
103
78
  day: (0, _dateFns.format)(date, 'dd'),
104
79
  month: (0, _dateFns.format)(date, 'MM'),
105
80
  year: (0, _dateFns.format)(date, 'yyyy'),
106
81
  minutes: (0, _dateFns.format)(date, 'mm'),
107
- hours: (0, _dateFns.format)(date, is12Hour ? 'hh' : 'HH'),
82
+ hours: (0, _dateFns.format)(date, 'HH'),
108
83
  am: (0, _dateFns.format)(date, 'a')
109
- }), [date, is12Hour]);
84
+ }), [date]);
110
85
  const buildNumberControlChangeCallback = method => {
111
86
  const callback = (value, {
112
87
  event
113
88
  }) => {
114
- var _ownerDocument$defaul;
115
- // `instanceof` checks need to get the instance definition from the
116
- // corresponding window object — therefore, the following logic makes
117
- // the component work correctly even when rendered inside an iframe.
118
- const HTMLInputElementInstance = (_ownerDocument$defaul = event.target?.ownerDocument.defaultView?.HTMLInputElement) !== null && _ownerDocument$defaul !== void 0 ? _ownerDocument$defaul : HTMLInputElement;
119
- if (!(event.target instanceof HTMLInputElementInstance)) {
120
- return;
121
- }
122
- if (!event.target.validity.valid) {
89
+ if (!(0, _utils.validateInputElementTarget)(event)) {
123
90
  return;
124
91
  }
125
92
 
126
93
  // We can safely assume value is a number if target is valid.
127
- let numberValue = Number(value);
128
-
129
- // If the 12-hour format is being used and the 'PM' period is
130
- // selected, then the incoming value (which ranges 1-12) should be
131
- // increased by 12 to match the expected 24-hour format.
132
- if (method === 'hours' && is12Hour) {
133
- numberValue = from12hTo24h(numberValue, am === 'PM');
134
- }
94
+ const numberValue = Number(value);
135
95
  const newDate = (0, _dateFns.set)(date, {
136
96
  [method]: numberValue
137
97
  });
@@ -140,17 +100,17 @@ function TimePicker({
140
100
  };
141
101
  return callback;
142
102
  };
143
- function buildAmPmChangeCallback(value) {
144
- return () => {
145
- if (am === value) {
146
- return;
147
- }
148
- const parsedHours = parseInt(hours, 10);
149
- const newDate = (0, _dateFns.setHours)(date, from12hTo24h(parsedHours, value === 'PM'));
150
- setDate(newDate);
151
- onChange?.((0, _dateFns.format)(newDate, _constants.TIMEZONELESS_FORMAT));
152
- };
153
- }
103
+ const onTimeInputChangeCallback = ({
104
+ hours: newHours,
105
+ minutes: newMinutes
106
+ }) => {
107
+ const newDate = (0, _dateFns.set)(date, {
108
+ hours: newHours,
109
+ minutes: newMinutes
110
+ });
111
+ setDate(newDate);
112
+ onChange?.((0, _dateFns.format)(newDate, _constants.TIMEZONELESS_FORMAT));
113
+ };
154
114
  const dayField = /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.DayInput, {
155
115
  className: "components-datetime__time-field components-datetime__time-field-day" // Unused, for backwards compatibility.
156
116
  ,
@@ -167,7 +127,7 @@ function TimePicker({
167
127
  isDragEnabled: false,
168
128
  isShiftStepEnabled: false,
169
129
  onChange: buildNumberControlChangeCallback('date')
170
- });
130
+ }, "day");
171
131
  const monthField = /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.MonthSelectWrapper, {
172
132
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectControl.default, {
173
133
  className: "components-datetime__time-field components-datetime__time-field-month" // Unused, for backwards compatibility.
@@ -220,6 +180,38 @@ function TimePicker({
220
180
  onChange?.((0, _dateFns.format)(newDate, _constants.TIMEZONELESS_FORMAT));
221
181
  }
222
182
  })
183
+ }, "month");
184
+ const yearField = /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.YearInput, {
185
+ className: "components-datetime__time-field components-datetime__time-field-year" // Unused, for backwards compatibility.
186
+ ,
187
+ label: (0, _i18n.__)('Year'),
188
+ hideLabelFromVision: true,
189
+ __next40pxDefaultSize: true,
190
+ value: year,
191
+ step: 1,
192
+ min: 1,
193
+ max: 9999,
194
+ required: true,
195
+ spinControls: "none",
196
+ isPressEnterToChange: true,
197
+ isDragEnabled: false,
198
+ isShiftStepEnabled: false,
199
+ onChange: buildNumberControlChangeCallback('year'),
200
+ __unstableStateReducer: (0, _utils.buildPadInputStateReducer)(4)
201
+ }, "year");
202
+ const defaultDateOrder = is12Hour ? 'mdy' : 'dmy';
203
+ const dateOrder = dateOrderProp && VALID_DATE_ORDERS.includes(dateOrderProp) ? dateOrderProp : defaultDateOrder;
204
+ const fields = dateOrder.split('').map(field => {
205
+ switch (field) {
206
+ case 'd':
207
+ return dayField;
208
+ case 'm':
209
+ return monthField;
210
+ case 'y':
211
+ return yearField;
212
+ default:
213
+ return null;
214
+ }
223
215
  });
224
216
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Wrapper, {
225
217
  className: "components-datetime__time" // Unused, for backwards compatibility.
@@ -233,67 +225,13 @@ function TimePicker({
233
225
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hStack.HStack, {
234
226
  className: "components-datetime__time-wrapper" // Unused, for backwards compatibility.
235
227
  ,
236
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.TimeWrapper, {
237
- className: "components-datetime__time-field components-datetime__time-field-time" // Unused, for backwards compatibility.
238
- ,
239
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.HoursInput, {
240
- className: "components-datetime__time-field-hours-input" // Unused, for backwards compatibility.
241
- ,
242
- label: (0, _i18n.__)('Hours'),
243
- hideLabelFromVision: true,
244
- __next40pxDefaultSize: true,
245
- value: hours,
246
- step: 1,
247
- min: is12Hour ? 1 : 0,
248
- max: is12Hour ? 12 : 23,
249
- required: true,
250
- spinControls: "none",
251
- isPressEnterToChange: true,
252
- isDragEnabled: false,
253
- isShiftStepEnabled: false,
254
- onChange: buildNumberControlChangeCallback('hours'),
255
- __unstableStateReducer: buildPadInputStateReducer(2)
256
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TimeSeparator, {
257
- className: "components-datetime__time-separator" // Unused, for backwards compatibility.
258
- ,
259
- "aria-hidden": "true",
260
- children: ":"
261
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.MinutesInput, {
262
- className: "components-datetime__time-field-minutes-input" // Unused, for backwards compatibility.
263
- ,
264
- label: (0, _i18n.__)('Minutes'),
265
- hideLabelFromVision: true,
266
- __next40pxDefaultSize: true,
267
- value: minutes,
268
- step: 1,
269
- min: 0,
270
- max: 59,
271
- required: true,
272
- spinControls: "none",
273
- isPressEnterToChange: true,
274
- isDragEnabled: false,
275
- isShiftStepEnabled: false,
276
- onChange: buildNumberControlChangeCallback('minutes'),
277
- __unstableStateReducer: buildPadInputStateReducer(2)
278
- })]
279
- }), is12Hour && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_buttonGroup.default, {
280
- className: "components-datetime__time-field components-datetime__time-field-am-pm" // Unused, for backwards compatibility.
281
- ,
282
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
283
- className: "components-datetime__time-am-button" // Unused, for backwards compatibility.
284
- ,
285
- variant: am === 'AM' ? 'primary' : 'secondary',
286
- __next40pxDefaultSize: true,
287
- onClick: buildAmPmChangeCallback('AM'),
288
- children: (0, _i18n.__)('AM')
289
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
290
- className: "components-datetime__time-pm-button" // Unused, for backwards compatibility.
291
- ,
292
- variant: am === 'PM' ? 'primary' : 'secondary',
293
- __next40pxDefaultSize: true,
294
- onClick: buildAmPmChangeCallback('PM'),
295
- children: (0, _i18n.__)('PM')
296
- })]
228
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_timeInput.TimeInput, {
229
+ value: {
230
+ hours: Number(hours),
231
+ minutes: Number(minutes)
232
+ },
233
+ is12Hour: is12Hour,
234
+ onChange: onTimeInputChangeCallback
297
235
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_spacer.Spacer, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_timezone.default, {})]
298
236
  })]
299
237
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Fieldset, {
@@ -302,31 +240,10 @@ function TimePicker({
302
240
  className: "components-datetime__time-legend" // Unused, for backwards compatibility.
303
241
  ,
304
242
  children: (0, _i18n.__)('Date')
305
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hStack.HStack, {
243
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_hStack.HStack, {
306
244
  className: "components-datetime__time-wrapper" // Unused, for backwards compatibility.
307
245
  ,
308
- children: [is12Hour ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
309
- children: [monthField, dayField]
310
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
311
- children: [dayField, monthField]
312
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.YearInput, {
313
- className: "components-datetime__time-field components-datetime__time-field-year" // Unused, for backwards compatibility.
314
- ,
315
- label: (0, _i18n.__)('Year'),
316
- hideLabelFromVision: true,
317
- __next40pxDefaultSize: true,
318
- value: year,
319
- step: 1,
320
- min: 1,
321
- max: 9999,
322
- required: true,
323
- spinControls: "none",
324
- isPressEnterToChange: true,
325
- isDragEnabled: false,
326
- isShiftStepEnabled: false,
327
- onChange: buildNumberControlChangeCallback('year'),
328
- __unstableStateReducer: buildPadInputStateReducer(4)
329
- })]
246
+ children: fields
330
247
  })]
331
248
  })]
332
249
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_dateFns","require","_element","_i18n","_baseControl","_interopRequireDefault","_button","_buttonGroup","_selectControl","_timezone","_styles","_hStack","_spacer","_actions","_utils","_constants","_jsxRuntime","from12hTo24h","hours","isPm","buildPadInputStateReducer","pad","state","action","nextState","type","COMMIT","PRESS_UP","PRESS_DOWN","value","undefined","toString","padStart","TimePicker","is12Hour","currentTime","onChange","date","setDate","useState","startOfMinute","inputToDate","Date","useEffect","day","month","year","minutes","am","useMemo","format","buildNumberControlChangeCallback","method","callback","event","_ownerDocument$defaul","HTMLInputElementInstance","target","ownerDocument","defaultView","HTMLInputElement","validity","valid","numberValue","Number","newDate","set","TIMEZONELESS_FORMAT","buildAmPmChangeCallback","parsedHours","parseInt","setHours","dayField","jsx","DayInput","className","label","__","hideLabelFromVision","__next40pxDefaultSize","step","min","max","required","spinControls","isPressEnterToChange","isDragEnabled","isShiftStepEnabled","monthField","MonthSelectWrapper","children","default","__nextHasNoMarginBottom","options","setMonth","jsxs","Wrapper","Fieldset","VisualLabel","as","HStack","TimeWrapper","HoursInput","__unstableStateReducer","TimeSeparator","MinutesInput","variant","onClick","Spacer","Fragment","YearInput","_default","exports"],"sources":["@wordpress/components/src/date-time/time/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { startOfMinute, format, set, setHours, setMonth } from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../../base-control';\nimport Button from '../../button';\nimport ButtonGroup from '../../button-group';\nimport SelectControl from '../../select-control';\nimport TimeZone from './timezone';\nimport type { TimePickerProps } from '../types';\nimport {\n\tWrapper,\n\tFieldset,\n\tHoursInput,\n\tTimeSeparator,\n\tMinutesInput,\n\tMonthSelectWrapper,\n\tDayInput,\n\tYearInput,\n\tTimeWrapper,\n} from './styles';\nimport { HStack } from '../../h-stack';\nimport { Spacer } from '../../spacer';\nimport type { InputChangeCallback } from '../../input-control/types';\nimport type { InputState } from '../../input-control/reducer/state';\nimport type { InputAction } from '../../input-control/reducer/actions';\nimport {\n\tCOMMIT,\n\tPRESS_DOWN,\n\tPRESS_UP,\n} from '../../input-control/reducer/actions';\nimport { inputToDate } from '../utils';\nimport { TIMEZONELESS_FORMAT } from '../constants';\n\nfunction from12hTo24h( hours: number, isPm: boolean ) {\n\treturn isPm ? ( ( hours % 12 ) + 12 ) % 24 : hours % 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 */\nfunction buildPadInputStateReducer( pad: number ) {\n\treturn ( state: InputState, action: InputAction ) => {\n\t\tconst nextState = { ...state };\n\t\tif (\n\t\t\taction.type === COMMIT ||\n\t\t\taction.type === PRESS_UP ||\n\t\t\taction.type === PRESS_DOWN\n\t\t) {\n\t\t\tif ( nextState.value !== undefined ) {\n\t\t\t\tnextState.value = nextState.value\n\t\t\t\t\t.toString()\n\t\t\t\t\t.padStart( pad, '0' );\n\t\t\t}\n\t\t}\n\t\treturn nextState;\n\t};\n}\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\tis12Hour,\n\tcurrentTime,\n\tonChange,\n}: TimePickerProps ) {\n\tconst [ date, setDate ] = useState( () =>\n\t\t// Truncate the date at the minutes, see: #15495.\n\t\tcurrentTime ? startOfMinute( inputToDate( currentTime ) ) : new Date()\n\t);\n\n\t// Reset the state when currentTime changed.\n\t// TODO: useEffect() shouldn't be used like this, causes an unnecessary render\n\tuseEffect( () => {\n\t\tsetDate(\n\t\t\tcurrentTime\n\t\t\t\t? startOfMinute( inputToDate( currentTime ) )\n\t\t\t\t: new Date()\n\t\t);\n\t}, [ currentTime ] );\n\n\tconst { day, month, year, minutes, hours, am } = useMemo(\n\t\t() => ( {\n\t\t\tday: format( date, 'dd' ),\n\t\t\tmonth: format( date, 'MM' ),\n\t\t\tyear: format( date, 'yyyy' ),\n\t\t\tminutes: format( date, 'mm' ),\n\t\t\thours: format( date, is12Hour ? 'hh' : 'HH' ),\n\t\t\tam: format( date, 'a' ),\n\t\t} ),\n\t\t[ date, is12Hour ]\n\t);\n\n\tconst buildNumberControlChangeCallback = (\n\t\tmethod: 'hours' | 'minutes' | 'date' | 'year'\n\t) => {\n\t\tconst callback: InputChangeCallback = ( value, { event } ) => {\n\t\t\t// `instanceof` checks need to get the instance definition from the\n\t\t\t// corresponding window object — therefore, the following logic makes\n\t\t\t// the component work correctly even when rendered inside an iframe.\n\t\t\tconst HTMLInputElementInstance =\n\t\t\t\t( event.target as HTMLInputElement )?.ownerDocument.defaultView\n\t\t\t\t\t?.HTMLInputElement ?? HTMLInputElement;\n\n\t\t\tif ( ! ( event.target instanceof HTMLInputElementInstance ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! event.target.validity.valid ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We can safely assume value is a number if target is valid.\n\t\t\tlet numberValue = Number( value );\n\n\t\t\t// If the 12-hour format is being used and the 'PM' period is\n\t\t\t// selected, then the incoming value (which ranges 1-12) should be\n\t\t\t// increased by 12 to match the expected 24-hour format.\n\t\t\tif ( method === 'hours' && is12Hour ) {\n\t\t\t\tnumberValue = from12hTo24h( numberValue, am === 'PM' );\n\t\t\t}\n\n\t\t\tconst newDate = set( date, { [ method ]: numberValue } );\n\t\t\tsetDate( newDate );\n\t\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t\t};\n\t\treturn callback;\n\t};\n\n\tfunction buildAmPmChangeCallback( value: 'AM' | 'PM' ) {\n\t\treturn () => {\n\t\t\tif ( am === value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst parsedHours = parseInt( hours, 10 );\n\n\t\t\tconst newDate = setHours(\n\t\t\t\tdate,\n\t\t\t\tfrom12hTo24h( parsedHours, value === 'PM' )\n\t\t\t);\n\t\t\tsetDate( newDate );\n\t\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t\t};\n\t}\n\n\tconst dayField = (\n\t\t<DayInput\n\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-day\" // Unused, for backwards compatibility.\n\t\t\tlabel={ __( 'Day' ) }\n\t\t\thideLabelFromVision\n\t\t\t__next40pxDefaultSize\n\t\t\tvalue={ day }\n\t\t\tstep={ 1 }\n\t\t\tmin={ 1 }\n\t\t\tmax={ 31 }\n\t\t\trequired\n\t\t\tspinControls=\"none\"\n\t\t\tisPressEnterToChange\n\t\t\tisDragEnabled={ false }\n\t\t\tisShiftStepEnabled={ false }\n\t\t\tonChange={ buildNumberControlChangeCallback( 'date' ) }\n\t\t/>\n\t);\n\n\tconst monthField = (\n\t\t<MonthSelectWrapper>\n\t\t\t<SelectControl\n\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-month\" // Unused, for backwards compatibility.\n\t\t\t\tlabel={ __( 'Month' ) }\n\t\t\t\thideLabelFromVision\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ month }\n\t\t\t\toptions={ [\n\t\t\t\t\t{ value: '01', label: __( 'January' ) },\n\t\t\t\t\t{ value: '02', label: __( 'February' ) },\n\t\t\t\t\t{ value: '03', label: __( 'March' ) },\n\t\t\t\t\t{ value: '04', label: __( 'April' ) },\n\t\t\t\t\t{ value: '05', label: __( 'May' ) },\n\t\t\t\t\t{ value: '06', label: __( 'June' ) },\n\t\t\t\t\t{ value: '07', label: __( 'July' ) },\n\t\t\t\t\t{ value: '08', label: __( 'August' ) },\n\t\t\t\t\t{ value: '09', label: __( 'September' ) },\n\t\t\t\t\t{ value: '10', label: __( 'October' ) },\n\t\t\t\t\t{ value: '11', label: __( 'November' ) },\n\t\t\t\t\t{ value: '12', label: __( 'December' ) },\n\t\t\t\t] }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tconst newDate = setMonth( date, Number( value ) - 1 );\n\t\t\t\t\tsetDate( newDate );\n\t\t\t\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</MonthSelectWrapper>\n\t);\n\n\treturn (\n\t\t<Wrapper\n\t\t\tclassName=\"components-datetime__time\" // Unused, for backwards compatibility.\n\t\t>\n\t\t\t<Fieldset>\n\t\t\t\t<BaseControl.VisualLabel\n\t\t\t\t\tas=\"legend\"\n\t\t\t\t\tclassName=\"components-datetime__time-legend\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Time' ) }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t<TimeWrapper\n\t\t\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-time\" // Unused, for backwards compatibility.\n\t\t\t\t\t>\n\t\t\t\t\t\t<HoursInput\n\t\t\t\t\t\t\tclassName=\"components-datetime__time-field-hours-input\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\tlabel={ __( 'Hours' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvalue={ hours }\n\t\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\t\tmin={ is12Hour ? 1 : 0 }\n\t\t\t\t\t\t\tmax={ is12Hour ? 12 : 23 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\t\t\tisDragEnabled={ false }\n\t\t\t\t\t\t\tisShiftStepEnabled={ false }\n\t\t\t\t\t\t\tonChange={ buildNumberControlChangeCallback(\n\t\t\t\t\t\t\t\t'hours'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t__unstableStateReducer={ buildPadInputStateReducer(\n\t\t\t\t\t\t\t\t2\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<TimeSeparator\n\t\t\t\t\t\t\tclassName=\"components-datetime__time-separator\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t:\n\t\t\t\t\t\t</TimeSeparator>\n\t\t\t\t\t\t<MinutesInput\n\t\t\t\t\t\t\tclassName=\"components-datetime__time-field-minutes-input\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\tlabel={ __( 'Minutes' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvalue={ minutes }\n\t\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 59 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\t\t\tisDragEnabled={ false }\n\t\t\t\t\t\t\tisShiftStepEnabled={ false }\n\t\t\t\t\t\t\tonChange={ buildNumberControlChangeCallback(\n\t\t\t\t\t\t\t\t'minutes'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t__unstableStateReducer={ buildPadInputStateReducer(\n\t\t\t\t\t\t\t\t2\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</TimeWrapper>\n\t\t\t\t\t{ is12Hour && (\n\t\t\t\t\t\t<ButtonGroup\n\t\t\t\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-am-pm\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"components-datetime__time-am-button\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tam === 'AM' ? 'primary' : 'secondary'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tonClick={ buildAmPmChangeCallback( 'AM' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'AM' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"components-datetime__time-pm-button\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tam === 'PM' ? 'primary' : 'secondary'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tonClick={ buildAmPmChangeCallback( 'PM' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'PM' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</ButtonGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<Spacer />\n\t\t\t\t\t<TimeZone />\n\t\t\t\t</HStack>\n\t\t\t</Fieldset>\n\t\t\t<Fieldset>\n\t\t\t\t<BaseControl.VisualLabel\n\t\t\t\t\tas=\"legend\"\n\t\t\t\t\tclassName=\"components-datetime__time-legend\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Date' ) }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ is12Hour ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ monthField }\n\t\t\t\t\t\t\t{ dayField }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ dayField }\n\t\t\t\t\t\t\t{ monthField }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t\t<YearInput\n\t\t\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-year\" // Unused, for backwards compatibility.\n\t\t\t\t\t\tlabel={ __( 'Year' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvalue={ year }\n\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 9999 }\n\t\t\t\t\t\trequired\n\t\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\t\tisDragEnabled={ false }\n\t\t\t\t\t\tisShiftStepEnabled={ false }\n\t\t\t\t\t\tonChange={ buildNumberControlChangeCallback( 'year' ) }\n\t\t\t\t\t\t__unstableStateReducer={ buildPadInputStateReducer(\n\t\t\t\t\t\t\t4\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</HStack>\n\t\t\t</Fieldset>\n\t\t</Wrapper>\n\t);\n}\n\nexport default TimePicker;\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,YAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,cAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,SAAA,GAAAJ,sBAAA,CAAAJ,OAAA;AAEA,IAAAS,OAAA,GAAAT,OAAA;AAWA,IAAAU,OAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA;AAIA,IAAAY,QAAA,GAAAZ,OAAA;AAKA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,UAAA,GAAAd,OAAA;AAAmD,IAAAe,WAAA,GAAAf,OAAA;AA1CnD;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AA+BA,SAASgB,YAAYA,CAAEC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ACT,IAAAlB,WAAA,CAAA+E,IAAA,EAAA/E,WAAA,CAAA6F,QAAA;UAAAnB,QAAA,GACGF,UAAU,EACVhB,QAAQ;QAAA,CACT,CAAC,gBAEH,IAAAxD,WAAA,CAAA+E,IAAA,EAAA/E,WAAA,CAAA6F,QAAA;UAAAnB,QAAA,GACGlB,QAAQ,EACRgB,UAAU;QAAA,CACX,CACF,eACD,IAAAxE,WAAA,CAAAyD,GAAA,EAAC/D,OAAA,CAAAoG,SAAS;UACTnC,SAAS,EAAC,sEAAsE,CAAC;UAAA;UACjFC,KAAK,EAAG,IAAAC,QAAE,EAAE,MAAO,CAAG;UACtBC,mBAAmB;UACnBC,qBAAqB;UACrBlD,KAAK,EAAGiB,IAAM;UACdkC,IAAI,EAAG,CAAG;UACVC,GAAG,EAAG,CAAG;UACTC,GAAG,EAAG,IAAM;UACZC,QAAQ;UACRC,YAAY,EAAC,MAAM;UACnBC,oBAAoB;UACpBC,aAAa,EAAG,KAAO;UACvBC,kBAAkB,EAAG,KAAO;UAC5BnD,QAAQ,EAAGe,gCAAgC,CAAE,MAAO,CAAG;UACvDoD,sBAAsB,EAAGnF,yBAAyB,CACjD,CACD;QAAG,CACH,CAAC;MAAA,CACK,CAAC;IAAA,CACA,CAAC;EAAA,CACH,CAAC;AAEZ;AAAC,IAAA2F,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEc1D,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["_dateFns","require","_element","_i18n","_baseControl","_interopRequireDefault","_selectControl","_timezone","_styles","_hStack","_spacer","_utils","_constants","_timeInput","_jsxRuntime","VALID_DATE_ORDERS","TimePicker","is12Hour","currentTime","onChange","dateOrder","dateOrderProp","date","setDate","useState","startOfMinute","inputToDate","Date","useEffect","day","month","year","minutes","hours","useMemo","format","am","buildNumberControlChangeCallback","method","callback","value","event","validateInputElementTarget","numberValue","Number","newDate","set","TIMEZONELESS_FORMAT","onTimeInputChangeCallback","newHours","newMinutes","dayField","jsx","DayInput","className","label","__","hideLabelFromVision","__next40pxDefaultSize","step","min","max","required","spinControls","isPressEnterToChange","isDragEnabled","isShiftStepEnabled","monthField","MonthSelectWrapper","children","default","__nextHasNoMarginBottom","options","setMonth","yearField","YearInput","__unstableStateReducer","buildPadInputStateReducer","defaultDateOrder","includes","fields","split","map","field","jsxs","Wrapper","Fieldset","VisualLabel","as","HStack","TimeInput","Spacer","_default","exports"],"sources":["@wordpress/components/src/date-time/time/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { startOfMinute, format, set, setMonth } from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../../base-control';\nimport SelectControl from '../../select-control';\nimport TimeZone from './timezone';\nimport type { TimeInputValue, TimePickerProps } from '../types';\nimport {\n\tWrapper,\n\tFieldset,\n\tMonthSelectWrapper,\n\tDayInput,\n\tYearInput,\n} from './styles';\nimport { HStack } from '../../h-stack';\nimport { Spacer } from '../../spacer';\nimport type { InputChangeCallback } from '../../input-control/types';\nimport {\n\tinputToDate,\n\tbuildPadInputStateReducer,\n\tvalidateInputElementTarget,\n} from '../utils';\nimport { TIMEZONELESS_FORMAT } from '../constants';\nimport { TimeInput } from '../time-input';\n\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\tis12Hour,\n\tcurrentTime,\n\tonChange,\n\tdateOrder: dateOrderProp,\n}: TimePickerProps ) {\n\tconst [ date, setDate ] = useState( () =>\n\t\t// Truncate the date at the minutes, see: #15495.\n\t\tcurrentTime ? startOfMinute( inputToDate( currentTime ) ) : new Date()\n\t);\n\n\t// Reset the state when currentTime changed.\n\t// TODO: useEffect() shouldn't be used like this, causes an unnecessary render\n\tuseEffect( () => {\n\t\tsetDate(\n\t\t\tcurrentTime\n\t\t\t\t? startOfMinute( inputToDate( currentTime ) )\n\t\t\t\t: new Date()\n\t\t);\n\t}, [ currentTime ] );\n\n\tconst { day, month, year, minutes, hours } = useMemo(\n\t\t() => ( {\n\t\t\tday: format( date, 'dd' ),\n\t\t\tmonth: format( date, 'MM' ),\n\t\t\tyear: format( date, 'yyyy' ),\n\t\t\tminutes: format( date, 'mm' ),\n\t\t\thours: format( date, 'HH' ),\n\t\t\tam: format( date, 'a' ),\n\t\t} ),\n\t\t[ date ]\n\t);\n\n\tconst buildNumberControlChangeCallback = ( method: 'date' | 'year' ) => {\n\t\tconst callback: InputChangeCallback = ( value, { event } ) => {\n\t\t\tif ( ! validateInputElementTarget( event ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We can safely assume value is a number if target is valid.\n\t\t\tconst numberValue = Number( value );\n\n\t\t\tconst newDate = set( date, { [ method ]: numberValue } );\n\t\t\tsetDate( newDate );\n\t\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t\t};\n\t\treturn callback;\n\t};\n\n\tconst onTimeInputChangeCallback = ( {\n\t\thours: newHours,\n\t\tminutes: newMinutes,\n\t}: TimeInputValue ) => {\n\t\tconst newDate = set( date, {\n\t\t\thours: newHours,\n\t\t\tminutes: newMinutes,\n\t\t} );\n\t\tsetDate( newDate );\n\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t};\n\n\tconst dayField = (\n\t\t<DayInput\n\t\t\tkey=\"day\"\n\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-day\" // Unused, for backwards compatibility.\n\t\t\tlabel={ __( 'Day' ) }\n\t\t\thideLabelFromVision\n\t\t\t__next40pxDefaultSize\n\t\t\tvalue={ day }\n\t\t\tstep={ 1 }\n\t\t\tmin={ 1 }\n\t\t\tmax={ 31 }\n\t\t\trequired\n\t\t\tspinControls=\"none\"\n\t\t\tisPressEnterToChange\n\t\t\tisDragEnabled={ false }\n\t\t\tisShiftStepEnabled={ false }\n\t\t\tonChange={ buildNumberControlChangeCallback( 'date' ) }\n\t\t/>\n\t);\n\n\tconst monthField = (\n\t\t<MonthSelectWrapper key=\"month\">\n\t\t\t<SelectControl\n\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-month\" // Unused, for backwards compatibility.\n\t\t\t\tlabel={ __( 'Month' ) }\n\t\t\t\thideLabelFromVision\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ month }\n\t\t\t\toptions={ [\n\t\t\t\t\t{ value: '01', label: __( 'January' ) },\n\t\t\t\t\t{ value: '02', label: __( 'February' ) },\n\t\t\t\t\t{ value: '03', label: __( 'March' ) },\n\t\t\t\t\t{ value: '04', label: __( 'April' ) },\n\t\t\t\t\t{ value: '05', label: __( 'May' ) },\n\t\t\t\t\t{ value: '06', label: __( 'June' ) },\n\t\t\t\t\t{ value: '07', label: __( 'July' ) },\n\t\t\t\t\t{ value: '08', label: __( 'August' ) },\n\t\t\t\t\t{ value: '09', label: __( 'September' ) },\n\t\t\t\t\t{ value: '10', label: __( 'October' ) },\n\t\t\t\t\t{ value: '11', label: __( 'November' ) },\n\t\t\t\t\t{ value: '12', label: __( 'December' ) },\n\t\t\t\t] }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tconst newDate = setMonth( date, Number( value ) - 1 );\n\t\t\t\t\tsetDate( newDate );\n\t\t\t\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</MonthSelectWrapper>\n\t);\n\n\tconst yearField = (\n\t\t<YearInput\n\t\t\tkey=\"year\"\n\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-year\" // Unused, for backwards compatibility.\n\t\t\tlabel={ __( 'Year' ) }\n\t\t\thideLabelFromVision\n\t\t\t__next40pxDefaultSize\n\t\t\tvalue={ year }\n\t\t\tstep={ 1 }\n\t\t\tmin={ 1 }\n\t\t\tmax={ 9999 }\n\t\t\trequired\n\t\t\tspinControls=\"none\"\n\t\t\tisPressEnterToChange\n\t\t\tisDragEnabled={ false }\n\t\t\tisShiftStepEnabled={ false }\n\t\t\tonChange={ buildNumberControlChangeCallback( 'year' ) }\n\t\t\t__unstableStateReducer={ buildPadInputStateReducer( 4 ) }\n\t\t/>\n\t);\n\n\tconst defaultDateOrder = is12Hour ? 'mdy' : 'dmy';\n\tconst dateOrder =\n\t\tdateOrderProp && VALID_DATE_ORDERS.includes( dateOrderProp )\n\t\t\t? dateOrderProp\n\t\t\t: defaultDateOrder;\n\n\tconst fields = dateOrder.split( '' ).map( ( field ) => {\n\t\tswitch ( field ) {\n\t\t\tcase 'd':\n\t\t\t\treturn dayField;\n\t\t\tcase 'm':\n\t\t\t\treturn monthField;\n\t\t\tcase 'y':\n\t\t\t\treturn yearField;\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t} );\n\n\treturn (\n\t\t<Wrapper\n\t\t\tclassName=\"components-datetime__time\" // Unused, for backwards compatibility.\n\t\t>\n\t\t\t<Fieldset>\n\t\t\t\t<BaseControl.VisualLabel\n\t\t\t\t\tas=\"legend\"\n\t\t\t\t\tclassName=\"components-datetime__time-legend\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Time' ) }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t<TimeInput\n\t\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t\thours: Number( hours ),\n\t\t\t\t\t\t\tminutes: Number( minutes ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tis12Hour={ is12Hour }\n\t\t\t\t\t\tonChange={ onTimeInputChangeCallback }\n\t\t\t\t\t/>\n\t\t\t\t\t<Spacer />\n\t\t\t\t\t<TimeZone />\n\t\t\t\t</HStack>\n\t\t\t</Fieldset>\n\t\t\t<Fieldset>\n\t\t\t\t<BaseControl.VisualLabel\n\t\t\t\t\tas=\"legend\"\n\t\t\t\t\tclassName=\"components-datetime__time-legend\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Date' ) }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ fields }\n\t\t\t\t</HStack>\n\t\t\t</Fieldset>\n\t\t</Wrapper>\n\t);\n}\n\nexport default TimePicker;\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,SAAA,GAAAF,sBAAA,CAAAJ,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AAOA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAEA,IAAAU,MAAA,GAAAV,OAAA;AAKA,IAAAW,UAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AAA0C,IAAAa,WAAA,GAAAb,OAAA;AAlC1C;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAuBA,MAAMc,iBAAiB,GAAG,CAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAE;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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