@wordpress/components 28.7.0 → 28.8.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 (240) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/build/box-control/all-input-control.js +1 -2
  3. package/build/box-control/all-input-control.js.map +1 -1
  4. package/build/box-control/utils.js +1 -1
  5. package/build/box-control/utils.js.map +1 -1
  6. package/build/card/card/component.js +2 -2
  7. package/build/card/card/component.js.map +1 -1
  8. package/build/card/styles.js +18 -18
  9. package/build/card/styles.js.map +1 -1
  10. package/build/combobox-control/index.js +3 -1
  11. package/build/combobox-control/index.js.map +1 -1
  12. package/build/combobox-control/types.js.map +1 -1
  13. package/build/composite/context.js +1 -1
  14. package/build/composite/context.js.map +1 -1
  15. package/build/composite/group-label.js +1 -1
  16. package/build/composite/group-label.js.map +1 -1
  17. package/build/composite/group.js +1 -1
  18. package/build/composite/group.js.map +1 -1
  19. package/build/composite/hover.js +1 -1
  20. package/build/composite/hover.js.map +1 -1
  21. package/build/composite/index.js +17 -26
  22. package/build/composite/index.js.map +1 -1
  23. package/build/composite/item.js +1 -1
  24. package/build/composite/item.js.map +1 -1
  25. package/build/composite/legacy/index.js +59 -8
  26. package/build/composite/legacy/index.js.map +1 -1
  27. package/build/composite/row.js +1 -1
  28. package/build/composite/row.js.map +1 -1
  29. package/build/composite/typeahead.js +1 -1
  30. package/build/composite/typeahead.js.map +1 -1
  31. package/build/composite/types.js.map +1 -1
  32. package/build/custom-select-control-v2/styles.js +9 -9
  33. package/build/custom-select-control-v2/styles.js.map +1 -1
  34. package/build/date-time/date/index.js +1 -1
  35. package/build/date-time/date/index.js.map +1 -1
  36. package/build/date-time/date/styles.js +35 -24
  37. package/build/date-time/date/styles.js.map +1 -1
  38. package/build/date-time/date/use-lilius/index.js +163 -0
  39. package/build/date-time/date/use-lilius/index.js.map +1 -0
  40. package/build/dropdown-menu-v2/styles.js +17 -17
  41. package/build/dropdown-menu-v2/styles.js.map +1 -1
  42. package/build/index.js +7 -0
  43. package/build/index.js.map +1 -1
  44. package/build/modal/index.js +27 -12
  45. package/build/modal/index.js.map +1 -1
  46. package/build/modal/types.js.map +1 -1
  47. package/build/modal/use-modal-exit-animation.js +75 -0
  48. package/build/modal/use-modal-exit-animation.js.map +1 -0
  49. package/build/navigator/navigator-screen/component.js +5 -0
  50. package/build/navigator/navigator-screen/component.js.map +1 -1
  51. package/build/private-apis.js +0 -9
  52. package/build/private-apis.js.map +1 -1
  53. package/build/range-control/styles/range-control-styles.js +28 -28
  54. package/build/range-control/styles/range-control-styles.js.map +1 -1
  55. package/build/slot-fill/index.js +1 -0
  56. package/build/slot-fill/index.js.map +1 -1
  57. package/build/tabs/styles.js +3 -3
  58. package/build/tabs/styles.js.map +1 -1
  59. package/build/tabs/tablist.js +5 -4
  60. package/build/tabs/tablist.js.map +1 -1
  61. package/build/utils/config-values.js +4 -5
  62. package/build/utils/config-values.js.map +1 -1
  63. package/build/utils/element-rect.js +73 -105
  64. package/build/utils/element-rect.js.map +1 -1
  65. package/build-module/box-control/all-input-control.js +2 -2
  66. package/build-module/box-control/all-input-control.js.map +1 -1
  67. package/build-module/box-control/utils.js +1 -1
  68. package/build-module/box-control/utils.js.map +1 -1
  69. package/build-module/card/card/component.js +2 -2
  70. package/build-module/card/card/component.js.map +1 -1
  71. package/build-module/card/styles.js +18 -18
  72. package/build-module/card/styles.js.map +1 -1
  73. package/build-module/combobox-control/index.js +3 -1
  74. package/build-module/combobox-control/index.js.map +1 -1
  75. package/build-module/combobox-control/types.js.map +1 -1
  76. package/build-module/composite/context.js +1 -1
  77. package/build-module/composite/context.js.map +1 -1
  78. package/build-module/composite/group-label.js +1 -1
  79. package/build-module/composite/group-label.js.map +1 -1
  80. package/build-module/composite/group.js +1 -1
  81. package/build-module/composite/group.js.map +1 -1
  82. package/build-module/composite/hover.js +1 -1
  83. package/build-module/composite/hover.js.map +1 -1
  84. package/build-module/composite/index.js +17 -26
  85. package/build-module/composite/index.js.map +1 -1
  86. package/build-module/composite/item.js +1 -1
  87. package/build-module/composite/item.js.map +1 -1
  88. package/build-module/composite/legacy/index.js +56 -8
  89. package/build-module/composite/legacy/index.js.map +1 -1
  90. package/build-module/composite/row.js +1 -1
  91. package/build-module/composite/row.js.map +1 -1
  92. package/build-module/composite/typeahead.js +1 -1
  93. package/build-module/composite/typeahead.js.map +1 -1
  94. package/build-module/composite/types.js.map +1 -1
  95. package/build-module/custom-select-control-v2/styles.js +9 -9
  96. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  97. package/build-module/date-time/date/index.js +1 -2
  98. package/build-module/date-time/date/index.js.map +1 -1
  99. package/build-module/date-time/date/styles.js +31 -24
  100. package/build-module/date-time/date/styles.js.map +1 -1
  101. package/build-module/date-time/date/use-lilius/index.js +158 -0
  102. package/build-module/date-time/date/use-lilius/index.js.map +1 -0
  103. package/build-module/dropdown-menu-v2/styles.js +17 -17
  104. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  105. package/build-module/index.js +1 -0
  106. package/build-module/index.js.map +1 -1
  107. package/build-module/modal/index.js +29 -12
  108. package/build-module/modal/index.js.map +1 -1
  109. package/build-module/modal/types.js.map +1 -1
  110. package/build-module/modal/use-modal-exit-animation.js +68 -0
  111. package/build-module/modal/use-modal-exit-animation.js.map +1 -0
  112. package/build-module/navigator/navigator-screen/component.js +4 -0
  113. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  114. package/build-module/private-apis.js +0 -9
  115. package/build-module/private-apis.js.map +1 -1
  116. package/build-module/range-control/styles/range-control-styles.js +28 -28
  117. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  118. package/build-module/slot-fill/index.js +1 -0
  119. package/build-module/slot-fill/index.js.map +1 -1
  120. package/build-module/tabs/styles.js +3 -3
  121. package/build-module/tabs/styles.js.map +1 -1
  122. package/build-module/tabs/tablist.js +5 -4
  123. package/build-module/tabs/tablist.js.map +1 -1
  124. package/build-module/utils/config-values.js +4 -5
  125. package/build-module/utils/config-values.js.map +1 -1
  126. package/build-module/utils/element-rect.js +74 -105
  127. package/build-module/utils/element-rect.js.map +1 -1
  128. package/build-style/style-rtl.css +51 -10
  129. package/build-style/style.css +51 -10
  130. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  131. package/build-types/box-control/utils.d.ts +1 -1
  132. package/build-types/box-control/utils.d.ts.map +1 -1
  133. package/build-types/button-group/stories/index.story.d.ts +2 -2
  134. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  135. package/build-types/combobox-control/index.d.ts.map +1 -1
  136. package/build-types/combobox-control/stories/index.story.d.ts +4 -0
  137. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  138. package/build-types/combobox-control/types.d.ts +4 -0
  139. package/build-types/combobox-control/types.d.ts.map +1 -1
  140. package/build-types/composite/context.d.ts.map +1 -1
  141. package/build-types/composite/index.d.ts +36 -24
  142. package/build-types/composite/index.d.ts.map +1 -1
  143. package/build-types/composite/legacy/index.d.ts +25 -2
  144. package/build-types/composite/legacy/index.d.ts.map +1 -1
  145. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
  146. package/build-types/composite/stories/index.story.d.ts +9 -9
  147. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  148. package/build-types/composite/types.d.ts +11 -10
  149. package/build-types/composite/types.d.ts.map +1 -1
  150. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  151. package/build-types/date-time/date/index.d.ts +0 -3
  152. package/build-types/date-time/date/index.d.ts.map +1 -1
  153. package/build-types/date-time/date/styles.d.ts.map +1 -1
  154. package/build-types/date-time/date/test/use-lilius.d.ts +2 -0
  155. package/build-types/date-time/date/test/use-lilius.d.ts.map +1 -0
  156. package/build-types/date-time/date/use-lilius/index.d.ts +169 -0
  157. package/build-types/date-time/date/use-lilius/index.d.ts.map +1 -0
  158. package/build-types/index.d.ts +1 -0
  159. package/build-types/index.d.ts.map +1 -1
  160. package/build-types/modal/index.d.ts.map +1 -1
  161. package/build-types/modal/stories/index.story.d.ts +3 -0
  162. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  163. package/build-types/modal/types.d.ts +6 -10
  164. package/build-types/modal/types.d.ts.map +1 -1
  165. package/build-types/modal/use-modal-exit-animation.d.ts +9 -0
  166. package/build-types/modal/use-modal-exit-animation.d.ts.map +1 -0
  167. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  168. package/build-types/private-apis.d.ts.map +1 -1
  169. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  170. package/build-types/slot-fill/index.d.ts +3 -0
  171. package/build-types/slot-fill/index.d.ts.map +1 -1
  172. package/build-types/tabs/styles.d.ts.map +1 -1
  173. package/build-types/tabs/tablist.d.ts.map +1 -1
  174. package/build-types/utils/config-values.d.ts +0 -1
  175. package/build-types/utils/element-rect.d.ts +32 -74
  176. package/build-types/utils/element-rect.d.ts.map +1 -1
  177. package/package.json +19 -20
  178. package/src/box-control/README.md +7 -0
  179. package/src/box-control/all-input-control.tsx +2 -3
  180. package/src/box-control/utils.ts +1 -1
  181. package/src/button-group/stories/index.story.tsx +10 -15
  182. package/src/card/card/component.tsx +1 -1
  183. package/src/card/styles.ts +1 -1
  184. package/src/card/test/__snapshots__/index.tsx.snap +54 -54
  185. package/src/combobox-control/README.md +7 -0
  186. package/src/combobox-control/index.tsx +2 -0
  187. package/src/combobox-control/test/index.tsx +40 -0
  188. package/src/combobox-control/types.ts +4 -0
  189. package/src/composite/README.md +5 -24
  190. package/src/composite/{context.ts → context.tsx} +1 -2
  191. package/src/composite/group-label.tsx +1 -1
  192. package/src/composite/group.tsx +1 -1
  193. package/src/composite/hover.tsx +1 -1
  194. package/src/composite/index.tsx +17 -28
  195. package/src/composite/item.tsx +1 -1
  196. package/src/composite/legacy/index.tsx +72 -11
  197. package/src/composite/legacy/stories/index.story.tsx +2 -1
  198. package/src/composite/legacy/test/index.tsx +57 -1
  199. package/src/composite/row.tsx +1 -1
  200. package/src/composite/stories/index.story.tsx +185 -169
  201. package/src/composite/typeahead.tsx +1 -1
  202. package/src/composite/types.ts +13 -15
  203. package/src/custom-select-control-v2/styles.ts +1 -0
  204. package/src/date-time/date/index.tsx +1 -1
  205. package/src/date-time/date/styles.ts +31 -11
  206. package/src/date-time/date/test/use-lilius.ts +417 -0
  207. package/src/date-time/date/use-lilius/index.ts +394 -0
  208. package/src/dropdown-menu-v2/styles.ts +1 -1
  209. package/src/form-toggle/style.scss +1 -0
  210. package/src/index.ts +1 -0
  211. package/src/modal/index.tsx +42 -19
  212. package/src/modal/stories/index.story.tsx +8 -14
  213. package/src/modal/style.scss +30 -8
  214. package/src/modal/types.ts +6 -18
  215. package/src/modal/use-modal-exit-animation.ts +99 -0
  216. package/src/navigator/navigator-screen/component.tsx +7 -0
  217. package/src/navigator/test/index.tsx +8 -0
  218. package/src/popover/style.scss +3 -2
  219. package/src/private-apis.ts +0 -9
  220. package/src/range-control/styles/range-control-styles.ts +1 -0
  221. package/src/resizable-box/style.scss +1 -1
  222. package/src/select-control/README.md +2 -2
  223. package/src/slot-fill/index.tsx +1 -0
  224. package/src/snackbar/style.scss +1 -1
  225. package/src/tabs/styles.ts +40 -11
  226. package/src/tabs/tablist.tsx +5 -4
  227. package/src/tooltip/style.scss +1 -0
  228. package/src/utils/config-values.js +4 -5
  229. package/src/utils/element-rect.ts +93 -130
  230. package/tsconfig.tsbuildinfo +1 -1
  231. package/build/composite/store.js +0 -54
  232. package/build/composite/store.js.map +0 -1
  233. package/build-module/composite/store.js +0 -46
  234. package/build-module/composite/store.js.map +0 -1
  235. package/build-types/composite/store.d.ts +0 -25
  236. package/build-types/composite/store.d.ts.map +0 -1
  237. package/build-types/composite/stories/utils.d.ts +0 -29
  238. package/build-types/composite/stories/utils.d.ts.map +0 -1
  239. package/src/composite/store.ts +0 -46
  240. package/src/composite/stories/utils.tsx +0 -76
@@ -1,79 +1,27 @@
1
- /**
2
- * `useTrackElementRectUpdates` options.
3
- */
4
- export type UseTrackElementRectUpdatesOptions = {
5
- /**
6
- * Whether to trigger the callback when an element's ResizeObserver is
7
- * first set up, including when the target element changes.
8
- *
9
- * @default true
10
- */
11
- fireOnElementInit?: boolean;
12
- };
13
- /**
14
- * Tracks an element's "rect" (size and position) and fires `onRect` for all
15
- * of its discrete values. The element can be changed dynamically and **it
16
- * must not be stored in a ref**. Instead, it should be stored in a React
17
- * state or equivalent.
18
- *
19
- * By default, `onRect` is called initially for the target element (including
20
- * when the target element changes), not only on size or position updates.
21
- * This allows consumers of the hook to always be in sync with all rect values
22
- * of the target element throughout its lifetime. This behavior can be
23
- * disabled by setting the `fireOnElementInit` option to `false`.
24
- *
25
- * Under the hood, it sets up a `ResizeObserver` that tracks the element. The
26
- * target element can be changed dynamically, and the observer will be
27
- * updated accordingly.
28
- *
29
- * @example
30
- *
31
- * ```tsx
32
- * const [ targetElement, setTargetElement ] = useState< HTMLElement | null >();
33
- *
34
- * useTrackElementRectUpdates( targetElement, ( element ) => {
35
- * console.log( 'Element resized:', element );
36
- * } );
37
- *
38
- * <div ref={ setTargetElement } />;
39
- * ```
40
- */
41
- export declare function useTrackElementRectUpdates(
42
- /**
43
- * The target element to observe. It can be changed dynamically.
44
- */
45
- targetElement: HTMLElement | undefined | null,
46
- /**
47
- * Callback to fire when the element is resized. It will also be
48
- * called when the observer is set up, unless `fireOnElementInit` is
49
- * set to `false`.
50
- */
51
- onRect: (
52
- /**
53
- * The element being tracked at the time of this update.
54
- */
55
- element: HTMLElement,
56
- /**
57
- * The list of
58
- * [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)
59
- * objects passed to the `ResizeObserver.observe` callback. This list
60
- * won't be available when the observer is set up, and only on updates.
61
- */
62
- resizeObserverEntries?: ResizeObserverEntry[]) => void, { fireOnElementInit }?: UseTrackElementRectUpdatesOptions): void;
63
1
  /**
64
2
  * The position and dimensions of an element, relative to its offset parent.
65
3
  */
66
4
  export type ElementOffsetRect = {
67
5
  /**
68
- * The distance from the left edge of the offset parent to the left edge of
6
+ * The distance from the top edge of the offset parent to the top edge of
69
7
  * the element.
70
8
  */
71
- left: number;
9
+ top: number;
72
10
  /**
73
- * The distance from the top edge of the offset parent to the top edge of
11
+ * The distance from the right edge of the offset parent to the right edge
12
+ * of the element.
13
+ */
14
+ right: number;
15
+ /**
16
+ * The distance from the bottom edge of the offset parent to the bottom edge
17
+ * of the element.
18
+ */
19
+ bottom: number;
20
+ /**
21
+ * The distance from the left edge of the offset parent to the left edge of
74
22
  * the element.
75
23
  */
76
- top: number;
24
+ left: number;
77
25
  /**
78
26
  * The width of the element.
79
27
  */
@@ -87,25 +35,35 @@ export type ElementOffsetRect = {
87
35
  * An `ElementOffsetRect` object with all values set to zero.
88
36
  */
89
37
  export declare const NULL_ELEMENT_OFFSET_RECT: {
90
- left: number;
91
38
  top: number;
39
+ right: number;
40
+ bottom: number;
41
+ left: number;
92
42
  width: number;
93
43
  height: number;
94
44
  };
95
45
  /**
96
46
  * Returns the position and dimensions of an element, relative to its offset
97
- * parent. This is useful in contexts where `getBoundingClientRect` is not
98
- * suitable, such as when the element is transformed.
47
+ * parent, with subpixel precision. Values reflect the real measures before any
48
+ * potential scaling distortions along the X and Y axes.
99
49
  *
100
- * **Note:** the `left` and `right` values are adjusted due to a limitation
101
- * in the way the browser calculates the offset position of the element,
102
- * which can cause unwanted scrollbars to appear. This adjustment makes the
103
- * values potentially inaccurate within a range of 1 pixel.
50
+ * Useful in contexts where plain `getBoundingClientRect` calls or `ResizeObserver`
51
+ * entries are not suitable, such as when the element is transformed, and when
52
+ * `element.offset<Top|Left|Width|Height>` methods are not precise enough.
53
+ *
54
+ * **Note:** in some contexts, like when the scale is 0, this method will fail
55
+ * because it's impossible to calculate a scaling ratio. When that happens, it
56
+ * will return `undefined`.
104
57
  */
105
- export declare function getElementOffsetRect(element: HTMLElement): ElementOffsetRect;
58
+ export declare function getElementOffsetRect(element: HTMLElement): ElementOffsetRect | undefined;
106
59
  /**
107
60
  * Tracks the position and dimensions of an element, relative to its offset
108
61
  * parent. The element can be changed dynamically.
62
+ *
63
+ * **Note:** sometimes, the measurement will fail (see `getElementOffsetRect`'s
64
+ * documentation for more details). When that happens, this hook will attempt
65
+ * to measure again after a frame, and if that fails, it will poll every 100
66
+ * milliseconds until it succeeds.
109
67
  */
110
68
  export declare function useTrackElementOffsetRect(targetElement: HTMLElement | undefined | null): ElementOffsetRect;
111
69
  //# sourceMappingURL=element-rect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element-rect.d.ts","sourceRoot":"","sources":["../../src/utils/element-rect.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC/C;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,0BAA0B;AACzC;;GAEG;AACH,aAAa,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI;AAC7C;;;;GAIG;AACH,MAAM,EAAE;AACP;;GAEG;AACH,OAAO,EAAE,WAAW;AACpB;;;;;GAKG;AACH,qBAAqB,CAAC,EAAE,mBAAmB,EAAE,KACzC,IAAI,EACT,EAAE,iBAAwB,EAAE,GAAE,iCAAsC,QA0CpE;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;CAKR,CAAC;AAE9B;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,WAAW,GAClB,iBAAiB,CAanB;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACxC,aAAa,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,qBAU7C"}
1
+ {"version":3,"file":"element-rect.d.ts","sourceRoot":"","sources":["../../src/utils/element-rect.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;CAOR,CAAC;AAE9B;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,WAAW,GAClB,iBAAiB,GAAG,SAAS,CAmC/B;AAID;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACxC,aAAa,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,qBAoC7C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "28.7.0",
3
+ "version": "28.8.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -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.7.0",
47
- "@wordpress/compose": "^7.7.0",
48
- "@wordpress/date": "^5.7.0",
49
- "@wordpress/deprecated": "^4.7.0",
50
- "@wordpress/dom": "^4.7.0",
51
- "@wordpress/element": "^6.7.0",
52
- "@wordpress/escape-html": "^3.7.0",
53
- "@wordpress/hooks": "^4.7.0",
54
- "@wordpress/html-entities": "^4.7.0",
55
- "@wordpress/i18n": "^5.7.0",
56
- "@wordpress/icons": "^10.7.0",
57
- "@wordpress/is-shallow-equal": "^5.7.0",
58
- "@wordpress/keycodes": "^4.7.0",
59
- "@wordpress/primitives": "^4.7.0",
60
- "@wordpress/private-apis": "^1.7.0",
61
- "@wordpress/rich-text": "^7.7.0",
62
- "@wordpress/warning": "^3.7.0",
46
+ "@wordpress/a11y": "^4.8.0",
47
+ "@wordpress/compose": "^7.8.0",
48
+ "@wordpress/date": "^5.8.0",
49
+ "@wordpress/deprecated": "^4.8.0",
50
+ "@wordpress/dom": "^4.8.0",
51
+ "@wordpress/element": "^6.8.0",
52
+ "@wordpress/escape-html": "^3.8.0",
53
+ "@wordpress/hooks": "^4.8.0",
54
+ "@wordpress/html-entities": "^4.8.0",
55
+ "@wordpress/i18n": "^5.8.0",
56
+ "@wordpress/icons": "^10.8.0",
57
+ "@wordpress/is-shallow-equal": "^5.8.0",
58
+ "@wordpress/keycodes": "^4.8.0",
59
+ "@wordpress/primitives": "^4.8.0",
60
+ "@wordpress/private-apis": "^1.8.0",
61
+ "@wordpress/rich-text": "^7.8.0",
62
+ "@wordpress/warning": "^3.8.0",
63
63
  "change-case": "^4.1.2",
64
64
  "clsx": "^2.1.1",
65
65
  "colord": "^2.7.0",
@@ -75,7 +75,6 @@
75
75
  "re-resizable": "^6.4.0",
76
76
  "react-colorful": "^5.3.1",
77
77
  "remove-accents": "^0.5.0",
78
- "use-lilius": "^2.0.5",
79
78
  "uuid": "^9.0.1"
80
79
  },
81
80
  "peerDependencies": {
@@ -85,5 +84,5 @@
85
84
  "publishConfig": {
86
85
  "access": "public"
87
86
  },
88
- "gitHead": "c90d920de07c53dff82c5914635b56fafa503b7f"
87
+ "gitHead": "cecf5e14d317aa67407f77a7e5c8b6a43016bd42"
89
88
  }
@@ -100,3 +100,10 @@ A handler for onMouseOver events.
100
100
  A handler for onMouseOut events.
101
101
 
102
102
  - Required: No
103
+
104
+ ### `__next40pxDefaultSize`: `boolean`
105
+
106
+ Start opting into the larger default size that will become the default size in a future version.
107
+
108
+ - Required: No
109
+ - Default: `false`
@@ -10,7 +10,6 @@ import {
10
10
  FlexedRangeControl,
11
11
  StyledUnitControl,
12
12
  } from './styles/box-control-styles';
13
- import { HStack } from '../h-stack';
14
13
  import type { BoxControlInputControlProps } from './types';
15
14
  import { parseQuantityAndUnitFromRawValue } from '../unit-control';
16
15
  import {
@@ -72,7 +71,7 @@ export default function AllInputControl( {
72
71
  };
73
72
 
74
73
  return (
75
- <HStack>
74
+ <>
76
75
  <StyledUnitControl
77
76
  { ...props }
78
77
  __next40pxDefaultSize={ __next40pxDefaultSize }
@@ -104,6 +103,6 @@ export default function AllInputControl( {
104
103
  value={ parsedQuantity ?? 0 }
105
104
  withInputField={ false }
106
105
  />
107
- </HStack>
106
+ </>
108
107
  );
109
108
  }
@@ -179,7 +179,7 @@ export function isValuesMixed(
179
179
  */
180
180
  export function isValuesDefined( values?: BoxControlValue ) {
181
181
  return (
182
- values !== undefined &&
182
+ values &&
183
183
  Object.values( values ).filter(
184
184
  // Switching units when input is empty causes values only
185
185
  // containing units. This gives false positive on mixed values
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { Meta, StoryFn } from '@storybook/react';
4
+ import type { Meta, StoryObj } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
@@ -22,18 +22,13 @@ const meta: Meta< typeof ButtonGroup > = {
22
22
  };
23
23
  export default meta;
24
24
 
25
- const Template: StoryFn< typeof ButtonGroup > = ( args ) => {
26
- const style = { margin: '0 4px' };
27
- return (
28
- <ButtonGroup { ...args }>
29
- <Button variant="primary" style={ style }>
30
- Button 1
31
- </Button>
32
- <Button variant="primary" style={ style }>
33
- Button 2
34
- </Button>
35
- </ButtonGroup>
36
- );
25
+ export const Default: StoryObj< typeof ButtonGroup > = {
26
+ args: {
27
+ children: (
28
+ <>
29
+ <Button variant="primary">Button 1</Button>
30
+ <Button>Button 2</Button>
31
+ </>
32
+ ),
33
+ },
37
34
  };
38
-
39
- export const Default: StoryFn< typeof ButtonGroup > = Template.bind( {} );
@@ -34,7 +34,7 @@ function UnconnectedCard(
34
34
  size,
35
35
  ...otherProps
36
36
  } = useCard( props );
37
- const elevationBorderRadius = isRounded ? CONFIG.cardBorderRadius : 0;
37
+ const elevationBorderRadius = isRounded ? CONFIG.radiusLarge : 0;
38
38
 
39
39
  const cx = useCx();
40
40
 
@@ -12,7 +12,7 @@ import { COLORS, CONFIG } from '../utils';
12
12
  // (as opposed to the `border` property), the value of the border radius needs
13
13
  // to be adjusted by removing 1px (this is because the `box-shadow` renders
14
14
  // as an "outer radius").
15
- const adjustedBorderRadius = `calc(${ CONFIG.cardBorderRadius } - 1px)`;
15
+ const adjustedBorderRadius = `calc(${ CONFIG.radiusLarge } - 1px)`;
16
16
 
17
17
  export const Card = css`
18
18
  box-shadow: 0 0 0 1px ${ CONFIG.surfaceBorderColor };
@@ -8,8 +8,8 @@ Snapshot Diff:
8
8
  @@ -1,8 +1,8 @@
9
9
  <div>
10
10
  <div
11
- - class="components-card__body components-card-body css-d0qyo2-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
12
- + class="components-scrollable components-card__body components-card-body css-vpf7zs-PolymorphicDiv-Scrollable-scrollableScrollbar-scrollY-Body-borderRadius-medium e19lxcc00"
11
+ - class="components-card__body components-card-body css-12jqy32-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
12
+ + class="components-scrollable components-card__body components-card-body css-26nv7r-PolymorphicDiv-Scrollable-scrollableScrollbar-scrollY-Body-borderRadius-medium e19lxcc00"
13
13
  data-wp-c16t="true"
14
14
  data-wp-component="CardBody"
15
15
  >
@@ -25,8 +25,8 @@ Snapshot Diff:
25
25
  @@ -1,8 +1,8 @@
26
26
  <div>
27
27
  <div
28
- - class="components-card__body components-card-body css-d0qyo2-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
29
- + class="components-card__body components-card-body css-4zm8r0-PolymorphicDiv-Body-borderRadius-medium-shady e19lxcc00"
28
+ - class="components-card__body components-card-body css-12jqy32-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
29
+ + class="components-card__body components-card-body css-1j7lja1-PolymorphicDiv-Body-borderRadius-medium-shady e19lxcc00"
30
30
  data-wp-c16t="true"
31
31
  data-wp-component="CardBody"
32
32
  >
@@ -42,8 +42,8 @@ Snapshot Diff:
42
42
  @@ -1,8 +1,8 @@
43
43
  <div>
44
44
  <div
45
- - class="components-flex components-card__footer components-card-footer css-1l4bmbt-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium e19lxcc00"
46
- + class="components-flex components-card__footer components-card-footer css-8pv7rj-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium-shady e19lxcc00"
45
+ - class="components-flex components-card__footer components-card-footer css-19sc0cg-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium e19lxcc00"
46
+ + class="components-flex components-card__footer components-card-footer css-14budie-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium-shady e19lxcc00"
47
47
  data-wp-c16t="true"
48
48
  data-wp-component="CardFooter"
49
49
  >
@@ -59,8 +59,8 @@ Snapshot Diff:
59
59
  @@ -1,8 +1,8 @@
60
60
  <div>
61
61
  <div
62
- - class="components-flex components-card__footer components-card-footer css-1l4bmbt-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium e19lxcc00"
63
- + class="components-flex components-card__footer components-card-footer css-1hguscv-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium e19lxcc00"
62
+ - class="components-flex components-card__footer components-card-footer css-19sc0cg-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium e19lxcc00"
63
+ + class="components-flex components-card__footer components-card-footer css-2io175-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium e19lxcc00"
64
64
  data-wp-c16t="true"
65
65
  data-wp-component="CardFooter"
66
66
  >
@@ -76,8 +76,8 @@ Snapshot Diff:
76
76
  @@ -1,8 +1,8 @@
77
77
  <div>
78
78
  <div
79
- - class="components-flex components-card__header components-card-header css-1tfuk0d-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium e19lxcc00"
80
- + class="components-flex components-card__header components-card-header css-10qs2ur-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium-shady e19lxcc00"
79
+ - class="components-flex components-card__header components-card-header css-1qwshfy-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium e19lxcc00"
80
+ + class="components-flex components-card__header components-card-header css-1bzc8bz-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium-shady e19lxcc00"
81
81
  data-wp-c16t="true"
82
82
  data-wp-component="CardHeader"
83
83
  >
@@ -96,16 +96,16 @@ Snapshot Diff:
96
96
  class="css-76dw7d-PolymorphicDiv-Content e19lxcc00"
97
97
  >
98
98
  <div
99
- - class="components-flex components-card__header components-card-header css-1tfuk0d-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium e19lxcc00"
100
- + class="components-flex components-card__header components-card-header css-d1c2bv-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-large e19lxcc00"
99
+ - class="components-flex components-card__header components-card-header css-1qwshfy-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium e19lxcc00"
100
+ + class="components-flex components-card__header components-card-header css-1t2zg3y-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-large e19lxcc00"
101
101
  data-wp-c16t="true"
102
102
  data-wp-component="CardHeader"
103
103
  >
104
104
  Header
105
105
  </div>
106
106
  <div
107
- - class="components-card__body components-card-body css-d0qyo2-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
108
- + class="components-card__body components-card-body css-kub9fa-PolymorphicDiv-Body-borderRadius-large e19lxcc00"
107
+ - class="components-card__body components-card-body css-12jqy32-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
108
+ + class="components-card__body components-card-body css-e0vrqx-PolymorphicDiv-Body-borderRadius-large e19lxcc00"
109
109
  data-wp-c16t="true"
110
110
  data-wp-component="CardBody"
111
111
  >
@@ -122,7 +122,7 @@ Snapshot Diff:
122
122
  Array [
123
123
  Object {
124
124
  "background-color": "#fff",
125
- - "border-radius": "calc(2px - 1px)",
125
+ - "border-radius": "calc(8px - 1px)",
126
126
  "box-shadow": "0 0 0 1px rgba(0, 0, 0, 0.1)",
127
127
  "color": "#1e1e1e",
128
128
  "outline": "none",
@@ -141,24 +141,24 @@ Snapshot Diff:
141
141
  class="css-76dw7d-PolymorphicDiv-Content e19lxcc00"
142
142
  >
143
143
  <div
144
- - class="components-flex components-card__header components-card-header css-1xfrxuu-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-large-borderless e19lxcc00"
145
- + class="components-flex components-card__header components-card-header css-1mitrbv-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-small e19lxcc00"
144
+ - class="components-flex components-card__header components-card-header css-ubn8f6-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-large-borderless e19lxcc00"
145
+ + class="components-flex components-card__header components-card-header css-1t1rswf-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-small e19lxcc00"
146
146
  data-wp-c16t="true"
147
147
  data-wp-component="CardHeader"
148
148
  >
149
149
  Header
150
150
  </div>
151
151
  <div
152
- - class="components-card__body components-card-body css-kub9fa-PolymorphicDiv-Body-borderRadius-large e19lxcc00"
153
- + class="components-card__body components-card-body css-d0qyo2-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
152
+ - class="components-card__body components-card-body css-e0vrqx-PolymorphicDiv-Body-borderRadius-large e19lxcc00"
153
+ + class="components-card__body components-card-body css-12jqy32-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
154
154
  data-wp-c16t="true"
155
155
  data-wp-component="CardBody"
156
156
  >
157
157
  Body
158
158
  </div>
159
159
  <div
160
- - class="components-flex components-card__footer components-card-footer css-8o7z5w-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-large-borderless e19lxcc00"
161
- + class="components-flex components-card__footer components-card-footer css-1umuqb4-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-xSmallCardPadding e19lxcc00"
160
+ - class="components-flex components-card__footer components-card-footer css-167csgt-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-large-borderless e19lxcc00"
161
+ + class="components-flex components-card__footer components-card-footer css-1kcgqsk-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-xSmallCardPadding e19lxcc00"
162
162
  data-wp-c16t="true"
163
163
  data-wp-component="CardFooter"
164
164
  >
@@ -174,8 +174,8 @@ Snapshot Diff:
174
174
  @@ -1,30 +1,30 @@
175
175
  <div>
176
176
  <div
177
- - class="components-surface components-card css-5ubhkm-PolymorphicDiv-Surface-getBorders-primary-Card-boxShadowless-rounded e19lxcc00"
178
- + class="components-surface components-card css-1lc0qq8-PolymorphicDiv-Surface-getBorders-primary-Card-rounded e19lxcc00"
177
+ - class="components-surface components-card css-1hs39fv-PolymorphicDiv-Surface-getBorders-primary-Card-boxShadowless-rounded e19lxcc00"
178
+ + class="components-surface components-card css-1c6nh8q-PolymorphicDiv-Surface-getBorders-primary-Card-rounded e19lxcc00"
179
179
  data-wp-c16t="true"
180
180
  data-wp-component="Card"
181
181
  >
@@ -183,24 +183,24 @@ Snapshot Diff:
183
183
  class="css-76dw7d-PolymorphicDiv-Content e19lxcc00"
184
184
  >
185
185
  <div
186
- - class="components-flex components-card__header components-card-header css-1xfrxuu-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-large-borderless e19lxcc00"
187
- + class="components-flex components-card__header components-card-header css-1mitrbv-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-small e19lxcc00"
186
+ - class="components-flex components-card__header components-card-header css-ubn8f6-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-large-borderless e19lxcc00"
187
+ + class="components-flex components-card__header components-card-header css-1t1rswf-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-small e19lxcc00"
188
188
  data-wp-c16t="true"
189
189
  data-wp-component="CardHeader"
190
190
  >
191
191
  Header
192
192
  </div>
193
193
  <div
194
- - class="components-card__body components-card-body css-kub9fa-PolymorphicDiv-Body-borderRadius-large e19lxcc00"
195
- + class="components-card__body components-card-body css-1djcdvu-PolymorphicDiv-Body-borderRadius-small e19lxcc00"
194
+ - class="components-card__body components-card-body css-e0vrqx-PolymorphicDiv-Body-borderRadius-large e19lxcc00"
195
+ + class="components-card__body components-card-body css-hms9n9-PolymorphicDiv-Body-borderRadius-small e19lxcc00"
196
196
  data-wp-c16t="true"
197
197
  data-wp-component="CardBody"
198
198
  >
199
199
  Body
200
200
  </div>
201
201
  <div
202
- - class="components-flex components-card__footer components-card-footer css-8o7z5w-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-large-borderless e19lxcc00"
203
- + class="components-flex components-card__footer components-card-footer css-1awxp6o-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-small e19lxcc00"
202
+ - class="components-flex components-card__footer components-card-footer css-167csgt-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-large-borderless e19lxcc00"
203
+ + class="components-flex components-card__footer components-card-footer css-18yn3ff-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-small e19lxcc00"
204
204
  data-wp-c16t="true"
205
205
  data-wp-component="CardFooter"
206
206
  >
@@ -215,7 +215,7 @@ exports[`Card Card component should render correctly 1`] = `
215
215
  position: relative;
216
216
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
217
217
  outline: none;
218
- border-radius: calc(2px - 1px);
218
+ border-radius: calc(8px - 1px);
219
219
  }
220
220
 
221
221
  .emotion-2 {
@@ -254,13 +254,13 @@ exports[`Card Card component should render correctly 1`] = `
254
254
  }
255
255
 
256
256
  .emotion-4:first-of-type {
257
- border-top-left-radius: calc(2px - 1px);
258
- border-top-right-radius: calc(2px - 1px);
257
+ border-top-left-radius: calc(8px - 1px);
258
+ border-top-right-radius: calc(8px - 1px);
259
259
  }
260
260
 
261
261
  .emotion-4:last-of-type {
262
- border-bottom-left-radius: calc(2px - 1px);
263
- border-bottom-right-radius: calc(2px - 1px);
262
+ border-bottom-left-radius: calc(8px - 1px);
263
+ border-bottom-right-radius: calc(8px - 1px);
264
264
  }
265
265
 
266
266
  .emotion-6 {
@@ -271,13 +271,13 @@ exports[`Card Card component should render correctly 1`] = `
271
271
  }
272
272
 
273
273
  .emotion-6:first-of-type {
274
- border-top-left-radius: calc(2px - 1px);
275
- border-top-right-radius: calc(2px - 1px);
274
+ border-top-left-radius: calc(8px - 1px);
275
+ border-top-right-radius: calc(8px - 1px);
276
276
  }
277
277
 
278
278
  .emotion-6:last-of-type {
279
- border-bottom-left-radius: calc(2px - 1px);
280
- border-bottom-right-radius: calc(2px - 1px);
279
+ border-bottom-left-radius: calc(8px - 1px);
280
+ border-bottom-right-radius: calc(8px - 1px);
281
281
  }
282
282
 
283
283
  .emotion-10 {
@@ -306,13 +306,13 @@ exports[`Card Card component should render correctly 1`] = `
306
306
  }
307
307
 
308
308
  .emotion-14:first-of-type {
309
- border-top-left-radius: calc(2px - 1px);
310
- border-top-right-radius: calc(2px - 1px);
309
+ border-top-left-radius: calc(8px - 1px);
310
+ border-top-right-radius: calc(8px - 1px);
311
311
  }
312
312
 
313
313
  .emotion-14:last-of-type {
314
- border-bottom-left-radius: calc(2px - 1px);
315
- border-bottom-right-radius: calc(2px - 1px);
314
+ border-bottom-left-radius: calc(8px - 1px);
315
+ border-bottom-right-radius: calc(8px - 1px);
316
316
  }
317
317
 
318
318
  .emotion-16 {
@@ -347,13 +347,13 @@ exports[`Card Card component should render correctly 1`] = `
347
347
  }
348
348
 
349
349
  .emotion-16:first-of-type {
350
- border-top-left-radius: calc(2px - 1px);
351
- border-top-right-radius: calc(2px - 1px);
350
+ border-top-left-radius: calc(8px - 1px);
351
+ border-top-right-radius: calc(8px - 1px);
352
352
  }
353
353
 
354
354
  .emotion-16:last-of-type {
355
- border-bottom-left-radius: calc(2px - 1px);
356
- border-bottom-right-radius: calc(2px - 1px);
355
+ border-bottom-left-radius: calc(8px - 1px);
356
+ border-bottom-right-radius: calc(8px - 1px);
357
357
  }
358
358
 
359
359
  .emotion-18 {
@@ -370,7 +370,7 @@ exports[`Card Card component should render correctly 1`] = `
370
370
  left: 0;
371
371
  right: 0;
372
372
  top: 0;
373
- border-radius: 2px;
373
+ border-radius: 8px;
374
374
  }
375
375
 
376
376
  @media not ( prefers-reduced-motion ) {
@@ -469,15 +469,15 @@ Snapshot Diff:
469
469
  </div>
470
470
  <div
471
471
  aria-hidden="true"
472
- - class="components-elevation css-1dd80bh-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
473
- + class="components-elevation css-1jg41yu-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
472
+ - class="components-elevation css-a91pvj-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
473
+ + class="components-elevation css-1q4cuxd-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
474
474
  data-wp-c16t="true"
475
475
  data-wp-component="Elevation"
476
476
  />
477
477
  <div
478
478
  aria-hidden="true"
479
- - class="components-elevation css-iuptql-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
480
- + class="components-elevation css-1jg41yu-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
479
+ - class="components-elevation css-5u83fl-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
480
+ + class="components-elevation css-1q4cuxd-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
481
481
  data-wp-c16t="true"
482
482
  data-wp-component="Elevation"
483
483
  />
@@ -497,7 +497,7 @@ exports[`Card Card component should warn when the isElevated prop is passed 1`]
497
497
  position: relative;
498
498
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
499
499
  outline: none;
500
- border-radius: calc(2px - 1px);
500
+ border-radius: calc(8px - 1px);
501
501
  }
502
502
 
503
503
  .emotion-2 {
@@ -518,7 +518,7 @@ exports[`Card Card component should warn when the isElevated prop is passed 1`]
518
518
  left: 0;
519
519
  right: 0;
520
520
  top: 0;
521
- border-radius: 2px;
521
+ border-radius: 8px;
522
522
  }
523
523
 
524
524
  @media not ( prefers-reduced-motion ) {
@@ -542,7 +542,7 @@ exports[`Card Card component should warn when the isElevated prop is passed 1`]
542
542
  left: 0;
543
543
  right: 0;
544
544
  top: 0;
545
- border-radius: 2px;
545
+ border-radius: 8px;
546
546
  }
547
547
 
548
548
  @media not ( prefers-reduced-motion ) {
@@ -111,6 +111,13 @@ If the control is clicked, the dropdown will expand regardless of this prop.
111
111
  - Required: No
112
112
  - Default: `true`
113
113
 
114
+ ### placeholder
115
+
116
+ If passed, the combobox input will show a placeholder string if no values are present.
117
+
118
+ - Type: `string`
119
+ - Required: No
120
+
114
121
  #### __experimentalRenderItem
115
122
 
116
123
  Custom renderer invoked for each option in the suggestion list. The render prop receives as its argument an object containing, under the `item` key, the single option's data (directly from the array of data passed to the `options` prop).
@@ -129,6 +129,7 @@ function ComboboxControl( props: ComboboxControlProps ) {
129
129
  },
130
130
  __experimentalRenderItem,
131
131
  expandOnFocus = true,
132
+ placeholder,
132
133
  } = useDeprecated36pxDefaultSizeProp( props );
133
134
 
134
135
  const [ value, setValue ] = useControlledValue( {
@@ -340,6 +341,7 @@ function ComboboxControl( props: ComboboxControlProps ) {
340
341
  className="components-combobox-control__input"
341
342
  instanceId={ instanceId }
342
343
  ref={ inputContainer }
344
+ placeholder={ placeholder }
343
345
  value={ isExpanded ? inputValue : currentLabel }
344
346
  onFocus={ onFocus }
345
347
  onBlur={ onBlur }