@wordpress/components 29.13.1-next.719a03cbe.0 → 30.1.1-next.46f643fa0.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 (280) hide show
  1. package/CHANGELOG.md +34 -3
  2. package/build/autocomplete/index.js +4 -0
  3. package/build/autocomplete/index.js.map +1 -1
  4. package/build/calendar/date-calendar/index.js +13 -4
  5. package/build/calendar/date-calendar/index.js.map +1 -1
  6. package/build/calendar/date-range-calendar/index.js +8 -4
  7. package/build/calendar/date-range-calendar/index.js.map +1 -1
  8. package/build/calendar/types.js.map +1 -1
  9. package/build/color-picker/styles.js +7 -7
  10. package/build/color-picker/styles.js.map +1 -1
  11. package/build/icon/index.js +2 -0
  12. package/build/icon/index.js.map +1 -1
  13. package/build/index.js +0 -19
  14. package/build/index.js.map +1 -1
  15. package/build/palette-edit/index.js +1 -1
  16. package/build/palette-edit/index.js.map +1 -1
  17. package/build/private-apis.js +9 -1
  18. package/build/private-apis.js.map +1 -1
  19. package/build/range-control/index.js +1 -1
  20. package/build/range-control/index.js.map +1 -1
  21. package/build/range-control/styles/range-control-styles.js +35 -35
  22. package/build/range-control/styles/range-control-styles.js.map +1 -1
  23. package/build/range-control/tooltip.js +15 -15
  24. package/build/range-control/tooltip.js.map +1 -1
  25. package/build/range-control/types.js.map +1 -1
  26. package/build/select-control/index.js +1 -1
  27. package/build/select-control/index.js.map +1 -1
  28. package/build/textarea-control/index.js +7 -1
  29. package/build/textarea-control/index.js.map +1 -1
  30. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  31. package/build/utils/hooks/use-controlled-value.js +8 -4
  32. package/build/utils/hooks/use-controlled-value.js.map +1 -1
  33. package/build/validated-form-controls/components/checkbox-control.js +52 -0
  34. package/build/validated-form-controls/components/checkbox-control.js.map +1 -0
  35. package/build/validated-form-controls/components/combobox-control.js +64 -0
  36. package/build/validated-form-controls/components/combobox-control.js.map +1 -0
  37. package/build/validated-form-controls/components/custom-select-control.js +71 -0
  38. package/build/validated-form-controls/components/custom-select-control.js.map +1 -0
  39. package/build/validated-form-controls/components/index.js +138 -0
  40. package/build/validated-form-controls/components/index.js.map +1 -0
  41. package/build/validated-form-controls/components/input-control.js +50 -0
  42. package/build/validated-form-controls/components/input-control.js.map +1 -0
  43. package/build/validated-form-controls/components/number-control.js +53 -0
  44. package/build/validated-form-controls/components/number-control.js.map +1 -0
  45. package/build/validated-form-controls/components/radio-control.js +51 -0
  46. package/build/validated-form-controls/components/radio-control.js.map +1 -0
  47. package/build/validated-form-controls/components/range-control.js +51 -0
  48. package/build/validated-form-controls/components/range-control.js.map +1 -0
  49. package/build/validated-form-controls/components/select-control.js +53 -0
  50. package/build/validated-form-controls/components/select-control.js.map +1 -0
  51. package/build/validated-form-controls/components/text-control.js +51 -0
  52. package/build/validated-form-controls/components/text-control.js.map +1 -0
  53. package/build/validated-form-controls/components/textarea-control.js +50 -0
  54. package/build/validated-form-controls/components/textarea-control.js.map +1 -0
  55. package/build/validated-form-controls/components/toggle-control.js +60 -0
  56. package/build/validated-form-controls/components/toggle-control.js.map +1 -0
  57. package/build/validated-form-controls/components/toggle-group-control.js +69 -0
  58. package/build/validated-form-controls/components/toggle-group-control.js.map +1 -0
  59. package/build/validated-form-controls/components/types.js +6 -0
  60. package/build/validated-form-controls/components/types.js.map +1 -0
  61. package/build/validated-form-controls/control-with-error.js +137 -0
  62. package/build/validated-form-controls/control-with-error.js.map +1 -0
  63. package/build/validated-form-controls/index.js +28 -0
  64. package/build/validated-form-controls/index.js.map +1 -0
  65. package/build-module/autocomplete/index.js +4 -0
  66. package/build-module/autocomplete/index.js.map +1 -1
  67. package/build-module/calendar/date-calendar/index.js +11 -3
  68. package/build-module/calendar/date-calendar/index.js.map +1 -1
  69. package/build-module/calendar/date-range-calendar/index.js +8 -4
  70. package/build-module/calendar/date-range-calendar/index.js.map +1 -1
  71. package/build-module/calendar/types.js.map +1 -1
  72. package/build-module/color-picker/styles.js +7 -7
  73. package/build-module/color-picker/styles.js.map +1 -1
  74. package/build-module/icon/index.js +2 -0
  75. package/build-module/icon/index.js.map +1 -1
  76. package/build-module/index.js +0 -1
  77. package/build-module/index.js.map +1 -1
  78. package/build-module/palette-edit/index.js +2 -2
  79. package/build-module/palette-edit/index.js.map +1 -1
  80. package/build-module/private-apis.js +9 -1
  81. package/build-module/private-apis.js.map +1 -1
  82. package/build-module/range-control/index.js +1 -1
  83. package/build-module/range-control/index.js.map +1 -1
  84. package/build-module/range-control/styles/range-control-styles.js +35 -35
  85. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  86. package/build-module/range-control/tooltip.js +15 -15
  87. package/build-module/range-control/tooltip.js.map +1 -1
  88. package/build-module/range-control/types.js.map +1 -1
  89. package/build-module/select-control/index.js +1 -1
  90. package/build-module/select-control/index.js.map +1 -1
  91. package/build-module/textarea-control/index.js +7 -1
  92. package/build-module/textarea-control/index.js.map +1 -1
  93. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  94. package/build-module/utils/hooks/use-controlled-value.js +9 -5
  95. package/build-module/utils/hooks/use-controlled-value.js.map +1 -1
  96. package/build-module/validated-form-controls/components/checkbox-control.js +44 -0
  97. package/build-module/validated-form-controls/components/checkbox-control.js.map +1 -0
  98. package/build-module/validated-form-controls/components/combobox-control.js +56 -0
  99. package/build-module/validated-form-controls/components/combobox-control.js.map +1 -0
  100. package/build-module/validated-form-controls/components/custom-select-control.js +63 -0
  101. package/build-module/validated-form-controls/components/custom-select-control.js.map +1 -0
  102. package/build-module/validated-form-controls/components/index.js +13 -0
  103. package/build-module/validated-form-controls/components/index.js.map +1 -0
  104. package/build-module/validated-form-controls/components/input-control.js +42 -0
  105. package/build-module/validated-form-controls/components/input-control.js.map +1 -0
  106. package/build-module/validated-form-controls/components/number-control.js +45 -0
  107. package/build-module/validated-form-controls/components/number-control.js.map +1 -0
  108. package/build-module/validated-form-controls/components/radio-control.js +43 -0
  109. package/build-module/validated-form-controls/components/radio-control.js.map +1 -0
  110. package/build-module/validated-form-controls/components/range-control.js +43 -0
  111. package/build-module/validated-form-controls/components/range-control.js.map +1 -0
  112. package/build-module/validated-form-controls/components/select-control.js +45 -0
  113. package/build-module/validated-form-controls/components/select-control.js.map +1 -0
  114. package/build-module/validated-form-controls/components/text-control.js +43 -0
  115. package/build-module/validated-form-controls/components/text-control.js.map +1 -0
  116. package/build-module/validated-form-controls/components/textarea-control.js +42 -0
  117. package/build-module/validated-form-controls/components/textarea-control.js.map +1 -0
  118. package/build-module/validated-form-controls/components/toggle-control.js +52 -0
  119. package/build-module/validated-form-controls/components/toggle-control.js.map +1 -0
  120. package/build-module/validated-form-controls/components/toggle-group-control.js +62 -0
  121. package/build-module/validated-form-controls/components/toggle-group-control.js.map +1 -0
  122. package/build-module/validated-form-controls/components/types.js +2 -0
  123. package/build-module/validated-form-controls/components/types.js.map +1 -0
  124. package/build-module/validated-form-controls/control-with-error.js +129 -0
  125. package/build-module/validated-form-controls/control-with-error.js.map +1 -0
  126. package/build-module/validated-form-controls/index.js +3 -0
  127. package/build-module/validated-form-controls/index.js.map +1 -0
  128. package/build-style/style-rtl.css +79 -67
  129. package/build-style/style.css +79 -67
  130. package/build-types/autocomplete/index.d.ts.map +1 -1
  131. package/build-types/box-control/utils.d.ts +7 -7
  132. package/build-types/calendar/date-calendar/index.d.ts.map +1 -1
  133. package/build-types/calendar/date-range-calendar/index.d.ts.map +1 -1
  134. package/build-types/calendar/types.d.ts +2 -2
  135. package/build-types/calendar/types.d.ts.map +1 -1
  136. package/build-types/calendar/utils/use-localization-props.d.ts +3 -3
  137. package/build-types/color-picker/styles.d.ts.map +1 -1
  138. package/build-types/custom-gradient-picker/constants.d.ts +2 -2
  139. package/build-types/dimension-control/sizes.d.ts +5 -5
  140. package/build-types/font-size-picker/constants.d.ts +2 -2
  141. package/build-types/font-size-picker/constants.d.ts.map +1 -1
  142. package/build-types/icon/index.d.ts.map +1 -1
  143. package/build-types/index.d.ts +0 -1
  144. package/build-types/index.d.ts.map +1 -1
  145. package/build-types/private-apis.d.ts.map +1 -1
  146. package/build-types/range-control/types.d.ts +2 -2
  147. package/build-types/range-control/types.d.ts.map +1 -1
  148. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  149. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  150. package/build-types/textarea-control/index.d.ts.map +1 -1
  151. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  152. package/build-types/utils/hooks/use-controlled-value.d.ts +2 -2
  153. package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
  154. package/build-types/validated-form-controls/components/checkbox-control.d.ts +9 -0
  155. package/build-types/validated-form-controls/components/checkbox-control.d.ts.map +1 -0
  156. package/build-types/validated-form-controls/components/combobox-control.d.ts +21 -0
  157. package/build-types/validated-form-controls/components/combobox-control.d.ts.map +1 -0
  158. package/build-types/validated-form-controls/components/custom-select-control.d.ts +4 -0
  159. package/build-types/validated-form-controls/components/custom-select-control.d.ts.map +1 -0
  160. package/build-types/validated-form-controls/components/index.d.ts +13 -0
  161. package/build-types/validated-form-controls/components/index.d.ts.map +1 -0
  162. package/build-types/validated-form-controls/components/input-control.d.ts +4 -0
  163. package/build-types/validated-form-controls/components/input-control.d.ts.map +1 -0
  164. package/build-types/validated-form-controls/components/number-control.d.ts +17 -0
  165. package/build-types/validated-form-controls/components/number-control.d.ts.map +1 -0
  166. package/build-types/validated-form-controls/components/radio-control.d.ts +11 -0
  167. package/build-types/validated-form-controls/components/radio-control.d.ts.map +1 -0
  168. package/build-types/validated-form-controls/components/range-control.d.ts +36 -0
  169. package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -0
  170. package/build-types/validated-form-controls/components/select-control.d.ts +9 -0
  171. package/build-types/validated-form-controls/components/select-control.d.ts.map +1 -0
  172. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts +12 -0
  173. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -0
  174. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +12 -0
  175. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -0
  176. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +12 -0
  177. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -0
  178. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +18 -0
  179. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -0
  180. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts +12 -0
  181. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -0
  182. package/build-types/validated-form-controls/components/stories/overview.story.d.ts +19 -0
  183. package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -0
  184. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts +12 -0
  185. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -0
  186. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +9 -0
  187. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -0
  188. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts +12 -0
  189. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -0
  190. package/build-types/validated-form-controls/components/stories/story-utils.d.ts +9 -0
  191. package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +1 -0
  192. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts +9 -0
  193. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -0
  194. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +9 -0
  195. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -0
  196. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +9 -0
  197. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -0
  198. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +9 -0
  199. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -0
  200. package/build-types/validated-form-controls/components/text-control.d.ts +8 -0
  201. package/build-types/validated-form-controls/components/text-control.d.ts.map +1 -0
  202. package/build-types/validated-form-controls/components/textarea-control.d.ts +7 -0
  203. package/build-types/validated-form-controls/components/textarea-control.d.ts.map +1 -0
  204. package/build-types/validated-form-controls/components/toggle-control.d.ts +7 -0
  205. package/build-types/validated-form-controls/components/toggle-control.d.ts.map +1 -0
  206. package/build-types/validated-form-controls/components/toggle-group-control.d.ts +15 -0
  207. package/build-types/validated-form-controls/components/toggle-group-control.d.ts.map +1 -0
  208. package/build-types/validated-form-controls/components/types.d.ts +27 -0
  209. package/build-types/validated-form-controls/components/types.d.ts.map +1 -0
  210. package/build-types/validated-form-controls/control-with-error.d.ts +36 -0
  211. package/build-types/validated-form-controls/control-with-error.d.ts.map +1 -0
  212. package/build-types/validated-form-controls/index.d.ts +3 -0
  213. package/build-types/validated-form-controls/index.d.ts.map +1 -0
  214. package/package.json +19 -19
  215. package/src/autocomplete/index.tsx +4 -0
  216. package/src/calendar/date-calendar/README.md +57 -46
  217. package/src/calendar/date-calendar/index.tsx +22 -8
  218. package/src/calendar/date-range-calendar/README.md +63 -52
  219. package/src/calendar/date-range-calendar/index.tsx +23 -11
  220. package/src/calendar/types.ts +2 -2
  221. package/src/color-picker/styles.ts +10 -0
  222. package/src/dimension-control/test/__snapshots__/index.test.js.snap +8 -8
  223. package/src/icon/index.tsx +2 -0
  224. package/src/index.ts +0 -1
  225. package/src/modal/style.scss +2 -2
  226. package/src/palette-edit/index.tsx +3 -3
  227. package/src/private-apis.ts +13 -0
  228. package/src/range-control/index.tsx +1 -1
  229. package/src/range-control/styles/range-control-styles.ts +3 -3
  230. package/src/range-control/tooltip.tsx +13 -13
  231. package/src/range-control/types.ts +2 -2
  232. package/src/select-control/index.tsx +1 -1
  233. package/src/style.scss +2 -2
  234. package/src/text-control/stories/index.story.tsx +1 -0
  235. package/src/text-control/style.scss +6 -1
  236. package/src/textarea-control/index.tsx +8 -1
  237. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +3 -1
  238. package/src/utils/hooks/use-controlled-value.ts +16 -8
  239. package/src/utils/theme-variables.scss +3 -0
  240. package/src/validated-form-controls/components/checkbox-control.tsx +64 -0
  241. package/src/validated-form-controls/components/combobox-control.tsx +77 -0
  242. package/src/validated-form-controls/components/custom-select-control.tsx +86 -0
  243. package/src/validated-form-controls/components/index.ts +12 -0
  244. package/src/validated-form-controls/components/input-control.tsx +59 -0
  245. package/src/validated-form-controls/components/number-control.tsx +61 -0
  246. package/src/validated-form-controls/components/radio-control.tsx +60 -0
  247. package/src/validated-form-controls/components/range-control.tsx +60 -0
  248. package/src/validated-form-controls/components/select-control.tsx +75 -0
  249. package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +57 -0
  250. package/src/validated-form-controls/components/stories/combobox-control.story.tsx +64 -0
  251. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +64 -0
  252. package/src/validated-form-controls/components/stories/input-control.story.tsx +132 -0
  253. package/src/validated-form-controls/components/stories/number-control.story.tsx +62 -0
  254. package/src/validated-form-controls/components/stories/overview.mdx +52 -0
  255. package/src/validated-form-controls/components/stories/overview.story.tsx +100 -0
  256. package/src/validated-form-controls/components/stories/radio-control.story.tsx +64 -0
  257. package/src/validated-form-controls/components/stories/range-control.story.tsx +60 -0
  258. package/src/validated-form-controls/components/stories/select-control.story.tsx +60 -0
  259. package/src/validated-form-controls/components/stories/story-utils.tsx +46 -0
  260. package/src/validated-form-controls/components/stories/text-control.story.tsx +55 -0
  261. package/src/validated-form-controls/components/stories/textarea-control.story.tsx +52 -0
  262. package/src/validated-form-controls/components/stories/toggle-control.story.tsx +55 -0
  263. package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +66 -0
  264. package/src/validated-form-controls/components/text-control.tsx +60 -0
  265. package/src/validated-form-controls/components/textarea-control.tsx +59 -0
  266. package/src/validated-form-controls/components/toggle-control.tsx +69 -0
  267. package/src/validated-form-controls/components/toggle-group-control.tsx +82 -0
  268. package/src/validated-form-controls/components/types.ts +28 -0
  269. package/src/validated-form-controls/control-with-error.tsx +198 -0
  270. package/src/validated-form-controls/index.ts +2 -0
  271. package/src/validated-form-controls/style.scss +75 -0
  272. package/tsconfig.tsbuildinfo +1 -1
  273. package/build/calendar/utils/use-controlled-value.js +0 -58
  274. package/build/calendar/utils/use-controlled-value.js.map +0 -1
  275. package/build-module/calendar/utils/use-controlled-value.js +0 -51
  276. package/build-module/calendar/utils/use-controlled-value.js.map +0 -1
  277. package/build-types/calendar/utils/use-controlled-value.d.ts +0 -27
  278. package/build-types/calendar/utils/use-controlled-value.d.ts.map +0 -1
  279. package/src/calendar/utils/use-controlled-value.ts +0 -61
  280. package/src/dimension-control/style.scss +0 -22
@@ -0,0 +1,129 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import { error } from '@wordpress/icons';
6
+
7
+ /**
8
+ * External dependencies
9
+ */
10
+ import { cloneElement, forwardRef, useEffect, useState } from '@wordpress/element';
11
+
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+ import { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';
16
+ import Icon from '../icon';
17
+ import { Fragment as _Fragment, jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
18
+ function appendRequiredIndicator(label, required, markWhenOptional) {
19
+ if (required && !markWhenOptional) {
20
+ return /*#__PURE__*/_jsxs(_Fragment, {
21
+ children: [label, " ", `(${__('Required')})`]
22
+ });
23
+ }
24
+ if (!required && markWhenOptional) {
25
+ return /*#__PURE__*/_jsxs(_Fragment, {
26
+ children: [label, " ", `(${__('Optional')})`]
27
+ });
28
+ }
29
+ return label;
30
+ }
31
+
32
+ /**
33
+ * HTML elements that support the Constraint Validation API.
34
+ *
35
+ * Here, we exclude HTMLButtonElement because although it does technically support the API,
36
+ * normal buttons are actually exempted from any validation.
37
+ * @see https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Form_validation
38
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/willValidate
39
+ */
40
+
41
+ function UnforwardedControlWithError({
42
+ required,
43
+ markWhenOptional,
44
+ customValidator,
45
+ getValidityTarget,
46
+ children
47
+ }, forwardedRef) {
48
+ const [errorMessage, setErrorMessage] = useState();
49
+ const [isTouched, setIsTouched] = useState(false);
50
+
51
+ // Ensure that error messages are visible after user attemps to submit a form
52
+ // with multiple invalid fields.
53
+ useEffect(() => {
54
+ const validityTarget = getValidityTarget();
55
+ const showValidationMessage = () => setErrorMessage(validityTarget?.validationMessage);
56
+ validityTarget?.addEventListener('invalid', showValidationMessage);
57
+ return () => {
58
+ validityTarget?.removeEventListener('invalid', showValidationMessage);
59
+ };
60
+ });
61
+ const validate = () => {
62
+ const message = customValidator?.();
63
+ const validityTarget = getValidityTarget();
64
+ validityTarget?.setCustomValidity(message !== null && message !== void 0 ? message : '');
65
+ setErrorMessage(validityTarget?.validationMessage);
66
+ };
67
+ const onBlur = event => {
68
+ // Only consider "blurred from the component" if focus has fully left the wrapping div.
69
+ // This prevents unnecessary blurs from components with multiple focusable elements.
70
+ if (!event.relatedTarget || !event.currentTarget.contains(event.relatedTarget)) {
71
+ setIsTouched(true);
72
+ const validityTarget = getValidityTarget();
73
+
74
+ // Prevents a double flash of the native error tooltip when the control is already showing one.
75
+ if (!validityTarget?.validity.valid) {
76
+ if (!errorMessage) {
77
+ setErrorMessage(validityTarget?.validationMessage);
78
+ }
79
+ return;
80
+ }
81
+ validate();
82
+ }
83
+ };
84
+ const onChange = (...args) => {
85
+ children.props.onChange?.(...args);
86
+
87
+ // Only validate incrementally if the field has blurred at least once,
88
+ // or currently has an error message.
89
+ if (isTouched || errorMessage) {
90
+ validate();
91
+ }
92
+ };
93
+ const onKeyDown = event => {
94
+ // Ensures that custom validators are triggered when the user submits by pressing Enter,
95
+ // without ever blurring the control.
96
+ if (event.key === 'Enter') {
97
+ validate();
98
+ }
99
+ };
100
+ return (
101
+ /*#__PURE__*/
102
+ // Disable reason: Just listening to a bubbled event, not for interaction.
103
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
104
+ _jsxs("div", {
105
+ className: "components-validated-control",
106
+ ref: forwardedRef,
107
+ onBlur: onBlur,
108
+ onKeyDown: withIgnoreIMEEvents(onKeyDown),
109
+ children: [cloneElement(children, {
110
+ label: appendRequiredIndicator(children.props.label, required, markWhenOptional),
111
+ onChange,
112
+ required
113
+ }), /*#__PURE__*/_jsx("div", {
114
+ "aria-live": "polite",
115
+ children: errorMessage && /*#__PURE__*/_jsxs("p", {
116
+ className: "components-validated-control__error",
117
+ children: [/*#__PURE__*/_jsx(Icon, {
118
+ className: "components-validated-control__error-icon",
119
+ icon: error,
120
+ size: 16,
121
+ fill: "currentColor"
122
+ }), errorMessage]
123
+ })
124
+ })]
125
+ })
126
+ );
127
+ }
128
+ export const ControlWithError = forwardRef(UnforwardedControlWithError);
129
+ //# sourceMappingURL=control-with-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__","error","cloneElement","forwardRef","useEffect","useState","withIgnoreIMEEvents","Icon","Fragment","_Fragment","jsxs","_jsxs","jsx","_jsx","appendRequiredIndicator","label","required","markWhenOptional","children","UnforwardedControlWithError","customValidator","getValidityTarget","forwardedRef","errorMessage","setErrorMessage","isTouched","setIsTouched","validityTarget","showValidationMessage","validationMessage","addEventListener","removeEventListener","validate","message","setCustomValidity","onBlur","event","relatedTarget","currentTarget","contains","validity","valid","onChange","args","props","onKeyDown","key","className","ref","icon","size","fill","ControlWithError"],"sources":["@wordpress/components/src/validated-form-controls/control-with-error.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { error } from '@wordpress/icons';\n\n/**\n * External dependencies\n */\nimport {\n\tcloneElement,\n\tforwardRef,\n\tuseEffect,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\nimport Icon from '../icon';\n\nfunction appendRequiredIndicator(\n\tlabel: React.ReactNode,\n\trequired: boolean | undefined,\n\tmarkWhenOptional: boolean | undefined\n) {\n\tif ( required && ! markWhenOptional ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ label } { `(${ __( 'Required' ) })` }\n\t\t\t</>\n\t\t);\n\t}\n\tif ( ! required && markWhenOptional ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ label } { `(${ __( 'Optional' ) })` }\n\t\t\t</>\n\t\t);\n\t}\n\treturn label;\n}\n\n/**\n * HTML elements that support the Constraint Validation API.\n *\n * Here, we exclude HTMLButtonElement because although it does technically support the API,\n * normal buttons are actually exempted from any validation.\n * @see https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Form_validation\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/willValidate\n */\ntype ValidityTarget =\n\t| HTMLFieldSetElement\n\t| HTMLInputElement\n\t| HTMLSelectElement\n\t| HTMLTextAreaElement;\n\nfunction UnforwardedControlWithError< C extends React.ReactElement >(\n\t{\n\t\trequired,\n\t\tmarkWhenOptional,\n\t\tcustomValidator,\n\t\tgetValidityTarget,\n\t\tchildren,\n\t}: {\n\t\t/**\n\t\t * Whether the control is required.\n\t\t */\n\t\trequired?: boolean;\n\t\t/**\n\t\t * Label the control as \"optional\" when _not_ `required`, instead of the inverse.\n\t\t */\n\t\tmarkWhenOptional?: boolean;\n\t\t/**\n\t\t * A function that returns a custom validity message when applicable.\n\t\t *\n\t\t * This message will be applied to the element returned by `getValidityTarget`.\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/setCustomValidity\n\t\t */\n\t\tcustomValidator?: () => string | void;\n\t\t/**\n\t\t * A function that returns the actual element on which the validity data should be applied.\n\t\t */\n\t\tgetValidityTarget: () => ValidityTarget | null | undefined;\n\t\t/**\n\t\t * The control component to apply validation to.\n\t\t */\n\t\tchildren: C;\n\t},\n\tforwardedRef: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst [ errorMessage, setErrorMessage ] = useState< string | undefined >();\n\tconst [ isTouched, setIsTouched ] = useState( false );\n\n\t// Ensure that error messages are visible after user attemps to submit a form\n\t// with multiple invalid fields.\n\tuseEffect( () => {\n\t\tconst validityTarget = getValidityTarget();\n\t\tconst showValidationMessage = () =>\n\t\t\tsetErrorMessage( validityTarget?.validationMessage );\n\n\t\tvalidityTarget?.addEventListener( 'invalid', showValidationMessage );\n\n\t\treturn () => {\n\t\t\tvalidityTarget?.removeEventListener(\n\t\t\t\t'invalid',\n\t\t\t\tshowValidationMessage\n\t\t\t);\n\t\t};\n\t} );\n\n\tconst validate = () => {\n\t\tconst message = customValidator?.();\n\t\tconst validityTarget = getValidityTarget();\n\n\t\tvalidityTarget?.setCustomValidity( message ?? '' );\n\t\tsetErrorMessage( validityTarget?.validationMessage );\n\t};\n\n\tconst onBlur = ( event: React.FocusEvent< HTMLDivElement > ) => {\n\t\t// Only consider \"blurred from the component\" if focus has fully left the wrapping div.\n\t\t// This prevents unnecessary blurs from components with multiple focusable elements.\n\t\tif (\n\t\t\t! event.relatedTarget ||\n\t\t\t! event.currentTarget.contains( event.relatedTarget )\n\t\t) {\n\t\t\tsetIsTouched( true );\n\n\t\t\tconst validityTarget = getValidityTarget();\n\n\t\t\t// Prevents a double flash of the native error tooltip when the control is already showing one.\n\t\t\tif ( ! validityTarget?.validity.valid ) {\n\t\t\t\tif ( ! errorMessage ) {\n\t\t\t\t\tsetErrorMessage( validityTarget?.validationMessage );\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvalidate();\n\t\t}\n\t};\n\n\tconst onChange = ( ...args: unknown[] ) => {\n\t\tchildren.props.onChange?.( ...args );\n\n\t\t// Only validate incrementally if the field has blurred at least once,\n\t\t// or currently has an error message.\n\t\tif ( isTouched || errorMessage ) {\n\t\t\tvalidate();\n\t\t}\n\t};\n\n\tconst onKeyDown = ( event: React.KeyboardEvent< HTMLDivElement > ) => {\n\t\t// Ensures that custom validators are triggered when the user submits by pressing Enter,\n\t\t// without ever blurring the control.\n\t\tif ( event.key === 'Enter' ) {\n\t\t\tvalidate();\n\t\t}\n\t};\n\n\treturn (\n\t\t// Disable reason: Just listening to a bubbled event, not for interaction.\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"components-validated-control\"\n\t\t\tref={ forwardedRef }\n\t\t\tonBlur={ onBlur }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( onKeyDown ) }\n\t\t>\n\t\t\t{ cloneElement( children, {\n\t\t\t\tlabel: appendRequiredIndicator(\n\t\t\t\t\tchildren.props.label,\n\t\t\t\t\trequired,\n\t\t\t\t\tmarkWhenOptional\n\t\t\t\t),\n\t\t\t\tonChange,\n\t\t\t\trequired,\n\t\t\t} ) }\n\t\t\t<div aria-live=\"polite\">\n\t\t\t\t{ errorMessage && (\n\t\t\t\t\t<p className=\"components-validated-control__error\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"components-validated-control__error-icon\"\n\t\t\t\t\t\t\ticon={ error }\n\t\t\t\t\t\t\tsize={ 16 }\n\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ errorMessage }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport const ControlWithError = forwardRef( UnforwardedControlWithError );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,QAAQ,kBAAkB;;AAExC;AACA;AACA;AACA,SACCC,YAAY,EACZC,UAAU,EACVC,SAAS,EACTC,QAAQ,QACF,oBAAoB;;AAE3B;AACA;AACA;AACA,SAASC,mBAAmB,QAAQ,iCAAiC;AAErE,OAAOC,IAAI,MAAM,SAAS;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA,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AAED,uBAAuB,CAC7BI,QAAQ,CAAC0B,KAAK,CAAC7B,KAAK,EACpBC,QAAQ,EACRC,gBACD,CAAC;QACDyB,QAAQ;QACR1B;MACD,CAAE,CAAC,eACHH,IAAA;QAAK,aAAU,QAAQ;QAAAK,QAAA,EACpBK,YAAY,iBACbZ,KAAA;UAAGoC,SAAS,EAAC,qCAAqC;UAAA7B,QAAA,gBACjDL,IAAA,CAACN,IAAI;YACJwC,SAAS,EAAC,0CAA0C;YACpDE,IAAI,EAAGhD,KAAO;YACdiD,IAAI,EAAG,EAAI;YACXC,IAAI,EAAC;UAAc,CACnB,CAAC,EACA5B,YAAY;QAAA,CACZ;MACH,CACG,CAAC;IAAA,CACF;EAAC;AAER;AAEA,OAAO,MAAM6B,gBAAgB,GAAGjD,UAAU,CAAEgB,2BAA4B,CAAC","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ export * from './control-with-error';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/validated-form-controls/index.ts"],"sourcesContent":["export * from './components';\nexport * from './control-with-error';\n"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,sBAAsB","ignoreList":[]}
@@ -1484,23 +1484,6 @@ input.components-combobox-control__input[type=text]:focus {
1484
1484
  z-index: 0;
1485
1485
  }
1486
1486
 
1487
- .block-editor-dimension-control .components-base-control__field {
1488
- display: flex;
1489
- align-items: center;
1490
- }
1491
- .block-editor-dimension-control .components-base-control__label {
1492
- display: flex;
1493
- align-items: center;
1494
- margin-left: 1em;
1495
- margin-bottom: 0;
1496
- }
1497
- .block-editor-dimension-control .components-base-control__label .dashicon {
1498
- margin-left: 0.5em;
1499
- }
1500
- .block-editor-dimension-control.is-manual .components-base-control__label {
1501
- width: 10em;
1502
- }
1503
-
1504
1487
  body.is-dragging-components-draggable {
1505
1488
  cursor: move; /* Fallback for IE/Edge < 14 */
1506
1489
  cursor: grabbing !important;
@@ -2035,7 +2018,7 @@ body.is-dragging-components-draggable {
2035
2018
  border-bottom: none;
2036
2019
  padding: 0;
2037
2020
  position: sticky;
2038
- height: 60px;
2021
+ height: 64px;
2039
2022
  }
2040
2023
  .components-guide .components-modal__header .components-button {
2041
2024
  align-self: flex-start;
@@ -2049,7 +2032,7 @@ body.is-dragging-components-draggable {
2049
2032
  display: flex;
2050
2033
  flex-direction: column;
2051
2034
  justify-content: space-between;
2052
- margin-top: -60px;
2035
+ margin-top: -64px;
2053
2036
  min-height: 100%;
2054
2037
  }
2055
2038
  .components-guide .components-guide__page {
@@ -2346,7 +2329,7 @@ body.is-dragging-components-draggable {
2346
2329
  width: auto;
2347
2330
  min-width: 350px;
2348
2331
  max-width: calc(100% - 32px);
2349
- max-height: calc(100% - 120px);
2332
+ max-height: calc(100% - 128px);
2350
2333
  }
2351
2334
  }
2352
2335
  @media (min-width: 600px) and (min-width: 600px) {
@@ -3518,6 +3501,7 @@ body.lockscroll {
3518
3501
  box-shadow: 0 0 0 transparent;
3519
3502
  border-radius: 2px;
3520
3503
  border: 1px solid #949494;
3504
+ border-color: var(--wp-components-color-gray-600, #949494);
3521
3505
  }
3522
3506
  @media not (prefers-reduced-motion) {
3523
3507
  .components-text-control__input,
@@ -3575,53 +3559,21 @@ body.lockscroll {
3575
3559
  box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
3576
3560
  outline: 2px solid transparent;
3577
3561
  }
3578
- .components-text-control__input::-webkit-input-placeholder,
3579
- .components-text-control__input[type=text]::-webkit-input-placeholder,
3580
- .components-text-control__input[type=tel]::-webkit-input-placeholder,
3581
- .components-text-control__input[type=time]::-webkit-input-placeholder,
3582
- .components-text-control__input[type=url]::-webkit-input-placeholder,
3583
- .components-text-control__input[type=week]::-webkit-input-placeholder,
3584
- .components-text-control__input[type=password]::-webkit-input-placeholder,
3585
- .components-text-control__input[type=color]::-webkit-input-placeholder,
3586
- .components-text-control__input[type=date]::-webkit-input-placeholder,
3587
- .components-text-control__input[type=datetime]::-webkit-input-placeholder,
3588
- .components-text-control__input[type=datetime-local]::-webkit-input-placeholder,
3589
- .components-text-control__input[type=email]::-webkit-input-placeholder,
3590
- .components-text-control__input[type=month]::-webkit-input-placeholder,
3591
- .components-text-control__input[type=number]::-webkit-input-placeholder {
3592
- color: rgba(30, 30, 30, 0.62);
3593
- }
3594
- .components-text-control__input::-moz-placeholder,
3595
- .components-text-control__input[type=text]::-moz-placeholder,
3596
- .components-text-control__input[type=tel]::-moz-placeholder,
3597
- .components-text-control__input[type=time]::-moz-placeholder,
3598
- .components-text-control__input[type=url]::-moz-placeholder,
3599
- .components-text-control__input[type=week]::-moz-placeholder,
3600
- .components-text-control__input[type=password]::-moz-placeholder,
3601
- .components-text-control__input[type=color]::-moz-placeholder,
3602
- .components-text-control__input[type=date]::-moz-placeholder,
3603
- .components-text-control__input[type=datetime]::-moz-placeholder,
3604
- .components-text-control__input[type=datetime-local]::-moz-placeholder,
3605
- .components-text-control__input[type=email]::-moz-placeholder,
3606
- .components-text-control__input[type=month]::-moz-placeholder,
3607
- .components-text-control__input[type=number]::-moz-placeholder {
3608
- color: rgba(30, 30, 30, 0.62);
3609
- }
3610
- .components-text-control__input:-ms-input-placeholder,
3611
- .components-text-control__input[type=text]:-ms-input-placeholder,
3612
- .components-text-control__input[type=tel]:-ms-input-placeholder,
3613
- .components-text-control__input[type=time]:-ms-input-placeholder,
3614
- .components-text-control__input[type=url]:-ms-input-placeholder,
3615
- .components-text-control__input[type=week]:-ms-input-placeholder,
3616
- .components-text-control__input[type=password]:-ms-input-placeholder,
3617
- .components-text-control__input[type=color]:-ms-input-placeholder,
3618
- .components-text-control__input[type=date]:-ms-input-placeholder,
3619
- .components-text-control__input[type=datetime]:-ms-input-placeholder,
3620
- .components-text-control__input[type=datetime-local]:-ms-input-placeholder,
3621
- .components-text-control__input[type=email]:-ms-input-placeholder,
3622
- .components-text-control__input[type=month]:-ms-input-placeholder,
3623
- .components-text-control__input[type=number]:-ms-input-placeholder {
3624
- color: rgba(30, 30, 30, 0.62);
3562
+ .components-text-control__input::placeholder,
3563
+ .components-text-control__input[type=text]::placeholder,
3564
+ .components-text-control__input[type=tel]::placeholder,
3565
+ .components-text-control__input[type=time]::placeholder,
3566
+ .components-text-control__input[type=url]::placeholder,
3567
+ .components-text-control__input[type=week]::placeholder,
3568
+ .components-text-control__input[type=password]::placeholder,
3569
+ .components-text-control__input[type=color]::placeholder,
3570
+ .components-text-control__input[type=date]::placeholder,
3571
+ .components-text-control__input[type=datetime]::placeholder,
3572
+ .components-text-control__input[type=datetime-local]::placeholder,
3573
+ .components-text-control__input[type=email]::placeholder,
3574
+ .components-text-control__input[type=month]::placeholder,
3575
+ .components-text-control__input[type=number]::placeholder {
3576
+ color: color-mix(in srgb, var(--wp-components-color-foreground, #1e1e1e), transparent 38%);
3625
3577
  }
3626
3578
  .components-text-control__input.is-next-40px-default-size,
3627
3579
  .components-text-control__input[type=text].is-next-40px-default-size,
@@ -3866,4 +3818,64 @@ div.components-toolbar > div + div.has-left-divider::before {
3866
3818
 
3867
3819
  .components-tooltip__shortcut {
3868
3820
  margin-right: 8px;
3821
+ }
3822
+
3823
+ .components-validated-control:has(:is(input, select):user-invalid) .components-input-control__backdrop {
3824
+ --wp-components-color-accent: $alert-red;
3825
+ border-color: #cc1818;
3826
+ }
3827
+ .components-validated-control :is(textarea, input[type=text]):user-invalid {
3828
+ --wp-admin-theme-color: $alert-red;
3829
+ --wp-components-color-accent: $alert-red;
3830
+ border-color: #cc1818;
3831
+ }
3832
+ .components-validated-control .components-combobox-control__suggestions-container:has(input:user-invalid):not(:has([aria-expanded=true])) {
3833
+ border-color: #cc1818;
3834
+ }
3835
+
3836
+ .components-validated-control__wrapper-with-error-delegate {
3837
+ position: relative;
3838
+ }
3839
+ .components-validated-control__wrapper-with-error-delegate:has(select:user-invalid) .components-input-control__backdrop {
3840
+ --wp-components-color-accent: $alert-red;
3841
+ border-color: #cc1818;
3842
+ }
3843
+ .components-validated-control__wrapper-with-error-delegate:has(input[type=radio]:invalid) {
3844
+ --wp-components-color-accent: $alert-red;
3845
+ }
3846
+
3847
+ .components-validated-control__error-delegate {
3848
+ position: absolute;
3849
+ top: 0;
3850
+ height: 100%;
3851
+ width: 100%;
3852
+ opacity: 0;
3853
+ pointer-events: none;
3854
+ }
3855
+
3856
+ .components-validated-control__error {
3857
+ display: flex;
3858
+ align-items: flex-start;
3859
+ gap: 4px;
3860
+ margin: 8px 0 0;
3861
+ font-family: -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
3862
+ font-size: 0.75rem;
3863
+ line-height: 16px;
3864
+ color: #cc1818;
3865
+ animation: components-validated-control__error-jump 0.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
3866
+ }
3867
+
3868
+ .components-validated-control__error-icon {
3869
+ flex-shrink: 0;
3870
+ }
3871
+
3872
+ @keyframes components-validated-control__error-jump {
3873
+ 0% {
3874
+ transform: translateY(-4px);
3875
+ opacity: 0;
3876
+ }
3877
+ 100% {
3878
+ transform: translateY(0);
3879
+ opacity: 1;
3880
+ }
3869
3881
  }
@@ -1489,23 +1489,6 @@ input.components-combobox-control__input[type=text]:focus {
1489
1489
  z-index: 0;
1490
1490
  }
1491
1491
 
1492
- .block-editor-dimension-control .components-base-control__field {
1493
- display: flex;
1494
- align-items: center;
1495
- }
1496
- .block-editor-dimension-control .components-base-control__label {
1497
- display: flex;
1498
- align-items: center;
1499
- margin-right: 1em;
1500
- margin-bottom: 0;
1501
- }
1502
- .block-editor-dimension-control .components-base-control__label .dashicon {
1503
- margin-right: 0.5em;
1504
- }
1505
- .block-editor-dimension-control.is-manual .components-base-control__label {
1506
- width: 10em;
1507
- }
1508
-
1509
1492
  body.is-dragging-components-draggable {
1510
1493
  cursor: move; /* Fallback for IE/Edge < 14 */
1511
1494
  cursor: grabbing !important;
@@ -2040,7 +2023,7 @@ body.is-dragging-components-draggable {
2040
2023
  border-bottom: none;
2041
2024
  padding: 0;
2042
2025
  position: sticky;
2043
- height: 60px;
2026
+ height: 64px;
2044
2027
  }
2045
2028
  .components-guide .components-modal__header .components-button {
2046
2029
  align-self: flex-start;
@@ -2054,7 +2037,7 @@ body.is-dragging-components-draggable {
2054
2037
  display: flex;
2055
2038
  flex-direction: column;
2056
2039
  justify-content: space-between;
2057
- margin-top: -60px;
2040
+ margin-top: -64px;
2058
2041
  min-height: 100%;
2059
2042
  }
2060
2043
  .components-guide .components-guide__page {
@@ -2351,7 +2334,7 @@ body.is-dragging-components-draggable {
2351
2334
  width: auto;
2352
2335
  min-width: 350px;
2353
2336
  max-width: calc(100% - 32px);
2354
- max-height: calc(100% - 120px);
2337
+ max-height: calc(100% - 128px);
2355
2338
  }
2356
2339
  }
2357
2340
  @media (min-width: 600px) and (min-width: 600px) {
@@ -3530,6 +3513,7 @@ body.lockscroll {
3530
3513
  box-shadow: 0 0 0 transparent;
3531
3514
  border-radius: 2px;
3532
3515
  border: 1px solid #949494;
3516
+ border-color: var(--wp-components-color-gray-600, #949494);
3533
3517
  }
3534
3518
  @media not (prefers-reduced-motion) {
3535
3519
  .components-text-control__input,
@@ -3587,53 +3571,21 @@ body.lockscroll {
3587
3571
  box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
3588
3572
  outline: 2px solid transparent;
3589
3573
  }
3590
- .components-text-control__input::-webkit-input-placeholder,
3591
- .components-text-control__input[type=text]::-webkit-input-placeholder,
3592
- .components-text-control__input[type=tel]::-webkit-input-placeholder,
3593
- .components-text-control__input[type=time]::-webkit-input-placeholder,
3594
- .components-text-control__input[type=url]::-webkit-input-placeholder,
3595
- .components-text-control__input[type=week]::-webkit-input-placeholder,
3596
- .components-text-control__input[type=password]::-webkit-input-placeholder,
3597
- .components-text-control__input[type=color]::-webkit-input-placeholder,
3598
- .components-text-control__input[type=date]::-webkit-input-placeholder,
3599
- .components-text-control__input[type=datetime]::-webkit-input-placeholder,
3600
- .components-text-control__input[type=datetime-local]::-webkit-input-placeholder,
3601
- .components-text-control__input[type=email]::-webkit-input-placeholder,
3602
- .components-text-control__input[type=month]::-webkit-input-placeholder,
3603
- .components-text-control__input[type=number]::-webkit-input-placeholder {
3604
- color: rgba(30, 30, 30, 0.62);
3605
- }
3606
- .components-text-control__input::-moz-placeholder,
3607
- .components-text-control__input[type=text]::-moz-placeholder,
3608
- .components-text-control__input[type=tel]::-moz-placeholder,
3609
- .components-text-control__input[type=time]::-moz-placeholder,
3610
- .components-text-control__input[type=url]::-moz-placeholder,
3611
- .components-text-control__input[type=week]::-moz-placeholder,
3612
- .components-text-control__input[type=password]::-moz-placeholder,
3613
- .components-text-control__input[type=color]::-moz-placeholder,
3614
- .components-text-control__input[type=date]::-moz-placeholder,
3615
- .components-text-control__input[type=datetime]::-moz-placeholder,
3616
- .components-text-control__input[type=datetime-local]::-moz-placeholder,
3617
- .components-text-control__input[type=email]::-moz-placeholder,
3618
- .components-text-control__input[type=month]::-moz-placeholder,
3619
- .components-text-control__input[type=number]::-moz-placeholder {
3620
- color: rgba(30, 30, 30, 0.62);
3621
- }
3622
- .components-text-control__input:-ms-input-placeholder,
3623
- .components-text-control__input[type=text]:-ms-input-placeholder,
3624
- .components-text-control__input[type=tel]:-ms-input-placeholder,
3625
- .components-text-control__input[type=time]:-ms-input-placeholder,
3626
- .components-text-control__input[type=url]:-ms-input-placeholder,
3627
- .components-text-control__input[type=week]:-ms-input-placeholder,
3628
- .components-text-control__input[type=password]:-ms-input-placeholder,
3629
- .components-text-control__input[type=color]:-ms-input-placeholder,
3630
- .components-text-control__input[type=date]:-ms-input-placeholder,
3631
- .components-text-control__input[type=datetime]:-ms-input-placeholder,
3632
- .components-text-control__input[type=datetime-local]:-ms-input-placeholder,
3633
- .components-text-control__input[type=email]:-ms-input-placeholder,
3634
- .components-text-control__input[type=month]:-ms-input-placeholder,
3635
- .components-text-control__input[type=number]:-ms-input-placeholder {
3636
- color: rgba(30, 30, 30, 0.62);
3574
+ .components-text-control__input::placeholder,
3575
+ .components-text-control__input[type=text]::placeholder,
3576
+ .components-text-control__input[type=tel]::placeholder,
3577
+ .components-text-control__input[type=time]::placeholder,
3578
+ .components-text-control__input[type=url]::placeholder,
3579
+ .components-text-control__input[type=week]::placeholder,
3580
+ .components-text-control__input[type=password]::placeholder,
3581
+ .components-text-control__input[type=color]::placeholder,
3582
+ .components-text-control__input[type=date]::placeholder,
3583
+ .components-text-control__input[type=datetime]::placeholder,
3584
+ .components-text-control__input[type=datetime-local]::placeholder,
3585
+ .components-text-control__input[type=email]::placeholder,
3586
+ .components-text-control__input[type=month]::placeholder,
3587
+ .components-text-control__input[type=number]::placeholder {
3588
+ color: color-mix(in srgb, var(--wp-components-color-foreground, #1e1e1e), transparent 38%);
3637
3589
  }
3638
3590
  .components-text-control__input.is-next-40px-default-size,
3639
3591
  .components-text-control__input[type=text].is-next-40px-default-size,
@@ -3879,4 +3831,64 @@ div.components-toolbar > div + div.has-left-divider::before {
3879
3831
 
3880
3832
  .components-tooltip__shortcut {
3881
3833
  margin-left: 8px;
3834
+ }
3835
+
3836
+ .components-validated-control:has(:is(input, select):user-invalid) .components-input-control__backdrop {
3837
+ --wp-components-color-accent: $alert-red;
3838
+ border-color: #cc1818;
3839
+ }
3840
+ .components-validated-control :is(textarea, input[type=text]):user-invalid {
3841
+ --wp-admin-theme-color: $alert-red;
3842
+ --wp-components-color-accent: $alert-red;
3843
+ border-color: #cc1818;
3844
+ }
3845
+ .components-validated-control .components-combobox-control__suggestions-container:has(input:user-invalid):not(:has([aria-expanded=true])) {
3846
+ border-color: #cc1818;
3847
+ }
3848
+
3849
+ .components-validated-control__wrapper-with-error-delegate {
3850
+ position: relative;
3851
+ }
3852
+ .components-validated-control__wrapper-with-error-delegate:has(select:user-invalid) .components-input-control__backdrop {
3853
+ --wp-components-color-accent: $alert-red;
3854
+ border-color: #cc1818;
3855
+ }
3856
+ .components-validated-control__wrapper-with-error-delegate:has(input[type=radio]:invalid) {
3857
+ --wp-components-color-accent: $alert-red;
3858
+ }
3859
+
3860
+ .components-validated-control__error-delegate {
3861
+ position: absolute;
3862
+ top: 0;
3863
+ height: 100%;
3864
+ width: 100%;
3865
+ opacity: 0;
3866
+ pointer-events: none;
3867
+ }
3868
+
3869
+ .components-validated-control__error {
3870
+ display: flex;
3871
+ align-items: flex-start;
3872
+ gap: 4px;
3873
+ margin: 8px 0 0;
3874
+ font-family: -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
3875
+ font-size: 0.75rem;
3876
+ line-height: 16px;
3877
+ color: #cc1818;
3878
+ animation: components-validated-control__error-jump 0.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
3879
+ }
3880
+
3881
+ .components-validated-control__error-icon {
3882
+ flex-shrink: 0;
3883
+ }
3884
+
3885
+ @keyframes components-validated-control__error-jump {
3886
+ 0% {
3887
+ transform: translateY(-4px);
3888
+ opacity: 0;
3889
+ }
3890
+ 100% {
3891
+ transform: translateY(0);
3892
+ opacity: 1;
3893
+ }
3882
3894
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/autocomplete/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EACX,iBAAiB,EAMjB,oBAAoB,EAEpB,MAAM,SAAS,CAAC;AAQjB,wBAAgB,eAAe,CAAE,EAChC,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,EACV,UAAU,GACV,EAAE,oBAAoB;;;;;EA8UtB;AAeD,wBAAgB,oBAAoB,CAAE,OAAO,EAAE,oBAAoB;;;;;;;;;;;;EAsClE;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,EACrC,QAAQ,EACR,UAAU,EACV,GAAG,OAAO,EACV,EAAE,iBAAiB,+BAQnB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/autocomplete/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EACX,iBAAiB,EAMjB,oBAAoB,EAEpB,MAAM,SAAS,CAAC;AAQjB,wBAAgB,eAAe,CAAE,EAChC,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,EACV,UAAU,GACV,EAAE,oBAAoB;;;;;EAkVtB;AAeD,wBAAgB,oBAAoB,CAAE,OAAO,EAAE,oBAAoB;;;;;;;;;;;;EAsClE;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,EACrC,QAAQ,EACR,UAAU,EACV,GAAG,OAAO,EACV,EAAE,iBAAiB,+BAQnB"}
@@ -4,13 +4,13 @@
4
4
  import type { BoxControlInputControlProps, BoxControlProps, BoxControlValue, CustomValueUnits, Preset } from './types';
5
5
  export declare const CUSTOM_VALUE_SETTINGS: CustomValueUnits;
6
6
  export declare const LABELS: {
7
- all: import("@wordpress/i18n/build-types/types").TranslatableText<"All sides">;
8
- top: import("@wordpress/i18n/build-types/types").TranslatableText<"Top side">;
9
- bottom: import("@wordpress/i18n/build-types/types").TranslatableText<"Bottom side">;
10
- left: import("@wordpress/i18n/build-types/types").TranslatableText<"Left side">;
11
- right: import("@wordpress/i18n/build-types/types").TranslatableText<"Right side">;
12
- vertical: import("@wordpress/i18n/build-types/types").TranslatableText<"Top and bottom sides">;
13
- horizontal: import("@wordpress/i18n/build-types/types").TranslatableText<"Left and right sides">;
7
+ all: import("@wordpress/i18n").TranslatableText<"All sides">;
8
+ top: import("@wordpress/i18n").TranslatableText<"Top side">;
9
+ bottom: import("@wordpress/i18n").TranslatableText<"Bottom side">;
10
+ left: import("@wordpress/i18n").TranslatableText<"Left side">;
11
+ right: import("@wordpress/i18n").TranslatableText<"Right side">;
12
+ vertical: import("@wordpress/i18n").TranslatableText<"Top and bottom sides">;
13
+ horizontal: import("@wordpress/i18n").TranslatableText<"Left and right sides">;
14
14
  };
15
15
  export declare const DEFAULT_VALUES: {
16
16
  top: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calendar/date-calendar/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,sGAQtB,iBAAiB,gCAwBnB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calendar/date-calendar/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAmB,MAAM,UAAU,CAAC;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,sGAQtB,iBAAiB,gCAkCnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calendar/date-range-calendar/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAElE,wBAAgB,eAAe,CAAE,EAChC,QAAQ,EACR,WAAW,EACX,eAAe,EACf,GAAG,EACH,GAAG,EACH,QAAQ,GACR,EAAE,IAAI,CACN,sBAAsB,EACtB,UAAU,GAAG,iBAAiB,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,CAC3D,GAAG;IACH,WAAW,EAAE,IAAI,GAAG,SAAS,CAAC;CAC9B,yBA6FA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,2IAY3B,sBAAsB,gCAwDxB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calendar/date-range-calendar/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACX,sBAAsB,EACtB,SAAS,EAET,MAAM,UAAU,CAAC;AAElB,wBAAgB,eAAe,CAAE,EAChC,QAAQ,EACR,WAAW,EACX,eAAe,EACf,GAAG,EACH,GAAG,EACH,QAAQ,GACR,EAAE,IAAI,CACN,sBAAsB,EACtB,UAAU,GAAG,iBAAiB,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,CAC3D,GAAG;IACH,WAAW,EAAE,IAAI,GAAG,SAAS,CAAC;CAC9B,yBA6FA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,2IAY3B,sBAAsB,gCAgExB,CAAC"}
@@ -141,7 +141,7 @@ type DayOfWeek = {
141
141
  * @param {Modifiers} modifiers - The modifiers associated with the event.
142
142
  * @param {React.MouseEvent | React.KeyboardEvent} e - The event object.
143
143
  */
144
- type OnSelectHandler<T> = (selected: T, triggerDate: Date, modifiers: Modifiers, e: React.MouseEvent | React.KeyboardEvent) => void;
144
+ export type OnSelectHandler<T> = (selected: T, triggerDate: Date, modifiers: Modifiers, e: React.MouseEvent | React.KeyboardEvent) => void;
145
145
  export interface BaseProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'defaultValue'> {
146
146
  /**
147
147
  * Whether the selection is required.
@@ -260,7 +260,7 @@ export interface BaseProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
260
260
  * When working with time zones, use the `TZDate` object exported by this
261
261
  * package instead of the native `Date` object.
262
262
  * @example
263
- * import { DateCalendar, TZDate } from "@automattic/components";
263
+ * import { DateCalendar, TZDate } from "@wordpress/components";
264
264
  *
265
265
  * export function WithTimeZone() {
266
266
  * const timeZone = "America/New_York";
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/calendar/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAE,MAAM,EAAE,OAAO,CAAE,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,KAAK,OAAO,GACT,OAAO,GACP,CAAE,CAAE,IAAI,EAAE,IAAI,KAAM,OA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IAAI,CAAC,EAAE,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;CAC5C;AAED,UAAU,WAAW;IACpB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IACnC,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,eAAe,CAAE,IAAI,GAAG,SAAS,CAAE,CAAC;IAC/C,0DAA0D;IAC1D,eAAe,CAAC,EAAE,IAAI,CAAC;CACvB;AAED,UAAU,UAAU;IACnB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,gDAAgD;IAChD,QAAQ,CAAC,EAAE,eAAe,CAAE,SAAS,GAAG,SAAS,CAAE,CAAC;IACpD,2DAA2D;IAC3D,eAAe,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,WAAW,CAAC;AACxD,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,UAAU,CAAC"}
@@ -24,7 +24,7 @@ export declare const useLocalizationProps: ({ locale, timeZone, mode, }: {
24
24
  timeZone: BaseProps["timeZone"];
25
25
  mode: "single" | "range";
26
26
  }) => {
27
- readonly 'aria-label': import("@wordpress/i18n/build-types/types").TranslatableText<"Date calendar"> | import("@wordpress/i18n/build-types/types").TranslatableText<"Date range calendar">;
27
+ readonly 'aria-label': import("@wordpress/i18n").TranslatableText<"Date calendar"> | import("@wordpress/i18n").TranslatableText<"Date range calendar">;
28
28
  readonly labels: {
29
29
  /**
30
30
  * The label for the month grid.
@@ -38,9 +38,9 @@ export declare const useLocalizationProps: ({ locale, timeZone, mode, }: {
38
38
  */
39
39
  readonly labelGridcell: (date: Date, modifiers?: Modifiers) => string;
40
40
  /** The label for the "next month" button. */
41
- readonly labelNext: () => import("@wordpress/i18n/build-types/types").TranslatableText<"Go to the Next Month">;
41
+ readonly labelNext: () => import("@wordpress/i18n").TranslatableText<"Go to the Next Month">;
42
42
  /** The label for the "previous month" button. */
43
- readonly labelPrevious: () => import("@wordpress/i18n/build-types/types").TranslatableText<"Go to the Previous Month">;
43
+ readonly labelPrevious: () => import("@wordpress/i18n").TranslatableText<"Go to the Previous Month">;
44
44
  /**
45
45
  * The label for the day button.
46
46
  * @param date
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/color-picker/styles.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;UAEhC,CAAC;AAEF,eAAO,MAAM,aAAa;UAgFs6E,MAAO,GAAG;;;UA9Ez8E,CAAC;AAEF,eAAO,MAAM,YAAY;;;;aAmBZ,CAAA;;;;;;;;;;;;;;qBAyDwxD,CAAC;;;;;iCAAmuB,CAAC;;;;;;;;;;;;UAzEzgF,CAAC;AASF,eAAO,MAAM,6BAA6B;;SAnB7B,MAAQ,WAGpB;yGAqBA,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;;UAG9C,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;UAK7B,CAAC;AAEF,eAAO,MAAM,eAAe;;SAtCf,MAAQ,WAGpB;yGA+EA,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/color-picker/styles.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;UAEhC,CAAC;AAEF,eAAO,MAAM,aAAa;UA0FwjE,MAAO,GAAG;;;UAxF3lE,CAAC;AAEF,eAAO,MAAM,YAAY;;;;aAmBZ,CAAA;;;;;;;;;;;;;;qBAmE26C,CAAC;;;;;iCAAmuB,CAAC;;;;;;;;;;;;UAnF5pE,CAAC;AASF,eAAO,MAAM,6BAA6B;;SAnB7B,MAAQ,WAGpB;yGAqBA,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;;UAG9C,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;UAK7B,CAAC;AAEF,eAAO,MAAM,eAAe;;SAtCf,MAAQ,WAGpB;yGAyFA,CAAC"}