@wordpress/components 22.1.0 → 23.0.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 (530) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/build/alignment-matrix-control/cell.js.map +1 -1
  3. package/build/alignment-matrix-control/icon.js +4 -2
  4. package/build/alignment-matrix-control/icon.js.map +1 -1
  5. package/build/alignment-matrix-control/index.js +25 -1
  6. package/build/alignment-matrix-control/index.js.map +1 -1
  7. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +13 -13
  8. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +1 -1
  9. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +16 -16
  10. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  11. package/build/alignment-matrix-control/types.js +6 -0
  12. package/build/alignment-matrix-control/types.js.map +1 -0
  13. package/build/alignment-matrix-control/utils.js +9 -8
  14. package/build/alignment-matrix-control/utils.js.map +1 -1
  15. package/build/angle-picker-control/styles/angle-picker-control-styles.js +9 -9
  16. package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  17. package/build/autocomplete/index.js +38 -9
  18. package/build/autocomplete/index.js.map +1 -1
  19. package/build/base-control/hooks.js +52 -0
  20. package/build/base-control/hooks.js.map +1 -0
  21. package/build/base-control/index.js +24 -7
  22. package/build/base-control/index.js.map +1 -1
  23. package/build/base-field/hook.js +0 -14
  24. package/build/base-field/hook.js.map +1 -1
  25. package/build/base-field/index.js.map +1 -1
  26. package/build/base-field/styles.js +5 -5
  27. package/build/base-field/styles.js.map +1 -1
  28. package/build/base-field/types.js +6 -0
  29. package/build/base-field/types.js.map +1 -0
  30. package/build/border-control/border-control/component.js +1 -0
  31. package/build/border-control/border-control/component.js.map +1 -1
  32. package/build/border-control/styles.js +16 -16
  33. package/build/border-control/styles.js.map +1 -1
  34. package/build/box-control/linked-button.js +3 -4
  35. package/build/box-control/linked-button.js.map +1 -1
  36. package/build/color-palette/index.js +2 -7
  37. package/build/color-palette/index.js.map +1 -1
  38. package/build/color-picker/input-with-slider.js +1 -0
  39. package/build/color-picker/input-with-slider.js.map +1 -1
  40. package/build/color-picker/styles.js +8 -8
  41. package/build/color-picker/styles.js.map +1 -1
  42. package/build/custom-select-control/index.js +14 -2
  43. package/build/custom-select-control/index.js.map +1 -1
  44. package/build/dashicon/index.js +1 -4
  45. package/build/dashicon/index.js.map +1 -1
  46. package/build/date-time/date-time/index.js +4 -4
  47. package/build/date-time/date-time/index.js.map +1 -1
  48. package/build/duotone-picker/duotone-picker.js +2 -2
  49. package/build/duotone-picker/duotone-picker.js.map +1 -1
  50. package/build/gradient-picker/index.js +3 -9
  51. package/build/gradient-picker/index.js.map +1 -1
  52. package/build/higher-order/with-fallback-styles/index.js +2 -2
  53. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  54. package/build/index.js +13 -1
  55. package/build/index.js.map +1 -1
  56. package/build/input-control/index.js +17 -5
  57. package/build/input-control/index.js.map +1 -1
  58. package/build/input-control/input-base.js +2 -0
  59. package/build/input-control/input-base.js.map +1 -1
  60. package/build/mobile/bottom-sheet/cell.native.js +1 -1
  61. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  62. package/build/mobile/bottom-sheet/switch-cell.native.js +1 -3
  63. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  64. package/build/mobile/global-styles-context/index.native.js +8 -8
  65. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  66. package/build/mobile/keyboard-aware-flat-list/index.ios.js +4 -2
  67. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  68. package/build/modal/index.js +8 -0
  69. package/build/modal/index.js.map +1 -1
  70. package/build/navigator/navigator-provider/component.js +12 -8
  71. package/build/navigator/navigator-provider/component.js.map +1 -1
  72. package/build/number-control/styles/number-control-styles.js +8 -8
  73. package/build/number-control/styles/number-control-styles.js.map +1 -1
  74. package/build/palette-edit/index.js +72 -33
  75. package/build/palette-edit/index.js.map +1 -1
  76. package/build/popover/index.js +10 -2
  77. package/build/popover/index.js.map +1 -1
  78. package/build/query-controls/index.js +1 -0
  79. package/build/query-controls/index.js.map +1 -1
  80. package/build/snackbar/index.js +35 -24
  81. package/build/snackbar/index.js.map +1 -1
  82. package/build/snackbar/list.js +14 -19
  83. package/build/snackbar/list.js.map +1 -1
  84. package/build/snackbar/types.js +6 -0
  85. package/build/snackbar/types.js.map +1 -0
  86. package/build/tab-panel/index.js +10 -5
  87. package/build/tab-panel/index.js.map +1 -1
  88. package/build/theme/color-algorithms.js +118 -0
  89. package/build/theme/color-algorithms.js.map +1 -0
  90. package/build/theme/index.js +21 -18
  91. package/build/theme/index.js.map +1 -1
  92. package/build/theme/styles.js +10 -7
  93. package/build/theme/styles.js.map +1 -1
  94. package/build/toggle-control/index.js +5 -2
  95. package/build/toggle-control/index.js.map +1 -1
  96. package/build/ui/context/context-system-provider.js +3 -1
  97. package/build/ui/context/context-system-provider.js.map +1 -1
  98. package/build/unit-control/index.js +5 -2
  99. package/build/unit-control/index.js.map +1 -1
  100. package/build/utils/colors-values.js +1 -1
  101. package/build/utils/colors-values.js.map +1 -1
  102. package/build/utils/config-values.js +0 -2
  103. package/build/utils/config-values.js.map +1 -1
  104. package/build/utils/hooks/use-controlled-value.js.map +1 -1
  105. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  106. package/build-module/alignment-matrix-control/icon.js +4 -2
  107. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  108. package/build-module/alignment-matrix-control/index.js +23 -1
  109. package/build-module/alignment-matrix-control/index.js.map +1 -1
  110. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +13 -13
  111. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +1 -1
  112. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +16 -16
  113. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  114. package/build-module/alignment-matrix-control/types.js +2 -0
  115. package/build-module/alignment-matrix-control/types.js.map +1 -0
  116. package/build-module/alignment-matrix-control/utils.js +13 -8
  117. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  118. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +9 -9
  119. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  120. package/build-module/autocomplete/index.js +38 -9
  121. package/build-module/autocomplete/index.js.map +1 -1
  122. package/build-module/base-control/hooks.js +41 -0
  123. package/build-module/base-control/hooks.js.map +1 -0
  124. package/build-module/base-control/index.js +18 -8
  125. package/build-module/base-control/index.js.map +1 -1
  126. package/build-module/base-field/hook.js +0 -14
  127. package/build-module/base-field/hook.js.map +1 -1
  128. package/build-module/base-field/index.js.map +1 -1
  129. package/build-module/base-field/styles.js +5 -5
  130. package/build-module/base-field/styles.js.map +1 -1
  131. package/build-module/base-field/types.js +2 -0
  132. package/build-module/base-field/types.js.map +1 -0
  133. package/build-module/border-control/border-control/component.js +1 -0
  134. package/build-module/border-control/border-control/component.js.map +1 -1
  135. package/build-module/border-control/styles.js +17 -17
  136. package/build-module/border-control/styles.js.map +1 -1
  137. package/build-module/box-control/linked-button.js +3 -4
  138. package/build-module/box-control/linked-button.js.map +1 -1
  139. package/build-module/color-palette/index.js +2 -7
  140. package/build-module/color-palette/index.js.map +1 -1
  141. package/build-module/color-picker/input-with-slider.js +1 -0
  142. package/build-module/color-picker/input-with-slider.js.map +1 -1
  143. package/build-module/color-picker/styles.js +8 -8
  144. package/build-module/color-picker/styles.js.map +1 -1
  145. package/build-module/custom-select-control/index.js +14 -2
  146. package/build-module/custom-select-control/index.js.map +1 -1
  147. package/build-module/dashicon/index.js +1 -4
  148. package/build-module/dashicon/index.js.map +1 -1
  149. package/build-module/date-time/date-time/index.js +4 -4
  150. package/build-module/date-time/date-time/index.js.map +1 -1
  151. package/build-module/duotone-picker/duotone-picker.js +2 -2
  152. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  153. package/build-module/gradient-picker/index.js +3 -8
  154. package/build-module/gradient-picker/index.js.map +1 -1
  155. package/build-module/higher-order/with-fallback-styles/index.js +2 -2
  156. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  157. package/build-module/index.js +2 -2
  158. package/build-module/index.js.map +1 -1
  159. package/build-module/input-control/index.js +16 -5
  160. package/build-module/input-control/index.js.map +1 -1
  161. package/build-module/input-control/input-base.js +2 -0
  162. package/build-module/input-control/input-base.js.map +1 -1
  163. package/build-module/mobile/bottom-sheet/cell.native.js +1 -1
  164. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  165. package/build-module/mobile/bottom-sheet/switch-cell.native.js +1 -2
  166. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  167. package/build-module/mobile/global-styles-context/index.native.js +8 -7
  168. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  169. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  170. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  171. package/build-module/modal/index.js +8 -0
  172. package/build-module/modal/index.js.map +1 -1
  173. package/build-module/navigator/navigator-provider/component.js +12 -8
  174. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  175. package/build-module/number-control/styles/number-control-styles.js +8 -10
  176. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  177. package/build-module/palette-edit/index.js +73 -34
  178. package/build-module/palette-edit/index.js.map +1 -1
  179. package/build-module/popover/index.js +10 -2
  180. package/build-module/popover/index.js.map +1 -1
  181. package/build-module/query-controls/index.js +1 -0
  182. package/build-module/query-controls/index.js.map +1 -1
  183. package/build-module/snackbar/index.js +33 -23
  184. package/build-module/snackbar/index.js.map +1 -1
  185. package/build-module/snackbar/list.js +14 -22
  186. package/build-module/snackbar/list.js.map +1 -1
  187. package/build-module/snackbar/types.js +2 -0
  188. package/build-module/snackbar/types.js.map +1 -0
  189. package/build-module/tab-panel/index.js +10 -5
  190. package/build-module/tab-panel/index.js.map +1 -1
  191. package/build-module/theme/color-algorithms.js +105 -0
  192. package/build-module/theme/color-algorithms.js.map +1 -0
  193. package/build-module/theme/index.js +21 -17
  194. package/build-module/theme/index.js.map +1 -1
  195. package/build-module/theme/styles.js +8 -6
  196. package/build-module/theme/styles.js.map +1 -1
  197. package/build-module/toggle-control/index.js +4 -2
  198. package/build-module/toggle-control/index.js.map +1 -1
  199. package/build-module/ui/context/context-system-provider.js +3 -2
  200. package/build-module/ui/context/context-system-provider.js.map +1 -1
  201. package/build-module/unit-control/index.js +5 -2
  202. package/build-module/unit-control/index.js.map +1 -1
  203. package/build-module/utils/colors-values.js +1 -1
  204. package/build-module/utils/colors-values.js.map +1 -1
  205. package/build-module/utils/config-values.js +0 -2
  206. package/build-module/utils/config-values.js.map +1 -1
  207. package/build-module/utils/hooks/use-controlled-value.js.map +1 -1
  208. package/build-style/style-rtl.css +92 -75
  209. package/build-style/style.css +92 -75
  210. package/build-types/alignment-matrix-control/cell.d.ts +5 -0
  211. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -0
  212. package/build-types/alignment-matrix-control/icon.d.ts +6 -0
  213. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -0
  214. package/build-types/alignment-matrix-control/index.d.ts +30 -0
  215. package/build-types/alignment-matrix-control/index.d.ts.map +1 -0
  216. package/build-types/alignment-matrix-control/stories/index.d.ts +14 -0
  217. package/build-types/alignment-matrix-control/stories/index.d.ts.map +1 -0
  218. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +19 -0
  219. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +1 -0
  220. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +23 -0
  221. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -0
  222. package/build-types/alignment-matrix-control/test/index.d.ts +2 -0
  223. package/build-types/alignment-matrix-control/test/index.d.ts.map +1 -0
  224. package/build-types/alignment-matrix-control/types.d.ts +39 -0
  225. package/build-types/alignment-matrix-control/types.d.ts.map +1 -0
  226. package/build-types/alignment-matrix-control/utils.d.ts +33 -0
  227. package/build-types/alignment-matrix-control/utils.d.ts.map +1 -0
  228. package/build-types/base-control/hooks.d.ts +23 -0
  229. package/build-types/base-control/hooks.d.ts.map +1 -0
  230. package/build-types/base-control/index.d.ts +17 -7
  231. package/build-types/base-control/index.d.ts.map +1 -1
  232. package/build-types/base-control/stories/index.d.ts.map +1 -1
  233. package/build-types/base-control/test/index.d.ts +2 -0
  234. package/build-types/base-control/test/index.d.ts.map +1 -0
  235. package/build-types/base-control/types.d.ts +8 -2
  236. package/build-types/base-control/types.d.ts.map +1 -1
  237. package/build-types/base-field/hook.d.ts +7 -31
  238. package/build-types/base-field/hook.d.ts.map +1 -1
  239. package/build-types/base-field/index.d.ts +1 -1
  240. package/build-types/base-field/index.d.ts.map +1 -1
  241. package/build-types/base-field/styles.d.ts +5 -5
  242. package/build-types/base-field/styles.d.ts.map +1 -1
  243. package/build-types/base-field/test/index.d.ts +2 -0
  244. package/build-types/base-field/test/index.d.ts.map +1 -0
  245. package/build-types/base-field/types.d.ts +29 -0
  246. package/build-types/base-field/types.d.ts.map +1 -0
  247. package/build-types/border-box-control/border-box-control/hook.d.ts +2 -2
  248. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +2 -2
  249. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +2 -2
  250. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +2 -2
  251. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  252. package/build-types/border-control/border-control/hook.d.ts +2 -2
  253. package/build-types/border-control/border-control-dropdown/hook.d.ts +2 -2
  254. package/build-types/border-control/border-control-style-picker/hook.d.ts +2 -2
  255. package/build-types/border-control/styles.d.ts.map +1 -1
  256. package/build-types/card/card/hook.d.ts +2 -2
  257. package/build-types/card/card-body/hook.d.ts +2 -2
  258. package/build-types/card/card-divider/hook.d.ts +2 -2
  259. package/build-types/card/card-footer/hook.d.ts +2 -2
  260. package/build-types/card/card-header/hook.d.ts +2 -2
  261. package/build-types/card/card-media/hook.d.ts +2 -2
  262. package/build-types/color-palette/index.d.ts +2 -2
  263. package/build-types/color-palette/index.d.ts.map +1 -1
  264. package/build-types/color-palette/stories/index.d.ts +6 -7
  265. package/build-types/color-palette/stories/index.d.ts.map +1 -1
  266. package/build-types/color-palette/styles.d.ts +1 -1
  267. package/build-types/color-palette/types.d.ts +1 -1
  268. package/build-types/color-palette/types.d.ts.map +1 -1
  269. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  270. package/build-types/color-picker/styles.d.ts +5 -5
  271. package/build-types/color-picker/styles.d.ts.map +1 -1
  272. package/build-types/custom-select-control/index.d.ts.map +1 -1
  273. package/build-types/dashicon/index.d.ts +6 -20
  274. package/build-types/dashicon/index.d.ts.map +1 -1
  275. package/build-types/dashicon/types.d.ts +14 -0
  276. package/build-types/dashicon/types.d.ts.map +1 -1
  277. package/build-types/date-time/date/styles.d.ts +3 -3
  278. package/build-types/date-time/date-time/styles.d.ts +3 -3
  279. package/build-types/date-time/time/styles.d.ts +8 -8
  280. package/build-types/elevation/hook.d.ts +2 -2
  281. package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
  282. package/build-types/flex/flex/hook.d.ts +2 -2
  283. package/build-types/flex/flex-block/hook.d.ts +2 -2
  284. package/build-types/flex/flex-item/hook.d.ts +2 -2
  285. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -5
  286. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  287. package/build-types/grid/hook.d.ts +2 -2
  288. package/build-types/h-stack/component.d.ts +1 -1
  289. package/build-types/h-stack/hook.d.ts +2 -2
  290. package/build-types/heading/hook.d.ts +2 -2
  291. package/build-types/input-control/index.d.ts +1 -1
  292. package/build-types/input-control/index.d.ts.map +1 -1
  293. package/build-types/input-control/input-base.d.ts.map +1 -1
  294. package/build-types/input-control/stories/index.d.ts +1 -0
  295. package/build-types/input-control/stories/index.d.ts.map +1 -1
  296. package/build-types/input-control/types.d.ts +2 -1
  297. package/build-types/input-control/types.d.ts.map +1 -1
  298. package/build-types/item-group/item/hook.d.ts +2 -2
  299. package/build-types/item-group/item-group/hook.d.ts +2 -2
  300. package/build-types/modal/index.d.ts.map +1 -1
  301. package/build-types/modal/stories/index.d.ts.map +1 -1
  302. package/build-types/navigator/navigator-back-button/hook.d.ts +3 -3
  303. package/build-types/navigator/navigator-button/hook.d.ts +3 -3
  304. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  305. package/build-types/number-control/index.d.ts +2 -2
  306. package/build-types/number-control/index.d.ts.map +1 -1
  307. package/build-types/number-control/stories/index.d.ts +25 -0
  308. package/build-types/number-control/stories/index.d.ts.map +1 -0
  309. package/build-types/number-control/styles/number-control-styles.d.ts +6 -6
  310. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  311. package/build-types/number-control/test/index.d.ts +2 -0
  312. package/build-types/number-control/test/index.d.ts.map +1 -0
  313. package/build-types/popover/index.d.ts +1 -1
  314. package/build-types/popover/index.d.ts.map +1 -1
  315. package/build-types/popover/stories/e2e/index.d.ts +1 -1
  316. package/build-types/range-control/index.d.ts +1 -1
  317. package/build-types/range-control/styles/range-control-styles.d.ts +2 -2
  318. package/build-types/resizable-box/resize-tooltip/index.d.ts +15 -19
  319. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  320. package/build-types/resizable-box/resize-tooltip/label.d.ts +4 -3
  321. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  322. package/build-types/scrollable/hook.d.ts +2 -2
  323. package/build-types/search-control/index.d.ts +1 -1
  324. package/build-types/search-control/stories/index.d.ts +2 -2
  325. package/build-types/snackbar/index.d.ts +19 -0
  326. package/build-types/snackbar/index.d.ts.map +1 -0
  327. package/build-types/snackbar/list.d.ts +18 -0
  328. package/build-types/snackbar/list.d.ts.map +1 -0
  329. package/build-types/snackbar/stories/index.d.ts +16 -0
  330. package/build-types/snackbar/stories/index.d.ts.map +1 -0
  331. package/build-types/snackbar/stories/list.d.ts +12 -0
  332. package/build-types/snackbar/stories/list.d.ts.map +1 -0
  333. package/build-types/snackbar/types.d.ts +111 -0
  334. package/build-types/snackbar/types.d.ts.map +1 -0
  335. package/build-types/spacer/hook.d.ts +2 -2
  336. package/build-types/spinner/index.d.ts +1 -1
  337. package/build-types/surface/hook.d.ts +2 -2
  338. package/build-types/tab-panel/index.d.ts +1 -1
  339. package/build-types/tab-panel/index.d.ts.map +1 -1
  340. package/build-types/tab-panel/types.d.ts +19 -1
  341. package/build-types/tab-panel/types.d.ts.map +1 -1
  342. package/build-types/text/hook.d.ts +2 -2
  343. package/build-types/text-control/index.d.ts +2 -2
  344. package/build-types/text-control/stories/index.d.ts.map +1 -1
  345. package/build-types/text-control/types.d.ts +1 -5
  346. package/build-types/text-control/types.d.ts.map +1 -1
  347. package/build-types/theme/color-algorithms.d.ts +20 -0
  348. package/build-types/theme/color-algorithms.d.ts.map +1 -0
  349. package/build-types/theme/index.d.ts +1 -1
  350. package/build-types/theme/index.d.ts.map +1 -1
  351. package/build-types/theme/stories/index.d.ts +4 -0
  352. package/build-types/theme/stories/index.d.ts.map +1 -1
  353. package/build-types/theme/styles.d.ts +3 -2
  354. package/build-types/theme/styles.d.ts.map +1 -1
  355. package/build-types/theme/test/color-algorithms.d.ts +2 -0
  356. package/build-types/theme/test/color-algorithms.d.ts.map +1 -0
  357. package/build-types/theme/types.d.ts +41 -3
  358. package/build-types/theme/types.d.ts.map +1 -1
  359. package/build-types/toggle-control/index.d.ts.map +1 -1
  360. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +2 -2
  361. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +2 -2
  362. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
  363. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  364. package/build-types/tools-panel/tools-panel/hook.d.ts +2 -2
  365. package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -2
  366. package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -2
  367. package/build-types/truncate/hook.d.ts +2 -2
  368. package/build-types/ui/context/context-system-provider.d.ts.map +1 -1
  369. package/build-types/ui/control-group/hook.d.ts +2 -2
  370. package/build-types/ui/control-label/hook.d.ts +2 -2
  371. package/build-types/ui/form-group/form-group.d.ts +2 -2
  372. package/build-types/ui/form-group/use-form-group.d.ts +5 -5
  373. package/build-types/unit-control/index.d.ts +2 -1
  374. package/build-types/unit-control/index.d.ts.map +1 -1
  375. package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -2
  376. package/build-types/unit-control/types.d.ts +4 -0
  377. package/build-types/unit-control/types.d.ts.map +1 -1
  378. package/build-types/utils/config-values.d.ts +0 -2
  379. package/build-types/utils/hooks/use-controlled-value.d.ts +2 -1
  380. package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
  381. package/build-types/v-stack/component.d.ts +2 -2
  382. package/build-types/v-stack/hook.d.ts +2 -2
  383. package/build-types/v-stack/stories/index.d.ts +2 -2
  384. package/package.json +21 -20
  385. package/src/alignment-matrix-control/README.md +7 -7
  386. package/src/alignment-matrix-control/{cell.js → cell.tsx} +7 -1
  387. package/src/alignment-matrix-control/{icon.js → icon.tsx} +6 -3
  388. package/src/alignment-matrix-control/{index.js → index.tsx} +31 -4
  389. package/src/alignment-matrix-control/stories/{index.js → index.tsx} +17 -9
  390. package/src/alignment-matrix-control/styles/{alignment-matrix-control-icon-styles.js → alignment-matrix-control-icon-styles.ts} +11 -3
  391. package/src/alignment-matrix-control/styles/{alignment-matrix-control-styles.js → alignment-matrix-control-styles.ts} +13 -3
  392. package/src/alignment-matrix-control/test/{index.js → index.tsx} +5 -5
  393. package/src/alignment-matrix-control/types.ts +54 -0
  394. package/src/alignment-matrix-control/{utils.js → utils.tsx} +24 -14
  395. package/src/angle-picker-control/styles/angle-picker-control-styles.js +4 -0
  396. package/src/autocomplete/index.js +43 -12
  397. package/src/base-control/README.md +21 -12
  398. package/src/base-control/hooks.ts +45 -0
  399. package/src/base-control/index.tsx +18 -7
  400. package/src/base-control/stories/index.tsx +8 -10
  401. package/src/base-control/test/index.tsx +52 -0
  402. package/src/base-control/types.ts +8 -2
  403. package/src/base-field/README.md +21 -22
  404. package/src/base-field/{hook.js → hook.ts} +5 -15
  405. package/src/base-field/{index.js → index.ts} +0 -0
  406. package/src/base-field/{styles.js → styles.ts} +2 -2
  407. package/src/base-field/test/__snapshots__/{index.js.snap → index.tsx.snap} +4 -4
  408. package/src/base-field/test/{index.js → index.tsx} +10 -5
  409. package/src/base-field/types.ts +29 -0
  410. package/src/border-box-control/border-box-control/README.md +1 -0
  411. package/src/border-box-control/test/index.js +3 -1
  412. package/src/border-control/border-control/component.tsx +1 -0
  413. package/src/border-control/styles.ts +1 -10
  414. package/src/box-control/linked-button.js +8 -11
  415. package/src/box-control/test/index.js +206 -135
  416. package/src/button/stories/index.js +30 -0
  417. package/src/button/style.scss +17 -14
  418. package/src/button/test/index.js +32 -15
  419. package/src/card/test/index.tsx +32 -20
  420. package/src/circular-option-picker/style.scss +1 -0
  421. package/src/color-palette/index.tsx +4 -6
  422. package/src/color-palette/stories/index.tsx +1 -5
  423. package/src/color-palette/test/__snapshots__/index.tsx.snap +4 -4
  424. package/src/color-palette/test/index.tsx +84 -36
  425. package/src/color-palette/types.ts +1 -1
  426. package/src/color-picker/README.md +1 -0
  427. package/src/color-picker/input-with-slider.tsx +1 -0
  428. package/src/color-picker/styles.ts +0 -4
  429. package/src/confirm-dialog/README.md +3 -2
  430. package/src/custom-select-control/README.md +14 -0
  431. package/src/custom-select-control/index.js +14 -2
  432. package/src/dashicon/{index.js → index.tsx} +10 -4
  433. package/src/dashicon/types.ts +17 -0
  434. package/src/date-time/date-time/index.tsx +2 -2
  435. package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -8
  436. package/src/disabled/test/index.tsx +21 -11
  437. package/src/dropdown/test/index.js +39 -49
  438. package/src/dropdown-menu/test/index.js +18 -12
  439. package/src/duotone-picker/duotone-picker.js +2 -2
  440. package/src/focal-point-picker/test/media.js +26 -21
  441. package/src/form-token-field/style.scss +1 -1
  442. package/src/gradient-picker/index.js +5 -8
  443. package/src/grid/test/grid.tsx +31 -31
  444. package/src/higher-order/navigate-regions/style.scss +2 -22
  445. package/src/higher-order/with-fallback-styles/index.js +4 -2
  446. package/src/higher-order/with-filters/test/index.js +94 -101
  447. package/src/higher-order/with-focus-return/test/index.js +1 -4
  448. package/src/index.js +2 -2
  449. package/src/input-control/index.tsx +42 -28
  450. package/src/input-control/input-base.tsx +8 -1
  451. package/src/input-control/stories/index.tsx +6 -0
  452. package/src/input-control/test/index.js +18 -0
  453. package/src/input-control/types.ts +2 -0
  454. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  455. package/src/mobile/bottom-sheet/switch-cell.native.js +2 -2
  456. package/src/mobile/global-styles-context/index.native.js +9 -11
  457. package/src/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  458. package/src/mobile/link-settings/test/edit.native.js +68 -124
  459. package/src/modal/index.tsx +11 -0
  460. package/src/modal/stories/index.tsx +3 -0
  461. package/src/modal/test/index.tsx +15 -0
  462. package/src/navigation/stories/index.js +6 -6
  463. package/src/navigation/stories/{controlled-state.js → utils/controlled-state.js} +3 -3
  464. package/src/navigation/stories/{default.js → utils/default.js} +3 -3
  465. package/src/navigation/stories/{group.js → utils/group.js} +4 -4
  466. package/src/navigation/stories/{hide-if-empty.js → utils/hide-if-empty.js} +3 -3
  467. package/src/navigation/stories/{more-examples.js → utils/more-examples.js} +4 -4
  468. package/src/navigation/stories/{search.js → utils/search.js} +5 -5
  469. package/src/navigator/navigator-provider/component.tsx +13 -10
  470. package/src/notice/test/list.js +8 -5
  471. package/src/number-control/stories/{index.js → index.tsx} +24 -7
  472. package/src/number-control/styles/{number-control-styles.js → number-control-styles.ts} +5 -3
  473. package/src/number-control/test/index.tsx +600 -0
  474. package/src/palette-edit/index.js +88 -39
  475. package/src/palette-edit/test/index.js +25 -1
  476. package/src/popover/index.tsx +10 -2
  477. package/src/popover/style.scss +12 -11
  478. package/src/popover/test/index.tsx +25 -15
  479. package/src/query-controls/index.js +1 -0
  480. package/src/range-control/test/index.tsx +57 -60
  481. package/src/resizable-box/style.scss +1 -0
  482. package/src/sandbox/test/index.js +13 -11
  483. package/src/search-control/style.scss +4 -0
  484. package/src/snackbar/README.md +63 -8
  485. package/src/snackbar/{index.js → index.tsx} +46 -28
  486. package/src/snackbar/{list.js → list.tsx} +20 -21
  487. package/src/snackbar/stories/index.tsx +96 -0
  488. package/src/snackbar/stories/list.tsx +98 -0
  489. package/src/snackbar/types.ts +116 -0
  490. package/src/tab-panel/README.md +9 -0
  491. package/src/tab-panel/index.tsx +14 -3
  492. package/src/tab-panel/style.scss +46 -34
  493. package/src/tab-panel/test/index.tsx +111 -0
  494. package/src/tab-panel/types.ts +20 -1
  495. package/src/text/test/__snapshots__/index.tsx.snap +1 -0
  496. package/src/text/test/index.tsx +98 -46
  497. package/src/text-control/stories/index.tsx +0 -1
  498. package/src/text-control/types.ts +1 -6
  499. package/src/theme/README.md +32 -2
  500. package/src/theme/color-algorithms.ts +138 -0
  501. package/src/theme/index.tsx +23 -16
  502. package/src/theme/stories/index.tsx +67 -0
  503. package/src/theme/styles.ts +22 -17
  504. package/src/theme/test/color-algorithms.ts +100 -0
  505. package/src/theme/test/index.tsx +68 -35
  506. package/src/theme/types.ts +43 -3
  507. package/src/toggle-control/index.tsx +4 -2
  508. package/src/toggle-group-control/test/index.tsx +13 -2
  509. package/src/toolbar-group/test/index.js +8 -6
  510. package/src/tools-panel/stories/index.js +1 -1
  511. package/src/tools-panel/stories/{tools-panel-with-item-group-slot.js → utils/tools-panel-with-item-group-slot.js} +14 -11
  512. package/src/tools-panel/test/index.js +20 -14
  513. package/src/tooltip/README.md +7 -0
  514. package/src/tooltip/style.scss +2 -2
  515. package/src/tooltip/test/index.js +109 -18
  516. package/src/ui/context/context-system-provider.js +3 -2
  517. package/src/ui/context/test/context-system-provider.js +5 -4
  518. package/src/ui/control-label/test/index.js +3 -5
  519. package/src/unit-control/README.md +9 -1
  520. package/src/unit-control/index.tsx +3 -0
  521. package/src/unit-control/test/index.tsx +1 -0
  522. package/src/unit-control/types.ts +4 -0
  523. package/src/utils/colors-values.js +1 -1
  524. package/src/utils/config-values.js +0 -2
  525. package/src/utils/hooks/use-controlled-value.ts +2 -2
  526. package/src/utils/theme-variables.scss +20 -0
  527. package/tsconfig.json +2 -4
  528. package/tsconfig.tsbuildinfo +1 -1
  529. package/src/number-control/test/index.js +0 -478
  530. package/src/snackbar/stories/index.js +0 -89
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/custom-select-control/index.js"],"names":["useSelect","classnames","Icon","check","__","sprintf","useCallback","useState","deprecated","VisuallyHidden","Select","SelectControlSelect","SelectControlChevronDown","InputBaseWithBackCompatMinWidth","StyledLabel","itemToString","item","name","stateReducer","selectedItem","type","changes","props","items","stateChangeTypes","ToggleButtonKeyDownArrowDown","Math","min","indexOf","length","ToggleButtonKeyDownArrowUp","max","CustomSelectControl","__next36pxDefaultSize","__nextUnconstrainedWidth","className","hideLabelFromVision","label","describedBy","options","onChange","onSelectedItemChange","size","value","_selectedItem","onMouseOver","onMouseOut","__experimentalShowSelectedHint","getLabelProps","getToggleButtonProps","getMenuProps","getItemProps","isOpen","highlightedIndex","initialSelectedItem","undefined","isFocused","setIsFocused","since","version","hint","getDescribedBy","menuProps","onKeyDownHandler","e","stopPropagation","onKeyDown","startsWith","__experimentalHint","map","index","key","style"],"mappings":";;AAAA;;AACA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,WAA1B;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,IAAT,EAAeC,KAAf,QAA4B,kBAA5B;AACA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SA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AAL,IACD;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGpD,IAAI,CAACoD,kBADR,CArBF,EAyBGpD,IAAI,KAAKG,YAAT,IACD,cAAC,IAAD;AACC,IAAA,IAAI,EAAGhB,KADR;AAEC,IAAA,SAAS,EAAC;AAFX,IA1BF,CAFD,CAFF,CAzDD,CADD;AAkGA","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport { useSelect } from 'downshift';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, check } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useState } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport { Select as SelectControlSelect } from '../select-control/styles/select-control-styles';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport { InputBaseWithBackCompatMinWidth } from './styles';\nimport { StyledLabel } from '../base-control/styles/base-control-styles';\n\nconst itemToString = ( item ) => item?.name;\n// This is needed so that in Windows, where\n// the menu does not necessarily open on\n// key up/down, you can still switch between\n// options with the menu closed.\nconst stateReducer = (\n\t{ selectedItem },\n\t{ type, changes, props: { items } }\n) => {\n\tswitch ( type ) {\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:\n\t\t\t// If we already have a selected item, try to select the next one,\n\t\t\t// without circular navigation. Otherwise, select the first item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.min(\n\t\t\t\t\t\t\t\t\titems.indexOf( selectedItem ) + 1,\n\t\t\t\t\t\t\t\t\titems.length - 1\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: 0\n\t\t\t\t\t],\n\t\t\t};\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:\n\t\t\t// If we already have a selected item, try to select the previous one,\n\t\t\t// without circular navigation. Otherwise, select the last item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.max( items.indexOf( selectedItem ) - 1, 0 )\n\t\t\t\t\t\t\t: items.length - 1\n\t\t\t\t\t],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn changes;\n\t}\n};\n\nexport default function CustomSelectControl( props ) {\n\tconst {\n\t\t/** Start opting into the larger default height that will become the default size in a future version. */\n\t\t__next36pxDefaultSize = false,\n\t\t/** Start opting into the unconstrained width that will become the default in a future version. */\n\t\t__nextUnconstrainedWidth = false,\n\t\tclassName,\n\t\thideLabelFromVision,\n\t\tlabel,\n\t\tdescribedBy,\n\t\toptions: items,\n\t\tonChange: onSelectedItemChange,\n\t\t/** @type {import('../select-control/types').SelectControlProps.size} */\n\t\tsize = 'default',\n\t\tvalue: _selectedItem,\n\t\tonMouseOver,\n\t\tonMouseOut,\n\t\t__experimentalShowSelectedHint = false,\n\t} = props;\n\n\tconst {\n\t\tgetLabelProps,\n\t\tgetToggleButtonProps,\n\t\tgetMenuProps,\n\t\tgetItemProps,\n\t\tisOpen,\n\t\thighlightedIndex,\n\t\tselectedItem,\n\t} = useSelect( {\n\t\tinitialSelectedItem: items[ 0 ],\n\t\titems,\n\t\titemToString,\n\t\tonSelectedItemChange,\n\t\t...( typeof _selectedItem !== 'undefined' && _selectedItem !== null\n\t\t\t? { selectedItem: _selectedItem }\n\t\t\t: undefined ),\n\t\tstateReducer,\n\t} );\n\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tif ( ! __nextUnconstrainedWidth ) {\n\t\tdeprecated(\n\t\t\t'Constrained width styles for wp.components.CustomSelectControl',\n\t\t\t{\n\t\t\t\tsince: '6.1',\n\t\t\t\tversion: '6.4',\n\t\t\t\thint: 'Set the `__nextUnconstrainedWidth` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t\t}\n\t\t);\n\t}\n\n\tfunction getDescribedBy() {\n\t\tif ( describedBy ) {\n\t\t\treturn describedBy;\n\t\t}\n\n\t\tif ( ! selectedItem ) {\n\t\t\treturn __( 'No selection' );\n\t\t}\n\n\t\t// translators: %s: The selected option.\n\t\treturn sprintf( __( 'Currently selected: %s' ), selectedItem.name );\n\t}\n\n\tconst menuProps = getMenuProps( {\n\t\tclassName: 'components-custom-select-control__menu',\n\t\t'aria-hidden': ! isOpen,\n\t} );\n\n\tconst onKeyDownHandler = useCallback(\n\t\t( e ) => {\n\t\t\te.stopPropagation();\n\t\t\tmenuProps?.onKeyDown?.( e );\n\t\t},\n\t\t[ menuProps ]\n\t);\n\n\t// We need this here, because the null active descendant is not fully ARIA compliant.\n\tif (\n\t\tmenuProps[ 'aria-activedescendant' ]?.startsWith( 'downshift-null' )\n\t) {\n\t\tdelete menuProps[ 'aria-activedescendant' ];\n\t}\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-custom-select-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"label\" { ...getLabelProps() }>\n\t\t\t\t\t{ label }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */\n\t\t\t\t<StyledLabel\n\t\t\t\t\t{ ...getLabelProps( {\n\t\t\t\t\t\tclassName: 'components-custom-select-control__label',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</StyledLabel>\n\t\t\t) }\n\t\t\t<InputBaseWithBackCompatMinWidth\n\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t__nextUnconstrainedWidth={ __nextUnconstrainedWidth }\n\t\t\t\tisFocused={ isOpen || isFocused }\n\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t__nextUnconstrainedWidth ? undefined : 'auto'\n\t\t\t\t}\n\t\t\t\tlabelPosition={ __nextUnconstrainedWidth ? undefined : 'top' }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ <SelectControlChevronDown /> }\n\t\t\t>\n\t\t\t\t<SelectControlSelect\n\t\t\t\t\tonMouseOver={ onMouseOver }\n\t\t\t\t\tonMouseOut={ onMouseOut }\n\t\t\t\t\tas=\"button\"\n\t\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\t{ ...getToggleButtonProps( {\n\t\t\t\t\t\t// This is needed because some speech recognition software don't support `aria-labelledby`.\n\t\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t\t'aria-labelledby': undefined,\n\t\t\t\t\t\tclassName: 'components-custom-select-control__button',\n\t\t\t\t\t\tdescribedBy: getDescribedBy(),\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ itemToString( selectedItem ) }\n\t\t\t\t\t{ __experimentalShowSelectedHint &&\n\t\t\t\t\t\tselectedItem.__experimentalHint && (\n\t\t\t\t\t\t\t<span className=\"components-custom-select-control__hint\">\n\t\t\t\t\t\t\t\t{ selectedItem.__experimentalHint }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) }\n\t\t\t\t</SelectControlSelect>\n\t\t\t</InputBaseWithBackCompatMinWidth>\n\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t<ul { ...menuProps } onKeyDown={ onKeyDownHandler }>\n\t\t\t\t{ isOpen &&\n\t\t\t\t\titems.map( ( item, index ) => (\n\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t{ ...getItemProps( {\n\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\tkey: item.key,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\titem.className,\n\t\t\t\t\t\t\t\t\t'components-custom-select-control__item',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-highlighted':\n\t\t\t\t\t\t\t\t\t\t\tindex === highlightedIndex,\n\t\t\t\t\t\t\t\t\t\t'has-hint': !! item.__experimentalHint,\n\t\t\t\t\t\t\t\t\t\t'is-next-36px-default-size':\n\t\t\t\t\t\t\t\t\t\t\t__next36pxDefaultSize,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: item.style,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.name }\n\t\t\t\t\t\t\t{ item.__experimentalHint && (\n\t\t\t\t\t\t\t\t<span className=\"components-custom-select-control__item-hint\">\n\t\t\t\t\t\t\t\t\t{ item.__experimentalHint }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ item === selectedItem && (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\t\tclassName=\"components-custom-select-control__item-icon\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/custom-select-control/index.js"],"names":["useSelect","classnames","Icon","check","__","sprintf","useCallback","useState","deprecated","VisuallyHidden","Select","SelectControlSelect","SelectControlChevronDown","InputBaseWithBackCompatMinWidth","StyledLabel","itemToString","item","name","stateReducer","selectedItem","type","changes","props","items","stateChangeTypes","ToggleButtonKeyDownArrowDown","Math","min","indexOf","length","ToggleButtonKeyDownArrowUp","max","CustomSelectControl","__next36pxDefaultSize","__nextUnconstrainedWidth","className","hideLabelFromVision","label","describedBy","options","onChange","onSelectedItemChange","size","value","_selectedItem","onMouseOver","onMouseOut","onFocus","onBlur","__experimentalShowSelectedHint","getLabelProps","getToggleButtonProps","getMenuProps","getItemProps","isOpen","highlightedIndex","initialSelectedItem","undefined","isFocused","setIsFocused","handleOnFocus","e","handleOnBlur","since","version","hint","getDescribedBy","menuProps","onKeyDownHandler","stopPropagation","onKeyDown","startsWith","__experimentalHint","map","index","key","style"],"mappings":";;AAAA;;AACA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,WAA1B;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,IAAT,EAAeC,KAAf,QAA4B,kBAA5B;AACA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASC,WAAT,EAAsBC,QAAtB,QAAsC,oBAAtC;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SAASC,MAAM,IAAIC,mBAAnB,QAA8C,gDAA9C;AACA,OAAOC,wBAAP,MAAqC,gCAArC;AACA,SAASC,+BAAT,QAAgD,UAAhD;AACA,SAASC,WAAT,QAA4B,4CAA5B;;AAEA,MAAMC,YAAY,GAAKC,IAAF,IAAYA,IAAZ,aAAYA,IAAZ,uBAAYA,IAAI,CAAEC,IAAvC,C,CACA;AACA;AACA;AACA;;;AACA,MAAMC,YAAY,GAAG,iBAGhB;AAAA,MAFJ;AAAEC,IAAAA;AAAF,GAEI;AAAA,MADJ;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,OAAR;AAAiBC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF;AAAxB,GACI;;AACJ,UAASH,IAAT;AACC,SAAKpB,SAAS,CAACwB,gBAAV,CAA2BC,4BAAhC;AACC;AACA;AACA,aAAO;AACNN,QAAAA,YAAY,EACXI,KAAK,CACJJ,YAAY,GACTO,IAAI,CAACC,GAAL,CACAJ,KAAK,CAACK,OAAN,CAAeT,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AJe;AAK1BG,IAAAA,WAAW,EAAE4B,cAAc;AALD,GAAF,CAR1B,GAgBGnD,YAAY,CAAEI,YAAF,CAhBf,EAiBG8B,8BAA8B,IAC/B9B,YAAY,CAACqD,kBADZ,IAEA;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGrD,YAAY,CAACqD,kBADhB,CAnBH,CAXD,CApBD,EAyDC,iCAASL,SAAT;AAAqB,IAAA,SAAS,EAAGC;AAAjC,MACGd,MAAM,IACP/B,KAAK,CAACkD,GAAN,CAAW,CAAEzD,IAAF,EAAQ0D,KAAR,KACV;AACA,sBACMrB,YAAY,CAAE;AAClBrC,IAAAA,IADkB;AAElB0D,IAAAA,KAFkB;AAGlBC,IAAAA,GAAG,EAAE3D,IAAI,CAAC2D,GAHQ;AAIlBxC,IAAAA,SAAS,EAAElC,UAAU,CACpBe,IAAI,CAACmB,SADe,EAEpB,wCAFoB,EAGpB;AACC,wBACCuC,KAAK,KAAKnB,gBAFZ;AAGC,kBAAY,CAAC,CAAEvC,IAAI,CAACwD,kBAHrB;AAIC,mCACCvC;AALF,KAHoB,CAJH;AAelB2C,IAAAA,KAAK,EAAE5D,IAAI,CAAC4D;AAfM,GAAF,CADlB,EAmBG5D,IAAI,CAACC,IAnBR,EAoBGD,IAAI,CAACwD,kBAAL,IACD;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGxD,IAAI,CAACwD,kBADR,CArBF,EAyBGxD,IAAI,KAAKG,YAAT,IACD,cAAC,IAAD;AACC,IAAA,IAAI,EAAGhB,KADR;AAEC,IAAA,SAAS,EAAC;AAFX,IA1BF,CAFD,CAFF,CAzDD,CADD;AAkGA","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport { useSelect } from 'downshift';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, check } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useState } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport { Select as SelectControlSelect } from '../select-control/styles/select-control-styles';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport { InputBaseWithBackCompatMinWidth } from './styles';\nimport { StyledLabel } from '../base-control/styles/base-control-styles';\n\nconst itemToString = ( item ) => item?.name;\n// This is needed so that in Windows, where\n// the menu does not necessarily open on\n// key up/down, you can still switch between\n// options with the menu closed.\nconst stateReducer = (\n\t{ selectedItem },\n\t{ type, changes, props: { items } }\n) => {\n\tswitch ( type ) {\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:\n\t\t\t// If we already have a selected item, try to select the next one,\n\t\t\t// without circular navigation. Otherwise, select the first item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.min(\n\t\t\t\t\t\t\t\t\titems.indexOf( selectedItem ) + 1,\n\t\t\t\t\t\t\t\t\titems.length - 1\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: 0\n\t\t\t\t\t],\n\t\t\t};\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:\n\t\t\t// If we already have a selected item, try to select the previous one,\n\t\t\t// without circular navigation. Otherwise, select the last item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.max( items.indexOf( selectedItem ) - 1, 0 )\n\t\t\t\t\t\t\t: items.length - 1\n\t\t\t\t\t],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn changes;\n\t}\n};\n\nexport default function CustomSelectControl( props ) {\n\tconst {\n\t\t/** Start opting into the larger default height that will become the default size in a future version. */\n\t\t__next36pxDefaultSize = false,\n\t\t/** Start opting into the unconstrained width that will become the default in a future version. */\n\t\t__nextUnconstrainedWidth = false,\n\t\tclassName,\n\t\thideLabelFromVision,\n\t\tlabel,\n\t\tdescribedBy,\n\t\toptions: items,\n\t\tonChange: onSelectedItemChange,\n\t\t/** @type {import('../select-control/types').SelectControlProps.size} */\n\t\tsize = 'default',\n\t\tvalue: _selectedItem,\n\t\tonMouseOver,\n\t\tonMouseOut,\n\t\tonFocus,\n\t\tonBlur,\n\t\t__experimentalShowSelectedHint = false,\n\t} = props;\n\n\tconst {\n\t\tgetLabelProps,\n\t\tgetToggleButtonProps,\n\t\tgetMenuProps,\n\t\tgetItemProps,\n\t\tisOpen,\n\t\thighlightedIndex,\n\t\tselectedItem,\n\t} = useSelect( {\n\t\tinitialSelectedItem: items[ 0 ],\n\t\titems,\n\t\titemToString,\n\t\tonSelectedItemChange,\n\t\t...( typeof _selectedItem !== 'undefined' && _selectedItem !== null\n\t\t\t? { selectedItem: _selectedItem }\n\t\t\t: undefined ),\n\t\tstateReducer,\n\t} );\n\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tfunction handleOnFocus( e ) {\n\t\tsetIsFocused( true );\n\t\tonFocus?.( e );\n\t}\n\n\tfunction handleOnBlur( e ) {\n\t\tsetIsFocused( false );\n\t\tonBlur?.( e );\n\t}\n\n\tif ( ! __nextUnconstrainedWidth ) {\n\t\tdeprecated(\n\t\t\t'Constrained width styles for wp.components.CustomSelectControl',\n\t\t\t{\n\t\t\t\tsince: '6.1',\n\t\t\t\tversion: '6.4',\n\t\t\t\thint: 'Set the `__nextUnconstrainedWidth` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t\t}\n\t\t);\n\t}\n\n\tfunction getDescribedBy() {\n\t\tif ( describedBy ) {\n\t\t\treturn describedBy;\n\t\t}\n\n\t\tif ( ! selectedItem ) {\n\t\t\treturn __( 'No selection' );\n\t\t}\n\n\t\t// translators: %s: The selected option.\n\t\treturn sprintf( __( 'Currently selected: %s' ), selectedItem.name );\n\t}\n\n\tconst menuProps = getMenuProps( {\n\t\tclassName: 'components-custom-select-control__menu',\n\t\t'aria-hidden': ! isOpen,\n\t} );\n\n\tconst onKeyDownHandler = useCallback(\n\t\t( e ) => {\n\t\t\te.stopPropagation();\n\t\t\tmenuProps?.onKeyDown?.( e );\n\t\t},\n\t\t[ menuProps ]\n\t);\n\n\t// We need this here, because the null active descendant is not fully ARIA compliant.\n\tif (\n\t\tmenuProps[ 'aria-activedescendant' ]?.startsWith( 'downshift-null' )\n\t) {\n\t\tdelete menuProps[ 'aria-activedescendant' ];\n\t}\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-custom-select-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"label\" { ...getLabelProps() }>\n\t\t\t\t\t{ label }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */\n\t\t\t\t<StyledLabel\n\t\t\t\t\t{ ...getLabelProps( {\n\t\t\t\t\t\tclassName: 'components-custom-select-control__label',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</StyledLabel>\n\t\t\t) }\n\t\t\t<InputBaseWithBackCompatMinWidth\n\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t__nextUnconstrainedWidth={ __nextUnconstrainedWidth }\n\t\t\t\tisFocused={ isOpen || isFocused }\n\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t__nextUnconstrainedWidth ? undefined : 'auto'\n\t\t\t\t}\n\t\t\t\tlabelPosition={ __nextUnconstrainedWidth ? undefined : 'top' }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ <SelectControlChevronDown /> }\n\t\t\t>\n\t\t\t\t<SelectControlSelect\n\t\t\t\t\tonMouseOver={ onMouseOver }\n\t\t\t\t\tonMouseOut={ onMouseOut }\n\t\t\t\t\tas=\"button\"\n\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\t{ ...getToggleButtonProps( {\n\t\t\t\t\t\t// This is needed because some speech recognition software don't support `aria-labelledby`.\n\t\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t\t'aria-labelledby': undefined,\n\t\t\t\t\t\tclassName: 'components-custom-select-control__button',\n\t\t\t\t\t\tdescribedBy: getDescribedBy(),\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ itemToString( selectedItem ) }\n\t\t\t\t\t{ __experimentalShowSelectedHint &&\n\t\t\t\t\t\tselectedItem.__experimentalHint && (\n\t\t\t\t\t\t\t<span className=\"components-custom-select-control__hint\">\n\t\t\t\t\t\t\t\t{ selectedItem.__experimentalHint }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) }\n\t\t\t\t</SelectControlSelect>\n\t\t\t</InputBaseWithBackCompatMinWidth>\n\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t<ul { ...menuProps } onKeyDown={ onKeyDownHandler }>\n\t\t\t\t{ isOpen &&\n\t\t\t\t\titems.map( ( item, index ) => (\n\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t{ ...getItemProps( {\n\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\tkey: item.key,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\titem.className,\n\t\t\t\t\t\t\t\t\t'components-custom-select-control__item',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-highlighted':\n\t\t\t\t\t\t\t\t\t\t\tindex === highlightedIndex,\n\t\t\t\t\t\t\t\t\t\t'has-hint': !! item.__experimentalHint,\n\t\t\t\t\t\t\t\t\t\t'is-next-36px-default-size':\n\t\t\t\t\t\t\t\t\t\t\t__next36pxDefaultSize,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: item.style,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.name }\n\t\t\t\t\t\t\t{ item.__experimentalHint && (\n\t\t\t\t\t\t\t\t<span className=\"components-custom-select-control__item-hint\">\n\t\t\t\t\t\t\t\t\t{ item.__experimentalHint }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ item === selectedItem && (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\t\tclassName=\"components-custom-select-control__item-icon\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n}\n"]}
@@ -9,11 +9,8 @@ import { createElement } from "@wordpress/element";
9
9
  * @property {number} [size] Size of the icon
10
10
  */
11
11
 
12
- /** @typedef {import('react').ComponentPropsWithoutRef<'span'> & OwnProps} Props */
13
-
14
12
  /**
15
- * @param {Props} props
16
- * @return {JSX.Element} Element
13
+ * Internal dependencies
17
14
  */
18
15
  function Dashicon(_ref) {
19
16
  let {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/dashicon/index.js"],"names":["Dashicon","icon","className","size","style","extraProps","iconClass","filter","Boolean","join","sizeStyles","fontSize","width","height","styles"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;;AAEA;AACA;AACA;AACA;AAEA,SAASA,QAAT,OAA+E;AAAA,MAA5D;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,SAAR;AAAmBC,IAAAA,IAAI,GAAG,EAA1B;AAA8BC,IAAAA,KAAK,GAAG,EAAtC;AAA0C,OAAGC;AAA7C,GAA4D;AAC9E,QAAMC,SAAS,GAAG,CACjB,UADiB,EAEjB,WAFiB,EAGjB,eAAeL,IAHE,EAIjBC,SAJiB,EAMhBK,MANgB,CAMRC,OANQ,EAOhBC,IAPgB,CAOV,GAPU,CAAlB,CAD8E,CAU9E;;AACA,QAAMC,UAAU,GACf;AACA;AACA,QAAMP,IAAN,GACG;AACAQ,IAAAA,QAAQ,EAAG,GAAGR,IAAM,IADpB;AAEAS,IAAAA,KAAK,EAAG,GAAGT,IAAM,IAFjB;AAGAU,IAAAA,MAAM,EAAG,GAAGV,IAAM;AAHlB,GADH,GAMG,EATJ;AAWA,QAAMW,MAAM,GAAG,EACd,GAAGJ,UADW;AAEd,OAAGN;AAFW,GAAf;AAKA,SAAO;AAAM,IAAA,SAAS,EAAGE,SAAlB;AAA8B,IAAA,KAAK,EAAGQ;AAAtC,KAAoDT,UAApD,EAAP;AACA;;AAED,eAAeL,QAAf","sourcesContent":["/**\n * @typedef OwnProps\n *\n * @property {import('./types').IconKey} icon Icon name\n * @property {string} [className] Class name\n * @property {number} [size] Size of the icon\n */\n/** @typedef {import('react').ComponentPropsWithoutRef<'span'> & OwnProps} Props */\n\n/**\n * @param {Props} props\n * @return {JSX.Element} Element\n */\n\nfunction Dashicon( { icon, className, size = 20, style = {}, ...extraProps } ) {\n\tconst iconClass = [\n\t\t'dashicon',\n\t\t'dashicons',\n\t\t'dashicons-' + icon,\n\t\tclassName,\n\t]\n\t\t.filter( Boolean )\n\t\t.join( ' ' );\n\n\t// For retro-compatibility reasons (for example if people are overriding icon size with CSS), we add inline styles just if the size is different to the default\n\tconst sizeStyles =\n\t\t// using `!=` to catch both 20 and \"20\"\n\t\t// eslint-disable-next-line eqeqeq\n\t\t20 != size\n\t\t\t? {\n\t\t\t\t\tfontSize: `${ size }px`,\n\t\t\t\t\twidth: `${ size }px`,\n\t\t\t\t\theight: `${ size }px`,\n\t\t\t }\n\t\t\t: {};\n\n\tconst styles = {\n\t\t...sizeStyles,\n\t\t...style,\n\t};\n\n\treturn <span className={ iconClass } style={ styles } { ...extraProps } />;\n}\n\nexport default Dashicon;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/dashicon/index.tsx"],"names":["Dashicon","icon","className","size","style","extraProps","iconClass","filter","Boolean","join","sizeStyles","fontSize","width","height","styles"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAIA,SAASA,QAAT,OAM6D;AAAA,MAN1C;AAClBC,IAAAA,IADkB;AAElBC,IAAAA,SAFkB;AAGlBC,IAAAA,IAAI,GAAG,EAHW;AAIlBC,IAAAA,KAAK,GAAG,EAJU;AAKlB,OAAGC;AALe,GAM0C;AAC5D,QAAMC,SAAS,GAAG,CACjB,UADiB,EAEjB,WAFiB,EAGjB,eAAeL,IAHE,EAIjBC,SAJiB,EAMhBK,MANgB,CAMRC,OANQ,EAOhBC,IAPgB,CAOV,GAPU,CAAlB,CAD4D,CAU5D;;AACA,QAAMC,UAAU,GACf;AACA;AACA,QAAMP,IAAN,GACG;AACAQ,IAAAA,QAAQ,EAAG,GAAGR,IAAM,IADpB;AAEAS,IAAAA,KAAK,EAAG,GAAGT,IAAM,IAFjB;AAGAU,IAAAA,MAAM,EAAG,GAAGV,IAAM;AAHlB,GADH,GAMG,EATJ;AAWA,QAAMW,MAAM,GAAG,EACd,GAAGJ,UADW;AAEd,OAAGN;AAFW,GAAf;AAKA,SAAO;AAAM,IAAA,SAAS,EAAGE,SAAlB;AAA8B,IAAA,KAAK,EAAGQ;AAAtC,KAAoDT,UAApD,EAAP;AACA;;AAED,eAAeL,QAAf","sourcesContent":["/**\n * @typedef OwnProps\n *\n * @property {import('./types').IconKey} icon Icon name\n * @property {string} [className] Class name\n * @property {number} [size] Size of the icon\n */\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { DashiconProps } from './types';\n\nfunction Dashicon( {\n\ticon,\n\tclassName,\n\tsize = 20,\n\tstyle = {},\n\t...extraProps\n}: WordPressComponentProps< DashiconProps, 'span', false > ) {\n\tconst iconClass = [\n\t\t'dashicon',\n\t\t'dashicons',\n\t\t'dashicons-' + icon,\n\t\tclassName,\n\t]\n\t\t.filter( Boolean )\n\t\t.join( ' ' );\n\n\t// For retro-compatibility reasons (for example if people are overriding icon size with CSS), we add inline styles just if the size is different to the default\n\tconst sizeStyles =\n\t\t// using `!=` to catch both 20 and \"20\"\n\t\t// eslint-disable-next-line eqeqeq\n\t\t20 != size\n\t\t\t? {\n\t\t\t\t\tfontSize: `${ size }px`,\n\t\t\t\t\twidth: `${ size }px`,\n\t\t\t\t\theight: `${ size }px`,\n\t\t\t }\n\t\t\t: {};\n\n\tconst styles = {\n\t\t...sizeStyles,\n\t\t...style,\n\t};\n\n\treturn <span className={ iconClass } style={ styles } { ...extraProps } />;\n}\n\nexport default Dashicon;\n"]}
@@ -41,8 +41,8 @@ function UnforwardedDateTimePicker(_ref, ref) {
41
41
  if (!__nextRemoveHelpButton) {
42
42
  deprecated('Help button in wp.components.DateTimePicker', {
43
43
  since: '13.4',
44
- version: '14.6',
45
- // Six months of plugin releases.
44
+ version: '15.8',
45
+ // One year of plugin releases.
46
46
  hint: 'Set the `__nextRemoveHelpButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.'
47
47
  });
48
48
  }
@@ -50,8 +50,8 @@ function UnforwardedDateTimePicker(_ref, ref) {
50
50
  if (!__nextRemoveResetButton) {
51
51
  deprecated('Reset button in wp.components.DateTimePicker', {
52
52
  since: '13.4',
53
- version: '14.6',
54
- // Six months of plugin releases.
53
+ version: '15.8',
54
+ // One year of plugin releases.
55
55
  hint: 'Set the `__nextRemoveResetButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.'
56
56
  });
57
57
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/date-time/date-time/index.tsx"],"names":["useState","forwardRef","__","_x","deprecated","Button","default","DatePicker","TimePicker","Wrapper","CalendarHelp","HStack","Heading","Spacer","noop","UnforwardedDateTimePicker","ref","currentDate","is12Hour","isInvalidDate","onMonthPreviewed","onChange","events","startOfWeek","__nextRemoveHelpButton","__nextRemoveResetButton","since","version","hint","calendarHelpIsVisible","setCalendarHelpIsVisible","onClickDescriptionToggle","DateTimePicker"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,UAAnB,QAAqC,oBAArC;AACA,SAASC,EAAT,EAAaC,EAAb,QAAuB,iBAAvB;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,SAASC,OAAO,IAAIC,UAApB,QAAsC,SAAtC;AACA,SAASD,OAAO,IAAIE,UAApB,QAAsC,SAAtC;AAEA,SAASC,OAAT,EAAkBC,YAAlB,QAAsC,UAAtC;AACA,SAASC,MAAT,QAAuB,eAAvB;AACA,SAASC,OAAT,QAAwB,eAAxB;AACA,SAASC,MAAT,QAAuB,cAAvB;AAEA,SAASN,UAAT,EAAqBC,UAArB;;AAEA,MAAMM,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,SAASC,yBAAT,OAYCC,GAZD,EAaE;AAAA,MAZD;AACCC,IAAAA,WADD;AAECC,IAAAA,QAFD;AAGCC,IAAAA,aAHD;AAICC,IAAAA,gBAAgB,GAAGN,IAJpB;AAKCO,IAAAA,QALD;AAMCC,IAAAA,MAND;AAOCC,IAAAA,WAPD;AAQCC,IAAAA,sBAAsB,GAAG,KAR1B;AASCC,IAAAA,uBAAuB,GAAG;AAT3B,GAYC;;AACD,MAAK,CAAED,sBAAP,EAAgC;AAC/BpB,IAAAA,UAAU,CAAE,6CAAF,EAAiD;AAC1DsB,MAAAA,KAAK,EAAE,MADmD;AAE1DC,MAAAA,OAAO,EAAE,MAFiD;AAEzC;AACjBC,MAAAA,IAAI,EAAE;AAHoD,KAAjD,CAAV;AAKA;;AACD,MAAK,CAAEH,uBAAP,EAAiC;AAChCrB,IAAA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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAM8B,cAAc,GAAG/B,UAAU,CAAEc,yBAAF,CAAjC;AAEP,eAAeiB,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useState, forwardRef } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport type { DateTimePickerProps } from '../types';\nimport { Wrapper, CalendarHelp } from './styles';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { Spacer } from '../../spacer';\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\t__nextRemoveHelpButton = false,\n\t\t__nextRemoveResetButton = false,\n\t}: DateTimePickerProps,\n\tref: ForwardedRef< any >\n) {\n\tif ( ! __nextRemoveHelpButton ) {\n\t\tdeprecated( 'Help button in wp.components.DateTimePicker', {\n\t\t\tsince: '13.4',\n\t\t\tversion: '14.6', // Six months of plugin releases.\n\t\t\thint: 'Set the `__nextRemoveHelpButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',\n\t\t} );\n\t}\n\tif ( ! __nextRemoveResetButton ) {\n\t\tdeprecated( 'Reset button in wp.components.DateTimePicker', {\n\t\t\tsince: '13.4',\n\t\t\tversion: '14.6', // Six months of plugin releases.\n\t\t\thint: 'Set the `__nextRemoveResetButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',\n\t\t} );\n\t}\n\n\tconst [ calendarHelpIsVisible, setCalendarHelpIsVisible ] =\n\t\tuseState( false );\n\n\tfunction onClickDescriptionToggle() {\n\t\tsetCalendarHelpIsVisible( ! calendarHelpIsVisible );\n\t}\n\n\treturn (\n\t\t<Wrapper ref={ ref } className=\"components-datetime\" spacing={ 4 }>\n\t\t\t{ ! calendarHelpIsVisible && (\n\t\t\t\t<>\n\t\t\t\t\t<TimePicker\n\t\t\t\t\t\tcurrentTime={ currentDate }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tis12Hour={ is12Hour }\n\t\t\t\t\t/>\n\t\t\t\t\t<DatePicker\n\t\t\t\t\t\tcurrentDate={ currentDate }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisInvalidDate={ isInvalidDate }\n\t\t\t\t\t\tevents={ events }\n\t\t\t\t\t\tonMonthPreviewed={ onMonthPreviewed }\n\t\t\t\t\t\tstartOfWeek={ startOfWeek }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ calendarHelpIsVisible && (\n\t\t\t\t<CalendarHelp\n\t\t\t\t\tclassName=\"components-datetime__calendar-help\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t<Heading level={ 4 }>{ __( 'Click to Select' ) }</Heading>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Click the right or left arrows to select other months in the past or the future.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>{ __( 'Click the desired day to select it.' ) }</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<Heading level={ 4 }>\n\t\t\t\t\t\t{ __( 'Navigating with a keyboard' ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr\n\t\t\t\t\t\t\t\taria-label={ _x( 'Enter', 'keyboard button' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t↵\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>{ __( 'Select the date in focus.' ) }</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Left and Right Arrows' ) }>\n\t\t\t\t\t\t\t\t←/→\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (left) or forward (right) by one day.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Up and Down Arrows' ) }>\n\t\t\t\t\t\t\t\t↑/↓\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (up) or forward (down) by one week.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Page Up and Page Down' ) }>\n\t\t\t\t\t\t\t\t{ __( 'PgUp/PgDn' ) }\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (PgUp) or forward (PgDn) by one month.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Home and End' ) }>\n\t\t\t\t\t\t\t\t{ /* Translators: Home/End reffer to the 'Home' and 'End' buttons on the keyboard.*/ }\n\t\t\t\t\t\t\t\t{ __( 'Home/End' ) }\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Go to the first (Home) or last (End) day of a week.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</CalendarHelp>\n\t\t\t) }\n\t\t\t{ ( ! __nextRemoveResetButton || ! __nextRemoveHelpButton ) && (\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__buttons\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ ! __nextRemoveResetButton &&\n\t\t\t\t\t\t! calendarHelpIsVisible &&\n\t\t\t\t\t\tcurrentDate && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"components-datetime__date-reset-button\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\tonClick={ () => onChange?.( null ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t<Spacer />\n\t\t\t\t\t{ ! __nextRemoveHelpButton && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-datetime__date-help-toggle\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ onClickDescriptionToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ calendarHelpIsVisible\n\t\t\t\t\t\t\t\t? __( 'Close' )\n\t\t\t\t\t\t\t\t: __( 'Calendar Help' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\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 * __nextRemoveHelpButton\n * __nextRemoveResetButton\n * />\n * );\n * };\n * ```\n */\nexport const DateTimePicker = forwardRef( UnforwardedDateTimePicker );\n\nexport default DateTimePicker;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/date-time/date-time/index.tsx"],"names":["useState","forwardRef","__","_x","deprecated","Button","default","DatePicker","TimePicker","Wrapper","CalendarHelp","HStack","Heading","Spacer","noop","UnforwardedDateTimePicker","ref","currentDate","is12Hour","isInvalidDate","onMonthPreviewed","onChange","events","startOfWeek","__nextRemoveHelpButton","__nextRemoveResetButton","since","version","hint","calendarHelpIsVisible","setCalendarHelpIsVisible","onClickDescriptionToggle","DateTimePicker"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,UAAnB,QAAqC,oBAArC;AACA,SAASC,EAAT,EAAaC,EAAb,QAAuB,iBAAvB;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,SAASC,OAAO,IAAIC,UAApB,QAAsC,SAAtC;AACA,SAASD,OAAO,IAAIE,UAApB,QAAsC,SAAtC;AAEA,SAASC,OAAT,EAAkBC,YAAlB,QAAsC,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AAI;AANN,IAQGA,EAAE,CACH,qDADG,CARL,CA7CD,CAfD,CAnBF,EA8FG,CAAE,CAAEuB,uBAAF,IAA6B,CAAED,sBAAjC,KACD,cAAC,MAAD;AACC,IAAA,SAAS,EAAC,8BADX,CAC0C;;AAD1C,KAGG,CAAEC,uBAAF,IACD,CAAEI,qBADD,IAEDZ,WAFC,IAGA,cAAC,MAAD;AACC,IAAA,SAAS,EAAC,wCADX,CACoD;AADpD;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,IAAA,OAAO,EAAG,MAAMI,QAAN,aAAMA,QAAN,uBAAMA,QAAQ,CAAI,IAAJ;AAHzB,KAKGnB,EAAE,CAAE,OAAF,CALL,CANH,EAcC,cAAC,MAAD,OAdD,EAeG,CAAEsB,sBAAF,IACD,cAAC,MAAD;AACC,IAAA,SAAS,EAAC,uCADX,CACmD;AADnD;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,IAAA,OAAO,EAAGO;AAHX,KAKGF,qBAAqB,GACpB3B,EAAE,CAAE,OAAF,CADkB,GAEpBA,EAAE,CAAE,eAAF,CAPN,CAhBF,CA/FF,CADD;AA8HA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAM8B,cAAc,GAAG/B,UAAU,CAAEc,yBAAF,CAAjC;AAEP,eAAeiB,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useState, forwardRef } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport type { DateTimePickerProps } from '../types';\nimport { Wrapper, CalendarHelp } from './styles';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { Spacer } from '../../spacer';\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\t__nextRemoveHelpButton = false,\n\t\t__nextRemoveResetButton = false,\n\t}: DateTimePickerProps,\n\tref: ForwardedRef< any >\n) {\n\tif ( ! __nextRemoveHelpButton ) {\n\t\tdeprecated( 'Help button in wp.components.DateTimePicker', {\n\t\t\tsince: '13.4',\n\t\t\tversion: '15.8', // One year of plugin releases.\n\t\t\thint: 'Set the `__nextRemoveHelpButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',\n\t\t} );\n\t}\n\tif ( ! __nextRemoveResetButton ) {\n\t\tdeprecated( 'Reset button in wp.components.DateTimePicker', {\n\t\t\tsince: '13.4',\n\t\t\tversion: '15.8', // One year of plugin releases.\n\t\t\thint: 'Set the `__nextRemoveResetButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',\n\t\t} );\n\t}\n\n\tconst [ calendarHelpIsVisible, setCalendarHelpIsVisible ] =\n\t\tuseState( false );\n\n\tfunction onClickDescriptionToggle() {\n\t\tsetCalendarHelpIsVisible( ! calendarHelpIsVisible );\n\t}\n\n\treturn (\n\t\t<Wrapper ref={ ref } className=\"components-datetime\" spacing={ 4 }>\n\t\t\t{ ! calendarHelpIsVisible && (\n\t\t\t\t<>\n\t\t\t\t\t<TimePicker\n\t\t\t\t\t\tcurrentTime={ currentDate }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tis12Hour={ is12Hour }\n\t\t\t\t\t/>\n\t\t\t\t\t<DatePicker\n\t\t\t\t\t\tcurrentDate={ currentDate }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisInvalidDate={ isInvalidDate }\n\t\t\t\t\t\tevents={ events }\n\t\t\t\t\t\tonMonthPreviewed={ onMonthPreviewed }\n\t\t\t\t\t\tstartOfWeek={ startOfWeek }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ calendarHelpIsVisible && (\n\t\t\t\t<CalendarHelp\n\t\t\t\t\tclassName=\"components-datetime__calendar-help\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t<Heading level={ 4 }>{ __( 'Click to Select' ) }</Heading>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Click the right or left arrows to select other months in the past or the future.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>{ __( 'Click the desired day to select it.' ) }</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<Heading level={ 4 }>\n\t\t\t\t\t\t{ __( 'Navigating with a keyboard' ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr\n\t\t\t\t\t\t\t\taria-label={ _x( 'Enter', 'keyboard button' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t↵\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>{ __( 'Select the date in focus.' ) }</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Left and Right Arrows' ) }>\n\t\t\t\t\t\t\t\t←/→\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (left) or forward (right) by one day.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Up and Down Arrows' ) }>\n\t\t\t\t\t\t\t\t↑/↓\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (up) or forward (down) by one week.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Page Up and Page Down' ) }>\n\t\t\t\t\t\t\t\t{ __( 'PgUp/PgDn' ) }\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (PgUp) or forward (PgDn) by one month.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Home and End' ) }>\n\t\t\t\t\t\t\t\t{ /* Translators: Home/End reffer to the 'Home' and 'End' buttons on the keyboard.*/ }\n\t\t\t\t\t\t\t\t{ __( 'Home/End' ) }\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Go to the first (Home) or last (End) day of a week.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</CalendarHelp>\n\t\t\t) }\n\t\t\t{ ( ! __nextRemoveResetButton || ! __nextRemoveHelpButton ) && (\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__buttons\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ ! __nextRemoveResetButton &&\n\t\t\t\t\t\t! calendarHelpIsVisible &&\n\t\t\t\t\t\tcurrentDate && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"components-datetime__date-reset-button\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\tonClick={ () => onChange?.( null ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t<Spacer />\n\t\t\t\t\t{ ! __nextRemoveHelpButton && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-datetime__date-help-toggle\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ onClickDescriptionToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ calendarHelpIsVisible\n\t\t\t\t\t\t\t\t? __( 'Close' )\n\t\t\t\t\t\t\t\t: __( 'Calendar Help' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\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 * __nextRemoveHelpButton\n * __nextRemoveResetButton\n * />\n * );\n * };\n * ```\n */\nexport const DateTimePicker = forwardRef( UnforwardedDateTimePicker );\n\nexport default DateTimePicker;\n"]}
@@ -3,7 +3,7 @@ import { createElement } from "@wordpress/element";
3
3
  /**
4
4
  * External dependencies
5
5
  */
6
- import { isEqual } from 'lodash';
6
+ import fastDeepEqual from 'fast-deep-equal/es6';
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
@@ -58,7 +58,7 @@ function DuotonePicker(_ref) {
58
58
  __('Duotone code: %s'), slug);
59
59
  const label = name ? sprintf( // translators: %s: The name of the option e.g: "Dark grayscale".
60
60
  __('Duotone: %s'), name) : tooltipText;
61
- const isSelected = isEqual(colors, value);
61
+ const isSelected = fastDeepEqual(colors, value);
62
62
  return createElement(CircularOptionPicker.Option, {
63
63
  key: slug,
64
64
  value: colors,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/duotone-picker/duotone-picker.js"],"names":["isEqual","useMemo","__","sprintf","ColorListPicker","CircularOptionPicker","VStack","CustomDuotoneBar","getDefaultColors","getGradientFromCSSColors","Spacer","DuotonePicker","clearable","unsetable","colorPalette","duotonePalette","disableCustomColors","disableCustomDuotone","value","onChange","defaultDark","defaultLight","isUnset","unsetOption","undefined","options","map","colors","slug","name","style","background","color","tooltipText","label","isSelected","newColors","newValue","length"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,QAAxB;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AAEA;AACA;AACA;;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,SAASC,MAAT,QAAuB,YAAvB;AAEA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,SAASC,gBAAT,EAA2BC,wBAA3B,QAA2D,SAA3D;AACA,SAASC,MAAT,QAAuB,WAAvB;;AAEA,SAASC,aAAT,OASI;AAAA,MAToB;AACvBC,IAAAA,SAAS,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,MALZ;AAMC,IAAA,QAAQ,EAAKoB,SAAF,IAAiB;AAC3B,UAAK,CAAEA,SAAS,CAAE,CAAF,CAAhB,EAAwB;AACvBA,QAAAA,SAAS,CAAE,CAAF,CAAT,GAAiBhB,WAAjB;AACA;;AACD,UAAK,CAAEgB,SAAS,CAAE,CAAF,CAAhB,EAAwB;AACvBA,QAAAA,SAAS,CAAE,CAAF,CAAT,GAAiBf,YAAjB;AACA;;AACD,YAAMgB,QAAQ,GACbD,SAAS,CAACE,MAAV,IAAoB,CAApB,GACGF,SADH,GAEGZ,SAHJ;AAIAL,MAAAA,QAAQ,CAAEkB,QAAF,CAAR;AACA;AAlBF,IARF,CADD,CAZD,CADD;AA+CA;;AAED,eAAe1B,aAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { isEqual } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorListPicker from '../color-list-picker';\nimport CircularOptionPicker from '../circular-option-picker';\nimport { VStack } from '../v-stack';\n\nimport CustomDuotoneBar from './custom-duotone-bar';\nimport { getDefaultColors, getGradientFromCSSColors } from './utils';\nimport { Spacer } from '../spacer';\n\nfunction DuotonePicker( {\n\tclearable = true,\n\tunsetable = true,\n\tcolorPalette,\n\tduotonePalette,\n\tdisableCustomColors,\n\tdisableCustomDuotone,\n\tvalue,\n\tonChange,\n} ) {\n\tconst [ defaultDark, defaultLight ] = useMemo(\n\t\t() => getDefaultColors( colorPalette ),\n\t\t[ colorPalette ]\n\t);\n\n\tconst isUnset = value === 'unset';\n\n\tconst unsetOption = (\n\t\t<CircularOptionPicker.Option\n\t\t\tkey=\"unset\"\n\t\t\tvalue=\"unset\"\n\t\t\tisSelected={ isUnset }\n\t\t\ttooltipText={ __( 'Unset' ) }\n\t\t\tclassName=\"components-duotone-picker__color-indicator\"\n\t\t\tonClick={ () => {\n\t\t\t\tonChange( isUnset ? undefined : 'unset' );\n\t\t\t} }\n\t\t/>\n\t);\n\n\tconst options = duotonePalette.map( ( { colors, slug, name } ) => {\n\t\tconst style = {\n\t\t\tbackground: getGradientFromCSSColors( colors, '135deg' ),\n\t\t\tcolor: 'transparent',\n\t\t};\n\t\tconst tooltipText =\n\t\t\tname ??\n\t\t\tsprintf(\n\t\t\t\t// translators: %s: duotone code e.g: \"dark-grayscale\" or \"7f7f7f-ffffff\".\n\t\t\t\t__( 'Duotone code: %s' ),\n\t\t\t\tslug\n\t\t\t);\n\t\tconst label = name\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %s: The name of the option e.g: \"Dark grayscale\".\n\t\t\t\t\t__( 'Duotone: %s' ),\n\t\t\t\t\tname\n\t\t\t )\n\t\t\t: tooltipText;\n\t\tconst isSelected = isEqual( colors, value );\n\n\t\treturn (\n\t\t\t<CircularOptionPicker.Option\n\t\t\t\tkey={ slug }\n\t\t\t\tvalue={ colors }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\taria-label={ label }\n\t\t\t\ttooltipText={ tooltipText }\n\t\t\t\tstyle={ style }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tonChange( isSelected ? undefined : colors );\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t} );\n\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\toptions={ unsetable ? [ unsetOption, ...options ] : options }\n\t\t\tactions={\n\t\t\t\t!! clearable && (\n\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\tonClick={ () => onChange( undefined ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t</CircularOptionPicker.ButtonAction>\n\t\t\t\t)\n\t\t\t}\n\t\t>\n\t\t\t<Spacer paddingTop={ 4 }>\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t{ ! disableCustomColors && ! disableCustomDuotone && (\n\t\t\t\t\t\t<CustomDuotoneBar\n\t\t\t\t\t\t\tvalue={ isUnset ? undefined : value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! disableCustomDuotone && (\n\t\t\t\t\t\t<ColorListPicker\n\t\t\t\t\t\t\tlabels={ [ __( 'Shadows' ), __( 'Highlights' ) ] }\n\t\t\t\t\t\t\tcolors={ colorPalette }\n\t\t\t\t\t\t\tvalue={ isUnset ? undefined : value }\n\t\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\t\tenableAlpha\n\t\t\t\t\t\t\tonChange={ ( newColors ) => {\n\t\t\t\t\t\t\t\tif ( ! newColors[ 0 ] ) {\n\t\t\t\t\t\t\t\t\tnewColors[ 0 ] = defaultDark;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( ! newColors[ 1 ] ) {\n\t\t\t\t\t\t\t\t\tnewColors[ 1 ] = defaultLight;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tconst newValue =\n\t\t\t\t\t\t\t\t\tnewColors.length >= 2\n\t\t\t\t\t\t\t\t\t\t? newColors\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\tonChange( newValue );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t</Spacer>\n\t\t</CircularOptionPicker>\n\t);\n}\n\nexport default DuotonePicker;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/duotone-picker/duotone-picker.js"],"names":["fastDeepEqual","useMemo","__","sprintf","ColorListPicker","CircularOptionPicker","VStack","CustomDuotoneBar","getDefaultColors","getGradientFromCSSColors","Spacer","DuotonePicker","clearable","unsetable","colorPalette","duotonePalette","disableCustomColors","disableCustomDuotone","value","onChange","defaultDark","defaultLight","isUnset","unsetOption","undefined","options","map","colors","slug","name","style","background","color","tooltipText","label","isSelected","newColors","newValue","length"],"mappings":";;AAAA;AACA;AACA;AACA,OA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AAyB,CAAEC,oBAA3B,IACD,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGK,OAAO,GAAGE,SAAH,GAAeN,KAD/B;AAEC,IAAA,QAAQ,EAAGC;AAFZ,IAFF,EAOG,CAAEF,oBAAF,IACD,cAAC,eAAD;AACC,IAAA,MAAM,EAAG,CAAEf,EAAE,CAAE,SAAF,CAAJ,EAAmBA,EAAE,CAAE,YAAF,CAArB,CADV;AAEC,IAAA,MAAM,EAAGY,YAFV;AAGC,IAAA,KAAK,EAAGQ,OAAO,GAAGE,SAAH,GAAeN,KAH/B;AAIC,IAAA,mBAAmB,EAAGF,mBAJvB;AAKC,IAAA,WAAW,MALZ;AAMC,IAAA,QAAQ,EAAKoB,SAAF,IAAiB;AAC3B,UAAK,CAAEA,SAAS,CAAE,CAAF,CAAhB,EAAwB;AACvBA,QAAAA,SAAS,CAAE,CAAF,CAAT,GAAiBhB,WAAjB;AACA;;AACD,UAAK,CAAEgB,SAAS,CAAE,CAAF,CAAhB,EAAwB;AACvBA,QAAAA,SAAS,CAAE,CAAF,CAAT,GAAiBf,YAAjB;AACA;;AACD,YAAMgB,QAAQ,GACbD,SAAS,CAACE,MAAV,IAAoB,CAApB,GACGF,SADH,GAEGZ,SAHJ;AAIAL,MAAAA,QAAQ,CAAEkB,QAAF,CAAR;AACA;AAlBF,IARF,CADD,CAZD,CADD;AA+CA;;AAED,eAAe1B,aAAf","sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorListPicker from '../color-list-picker';\nimport CircularOptionPicker from '../circular-option-picker';\nimport { VStack } from '../v-stack';\n\nimport CustomDuotoneBar from './custom-duotone-bar';\nimport { getDefaultColors, getGradientFromCSSColors } from './utils';\nimport { Spacer } from '../spacer';\n\nfunction DuotonePicker( {\n\tclearable = true,\n\tunsetable = true,\n\tcolorPalette,\n\tduotonePalette,\n\tdisableCustomColors,\n\tdisableCustomDuotone,\n\tvalue,\n\tonChange,\n} ) {\n\tconst [ defaultDark, defaultLight ] = useMemo(\n\t\t() => getDefaultColors( colorPalette ),\n\t\t[ colorPalette ]\n\t);\n\n\tconst isUnset = value === 'unset';\n\n\tconst unsetOption = (\n\t\t<CircularOptionPicker.Option\n\t\t\tkey=\"unset\"\n\t\t\tvalue=\"unset\"\n\t\t\tisSelected={ isUnset }\n\t\t\ttooltipText={ __( 'Unset' ) }\n\t\t\tclassName=\"components-duotone-picker__color-indicator\"\n\t\t\tonClick={ () => {\n\t\t\t\tonChange( isUnset ? undefined : 'unset' );\n\t\t\t} }\n\t\t/>\n\t);\n\n\tconst options = duotonePalette.map( ( { colors, slug, name } ) => {\n\t\tconst style = {\n\t\t\tbackground: getGradientFromCSSColors( colors, '135deg' ),\n\t\t\tcolor: 'transparent',\n\t\t};\n\t\tconst tooltipText =\n\t\t\tname ??\n\t\t\tsprintf(\n\t\t\t\t// translators: %s: duotone code e.g: \"dark-grayscale\" or \"7f7f7f-ffffff\".\n\t\t\t\t__( 'Duotone code: %s' ),\n\t\t\t\tslug\n\t\t\t);\n\t\tconst label = name\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %s: The name of the option e.g: \"Dark grayscale\".\n\t\t\t\t\t__( 'Duotone: %s' ),\n\t\t\t\t\tname\n\t\t\t )\n\t\t\t: tooltipText;\n\t\tconst isSelected = fastDeepEqual( colors, value );\n\n\t\treturn (\n\t\t\t<CircularOptionPicker.Option\n\t\t\t\tkey={ slug }\n\t\t\t\tvalue={ colors }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\taria-label={ label }\n\t\t\t\ttooltipText={ tooltipText }\n\t\t\t\tstyle={ style }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tonChange( isSelected ? undefined : colors );\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t} );\n\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\toptions={ unsetable ? [ unsetOption, ...options ] : options }\n\t\t\tactions={\n\t\t\t\t!! clearable && (\n\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\tonClick={ () => onChange( undefined ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t</CircularOptionPicker.ButtonAction>\n\t\t\t\t)\n\t\t\t}\n\t\t>\n\t\t\t<Spacer paddingTop={ 4 }>\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t{ ! disableCustomColors && ! disableCustomDuotone && (\n\t\t\t\t\t\t<CustomDuotoneBar\n\t\t\t\t\t\t\tvalue={ isUnset ? undefined : value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! disableCustomDuotone && (\n\t\t\t\t\t\t<ColorListPicker\n\t\t\t\t\t\t\tlabels={ [ __( 'Shadows' ), __( 'Highlights' ) ] }\n\t\t\t\t\t\t\tcolors={ colorPalette }\n\t\t\t\t\t\t\tvalue={ isUnset ? undefined : value }\n\t\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\t\tenableAlpha\n\t\t\t\t\t\t\tonChange={ ( newColors ) => {\n\t\t\t\t\t\t\t\tif ( ! newColors[ 0 ] ) {\n\t\t\t\t\t\t\t\t\tnewColors[ 0 ] = defaultDark;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( ! newColors[ 1 ] ) {\n\t\t\t\t\t\t\t\t\tnewColors[ 1 ] = defaultLight;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tconst newValue =\n\t\t\t\t\t\t\t\t\tnewColors.length >= 2\n\t\t\t\t\t\t\t\t\t\t? newColors\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\tonChange( newValue );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t</Spacer>\n\t\t</CircularOptionPicker>\n\t);\n}\n\nexport default DuotonePicker;\n"]}
@@ -1,14 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { createElement } from "@wordpress/element";
3
3
 
4
- /**
5
- * External dependencies
6
- */
7
- import { map } from 'lodash';
8
4
  /**
9
5
  * WordPress dependencies
10
6
  */
11
-
12
7
  import { __, sprintf } from '@wordpress/i18n';
13
8
  import { useCallback, useMemo } from '@wordpress/element';
14
9
  import deprecated from '@wordpress/deprecated';
@@ -32,7 +27,7 @@ function SingleOrigin(_ref) {
32
27
  actions
33
28
  } = _ref;
34
29
  const gradientOptions = useMemo(() => {
35
- return map(gradients, _ref2 => {
30
+ return gradients.map((_ref2, index) => {
36
31
  let {
37
32
  gradient,
38
33
  name
@@ -47,7 +42,7 @@ function SingleOrigin(_ref) {
47
42
  color: 'rgba( 0,0,0,0 )',
48
43
  background: gradient
49
44
  },
50
- onClick: value === gradient ? clearGradient : () => onChange(gradient),
45
+ onClick: value === gradient ? clearGradient : () => onChange(gradient, index),
51
46
  "aria-label": name ? // translators: %s: The name of the gradient e.g: "Angular red to blue".
52
47
  sprintf(__('Gradient: %s'), name) : // translators: %s: gradient code e.g: "linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);".
53
48
  sprintf(__('Gradient code: %s'), gradient)
@@ -84,7 +79,7 @@ function MultipleOrigin(_ref3) {
84
79
  }, createElement(ColorHeading, null, name), createElement(SingleOrigin, _extends({
85
80
  clearGradient: clearGradient,
86
81
  gradients: gradientSet,
87
- onChange: onChange,
82
+ onChange: gradient => onChange(gradient, index),
88
83
  value: value
89
84
  }, gradients.length === index + 1 ? {
90
85
  actions
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/gradient-picker/index.js"],"names":["map","__","sprintf","useCallback","useMemo","deprecated","CircularOptionPicker","CustomGradientPicker","VStack","ColorHeading","Spacer","SingleOrigin","className","clearGradient","gradients","onChange","value","actions","gradientOptions","gradient","name","color","background","MultipleOrigin","index","gradientSet","length","GradientPicker","__nextHasNoMargin","clearable","disableCustomGradients","__experimentalHasMultipleOrigins","__experimentalIsRenderedInSidebar","undefined","Component","since","version","hint","deprecatedMarginSpacerProps","marginTop","marginBottom"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,GAAT,QAAoB,QAApB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASC,WAAT,EAAsBC,OAAtB,QAAqC,oBAArC;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,SAASC,MAAT,QAAuB,YAAvB;AACA,SAASC,YAAT,QAA6B,yBAA7B;AACA,SAASC,MAAT,QAAuB,WAAvB;;AAEA,SAASC,YAAT,OAOI;AAAA,MAPmB;AACtBC,IAAAA,SADsB;AAEtBC,IAAAA,aAFsB;AAGtBC,IAAAA,SAHsB;AAItBC,IAAAA,QAJsB;AAKtBC,IAAAA,KALsB;AAMtBC,IAAAA;AANsB,GAOnB;AACH,QAAMC,eAAe,GAAGd,OAAO,CAAE,MAAM;AACtC,WAAOJ,GAAG,CAAEc,SAAF,EAAa;AAAA,UAAE;AAAEK,QAAAA,QAAF;AAAYC,QAAAA;AAAZ,OAAF;AAAA,aACtB,cAAC,oBAAD,CAAsB,MAAtB;AACC,QAAA,GAAG,EAAGD,QADP;AAEC,QAAA,KAAK,EAAGA,QAFT;AAGC,QAAA,UAAU,EAAGH,KAAK,KAAKG,QAHxB;AAIC,QAAA,WAAW,EACVC,IAAI,IACJ;AACAlB,QAAAA,OAAO,CAAED,EAAE,CAAE,mBAAF,CAAJ,EAA6BkB,QAA7B,CAPT;AASC,QAAA,KAAK,EAAG;AAAEE,UAAAA,KAAK,EAAE,iBAAT;AAA4BC,U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AA,SAAS,WAAT,IAAAA,SAAS,CAAEY,MAAX,GAAoB,CAApB,GAAwB;AAA1C,OACG,CAAEI,sBAAF,IACD,cAAC,oBAAD;AACC,MAAA,iBAAiB,MADlB;AAEC,MAAA,iCAAiC,EAChCE,iCAHF;AAKC,MAAA,KAAK,EAAGhB,KALT;AAMC,MAAA,QAAQ,EAAGD;AANZ,MAFF,EAWG,CAAE,CAAAD,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEY,MAAX,KAAqBG,SAAvB,KACD,cAAC,SAAD;AACC,MAAA,SAAS,EAAGjB,SADb;AAEC,MAAA,SAAS,EAAGiB,SAFb;AAGC,MAAA,aAAa,EAAGhB,aAHjB;AAIC,MAAA,SAAS,EAAGC,SAJb;AAKC,MAAA,QAAQ,EAAGC,QALZ;AAMC,MAAA,KAAK,EAAGC,KANT;AAOC,MAAA,OAAO,EACNa,SAAS,IACT,CAAEC,sBADF,IAEC,cAAC,oBAAD,CAAsB,YAAtB;AACC,QAAA,OAAO,EAAGjB;AADX,SAGGZ,EAAE,CAAE,OAAF,CAHL;AAVH,MAZF,CADD;AAFD;AAqCA","sourcesContent":["/**\n * External dependencies\n */\nimport { map } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport CircularOptionPicker from '../circular-option-picker';\nimport CustomGradientPicker from '../custom-gradient-picker';\nimport { VStack } from '../v-stack';\nimport { ColorHeading } from '../color-palette/styles';\nimport { Spacer } from '../spacer';\n\nfunction SingleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\tactions,\n} ) {\n\tconst gradientOptions = useMemo( () => {\n\t\treturn map( gradients, ( { gradient, name } ) => (\n\t\t\t<CircularOptionPicker.Option\n\t\t\t\tkey={ gradient }\n\t\t\t\tvalue={ gradient }\n\t\t\t\tisSelected={ value === gradient }\n\t\t\t\ttooltipText={\n\t\t\t\t\tname ||\n\t\t\t\t\t// translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\tsprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t\tstyle={ { color: 'rgba( 0,0,0,0 )', background: gradient } }\n\t\t\t\tonClick={\n\t\t\t\t\tvalue === gradient\n\t\t\t\t\t\t? clearGradient\n\t\t\t\t\t\t: () => onChange( gradient )\n\t\t\t\t}\n\t\t\t\taria-label={\n\t\t\t\t\tname\n\t\t\t\t\t\t? // translators: %s: The name of the gradient e.g: \"Angular red to blue\".\n\t\t\t\t\t\t sprintf( __( 'Gradient: %s' ), name )\n\t\t\t\t\t\t: // translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\t\t sprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t/>\n\t\t) );\n\t}, [ gradients, value, onChange, clearGradient ] );\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\tclassName={ className }\n\t\t\toptions={ gradientOptions }\n\t\t\tactions={ actions }\n\t\t/>\n\t);\n}\n\nfunction MultipleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\tactions,\n} ) {\n\treturn (\n\t\t<VStack spacing={ 3 } className={ className }>\n\t\t\t{ gradients.map( ( { name, gradients: gradientSet }, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<VStack spacing={ 2 } key={ index }>\n\t\t\t\t\t\t<ColorHeading>{ name }</ColorHeading>\n\t\t\t\t\t\t<SingleOrigin\n\t\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\t\tgradients={ gradientSet }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t{ ...( gradients.length === index + 1\n\t\t\t\t\t\t\t\t? { actions }\n\t\t\t\t\t\t\t\t: {} ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n\nexport default function GradientPicker( {\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMargin = false,\n\tclassName,\n\tgradients,\n\tonChange,\n\tvalue,\n\tclearable = true,\n\tdisableCustomGradients = false,\n\t__experimentalHasMultipleOrigins,\n\t__experimentalIsRenderedInSidebar,\n} ) {\n\tconst clearGradient = useCallback(\n\t\t() => onChange( undefined ),\n\t\t[ onChange ]\n\t);\n\tconst Component =\n\t\t__experimentalHasMultipleOrigins && gradients?.length\n\t\t\t? MultipleOrigin\n\t\t\t: SingleOrigin;\n\n\tif ( ! __nextHasNoMargin ) {\n\t\tdeprecated( 'Outer margin styles for wp.components.GradientPicker', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.4',\n\t\t\thint: 'Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t} );\n\t}\n\n\tconst deprecatedMarginSpacerProps = ! __nextHasNoMargin\n\t\t? {\n\t\t\t\tmarginTop: ! gradients?.length ? 3 : undefined,\n\t\t\t\tmarginBottom: ! clearable ? 6 : 0,\n\t\t }\n\t\t: {};\n\n\treturn (\n\t\t// Outmost Spacer wrapper can be removed when deprecation period is over\n\t\t<Spacer marginBottom={ 0 } { ...deprecatedMarginSpacerProps }>\n\t\t\t<VStack spacing={ gradients?.length ? 4 : 0 }>\n\t\t\t\t{ ! disableCustomGradients && (\n\t\t\t\t\t<CustomGradientPicker\n\t\t\t\t\t\t__nextHasNoMargin\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( gradients?.length || clearable ) && (\n\t\t\t\t\t<Component\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tclearable={ clearable }\n\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\tgradients={ gradients }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\tclearable &&\n\t\t\t\t\t\t\t! disableCustomGradients && (\n\t\t\t\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\t\t\t\tonClick={ clearGradient }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t\t\t\t</CircularOptionPicker.ButtonAction>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</Spacer>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/gradient-picker/index.js"],"names":["__","sprintf","useCallback","useMemo","deprecated","CircularOptionPicker","CustomGradientPicker","VStack","ColorHeading","Spacer","SingleOrigin","className","clearGradient","gradients","onChange","value","actions","gradientOptions","map","index","gradient","name","color","background","MultipleOrigin","gradientSet","length","GradientPicker","__nextHasNoMargin","clearable","disableCustomGradients","__experimentalHasMultipleOrigins","__experimentalIsRenderedInSidebar","undefined","Component","since","version","hint","deprecatedMarginSpacerProps","marginTop","marginBottom"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASC,WAAT,EAAsBC,OAAtB,QAAqC,oBAArC;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,SAASC,MAAT,QAAuB,YAAvB;AACA,SAASC,YAAT,Q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;AAKC,MAAA,QAAQ,EAAGC,QALZ;AAMC,MAAA,KAAK,EAAGC,KANT;AAOC,MAAA,OAAO,EACNc,SAAS,IACT,CAAEC,sBADF,IAEC,cAAC,oBAAD,CAAsB,YAAtB;AACC,QAAA,OAAO,EAAGlB;AADX,SAGGZ,EAAE,CAAE,OAAF,CAHL;AAVH,MAZF,CADD;AAFD;AAqCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport CircularOptionPicker from '../circular-option-picker';\nimport CustomGradientPicker from '../custom-gradient-picker';\nimport { VStack } from '../v-stack';\nimport { ColorHeading } from '../color-palette/styles';\nimport { Spacer } from '../spacer';\n\nfunction SingleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\tactions,\n} ) {\n\tconst gradientOptions = useMemo( () => {\n\t\treturn gradients.map( ( { gradient, name }, index ) => (\n\t\t\t<CircularOptionPicker.Option\n\t\t\t\tkey={ gradient }\n\t\t\t\tvalue={ gradient }\n\t\t\t\tisSelected={ value === gradient }\n\t\t\t\ttooltipText={\n\t\t\t\t\tname ||\n\t\t\t\t\t// translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\tsprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t\tstyle={ { color: 'rgba( 0,0,0,0 )', background: gradient } }\n\t\t\t\tonClick={\n\t\t\t\t\tvalue === gradient\n\t\t\t\t\t\t? clearGradient\n\t\t\t\t\t\t: () => onChange( gradient, index )\n\t\t\t\t}\n\t\t\t\taria-label={\n\t\t\t\t\tname\n\t\t\t\t\t\t? // translators: %s: The name of the gradient e.g: \"Angular red to blue\".\n\t\t\t\t\t\t sprintf( __( 'Gradient: %s' ), name )\n\t\t\t\t\t\t: // translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\t\t sprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t/>\n\t\t) );\n\t}, [ gradients, value, onChange, clearGradient ] );\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\tclassName={ className }\n\t\t\toptions={ gradientOptions }\n\t\t\tactions={ actions }\n\t\t/>\n\t);\n}\n\nfunction MultipleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\tactions,\n} ) {\n\treturn (\n\t\t<VStack spacing={ 3 } className={ className }>\n\t\t\t{ gradients.map( ( { name, gradients: gradientSet }, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<VStack spacing={ 2 } key={ index }>\n\t\t\t\t\t\t<ColorHeading>{ name }</ColorHeading>\n\t\t\t\t\t\t<SingleOrigin\n\t\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\t\tgradients={ gradientSet }\n\t\t\t\t\t\t\tonChange={ ( gradient ) =>\n\t\t\t\t\t\t\t\tonChange( gradient, index )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t{ ...( gradients.length === index + 1\n\t\t\t\t\t\t\t\t? { actions }\n\t\t\t\t\t\t\t\t: {} ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n\nexport default function GradientPicker( {\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMargin = false,\n\tclassName,\n\tgradients,\n\tonChange,\n\tvalue,\n\tclearable = true,\n\tdisableCustomGradients = false,\n\t__experimentalHasMultipleOrigins,\n\t__experimentalIsRenderedInSidebar,\n} ) {\n\tconst clearGradient = useCallback(\n\t\t() => onChange( undefined ),\n\t\t[ onChange ]\n\t);\n\tconst Component =\n\t\t__experimentalHasMultipleOrigins && gradients?.length\n\t\t\t? MultipleOrigin\n\t\t\t: SingleOrigin;\n\n\tif ( ! __nextHasNoMargin ) {\n\t\tdeprecated( 'Outer margin styles for wp.components.GradientPicker', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.4',\n\t\t\thint: 'Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t} );\n\t}\n\n\tconst deprecatedMarginSpacerProps = ! __nextHasNoMargin\n\t\t? {\n\t\t\t\tmarginTop: ! gradients?.length ? 3 : undefined,\n\t\t\t\tmarginBottom: ! clearable ? 6 : 0,\n\t\t }\n\t\t: {};\n\n\treturn (\n\t\t// Outmost Spacer wrapper can be removed when deprecation period is over\n\t\t<Spacer marginBottom={ 0 } { ...deprecatedMarginSpacerProps }>\n\t\t\t<VStack spacing={ gradients?.length ? 4 : 0 }>\n\t\t\t\t{ ! disableCustomGradients && (\n\t\t\t\t\t<CustomGradientPicker\n\t\t\t\t\t\t__nextHasNoMargin\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( gradients?.length || clearable ) && (\n\t\t\t\t\t<Component\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tclearable={ clearable }\n\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\tgradients={ gradients }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\tclearable &&\n\t\t\t\t\t\t\t! disableCustomGradients && (\n\t\t\t\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\t\t\t\tonClick={ clearGradient }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t\t\t\t</CircularOptionPicker.ButtonAction>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</Spacer>\n\t);\n}\n"]}
@@ -4,7 +4,7 @@ import { createElement } from "@wordpress/element";
4
4
  /**
5
5
  * External dependencies
6
6
  */
7
- import { isEqual } from 'lodash';
7
+ import fastDeepEqual from 'fast-deep-equal/es6';
8
8
  /**
9
9
  * WordPress dependencies
10
10
  */
@@ -48,7 +48,7 @@ export default (mapNodeToProps => createHigherOrderComponent(WrappedComponent =>
48
48
  if (this.nodeRef && !grabStylesCompleted) {
49
49
  const newFallbackStyles = mapNodeToProps(this.nodeRef, this.props);
50
50
 
51
- if (!isEqual(newFallbackStyles, fallbackStyles)) {
51
+ if (!fastDeepEqual(newFallbackStyles, fallbackStyles)) {
52
52
  this.setState({
53
53
  fallbackStyles: newFallbackStyles,
54
54
  grabStylesCompleted: Object.values(newFallbackStyles).every(Boolean)
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-fallback-styles/index.js"],"names":["isEqual","Component","createHigherOrderComponent","mapNodeToProps","WrappedComponent","constructor","arguments","nodeRef","props","node","state","fallbackStyles","undefined","grabStylesCompleted","bindRef","bind","componentDidMount","grabFallbackStyles","componentDidUpdate","newFallbackStyles","setState","Object","values","every","Boolean","render","wrappedComponent"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,QAAxB;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,0BAAT,QAA2C,oBAA3C;AAEA,gBAAiBC,cAAF,IACdD,0BAA0B,CAAIE,gBAAF,IAAwB;AACnD,SAAO,cAAcH,SAAd,CAAwB;AAC9BI,IAAAA,WAAW,GAAG;AACb,YAAO,GAAGC,SAAV;AACA,WAAKC,OAAL,GAAe,KAAKC,KAAL,CAAWC,IAA1B;AAC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port { isEqual } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\nexport default ( mapNodeToProps ) =>\n\tcreateHigherOrderComponent( ( WrappedComponent ) => {\n\t\treturn class extends Component {\n\t\t\tconstructor() {\n\t\t\t\tsuper( ...arguments );\n\t\t\t\tthis.nodeRef = this.props.node;\n\t\t\t\tthis.state = {\n\t\t\t\t\tfallbackStyles: undefined,\n\t\t\t\t\tgrabStylesCompleted: false,\n\t\t\t\t};\n\n\t\t\t\tthis.bindRef = this.bindRef.bind( this );\n\t\t\t}\n\n\t\t\tbindRef( node ) {\n\t\t\t\tif ( ! node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.nodeRef = node;\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tcomponentDidUpdate() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tgrabFallbackStyles() {\n\t\t\t\tconst { grabStylesCompleted, fallbackStyles } = this.state;\n\t\t\t\tif ( this.nodeRef && ! grabStylesCompleted ) {\n\t\t\t\t\tconst newFallbackStyles = mapNodeToProps(\n\t\t\t\t\t\tthis.nodeRef,\n\t\t\t\t\t\tthis.props\n\t\t\t\t\t);\n\n\t\t\t\t\tif ( ! isEqual( newFallbackStyles, fallbackStyles ) ) {\n\t\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\t\tfallbackStyles: newFallbackStyles,\n\t\t\t\t\t\t\tgrabStylesCompleted:\n\t\t\t\t\t\t\t\tObject.values( newFallbackStyles ).every(\n\t\t\t\t\t\t\t\t\tBoolean\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\tconst wrappedComponent = (\n\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t{ ...this.props }\n\t\t\t\t\t\t{ ...this.state.fallbackStyles }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\treturn this.props.node ? (\n\t\t\t\t\twrappedComponent\n\t\t\t\t) : (\n\t\t\t\t\t<div ref={ this.bindRef }> { wrappedComponent } </div>\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, 'withFallbackStyles' );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-fallback-styles/index.js"],"names":["fastDeepEqual","Component","createHigherOrderComponent","mapNodeToProps","WrappedComponent","constructor","arguments","nodeRef","props","node","state","fallbackStyles","undefined","grabStylesCompleted","bindRef","bind","componentDidMount","grabFallbackStyles","componentDidUpdate","newFallbackStyles","setState","Object","values","every","Boolean","render","wrappedComponent"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,aAAP,MAA0B,qBAA1B;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,0BAAT,QAA2C,oBAA3C;AAEA,gBAAiBC,cAAF,IACdD,0BAA0B,CAAIE,gBAAF,IAAwB;AACnD,SAAO,cAAcH,SAAd,CAAwB;AAC9BI,IAAAA,WAAW,GAAG;AACb,YAAO,GAAGC,SAAV;AACA,WAAKC,OAAL,GAAe,KAAKC,KAAL,CAAWC,IAA1B;AACA,WAAKC,KAAL,GAAa;AACZC,QAAAA,cAAc,EAAEC,SADJ;AAEZC,QAAAA,mBAAmB,EAAE;AAFT,OAAb;AAKA,WAAKC,OAAL,GAAe,KAAKA,OAAL,CAAaC,IAAb,CAAmB,IAAnB,CAAf;AACA;;AAEDD,IAAAA,OAAO,CAAEL,IAAF,EAAS;AACf,UAAK,CAAEA,IAAP,EAAc;AACb;AACA;;AACD,WAAKF,OAAL,GAAeE,IAAf;AACA;;AAEDO,IAAAA,iBAAiB,GAAG;AACnB,WAAKC,kBAAL;AACA;;AAEDC,IAAAA,kBAAkB,GAAG;AACpB,WAAKD,kBAAL;AACA;;AAEDA,IAAAA,kBAAkB,GAAG;AACpB,YAAM;AAAEJ,QAAAA,mBAAF;AAAuBF,QAAAA;AAAvB,UAA0C,KAAKD,KAArD;;AACA,UAAK,KAAKH,OAAL,IAAgB,CAAEM,mBAAvB,EAA6C;AAC5C,cAAMM,iBAAiB,GAAGhB,cAAc,CACvC,KAAKI,OADkC,EAEvC,KAAKC,KAFkC,CAAxC;;AAKA,YACC,CAAER,aAAa,CAAEmB,iBAAF,EAAqBR,cAArB,CADhB,EAEE;AACD,eAAKS,QAAL,CAAe;AACdT,YAAAA,cAAc,EAAEQ,iBADF;AAEdN,YAAAA,mBAAmB,EAClBQ,MAAM,CAACC,MAAP,CAAeH,iBAAf,EAAmCI,KAAnC,CACCC,OADD;AAHa,WAAf;AAOA;AACD;AACD;;AAEDC,IAAAA,MAAM,GAAG;AACR,YAAMC,gBAAgB,GACrB,cAAC,gBAAD,eACM,KAAKlB,KADX,EAEM,KAAKE,KAAL,CAAWC,cAFjB,EADD;AAMA,aAAO,KAAKH,KAAL,CAAWC,IAAX,GACNiB,gBADM,GAGN;AAAK,QAAA,GAAG,EAAG,KAAKZ;AAAhB,cAA6BY,gBAA7B,MAHD;AAKA;;AA7D6B,GAA/B;AA+DA,CAhEyB,EAgEvB,oBAhEuB,CAD3B","sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\nexport default ( mapNodeToProps ) =>\n\tcreateHigherOrderComponent( ( WrappedComponent ) => {\n\t\treturn class extends Component {\n\t\t\tconstructor() {\n\t\t\t\tsuper( ...arguments );\n\t\t\t\tthis.nodeRef = this.props.node;\n\t\t\t\tthis.state = {\n\t\t\t\t\tfallbackStyles: undefined,\n\t\t\t\t\tgrabStylesCompleted: false,\n\t\t\t\t};\n\n\t\t\t\tthis.bindRef = this.bindRef.bind( this );\n\t\t\t}\n\n\t\t\tbindRef( node ) {\n\t\t\t\tif ( ! node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.nodeRef = node;\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tcomponentDidUpdate() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tgrabFallbackStyles() {\n\t\t\t\tconst { grabStylesCompleted, fallbackStyles } = this.state;\n\t\t\t\tif ( this.nodeRef && ! grabStylesCompleted ) {\n\t\t\t\t\tconst newFallbackStyles = mapNodeToProps(\n\t\t\t\t\t\tthis.nodeRef,\n\t\t\t\t\t\tthis.props\n\t\t\t\t\t);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! fastDeepEqual( newFallbackStyles, fallbackStyles )\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\t\tfallbackStyles: newFallbackStyles,\n\t\t\t\t\t\t\tgrabStylesCompleted:\n\t\t\t\t\t\t\t\tObject.values( newFallbackStyles ).every(\n\t\t\t\t\t\t\t\t\tBoolean\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\tconst wrappedComponent = (\n\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t{ ...this.props }\n\t\t\t\t\t\t{ ...this.state.fallbackStyles }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\treturn this.props.node ? (\n\t\t\t\t\twrappedComponent\n\t\t\t\t) : (\n\t\t\t\t\t<div ref={ this.bindRef }> { wrappedComponent } </div>\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, 'withFallbackStyles' );\n"]}
@@ -3,10 +3,10 @@ export { SVG, Path, Circle, Polygon, Rect, G, Line, HorizontalRule, BlockQuotati
3
3
 
4
4
  export { default as __experimentalAlignmentMatrixControl } from './alignment-matrix-control';
5
5
  export { default as Animate, getAnimateClassName as __unstableGetAnimateClassName } from './animate';
6
- export { __unstableMotion } from './animation';
6
+ export { __unstableMotion, __unstableAnimatePresence } from './animation';
7
7
  export { default as AnglePickerControl } from './angle-picker-control';
8
8
  export { default as Autocomplete, useAutocompleteProps as __unstableUseAutocompleteProps } from './autocomplete';
9
- export { default as BaseControl } from './base-control';
9
+ export { default as BaseControl, useBaseControlProps } from './base-control';
10
10
  export { BorderBoxControl as __experimentalBorderBoxControl, hasSplitBorders as __experimentalHasSplitBorders, isDefinedBorder as __experimentalIsDefinedBorder, isEmptyBorder as __experimentalIsEmptyBorder } from './border-box-control';
11
11
  export { BorderControl as __experimentalBorderControl } from './border-control';
12
12
  export { default as __experimentalBoxControl, applyValueToSides as __experimentalApplyValueToSides } from './box-control';
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/index.js"],"names":["SVG","Path","Circle","Polygon","Rect","G","Line","HorizontalRule","BlockQuotation","default","__experimentalAlignmentMatrixControl","Animate","getAnimateClassName","__unstableGetAnimateClassName","__unstableMotion","AnglePickerControl","Autocomplete","useAutocompleteProps","__unstableUseAutocompleteProps","BaseControl","BorderBoxControl","__experimentalBorderBoxControl","hasSplitBorders","__experimentalHasSplitBorders","isDefinedBorder","__experimentalIsDefinedBorder","isEmptyBorder","__experimentalIsEmptyBorder","BorderControl","__experimentalBorderControl","__experimentalBoxControl","applyValueToSides","__experimentalApplyValueToSides","Button","ButtonGroup","Card","CardBody","CardDivider","CardFooter","CardHeader","CardMedia","CheckboxControl","ClipboardButton","__experimentalPaletteEdit","ColorIndicator","ColorPalette","ColorPicker","ComboboxControl","Composite","__unstableComposite","CompositeGroup","__unstableCompositeGroup","CompositeItem","__unstableCompositeItem","useCompositeState","__unstableUseCompositeState","ConfirmDialog","__experimentalConfirmDialog","CustomSelectControl","Dashicon","DateTimePicker","DatePicker","TimePicker","__experimentalDimensionControl","Disabled","DisclosureContent","__unstableDisclosureContent","Divider","__experimentalDivider","Draggable","DropZone","DropZoneProvider","Dropdown","__experimentalDropdownContentWrapper","DropdownMenu","DuotoneSwatch","DuotonePicker","Elevation","__experimentalElevation","ExternalLink","Flex","FlexBlock","FlexItem","FocalPointPicker","FocusableIframe","FontSizePicker","FormFileUpload","FormToggle","FormTokenField","GradientPicker","CustomGradientPicker","Grid","__experimentalGrid","Guide","GuidePage","Heading","__experimentalHeading","HStack","__experimentalHStack","Icon","IconButton","ItemGroup","__experimentalItemGroup","Item","__experimentalItem","__experimentalInputControl","__experimentalInputControlPrefixWrapper","__experimentalInputControlSuffixWrapper","KeyboardShortcuts","MenuGroup","MenuItem","MenuItemsChoice","Modal","ScrollLock","NavigableMenu","TabbableContainer","__experimentalNavigation","__experimentalNavigationBackButton","__experimentalNavigationGroup","__experimentalNavigationItem","__experimentalNavigationMenu","NavigatorProvider","__experimentalNavigatorProvider","NavigatorScreen","__experimentalNavigatorScreen","NavigatorButton","__experimentalNavigatorButton","NavigatorBackButton","__experimentalNavigatorBackButton","useNavigator","__experimentalUseNavigator","Notice","__experimentalNumberControl","NoticeList","Panel","PanelBody","PanelHeader","PanelRow","Placeholder","Popover","positionToPlacement","__experimentalPopoverPositionToPlacement","QueryControls","__experimentalRadio","__experimentalRadioGroup","RadioControl","RangeControl","ResizableBox","ResponsiveWrapper","SandBox","SearchControl","SelectControl","Snackbar","SnackbarList","Spacer","__experimentalSpacer","Scrollable","__experimentalScrollable","Spinner","Surface","__experimentalSurface","TabPanel","Text","__experimentalText","TextControl","TextareaControl","TextHighlight","__experimentalTheme","Tip","ToggleControl","ToggleGroupControl","__experimentalToggleGroupControl","ToggleGroupControlOption","__experimentalToggleGroupControlOption","ToggleGroupControlOptionIcon","__experimentalToggleGroupControlOptionIcon","Toolbar","ToolbarButton","ToolbarDropdownMenu","__experimentalToolbarContext","ToolbarGroup","ToolbarItem","ToolsPanel","__experimentalToolsPanel","ToolsPanelItem","__experimentalToolsPanelItem","ToolsPanelContext","__experimentalToolsPanelContext","Tooltip","__experimentalTreeGrid","TreeGridRow","__experimentalTreeGridRow","TreeGridCell","__experimentalTreeGridCell","TreeGridItem","__experimentalTreeGridItem","TreeSelect","Truncate","__experimentalTruncate","__experimentalUnitControl","useCustomUnits","__experimentalUseCustomUnits","parseQuantityAndUnitFromRawValue","__experimentalParseQuantityAndUnitFromRawValue","View","__experimentalView","VisuallyHidden","VStack","__experimentalVStack","IsolatedEventContainer","createSlotFill","Slot","Fill","Provider","SlotFillProvider","useSlot","__experimentalUseSlot","useSlotFills","__experimentalUseSlotFills","__experimentalStyleProvider","ZStack","__experimentalZStack","navigateRegions","useNavigateRegions","__unstableUseNavigateRegions","withConstrainedTabbing","withFallbackStyles","withFilters","withFocusOutside","withFocusReturn","FocusReturnProvider","withNotices","withSpokenMessages"],"mappings":"AAAA;AACA,SACCA,GADD,EAECC,IAFD,EAGCC,MAHD,EAICC,OAJD,EAKCC,IALD,EAMCC,CAND,EAOCC,IAPD,EAQCC,cARD,EASCC,cATD,QAUO,uBAVP,C,CAYA;;AACA,SAASC,OAAO,IAAIC,oCAApB,QAAgE,4BAAhE;AACA,SACCD,OAAO,IAAIE,OADZ,EAECC,mBAAmB,IAAIC,6BAFxB,QAGO,WAHP;AAIA,SAASC,gBAAT,QAAiC,aAAjC;AACA,SAASL,OAAO,IAAIM,kBAApB,QAA8C,wBAA9C;AACA,SACCN,OAAO,IAAIO,YADZ,EAECC,oBAAoB,IAAIC,8BAFzB,QAGO,gBAHP;AAIA,SAAST,OAAO,IAAIU,WAApB,QAAuC,gBAAvC;AACA,SACCC,gBAAgB,IAAIC,8BADrB,EAECC,eAAe,IAAIC,6BAFpB,EAGCC,eAAe,IAAIC,6BAHpB,EAICC,aAAa,IAAIC,2BAJlB,QAKO,sBALP;AAMA,SAASC,aAAa,IAAIC,2BAA1B,QAA6D,kBAA7D;AACA,SACCpB,OAAO,IAAIqB,wBADZ,EAECC,iBAAiB,IAAIC,+BAFtB,QAGO,eAHP;AAIA,SAASvB,OAAO,IAAIwB,MAApB,QAAkC,UA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BAAkB,IAAIC,4BAFvB,QAGO,iCAHP;AAIA,SAASvN,OAAO,IAAIwN,sBAApB,QAAkD,yCAAlD;AACA,SAASxN,OAAO,IAAIyN,kBAApB,QAA8C,qCAA9C;AACA,SAASzN,OAAO,IAAI0N,WAApB,QAAuC,6BAAvC;AACA,SAAS1N,OAAO,IAAI2N,gBAApB,QAA4C,mCAA5C;AACA,SACC3N,OAAO,IAAI4N,eADZ,EAEChB,QAAQ,IAAIiB,mBAFb,QAGO,kCAHP;AAIA,SAAS7N,OAAO,IAAI8N,WAApB,QAAuC,6BAAvC;AACA,SAAS9N,OAAO,IAAI+N,kBAApB,QAA8C,qCAA9C","sourcesContent":["// Primitives.\nexport {\n\tSVG,\n\tPath,\n\tCircle,\n\tPolygon,\n\tRect,\n\tG,\n\tLine,\n\tHorizontalRule,\n\tBlockQuotation,\n} from '@wordpress/primitives';\n\n// Components.\nexport { default as __experimentalAlignmentMatrixControl } from './alignment-matrix-control';\nexport {\n\tdefault as Animate,\n\tgetAnimateClassName as __unstableGetAnimateClassName,\n} from './animate';\nexport { __unstableMotion } from './animation';\nexport { default as AnglePickerControl } from './angle-picker-control';\nexport {\n\tdefault as Autocomplete,\n\tuseAutocompleteProps as __unstableUseAutocompleteProps,\n} from './autocomplete';\nexport { default as BaseControl } from './base-control';\nexport {\n\tBorderBoxControl as __experimentalBorderBoxControl,\n\thasSplitBorders as __experimentalHasSplitBorders,\n\tisDefinedBorder as __experimentalIsDefinedBorder,\n\tisEmptyBorder as __experimentalIsEmptyBorder,\n} from './border-box-control';\nexport { BorderControl as __experimentalBorderControl } from './border-control';\nexport {\n\tdefault as __experimentalBoxControl,\n\tapplyValueToSides as __experimentalApplyValueToSides,\n} from './box-control';\nexport { default as Button } from './button';\nexport { default as ButtonGroup } from './button-group';\nexport {\n\tCard,\n\tCardBody,\n\tCardDivider,\n\tCardFooter,\n\tCardHeader,\n\tCardMedia,\n} from './card';\nexport { default as CheckboxControl } from './checkbox-control';\nexport { default as ClipboardButton } from './clipboard-button';\nexport { default as __experimentalPaletteEdit } from './palette-edit';\nexport { default as ColorIndicator } from './color-indicator';\nexport { default as ColorPalette } from './color-palette';\nexport { ColorPicker } from './color-picker';\nexport { default as ComboboxControl } from './combobox-control';\nexport {\n\tComposite as __unstableComposite,\n\tCompositeGroup as __unstableCompositeGroup,\n\tCompositeItem as __unstableCompositeItem,\n\tuseCompositeState as __unstableUseCompositeState,\n} from './composite';\nexport { ConfirmDialog as __experimentalConfirmDialog } from './confirm-dialog';\nexport { default as CustomSelectControl } from './custom-select-control';\nexport { default as Dashicon } from './dashicon';\nexport { default as DateTimePicker, DatePicker, TimePicker } from './date-time';\nexport { default as __experimentalDimensionControl } from './dimension-control';\nexport { default as Disabled } from './disabled';\nexport { DisclosureContent as __unstableDisclosureContent } from './disclosure';\nexport { Divider as __experimentalDivider } from './divider';\nexport { default as Draggable } from './draggable';\nexport { default as DropZone } from './drop-zone';\nexport { default as DropZoneProvider } from './drop-zone/provider';\nexport { default as Dropdown } from './dropdown';\nexport { default as __experimentalDropdownContentWrapper } from './dropdown/dropdown-content-wrapper';\nexport { default as DropdownMenu } from './dropdown-menu';\nexport { DuotoneSwatch, DuotonePicker } from './duotone-picker';\nexport { Elevation as __experimentalElevation } from './elevation';\nexport { default as ExternalLink } from './external-link';\nexport { Flex, FlexBlock, FlexItem } from './flex';\nexport { default as FocalPointPicker } from './focal-point-picker';\nexport { default as FocusableIframe } from './focusable-iframe';\nexport { default as FontSizePicker } from './font-size-picker';\nexport { default as FormFileUpload } from './form-file-upload';\nexport { default as FormToggle } from './form-toggle';\nexport { default as FormTokenField } from './form-token-field';\nexport { default as GradientPicker } from './gradient-picker';\nexport { default as CustomGradientPicker } from './custom-gradient-picker';\nexport { Grid as __experimentalGrid } from './grid';\nexport { default as Guide } from './guide';\nexport { default as GuidePage } from './guide/page';\nexport { Heading as __experimentalHeading } from './heading';\nexport { HStack as __experimentalHStack } from './h-stack';\nexport { default as Icon } from './icon';\nexport { default as IconButton } from './button/deprecated';\nexport {\n\tItemGroup as __experimentalItemGroup,\n\tItem as __experimentalItem,\n} from './item-group';\nexport { default as __experimentalInputControl } from './input-control';\nexport { default as __experimentalInputControlPrefixWrapper } from './input-control/input-prefix-wrapper';\nexport { default as __experimentalInputControlSuffixWrapper } from './input-control/input-suffix-wrapper';\nexport { default as KeyboardShortcuts } from './keyboard-shortcuts';\nexport { default as MenuGroup } from './menu-group';\nexport { default as MenuItem } from './menu-item';\nexport { default as MenuItemsChoice } from './menu-items-choice';\nexport { default as Modal } from './modal';\nexport { default as ScrollLock } from './scroll-lock';\nexport { NavigableMenu, TabbableContainer } from './navigable-container';\nexport { default as __experimentalNavigation } from './navigation';\nexport { default as __experimentalNavigationBackButton } from './navigation/back-button';\nexport { default as __experimentalNavigationGroup } from './navigation/group';\nexport { default as __experimentalNavigationItem } from './navigation/item';\nexport { default as __experimentalNavigationMenu } from './navigation/menu';\nexport {\n\tNavigatorProvider as __experimentalNavigatorProvider,\n\tNavigatorScreen as __experimentalNavigatorScreen,\n\tNavigatorButton as __experimentalNavigatorButton,\n\tNavigatorBackButton as __experimentalNavigatorBackButton,\n\tuseNavigator as __experimentalUseNavigator,\n} from './navigator';\nexport { default as Notice } from './notice';\nexport { default as __experimentalNumberControl } from './number-control';\nexport { default as NoticeList } from './notice/list';\nexport { default as Panel } from './panel';\nexport { default as PanelBody } from './panel/body';\nexport { default as PanelHeader } from './panel/header';\nexport { default as PanelRow } from './panel/row';\nexport { default as Placeholder } from './placeholder';\nexport { default as Popover } from './popover';\nexport { positionToPlacement as __experimentalPopoverPositionToPlacement } from './popover/utils';\nexport { default as QueryControls } from './query-controls';\nexport { default as __experimentalRadio } from './radio-group/radio';\nexport { default as __experimentalRadioGroup } from './radio-group';\nexport { default as RadioControl } from './radio-control';\nexport { default as RangeControl } from './range-control';\nexport { default as ResizableBox } from './resizable-box';\nexport { default as ResponsiveWrapper } from './responsive-wrapper';\nexport { default as SandBox } from './sandbox';\nexport { default as SearchControl } from './search-control';\nexport { default as SelectControl } from './select-control';\nexport { default as Snackbar } from './snackbar';\nexport { default as SnackbarList } from './snackbar/list';\nexport { Spacer as __experimentalSpacer } from './spacer';\nexport { Scrollable as __experimentalScrollable } from './scrollable';\nexport { default as Spinner } from './spinner';\nexport { Surface as __experimentalSurface } from './surface';\nexport { default as TabPanel } from './tab-panel';\nexport { Text as __experimentalText } from './text';\nexport { default as TextControl } from './text-control';\nexport { default as TextareaControl } from './textarea-control';\nexport { default as TextHighlight } from './text-highlight';\nexport { default as __experimentalTheme } from './theme';\nexport { default as Tip } from './tip';\nexport { default as ToggleControl } from './toggle-control';\nexport {\n\tToggleGroupControl as __experimentalToggleGroupControl,\n\tToggleGroupControlOption as __experimentalToggleGroupControlOption,\n\tToggleGroupControlOptionIcon as __experimentalToggleGroupControlOptionIcon,\n} from './toggle-group-control';\nexport { default as Toolbar } from './toolbar';\nexport { default as ToolbarButton } from './toolbar-button';\nexport { default as ToolbarDropdownMenu } from './toolbar-dropdown-menu';\nexport { default as __experimentalToolbarContext } from './toolbar-context';\nexport { default as ToolbarGroup } from './toolbar-group';\nexport { default as ToolbarItem } from './toolbar-item';\nexport {\n\tToolsPanel as __experimentalToolsPanel,\n\tToolsPanelItem as __experimentalToolsPanelItem,\n\tToolsPanelContext as __experimentalToolsPanelContext,\n} from './tools-panel';\nexport { default as Tooltip } from './tooltip';\nexport {\n\tdefault as __experimentalTreeGrid,\n\tTreeGridRow as __experimentalTreeGridRow,\n\tTreeGridCell as __experimentalTreeGridCell,\n\tTreeGridItem as __experimentalTreeGridItem,\n} from './tree-grid';\nexport { default as TreeSelect } from './tree-select';\nexport { Truncate as __experimentalTruncate } from './truncate';\nexport {\n\tdefault as __experimentalUnitControl,\n\tuseCustomUnits as __experimentalUseCustomUnits,\n\tparseQuantityAndUnitFromRawValue as __experimentalParseQuantityAndUnitFromRawValue,\n} from './unit-control';\nexport { View as __experimentalView } from './view';\nexport { VisuallyHidden } from './visually-hidden';\nexport { VStack as __experimentalVStack } from './v-stack';\nexport { default as IsolatedEventContainer } from './isolated-event-container';\nexport {\n\tcreateSlotFill,\n\tSlot,\n\tFill,\n\tProvider as SlotFillProvider,\n\tuseSlot as __experimentalUseSlot,\n\tuseSlotFills as __experimentalUseSlotFills,\n} from './slot-fill';\nexport { default as __experimentalStyleProvider } from './style-provider';\nexport { ZStack as __experimentalZStack } from './z-stack';\n\n// Higher-Order Components.\nexport {\n\tdefault as navigateRegions,\n\tuseNavigateRegions as __unstableUseNavigateRegions,\n} from './higher-order/navigate-regions';\nexport { default as withConstrainedTabbing } from './higher-order/with-constrained-tabbing';\nexport { default as withFallbackStyles } from './higher-order/with-fallback-styles';\nexport { default as withFilters } from './higher-order/with-filters';\nexport { default as withFocusOutside } from './higher-order/with-focus-outside';\nexport {\n\tdefault as withFocusReturn,\n\tProvider as FocusReturnProvider,\n} from './higher-order/with-focus-return';\nexport { default as withNotices } from './higher-order/with-notices';\nexport { default as withSpokenMessages } from './higher-order/with-spoken-messages';\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/index.js"],"names":["SVG","Path","Circle","Polygon","Rect","G","Line","HorizontalRule","BlockQuotation","default","__experimentalAlignmentMatrixControl","Animate","getAnimateClassName","__unstableGetAnimateClassName","__unstableMotion","__unstableAnimatePresence","AnglePickerControl","Autocomplete","useAutocompleteProps","__unstableUseAutocompleteProps","BaseControl","useBaseControlProps","BorderBoxControl","__experimentalBorderBoxControl","hasSplitBorders","__experimentalHasSplitBorders","isDefinedBorder","__experimentalIsDefinedBorder","isEmptyBorder","__experimentalIsEmptyBorder","BorderControl","__experimentalBorderControl","__experimentalBoxControl","applyValueToSides","__experimentalApplyValueToSides","Button","ButtonGroup","Card","CardBody","CardDivider","CardFooter","CardHeader","CardMedia","CheckboxControl","ClipboardButton","__experimentalPaletteEdit","ColorIndicator","ColorPalette","ColorPicker","ComboboxControl","Composite","__unstableComposite","CompositeGroup","__unstableCompositeGroup","CompositeItem","__unstableCompositeItem","useCompositeState","__unstableUseCompositeState","ConfirmDialog","__experimentalConfirmDialog","CustomSelectControl","Dashicon","DateTimePicker","DatePicker","TimePicker","__experimentalDimensionControl","Disabled","DisclosureContent","__unstableDisclosureContent","Divider","__experimentalDivider","Draggable","DropZone","DropZoneProvider","Dropdown","__experimentalDropdownContentWrapper","DropdownMenu","DuotoneSwatch","DuotonePicker","Elevation","__experimentalElevation","ExternalLink","Flex","FlexBlock","FlexItem","FocalPointPicker","FocusableIframe","FontSizePicker","FormFileUpload","FormToggle","FormTokenField","GradientPicker","CustomGradientPicker","Grid","__experimentalGrid","Guide","GuidePage","Heading","__experimentalHeading","HStack","__experimentalHStack","Icon","IconButton","ItemGroup","__experimentalItemGroup","Item","__experimentalItem","__experimentalInputControl","__experimentalInputControlPrefixWrapper","__experimentalInputControlSuffixWrapper","KeyboardShortcuts","MenuGroup","MenuItem","MenuItemsChoice","Modal","ScrollLock","NavigableMenu","TabbableContainer","__experimentalNavigation","__experimentalNavigationBackButton","__experimentalNavigationGroup","__experimentalNavigationItem","__experimentalNavigationMenu","NavigatorProvider","__experimentalNavigatorProvider","NavigatorScreen","__experimentalNavigatorScreen","NavigatorButton","__experimentalNavigatorButton","NavigatorBackButton","__experimentalNavigatorBackButton","useNavigator","__experimentalUseNavigator","Notice","__experimentalNumberControl","NoticeList","Panel","PanelBody","PanelHeader","PanelRow","Placeholder","Popover","positionToPlacement","__experimentalPopoverPositionToPlacement","QueryControls","__experimentalRadio","__experimentalRadioGroup","RadioControl","RangeControl","ResizableBox","ResponsiveWrapper","SandBox","SearchControl","SelectControl","Snackbar","SnackbarList","Spacer","__experimentalSpacer","Scrollable","__experimentalScrollable","Spinner","Surface","__experimentalSurface","TabPanel","Text","__experimentalText","TextControl","TextareaControl","TextHighlight","__experimentalTheme","Tip","ToggleControl","ToggleGroupControl","__experimentalToggleGroupControl","ToggleGroupControlOption","__experimentalToggleGroupControlOption","ToggleGroupControlOptionIcon","__experimentalToggleGroupControlOptionIcon","Toolbar","ToolbarButton","ToolbarDropdownMenu","__experimentalToolbarContext","ToolbarGroup","ToolbarItem","ToolsPanel","__experimentalToolsPanel","ToolsPanelItem","__experimentalToolsPanelItem","ToolsPanelContext","__experimentalToolsPanelContext","Tooltip","__experimentalTreeGrid","TreeGridRow","__experimentalTreeGridRow","TreeGridCell","__experimentalTreeGridCell","TreeGridItem","__experimentalTreeGridItem","TreeSelect","Truncate","__experimentalTruncate","__experimentalUnitControl","useCustomUnits","__experimentalUseCustomUnits","parseQuantityAndUnitFromRawValue","__experimentalParseQuantityAndUnitFromRawValue","View","__experimentalView","VisuallyHidden","VStack","__experimentalVStack","IsolatedEventContainer","createSlotFill","Slot","Fill","Provider","SlotFillProvider","useSlot","__experimentalUseSlot","useSlotFills","__experimentalUseSlotFills","__experimentalStyleProvider","ZStack","__experimentalZStack","navigateRegions","useNavigateRegions","__unstableUseNavigateRegions","withConstrainedTabbing","withFallbackStyles","withFilters","withFocusOutside","withFocusReturn","FocusReturnProvider","withNotices","withSpokenMessages"],"mappings":"AAAA;AACA,SACCA,GADD,EAECC,IAFD,EAGCC,MAHD,EAICC,OAJD,EAKCC,IALD,EAMCC,CAND,EAOCC,IAPD,EAQCC,cARD,EASCC,cATD,QAUO,uBAVP,C,CAYA;;AACA,SAASC,OAAO,IAAIC,oCAApB,QAAgE,4BAAhE;AACA,SACCD,OAAO,IAAIE,OADZ,EAECC,mBAAmB,IAAIC,6BAFxB,QAGO,WAHP;AAIA,SAASC,gBAAT,EAA2BC,yBAA3B,QAA4D,aAA5D;AACA,SAASN,OAAO,IAAIO,kBAApB,QAA8C,wBAA9C;AACA,SACCP,OAAO,IAAIQ,YADZ,EAECC,oBAAoB,IAAIC,8BAFzB,QAGO,gBAHP;AAIA,SAASV,OAAO,IAAIW,WAApB,EAAiCC,mBAAjC,QAA4D,gBAA5D;AACA,SACCC,gBAAgB,IAAIC,8BADrB,EAECC,eAAe,IAAIC,6BAFpB,EAGCC,eAAe,IAAIC,6BAHpB,EAICC,aAAa,IAAIC,2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CC,YAAY,IAAIC,0BANjB,QAOO,aAPP;AAQA,SAASnN,OAAO,IAAIoN,2BAApB,QAAuD,kBAAvD;AACA,SAASC,MAAM,IAAIC,oBAAnB,QAA+C,WAA/C,C,CAEA;;AACA,SACCtN,OAAO,IAAIuN,eADZ,EAECC,kBAAkB,IAAIC,4BAFvB,QAGO,iCAHP;AAIA,SAASzN,OAAO,IAAI0N,sBAApB,QAAkD,yCAAlD;AACA,SAAS1N,OAAO,IAAI2N,kBAApB,QAA8C,qCAA9C;AACA,SAAS3N,OAAO,IAAI4N,WAApB,QAAuC,6BAAvC;AACA,SAAS5N,OAAO,IAAI6N,gBAApB,QAA4C,mCAA5C;AACA,SACC7N,OAAO,IAAI8N,eADZ,EAEChB,QAAQ,IAAIiB,mBAFb,QAGO,kCAHP;AAIA,SAAS/N,OAAO,IAAIgO,WAApB,QAAuC,6BAAvC;AACA,SAAShO,OAAO,IAAIiO,kBAApB,QAA8C,qCAA9C","sourcesContent":["// Primitives.\nexport {\n\tSVG,\n\tPath,\n\tCircle,\n\tPolygon,\n\tRect,\n\tG,\n\tLine,\n\tHorizontalRule,\n\tBlockQuotation,\n} from '@wordpress/primitives';\n\n// Components.\nexport { default as __experimentalAlignmentMatrixControl } from './alignment-matrix-control';\nexport {\n\tdefault as Animate,\n\tgetAnimateClassName as __unstableGetAnimateClassName,\n} from './animate';\nexport { __unstableMotion, __unstableAnimatePresence } from './animation';\nexport { default as AnglePickerControl } from './angle-picker-control';\nexport {\n\tdefault as Autocomplete,\n\tuseAutocompleteProps as __unstableUseAutocompleteProps,\n} from './autocomplete';\nexport { default as BaseControl, useBaseControlProps } from './base-control';\nexport {\n\tBorderBoxControl as __experimentalBorderBoxControl,\n\thasSplitBorders as __experimentalHasSplitBorders,\n\tisDefinedBorder as __experimentalIsDefinedBorder,\n\tisEmptyBorder as __experimentalIsEmptyBorder,\n} from './border-box-control';\nexport { BorderControl as __experimentalBorderControl } from './border-control';\nexport {\n\tdefault as __experimentalBoxControl,\n\tapplyValueToSides as __experimentalApplyValueToSides,\n} from './box-control';\nexport { default as Button } from './button';\nexport { default as ButtonGroup } from './button-group';\nexport {\n\tCard,\n\tCardBody,\n\tCardDivider,\n\tCardFooter,\n\tCardHeader,\n\tCardMedia,\n} from './card';\nexport { default as CheckboxControl } from './checkbox-control';\nexport { default as ClipboardButton } from './clipboard-button';\nexport { default as __experimentalPaletteEdit } from './palette-edit';\nexport { default as ColorIndicator } from './color-indicator';\nexport { default as ColorPalette } from './color-palette';\nexport { ColorPicker } from './color-picker';\nexport { default as ComboboxControl } from './combobox-control';\nexport {\n\tComposite as __unstableComposite,\n\tCompositeGroup as __unstableCompositeGroup,\n\tCompositeItem as __unstableCompositeItem,\n\tuseCompositeState as __unstableUseCompositeState,\n} from './composite';\nexport { ConfirmDialog as __experimentalConfirmDialog } from './confirm-dialog';\nexport { default as CustomSelectControl } from './custom-select-control';\nexport { default as Dashicon } from './dashicon';\nexport { default as DateTimePicker, DatePicker, TimePicker } from './date-time';\nexport { default as __experimentalDimensionControl } from './dimension-control';\nexport { default as Disabled } from './disabled';\nexport { DisclosureContent as __unstableDisclosureContent } from './disclosure';\nexport { Divider as __experimentalDivider } from './divider';\nexport { default as Draggable } from './draggable';\nexport { default as DropZone } from './drop-zone';\nexport { default as DropZoneProvider } from './drop-zone/provider';\nexport { default as Dropdown } from './dropdown';\nexport { default as __experimentalDropdownContentWrapper } from './dropdown/dropdown-content-wrapper';\nexport { default as DropdownMenu } from './dropdown-menu';\nexport { DuotoneSwatch, DuotonePicker } from './duotone-picker';\nexport { Elevation as __experimentalElevation } from './elevation';\nexport { default as ExternalLink } from './external-link';\nexport { Flex, FlexBlock, FlexItem } from './flex';\nexport { default as FocalPointPicker } from './focal-point-picker';\nexport { default as FocusableIframe } from './focusable-iframe';\nexport { default as FontSizePicker } from './font-size-picker';\nexport { default as FormFileUpload } from './form-file-upload';\nexport { default as FormToggle } from './form-toggle';\nexport { default as FormTokenField } from './form-token-field';\nexport { default as GradientPicker } from './gradient-picker';\nexport { default as CustomGradientPicker } from './custom-gradient-picker';\nexport { Grid as __experimentalGrid } from './grid';\nexport { default as Guide } from './guide';\nexport { default as GuidePage } from './guide/page';\nexport { Heading as __experimentalHeading } from './heading';\nexport { HStack as __experimentalHStack } from './h-stack';\nexport { default as Icon } from './icon';\nexport { default as IconButton } from './button/deprecated';\nexport {\n\tItemGroup as __experimentalItemGroup,\n\tItem as __experimentalItem,\n} from './item-group';\nexport { default as __experimentalInputControl } from './input-control';\nexport { default as __experimentalInputControlPrefixWrapper } from './input-control/input-prefix-wrapper';\nexport { default as __experimentalInputControlSuffixWrapper } from './input-control/input-suffix-wrapper';\nexport { default as KeyboardShortcuts } from './keyboard-shortcuts';\nexport { default as MenuGroup } from './menu-group';\nexport { default as MenuItem } from './menu-item';\nexport { default as MenuItemsChoice } from './menu-items-choice';\nexport { default as Modal } from './modal';\nexport { default as ScrollLock } from './scroll-lock';\nexport { NavigableMenu, TabbableContainer } from './navigable-container';\nexport { default as __experimentalNavigation } from './navigation';\nexport { default as __experimentalNavigationBackButton } from './navigation/back-button';\nexport { default as __experimentalNavigationGroup } from './navigation/group';\nexport { default as __experimentalNavigationItem } from './navigation/item';\nexport { default as __experimentalNavigationMenu } from './navigation/menu';\nexport {\n\tNavigatorProvider as __experimentalNavigatorProvider,\n\tNavigatorScreen as __experimentalNavigatorScreen,\n\tNavigatorButton as __experimentalNavigatorButton,\n\tNavigatorBackButton as __experimentalNavigatorBackButton,\n\tuseNavigator as __experimentalUseNavigator,\n} from './navigator';\nexport { default as Notice } from './notice';\nexport { default as __experimentalNumberControl } from './number-control';\nexport { default as NoticeList } from './notice/list';\nexport { default as Panel } from './panel';\nexport { default as PanelBody } from './panel/body';\nexport { default as PanelHeader } from './panel/header';\nexport { default as PanelRow } from './panel/row';\nexport { default as Placeholder } from './placeholder';\nexport { default as Popover } from './popover';\nexport { positionToPlacement as __experimentalPopoverPositionToPlacement } from './popover/utils';\nexport { default as QueryControls } from './query-controls';\nexport { default as __experimentalRadio } from './radio-group/radio';\nexport { default as __experimentalRadioGroup } from './radio-group';\nexport { default as RadioControl } from './radio-control';\nexport { default as RangeControl } from './range-control';\nexport { default as ResizableBox } from './resizable-box';\nexport { default as ResponsiveWrapper } from './responsive-wrapper';\nexport { default as SandBox } from './sandbox';\nexport { default as SearchControl } from './search-control';\nexport { default as SelectControl } from './select-control';\nexport { default as Snackbar } from './snackbar';\nexport { default as SnackbarList } from './snackbar/list';\nexport { Spacer as __experimentalSpacer } from './spacer';\nexport { Scrollable as __experimentalScrollable } from './scrollable';\nexport { default as Spinner } from './spinner';\nexport { Surface as __experimentalSurface } from './surface';\nexport { default as TabPanel } from './tab-panel';\nexport { Text as __experimentalText } from './text';\nexport { default as TextControl } from './text-control';\nexport { default as TextareaControl } from './textarea-control';\nexport { default as TextHighlight } from './text-highlight';\nexport { default as __experimentalTheme } from './theme';\nexport { default as Tip } from './tip';\nexport { default as ToggleControl } from './toggle-control';\nexport {\n\tToggleGroupControl as __experimentalToggleGroupControl,\n\tToggleGroupControlOption as __experimentalToggleGroupControlOption,\n\tToggleGroupControlOptionIcon as __experimentalToggleGroupControlOptionIcon,\n} from './toggle-group-control';\nexport { default as Toolbar } from './toolbar';\nexport { default as ToolbarButton } from './toolbar-button';\nexport { default as ToolbarDropdownMenu } from './toolbar-dropdown-menu';\nexport { default as __experimentalToolbarContext } from './toolbar-context';\nexport { default as ToolbarGroup } from './toolbar-group';\nexport { default as ToolbarItem } from './toolbar-item';\nexport {\n\tToolsPanel as __experimentalToolsPanel,\n\tToolsPanelItem as __experimentalToolsPanelItem,\n\tToolsPanelContext as __experimentalToolsPanelContext,\n} from './tools-panel';\nexport { default as Tooltip } from './tooltip';\nexport {\n\tdefault as __experimentalTreeGrid,\n\tTreeGridRow as __experimentalTreeGridRow,\n\tTreeGridCell as __experimentalTreeGridCell,\n\tTreeGridItem as __experimentalTreeGridItem,\n} from './tree-grid';\nexport { default as TreeSelect } from './tree-select';\nexport { Truncate as __experimentalTruncate } from './truncate';\nexport {\n\tdefault as __experimentalUnitControl,\n\tuseCustomUnits as __experimentalUseCustomUnits,\n\tparseQuantityAndUnitFromRawValue as __experimentalParseQuantityAndUnitFromRawValue,\n} from './unit-control';\nexport { View as __experimentalView } from './view';\nexport { VisuallyHidden } from './visually-hidden';\nexport { VStack as __experimentalVStack } from './v-stack';\nexport { default as IsolatedEventContainer } from './isolated-event-container';\nexport {\n\tcreateSlotFill,\n\tSlot,\n\tFill,\n\tProvider as SlotFillProvider,\n\tuseSlot as __experimentalUseSlot,\n\tuseSlotFills as __experimentalUseSlotFills,\n} from './slot-fill';\nexport { default as __experimentalStyleProvider } from './style-provider';\nexport { ZStack as __experimentalZStack } from './z-stack';\n\n// Higher-Order Components.\nexport {\n\tdefault as navigateRegions,\n\tuseNavigateRegions as __unstableUseNavigateRegions,\n} from './higher-order/navigate-regions';\nexport { default as withConstrainedTabbing } from './higher-order/with-constrained-tabbing';\nexport { default as withFallbackStyles } from './higher-order/with-fallback-styles';\nexport { default as withFilters } from './higher-order/with-filters';\nexport { default as withFocusOutside } from './higher-order/with-focus-outside';\nexport {\n\tdefault as withFocusReturn,\n\tProvider as FocusReturnProvider,\n} from './higher-order/with-focus-return';\nexport { default as withNotices } from './higher-order/with-notices';\nexport { default as withSpokenMessages } from './higher-order/with-spoken-messages';\n"]}
@@ -19,6 +19,7 @@ import InputBase from './input-base';
19
19
  import InputField from './input-field';
20
20
  import { space } from '../ui/utils/space';
21
21
  import { useDraft } from './utils';
22
+ import BaseControl from '../base-control';
22
23
 
23
24
  const noop = () => {};
24
25
 
@@ -35,6 +36,7 @@ export function UnforwardedInputControl(_ref, ref) {
35
36
  __unstableInputWidth,
36
37
  className,
37
38
  disabled = false,
39
+ help,
38
40
  hideLabelFromVision = false,
39
41
  id: idProp,
40
42
  isPressEnterToChange = false,
@@ -57,11 +59,20 @@ export function UnforwardedInputControl(_ref, ref) {
57
59
  value,
58
60
  onBlur: props.onBlur,
59
61
  onChange
60
- });
61
- return createElement(InputBase, {
62
+ }); // ARIA descriptions can only contain plain text, so fall back to aria-details if not.
63
+
64
+ const helpPropName = typeof help === 'string' ? 'aria-describedby' : 'aria-details';
65
+ const helpProp = !!help ? {
66
+ [helpPropName]: `${id}__help`
67
+ } : {};
68
+ return createElement(BaseControl, {
69
+ className: classes,
70
+ help: help,
71
+ id: id,
72
+ __nextHasNoMarginBottom: true
73
+ }, createElement(InputBase, {
62
74
  __next36pxDefaultSize: __next36pxDefaultSize,
63
75
  __unstableInputWidth: __unstableInputWidth,
64
- className: classes,
65
76
  disabled: disabled,
66
77
  gap: 3,
67
78
  hideLabelFromVision: hideLabelFromVision,
@@ -74,7 +85,7 @@ export function UnforwardedInputControl(_ref, ref) {
74
85
  size: size,
75
86
  style: style,
76
87
  suffix: suffix
77
- }, createElement(InputField, _extends({}, props, {
88
+ }, createElement(InputField, _extends({}, props, helpProp, {
78
89
  __next36pxDefaultSize: __next36pxDefaultSize,
79
90
  className: "components-input-control__input",
80
91
  disabled: disabled,
@@ -89,7 +100,7 @@ export function UnforwardedInputControl(_ref, ref) {
89
100
  setIsFocused: setIsFocused,
90
101
  size: size,
91
102
  stateReducer: stateReducer
92
- }, draftHookProps)));
103
+ }, draftHookProps))));
93
104
  }
94
105
  /**
95
106
  * InputControl components let users enter and edit text. This is an experimental component