@wordpress/components 23.3.1 → 23.3.3

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 (220) hide show
  1. package/CHANGELOG.md +22 -2
  2. package/build/color-palette/index.js +7 -4
  3. package/build/color-palette/index.js.map +1 -1
  4. package/build/color-palette/utils.js +12 -4
  5. package/build/color-palette/utils.js.map +1 -1
  6. package/build/custom-select-control/index.js +7 -0
  7. package/build/custom-select-control/index.js.map +1 -1
  8. package/build/index.js +16 -10
  9. package/build/index.js.map +1 -1
  10. package/build/navigator/context.js +5 -1
  11. package/build/navigator/context.js.map +1 -1
  12. package/build/navigator/index.js +8 -0
  13. package/build/navigator/index.js.map +1 -1
  14. package/build/navigator/navigator-back-button/hook.js +11 -3
  15. package/build/navigator/navigator-back-button/hook.js.map +1 -1
  16. package/build/navigator/navigator-provider/component.js +119 -11
  17. package/build/navigator/navigator-provider/component.js.map +1 -1
  18. package/build/navigator/navigator-screen/component.js +18 -7
  19. package/build/navigator/navigator-screen/component.js.map +1 -1
  20. package/build/navigator/navigator-to-parent-button/component.js +75 -0
  21. package/build/navigator/navigator-to-parent-button/component.js.map +1 -0
  22. package/build/navigator/navigator-to-parent-button/index.js +16 -0
  23. package/build/navigator/navigator-to-parent-button/index.js.map +1 -0
  24. package/build/navigator/use-navigator.js +6 -2
  25. package/build/navigator/use-navigator.js.map +1 -1
  26. package/build/navigator/utils/router.js +57 -0
  27. package/build/navigator/utils/router.js.map +1 -0
  28. package/build/private-apis.js +35 -0
  29. package/build/private-apis.js.map +1 -0
  30. package/build/select-control/index.js +1 -1
  31. package/build/select-control/index.js.map +1 -1
  32. package/build/select-control/styles/select-control-styles.js +38 -25
  33. package/build/select-control/styles/select-control-styles.js.map +1 -1
  34. package/build/tools-panel/tools-panel/hook.js +4 -4
  35. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  36. package/build/tools-panel/tools-panel-item/hook.js +20 -11
  37. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  38. package/build-module/color-palette/index.js +8 -5
  39. package/build-module/color-palette/index.js.map +1 -1
  40. package/build-module/color-palette/utils.js +12 -4
  41. package/build-module/color-palette/utils.js.map +1 -1
  42. package/build-module/custom-select-control/index.js +5 -0
  43. package/build-module/custom-select-control/index.js.map +1 -1
  44. package/build-module/index.js +5 -4
  45. package/build-module/index.js.map +1 -1
  46. package/build-module/navigator/context.js +5 -1
  47. package/build-module/navigator/context.js.map +1 -1
  48. package/build-module/navigator/index.js +1 -0
  49. package/build-module/navigator/index.js.map +1 -1
  50. package/build-module/navigator/navigator-back-button/hook.js +11 -3
  51. package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
  52. package/build-module/navigator/navigator-provider/component.js +117 -12
  53. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  54. package/build-module/navigator/navigator-screen/component.js +20 -9
  55. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  56. package/build-module/navigator/navigator-to-parent-button/component.js +61 -0
  57. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -0
  58. package/build-module/navigator/navigator-to-parent-button/index.js +2 -0
  59. package/build-module/navigator/navigator-to-parent-button/index.js.map +1 -0
  60. package/build-module/navigator/use-navigator.js +6 -2
  61. package/build-module/navigator/use-navigator.js.map +1 -1
  62. package/build-module/navigator/utils/router.js +51 -0
  63. package/build-module/navigator/utils/router.js.map +1 -0
  64. package/build-module/private-apis.js +20 -0
  65. package/build-module/private-apis.js.map +1 -0
  66. package/build-module/select-control/index.js +1 -1
  67. package/build-module/select-control/index.js.map +1 -1
  68. package/build-module/select-control/styles/select-control-styles.js +38 -25
  69. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  70. package/build-module/tools-panel/tools-panel/hook.js +4 -4
  71. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  72. package/build-module/tools-panel/tools-panel-item/hook.js +20 -11
  73. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  74. package/build-style/style-rtl.css +0 -11
  75. package/build-style/style.css +0 -11
  76. package/build-types/base-control/hooks.d.ts +1 -1
  77. package/build-types/base-field/hook.d.ts +2 -2
  78. package/build-types/border-box-control/border-box-control/hook.d.ts +2 -2
  79. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +2 -2
  80. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +2 -2
  81. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +2 -2
  82. package/build-types/border-control/border-control/hook.d.ts +2 -2
  83. package/build-types/border-control/border-control-dropdown/hook.d.ts +2 -2
  84. package/build-types/border-control/border-control-style-picker/hook.d.ts +2 -2
  85. package/build-types/button/deprecated.d.ts +2 -2
  86. package/build-types/button/types.d.ts +3 -1
  87. package/build-types/button/types.d.ts.map +1 -1
  88. package/build-types/card/card/hook.d.ts +2 -2
  89. package/build-types/card/card-body/hook.d.ts +2 -2
  90. package/build-types/card/card-divider/hook.d.ts +2 -2
  91. package/build-types/card/card-footer/hook.d.ts +2 -2
  92. package/build-types/card/card-header/hook.d.ts +2 -2
  93. package/build-types/card/card-media/hook.d.ts +2 -2
  94. package/build-types/color-palette/index.d.ts.map +1 -1
  95. package/build-types/color-palette/styles.d.ts +1 -1
  96. package/build-types/color-palette/utils.d.ts +8 -5
  97. package/build-types/color-palette/utils.d.ts.map +1 -1
  98. package/build-types/color-picker/styles.d.ts +7 -7
  99. package/build-types/custom-select-control/index.d.ts +1 -0
  100. package/build-types/custom-select-control/index.d.ts.map +1 -1
  101. package/build-types/date-time/date/styles.d.ts +3 -3
  102. package/build-types/date-time/date-time/styles.d.ts +3 -3
  103. package/build-types/date-time/time/styles.d.ts +8 -8
  104. package/build-types/elevation/hook.d.ts +2 -2
  105. package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
  106. package/build-types/flex/flex/hook.d.ts +2 -2
  107. package/build-types/flex/flex-block/hook.d.ts +2 -2
  108. package/build-types/flex/flex-item/hook.d.ts +2 -2
  109. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -2
  110. package/build-types/form-token-field/styles.d.ts +1 -1
  111. package/build-types/grid/hook.d.ts +2 -2
  112. package/build-types/h-stack/component.d.ts +1 -1
  113. package/build-types/h-stack/hook.d.ts +2 -2
  114. package/build-types/heading/hook.d.ts +2 -2
  115. package/build-types/input-control/styles/input-control-styles.d.ts +2 -2
  116. package/build-types/item-group/item/hook.d.ts +2 -2
  117. package/build-types/item-group/item-group/hook.d.ts +2 -2
  118. package/build-types/navigator/context.d.ts.map +1 -1
  119. package/build-types/navigator/index.d.ts +1 -0
  120. package/build-types/navigator/index.d.ts.map +1 -1
  121. package/build-types/navigator/navigator-back-button/component.d.ts +22 -3
  122. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  123. package/build-types/navigator/navigator-back-button/hook.d.ts +24 -6
  124. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  125. package/build-types/navigator/navigator-button/component.d.ts +22 -3
  126. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  127. package/build-types/navigator/navigator-button/hook.d.ts +22 -4
  128. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  129. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  130. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  131. package/build-types/navigator/navigator-to-parent-button/component.d.ts +27 -0
  132. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -0
  133. package/build-types/navigator/navigator-to-parent-button/index.d.ts +2 -0
  134. package/build-types/navigator/navigator-to-parent-button/index.d.ts.map +1 -0
  135. package/build-types/navigator/stories/index.d.ts +1 -0
  136. package/build-types/navigator/stories/index.d.ts.map +1 -1
  137. package/build-types/navigator/test/router.d.ts +2 -0
  138. package/build-types/navigator/test/router.d.ts.map +1 -0
  139. package/build-types/navigator/types.d.ts +25 -9
  140. package/build-types/navigator/types.d.ts.map +1 -1
  141. package/build-types/navigator/use-navigator.d.ts.map +1 -1
  142. package/build-types/navigator/utils/router.d.ts +10 -0
  143. package/build-types/navigator/utils/router.d.ts.map +1 -0
  144. package/build-types/number-control/index.d.ts +2 -2
  145. package/build-types/number-control/stories/index.d.ts +2 -2
  146. package/build-types/popover/index.d.ts +1 -1
  147. package/build-types/popover/stories/e2e/index.d.ts +1 -1
  148. package/build-types/private-apis.d.ts +4 -0
  149. package/build-types/private-apis.d.ts.map +1 -0
  150. package/build-types/range-control/index.d.ts +2 -2
  151. package/build-types/range-control/styles/range-control-styles.d.ts +2 -2
  152. package/build-types/resizable-box/index.d.ts +1 -1
  153. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  154. package/build-types/resizable-box/stories/index.d.ts +2 -2
  155. package/build-types/scrollable/hook.d.ts +2 -2
  156. package/build-types/search-control/index.d.ts +1 -1
  157. package/build-types/search-control/stories/index.d.ts +2 -2
  158. package/build-types/select-control/index.d.ts.map +1 -1
  159. package/build-types/select-control/styles/select-control-styles.d.ts +1 -1
  160. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  161. package/build-types/select-control/types.d.ts +3 -1
  162. package/build-types/select-control/types.d.ts.map +1 -1
  163. package/build-types/spacer/hook.d.ts +2 -2
  164. package/build-types/spinner/index.d.ts +1 -1
  165. package/build-types/surface/hook.d.ts +2 -2
  166. package/build-types/text/hook.d.ts +2 -2
  167. package/build-types/text-control/index.d.ts +3 -3
  168. package/build-types/tools-panel/tools-panel/hook.d.ts +2 -2
  169. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  170. package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -2
  171. package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -2
  172. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  173. package/build-types/truncate/hook.d.ts +2 -2
  174. package/build-types/ui/control-group/hook.d.ts +2 -2
  175. package/build-types/ui/control-label/hook.d.ts +2 -2
  176. package/build-types/ui/form-group/form-group.d.ts +2 -2
  177. package/build-types/ui/form-group/use-form-group.d.ts +2 -2
  178. package/build-types/unit-control/index.d.ts +1 -1
  179. package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -2
  180. package/build-types/v-stack/component.d.ts +2 -2
  181. package/build-types/v-stack/hook.d.ts +2 -2
  182. package/build-types/v-stack/stories/index.d.ts +2 -2
  183. package/package.json +9 -7
  184. package/src/button/types.ts +5 -2
  185. package/src/color-palette/index.tsx +13 -5
  186. package/src/color-palette/test/utils.ts +17 -1
  187. package/src/color-palette/utils.ts +12 -7
  188. package/src/custom-select-control/index.js +9 -0
  189. package/src/custom-select-control/stories/index.js +1 -1
  190. package/src/custom-select-control/test/index.js +2 -2
  191. package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -4
  192. package/src/index.js +5 -2
  193. package/src/navigator/context.ts +4 -0
  194. package/src/navigator/index.ts +1 -0
  195. package/src/navigator/navigator-back-button/README.md +1 -17
  196. package/src/navigator/navigator-back-button/hook.ts +10 -5
  197. package/src/navigator/navigator-button/README.md +1 -1
  198. package/src/navigator/navigator-provider/README.md +25 -4
  199. package/src/navigator/navigator-provider/component.tsx +170 -14
  200. package/src/navigator/navigator-screen/component.tsx +22 -11
  201. package/src/navigator/navigator-to-parent-button/README.md +15 -0
  202. package/src/navigator/navigator-to-parent-button/component.tsx +65 -0
  203. package/src/navigator/navigator-to-parent-button/index.ts +1 -0
  204. package/src/navigator/stories/index.tsx +93 -3
  205. package/src/navigator/test/index.tsx +267 -23
  206. package/src/navigator/test/router.ts +122 -0
  207. package/src/navigator/types.ts +31 -12
  208. package/src/navigator/use-navigator.ts +4 -1
  209. package/src/navigator/utils/router.ts +49 -0
  210. package/src/private-apis.js +22 -0
  211. package/src/select-control/README.md +3 -1
  212. package/src/select-control/index.tsx +3 -1
  213. package/src/select-control/style.scss +0 -10
  214. package/src/select-control/styles/select-control-styles.ts +36 -22
  215. package/src/select-control/types.ts +3 -1
  216. package/src/tools-panel/test/index.js +65 -0
  217. package/src/tools-panel/tools-panel/hook.ts +4 -5
  218. package/src/tools-panel/tools-panel-item/hook.ts +24 -14
  219. package/tsconfig.json +5 -1
  220. package/tsconfig.tsbuildinfo +1 -1
@@ -31,7 +31,6 @@ export declare function useToolsPanel(props: WordPressComponentProps<ToolsPanelP
31
31
  key?: import("react").Key | null | undefined;
32
32
  slot?: string | undefined;
33
33
  title?: string | undefined;
34
- id?: string | undefined;
35
34
  defaultChecked?: boolean | undefined;
36
35
  suppressContentEditableWarning?: boolean | undefined;
37
36
  suppressHydrationWarning?: boolean | undefined;
@@ -40,6 +39,7 @@ export declare function useToolsPanel(props: WordPressComponentProps<ToolsPanelP
40
39
  contextMenu?: string | undefined;
41
40
  dir?: string | undefined;
42
41
  draggable?: (boolean | "false" | "true") | undefined;
42
+ id?: string | undefined;
43
43
  lang?: string | undefined;
44
44
  placeholder?: string | undefined;
45
45
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -76,7 +76,7 @@ export declare function useToolsPanel(props: WordPressComponentProps<ToolsPanelP
76
76
  'aria-colindex'?: number | undefined;
77
77
  'aria-colspan'?: number | undefined;
78
78
  'aria-controls'?: string | undefined;
79
- 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "location" | "step" | "date" | undefined;
79
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "date" | "step" | "location" | undefined;
80
80
  'aria-describedby'?: string | undefined;
81
81
  'aria-details'?: string | undefined;
82
82
  'aria-disabled'?: (boolean | "false" | "true") | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel/hook.ts"],"names":[],"mappings":";AAeA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EAEnB,eAAe,EACf,MAAM,UAAU,CAAC;AA+BlB,wBAAgB,aAAa,CAC5B,KAAK,EAAE,uBAAuB,CAAE,eAAe,EAAE,KAAK,CAAE;;;qCAmD9C,MAAM;;uCA0CN,MAAM,UAAS,qBAAqB;;;;;;kCA/DrC,cAAc;;;;;;wBA4Hb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyGhB"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel/hook.ts"],"names":[],"mappings":";AAeA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EAEnB,eAAe,EACf,MAAM,UAAU,CAAC;AA8BlB,wBAAgB,aAAa,CAC5B,KAAK,EAAE,uBAAuB,CAAE,eAAe,EAAE,KAAK,CAAE;;;qCAmD9C,MAAM;;uCA0CN,MAAM,UAAS,qBAAqB;;;;;;kCA/DrC,cAAc;;;;;;wBA4Hb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyGhB"}
@@ -21,7 +21,6 @@ export declare function useToolsPanelHeader(props: WordPressComponentProps<Tools
21
21
  key?: import("react").Key | null | undefined;
22
22
  slot?: string | undefined;
23
23
  title?: string | undefined;
24
- id?: string | undefined;
25
24
  defaultChecked?: boolean | undefined;
26
25
  suppressContentEditableWarning?: boolean | undefined;
27
26
  suppressHydrationWarning?: boolean | undefined;
@@ -30,6 +29,7 @@ export declare function useToolsPanelHeader(props: WordPressComponentProps<Tools
30
29
  contextMenu?: string | undefined;
31
30
  dir?: string | undefined;
32
31
  draggable?: (boolean | "false" | "true") | undefined;
32
+ id?: string | undefined;
33
33
  lang?: string | undefined;
34
34
  placeholder?: string | undefined;
35
35
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -66,7 +66,7 @@ export declare function useToolsPanelHeader(props: WordPressComponentProps<Tools
66
66
  'aria-colindex'?: number | undefined;
67
67
  'aria-colspan'?: number | undefined;
68
68
  'aria-controls'?: string | undefined;
69
- 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "location" | "step" | "date" | undefined;
69
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "date" | "step" | "location" | undefined;
70
70
  'aria-describedby'?: string | undefined;
71
71
  'aria-details'?: string | undefined;
72
72
  'aria-disabled'?: (boolean | "false" | "true") | undefined;
@@ -15,7 +15,6 @@ export declare function useToolsPanelItem(props: WordPressComponentProps<ToolsPa
15
15
  key?: import("react").Key | null | undefined;
16
16
  slot?: string | undefined;
17
17
  title?: string | undefined;
18
- id?: string | undefined;
19
18
  defaultChecked?: boolean | undefined;
20
19
  suppressContentEditableWarning?: boolean | undefined;
21
20
  suppressHydrationWarning?: boolean | undefined;
@@ -24,6 +23,7 @@ export declare function useToolsPanelItem(props: WordPressComponentProps<ToolsPa
24
23
  contextMenu?: string | undefined;
25
24
  dir?: string | undefined;
26
25
  draggable?: (boolean | "false" | "true") | undefined;
26
+ id?: string | undefined;
27
27
  lang?: string | undefined;
28
28
  placeholder?: string | undefined;
29
29
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -60,7 +60,7 @@ export declare function useToolsPanelItem(props: WordPressComponentProps<ToolsPa
60
60
  'aria-colindex'?: number | undefined;
61
61
  'aria-colspan'?: number | undefined;
62
62
  'aria-controls'?: string | undefined;
63
- 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "location" | "step" | "date" | undefined;
63
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "date" | "step" | "location" | undefined;
64
64
  'aria-describedby'?: string | undefined;
65
65
  'aria-details'?: string | undefined;
66
66
  'aria-disabled'?: (boolean | "false" | "true") | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel-item/hook.ts"],"names":[],"mappings":";AAWA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,uBAAuB,CAAE,mBAAmB,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsK5D"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel-item/hook.ts"],"names":[],"mappings":";AAWA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,uBAAuB,CAAE,mBAAmB,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgL5D"}
@@ -16,7 +16,6 @@ export default function useTruncate(props: WordPressComponentProps<TruncateProps
16
16
  key?: import("react").Key | null | undefined;
17
17
  slot?: string | undefined;
18
18
  title?: string | undefined;
19
- id?: string | undefined;
20
19
  defaultChecked?: boolean | undefined;
21
20
  suppressContentEditableWarning?: boolean | undefined;
22
21
  suppressHydrationWarning?: boolean | undefined;
@@ -25,6 +24,7 @@ export default function useTruncate(props: WordPressComponentProps<TruncateProps
25
24
  contextMenu?: string | undefined;
26
25
  dir?: string | undefined;
27
26
  draggable?: (boolean | "false" | "true") | undefined;
27
+ id?: string | undefined;
28
28
  lang?: string | undefined;
29
29
  placeholder?: string | undefined;
30
30
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -61,7 +61,7 @@ export default function useTruncate(props: WordPressComponentProps<TruncateProps
61
61
  'aria-colindex'?: number | undefined;
62
62
  'aria-colspan'?: number | undefined;
63
63
  'aria-controls'?: string | undefined;
64
- 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "location" | "step" | "date" | undefined;
64
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "date" | "step" | "location" | undefined;
65
65
  'aria-describedby'?: string | undefined;
66
66
  'aria-details'?: string | undefined;
67
67
  'aria-disabled'?: (boolean | "false" | "true") | undefined;
@@ -15,7 +15,6 @@ export function useControlGroup(props: import('../context').WordPressComponentPr
15
15
  key?: import("react").Key | null | undefined;
16
16
  slot?: string | undefined;
17
17
  title?: string | undefined;
18
- id?: string | undefined;
19
18
  defaultChecked?: boolean | undefined;
20
19
  suppressContentEditableWarning?: boolean | undefined;
21
20
  suppressHydrationWarning?: boolean | undefined;
@@ -24,6 +23,7 @@ export function useControlGroup(props: import('../context').WordPressComponentPr
24
23
  contextMenu?: string | undefined;
25
24
  dir?: string | undefined;
26
25
  draggable?: (boolean | "false" | "true") | undefined;
26
+ id?: string | undefined;
27
27
  lang?: string | undefined;
28
28
  placeholder?: string | undefined;
29
29
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -60,7 +60,7 @@ export function useControlGroup(props: import('../context').WordPressComponentPr
60
60
  'aria-colindex'?: number | undefined;
61
61
  'aria-colspan'?: number | undefined;
62
62
  'aria-controls'?: string | undefined;
63
- 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "location" | "step" | "date" | undefined;
63
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "date" | "step" | "location" | undefined;
64
64
  'aria-describedby'?: string | undefined;
65
65
  'aria-details'?: string | undefined;
66
66
  'aria-disabled'?: (boolean | "false" | "true") | undefined;
@@ -14,7 +14,6 @@ export function useControlLabel(props: import('../context').WordPressComponentPr
14
14
  key?: import("react").Key | null | undefined;
15
15
  slot?: string | undefined;
16
16
  title?: string | undefined;
17
- id?: string | undefined;
18
17
  defaultChecked?: boolean | undefined;
19
18
  suppressContentEditableWarning?: boolean | undefined;
20
19
  suppressHydrationWarning?: boolean | undefined;
@@ -23,6 +22,7 @@ export function useControlLabel(props: import('../context').WordPressComponentPr
23
22
  contextMenu?: string | undefined;
24
23
  dir?: string | undefined;
25
24
  draggable?: (boolean | "false" | "true") | undefined;
25
+ id?: string | undefined;
26
26
  lang?: string | undefined;
27
27
  placeholder?: string | undefined;
28
28
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -59,7 +59,7 @@ export function useControlLabel(props: import('../context').WordPressComponentPr
59
59
  'aria-colindex'?: number | undefined;
60
60
  'aria-colspan'?: number | undefined;
61
61
  'aria-controls'?: string | undefined;
62
- 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "location" | "step" | "date" | undefined;
62
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "date" | "step" | "location" | undefined;
63
63
  'aria-describedby'?: string | undefined;
64
64
  'aria-details'?: string | undefined;
65
65
  'aria-disabled'?: (boolean | "false" | "true") | undefined;
@@ -30,7 +30,7 @@ declare const ConnectedFormGroup: import("../context").WordPressComponent<import
30
30
  truncate?: boolean | undefined;
31
31
  } & import("../../grid/types").GridProps & {
32
32
  horizontal: true;
33
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "color" | "display" | "letterSpacing" | "lineHeight" | "ellipsis" | "size" | "help" | "weight" | "horizontal" | "children" | "label" | "as" | "id" | "spacing" | "isDestructive" | "variant" | "isBlock" | "align" | "ellipsizeMode" | "limit" | "numberOfLines" | "adjustLineHeightForInnerControls" | "highlightEscape" | "highlightCaseSensitive" | "highlightSanitize" | "optimizeReadabilityFor" | "truncate" | "upperCase" | "highlightWords" | "labelHidden" | "alignLabel"> & {
33
+ } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "color" | "display" | "letterSpacing" | "lineHeight" | "ellipsis" | "size" | "help" | "weight" | "horizontal" | "children" | "label" | "as" | "id" | "isBlock" | "align" | "spacing" | "ellipsizeMode" | "limit" | "numberOfLines" | "adjustLineHeightForInnerControls" | "isDestructive" | "highlightEscape" | "highlightCaseSensitive" | "highlightSanitize" | "optimizeReadabilityFor" | "truncate" | "upperCase" | "variant" | "highlightWords" | "labelHidden" | "alignLabel"> & {
34
34
  as?: keyof JSX.IntrinsicElements | undefined;
35
35
  } & import("react").RefAttributes<any>, boolean> | import("../context").WordPressComponent<import("react").ElementType<any>, import("../../text/types").Props & {
36
36
  isBlock?: boolean | undefined;
@@ -47,7 +47,7 @@ declare const ConnectedFormGroup: import("../context").WordPressComponent<import
47
47
  truncate?: boolean | undefined;
48
48
  } & {
49
49
  horizontal: false;
50
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "color" | "display" | "letterSpacing" | "lineHeight" | "ellipsis" | "size" | "help" | "weight" | "horizontal" | "children" | "label" | "as" | "id" | "spacing" | "isDestructive" | "variant" | "isBlock" | "align" | "ellipsizeMode" | "limit" | "numberOfLines" | "adjustLineHeightForInnerControls" | "highlightEscape" | "highlightCaseSensitive" | "highlightSanitize" | "optimizeReadabilityFor" | "truncate" | "upperCase" | "highlightWords" | "labelHidden" | "alignLabel"> & {
50
+ } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "color" | "display" | "letterSpacing" | "lineHeight" | "ellipsis" | "size" | "help" | "weight" | "horizontal" | "children" | "label" | "as" | "id" | "isBlock" | "align" | "spacing" | "ellipsizeMode" | "limit" | "numberOfLines" | "adjustLineHeightForInnerControls" | "isDestructive" | "highlightEscape" | "highlightCaseSensitive" | "highlightSanitize" | "optimizeReadabilityFor" | "truncate" | "upperCase" | "variant" | "highlightWords" | "labelHidden" | "alignLabel"> & {
51
51
  as?: keyof JSX.IntrinsicElements | undefined;
52
52
  } & import("react").RefAttributes<any>, boolean>;
53
53
  //# sourceMappingURL=form-group.d.ts.map
@@ -98,7 +98,7 @@ export function useFormGroup(props: import('../context').WordPressComponentProps
98
98
  'aria-colindex'?: number | undefined;
99
99
  'aria-colspan'?: number | undefined;
100
100
  'aria-controls'?: string | undefined;
101
- 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "location" | "step" | "date" | undefined;
101
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "date" | "step" | "location" | undefined;
102
102
  'aria-describedby'?: string | undefined;
103
103
  'aria-details'?: string | undefined;
104
104
  'aria-disabled'?: (boolean | "false" | "true") | undefined;
@@ -387,7 +387,7 @@ export function useFormGroup(props: import('../context').WordPressComponentProps
387
387
  'aria-colindex'?: number | undefined;
388
388
  'aria-colspan'?: number | undefined;
389
389
  'aria-controls'?: string | undefined;
390
- 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "location" | "step" | "date" | undefined;
390
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "date" | "step" | "location" | undefined;
391
391
  'aria-describedby'?: string | undefined;
392
392
  'aria-details'?: string | undefined;
393
393
  'aria-disabled'?: (boolean | "false" | "true") | undefined;
@@ -27,7 +27,7 @@ export declare const UnitControl: import("react").ForwardRefExoticComponent<Omit
27
27
  value?: string | number | undefined;
28
28
  onBlur?: FocusEventHandler<HTMLInputElement | HTMLSelectElement> | undefined;
29
29
  onFocus?: FocusEventHandler<HTMLInputElement | HTMLSelectElement> | undefined;
30
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "id" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "max" | "min" | "crossOrigin" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "hideLabelFromVision" | "disableUnits" | "__next36pxDefaultSize" | "__unstableInputWidth" | "labelPosition" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "enterKeyHint" | "maxLength" | "minLength" | "readOnly" | "required" | "src" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "hideHTMLArrows" | "isShiftStepEnabled" | "shiftStep" | "unit" | "isUnitSelectTabbable" | "units" | "isResetValueOnUnitChange" | "onUnitChange"> & import("react").RefAttributes<any>>;
30
+ } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "__next36pxDefaultSize" | "__unstableInputWidth" | "hideLabelFromVision" | "labelPosition" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "required" | "src" | "step" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "disableUnits" | "hideHTMLArrows" | "isShiftStepEnabled" | "shiftStep" | "unit" | "isUnitSelectTabbable" | "units" | "isResetValueOnUnitChange" | "onUnitChange"> & import("react").RefAttributes<any>>;
31
31
  export { parseQuantityAndUnitFromRawValue, useCustomUnits } from './utils';
32
32
  export default UnitControl;
33
33
  //# sourceMappingURL=index.d.ts.map
@@ -3,7 +3,7 @@ import type { SelectSize } from '../types';
3
3
  declare type SelectProps = {
4
4
  selectSize: SelectSize;
5
5
  };
6
- export declare const ValueInput: import("@emotion/styled").StyledComponent<Omit<import("../../input-control/types").InputControlProps, "value" | "type" | "step" | "max" | "min" | "required" | "isDragEnabled"> & {
6
+ export declare const ValueInput: import("@emotion/styled").StyledComponent<Omit<import("../../input-control/types").InputControlProps, "value" | "type" | "max" | "min" | "required" | "step" | "isDragEnabled"> & {
7
7
  hideHTMLArrows?: boolean | undefined;
8
8
  spinControls?: "none" | "custom" | "native" | undefined;
9
9
  isDragEnabled?: boolean | undefined;
@@ -15,7 +15,7 @@ export declare const ValueInput: import("@emotion/styled").StyledComponent<Omit<
15
15
  step?: string | number | undefined;
16
16
  type?: import("react").HTMLInputTypeAttribute | undefined;
17
17
  value?: string | number | undefined;
18
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "type" | "id" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "max" | "min" | "crossOrigin" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "hideLabelFromVision" | "suffix" | "__next36pxDefaultSize" | "__unstableInputWidth" | "labelPosition" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "enterKeyHint" | "maxLength" | "minLength" | "readOnly" | "required" | "src" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "hideHTMLArrows" | "spinControls" | "isShiftStepEnabled" | "shiftStep"> & import("react").RefAttributes<any> & {
18
+ } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "type" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "suffix" | "__next36pxDefaultSize" | "__unstableInputWidth" | "hideLabelFromVision" | "labelPosition" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "required" | "src" | "step" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "hideHTMLArrows" | "spinControls" | "isShiftStepEnabled" | "shiftStep"> & import("react").RefAttributes<any> & {
19
19
  theme?: import("@emotion/react").Theme | undefined;
20
20
  }, {}, {}>;
21
21
  export declare const UnitLabel: import("@emotion/styled").StyledComponent<{
@@ -23,10 +23,10 @@
23
23
  * ```
24
24
  */
25
25
  export declare const VStack: import("../ui/context").WordPressComponent<"div", Omit<import("../flex/types").FlexProps, "gap" | "align"> & {
26
- alignment?: "initial" | "left" | "right" | (string & {}) | "bottom" | "top" | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "bottomLeft" | "bottomRight" | "edge" | "topLeft" | "topRight" | undefined;
26
+ alignment?: "initial" | "left" | "right" | (string & {}) | "bottom" | "top" | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "edge" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | undefined;
27
27
  spacing?: import("csstype").Property.Width<string | number> | undefined;
28
28
  } & {
29
- alignment?: "initial" | "left" | "right" | (string & {}) | "bottom" | "top" | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "bottomLeft" | "bottomRight" | "edge" | "topLeft" | "topRight" | undefined;
29
+ alignment?: "initial" | "left" | "right" | (string & {}) | "bottom" | "top" | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "edge" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | undefined;
30
30
  spacing?: import("csstype").Property.Width<string | number> | undefined;
31
31
  } & import("react").RefAttributes<any>, true>;
32
32
  export default VStack;
@@ -18,7 +18,6 @@ export declare function useVStack(props: WordPressComponentProps<VStackProps, 'd
18
18
  key?: import("react").Key | null | undefined;
19
19
  slot?: string | undefined;
20
20
  title?: string | undefined;
21
- id?: string | undefined;
22
21
  defaultChecked?: boolean | undefined;
23
22
  suppressContentEditableWarning?: boolean | undefined;
24
23
  suppressHydrationWarning?: boolean | undefined;
@@ -27,6 +26,7 @@ export declare function useVStack(props: WordPressComponentProps<VStackProps, 'd
27
26
  contextMenu?: string | undefined;
28
27
  dir?: string | undefined;
29
28
  draggable?: (boolean | "false" | "true") | undefined;
29
+ id?: string | undefined;
30
30
  lang?: string | undefined;
31
31
  placeholder?: string | undefined;
32
32
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -63,7 +63,7 @@ export declare function useVStack(props: WordPressComponentProps<VStackProps, 'd
63
63
  'aria-colindex'?: number | undefined;
64
64
  'aria-colspan'?: number | undefined;
65
65
  'aria-controls'?: string | undefined;
66
- 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "location" | "step" | "date" | undefined;
66
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "date" | "step" | "location" | undefined;
67
67
  'aria-describedby'?: string | undefined;
68
68
  'aria-details'?: string | undefined;
69
69
  'aria-disabled'?: (boolean | "false" | "true") | undefined;
@@ -7,10 +7,10 @@ import { VStack } from '..';
7
7
  declare const meta: ComponentMeta<typeof VStack>;
8
8
  export default meta;
9
9
  export declare const Default: ComponentStory<import("../../ui/context").WordPressComponent<"div", Omit<import("../../flex/types").FlexProps, "gap" | "align"> & {
10
- alignment?: "initial" | "left" | "right" | (string & {}) | "bottom" | "top" | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "bottomLeft" | "bottomRight" | "edge" | "topLeft" | "topRight" | undefined;
10
+ alignment?: "initial" | "left" | "right" | (string & {}) | "bottom" | "top" | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "edge" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | undefined;
11
11
  spacing?: import("csstype").Property.Width<string | number> | undefined;
12
12
  } & {
13
- alignment?: "initial" | "left" | "right" | (string & {}) | "bottom" | "top" | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "bottomLeft" | "bottomRight" | "edge" | "topLeft" | "topRight" | undefined;
13
+ alignment?: "initial" | "left" | "right" | (string & {}) | "bottom" | "top" | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "edge" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | undefined;
14
14
  spacing?: import("csstype").Property.Width<string | number> | undefined;
15
15
  } & import("react").RefAttributes<any>, true>>;
16
16
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "23.3.1",
3
+ "version": "23.3.3",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -39,8 +39,8 @@
39
39
  "@floating-ui/react-dom": "^1.0.0",
40
40
  "@use-gesture/react": "^10.2.6",
41
41
  "@wordpress/a11y": "^3.26.1",
42
- "@wordpress/compose": "^6.3.1",
43
- "@wordpress/date": "^4.26.1",
42
+ "@wordpress/compose": "^6.3.2",
43
+ "@wordpress/date": "^4.26.2",
44
44
  "@wordpress/deprecated": "^3.26.1",
45
45
  "@wordpress/dom": "^3.26.1",
46
46
  "@wordpress/element": "^5.3.1",
@@ -50,9 +50,10 @@
50
50
  "@wordpress/i18n": "^4.26.1",
51
51
  "@wordpress/icons": "^9.17.1",
52
52
  "@wordpress/is-shallow-equal": "^4.26.1",
53
- "@wordpress/keycodes": "^3.26.1",
53
+ "@wordpress/keycodes": "^3.26.2",
54
54
  "@wordpress/primitives": "^3.24.1",
55
- "@wordpress/rich-text": "^6.3.1",
55
+ "@wordpress/private-apis": "^0.8.1",
56
+ "@wordpress/rich-text": "^6.3.2",
56
57
  "@wordpress/warning": "^2.26.1",
57
58
  "change-case": "^4.1.2",
58
59
  "classnames": "^2.3.1",
@@ -66,13 +67,14 @@
66
67
  "highlight-words-core": "^1.2.2",
67
68
  "lodash": "^4.17.21",
68
69
  "memize": "^1.1.0",
70
+ "path-to-regexp": "^6.2.1",
69
71
  "re-resizable": "^6.4.0",
70
72
  "react-colorful": "^5.3.1",
71
73
  "reakit": "^1.3.8",
72
74
  "remove-accents": "^0.4.2",
73
75
  "use-lilius": "^2.0.1",
74
76
  "uuid": "^8.3.0",
75
- "valtio": "^1.7.0"
77
+ "valtio": "1.7.0"
76
78
  },
77
79
  "peerDependencies": {
78
80
  "react": "^18.0.0",
@@ -81,5 +83,5 @@
81
83
  "publishConfig": {
82
84
  "access": "public"
83
85
  },
84
- "gitHead": "e9ff92d836928aba65dde94d9d193bc401a934d7"
86
+ "gitHead": "ccabeeffe1fe117c3934ec7705c15d52857d9a87"
85
87
  }
@@ -11,8 +11,11 @@ import type { PopoverProps } from '../popover/types';
11
11
  import type { WordPressComponentProps } from '../ui/context/wordpress-component';
12
12
 
13
13
  export type ButtonProps =
14
- | WordPressComponentProps< BaseButtonProps & _ButtonProps, 'button', false >
15
- | WordPressComponentProps< BaseButtonProps & AnchorProps, 'a', false >;
14
+ | WordPressComponentProps< ButtonAsButtonProps, 'button', false >
15
+ | WordPressComponentProps< ButtonAsAnchorProps, 'a', false >;
16
+
17
+ export type ButtonAsButtonProps = BaseButtonProps & _ButtonProps;
18
+ export type ButtonAsAnchorProps = BaseButtonProps & AnchorProps;
16
19
 
17
20
  type BaseButtonProps = {
18
21
  /**
@@ -10,7 +10,7 @@ import a11yPlugin from 'colord/plugins/a11y';
10
10
  * WordPress dependencies
11
11
  */
12
12
  import { __, sprintf } from '@wordpress/i18n';
13
- import { useCallback, useRef, useMemo, forwardRef } from '@wordpress/element';
13
+ import { useCallback, useMemo, useState, forwardRef } from '@wordpress/element';
14
14
 
15
15
  /**
16
16
  * Internal dependencies
@@ -174,7 +174,6 @@ function UnforwardedColorPalette(
174
174
  props: WordPressComponentProps< ColorPaletteProps, 'div' >,
175
175
  forwardedRef: ForwardedRef< any >
176
176
  ) {
177
- const customColorPaletteRef = useRef< HTMLElement | null >( null );
178
177
  const {
179
178
  clearable = true,
180
179
  colors = [],
@@ -185,8 +184,17 @@ function UnforwardedColorPalette(
185
184
  __experimentalIsRenderedInSidebar = false,
186
185
  ...otherProps
187
186
  } = props;
187
+ const [ normalizedColorValue, setNormalizedColorValue ] = useState( value );
188
+
188
189
  const clearColor = useCallback( () => onChange( undefined ), [ onChange ] );
189
190
 
191
+ const customColorPaletteCallbackRef = useCallback(
192
+ ( node: HTMLElement | null ) => {
193
+ setNormalizedColorValue( normalizeColorValue( value, node ) );
194
+ },
195
+ [ value ]
196
+ );
197
+
190
198
  const hasMultipleColorOrigins = isMultiplePaletteArray( colors );
191
199
  const buttonLabelName = useMemo(
192
200
  () =>
@@ -201,14 +209,14 @@ function UnforwardedColorPalette(
201
209
  const renderCustomColorPicker = () => (
202
210
  <DropdownContentWrapper paddingSize="none">
203
211
  <ColorPicker
204
- color={ normalizeColorValue( value, customColorPaletteRef ) }
212
+ color={ normalizedColorValue }
205
213
  onChange={ ( color ) => onChange( color ) }
206
214
  enableAlpha={ enableAlpha }
207
215
  />
208
216
  </DropdownContentWrapper>
209
217
  );
210
218
 
211
- const colordColor = colord( value ?? '' );
219
+ const colordColor = colord( normalizedColorValue ?? '' );
212
220
 
213
221
  const valueWithoutLeadingHash = value?.startsWith( '#' )
214
222
  ? value.substring( 1 )
@@ -246,7 +254,7 @@ function UnforwardedColorPalette(
246
254
  renderToggle={ ( { isOpen, onToggle } ) => (
247
255
  <Flex
248
256
  as={ 'button' }
249
- ref={ customColorPaletteRef }
257
+ ref={ customColorPaletteCallbackRef }
250
258
  justify="space-between"
251
259
  align="flex-start"
252
260
  className="components-color-palette__custom-color"
@@ -4,6 +4,7 @@
4
4
  import {
5
5
  extractColorNameFromCurrentValue,
6
6
  showTransparentBackground,
7
+ normalizeColorValue,
7
8
  } from '../utils';
8
9
 
9
10
  describe( 'ColorPalette: Utils', () => {
@@ -32,11 +33,26 @@ describe( 'ColorPalette: Utils', () => {
32
33
  expect( showTransparentBackground( 'transparent' ) ).toBe( true );
33
34
  expect( showTransparentBackground( '#75757500' ) ).toBe( true );
34
35
  } );
35
-
36
36
  test( 'should return false for non-transparent colors', () => {
37
37
  expect( showTransparentBackground( '#FFF' ) ).toBe( false );
38
38
  expect( showTransparentBackground( '#757575' ) ).toBe( false );
39
39
  expect( showTransparentBackground( '#f5f5f524' ) ).toBe( false ); // 0.14 alpha.
40
40
  } );
41
41
  } );
42
+
43
+ describe( 'normalizeColorValue', () => {
44
+ test( 'should return the value as is if the color value is not a CSS variable', () => {
45
+ const element = document.createElement( 'div' );
46
+ expect( normalizeColorValue( '#ff0000', element ) ).toBe(
47
+ '#ff0000'
48
+ );
49
+ } );
50
+ test( 'should return the background color computed from a element if the color value is a CSS variable', () => {
51
+ const element = document.createElement( 'div' );
52
+ element.style.backgroundColor = '#ff0000';
53
+ expect( normalizeColorValue( 'var(--red)', element ) ).toBe(
54
+ '#ff0000'
55
+ );
56
+ } );
57
+ } );
42
58
  } );
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { RefObject } from 'react';
5
4
  import { colord, extend } from 'colord';
6
5
  import namesPlugin from 'colord/plugins/names';
7
6
  import a11yPlugin from 'colord/plugins/a11y';
@@ -76,21 +75,27 @@ export const isMultiplePaletteArray = (
76
75
  );
77
76
  };
78
77
 
78
+ /**
79
+ * Transform a CSS variable used as background color into the color value itself.
80
+ *
81
+ * @param value The color value that may be a CSS variable.
82
+ * @param element The element for which to get the computed style.
83
+ * @return The background color value computed from a element.
84
+ */
79
85
  export const normalizeColorValue = (
80
86
  value: string | undefined,
81
- ref: RefObject< HTMLElement > | null
87
+ element: HTMLElement | null
82
88
  ) => {
83
89
  const currentValueIsCssVariable = /^var\(/.test( value ?? '' );
84
90
 
85
- if ( ! currentValueIsCssVariable || ! ref?.current ) {
91
+ if ( ! currentValueIsCssVariable || element === null ) {
86
92
  return value;
87
93
  }
88
94
 
89
- const { ownerDocument } = ref.current;
95
+ const { ownerDocument } = element;
90
96
  const { defaultView } = ownerDocument;
91
- const computedBackgroundColor = defaultView?.getComputedStyle(
92
- ref.current
93
- ).backgroundColor;
97
+ const computedBackgroundColor =
98
+ defaultView?.getComputedStyle( element ).backgroundColor;
94
99
 
95
100
  return computedBackgroundColor
96
101
  ? colord( computedBackgroundColor ).toHex()
@@ -257,3 +257,12 @@ export default function CustomSelectControl( props ) {
257
257
  </div>
258
258
  );
259
259
  }
260
+
261
+ export function StableCustomSelectControl( props ) {
262
+ return (
263
+ <CustomSelectControl
264
+ { ...props }
265
+ __experimentalShowSelectedHint={ false }
266
+ />
267
+ );
268
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import CustomSelectControl from '../';
4
+ import CustomSelectControl from '..';
5
5
 
6
6
  export default {
7
7
  title: 'Components/CustomSelectControl',