@wordpress/components 28.4.0 → 28.5.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 (250) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/build/autocomplete/autocompleter-ui.js +2 -0
  3. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  4. package/build/base-control/styles/base-control-styles.js +8 -8
  5. package/build/base-control/styles/base-control-styles.js.map +1 -1
  6. package/build/border-control/styles.js +18 -24
  7. package/build/border-control/styles.js.map +1 -1
  8. package/build/color-palette/index.js +1 -1
  9. package/build/color-palette/index.js.map +1 -1
  10. package/build/custom-select-control/index.js +37 -14
  11. package/build/custom-select-control/index.js.map +1 -1
  12. package/build/custom-select-control/types.js.map +1 -1
  13. package/build/custom-select-control-v2/styles.js +9 -9
  14. package/build/custom-select-control-v2/styles.js.map +1 -1
  15. package/build/date-time/index.js +0 -7
  16. package/build/date-time/index.js.map +1 -1
  17. package/build/date-time/time/index.js +66 -38
  18. package/build/date-time/time/index.js.map +1 -1
  19. package/build/date-time/time/styles.js +11 -11
  20. package/build/date-time/time/styles.js.map +1 -1
  21. package/build/date-time/{time-input → time/time-input}/index.js +7 -7
  22. package/build/date-time/time/time-input/index.js.map +1 -0
  23. package/build/dropdown-menu-v2/styles.js +14 -14
  24. package/build/dropdown-menu-v2/styles.js.map +1 -1
  25. package/build/form-toggle/index.js +24 -24
  26. package/build/form-toggle/index.js.map +1 -1
  27. package/build/guide/index.js +2 -0
  28. package/build/guide/index.js.map +1 -1
  29. package/build/heading/types.js.map +1 -1
  30. package/build/modal/index.js +18 -11
  31. package/build/modal/index.js.map +1 -1
  32. package/build/query-controls/index.js +1 -1
  33. package/build/query-controls/index.js.map +1 -1
  34. package/build/radio-control/index.js +35 -8
  35. package/build/radio-control/index.js.map +1 -1
  36. package/build/radio-control/types.js.map +1 -1
  37. package/build/select-control/index.js +20 -8
  38. package/build/select-control/index.js.map +1 -1
  39. package/build/select-control/types.js.map +1 -1
  40. package/build/text-control/index.js +1 -0
  41. package/build/text-control/index.js.map +1 -1
  42. package/build/toggle-control/index.js +27 -25
  43. package/build/toggle-control/index.js.map +1 -1
  44. package/build/toggle-group-control/toggle-group-control/component.js +6 -1
  45. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  46. package/build/toggle-group-control/toggle-group-control-option/component.js +6 -1
  47. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  48. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +14 -14
  49. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  50. package/build/tooltip/index.js +12 -1
  51. package/build/tooltip/index.js.map +1 -1
  52. package/build/tree-select/index.js +1 -2
  53. package/build/tree-select/index.js.map +1 -1
  54. package/build/utils/config-values.js +6 -0
  55. package/build/utils/config-values.js.map +1 -1
  56. package/build-module/autocomplete/autocompleter-ui.js +2 -0
  57. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  58. package/build-module/base-control/styles/base-control-styles.js +8 -8
  59. package/build-module/base-control/styles/base-control-styles.js.map +1 -1
  60. package/build-module/border-control/styles.js +13 -23
  61. package/build-module/border-control/styles.js.map +1 -1
  62. package/build-module/color-palette/index.js +1 -1
  63. package/build-module/color-palette/index.js.map +1 -1
  64. package/build-module/custom-select-control/index.js +38 -14
  65. package/build-module/custom-select-control/index.js.map +1 -1
  66. package/build-module/custom-select-control/types.js.map +1 -1
  67. package/build-module/custom-select-control-v2/styles.js +9 -9
  68. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  69. package/build-module/date-time/index.js +1 -2
  70. package/build-module/date-time/index.js.map +1 -1
  71. package/build-module/date-time/time/index.js +66 -38
  72. package/build-module/date-time/time/index.js.map +1 -1
  73. package/build-module/date-time/time/styles.js +11 -11
  74. package/build-module/date-time/time/styles.js.map +1 -1
  75. package/build-module/date-time/{time-input → time/time-input}/index.js +7 -7
  76. package/build-module/date-time/time/time-input/index.js.map +1 -0
  77. package/build-module/dropdown-menu-v2/styles.js +14 -14
  78. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  79. package/build-module/form-toggle/index.js +23 -22
  80. package/build-module/form-toggle/index.js.map +1 -1
  81. package/build-module/guide/index.js +2 -0
  82. package/build-module/guide/index.js.map +1 -1
  83. package/build-module/heading/types.js.map +1 -1
  84. package/build-module/modal/index.js +17 -11
  85. package/build-module/modal/index.js.map +1 -1
  86. package/build-module/query-controls/index.js +1 -1
  87. package/build-module/query-controls/index.js.map +1 -1
  88. package/build-module/radio-control/index.js +36 -10
  89. package/build-module/radio-control/index.js.map +1 -1
  90. package/build-module/radio-control/types.js.map +1 -1
  91. package/build-module/select-control/index.js +20 -8
  92. package/build-module/select-control/index.js.map +1 -1
  93. package/build-module/select-control/types.js.map +1 -1
  94. package/build-module/text-control/index.js +1 -0
  95. package/build-module/text-control/index.js.map +1 -1
  96. package/build-module/toggle-control/index.js +26 -24
  97. package/build-module/toggle-control/index.js.map +1 -1
  98. package/build-module/toggle-group-control/toggle-group-control/component.js +6 -1
  99. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  100. package/build-module/toggle-group-control/toggle-group-control-option/component.js +6 -1
  101. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  102. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +14 -14
  103. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  104. package/build-module/tooltip/index.js +13 -2
  105. package/build-module/tooltip/index.js.map +1 -1
  106. package/build-module/tree-select/index.js +1 -2
  107. package/build-module/tree-select/index.js.map +1 -1
  108. package/build-module/utils/config-values.js +6 -0
  109. package/build-module/utils/config-values.js.map +1 -1
  110. package/build-style/style-rtl.css +60 -24
  111. package/build-style/style.css +60 -24
  112. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  113. package/build-types/border-control/styles.d.ts.map +1 -1
  114. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  115. package/build-types/color-palette/index.d.ts.map +1 -1
  116. package/build-types/color-palette/styles.d.ts +2 -2
  117. package/build-types/color-picker/styles.d.ts +3 -1
  118. package/build-types/color-picker/styles.d.ts.map +1 -1
  119. package/build-types/custom-select-control/index.d.ts +2 -2
  120. package/build-types/custom-select-control/index.d.ts.map +1 -1
  121. package/build-types/custom-select-control/stories/index.story.d.ts +3 -3
  122. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  123. package/build-types/custom-select-control/types.d.ts +7 -7
  124. package/build-types/custom-select-control/types.d.ts.map +1 -1
  125. package/build-types/custom-select-control-v2/styles.d.ts +16 -28
  126. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  127. package/build-types/date-time/date/styles.d.ts +2 -2
  128. package/build-types/date-time/index.d.ts +1 -2
  129. package/build-types/date-time/index.d.ts.map +1 -1
  130. package/build-types/date-time/stories/time.story.d.ts +5 -0
  131. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  132. package/build-types/date-time/time/index.d.ts +3 -0
  133. package/build-types/date-time/time/index.d.ts.map +1 -1
  134. package/build-types/date-time/time/styles.d.ts.map +1 -1
  135. package/build-types/date-time/{time-input → time/time-input}/index.d.ts +1 -1
  136. package/build-types/date-time/time/time-input/index.d.ts.map +1 -0
  137. package/build-types/date-time/time/time-input/test/index.d.ts.map +1 -0
  138. package/build-types/dropdown-menu-v2/styles.d.ts +24 -42
  139. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  140. package/build-types/form-toggle/index.d.ts +2 -5
  141. package/build-types/form-toggle/index.d.ts.map +1 -1
  142. package/build-types/guide/index.d.ts.map +1 -1
  143. package/build-types/heading/component.d.ts +1 -1
  144. package/build-types/heading/types.d.ts +1 -1
  145. package/build-types/heading/types.d.ts.map +1 -1
  146. package/build-types/modal/index.d.ts.map +1 -1
  147. package/build-types/navigation/styles/navigation-styles.d.ts +2 -2
  148. package/build-types/palette-edit/styles.d.ts +2 -2
  149. package/build-types/query-controls/index.d.ts.map +1 -1
  150. package/build-types/radio-control/index.d.ts.map +1 -1
  151. package/build-types/radio-control/stories/index.story.d.ts +1 -0
  152. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  153. package/build-types/radio-control/test/index.d.ts +2 -0
  154. package/build-types/radio-control/test/index.d.ts.map +1 -0
  155. package/build-types/radio-control/types.d.ts +4 -0
  156. package/build-types/radio-control/types.d.ts.map +1 -1
  157. package/build-types/select-control/index.d.ts +4 -1
  158. package/build-types/select-control/index.d.ts.map +1 -1
  159. package/build-types/select-control/stories/index.story.d.ts +9 -3
  160. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  161. package/build-types/select-control/types.d.ts +27 -27
  162. package/build-types/select-control/types.d.ts.map +1 -1
  163. package/build-types/tabs/styles.d.ts +8 -14
  164. package/build-types/tabs/styles.d.ts.map +1 -1
  165. package/build-types/text-control/index.d.ts +1 -0
  166. package/build-types/text-control/index.d.ts.map +1 -1
  167. package/build-types/toggle-control/index.d.ts +3 -9
  168. package/build-types/toggle-control/index.d.ts.map +1 -1
  169. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +6 -1
  170. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  171. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +6 -1
  172. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  173. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +14 -14
  174. package/build-types/tooltip/index.d.ts.map +1 -1
  175. package/build-types/tooltip/test/utils/index.d.ts +1 -5
  176. package/build-types/tooltip/test/utils/index.d.ts.map +1 -1
  177. package/build-types/tree-select/index.d.ts +1 -1
  178. package/build-types/tree-select/index.d.ts.map +1 -1
  179. package/build-types/utils/config-values.d.ts +6 -0
  180. package/package.json +20 -20
  181. package/src/alignment-matrix-control/test/index.tsx +1 -3
  182. package/src/autocomplete/autocompleter-ui.tsx +2 -0
  183. package/src/autocomplete/style.scss +0 -6
  184. package/src/base-control/styles/base-control-styles.ts +1 -1
  185. package/src/border-control/styles.ts +0 -5
  186. package/src/button/stories/e2e/index.story.tsx +103 -21
  187. package/src/button/style.scss +49 -21
  188. package/src/button/test/index.tsx +18 -40
  189. package/src/circular-option-picker/test/index.tsx +1 -4
  190. package/src/color-palette/index.tsx +22 -20
  191. package/src/composite/legacy/test/index.tsx +2 -18
  192. package/src/custom-select-control/index.tsx +55 -25
  193. package/src/custom-select-control/test/index.tsx +47 -30
  194. package/src/custom-select-control/types.ts +7 -7
  195. package/src/custom-select-control-v2/styles.ts +7 -6
  196. package/src/custom-select-control-v2/test/index.tsx +15 -19
  197. package/src/date-time/index.ts +1 -2
  198. package/src/date-time/stories/time.story.tsx +17 -0
  199. package/src/date-time/time/index.tsx +46 -16
  200. package/src/date-time/time/styles.ts +1 -0
  201. package/src/date-time/{time-input → time/time-input}/index.tsx +9 -9
  202. package/src/dropdown-menu-v2/styles.ts +18 -17
  203. package/src/dropdown-menu-v2/test/index.tsx +1 -4
  204. package/src/font-size-picker/test/index.tsx +50 -43
  205. package/src/form-toggle/index.tsx +23 -21
  206. package/src/guide/index.tsx +2 -0
  207. package/src/heading/types.ts +1 -4
  208. package/src/modal/index.tsx +21 -20
  209. package/src/placeholder/style.scss +11 -2
  210. package/src/query-controls/index.tsx +5 -1
  211. package/src/radio-control/index.tsx +48 -7
  212. package/src/radio-control/stories/index.story.tsx +23 -0
  213. package/src/radio-control/style.scss +26 -2
  214. package/src/radio-control/test/index.tsx +274 -0
  215. package/src/radio-control/types.ts +4 -0
  216. package/src/select-control/README.md +8 -1
  217. package/src/select-control/index.tsx +33 -22
  218. package/src/select-control/test/select-control.tsx +148 -4
  219. package/src/select-control/types.ts +70 -65
  220. package/src/tab-panel/test/index.tsx +1 -8
  221. package/src/tabs/test/index.tsx +68 -84
  222. package/src/text-control/README.md +1 -0
  223. package/src/text-control/index.tsx +1 -0
  224. package/src/text-control/style.scss +5 -0
  225. package/src/toggle-control/README.md +9 -0
  226. package/src/toggle-control/index.tsx +25 -22
  227. package/src/toggle-control/style.scss +2 -1
  228. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +6 -6
  229. package/src/toggle-group-control/test/index.tsx +0 -6
  230. package/src/toggle-group-control/toggle-group-control/README.md +13 -1
  231. package/src/toggle-group-control/toggle-group-control/component.tsx +6 -1
  232. package/src/toggle-group-control/toggle-group-control-option/README.md +6 -1
  233. package/src/toggle-group-control/toggle-group-control-option/component.tsx +6 -1
  234. package/src/toggle-group-control/toggle-group-control-option-icon/README.md +1 -1
  235. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +14 -14
  236. package/src/tooltip/index.tsx +15 -2
  237. package/src/tooltip/test/index.tsx +0 -5
  238. package/src/tooltip/test/utils/index.tsx +5 -5
  239. package/src/tree-select/index.tsx +1 -2
  240. package/src/utils/config-values.js +6 -0
  241. package/tsconfig.tsbuildinfo +1 -1
  242. package/build/date-time/time-input/index.js.map +0 -1
  243. package/build-module/date-time/time-input/index.js.map +0 -1
  244. package/build-types/date-time/stories/time-input.story.d.ts +0 -12
  245. package/build-types/date-time/stories/time-input.story.d.ts.map +0 -1
  246. package/build-types/date-time/time-input/index.d.ts.map +0 -1
  247. package/build-types/date-time/time-input/test/index.d.ts.map +0 -1
  248. package/src/date-time/stories/time-input.story.tsx +0 -36
  249. /package/build-types/date-time/{time-input → time/time-input}/test/index.d.ts +0 -0
  250. /package/src/date-time/{time-input → time/time-input}/test/index.tsx +0 -0
@@ -1,16 +1,19 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ChangeEvent, FocusEvent, ReactNode } from 'react';
4
+ import type { ChangeEvent, ReactNode } from 'react';
5
5
  /**
6
6
  * Internal dependencies
7
7
  */
8
8
  import type { InputBaseProps } from '../input-control/types';
9
9
  import type { BaseControlProps } from '../base-control/types';
10
- type SelectControlBaseProps = Pick<InputBaseProps, '__next36pxDefaultSize' | '__next40pxDefaultSize' | 'disabled' | 'hideLabelFromVision' | 'label' | 'labelPosition' | 'prefix' | 'size' | 'suffix'> & Pick<BaseControlProps, 'help' | '__nextHasNoMarginBottom'> & {
11
- onBlur?: (event: FocusEvent<HTMLSelectElement>) => void;
12
- onFocus?: (event: FocusEvent<HTMLSelectElement>) => void;
13
- options?: {
10
+ type SelectControlBaseProps<V extends string> = Pick<InputBaseProps, '__next36pxDefaultSize' | '__next40pxDefaultSize' | 'disabled' | 'hideLabelFromVision' | 'label' | 'labelPosition' | 'prefix' | 'size' | 'suffix'> & Pick<BaseControlProps, 'help' | '__nextHasNoMarginBottom'> & {
11
+ /**
12
+ * An array of option property objects to be rendered,
13
+ * each with a `label` and `value` property, as well as any other
14
+ * `<option>` attributes.
15
+ */
16
+ options?: readonly ({
14
17
  /**
15
18
  * The label to be shown to the user.
16
19
  */
@@ -19,21 +22,8 @@ type SelectControlBaseProps = Pick<InputBaseProps, '__next36pxDefaultSize' | '__
19
22
  * The internal value used to choose the selected value.
20
23
  * This is also the value passed to `onChange` when the option is selected.
21
24
  */
22
- value: string;
23
- id?: string;
24
- /**
25
- * Whether or not the option should have the disabled attribute.
26
- *
27
- * @default false
28
- */
29
- disabled?: boolean;
30
- /**
31
- * Whether or not the option should be hidden.
32
- *
33
- * @default false
34
- */
35
- hidden?: boolean;
36
- }[];
25
+ value: V;
26
+ } & Omit<React.OptionHTMLAttributes<HTMLOptionElement>, 'label' | 'value'>)[];
37
27
  /**
38
28
  * As an alternative to the `options` prop, `optgroup`s and `options` can be
39
29
  * passed in as `children` for more customizability.
@@ -46,7 +36,7 @@ type SelectControlBaseProps = Pick<InputBaseProps, '__next36pxDefaultSize' | '__
46
36
  */
47
37
  variant?: 'default' | 'minimal';
48
38
  };
49
- export type SelectControlSingleSelectionProps = SelectControlBaseProps & {
39
+ export type SelectControlSingleSelectionProps<V extends string = string> = SelectControlBaseProps<V> & {
50
40
  /**
51
41
  * If this property is added, multiple values can be selected. The `value` passed should be an array.
52
42
  *
@@ -55,18 +45,23 @@ export type SelectControlSingleSelectionProps = SelectControlBaseProps & {
55
45
  * @default false
56
46
  */
57
47
  multiple?: false;
58
- value?: string;
48
+ /**
49
+ * The value of the selected option.
50
+ *
51
+ * If `multiple` is true, the `value` should be an array with the values of the selected options.
52
+ */
53
+ value?: NoInfer<V>;
59
54
  /**
60
55
  * A function that receives the value of the new option that is being selected as input.
61
56
  *
62
57
  * If `multiple` is `true`, the value received is an array of the selected value.
63
58
  * Otherwise, the value received is a single value with the new selected value.
64
59
  */
65
- onChange?: (value: string, extra?: {
60
+ onChange?: (value: NoInfer<V>, extra?: {
66
61
  event?: ChangeEvent<HTMLSelectElement>;
67
62
  }) => void;
68
63
  };
69
- export type SelectControlMultipleSelectionProps = SelectControlBaseProps & {
64
+ export type SelectControlMultipleSelectionProps<V extends string> = SelectControlBaseProps<V> & {
70
65
  /**
71
66
  * If this property is added, multiple values can be selected. The `value` passed should be an array.
72
67
  *
@@ -75,17 +70,22 @@ export type SelectControlMultipleSelectionProps = SelectControlBaseProps & {
75
70
  * @default false
76
71
  */
77
72
  multiple: true;
78
- value?: string[];
73
+ /**
74
+ * The value of the selected option.
75
+ *
76
+ * If `multiple` is true, the `value` should be an array with the values of the selected options.
77
+ */
78
+ value?: NoInfer<V>[];
79
79
  /**
80
80
  * A function that receives the value of the new option that is being selected as input.
81
81
  *
82
82
  * If `multiple` is `true`, the value received is an array of the selected value.
83
83
  * Otherwise, the value received is a single value with the new selected value.
84
84
  */
85
- onChange?: (value: string[], extra?: {
85
+ onChange?: (value: NoInfer<V>[], extra?: {
86
86
  event?: ChangeEvent<HTMLSelectElement>;
87
87
  }) => void;
88
88
  };
89
- export type SelectControlProps = SelectControlSingleSelectionProps | SelectControlMultipleSelectionProps;
89
+ export type SelectControlProps<V extends string = string> = SelectControlSingleSelectionProps<V> | SelectControlMultipleSelectionProps<V>;
90
90
  export {};
91
91
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/select-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhE;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,KAAK,sBAAsB,GAAG,IAAI,CACjC,cAAc,EACZ,uBAAuB,GACvB,uBAAuB,GACvB,UAAU,GACV,qBAAqB,GACrB,OAAO,GACP,eAAe,GACf,QAAQ,GACR,MAAM,GACN,QAAQ,CACV,GACA,IAAI,CAAE,gBAAgB,EAAE,MAAM,GAAG,yBAAyB,CAAE,GAAG;IAC9D,MAAM,CAAC,EAAE,CAAE,KAAK,EAAE,UAAU,CAAE,iBAAiB,CAAE,KAAM,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAE,KAAK,EAAE,UAAU,CAAE,iBAAiB,CAAE,KAAM,IAAI,CAAC;IAC7D,OAAO,CAAC,EAAE;QACT;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;;WAGG;QACH,KAAK,EAAE,MAAM,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ;;;;WAIG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB;;;;WAIG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;KACjB,EAAE,CAAC;IACJ;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAChC,CAAC;AAEH,MAAM,MAAM,iCAAiC,GAAG,sBAAsB,GAAG;IACxE;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CACV,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,WAAW,CAAE,iBAAiB,CAAE,CAAA;KAAE,KAChD,IAAI,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,GAAG;IAC1E;;;;;;OAMG;IACH,QAAQ,EAAE,IAAI,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CACV,KAAK,EAAE,MAAM,EAAE,EACf,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,WAAW,CAAE,iBAAiB,CAAE,CAAA;KAAE,KAChD,IAAI,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC3B,iCAAiC,GACjC,mCAAmC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/select-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpD;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,KAAK,sBAAsB,CAAE,CAAC,SAAS,MAAM,IAAK,IAAI,CACrD,cAAc,EACZ,uBAAuB,GACvB,uBAAuB,GACvB,UAAU,GACV,qBAAqB,GACrB,OAAO,GACP,eAAe,GACf,QAAQ,GACR,MAAM,GACN,QAAQ,CACV,GACA,IAAI,CAAE,gBAAgB,EAAE,MAAM,GAAG,yBAAyB,CAAE,GAAG;IAC9D;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,CAAE;QACpB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;;WAGG;QACH,KAAK,EAAE,CAAC,CAAC;KACT,GAAG,IAAI,CACP,KAAK,CAAC,oBAAoB,CAAE,iBAAiB,CAAE,EAC/C,OAAO,GAAG,OAAO,CACjB,CAAE,EAAE,CAAC;IACN;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAChC,CAAC;AAEH,MAAM,MAAM,iCAAiC,CAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IACvE,sBAAsB,CAAE,CAAC,CAAE,GAAG;IAC7B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAE,CAAC,CAAE,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CACV,KAAK,EAAE,OAAO,CAAE,CAAC,CAAE,EACnB,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,WAAW,CAAE,iBAAiB,CAAE,CAAA;KAAE,KAChD,IAAI,CAAC;CACV,CAAC;AAEH,MAAM,MAAM,mCAAmC,CAAE,CAAC,SAAS,MAAM,IAChE,sBAAsB,CAAE,CAAC,CAAE,GAAG;IAC7B;;;;;;OAMG;IACH,QAAQ,EAAE,IAAI,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAE,CAAC,CAAE,EAAE,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CACV,KAAK,EAAE,OAAO,CAAE,CAAC,CAAE,EAAE,EACrB,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,WAAW,CAAE,iBAAiB,CAAE,CAAA;KAAE,KAChD,IAAI,CAAC;CACV,CAAC;AAEH,MAAM,MAAM,kBAAkB,CAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IACtD,iCAAiC,CAAE,CAAC,CAAE,GACtC,mCAAmC,CAAE,CAAC,CAAE,CAAC"}
@@ -3,24 +3,18 @@ export declare const TabListWrapper: import("@emotion/styled").StyledComponent<{
3
3
  theme?: import("@emotion/react").Theme;
4
4
  as?: React.ElementType;
5
5
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
- export declare const Tab: import("@emotion/styled").StyledComponent<Ariakit.TabOptions<"button"> & {
7
- [index: `data-${string}`]: unknown;
8
- wrapElement?: import("@ariakit/react-core/cjs/utils/types").WrapElement;
9
- children?: import("@ariakit/react-core/cjs/utils/types").Children;
10
- render?: import("@ariakit/react-core/cjs/utils/types").RenderProp | import("react").ReactElement;
11
- } & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
6
+ export declare const Tab: import("@emotion/styled").StyledComponent<Ariakit.TabOptions<"button"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
12
7
  ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
13
- }, "children" | keyof Ariakit.TabOptions<"button">> & {
8
+ }, keyof Ariakit.TabOptions<T>> & {
9
+ [index: `data-${string}`]: unknown;
10
+ } & {
14
11
  theme?: import("@emotion/react").Theme;
15
12
  }, {}, {}>;
16
- export declare const TabPanel: import("@emotion/styled").StyledComponent<Ariakit.TabPanelOptions<"div"> & {
17
- [index: `data-${string}`]: unknown;
18
- wrapElement?: import("@ariakit/react-core/cjs/utils/types").WrapElement;
19
- children?: import("@ariakit/react-core/cjs/utils/types").Children;
20
- render?: import("@ariakit/react-core/cjs/utils/types").RenderProp | import("react").ReactElement;
21
- } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
13
+ export declare const TabPanel: import("@emotion/styled").StyledComponent<Ariakit.TabPanelOptions<"div"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
22
14
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
23
- }, "children" | keyof Ariakit.TabPanelOptions<"div">> & {
15
+ }, keyof Ariakit.TabPanelOptions<T>> & {
16
+ [index: `data-${string}`]: unknown;
17
+ } & {
24
18
  theme?: import("@emotion/react").Theme;
25
19
  }, {}, {}>;
26
20
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tabs/styles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAQ1C,eAAO,MAAM,cAAc;;SAaL,MAAO,WACvB;yGA8BL,CAAC;AAEF,eAAO,MAAM,GAAG;;;;;;;;;UAuEf,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;UAcpB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tabs/styles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAQ1C,eAAO,MAAM,cAAc;;SAaL,MAAO,WACvB;yGA8BL,CAAC;AAEF,eAAO,MAAM,GAAG;;;;;;UAuEf,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;UAcpB,CAAC"}
@@ -10,6 +10,7 @@
10
10
  *
11
11
  * return (
12
12
  * <TextControl
13
+ * __nextHasNoMarginBottom
13
14
  * label="Additional CSS Class"
14
15
  * value={ className }
15
16
  * onChange={ ( value ) => setClassName( value ) }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/text-control/index.tsx"],"names":[],"mappings":"AAiEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,WAAW;;;;;sVAAuC,CAAC;AAEhE,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/text-control/index.tsx"],"names":[],"mappings":"AAiEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW;;;;;sVAAuC,CAAC;AAEhE,eAAe,WAAW,CAAC"}
@@ -1,9 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import type { ForwardedRef } from 'react';
5
- import type { WordPressComponentProps } from '../context/wordpress-component';
6
- import type { ToggleControlProps } from './types';
7
1
  /**
8
2
  * ToggleControl is used to generate a toggle user interface.
9
3
  *
@@ -16,6 +10,7 @@ import type { ToggleControlProps } from './types';
16
10
  *
17
11
  * return (
18
12
  * <ToggleControl
13
+ * __nextHasNoMarginBottom
19
14
  * label="Fixed Background"
20
15
  * checked={ value }
21
16
  * onChange={ () => setValue( ( state ) => ! state ) }
@@ -24,11 +19,10 @@ import type { ToggleControlProps } from './types';
24
19
  * };
25
20
  * ```
26
21
  */
27
- export declare function ToggleControl({ __nextHasNoMarginBottom, label, checked, help, className, onChange, disabled, }: WordPressComponentProps<ToggleControlProps, 'input', false>, ref: ForwardedRef<HTMLInputElement>): import("react").JSX.Element;
28
- declare const _default: import("react").ForwardRefExoticComponent<Pick<import("../form-toggle/types").FormToggleProps, "disabled" | "checked"> & Pick<import("../base-control/types").BaseControlProps, "className" | "__nextHasNoMarginBottom"> & {
22
+ export declare const ToggleControl: import("react").ForwardRefExoticComponent<Pick<import("../form-toggle/types").FormToggleProps, "disabled" | "checked"> & Pick<import("../base-control/types").BaseControlProps, "className" | "__nextHasNoMarginBottom"> & {
29
23
  help?: import("react").ReactNode | ((checked: boolean) => import("react").ReactNode);
30
24
  label: import("react").ReactNode;
31
25
  onChange: (value: boolean) => void;
32
26
  } & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "help" | "disabled" | "label" | "className" | "children" | "onChange" | "checked" | "as" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLInputElement>>;
33
- export default _default;
27
+ export default ToggleControl;
34
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toggle-control/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,OAAO,CAAC;AAgBvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAKlD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAC5B,EACC,uBAAuB,EACvB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,QAAQ,GACR,EAAE,uBAAuB,CAAE,kBAAkB,EAAE,OAAO,EAAE,KAAK,CAAE,EAChE,GAAG,EAAE,YAAY,CAAE,gBAAgB,CAAE,+BAkErC;;;;;;AAED,wBAA2C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toggle-control/index.tsx"],"names":[],"mappings":"AAuGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,aAAa;;;;0SAAyC,CAAC;AAEpE,eAAe,aAAa,CAAC"}
@@ -19,7 +19,12 @@
19
19
  *
20
20
  * function Example() {
21
21
  * return (
22
- * <ToggleGroupControl label="my label" value="vertical" isBlock>
22
+ * <ToggleGroupControl
23
+ * label="my label"
24
+ * value="vertical"
25
+ * isBlock
26
+ * __nextHasNoMarginBottom
27
+ * >
23
28
  * <ToggleGroupControlOption value="horizontal" label="Horizontal" />
24
29
  * <ToggleGroupControlOption value="vertical" label="Vertical" />
25
30
  * </ToggleGroupControl>
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/component.tsx"],"names":[],"mappings":"AAgGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;8CAG9B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/component.tsx"],"names":[],"mappings":"AAgGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;8CAG9B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -10,7 +10,12 @@
10
10
  *
11
11
  * function Example() {
12
12
  * return (
13
- * <ToggleGroupControl label="my label" value="vertical" isBlock>
13
+ * <ToggleGroupControl
14
+ * label="my label"
15
+ * value="vertical"
16
+ * isBlock
17
+ * __nextHasNoMarginBottom
18
+ * >
14
19
  * <ToggleGroupControlOption value="horizontal" label="Horizontal" />
15
20
  * <ToggleGroupControlOption value="vertical" label="Vertical" />
16
21
  * </ToggleGroupControl>
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control-option/component.tsx"],"names":[],"mappings":"AAsCA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,wBAAwB;;iOAEpC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control-option/component.tsx"],"names":[],"mappings":"AAsCA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,wBAAwB;;iOAEpC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
@@ -11,20 +11,20 @@
11
11
  * import { formatLowercase, formatUppercase } from '@wordpress/icons';
12
12
  *
13
13
  * function Example() {
14
- * return (
15
- * <ToggleGroupControl>
16
- * <ToggleGroupControlOptionIcon
17
- * value="uppercase"
18
- * label="Uppercase"
19
- * icon={ formatUppercase }
20
- * />
21
- * <ToggleGroupControlOptionIcon
22
- * value="lowercase"
23
- * label="Lowercase"
24
- * icon={ formatLowercase }
25
- * />
26
- * </ToggleGroupControl>
27
- * );
14
+ * return (
15
+ * <ToggleGroupControl __nextHasNoMarginBottom>
16
+ * <ToggleGroupControlOptionIcon
17
+ * value="uppercase"
18
+ * label="Uppercase"
19
+ * icon={ formatUppercase }
20
+ * />
21
+ * <ToggleGroupControlOptionIcon
22
+ * value="lowercase"
23
+ * label="Lowercase"
24
+ * icon={ formatLowercase }
25
+ * />
26
+ * </ToggleGroupControl>
27
+ * );
28
28
  * }
29
29
  * ```
30
30
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.tsx"],"names":[],"mappings":"AAkBA;;GAEG;AACH,OAAO,KAAK,EACX,YAAY,EAEZ,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,eAAO,MAAM,aAAa,MAAM,CAAC;AAuGjC,eAAO,MAAM,OAAO,8FAAmC,CAAC;AAExD,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.tsx"],"names":[],"mappings":"AAmBA;;GAEG;AACH,OAAO,KAAK,EACX,YAAY,EAEZ,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,eAAO,MAAM,aAAa,MAAM,CAAC;AAmHjC,eAAO,MAAM,OAAO,8FAAmC,CAAC;AAExD,eAAe,OAAO,CAAC"}
@@ -1,11 +1,7 @@
1
- /**
2
- * External dependencies
3
- */
4
- import type { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
5
1
  /**
6
2
  * Ensures the async behaviors and animations in tooltip complete
7
3
  * to avoid leaking into other tests
8
4
  *
9
5
  */
10
- export default function cleanupTooltip(user: UserEvent): Promise<void>;
6
+ export default function cleanupTooltip(): Promise<void>;
11
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tooltip/test/utils/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oDAAoD,CAAC;AAOpF;;;;GAIG;AACH,wBAA8B,cAAc,CAAE,IAAI,EAAE,SAAS,iBAI5D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tooltip/test/utils/index.tsx"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,wBAA8B,cAAc,kBAI3C"}
@@ -11,7 +11,7 @@ import type { TreeSelectProps } from './types';
11
11
  *
12
12
  * return (
13
13
  * <TreeSelect
14
- * __nextHasNoMarginBottom
14
+ * __nextHasNoMarginBottom
15
15
  * label="Parent page"
16
16
  * noOptionLabel="No parent page"
17
17
  * onChange={ ( newPage ) => setPage( newPage ) }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tree-select/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,SAAS,CAAC;AAiB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,wBAAgB,UAAU,CAAE,KAAK,EAAE,eAAe,+BAwBjD;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tree-select/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,SAAS,CAAC;AAiB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,UAAU,CAAE,KAAK,EAAE,eAAe,+BAwBjD;AAED,eAAe,UAAU,CAAC"}
@@ -26,6 +26,12 @@ declare const _default: {
26
26
  colorScrollbarThumbHover: string;
27
27
  colorScrollbarTrack: string;
28
28
  elevationIntensity: number;
29
+ radiusXSmall: string;
30
+ radiusSmall: string;
31
+ radiusMedium: string;
32
+ radiusLarge: string;
33
+ radiusFull: string;
34
+ radiusRound: string;
29
35
  radiusBlockUi: string;
30
36
  borderWidth: string;
31
37
  borderWidthFocus: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "28.4.0",
3
+ "version": "28.5.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "types": "build-types",
33
33
  "dependencies": {
34
- "@ariakit/react": "^0.3.12",
34
+ "@ariakit/react": "^0.4.7",
35
35
  "@babel/runtime": "^7.16.0",
36
36
  "@emotion/cache": "^11.7.1",
37
37
  "@emotion/css": "^11.7.1",
@@ -43,23 +43,23 @@
43
43
  "@types/gradient-parser": "0.1.3",
44
44
  "@types/highlight-words-core": "1.2.1",
45
45
  "@use-gesture/react": "^10.3.1",
46
- "@wordpress/a11y": "^4.4.0",
47
- "@wordpress/compose": "^7.4.0",
48
- "@wordpress/date": "^5.4.0",
49
- "@wordpress/deprecated": "^4.4.0",
50
- "@wordpress/dom": "^4.4.0",
51
- "@wordpress/element": "^6.4.0",
52
- "@wordpress/escape-html": "^3.4.0",
53
- "@wordpress/hooks": "^4.4.0",
54
- "@wordpress/html-entities": "^4.4.0",
55
- "@wordpress/i18n": "^5.4.0",
56
- "@wordpress/icons": "^10.4.0",
57
- "@wordpress/is-shallow-equal": "^5.4.0",
58
- "@wordpress/keycodes": "^4.4.0",
59
- "@wordpress/primitives": "^4.4.0",
60
- "@wordpress/private-apis": "^1.4.0",
61
- "@wordpress/rich-text": "^7.4.0",
62
- "@wordpress/warning": "^3.4.0",
46
+ "@wordpress/a11y": "^4.5.0",
47
+ "@wordpress/compose": "^7.5.0",
48
+ "@wordpress/date": "^5.5.0",
49
+ "@wordpress/deprecated": "^4.5.0",
50
+ "@wordpress/dom": "^4.5.0",
51
+ "@wordpress/element": "^6.5.0",
52
+ "@wordpress/escape-html": "^3.5.0",
53
+ "@wordpress/hooks": "^4.5.0",
54
+ "@wordpress/html-entities": "^4.5.0",
55
+ "@wordpress/i18n": "^5.5.0",
56
+ "@wordpress/icons": "^10.5.0",
57
+ "@wordpress/is-shallow-equal": "^5.5.0",
58
+ "@wordpress/keycodes": "^4.5.0",
59
+ "@wordpress/primitives": "^4.5.0",
60
+ "@wordpress/private-apis": "^1.5.0",
61
+ "@wordpress/rich-text": "^7.5.0",
62
+ "@wordpress/warning": "^3.5.0",
63
63
  "change-case": "^4.1.2",
64
64
  "clsx": "^2.1.1",
65
65
  "colord": "^2.7.0",
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "363edb39b8dda8727f652e42cbb8497732693ed2"
88
+ "gitHead": "c3101ab024e2bfc85d525c6d247e0d57cafc9fd9"
89
89
  }
@@ -2,7 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import { render, screen, waitFor, within } from '@testing-library/react';
5
- import { press, click, sleep } from '@ariakit/test';
5
+ import { press, click } from '@ariakit/test';
6
6
 
7
7
  /**
8
8
  * Internal dependencies
@@ -39,7 +39,6 @@ describe( 'AlignmentMatrixControl', () => {
39
39
  it( 'should be centered by default', async () => {
40
40
  await renderAndInitCompositeStore( <AlignmentMatrixControl /> );
41
41
 
42
- await sleep();
43
42
  await press.Tab();
44
43
 
45
44
  expect( getCell( 'center center' ) ).toHaveFocus();
@@ -110,7 +109,6 @@ describe( 'AlignmentMatrixControl', () => {
110
109
  <AlignmentMatrixControl onChange={ spy } />
111
110
  );
112
111
 
113
- await sleep();
114
112
  await press.Tab();
115
113
  await press[ keyRef ]();
116
114
 
@@ -64,9 +64,11 @@ function ListBox( {
64
64
  'components-autocomplete__result',
65
65
  className,
66
66
  {
67
+ // Unused, for backwards compatibility.
67
68
  'is-selected': index === selectedIndex,
68
69
  }
69
70
  ) }
71
+ variant={ index === selectedIndex ? 'primary' : undefined }
70
72
  onClick={ () => onSelect( option ) }
71
73
  >
72
74
  { option.label }
@@ -13,10 +13,4 @@
13
13
  &:focus:not(:disabled) {
14
14
  @include block-toolbar-button-style__focus();
15
15
  }
16
-
17
- &.is-selected,
18
- &:not(:disabled,[aria-disabled="true"]):active {
19
- background: $components-color-accent;
20
- color: $white;
21
- }
22
16
  }
@@ -37,7 +37,7 @@ export const StyledField = styled.div`
37
37
  const labelStyles = css`
38
38
  ${ baseLabelTypography };
39
39
 
40
- display: inline-block;
40
+ display: block;
41
41
  margin-bottom: ${ space( 2 ) };
42
42
  /**
43
43
  * Removes Chrome/Safari/Firefox user agent stylesheet padding from
@@ -16,10 +16,6 @@ import {
16
16
 
17
17
  import type { Border } from './types';
18
18
 
19
- const labelStyles = css`
20
- font-weight: 500;
21
- `;
22
-
23
19
  const focusBoxShadow = css`
24
20
  box-shadow: inset ${ CONFIG.controlBoxShadowFocus };
25
21
  `;
@@ -140,7 +136,6 @@ export const borderControlPopoverControls = css`
140
136
 
141
137
  > div:first-of-type > ${ StyledLabel } {
142
138
  margin-bottom: 0;
143
- ${ labelStyles }
144
139
  }
145
140
 
146
141
  && ${ StyledLabel } + button:not( .has-text ) {
@@ -31,28 +31,110 @@ export const VariantStates: StoryFn< typeof Button > = (
31
31
  'link',
32
32
  ];
33
33
 
34
- return (
35
- <div style={ { display: 'flex', flexDirection: 'column', gap: 24 } }>
36
- { variants.map( ( variant ) => (
37
- <div
38
- style={ { display: 'flex', gap: 8 } }
39
- key={ variant ?? 'undefined' }
34
+ const VariantsRow = ( {
35
+ buttonProps,
36
+ name,
37
+ }: {
38
+ buttonProps?: ButtonAsButtonProps;
39
+ name: string;
40
+ } ) => {
41
+ return (
42
+ <tr>
43
+ <th
44
+ style={ {
45
+ fontSize: 13,
46
+ fontWeight: 'normal',
47
+ padding: 8,
48
+ background: '#f3f4f5',
49
+ } }
40
50
  >
41
- <Button { ...props } variant={ variant } />
42
- { /* eslint-disable-next-line no-restricted-syntax */ }
43
- <Button { ...props } variant={ variant } disabled />
44
- <Button
45
- { ...props }
46
- variant={ variant }
47
- disabled
48
- accessibleWhenDisabled
49
- />
50
- <Button { ...props } variant={ variant } isBusy />
51
- <Button { ...props } variant={ variant } isDestructive />
52
- <Button { ...props } variant={ variant } isPressed />
53
- </div>
54
- ) ) }
55
- </div>
51
+ { name }
52
+ </th>
53
+ { variants.map( ( variant ) => (
54
+ <td key={ variant ?? 'undefined' } style={ { padding: 4 } }>
55
+ <Button
56
+ { ...props }
57
+ variant={ variant }
58
+ { ...buttonProps }
59
+ />
60
+ </td>
61
+ ) ) }
62
+ </tr>
63
+ );
64
+ };
65
+
66
+ return (
67
+ <table>
68
+ <thead>
69
+ <tr style={ { background: '#f3f4f5' } }>
70
+ <th />
71
+ { variants.map( ( variant ) => (
72
+ <th
73
+ key={ variant ?? 'undefined' }
74
+ style={ { padding: 8 } }
75
+ >
76
+ { variant ?? '(default)' }
77
+ </th>
78
+ ) ) }
79
+ </tr>
80
+ </thead>
81
+ <tbody>
82
+ <VariantsRow name="(default)" />
83
+ <VariantsRow
84
+ name="disabled"
85
+ buttonProps={ { disabled: true } }
86
+ />
87
+ <VariantsRow
88
+ name="focusable disabled"
89
+ buttonProps={ {
90
+ accessibleWhenDisabled: true,
91
+ disabled: true,
92
+ } }
93
+ />
94
+ <VariantsRow
95
+ name="isBusy"
96
+ buttonProps={ {
97
+ isBusy: true,
98
+ } }
99
+ />
100
+ <VariantsRow
101
+ name="isBusy disabled"
102
+ buttonProps={ {
103
+ isBusy: true,
104
+ accessibleWhenDisabled: true,
105
+ disabled: true,
106
+ } }
107
+ />
108
+ <VariantsRow
109
+ name="isDestructive"
110
+ buttonProps={ {
111
+ isDestructive: true,
112
+ } }
113
+ />
114
+ <VariantsRow
115
+ name="isDestructive disabled"
116
+ buttonProps={ {
117
+ isDestructive: true,
118
+ accessibleWhenDisabled: true,
119
+ disabled: true,
120
+ } }
121
+ />
122
+ <VariantsRow
123
+ name="isPressed"
124
+ buttonProps={ {
125
+ isPressed: true,
126
+ } }
127
+ />
128
+ <VariantsRow
129
+ name="isPressed disabled"
130
+ buttonProps={ {
131
+ isPressed: true,
132
+ accessibleWhenDisabled: true,
133
+ disabled: true,
134
+ } }
135
+ />
136
+ </tbody>
137
+ </table>
56
138
  );
57
139
  };
58
140
  VariantStates.args = {