@wordpress/components 22.1.0 → 23.1.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 (660) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/CONTRIBUTING.md +0 -21
  3. package/build/alignment-matrix-control/cell.js.map +1 -1
  4. package/build/alignment-matrix-control/icon.js +4 -2
  5. package/build/alignment-matrix-control/icon.js.map +1 -1
  6. package/build/alignment-matrix-control/index.js +25 -1
  7. package/build/alignment-matrix-control/index.js.map +1 -1
  8. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +13 -13
  9. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +1 -1
  10. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +16 -16
  11. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  12. package/build/alignment-matrix-control/types.js +6 -0
  13. package/build/alignment-matrix-control/types.js.map +1 -0
  14. package/build/alignment-matrix-control/utils.js +9 -8
  15. package/build/alignment-matrix-control/utils.js.map +1 -1
  16. package/build/angle-picker-control/styles/angle-picker-control-styles.js +9 -9
  17. package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  18. package/build/autocomplete/index.js +39 -12
  19. package/build/autocomplete/index.js.map +1 -1
  20. package/build/base-control/hooks.js +52 -0
  21. package/build/base-control/hooks.js.map +1 -0
  22. package/build/base-control/index.js +24 -7
  23. package/build/base-control/index.js.map +1 -1
  24. package/build/base-field/hook.js +0 -14
  25. package/build/base-field/hook.js.map +1 -1
  26. package/build/base-field/index.js.map +1 -1
  27. package/build/base-field/styles.js +5 -5
  28. package/build/base-field/styles.js.map +1 -1
  29. package/build/base-field/types.js +6 -0
  30. package/build/base-field/types.js.map +1 -0
  31. package/build/border-box-control/border-box-control/component.js +0 -3
  32. package/build/border-box-control/border-box-control/component.js.map +1 -1
  33. package/build/border-box-control/border-box-control/hook.js +0 -2
  34. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  35. package/build/border-box-control/border-box-control-split-controls/component.js +0 -2
  36. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  37. package/build/border-box-control/border-box-control-split-controls/hook.js +0 -2
  38. package/build/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  39. package/build/border-control/border-control/component.js +1 -2
  40. package/build/border-control/border-control/component.js.map +1 -1
  41. package/build/border-control/border-control/hook.js +0 -2
  42. package/build/border-control/border-control/hook.js.map +1 -1
  43. package/build/border-control/border-control-dropdown/component.js +6 -11
  44. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  45. package/build/border-control/border-control-dropdown/hook.js +0 -2
  46. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  47. package/build/border-control/styles.js +16 -16
  48. package/build/border-control/styles.js.map +1 -1
  49. package/build/box-control/linked-button.js +3 -4
  50. package/build/box-control/linked-button.js.map +1 -1
  51. package/build/color-palette/index.js +7 -15
  52. package/build/color-palette/index.js.map +1 -1
  53. package/build/color-picker/input-with-slider.js +1 -0
  54. package/build/color-picker/input-with-slider.js.map +1 -1
  55. package/build/color-picker/styles.js +8 -8
  56. package/build/color-picker/styles.js.map +1 -1
  57. package/build/custom-select-control/index.js +14 -2
  58. package/build/custom-select-control/index.js.map +1 -1
  59. package/build/dashicon/index.js +1 -4
  60. package/build/dashicon/index.js.map +1 -1
  61. package/build/date-time/date-time/index.js +4 -4
  62. package/build/date-time/date-time/index.js.map +1 -1
  63. package/build/dimension-control/index.js.map +1 -1
  64. package/build/dropdown/index.js +45 -10
  65. package/build/dropdown/index.js.map +1 -1
  66. package/build/duotone-picker/duotone-picker.js +2 -2
  67. package/build/duotone-picker/duotone-picker.js.map +1 -1
  68. package/build/gradient-picker/index.js +4 -11
  69. package/build/gradient-picker/index.js.map +1 -1
  70. package/build/higher-order/navigate-regions/index.js +4 -3
  71. package/build/higher-order/navigate-regions/index.js.map +1 -1
  72. package/build/higher-order/with-fallback-styles/index.js +2 -2
  73. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  74. package/build/index.js +13 -9
  75. package/build/index.js.map +1 -1
  76. package/build/input-control/index.js +17 -5
  77. package/build/input-control/index.js.map +1 -1
  78. package/build/input-control/input-base.js +2 -0
  79. package/build/input-control/input-base.js.map +1 -1
  80. package/build/mobile/bottom-sheet/cell.native.js +1 -1
  81. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  82. package/build/mobile/bottom-sheet/picker-cell.native.js +1 -9
  83. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  84. package/build/mobile/bottom-sheet/switch-cell.native.js +1 -3
  85. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  86. package/build/mobile/global-styles-context/index.native.js +8 -8
  87. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  88. package/build/mobile/global-styles-context/utils.native.js +30 -12
  89. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  90. package/build/mobile/keyboard-aware-flat-list/index.ios.js +4 -2
  91. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  92. package/build/modal/index.js +8 -0
  93. package/build/modal/index.js.map +1 -1
  94. package/build/navigator/navigator-provider/component.js +12 -8
  95. package/build/navigator/navigator-provider/component.js.map +1 -1
  96. package/build/number-control/styles/number-control-styles.js +8 -8
  97. package/build/number-control/styles/number-control-styles.js.map +1 -1
  98. package/build/palette-edit/index.js +72 -33
  99. package/build/palette-edit/index.js.map +1 -1
  100. package/build/popover/index.js +10 -2
  101. package/build/popover/index.js.map +1 -1
  102. package/build/query-controls/index.js +1 -0
  103. package/build/query-controls/index.js.map +1 -1
  104. package/build/snackbar/index.js +35 -24
  105. package/build/snackbar/index.js.map +1 -1
  106. package/build/snackbar/list.js +14 -19
  107. package/build/snackbar/list.js.map +1 -1
  108. package/build/snackbar/types.js +6 -0
  109. package/build/snackbar/types.js.map +1 -0
  110. package/build/tab-panel/index.js +15 -9
  111. package/build/tab-panel/index.js.map +1 -1
  112. package/build/theme/color-algorithms.js +118 -0
  113. package/build/theme/color-algorithms.js.map +1 -0
  114. package/build/theme/index.js +21 -18
  115. package/build/theme/index.js.map +1 -1
  116. package/build/theme/styles.js +10 -7
  117. package/build/theme/styles.js.map +1 -1
  118. package/build/toggle-control/index.js +5 -2
  119. package/build/toggle-control/index.js.map +1 -1
  120. package/build/ui/context/context-system-provider.js +3 -1
  121. package/build/ui/context/context-system-provider.js.map +1 -1
  122. package/build/unit-control/index.js +5 -2
  123. package/build/unit-control/index.js.map +1 -1
  124. package/build/utils/colors-values.js +1 -1
  125. package/build/utils/colors-values.js.map +1 -1
  126. package/build/utils/config-values.js +0 -2
  127. package/build/utils/config-values.js.map +1 -1
  128. package/build/utils/hooks/use-controlled-value.js.map +1 -1
  129. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  130. package/build-module/alignment-matrix-control/icon.js +4 -2
  131. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  132. package/build-module/alignment-matrix-control/index.js +23 -1
  133. package/build-module/alignment-matrix-control/index.js.map +1 -1
  134. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +13 -13
  135. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +1 -1
  136. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +16 -16
  137. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  138. package/build-module/alignment-matrix-control/types.js +2 -0
  139. package/build-module/alignment-matrix-control/types.js.map +1 -0
  140. package/build-module/alignment-matrix-control/utils.js +13 -8
  141. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  142. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +9 -9
  143. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  144. package/build-module/autocomplete/index.js +39 -11
  145. package/build-module/autocomplete/index.js.map +1 -1
  146. package/build-module/base-control/hooks.js +41 -0
  147. package/build-module/base-control/hooks.js.map +1 -0
  148. package/build-module/base-control/index.js +18 -8
  149. package/build-module/base-control/index.js.map +1 -1
  150. package/build-module/base-field/hook.js +0 -14
  151. package/build-module/base-field/hook.js.map +1 -1
  152. package/build-module/base-field/index.js.map +1 -1
  153. package/build-module/base-field/styles.js +5 -5
  154. package/build-module/base-field/styles.js.map +1 -1
  155. package/build-module/base-field/types.js +2 -0
  156. package/build-module/base-field/types.js.map +1 -0
  157. package/build-module/border-box-control/border-box-control/component.js +0 -3
  158. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  159. package/build-module/border-box-control/border-box-control/hook.js +0 -2
  160. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  161. package/build-module/border-box-control/border-box-control-split-controls/component.js +0 -2
  162. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  163. package/build-module/border-box-control/border-box-control-split-controls/hook.js +0 -2
  164. package/build-module/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  165. package/build-module/border-control/border-control/component.js +1 -2
  166. package/build-module/border-control/border-control/component.js.map +1 -1
  167. package/build-module/border-control/border-control/hook.js +0 -2
  168. package/build-module/border-control/border-control/hook.js.map +1 -1
  169. package/build-module/border-control/border-control-dropdown/component.js +6 -11
  170. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  171. package/build-module/border-control/border-control-dropdown/hook.js +0 -2
  172. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  173. package/build-module/border-control/styles.js +17 -17
  174. package/build-module/border-control/styles.js.map +1 -1
  175. package/build-module/box-control/linked-button.js +3 -4
  176. package/build-module/box-control/linked-button.js.map +1 -1
  177. package/build-module/color-palette/index.js +7 -15
  178. package/build-module/color-palette/index.js.map +1 -1
  179. package/build-module/color-picker/input-with-slider.js +1 -0
  180. package/build-module/color-picker/input-with-slider.js.map +1 -1
  181. package/build-module/color-picker/styles.js +8 -8
  182. package/build-module/color-picker/styles.js.map +1 -1
  183. package/build-module/custom-select-control/index.js +14 -2
  184. package/build-module/custom-select-control/index.js.map +1 -1
  185. package/build-module/dashicon/index.js +1 -4
  186. package/build-module/dashicon/index.js.map +1 -1
  187. package/build-module/date-time/date-time/index.js +4 -4
  188. package/build-module/date-time/date-time/index.js.map +1 -1
  189. package/build-module/dimension-control/index.js +1 -2
  190. package/build-module/dimension-control/index.js.map +1 -1
  191. package/build-module/dropdown/index.js +44 -10
  192. package/build-module/dropdown/index.js.map +1 -1
  193. package/build-module/duotone-picker/duotone-picker.js +2 -2
  194. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  195. package/build-module/gradient-picker/index.js +4 -10
  196. package/build-module/gradient-picker/index.js.map +1 -1
  197. package/build-module/higher-order/navigate-regions/index.js +4 -3
  198. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  199. package/build-module/higher-order/with-fallback-styles/index.js +2 -2
  200. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  201. package/build-module/index.js +2 -3
  202. package/build-module/index.js.map +1 -1
  203. package/build-module/input-control/index.js +16 -5
  204. package/build-module/input-control/index.js.map +1 -1
  205. package/build-module/input-control/input-base.js +2 -0
  206. package/build-module/input-control/input-base.js.map +1 -1
  207. package/build-module/mobile/bottom-sheet/cell.native.js +1 -1
  208. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  209. package/build-module/mobile/bottom-sheet/picker-cell.native.js +1 -8
  210. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  211. package/build-module/mobile/bottom-sheet/switch-cell.native.js +1 -2
  212. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  213. package/build-module/mobile/global-styles-context/index.native.js +8 -7
  214. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  215. package/build-module/mobile/global-styles-context/utils.native.js +31 -13
  216. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  217. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  218. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  219. package/build-module/modal/index.js +8 -0
  220. package/build-module/modal/index.js.map +1 -1
  221. package/build-module/navigator/navigator-provider/component.js +12 -8
  222. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  223. package/build-module/number-control/styles/number-control-styles.js +8 -10
  224. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  225. package/build-module/palette-edit/index.js +73 -34
  226. package/build-module/palette-edit/index.js.map +1 -1
  227. package/build-module/popover/index.js +10 -2
  228. package/build-module/popover/index.js.map +1 -1
  229. package/build-module/query-controls/index.js +1 -0
  230. package/build-module/query-controls/index.js.map +1 -1
  231. package/build-module/snackbar/index.js +33 -23
  232. package/build-module/snackbar/index.js.map +1 -1
  233. package/build-module/snackbar/list.js +14 -22
  234. package/build-module/snackbar/list.js.map +1 -1
  235. package/build-module/snackbar/types.js +2 -0
  236. package/build-module/snackbar/types.js.map +1 -0
  237. package/build-module/tab-panel/index.js +15 -8
  238. package/build-module/tab-panel/index.js.map +1 -1
  239. package/build-module/theme/color-algorithms.js +105 -0
  240. package/build-module/theme/color-algorithms.js.map +1 -0
  241. package/build-module/theme/index.js +21 -17
  242. package/build-module/theme/index.js.map +1 -1
  243. package/build-module/theme/styles.js +8 -6
  244. package/build-module/theme/styles.js.map +1 -1
  245. package/build-module/toggle-control/index.js +4 -2
  246. package/build-module/toggle-control/index.js.map +1 -1
  247. package/build-module/ui/context/context-system-provider.js +3 -2
  248. package/build-module/ui/context/context-system-provider.js.map +1 -1
  249. package/build-module/unit-control/index.js +5 -2
  250. package/build-module/unit-control/index.js.map +1 -1
  251. package/build-module/utils/colors-values.js +1 -1
  252. package/build-module/utils/colors-values.js.map +1 -1
  253. package/build-module/utils/config-values.js +0 -2
  254. package/build-module/utils/config-values.js.map +1 -1
  255. package/build-module/utils/hooks/use-controlled-value.js.map +1 -1
  256. package/build-style/style-rtl.css +108 -104
  257. package/build-style/style.css +108 -104
  258. package/build-types/alignment-matrix-control/cell.d.ts +5 -0
  259. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -0
  260. package/build-types/alignment-matrix-control/icon.d.ts +6 -0
  261. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -0
  262. package/build-types/alignment-matrix-control/index.d.ts +30 -0
  263. package/build-types/alignment-matrix-control/index.d.ts.map +1 -0
  264. package/build-types/alignment-matrix-control/stories/index.d.ts +14 -0
  265. package/build-types/alignment-matrix-control/stories/index.d.ts.map +1 -0
  266. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +19 -0
  267. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +1 -0
  268. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +23 -0
  269. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -0
  270. package/build-types/alignment-matrix-control/test/index.d.ts +2 -0
  271. package/build-types/alignment-matrix-control/test/index.d.ts.map +1 -0
  272. package/build-types/alignment-matrix-control/types.d.ts +39 -0
  273. package/build-types/alignment-matrix-control/types.d.ts.map +1 -0
  274. package/build-types/alignment-matrix-control/utils.d.ts +33 -0
  275. package/build-types/alignment-matrix-control/utils.d.ts.map +1 -0
  276. package/build-types/base-control/hooks.d.ts +23 -0
  277. package/build-types/base-control/hooks.d.ts.map +1 -0
  278. package/build-types/base-control/index.d.ts +17 -7
  279. package/build-types/base-control/index.d.ts.map +1 -1
  280. package/build-types/base-control/stories/index.d.ts.map +1 -1
  281. package/build-types/base-control/test/index.d.ts +2 -0
  282. package/build-types/base-control/test/index.d.ts.map +1 -0
  283. package/build-types/base-control/types.d.ts +8 -2
  284. package/build-types/base-control/types.d.ts.map +1 -1
  285. package/build-types/base-field/hook.d.ts +7 -31
  286. package/build-types/base-field/hook.d.ts.map +1 -1
  287. package/build-types/base-field/index.d.ts +1 -1
  288. package/build-types/base-field/index.d.ts.map +1 -1
  289. package/build-types/base-field/styles.d.ts +5 -5
  290. package/build-types/base-field/styles.d.ts.map +1 -1
  291. package/build-types/base-field/test/index.d.ts +2 -0
  292. package/build-types/base-field/test/index.d.ts.map +1 -0
  293. package/build-types/base-field/types.d.ts +29 -0
  294. package/build-types/base-field/types.d.ts.map +1 -0
  295. package/build-types/border-box-control/border-box-control/component.d.ts +1 -1
  296. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  297. package/build-types/border-box-control/border-box-control/hook.d.ts +2 -3
  298. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  299. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +2 -2
  300. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
  301. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  302. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +2 -3
  303. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  304. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +2 -2
  305. package/build-types/border-box-control/stories/index.d.ts +1 -1
  306. package/build-types/border-control/border-control/component.d.ts +1 -1
  307. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  308. package/build-types/border-control/border-control/hook.d.ts +2 -3
  309. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  310. package/build-types/border-control/border-control-dropdown/component.d.ts +1 -1
  311. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  312. package/build-types/border-control/border-control-dropdown/hook.d.ts +2 -3
  313. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  314. package/build-types/border-control/border-control-style-picker/hook.d.ts +2 -2
  315. package/build-types/border-control/stories/index.d.ts +6 -6
  316. package/build-types/border-control/stories/index.d.ts.map +1 -1
  317. package/build-types/border-control/styles.d.ts.map +1 -1
  318. package/build-types/border-control/types.d.ts +1 -1
  319. package/build-types/border-control/types.d.ts.map +1 -1
  320. package/build-types/card/card/hook.d.ts +2 -2
  321. package/build-types/card/card-body/hook.d.ts +2 -2
  322. package/build-types/card/card-divider/hook.d.ts +2 -2
  323. package/build-types/card/card-footer/hook.d.ts +2 -2
  324. package/build-types/card/card-header/hook.d.ts +2 -2
  325. package/build-types/card/card-media/hook.d.ts +2 -2
  326. package/build-types/color-palette/index.d.ts +3 -4
  327. package/build-types/color-palette/index.d.ts.map +1 -1
  328. package/build-types/color-palette/stories/index.d.ts +6 -14
  329. package/build-types/color-palette/stories/index.d.ts.map +1 -1
  330. package/build-types/color-palette/styles.d.ts +1 -1
  331. package/build-types/color-palette/types.d.ts +4 -17
  332. package/build-types/color-palette/types.d.ts.map +1 -1
  333. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  334. package/build-types/color-picker/styles.d.ts +5 -5
  335. package/build-types/color-picker/styles.d.ts.map +1 -1
  336. package/build-types/custom-select-control/index.d.ts.map +1 -1
  337. package/build-types/dashicon/index.d.ts +6 -20
  338. package/build-types/dashicon/index.d.ts.map +1 -1
  339. package/build-types/dashicon/types.d.ts +14 -0
  340. package/build-types/dashicon/types.d.ts.map +1 -1
  341. package/build-types/date-time/date/styles.d.ts +3 -3
  342. package/build-types/date-time/date-time/styles.d.ts +3 -3
  343. package/build-types/date-time/time/styles.d.ts +8 -8
  344. package/build-types/disabled/stories/index.d.ts.map +1 -1
  345. package/build-types/dropdown/index.d.ts +29 -1
  346. package/build-types/dropdown/index.d.ts.map +1 -1
  347. package/build-types/dropdown/stories/index.d.ts +23 -0
  348. package/build-types/dropdown/stories/index.d.ts.map +1 -0
  349. package/build-types/dropdown/test/index.d.ts +2 -0
  350. package/build-types/dropdown/test/index.d.ts.map +1 -0
  351. package/build-types/dropdown/types.d.ts +101 -0
  352. package/build-types/dropdown/types.d.ts.map +1 -1
  353. package/build-types/elevation/hook.d.ts +2 -2
  354. package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
  355. package/build-types/flex/flex/hook.d.ts +2 -2
  356. package/build-types/flex/flex-block/hook.d.ts +2 -2
  357. package/build-types/flex/flex-item/hook.d.ts +2 -2
  358. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -5
  359. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  360. package/build-types/grid/hook.d.ts +2 -2
  361. package/build-types/h-stack/component.d.ts +1 -1
  362. package/build-types/h-stack/hook.d.ts +2 -2
  363. package/build-types/heading/hook.d.ts +2 -2
  364. package/build-types/icon/stories/index.d.ts +22 -0
  365. package/build-types/icon/stories/index.d.ts.map +1 -0
  366. package/build-types/input-control/index.d.ts +1 -1
  367. package/build-types/input-control/index.d.ts.map +1 -1
  368. package/build-types/input-control/input-base.d.ts.map +1 -1
  369. package/build-types/input-control/stories/index.d.ts +1 -0
  370. package/build-types/input-control/stories/index.d.ts.map +1 -1
  371. package/build-types/input-control/types.d.ts +2 -1
  372. package/build-types/input-control/types.d.ts.map +1 -1
  373. package/build-types/item-group/item/hook.d.ts +2 -2
  374. package/build-types/item-group/item-group/hook.d.ts +2 -2
  375. package/build-types/modal/index.d.ts.map +1 -1
  376. package/build-types/modal/stories/index.d.ts.map +1 -1
  377. package/build-types/navigator/navigator-back-button/hook.d.ts +3 -3
  378. package/build-types/navigator/navigator-button/hook.d.ts +3 -3
  379. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  380. package/build-types/number-control/index.d.ts +2 -2
  381. package/build-types/number-control/index.d.ts.map +1 -1
  382. package/build-types/number-control/stories/index.d.ts +25 -0
  383. package/build-types/number-control/stories/index.d.ts.map +1 -0
  384. package/build-types/number-control/styles/number-control-styles.d.ts +6 -6
  385. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  386. package/build-types/number-control/test/index.d.ts +2 -0
  387. package/build-types/number-control/test/index.d.ts.map +1 -0
  388. package/build-types/popover/index.d.ts +1 -1
  389. package/build-types/popover/index.d.ts.map +1 -1
  390. package/build-types/popover/stories/e2e/index.d.ts +1 -1
  391. package/build-types/range-control/index.d.ts +1 -1
  392. package/build-types/range-control/styles/range-control-styles.d.ts +2 -2
  393. package/build-types/resizable-box/resize-tooltip/index.d.ts +15 -19
  394. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  395. package/build-types/resizable-box/resize-tooltip/label.d.ts +4 -3
  396. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  397. package/build-types/scrollable/hook.d.ts +2 -2
  398. package/build-types/search-control/index.d.ts +1 -1
  399. package/build-types/search-control/stories/index.d.ts +2 -2
  400. package/build-types/snackbar/index.d.ts +19 -0
  401. package/build-types/snackbar/index.d.ts.map +1 -0
  402. package/build-types/snackbar/list.d.ts +18 -0
  403. package/build-types/snackbar/list.d.ts.map +1 -0
  404. package/build-types/snackbar/stories/index.d.ts +16 -0
  405. package/build-types/snackbar/stories/index.d.ts.map +1 -0
  406. package/build-types/snackbar/stories/list.d.ts +12 -0
  407. package/build-types/snackbar/stories/list.d.ts.map +1 -0
  408. package/build-types/snackbar/types.d.ts +111 -0
  409. package/build-types/snackbar/types.d.ts.map +1 -0
  410. package/build-types/spacer/hook.d.ts +2 -2
  411. package/build-types/spinner/index.d.ts +1 -1
  412. package/build-types/surface/hook.d.ts +2 -2
  413. package/build-types/tab-panel/index.d.ts +1 -1
  414. package/build-types/tab-panel/index.d.ts.map +1 -1
  415. package/build-types/tab-panel/types.d.ts +19 -1
  416. package/build-types/tab-panel/types.d.ts.map +1 -1
  417. package/build-types/text/hook.d.ts +2 -2
  418. package/build-types/text-control/index.d.ts +2 -2
  419. package/build-types/text-control/stories/index.d.ts.map +1 -1
  420. package/build-types/text-control/types.d.ts +1 -5
  421. package/build-types/text-control/types.d.ts.map +1 -1
  422. package/build-types/theme/color-algorithms.d.ts +20 -0
  423. package/build-types/theme/color-algorithms.d.ts.map +1 -0
  424. package/build-types/theme/index.d.ts +1 -1
  425. package/build-types/theme/index.d.ts.map +1 -1
  426. package/build-types/theme/stories/index.d.ts +4 -0
  427. package/build-types/theme/stories/index.d.ts.map +1 -1
  428. package/build-types/theme/styles.d.ts +3 -2
  429. package/build-types/theme/styles.d.ts.map +1 -1
  430. package/build-types/theme/test/color-algorithms.d.ts +2 -0
  431. package/build-types/theme/test/color-algorithms.d.ts.map +1 -0
  432. package/build-types/theme/types.d.ts +41 -3
  433. package/build-types/theme/types.d.ts.map +1 -1
  434. package/build-types/toggle-control/index.d.ts.map +1 -1
  435. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +2 -2
  436. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +2 -2
  437. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
  438. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  439. package/build-types/tools-panel/tools-panel/hook.d.ts +2 -2
  440. package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -2
  441. package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -2
  442. package/build-types/truncate/hook.d.ts +2 -2
  443. package/build-types/ui/context/context-system-provider.d.ts.map +1 -1
  444. package/build-types/ui/control-group/hook.d.ts +2 -2
  445. package/build-types/ui/control-label/hook.d.ts +2 -2
  446. package/build-types/ui/form-group/form-group.d.ts +2 -2
  447. package/build-types/ui/form-group/use-form-group.d.ts +5 -5
  448. package/build-types/unit-control/index.d.ts +2 -1
  449. package/build-types/unit-control/index.d.ts.map +1 -1
  450. package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -2
  451. package/build-types/unit-control/types.d.ts +4 -0
  452. package/build-types/unit-control/types.d.ts.map +1 -1
  453. package/build-types/utils/config-values.d.ts +0 -2
  454. package/build-types/utils/hooks/use-controlled-value.d.ts +2 -1
  455. package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
  456. package/build-types/v-stack/component.d.ts +2 -2
  457. package/build-types/v-stack/hook.d.ts +2 -2
  458. package/build-types/v-stack/stories/index.d.ts +2 -2
  459. package/package.json +21 -20
  460. package/src/alignment-matrix-control/README.md +7 -7
  461. package/src/alignment-matrix-control/{cell.js → cell.tsx} +7 -1
  462. package/src/alignment-matrix-control/{icon.js → icon.tsx} +6 -3
  463. package/src/alignment-matrix-control/{index.js → index.tsx} +31 -4
  464. package/src/alignment-matrix-control/stories/{index.js → index.tsx} +17 -9
  465. package/src/alignment-matrix-control/styles/{alignment-matrix-control-icon-styles.js → alignment-matrix-control-icon-styles.ts} +11 -3
  466. package/src/alignment-matrix-control/styles/{alignment-matrix-control-styles.js → alignment-matrix-control-styles.ts} +13 -3
  467. package/src/alignment-matrix-control/test/{index.js → index.tsx} +5 -5
  468. package/src/alignment-matrix-control/types.ts +54 -0
  469. package/src/alignment-matrix-control/{utils.js → utils.tsx} +24 -14
  470. package/src/angle-picker-control/styles/angle-picker-control-styles.js +4 -0
  471. package/src/autocomplete/index.js +44 -15
  472. package/src/autocomplete/test/index.js +2 -0
  473. package/src/base-control/README.md +21 -12
  474. package/src/base-control/hooks.ts +45 -0
  475. package/src/base-control/index.tsx +18 -7
  476. package/src/base-control/stories/index.tsx +8 -10
  477. package/src/base-control/test/index.tsx +53 -0
  478. package/src/base-control/types.ts +8 -2
  479. package/src/base-field/README.md +21 -22
  480. package/src/base-field/{hook.js → hook.ts} +5 -15
  481. package/src/base-field/{index.js → index.ts} +0 -0
  482. package/src/base-field/{styles.js → styles.ts} +2 -2
  483. package/src/base-field/test/__snapshots__/{index.js.snap → index.tsx.snap} +4 -4
  484. package/src/base-field/test/{index.js → index.tsx} +10 -5
  485. package/src/base-field/types.ts +29 -0
  486. package/src/border-box-control/border-box-control/README.md +1 -0
  487. package/src/border-box-control/border-box-control/component.tsx +0 -7
  488. package/src/border-box-control/border-box-control/hook.ts +0 -2
  489. package/src/border-box-control/border-box-control-split-controls/component.tsx +0 -2
  490. package/src/border-box-control/border-box-control-split-controls/hook.ts +0 -2
  491. package/src/border-box-control/test/index.js +5 -1
  492. package/src/border-control/border-control/component.tsx +1 -4
  493. package/src/border-control/border-control/hook.ts +0 -2
  494. package/src/border-control/border-control-dropdown/component.tsx +11 -17
  495. package/src/border-control/border-control-dropdown/hook.ts +0 -2
  496. package/src/border-control/stories/index.tsx +0 -1
  497. package/src/border-control/styles.ts +1 -10
  498. package/src/border-control/test/index.js +70 -67
  499. package/src/border-control/types.ts +1 -4
  500. package/src/box-control/linked-button.js +8 -11
  501. package/src/box-control/test/index.js +207 -134
  502. package/src/button/stories/index.js +30 -0
  503. package/src/button/style.scss +17 -14
  504. package/src/button/test/index.js +32 -15
  505. package/src/card/test/index.tsx +32 -20
  506. package/src/checkbox-control/test/index.tsx +2 -0
  507. package/src/circular-option-picker/style.scss +1 -0
  508. package/src/color-palette/index.tsx +16 -18
  509. package/src/color-palette/stories/index.tsx +1 -18
  510. package/src/color-palette/test/__snapshots__/index.tsx.snap +4 -4
  511. package/src/color-palette/test/index.tsx +86 -36
  512. package/src/color-palette/types.ts +4 -18
  513. package/src/color-picker/README.md +1 -0
  514. package/src/color-picker/input-with-slider.tsx +1 -0
  515. package/src/color-picker/styles.ts +0 -4
  516. package/src/color-picker/test/index.js +2 -0
  517. package/src/combobox-control/test/index.js +2 -0
  518. package/src/confirm-dialog/README.md +3 -2
  519. package/src/confirm-dialog/test/index.js +2 -0
  520. package/src/custom-select-control/README.md +14 -0
  521. package/src/custom-select-control/index.js +14 -2
  522. package/src/dashicon/{index.js → index.tsx} +10 -4
  523. package/src/dashicon/types.ts +17 -0
  524. package/src/date-time/date/test/index.tsx +2 -0
  525. package/src/date-time/date-time/index.tsx +2 -2
  526. package/src/date-time/time/test/index.tsx +2 -0
  527. package/src/dimension-control/index.js +2 -3
  528. package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -8
  529. package/src/dimension-control/test/index.test.js +2 -0
  530. package/src/disabled/stories/index.tsx +6 -2
  531. package/src/disabled/test/index.tsx +23 -11
  532. package/src/dropdown/README.md +41 -46
  533. package/src/dropdown/{index.js → index.tsx} +57 -13
  534. package/src/dropdown/stories/{index.js → index.tsx} +21 -8
  535. package/src/dropdown/test/index.tsx +88 -0
  536. package/src/dropdown/types.ts +107 -0
  537. package/src/dropdown-menu/README.md +2 -3
  538. package/src/dropdown-menu/test/index.js +20 -12
  539. package/src/duotone-picker/duotone-picker.js +2 -2
  540. package/src/external-link/test/index.tsx +2 -0
  541. package/src/focal-point-picker/test/index.js +2 -0
  542. package/src/focal-point-picker/test/media.js +26 -21
  543. package/src/font-size-picker/test/index.tsx +2 -0
  544. package/src/form-file-upload/test/index.tsx +2 -0
  545. package/src/form-toggle/test/index.tsx +2 -0
  546. package/src/form-token-field/style.scss +1 -1
  547. package/src/form-token-field/test/index.tsx +3 -0
  548. package/src/gradient-picker/index.js +6 -10
  549. package/src/gradient-picker/stories/index.js +0 -1
  550. package/src/grid/test/grid.tsx +31 -31
  551. package/src/guide/test/index.js +2 -0
  552. package/src/higher-order/navigate-regions/index.js +5 -2
  553. package/src/higher-order/navigate-regions/style.scss +13 -59
  554. package/src/higher-order/with-fallback-styles/index.js +4 -2
  555. package/src/higher-order/with-filters/test/index.js +32 -43
  556. package/src/higher-order/with-focus-outside/test/index.js +2 -0
  557. package/src/higher-order/with-focus-return/test/index.js +3 -4
  558. package/src/higher-order/with-notices/test/index.js +1 -0
  559. package/src/icon/stories/index.tsx +103 -0
  560. package/src/index.js +2 -3
  561. package/src/input-control/index.tsx +42 -28
  562. package/src/input-control/input-base.tsx +8 -1
  563. package/src/input-control/stories/index.tsx +6 -0
  564. package/src/input-control/test/index.js +21 -0
  565. package/src/input-control/types.ts +2 -0
  566. package/src/isolated-event-container/test/index.js +2 -0
  567. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  568. package/src/mobile/bottom-sheet/picker-cell.native.js +1 -6
  569. package/src/mobile/bottom-sheet/switch-cell.native.js +2 -2
  570. package/src/mobile/global-styles-context/index.native.js +9 -11
  571. package/src/mobile/global-styles-context/utils.native.js +17 -16
  572. package/src/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  573. package/src/mobile/link-settings/test/edit.native.js +68 -124
  574. package/src/modal/index.tsx +11 -0
  575. package/src/modal/stories/index.tsx +3 -0
  576. package/src/modal/test/index.tsx +13 -0
  577. package/src/navigable-container/test/navigable-menu.js +2 -0
  578. package/src/navigable-container/test/tababble-container.js +2 -0
  579. package/src/navigation/stories/index.js +6 -6
  580. package/src/navigation/stories/{controlled-state.js → utils/controlled-state.js} +3 -3
  581. package/src/navigation/stories/{default.js → utils/default.js} +3 -3
  582. package/src/navigation/stories/{group.js → utils/group.js} +4 -4
  583. package/src/navigation/stories/{hide-if-empty.js → utils/hide-if-empty.js} +3 -3
  584. package/src/navigation/stories/{more-examples.js → utils/more-examples.js} +4 -4
  585. package/src/navigation/stories/{search.js → utils/search.js} +5 -5
  586. package/src/navigation/test/index.js +2 -0
  587. package/src/navigator/navigator-provider/component.tsx +13 -10
  588. package/src/navigator/test/index.tsx +2 -0
  589. package/src/notice/test/index.js +8 -3
  590. package/src/notice/test/list.js +8 -5
  591. package/src/number-control/stories/{index.js → index.tsx} +24 -7
  592. package/src/number-control/styles/{number-control-styles.js → number-control-styles.ts} +5 -3
  593. package/src/number-control/test/index.tsx +602 -0
  594. package/src/palette-edit/index.js +88 -39
  595. package/src/palette-edit/test/index.js +25 -1
  596. package/src/panel/test/__snapshots__/body.js.snap +9 -0
  597. package/src/panel/test/body.js +71 -62
  598. package/src/placeholder/test/index.tsx +3 -0
  599. package/src/popover/index.tsx +10 -2
  600. package/src/popover/style.scss +12 -11
  601. package/src/popover/test/index.tsx +25 -15
  602. package/src/query-controls/index.js +1 -0
  603. package/src/range-control/test/index.tsx +57 -60
  604. package/src/resizable-box/style.scss +1 -0
  605. package/src/sandbox/test/index.js +13 -11
  606. package/src/search-control/style.scss +4 -0
  607. package/src/select-control/test/select-control.tsx +2 -0
  608. package/src/snackbar/README.md +63 -8
  609. package/src/snackbar/{index.js → index.tsx} +46 -28
  610. package/src/snackbar/{list.js → list.tsx} +20 -21
  611. package/src/snackbar/stories/index.tsx +96 -0
  612. package/src/snackbar/stories/list.tsx +98 -0
  613. package/src/snackbar/types.ts +116 -0
  614. package/src/tab-panel/README.md +9 -0
  615. package/src/tab-panel/index.tsx +15 -5
  616. package/src/tab-panel/style.scss +46 -34
  617. package/src/tab-panel/test/index.tsx +113 -0
  618. package/src/tab-panel/types.ts +20 -1
  619. package/src/text/test/__snapshots__/index.tsx.snap +1 -0
  620. package/src/text/test/index.tsx +98 -46
  621. package/src/text-control/stories/index.tsx +0 -1
  622. package/src/text-control/types.ts +1 -6
  623. package/src/text-highlight/test/index.tsx +1 -0
  624. package/src/theme/README.md +32 -2
  625. package/src/theme/color-algorithms.ts +138 -0
  626. package/src/theme/index.tsx +23 -16
  627. package/src/theme/stories/index.tsx +67 -0
  628. package/src/theme/styles.ts +22 -17
  629. package/src/theme/test/color-algorithms.ts +100 -0
  630. package/src/theme/test/index.tsx +68 -35
  631. package/src/theme/types.ts +43 -3
  632. package/src/toggle-control/index.tsx +4 -2
  633. package/src/toggle-group-control/test/index.tsx +15 -2
  634. package/src/toolbar/style.scss +1 -1
  635. package/src/toolbar-group/test/index.js +10 -6
  636. package/src/tools-panel/stories/index.js +1 -1
  637. package/src/tools-panel/stories/{tools-panel-with-item-group-slot.js → utils/tools-panel-with-item-group-slot.js} +14 -11
  638. package/src/tools-panel/test/index.js +20 -14
  639. package/src/tooltip/README.md +7 -0
  640. package/src/tooltip/stories/index.js +68 -78
  641. package/src/tooltip/style.scss +2 -2
  642. package/src/tooltip/test/index.js +111 -18
  643. package/src/ui/context/context-system-provider.js +3 -2
  644. package/src/ui/context/test/context-system-provider.js +5 -4
  645. package/src/ui/control-label/test/index.js +3 -5
  646. package/src/unit-control/README.md +9 -1
  647. package/src/unit-control/index.tsx +3 -0
  648. package/src/unit-control/test/index.tsx +4 -0
  649. package/src/unit-control/types.ts +4 -0
  650. package/src/utils/colors-values.js +1 -1
  651. package/src/utils/config-values.js +0 -2
  652. package/src/utils/hooks/test/use-latest-ref.js +2 -0
  653. package/src/utils/hooks/use-controlled-value.ts +2 -2
  654. package/src/utils/theme-variables.scss +20 -0
  655. package/tsconfig.json +2 -4
  656. package/tsconfig.tsbuildinfo +1 -1
  657. package/src/dropdown/test/index.js +0 -98
  658. package/src/icon/stories/index.js +0 -128
  659. package/src/number-control/test/index.js +0 -478
  660. package/src/snackbar/stories/index.js +0 -89
@@ -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, "type" | "value" | "step" | "max" | "min" | "required" | "isDragEnabled"> & {
6
+ export declare const ValueInput: import("@emotion/styled").StyledComponent<Omit<import("../../input-control/types").InputControlProps, "value" | "type" | "step" | "max" | "min" | "required" | "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>>, "type" | "children" | "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "multiple" | "disabled" | "key" | "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" | "hideLabelFromVision" | "step" | "max" | "min" | "crossOrigin" | "suffix" | "__next36pxDefaultSize" | "__unstableInputWidth" | "labelPosition" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "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" | "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> & {
19
19
  theme?: import("@emotion/react").Theme | undefined;
20
20
  }, {}, {}>;
21
21
  export declare const UnitLabel: import("@emotion/styled").StyledComponent<{
@@ -88,5 +88,9 @@ export declare type UnitControlProps = Omit<UnitSelectControlProps, 'unit'> & Om
88
88
  * Callback when either the quantity or the unit inputs lose focus.
89
89
  */
90
90
  onBlur?: FocusEventHandler<HTMLInputElement | HTMLSelectElement>;
91
+ /**
92
+ * Callback when either the quantity or the unit inputs gains focus.
93
+ */
94
+ onFocus?: FocusEventHandler<HTMLInputElement | HTMLSelectElement>;
91
95
  };
92
96
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/unit-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C;;GAEG;AACH,OAAO,KAAK,EACX,mBAAmB,EACnB,iBAAiB,EACjB,IAAI,IAAI,SAAS,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,oBAAY,UAAU,GAAG,SAAS,CAAC;AAEnC,oBAAY,iBAAiB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,2BAA2B,GAAG,mBAAmB,CAAE;IAC9D,IAAI,CAAC,EAAE,iBAAiB,CAAC;CACzB,CAAE,CAAC;AAEJ,oBAAY,sBAAsB,GAAG,IAAI,CAAE,iBAAiB,EAAE,MAAM,CAAE,GAAG;IACxE;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAEF,oBAAY,gBAAgB,GAAG,IAAI,CAAE,sBAAsB,EAAE,MAAM,CAAE,GACpE,IAAI,CAAE,kBAAkB,EAAE,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAE,GAAG;IAChE;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAE,gBAAgB,GAAG,iBAAiB,CAAE,CAAC;CACnE,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/unit-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C;;GAEG;AACH,OAAO,KAAK,EACX,mBAAmB,EACnB,iBAAiB,EACjB,IAAI,IAAI,SAAS,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,oBAAY,UAAU,GAAG,SAAS,CAAC;AAEnC,oBAAY,iBAAiB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,2BAA2B,GAAG,mBAAmB,CAAE;IAC9D,IAAI,CAAC,EAAE,iBAAiB,CAAC;CACzB,CAAE,CAAC;AAEJ,oBAAY,sBAAsB,GAAG,IAAI,CAAE,iBAAiB,EAAE,MAAM,CAAE,GAAG;IACxE;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAEF,oBAAY,gBAAgB,GAAG,IAAI,CAAE,sBAAsB,EAAE,MAAM,CAAE,GACpE,IAAI,CAAE,kBAAkB,EAAE,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAE,GAAG;IAChE;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAE,gBAAgB,GAAG,iBAAiB,CAAE,CAAC;IACnE;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAE,gBAAgB,GAAG,iBAAiB,CAAE,CAAC;CACpE,CAAC"}
@@ -6,9 +6,7 @@ declare var _default: {
6
6
  controlPaddingXSmall: string;
7
7
  controlBackgroundColor: string;
8
8
  controlBorderRadius: string;
9
- controlBorderColor: string;
10
9
  controlBoxShadow: string;
11
- controlBorderColorHover: string;
12
10
  controlBoxShadowFocus: string;
13
11
  controlDestructiveBorderColor: string;
14
12
  controlHeight: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare type Props<T> = {
2
3
  defaultValue?: T;
3
4
  value?: T;
@@ -12,6 +13,6 @@ declare type Props<T> = {
12
13
  * @param props.onChange
13
14
  * @return The controlled value and the value setter.
14
15
  */
15
- export declare function useControlledValue<T>({ defaultValue, onChange, value: valueProp, }: Props<T>): [T | undefined, (value: T) => void];
16
+ export declare function useControlledValue<T>({ defaultValue, onChange, value: valueProp, }: Props<T>): readonly [T | undefined, import("react").Dispatch<import("react").SetStateAction<T | undefined>>];
16
17
  export {};
17
18
  //# sourceMappingURL=use-controlled-value.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-controlled-value.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/use-controlled-value.ts"],"names":[],"mappings":"AAKA,aAAK,KAAK,CAAE,CAAC,IAAK;IACjB,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,CAAC,KAAM,IAAI,CAAC;CAChC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAE,CAAC,EAAI,EACxC,YAAY,EACZ,QAAQ,EACR,KAAK,EAAE,SAAS,GAChB,EAAE,KAAK,CAAE,CAAC,CAAE,GAAI,CAAE,CAAC,GAAG,SAAS,EAAE,CAAE,KAAK,EAAE,CAAC,KAAM,IAAI,CAAE,CAmBvD"}
1
+ {"version":3,"file":"use-controlled-value.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/use-controlled-value.ts"],"names":[],"mappings":";AAKA,aAAK,KAAK,CAAE,CAAC,IAAK;IACjB,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,CAAC,KAAM,IAAI,CAAC;CAChC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAE,CAAC,EAAI,EACxC,YAAY,EACZ,QAAQ,EACR,KAAK,EAAE,SAAS,GAChB,EAAE,KAAK,CAAE,CAAC,CAAE,qGAmBZ"}
@@ -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?: "top" | "bottom" | "left" | "right" | "center" | "initial" | (string & {}) | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "edge" | 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" | "bottomLeft" | "bottomRight" | "edge" | "topLeft" | "topRight" | undefined;
27
27
  spacing?: import("csstype").Property.Width<string | number> | undefined;
28
28
  } & {
29
- alignment?: "top" | "bottom" | "left" | "right" | "center" | "initial" | (string & {}) | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "edge" | 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" | "bottomLeft" | "bottomRight" | "edge" | "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,6 +18,7 @@ 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;
21
22
  defaultChecked?: boolean | undefined;
22
23
  suppressContentEditableWarning?: boolean | undefined;
23
24
  suppressHydrationWarning?: boolean | undefined;
@@ -26,7 +27,6 @@ export declare function useVStack(props: WordPressComponentProps<VStackProps, 'd
26
27
  contextMenu?: string | undefined;
27
28
  dir?: string | undefined;
28
29
  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" | "date" | "step" | "location" | undefined;
66
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "location" | "step" | "date" | 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?: "top" | "bottom" | "left" | "right" | "center" | "initial" | (string & {}) | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "edge" | 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" | "bottomLeft" | "bottomRight" | "edge" | "topLeft" | "topRight" | undefined;
11
11
  spacing?: import("csstype").Property.Width<string | number> | undefined;
12
12
  } & {
13
- alignment?: "top" | "bottom" | "left" | "right" | "center" | "initial" | (string & {}) | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "edge" | 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" | "bottomLeft" | "bottomRight" | "edge" | "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": "22.1.0",
3
+ "version": "23.1.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -38,28 +38,29 @@
38
38
  "@emotion/utils": "^1.0.0",
39
39
  "@floating-ui/react-dom": "^1.0.0",
40
40
  "@use-gesture/react": "^10.2.6",
41
- "@wordpress/a11y": "^3.22.0",
42
- "@wordpress/compose": "^5.20.0",
43
- "@wordpress/date": "^4.22.0",
44
- "@wordpress/deprecated": "^3.22.0",
45
- "@wordpress/dom": "^3.22.0",
46
- "@wordpress/element": "^4.20.0",
47
- "@wordpress/escape-html": "^2.22.0",
48
- "@wordpress/hooks": "^3.22.0",
49
- "@wordpress/i18n": "^4.22.0",
50
- "@wordpress/icons": "^9.13.0",
51
- "@wordpress/is-shallow-equal": "^4.22.0",
52
- "@wordpress/keycodes": "^3.22.0",
53
- "@wordpress/primitives": "^3.20.0",
54
- "@wordpress/rich-text": "^5.20.0",
55
- "@wordpress/warning": "^2.22.0",
41
+ "@wordpress/a11y": "^3.24.0",
42
+ "@wordpress/compose": "^6.1.0",
43
+ "@wordpress/date": "^4.24.0",
44
+ "@wordpress/deprecated": "^3.24.0",
45
+ "@wordpress/dom": "^3.24.0",
46
+ "@wordpress/element": "^5.1.0",
47
+ "@wordpress/escape-html": "^2.24.0",
48
+ "@wordpress/hooks": "^3.24.0",
49
+ "@wordpress/i18n": "^4.24.0",
50
+ "@wordpress/icons": "^9.15.0",
51
+ "@wordpress/is-shallow-equal": "^4.24.0",
52
+ "@wordpress/keycodes": "^3.24.0",
53
+ "@wordpress/primitives": "^3.22.0",
54
+ "@wordpress/rich-text": "^6.1.0",
55
+ "@wordpress/warning": "^2.24.0",
56
56
  "change-case": "^4.1.2",
57
57
  "classnames": "^2.3.1",
58
58
  "colord": "^2.7.0",
59
59
  "date-fns": "^2.28.0",
60
60
  "dom-scroll-into-view": "^1.2.1",
61
61
  "downshift": "^6.0.15",
62
- "framer-motion": "^6.2.8",
62
+ "fast-deep-equal": "^3.1.3",
63
+ "framer-motion": "^7.6.1",
63
64
  "gradient-parser": "^0.1.5",
64
65
  "highlight-words-core": "^1.2.2",
65
66
  "lodash": "^4.17.21",
@@ -73,11 +74,11 @@
73
74
  "valtio": "^1.7.0"
74
75
  },
75
76
  "peerDependencies": {
76
- "react": "^17.0.0",
77
- "react-dom": "^17.0.0"
77
+ "react": "^18.0.0",
78
+ "react-dom": "^18.0.0"
78
79
  },
79
80
  "publishConfig": {
80
81
  "access": "public"
81
82
  },
82
- "gitHead": "7ac04f446242452d3cb24372f9ca58f0cae97715"
83
+ "gitHead": "200bee7b06b15f6fa655e25b6ab69cbd6b49a357"
83
84
  }
@@ -30,8 +30,7 @@ The component accepts the following props:
30
30
 
31
31
  ### className
32
32
 
33
- The class that will be added to the classes of the wrapper <Composite/> component.
34
-
33
+ The class that will be added to the classes of the underlying `grid` widget.
35
34
  - Type: `string`
36
35
  - Required: No
37
36
 
@@ -44,7 +43,7 @@ Unique ID for the component.
44
43
 
45
44
  ### label
46
45
 
47
- Accessible label. If provided, sets the `aria-label` attribute of the underlying <Composite/> component.
46
+ Accessible label. If provided, sets the `aria-label` attribute of the underlying `grid` widget.
48
47
 
49
48
  - Type: `string`
50
49
  - Required: No
@@ -54,26 +53,27 @@ Accessible label. If provided, sets the `aria-label` attribute of the underlying
54
53
 
55
54
  If provided, sets the default alignment value.
56
55
 
57
- - Type: `string`
56
+ - Type: `AlignmentMatrixControlValue`
58
57
  - Required: No
59
58
  - Default: `center center`
60
59
 
61
60
  ### value
62
61
 
63
62
  The current alignment value.
64
- - Type: `string`
63
+
64
+ - Type: `AlignmentMatrixControlValue`
65
65
  - Required: No
66
66
 
67
67
  ### onChange
68
68
 
69
69
  A function that receives the updated alignment value.
70
70
 
71
- - Type: `( nextValue: string ) => void`
71
+ - Type: `( newValue: AlignmentMatrixControlValue ) => void`
72
72
  - Required: No
73
73
 
74
74
  ### width
75
75
 
76
- If provided, sets the width of the wrapper <Composite/> component.
76
+ If provided, sets the width of the control.
77
77
 
78
78
  - Type: `number`
79
79
  - Required: No
@@ -13,8 +13,14 @@ import {
13
13
  Cell as CellView,
14
14
  Point,
15
15
  } from './styles/alignment-matrix-control-styles';
16
+ import type { AlignmentMatrixControlCellProps } from './types';
17
+ import type { WordPressComponentProps } from '../ui/context';
16
18
 
17
- export default function Cell( { isActive = false, value, ...props } ) {
19
+ export default function Cell( {
20
+ isActive = false,
21
+ value,
22
+ ...props
23
+ }: WordPressComponentProps< AlignmentMatrixControlCellProps, 'span', false > ) {
18
24
  const tooltipText = ALIGNMENT_LABEL[ value ];
19
25
 
20
26
  return (
@@ -12,17 +12,19 @@ import {
12
12
  Cell,
13
13
  Point,
14
14
  } from './styles/alignment-matrix-control-icon-styles';
15
+ import type { AlignmentMatrixControlIconProps } from './types';
16
+ import type { WordPressComponentProps } from '../ui/context';
15
17
 
16
18
  const BASE_SIZE = 24;
17
19
 
18
- export default function AlignmentMatrixControlIcon( {
20
+ function AlignmentMatrixControlIcon( {
19
21
  className,
20
22
  disablePointerEvents = true,
21
23
  size = BASE_SIZE,
22
24
  style = {},
23
25
  value = 'center',
24
26
  ...props
25
- } ) {
27
+ }: WordPressComponentProps< AlignmentMatrixControlIconProps, 'div', false > ) {
26
28
  const alignIndex = getAlignmentIndex( value );
27
29
  const scale = ( size / BASE_SIZE ).toFixed( 2 );
28
30
 
@@ -42,7 +44,6 @@ export default function AlignmentMatrixControlIcon( {
42
44
  className={ classes }
43
45
  disablePointerEvents={ disablePointerEvents }
44
46
  role="presentation"
45
- size={ size }
46
47
  style={ styles }
47
48
  >
48
49
  { ALIGNMENTS.map( ( align, index ) => {
@@ -57,3 +58,5 @@ export default function AlignmentMatrixControlIcon( {
57
58
  </Root>
58
59
  );
59
60
  }
61
+
62
+ export default AlignmentMatrixControlIcon;
@@ -18,10 +18,15 @@ import { Composite, CompositeGroup, useCompositeState } from '../composite';
18
18
  import { Root, Row } from './styles/alignment-matrix-control-styles';
19
19
  import AlignmentMatrixControlIcon from './icon';
20
20
  import { GRID, getItemId } from './utils';
21
+ import type { WordPressComponentProps } from '../ui/context';
22
+ import type {
23
+ AlignmentMatrixControlProps,
24
+ AlignmentMatrixControlValue,
25
+ } from './types';
21
26
 
22
27
  const noop = () => {};
23
28
 
24
- function useBaseId( id ) {
29
+ function useBaseId( id?: string ) {
25
30
  const instanceId = useInstanceId(
26
31
  AlignmentMatrixControl,
27
32
  'alignment-matrix-control'
@@ -30,7 +35,27 @@ function useBaseId( id ) {
30
35
  return id || instanceId;
31
36
  }
32
37
 
33
- export default function AlignmentMatrixControl( {
38
+ /**
39
+ *
40
+ * AlignmentMatrixControl components enable adjustments to horizontal and vertical alignments for UI.
41
+ *
42
+ * ```jsx
43
+ * import { __experimentalAlignmentMatrixControl as AlignmentMatrixControl } from '@wordpress/components';
44
+ * import { useState } from '@wordpress/element';
45
+ *
46
+ * const Example = () => {
47
+ * const [ alignment, setAlignment ] = useState( 'center center' );
48
+ *
49
+ * return (
50
+ * <AlignmentMatrixControl
51
+ * value={ alignment }
52
+ * onChange={ setAlignment }
53
+ * />
54
+ * );
55
+ * };
56
+ * ```
57
+ */
58
+ export function AlignmentMatrixControl( {
34
59
  className,
35
60
  id,
36
61
  label = __( 'Alignment Matrix Control' ),
@@ -39,7 +64,7 @@ export default function AlignmentMatrixControl( {
39
64
  onChange = noop,
40
65
  width = 92,
41
66
  ...props
42
- } ) {
67
+ }: WordPressComponentProps< AlignmentMatrixControlProps, 'div', false > ) {
43
68
  const [ immutableDefaultValue ] = useState( value ?? defaultValue );
44
69
  const baseId = useBaseId( id );
45
70
  const initialCurrentId = getItemId( baseId, immutableDefaultValue );
@@ -50,7 +75,7 @@ export default function AlignmentMatrixControl( {
50
75
  rtl: isRTL(),
51
76
  } );
52
77
 
53
- const handleOnChange = ( nextValue ) => {
78
+ const handleOnChange = ( nextValue: AlignmentMatrixControlValue ) => {
54
79
  onChange( nextValue );
55
80
  };
56
81
 
@@ -107,3 +132,5 @@ export default function AlignmentMatrixControl( {
107
132
  }
108
133
 
109
134
  AlignmentMatrixControl.Icon = AlignmentMatrixControlIcon;
135
+
136
+ export default AlignmentMatrixControl;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+
1
6
  /**
2
7
  * WordPress dependencies
3
8
  */
@@ -7,21 +12,18 @@ import { Icon } from '@wordpress/icons';
7
12
  /**
8
13
  * Internal dependencies
9
14
  */
10
- import AlignmentMatrixControl from '../';
11
- import { ALIGNMENTS } from '../utils';
15
+ import AlignmentMatrixControl from '..';
12
16
  import { HStack } from '../../h-stack';
17
+ import type { AlignmentMatrixControlProps } from '../types';
13
18
 
14
- export default {
19
+ const meta: ComponentMeta< typeof AlignmentMatrixControl > = {
15
20
  title: 'Components (Experimental)/AlignmentMatrixControl',
16
21
  component: AlignmentMatrixControl,
17
22
  subcomponents: {
18
23
  'AlignmentMatrixControl.Icon': AlignmentMatrixControl.Icon,
19
24
  },
20
25
  argTypes: {
21
- defaultValue: { options: ALIGNMENTS },
22
26
  onChange: { action: 'onChange', control: { type: null } },
23
- label: { control: { type: 'text' } },
24
- width: { control: { type: 'number' } },
25
27
  value: { control: { type: null } },
26
28
  },
27
29
  parameters: {
@@ -29,9 +31,15 @@ export default {
29
31
  docs: { source: { state: 'open' } },
30
32
  },
31
33
  };
34
+ export default meta;
32
35
 
33
- const Template = ( { defaultValue, onChange, ...props } ) => {
34
- const [ value, setValue ] = useState();
36
+ const Template: ComponentStory< typeof AlignmentMatrixControl > = ( {
37
+ defaultValue,
38
+ onChange,
39
+ ...props
40
+ } ) => {
41
+ const [ value, setValue ] =
42
+ useState< AlignmentMatrixControlProps[ 'value' ] >();
35
43
 
36
44
  // Convenience handler for Canvas view so changes are reflected
37
45
  useEffect( () => {
@@ -43,7 +51,7 @@ const Template = ( { defaultValue, onChange, ...props } ) => {
43
51
  { ...props }
44
52
  onChange={ ( ...changeArgs ) => {
45
53
  setValue( ...changeArgs );
46
- onChange( ...changeArgs );
54
+ onChange?.( ...changeArgs );
47
55
  } }
48
56
  value={ value }
49
57
  />
@@ -12,6 +12,10 @@ import {
12
12
  pointBase,
13
13
  Cell as CellBase,
14
14
  } from './alignment-matrix-control-styles';
15
+ import type {
16
+ AlignmentMatrixControlIconProps,
17
+ AlignmentMatrixControlCellProps,
18
+ } from '../types';
15
19
 
16
20
  const rootSize = () => {
17
21
  const padding = 1.5;
@@ -25,9 +29,11 @@ const rootSize = () => {
25
29
  } );
26
30
  };
27
31
 
28
- const rootPointerEvents = ( { disablePointerEvents } ) => {
32
+ const rootPointerEvents = ( {
33
+ disablePointerEvents,
34
+ }: Pick< AlignmentMatrixControlIconProps, 'disablePointerEvents' > ) => {
29
35
  return css( {
30
- pointerEvents: disablePointerEvents ? 'none' : null,
36
+ pointerEvents: disablePointerEvents ? 'none' : undefined,
31
37
  } );
32
38
  };
33
39
 
@@ -46,7 +52,9 @@ export const Root = styled.div`
46
52
  ${ rootPointerEvents };
47
53
  `;
48
54
 
49
- const pointActive = ( { isActive } ) => {
55
+ const pointActive = ( {
56
+ isActive,
57
+ }: Pick< AlignmentMatrixControlCellProps, 'isActive' > ) => {
50
58
  const boxShadow = isActive ? `0 0 0 1px currentColor` : null;
51
59
 
52
60
  return css`
@@ -8,6 +8,10 @@ import { css } from '@emotion/react';
8
8
  * Internal dependencies
9
9
  */
10
10
  import { COLORS, reduceMotion } from '../../utils';
11
+ import type {
12
+ AlignmentMatrixControlProps,
13
+ AlignmentMatrixControlCellProps,
14
+ } from '../types';
11
15
 
12
16
  export const rootBase = () => {
13
17
  return css`
@@ -27,7 +31,9 @@ const rootSize = ( { size = 92 } ) => {
27
31
  `;
28
32
  };
29
33
 
30
- export const Root = styled.div`
34
+ export const Root = styled.div< {
35
+ size: AlignmentMatrixControlProps[ 'width' ];
36
+ } >`
31
37
  ${ rootBase };
32
38
 
33
39
  border: 1px solid transparent;
@@ -43,7 +49,9 @@ export const Row = styled.div`
43
49
  grid-template-columns: repeat( 3, 1fr );
44
50
  `;
45
51
 
46
- const pointActive = ( { isActive } ) => {
52
+ const pointActive = ( {
53
+ isActive,
54
+ }: Pick< AlignmentMatrixControlCellProps, 'isActive' > ) => {
47
55
  const boxShadow = isActive ? `0 0 0 2px ${ COLORS.gray[ 900 ] }` : null;
48
56
  const pointColor = isActive ? COLORS.gray[ 900 ] : COLORS.gray[ 400 ];
49
57
  const pointColorHover = isActive ? COLORS.gray[ 900 ] : COLORS.ui.theme;
@@ -58,7 +66,9 @@ const pointActive = ( { isActive } ) => {
58
66
  `;
59
67
  };
60
68
 
61
- export const pointBase = ( props ) => {
69
+ export const pointBase = (
70
+ props: Pick< AlignmentMatrixControlCellProps, 'isActive' >
71
+ ) => {
62
72
  return css`
63
73
  background: currentColor;
64
74
  box-sizing: border-box;
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { render, screen, within } from '@testing-library/react';
4
+ import { act, render, screen, within } from '@testing-library/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
- import AlignmentMatrixControl from '../';
9
+ import AlignmentMatrixControl from '..';
10
10
 
11
11
  const getControl = () => {
12
12
  return screen.getByRole( 'grid' );
13
13
  };
14
14
 
15
- const getCell = ( name ) => {
15
+ const getCell = ( name: string ) => {
16
16
  return within( getControl() ).getByRole( 'gridcell', { name } );
17
17
  };
18
18
 
@@ -30,14 +30,14 @@ describe( 'AlignmentMatrixControl', () => {
30
30
 
31
31
  it.each( alignments )(
32
32
  'should change value on %s cell click',
33
- ( alignment ) => {
33
+ async ( alignment ) => {
34
34
  const spy = jest.fn();
35
35
 
36
36
  render(
37
37
  <AlignmentMatrixControl value="center" onChange={ spy } />
38
38
  );
39
39
 
40
- getCell( alignment ).focus();
40
+ await act( () => getCell( alignment ).focus() );
41
41
 
42
42
  expect( spy ).toHaveBeenCalledWith( alignment );
43
43
  }
@@ -0,0 +1,54 @@
1
+ export type AlignmentMatrixControlValue =
2
+ | 'top left'
3
+ | 'top center'
4
+ | 'top right'
5
+ | 'center left'
6
+ | 'center'
7
+ | 'center center'
8
+ | 'center right'
9
+ | 'bottom left'
10
+ | 'bottom center'
11
+ | 'bottom right';
12
+
13
+ export type AlignmentMatrixControlProps = {
14
+ /**
15
+ * Accessible label. If provided, sets the `aria-label` attribute of the
16
+ * underlying `grid` widget.
17
+ *
18
+ * @default 'Alignment Matrix Control'
19
+ */
20
+ label?: string;
21
+ /**
22
+ * If provided, sets the default alignment value.
23
+ *
24
+ * @default 'center center'
25
+ */
26
+ defaultValue?: AlignmentMatrixControlValue;
27
+ /**
28
+ * The current alignment value.
29
+ */
30
+ value?: AlignmentMatrixControlValue;
31
+ /**
32
+ * A function that receives the updated alignment value.
33
+ */
34
+ onChange?: ( newValue: AlignmentMatrixControlValue ) => void;
35
+ /**
36
+ * If provided, sets the width of the control.
37
+ *
38
+ * @default 92
39
+ */
40
+ width?: number;
41
+ };
42
+
43
+ export type AlignmentMatrixControlIconProps = Pick<
44
+ AlignmentMatrixControlProps,
45
+ 'value'
46
+ > & {
47
+ disablePointerEvents?: boolean;
48
+ size?: number;
49
+ };
50
+
51
+ export type AlignmentMatrixControlCellProps = {
52
+ isActive?: boolean;
53
+ value: NonNullable< AlignmentMatrixControlProps[ 'value' ] >;
54
+ };