@wordpress/components 23.3.2 → 23.4.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 (710) hide show
  1. package/CHANGELOG.md +20 -5
  2. package/build/alignment-matrix-control/utils.js +4 -4
  3. package/build/alignment-matrix-control/utils.js.map +1 -1
  4. package/build/angle-picker-control/angle-circle.js +37 -29
  5. package/build/angle-picker-control/angle-circle.js.map +1 -1
  6. package/build/angle-picker-control/index.js +44 -9
  7. package/build/angle-picker-control/index.js.map +1 -1
  8. package/build/angle-picker-control/styles/angle-picker-control-styles.js +13 -13
  9. package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  10. package/build/{base-field → angle-picker-control}/types.js +0 -0
  11. package/build/angle-picker-control/types.js.map +1 -0
  12. package/build/autocomplete/autocompleter-ui.native.js +1 -0
  13. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  14. package/build/base-control/hooks.js +1 -1
  15. package/build/base-control/hooks.js.map +1 -1
  16. package/build/border-box-control/utils.js +1 -1
  17. package/build/border-box-control/utils.js.map +1 -1
  18. package/build/box-control/all-input-control.js +2 -2
  19. package/build/box-control/all-input-control.js.map +1 -1
  20. package/build/box-control/axial-input-controls.js +1 -1
  21. package/build/box-control/axial-input-controls.js.map +1 -1
  22. package/build/box-control/icon.js.map +1 -1
  23. package/build/box-control/index.js +32 -3
  24. package/build/box-control/index.js.map +1 -1
  25. package/build/box-control/input-controls.js +5 -5
  26. package/build/box-control/input-controls.js.map +1 -1
  27. package/build/box-control/linked-button.js.map +1 -1
  28. package/build/box-control/styles/box-control-icon-styles.js +28 -28
  29. package/build/box-control/styles/box-control-icon-styles.js.map +1 -1
  30. package/build/box-control/styles/box-control-styles.js +23 -23
  31. package/build/box-control/styles/box-control-styles.js.map +1 -1
  32. package/build/box-control/styles/box-control-visualizer-styles.js +19 -19
  33. package/build/box-control/styles/box-control-visualizer-styles.js.map +1 -1
  34. package/build/box-control/types.js +6 -0
  35. package/build/box-control/types.js.map +1 -0
  36. package/build/box-control/unit-control.js.map +1 -1
  37. package/build/box-control/utils.js +23 -23
  38. package/build/box-control/utils.js.map +1 -1
  39. package/build/color-palette/index.js +8 -3
  40. package/build/color-palette/index.js.map +1 -1
  41. package/build/combobox-control/index.js +68 -12
  42. package/build/combobox-control/index.js.map +1 -1
  43. package/build/combobox-control/styles.js +2 -2
  44. package/build/combobox-control/styles.js.map +1 -1
  45. package/build/combobox-control/types.js +6 -0
  46. package/build/combobox-control/types.js.map +1 -0
  47. package/build/custom-gradient-picker/index.js +0 -1
  48. package/build/custom-gradient-picker/index.js.map +1 -1
  49. package/build/date-time/time/index.js +1 -1
  50. package/build/date-time/time/index.js.map +1 -1
  51. package/build/date-time/utils.js +1 -1
  52. package/build/date-time/utils.js.map +1 -1
  53. package/build/draggable/index.js +2 -2
  54. package/build/draggable/index.js.map +1 -1
  55. package/build/focal-point-picker/utils.js +3 -3
  56. package/build/focal-point-picker/utils.js.map +1 -1
  57. package/build/font-size-picker/utils.js +2 -2
  58. package/build/font-size-picker/utils.js.map +1 -1
  59. package/build/gradient-picker/index.js +9 -4
  60. package/build/gradient-picker/index.js.map +1 -1
  61. package/build/input-control/reducer/reducer.js +5 -5
  62. package/build/input-control/reducer/reducer.js.map +1 -1
  63. package/build/input-control/utils.js +1 -1
  64. package/build/input-control/utils.js.map +1 -1
  65. package/build/menu-items-choice/index.js +40 -3
  66. package/build/menu-items-choice/index.js.map +1 -1
  67. package/build/menu-items-choice/types.js +6 -0
  68. package/build/menu-items-choice/types.js.map +1 -0
  69. package/build/modal/index.js +41 -3
  70. package/build/modal/index.js.map +1 -1
  71. package/build/palette-edit/index.js +4 -1
  72. package/build/palette-edit/index.js.map +1 -1
  73. package/build/panel/header.js +9 -0
  74. package/build/panel/header.js.map +1 -1
  75. package/build/panel/index.js +21 -3
  76. package/build/panel/index.js.map +1 -1
  77. package/build/panel/row.js +10 -4
  78. package/build/panel/row.js.map +1 -1
  79. package/build/panel/types.js +6 -0
  80. package/build/panel/types.js.map +1 -0
  81. package/build/popover/index.js +15 -3
  82. package/build/popover/index.js.map +1 -1
  83. package/build/popover/overlay-middlewares.js +46 -0
  84. package/build/popover/overlay-middlewares.js.map +1 -0
  85. package/build/popover/utils.js +45 -6
  86. package/build/popover/utils.js.map +1 -1
  87. package/build/query-controls/terms.js +1 -1
  88. package/build/query-controls/terms.js.map +1 -1
  89. package/build/range-control/utils.js +4 -4
  90. package/build/range-control/utils.js.map +1 -1
  91. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +12 -12
  92. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  93. package/build/resizable-box/resize-tooltip/utils.js +14 -14
  94. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  95. package/build/snackbar/index.js +2 -2
  96. package/build/snackbar/index.js.map +1 -1
  97. package/build/toolbar/toolbar/index.js +25 -14
  98. package/build/toolbar/toolbar/index.js.map +1 -1
  99. package/build/toolbar/toolbar/toolbar-container.js +5 -4
  100. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  101. package/build/toolbar/toolbar/types.js +6 -0
  102. package/build/toolbar/toolbar/types.js.map +1 -0
  103. package/build/toolbar/toolbar-button/index.js +2 -0
  104. package/build/toolbar/toolbar-button/index.js.map +1 -1
  105. package/build/toolbar/toolbar-button/toolbar-button-container.js +1 -0
  106. package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
  107. package/build/toolbar/toolbar-context/index.js +2 -0
  108. package/build/toolbar/toolbar-context/index.js.map +1 -1
  109. package/build/toolbar/toolbar-dropdown-menu/index.js +2 -0
  110. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  111. package/build/toolbar/toolbar-group/index.js +2 -0
  112. package/build/toolbar/toolbar-group/index.js.map +1 -1
  113. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +2 -0
  114. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  115. package/build/toolbar/toolbar-group/toolbar-group-container.js +1 -0
  116. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  117. package/build/toolbar/toolbar-item/index.js +2 -0
  118. package/build/toolbar/toolbar-item/index.js.map +1 -1
  119. package/build/tools-panel/tools-panel/component.js +61 -5
  120. package/build/tools-panel/tools-panel/component.js.map +1 -1
  121. package/build/tools-panel/tools-panel/hook.js +4 -2
  122. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  123. package/build/tools-panel/tools-panel-header/component.js +2 -1
  124. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  125. package/build/tools-panel/tools-panel-header/hook.js +2 -0
  126. package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
  127. package/build/tools-panel/tools-panel-item/component.js +5 -4
  128. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  129. package/build/tools-panel/tools-panel-item/hook.js +4 -2
  130. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  131. package/build/tree-grid/cell.js +15 -4
  132. package/build/tree-grid/cell.js.map +1 -1
  133. package/build/tree-grid/index.js +81 -19
  134. package/build/tree-grid/index.js.map +1 -1
  135. package/build/tree-grid/item.js +14 -3
  136. package/build/tree-grid/item.js.map +1 -1
  137. package/build/tree-grid/roving-tab-index-context.js +1 -1
  138. package/build/tree-grid/roving-tab-index-context.js.map +1 -1
  139. package/build/tree-grid/roving-tab-index-item.js +13 -6
  140. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  141. package/build/tree-grid/roving-tab-index.js +0 -3
  142. package/build/tree-grid/roving-tab-index.js.map +1 -1
  143. package/build/tree-grid/row.js +20 -18
  144. package/build/tree-grid/row.js.map +1 -1
  145. package/build/tree-grid/types.js +6 -0
  146. package/build/tree-grid/types.js.map +1 -0
  147. package/build/ui/context/context-connect.js +7 -7
  148. package/build/ui/context/context-connect.js.map +1 -1
  149. package/build/ui/context/get-styled-class-name-from-key.js +1 -1
  150. package/build/ui/context/get-styled-class-name-from-key.js.map +1 -1
  151. package/build/ui/utils/get-valid-children.js +1 -1
  152. package/build/ui/utils/get-valid-children.js.map +1 -1
  153. package/build/ui/utils/space.js +1 -1
  154. package/build/ui/utils/space.js.map +1 -1
  155. package/build/unit-control/index.js +2 -2
  156. package/build/unit-control/index.js.map +1 -1
  157. package/build/unit-control/utils.js +20 -20
  158. package/build/unit-control/utils.js.map +1 -1
  159. package/build/utils/events.js +4 -4
  160. package/build/utils/events.js.map +1 -1
  161. package/build/utils/hooks/use-controlled-state.js +2 -2
  162. package/build/utils/hooks/use-controlled-state.js.map +1 -1
  163. package/build/utils/hooks/use-controlled-value.js +4 -4
  164. package/build/utils/hooks/use-controlled-value.js.map +1 -1
  165. package/build/utils/hooks/use-latest-ref.js +1 -1
  166. package/build/utils/hooks/use-latest-ref.js.map +1 -1
  167. package/build/utils/unit-values.js +3 -3
  168. package/build/utils/unit-values.js.map +1 -1
  169. package/build-module/alignment-matrix-control/utils.js +4 -4
  170. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  171. package/build-module/angle-picker-control/angle-circle.js +37 -29
  172. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  173. package/build-module/angle-picker-control/index.js +42 -8
  174. package/build-module/angle-picker-control/index.js.map +1 -1
  175. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +13 -13
  176. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  177. package/build-module/{base-field → angle-picker-control}/types.js +0 -0
  178. package/build-module/{base-field → angle-picker-control}/types.js.map +0 -0
  179. package/build-module/autocomplete/autocompleter-ui.native.js +1 -0
  180. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  181. package/build-module/base-control/hooks.js +1 -1
  182. package/build-module/base-control/hooks.js.map +1 -1
  183. package/build-module/border-box-control/utils.js +1 -1
  184. package/build-module/border-box-control/utils.js.map +1 -1
  185. package/build-module/box-control/all-input-control.js +2 -2
  186. package/build-module/box-control/all-input-control.js.map +1 -1
  187. package/build-module/box-control/axial-input-controls.js +1 -1
  188. package/build-module/box-control/axial-input-controls.js.map +1 -1
  189. package/build-module/box-control/icon.js.map +1 -1
  190. package/build-module/box-control/index.js +31 -3
  191. package/build-module/box-control/index.js.map +1 -1
  192. package/build-module/box-control/input-controls.js +5 -5
  193. package/build-module/box-control/input-controls.js.map +1 -1
  194. package/build-module/box-control/linked-button.js.map +1 -1
  195. package/build-module/box-control/styles/box-control-icon-styles.js +28 -28
  196. package/build-module/box-control/styles/box-control-icon-styles.js.map +1 -1
  197. package/build-module/box-control/styles/box-control-styles.js +23 -23
  198. package/build-module/box-control/styles/box-control-styles.js.map +1 -1
  199. package/build-module/box-control/styles/box-control-visualizer-styles.js +19 -19
  200. package/build-module/box-control/styles/box-control-visualizer-styles.js.map +1 -1
  201. package/build-module/box-control/types.js +2 -0
  202. package/{build/base-field → build-module/box-control}/types.js.map +0 -0
  203. package/build-module/box-control/unit-control.js.map +1 -1
  204. package/build-module/box-control/utils.js +23 -23
  205. package/build-module/box-control/utils.js.map +1 -1
  206. package/build-module/color-palette/index.js +8 -3
  207. package/build-module/color-palette/index.js.map +1 -1
  208. package/build-module/combobox-control/index.js +68 -12
  209. package/build-module/combobox-control/index.js.map +1 -1
  210. package/build-module/combobox-control/styles.js +2 -2
  211. package/build-module/combobox-control/styles.js.map +1 -1
  212. package/build-module/combobox-control/types.js +2 -0
  213. package/build-module/{resizable-box/styles/resizable-box.styles.js.map → combobox-control/types.js.map} +0 -0
  214. package/build-module/custom-gradient-picker/index.js +0 -1
  215. package/build-module/custom-gradient-picker/index.js.map +1 -1
  216. package/build-module/date-time/time/index.js +1 -1
  217. package/build-module/date-time/time/index.js.map +1 -1
  218. package/build-module/date-time/utils.js +1 -1
  219. package/build-module/date-time/utils.js.map +1 -1
  220. package/build-module/draggable/index.js +2 -2
  221. package/build-module/draggable/index.js.map +1 -1
  222. package/build-module/focal-point-picker/utils.js +3 -3
  223. package/build-module/focal-point-picker/utils.js.map +1 -1
  224. package/build-module/font-size-picker/utils.js +2 -2
  225. package/build-module/font-size-picker/utils.js.map +1 -1
  226. package/build-module/gradient-picker/index.js +9 -4
  227. package/build-module/gradient-picker/index.js.map +1 -1
  228. package/build-module/input-control/reducer/reducer.js +5 -5
  229. package/build-module/input-control/reducer/reducer.js.map +1 -1
  230. package/build-module/input-control/utils.js +1 -1
  231. package/build-module/input-control/utils.js.map +1 -1
  232. package/build-module/menu-items-choice/index.js +40 -4
  233. package/build-module/menu-items-choice/index.js.map +1 -1
  234. package/build-module/menu-items-choice/types.js +2 -0
  235. package/{build/resizable-box/styles/resizable-box.styles.js.map → build-module/menu-items-choice/types.js.map} +0 -0
  236. package/build-module/modal/index.js +41 -4
  237. package/build-module/modal/index.js.map +1 -1
  238. package/build-module/palette-edit/index.js +4 -1
  239. package/build-module/palette-edit/index.js.map +1 -1
  240. package/build-module/panel/header.js +9 -0
  241. package/build-module/panel/header.js.map +1 -1
  242. package/build-module/panel/index.js +20 -2
  243. package/build-module/panel/index.js.map +1 -1
  244. package/build-module/panel/row.js +9 -3
  245. package/build-module/panel/row.js.map +1 -1
  246. package/build-module/panel/types.js +2 -0
  247. package/build-module/panel/types.js.map +1 -0
  248. package/build-module/popover/index.js +14 -4
  249. package/build-module/popover/index.js.map +1 -1
  250. package/build-module/popover/overlay-middlewares.js +38 -0
  251. package/build-module/popover/overlay-middlewares.js.map +1 -0
  252. package/build-module/popover/utils.js +41 -5
  253. package/build-module/popover/utils.js.map +1 -1
  254. package/build-module/query-controls/terms.js +1 -1
  255. package/build-module/query-controls/terms.js.map +1 -1
  256. package/build-module/range-control/utils.js +4 -4
  257. package/build-module/range-control/utils.js.map +1 -1
  258. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +12 -12
  259. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  260. package/build-module/resizable-box/resize-tooltip/utils.js +14 -14
  261. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  262. package/build-module/snackbar/index.js +2 -2
  263. package/build-module/snackbar/index.js.map +1 -1
  264. package/build-module/toolbar/toolbar/index.js +25 -13
  265. package/build-module/toolbar/toolbar/index.js.map +1 -1
  266. package/build-module/toolbar/toolbar/toolbar-container.js +4 -3
  267. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  268. package/build-module/toolbar/toolbar/types.js +2 -0
  269. package/build-module/toolbar/toolbar/types.js.map +1 -0
  270. package/build-module/toolbar/toolbar-button/index.js +1 -0
  271. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  272. package/build-module/toolbar/toolbar-button/toolbar-button-container.js +1 -0
  273. package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
  274. package/build-module/toolbar/toolbar-context/index.js +2 -0
  275. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  276. package/build-module/toolbar/toolbar-dropdown-menu/index.js +1 -0
  277. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  278. package/build-module/toolbar/toolbar-group/index.js +1 -0
  279. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  280. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +1 -0
  281. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  282. package/build-module/toolbar/toolbar-group/toolbar-group-container.js +1 -0
  283. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  284. package/build-module/toolbar/toolbar-item/index.js +1 -0
  285. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  286. package/build-module/tools-panel/tools-panel/component.js +59 -4
  287. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  288. package/build-module/tools-panel/tools-panel/hook.js +4 -2
  289. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  290. package/build-module/tools-panel/tools-panel-header/component.js +2 -1
  291. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  292. package/build-module/tools-panel/tools-panel-header/hook.js +2 -0
  293. package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
  294. package/build-module/tools-panel/tools-panel-item/component.js +3 -3
  295. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  296. package/build-module/tools-panel/tools-panel-item/hook.js +5 -2
  297. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  298. package/build-module/tree-grid/cell.js +16 -4
  299. package/build-module/tree-grid/cell.js.map +1 -1
  300. package/build-module/tree-grid/index.js +81 -21
  301. package/build-module/tree-grid/index.js.map +1 -1
  302. package/build-module/tree-grid/item.js +14 -2
  303. package/build-module/tree-grid/item.js.map +1 -1
  304. package/build-module/tree-grid/roving-tab-index-context.js +1 -1
  305. package/build-module/tree-grid/roving-tab-index-context.js.map +1 -1
  306. package/build-module/tree-grid/roving-tab-index-item.js +11 -4
  307. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  308. package/build-module/tree-grid/roving-tab-index.js +0 -3
  309. package/build-module/tree-grid/roving-tab-index.js.map +1 -1
  310. package/build-module/tree-grid/row.js +22 -17
  311. package/build-module/tree-grid/row.js.map +1 -1
  312. package/build-module/tree-grid/types.js +2 -0
  313. package/build-module/tree-grid/types.js.map +1 -0
  314. package/build-module/ui/context/context-connect.js +7 -7
  315. package/build-module/ui/context/context-connect.js.map +1 -1
  316. package/build-module/ui/context/get-styled-class-name-from-key.js +1 -1
  317. package/build-module/ui/context/get-styled-class-name-from-key.js.map +1 -1
  318. package/build-module/ui/utils/get-valid-children.js +1 -1
  319. package/build-module/ui/utils/get-valid-children.js.map +1 -1
  320. package/build-module/ui/utils/space.js +1 -1
  321. package/build-module/ui/utils/space.js.map +1 -1
  322. package/build-module/unit-control/index.js +2 -2
  323. package/build-module/unit-control/index.js.map +1 -1
  324. package/build-module/unit-control/utils.js +20 -20
  325. package/build-module/unit-control/utils.js.map +1 -1
  326. package/build-module/utils/events.js +4 -4
  327. package/build-module/utils/events.js.map +1 -1
  328. package/build-module/utils/hooks/use-controlled-state.js +2 -2
  329. package/build-module/utils/hooks/use-controlled-state.js.map +1 -1
  330. package/build-module/utils/hooks/use-controlled-value.js +4 -4
  331. package/build-module/utils/hooks/use-controlled-value.js.map +1 -1
  332. package/build-module/utils/hooks/use-latest-ref.js +1 -1
  333. package/build-module/utils/hooks/use-latest-ref.js.map +1 -1
  334. package/build-module/utils/unit-values.js +3 -3
  335. package/build-module/utils/unit-values.js.map +1 -1
  336. package/build-style/style-rtl.css +5 -0
  337. package/build-style/style.css +5 -0
  338. package/build-types/alignment-matrix-control/utils.d.ts +4 -4
  339. package/build-types/angle-picker-control/angle-circle.d.ts +6 -0
  340. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -0
  341. package/build-types/angle-picker-control/index.d.ts +29 -0
  342. package/build-types/angle-picker-control/index.d.ts.map +1 -0
  343. package/build-types/angle-picker-control/stories/index.d.ts +15 -0
  344. package/build-types/angle-picker-control/stories/index.d.ts.map +1 -0
  345. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +20 -0
  346. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -0
  347. package/build-types/angle-picker-control/types.d.ts +26 -0
  348. package/build-types/angle-picker-control/types.d.ts.map +1 -0
  349. package/build-types/base-control/hooks.d.ts +1 -1
  350. package/build-types/border-box-control/border-box-control/component.d.ts +1 -1
  351. package/build-types/border-box-control/border-box-control/hook.d.ts +1 -1
  352. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
  353. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +1 -1
  354. package/build-types/border-box-control/stories/index.d.ts +1 -1
  355. package/build-types/{base-field → border-box-control}/test/index.d.ts +0 -0
  356. package/build-types/border-box-control/test/index.d.ts.map +1 -0
  357. package/build-types/border-box-control/test/utils.d.ts +2 -0
  358. package/build-types/border-box-control/test/utils.d.ts.map +1 -0
  359. package/build-types/box-control/all-input-control.d.ts +4 -0
  360. package/build-types/box-control/all-input-control.d.ts.map +1 -0
  361. package/build-types/box-control/axial-input-controls.d.ts +4 -0
  362. package/build-types/box-control/axial-input-controls.d.ts.map +1 -0
  363. package/build-types/box-control/icon.d.ts +8 -0
  364. package/build-types/box-control/icon.d.ts.map +1 -0
  365. package/build-types/box-control/index.d.ts +31 -0
  366. package/build-types/box-control/index.d.ts.map +1 -0
  367. package/build-types/box-control/input-controls.d.ts +4 -0
  368. package/build-types/box-control/input-controls.d.ts.map +1 -0
  369. package/build-types/box-control/linked-button.d.ts +9 -0
  370. package/build-types/box-control/linked-button.d.ts.map +1 -0
  371. package/build-types/box-control/styles/box-control-icon-styles.d.ts +42 -0
  372. package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -0
  373. package/build-types/box-control/styles/box-control-styles.d.ts +42 -0
  374. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -0
  375. package/build-types/box-control/styles/box-control-visualizer-styles.d.ts +46 -0
  376. package/build-types/box-control/styles/box-control-visualizer-styles.d.ts.map +1 -0
  377. package/build-types/box-control/test/index.d.ts +2 -0
  378. package/build-types/box-control/test/index.d.ts.map +1 -0
  379. package/build-types/box-control/types.d.ts +99 -0
  380. package/build-types/box-control/types.d.ts.map +1 -0
  381. package/build-types/box-control/unit-control.d.ts +4 -0
  382. package/build-types/box-control/unit-control.d.ts.map +1 -0
  383. package/build-types/box-control/utils.d.ts +84 -0
  384. package/build-types/box-control/utils.d.ts.map +1 -0
  385. package/build-types/color-palette/index.d.ts +3 -1
  386. package/build-types/color-palette/index.d.ts.map +1 -1
  387. package/build-types/color-palette/stories/index.d.ts +6 -2
  388. package/build-types/color-palette/stories/index.d.ts.map +1 -1
  389. package/build-types/color-palette/types.d.ts +8 -0
  390. package/build-types/color-palette/types.d.ts.map +1 -1
  391. package/build-types/combobox-control/index.d.ts +51 -0
  392. package/build-types/combobox-control/index.d.ts.map +1 -0
  393. package/build-types/combobox-control/stories/index.d.ts +18 -0
  394. package/build-types/combobox-control/stories/index.d.ts.map +1 -0
  395. package/build-types/combobox-control/styles.d.ts +8 -0
  396. package/build-types/combobox-control/styles.d.ts.map +1 -0
  397. package/build-types/combobox-control/test/index.d.ts +2 -0
  398. package/build-types/combobox-control/test/index.d.ts.map +1 -0
  399. package/build-types/combobox-control/types.d.ts +62 -0
  400. package/build-types/combobox-control/types.d.ts.map +1 -0
  401. package/build-types/date-time/utils.d.ts +1 -1
  402. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
  403. package/build-types/focal-point-picker/utils.d.ts +3 -3
  404. package/build-types/font-size-picker/utils.d.ts +2 -2
  405. package/build-types/input-control/reducer/reducer.d.ts +3 -3
  406. package/build-types/input-control/utils.d.ts +1 -1
  407. package/build-types/menu-items-choice/index.d.ts +38 -0
  408. package/build-types/menu-items-choice/index.d.ts.map +1 -0
  409. package/build-types/menu-items-choice/stories/index.d.ts +12 -0
  410. package/build-types/menu-items-choice/stories/index.d.ts.map +1 -0
  411. package/build-types/menu-items-choice/types.d.ts +53 -0
  412. package/build-types/menu-items-choice/types.d.ts.map +1 -0
  413. package/build-types/modal/index.d.ts.map +1 -1
  414. package/build-types/modal/types.d.ts +2 -0
  415. package/build-types/modal/types.d.ts.map +1 -1
  416. package/build-types/panel/header.d.ts +13 -0
  417. package/build-types/panel/header.d.ts.map +1 -0
  418. package/build-types/panel/index.d.ts +21 -0
  419. package/build-types/panel/index.d.ts.map +1 -0
  420. package/build-types/panel/row.d.ts +12 -0
  421. package/build-types/panel/row.d.ts.map +1 -0
  422. package/build-types/panel/test/header.d.ts +2 -0
  423. package/build-types/panel/test/header.d.ts.map +1 -0
  424. package/build-types/panel/test/index.d.ts +2 -0
  425. package/build-types/{base-field → panel}/test/index.d.ts.map +1 -1
  426. package/build-types/panel/test/row.d.ts +2 -0
  427. package/build-types/panel/test/row.d.ts.map +1 -0
  428. package/build-types/panel/types.d.ts +38 -0
  429. package/build-types/panel/types.d.ts.map +1 -0
  430. package/build-types/popover/index.d.ts.map +1 -1
  431. package/build-types/popover/overlay-middlewares.d.ts +9 -0
  432. package/build-types/popover/overlay-middlewares.d.ts.map +1 -0
  433. package/build-types/popover/stories/index.d.ts.map +1 -1
  434. package/build-types/popover/types.d.ts +3 -2
  435. package/build-types/popover/types.d.ts.map +1 -1
  436. package/build-types/popover/utils.d.ts +12 -4
  437. package/build-types/popover/utils.d.ts.map +1 -1
  438. package/build-types/query-controls/terms.d.ts +1 -1
  439. package/build-types/range-control/utils.d.ts +4 -4
  440. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +5 -4
  441. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  442. package/build-types/resizable-box/resize-tooltip/utils.d.ts +6 -6
  443. package/build-types/toolbar/index.d.ts +7 -0
  444. package/build-types/toolbar/index.d.ts.map +1 -0
  445. package/build-types/toolbar/stories/index.d.ts +14 -0
  446. package/build-types/toolbar/stories/index.d.ts.map +1 -0
  447. package/build-types/toolbar/test/index.d.ts +2 -0
  448. package/build-types/toolbar/test/index.d.ts.map +1 -0
  449. package/build-types/toolbar/test/toolbar-group.d.ts +2 -0
  450. package/build-types/toolbar/test/toolbar-group.d.ts.map +1 -0
  451. package/build-types/toolbar/toolbar/index.d.ts +25 -0
  452. package/build-types/toolbar/toolbar/index.d.ts.map +1 -0
  453. package/build-types/toolbar/toolbar/toolbar-container.d.ts +5 -0
  454. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -0
  455. package/build-types/toolbar/toolbar/types.d.ts +15 -0
  456. package/build-types/toolbar/toolbar/types.d.ts.map +1 -0
  457. package/build-types/toolbar/toolbar-button/index.d.ts +12 -0
  458. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -0
  459. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +3 -0
  460. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -0
  461. package/build-types/toolbar/toolbar-context/index.d.ts +3 -0
  462. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -0
  463. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +3 -0
  464. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -0
  465. package/build-types/toolbar/toolbar-group/index.d.ts +39 -0
  466. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -0
  467. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +7 -0
  468. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -0
  469. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +7 -0
  470. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -0
  471. package/build-types/toolbar/toolbar-item/index.d.ts +7 -0
  472. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -0
  473. package/build-types/tools-panel/stories/index.d.ts +17 -0
  474. package/build-types/tools-panel/stories/index.d.ts.map +1 -0
  475. package/build-types/tools-panel/tools-panel/component.d.ts +54 -2
  476. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  477. package/build-types/tools-panel/tools-panel/hook.d.ts +2 -1
  478. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  479. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  480. package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -1
  481. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  482. package/build-types/tools-panel/tools-panel-item/component.d.ts +2 -2
  483. package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
  484. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  485. package/build-types/tools-panel/types.d.ts +42 -15
  486. package/build-types/tools-panel/types.d.ts.map +1 -1
  487. package/build-types/tree-grid/cell.d.ts +13 -0
  488. package/build-types/tree-grid/cell.d.ts.map +1 -0
  489. package/build-types/tree-grid/index.d.ts +70 -0
  490. package/build-types/tree-grid/index.d.ts.map +1 -0
  491. package/build-types/tree-grid/item.d.ts +12 -0
  492. package/build-types/tree-grid/item.d.ts.map +1 -0
  493. package/build-types/tree-grid/roving-tab-index-context.d.ts +10 -0
  494. package/build-types/tree-grid/roving-tab-index-context.d.ts.map +1 -0
  495. package/build-types/tree-grid/roving-tab-index-item.d.ts +5 -0
  496. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -0
  497. package/build-types/tree-grid/roving-tab-index.d.ts +10 -0
  498. package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -0
  499. package/build-types/tree-grid/row.d.ts +12 -0
  500. package/build-types/tree-grid/row.d.ts.map +1 -0
  501. package/build-types/tree-grid/stories/index.d.ts +13 -0
  502. package/build-types/tree-grid/stories/index.d.ts.map +1 -0
  503. package/build-types/tree-grid/test/cell.d.ts +2 -0
  504. package/build-types/tree-grid/test/cell.d.ts.map +1 -0
  505. package/build-types/tree-grid/test/index.d.ts +2 -0
  506. package/build-types/tree-grid/test/index.d.ts.map +1 -0
  507. package/build-types/tree-grid/test/roving-tab-index-item.d.ts +2 -0
  508. package/build-types/tree-grid/test/roving-tab-index-item.d.ts.map +1 -0
  509. package/build-types/tree-grid/test/roving-tab-index.d.ts +2 -0
  510. package/build-types/tree-grid/test/roving-tab-index.d.ts.map +1 -0
  511. package/build-types/tree-grid/test/row.d.ts +2 -0
  512. package/build-types/tree-grid/test/row.d.ts.map +1 -0
  513. package/build-types/tree-grid/types.d.ts +109 -0
  514. package/build-types/tree-grid/types.d.ts.map +1 -0
  515. package/build-types/ui/context/context-connect.d.ts +7 -7
  516. package/build-types/ui/context/get-styled-class-name-from-key.d.ts +1 -1
  517. package/build-types/ui/utils/get-valid-children.d.ts +1 -1
  518. package/build-types/ui/utils/space.d.ts +1 -1
  519. package/build-types/unit-control/index.d.ts +1 -1
  520. package/build-types/unit-control/utils.d.ts +20 -20
  521. package/build-types/utils/events.d.ts +2 -2
  522. package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
  523. package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
  524. package/build-types/utils/hooks/use-controlled-value.d.ts +4 -4
  525. package/build-types/utils/hooks/use-latest-ref.d.ts +1 -1
  526. package/build-types/utils/unit-values.d.ts +3 -3
  527. package/package.json +19 -19
  528. package/src/alignment-matrix-control/utils.tsx +4 -4
  529. package/src/angle-picker-control/README.md +17 -14
  530. package/src/angle-picker-control/{angle-circle.js → angle-circle.tsx} +44 -12
  531. package/src/angle-picker-control/{index.js → index.tsx} +54 -10
  532. package/src/angle-picker-control/stories/index.tsx +57 -0
  533. package/src/angle-picker-control/styles/{angle-picker-control-styles.js → angle-picker-control-styles.tsx} +5 -1
  534. package/src/angle-picker-control/types.ts +29 -0
  535. package/src/autocomplete/autocompleter-ui.native.js +1 -0
  536. package/src/base-control/hooks.ts +1 -1
  537. package/src/border-box-control/test/{index.js → index.tsx} +76 -102
  538. package/src/border-box-control/test/{utils.js → utils.ts} +20 -0
  539. package/src/border-box-control/utils.ts +1 -1
  540. package/src/box-control/README.md +17 -26
  541. package/src/box-control/{all-input-control.js → all-input-control.tsx} +10 -6
  542. package/src/box-control/{axial-input-controls.js → axial-input-controls.tsx} +29 -24
  543. package/src/box-control/{icon.js → icon.tsx} +9 -4
  544. package/src/box-control/{index.js → index.tsx} +43 -8
  545. package/src/box-control/{input-controls.js → input-controls.tsx} +26 -16
  546. package/src/box-control/{linked-button.js → linked-button.tsx} +4 -1
  547. package/src/box-control/styles/{box-control-icon-styles.js → box-control-icon-styles.ts} +1 -1
  548. package/src/box-control/styles/{box-control-styles.js → box-control-styles.ts} +10 -2
  549. package/src/box-control/styles/{box-control-visualizer-styles.js → box-control-visualizer-styles.ts} +6 -2
  550. package/src/box-control/test/{index.js → index.tsx} +12 -9
  551. package/src/box-control/types.ts +121 -0
  552. package/src/box-control/{unit-control.js → unit-control.tsx} +9 -2
  553. package/src/box-control/{utils.js → utils.ts} +47 -38
  554. package/src/button/test/index.tsx +38 -30
  555. package/src/color-palette/README.md +7 -0
  556. package/src/color-palette/index.tsx +6 -1
  557. package/src/color-palette/types.ts +8 -0
  558. package/src/combobox-control/README.md +8 -15
  559. package/src/combobox-control/{index.js → index.tsx} +91 -19
  560. package/src/combobox-control/stories/index.tsx +114 -0
  561. package/src/combobox-control/styles.ts +4 -1
  562. package/src/combobox-control/test/{index.js → index.tsx} +9 -7
  563. package/src/combobox-control/types.ts +69 -0
  564. package/src/custom-gradient-picker/index.js +0 -1
  565. package/src/custom-select-control/stories/index.js +1 -1
  566. package/src/date-time/time/index.tsx +1 -1
  567. package/src/date-time/utils.ts +1 -1
  568. package/src/draggable/index.tsx +2 -2
  569. package/src/dropdown-menu/test/index.js +3 -11
  570. package/src/focal-point-picker/utils.ts +3 -3
  571. package/src/font-size-picker/utils.ts +2 -2
  572. package/src/gradient-picker/README.md +8 -0
  573. package/src/gradient-picker/index.js +6 -1
  574. package/src/input-control/reducer/reducer.ts +5 -5
  575. package/src/input-control/utils.ts +1 -1
  576. package/src/menu-items-choice/index.tsx +83 -0
  577. package/src/menu-items-choice/stories/index.tsx +79 -0
  578. package/src/menu-items-choice/types.ts +54 -0
  579. package/src/modal/index.tsx +45 -1
  580. package/src/modal/style.scss +8 -0
  581. package/src/modal/types.ts +2 -0
  582. package/src/palette-edit/index.js +4 -1
  583. package/src/panel/README.md +2 -2
  584. package/src/panel/header.tsx +20 -0
  585. package/src/panel/index.tsx +48 -0
  586. package/src/panel/row.tsx +37 -0
  587. package/src/panel/stories/index.js +22 -0
  588. package/src/panel/test/__snapshots__/{header.js.snap → header.tsx.snap} +0 -0
  589. package/src/panel/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
  590. package/src/panel/test/__snapshots__/{row.js.snap → row.tsx.snap} +0 -0
  591. package/src/panel/test/{header.js → header.tsx} +1 -1
  592. package/src/panel/test/{index.js → index.tsx} +6 -4
  593. package/src/panel/test/{row.js → row.tsx} +4 -2
  594. package/src/panel/types.ts +38 -0
  595. package/src/popover/README.md +4 -1
  596. package/src/popover/index.tsx +17 -1
  597. package/src/popover/overlay-middlewares.tsx +29 -0
  598. package/src/popover/stories/index.tsx +7 -1
  599. package/src/popover/test/index.tsx +29 -21
  600. package/src/popover/types.ts +4 -2
  601. package/src/popover/utils.ts +39 -3
  602. package/src/query-controls/terms.ts +1 -1
  603. package/src/range-control/utils.ts +4 -4
  604. package/src/resizable-box/resize-tooltip/styles/{resize-tooltip.styles.js → resize-tooltip.styles.ts} +0 -0
  605. package/src/resizable-box/resize-tooltip/utils.ts +14 -14
  606. package/src/snackbar/index.tsx +2 -2
  607. package/src/toolbar/stories/{index.js → index.tsx} +39 -26
  608. package/src/toolbar/test/{index.js → index.tsx} +0 -0
  609. package/src/toolbar/test/{toolbar-group.js → toolbar-group.tsx} +2 -2
  610. package/src/toolbar/toolbar/README.md +7 -2
  611. package/src/toolbar/toolbar/{index.js → index.tsx} +33 -12
  612. package/src/toolbar/toolbar/{toolbar-container.js → toolbar-container.tsx} +9 -2
  613. package/src/toolbar/toolbar/types.ts +15 -0
  614. package/src/toolbar/toolbar-button/index.js +2 -0
  615. package/src/toolbar/toolbar-button/toolbar-button-container.js +2 -0
  616. package/src/toolbar/toolbar-context/index.js +2 -0
  617. package/src/toolbar/toolbar-dropdown-menu/index.js +2 -0
  618. package/src/toolbar/toolbar-group/index.js +2 -0
  619. package/src/toolbar/toolbar-group/toolbar-group-collapsed.js +2 -0
  620. package/src/toolbar/toolbar-group/toolbar-group-container.js +2 -0
  621. package/src/toolbar/toolbar-item/index.js +2 -0
  622. package/src/tools-panel/stories/{index.js → index.tsx} +196 -95
  623. package/src/tools-panel/test/index.js +6 -6
  624. package/src/tools-panel/tools-panel/README.md +12 -4
  625. package/src/tools-panel/tools-panel/component.tsx +57 -3
  626. package/src/tools-panel/tools-panel/hook.ts +4 -2
  627. package/src/tools-panel/tools-panel-header/README.md +7 -0
  628. package/src/tools-panel/tools-panel-header/component.tsx +2 -1
  629. package/src/tools-panel/tools-panel-header/hook.ts +6 -4
  630. package/src/tools-panel/tools-panel-item/README.md +6 -4
  631. package/src/tools-panel/tools-panel-item/component.tsx +4 -4
  632. package/src/tools-panel/tools-panel-item/hook.ts +4 -2
  633. package/src/tools-panel/types.ts +43 -15
  634. package/src/tree-grid/README.md +18 -58
  635. package/src/tree-grid/cell.tsx +41 -0
  636. package/src/tree-grid/{index.js → index.tsx} +111 -35
  637. package/src/tree-grid/item.tsx +32 -0
  638. package/src/tree-grid/{roving-tab-index-context.js → roving-tab-index-context.ts} +9 -1
  639. package/src/tree-grid/roving-tab-index-item.tsx +50 -0
  640. package/src/tree-grid/{roving-tab-index.js → roving-tab-index.tsx} +7 -5
  641. package/src/tree-grid/row.tsx +47 -0
  642. package/src/tree-grid/stories/index.tsx +144 -0
  643. package/src/tree-grid/test/__snapshots__/{cell.js.snap → cell.tsx.snap} +0 -0
  644. package/src/tree-grid/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
  645. package/src/tree-grid/test/__snapshots__/{roving-tab-index-item.js.snap → roving-tab-index-item.tsx.snap} +0 -0
  646. package/src/tree-grid/test/__snapshots__/{roving-tab-index.js.snap → roving-tab-index.tsx.snap} +0 -0
  647. package/src/tree-grid/test/__snapshots__/{row.js.snap → row.tsx.snap} +0 -0
  648. package/src/tree-grid/test/{cell.js → cell.tsx} +7 -4
  649. package/src/tree-grid/test/{index.js → index.tsx} +13 -5
  650. package/src/tree-grid/test/{roving-tab-index-item.js → roving-tab-index-item.tsx} +7 -4
  651. package/src/tree-grid/test/{roving-tab-index.js → roving-tab-index.tsx} +0 -0
  652. package/src/tree-grid/test/{row.js → row.tsx} +4 -4
  653. package/src/tree-grid/types.ts +116 -0
  654. package/src/ui/context/context-connect.ts +7 -7
  655. package/src/ui/context/get-styled-class-name-from-key.ts +1 -1
  656. package/src/ui/utils/get-valid-children.ts +1 -1
  657. package/src/ui/utils/space.ts +1 -1
  658. package/src/unit-control/index.tsx +2 -2
  659. package/src/unit-control/utils.ts +20 -20
  660. package/src/utils/events.ts +4 -4
  661. package/src/utils/hooks/use-controlled-state.js +2 -2
  662. package/src/utils/hooks/use-controlled-value.ts +4 -4
  663. package/src/utils/hooks/use-latest-ref.ts +1 -1
  664. package/src/utils/unit-values.ts +3 -3
  665. package/tsconfig.json +1 -7
  666. package/tsconfig.tsbuildinfo +1 -1
  667. package/build/base-field/hook.js +0 -54
  668. package/build/base-field/hook.js.map +0 -1
  669. package/build/base-field/index.js +0 -14
  670. package/build/base-field/index.js.map +0 -1
  671. package/build/base-field/styles.js +0 -33
  672. package/build/base-field/styles.js.map +0 -1
  673. package/build/resizable-box/styles/resizable-box.styles.js +0 -2
  674. package/build-module/base-field/hook.js +0 -37
  675. package/build-module/base-field/hook.js.map +0 -1
  676. package/build-module/base-field/index.js +0 -2
  677. package/build-module/base-field/index.js.map +0 -1
  678. package/build-module/base-field/styles.js +0 -18
  679. package/build-module/base-field/styles.js.map +0 -1
  680. package/build-module/resizable-box/styles/resizable-box.styles.js +0 -2
  681. package/build-types/base-field/hook.d.ts +0 -270
  682. package/build-types/base-field/hook.d.ts.map +0 -1
  683. package/build-types/base-field/index.d.ts +0 -2
  684. package/build-types/base-field/index.d.ts.map +0 -1
  685. package/build-types/base-field/styles.d.ts +0 -6
  686. package/build-types/base-field/styles.d.ts.map +0 -1
  687. package/build-types/base-field/types.d.ts +0 -29
  688. package/build-types/base-field/types.d.ts.map +0 -1
  689. package/build-types/resizable-box/styles/resizable-box.styles.d.ts +0 -1
  690. package/build-types/resizable-box/styles/resizable-box.styles.d.ts.map +0 -1
  691. package/src/angle-picker-control/stories/index.js +0 -29
  692. package/src/base-field/README.md +0 -66
  693. package/src/base-field/hook.ts +0 -51
  694. package/src/base-field/index.ts +0 -1
  695. package/src/base-field/styles.ts +0 -86
  696. package/src/base-field/test/__snapshots__/index.tsx.snap +0 -141
  697. package/src/base-field/test/index.tsx +0 -84
  698. package/src/base-field/types.ts +0 -29
  699. package/src/combobox-control/stories/index.js +0 -339
  700. package/src/menu-items-choice/index.js +0 -43
  701. package/src/panel/header.js +0 -10
  702. package/src/panel/index.js +0 -26
  703. package/src/panel/row.js +0 -20
  704. package/src/resizable-box/styles/resizable-box.styles.js +0 -0
  705. package/src/tools-panel/stories/utils/tools-panel-with-item-group-slot.js +0 -246
  706. package/src/tree-grid/cell.js +0 -24
  707. package/src/tree-grid/item.js +0 -20
  708. package/src/tree-grid/roving-tab-index-item.js +0 -33
  709. package/src/tree-grid/row.js +0 -31
  710. package/src/tree-grid/stories/index.js +0 -106
@@ -0,0 +1,109 @@
1
+ /// <reference types="react" />
2
+ export declare type TreeGridRowProps = {
3
+ /**
4
+ * The children to be rendered in the row.
5
+ */
6
+ children: React.ReactNode;
7
+ /**
8
+ * An integer value designating the level in the hierarchical tree structure.
9
+ * Counting starts at 1. A value of `1` indicates the root level of the structure.
10
+ */
11
+ level: NonNullable<React.AriaAttributes['aria-level']>;
12
+ /**
13
+ * An integer value that represents the position in the set.
14
+ * A set is the count of elements at a specific level. Counting starts at 1.
15
+ */
16
+ positionInSet: NonNullable<React.AriaAttributes['aria-posinset']>;
17
+ /**
18
+ * An integer value that represents the total number of items in the set,
19
+ * at this specific level of the hierarchy.
20
+ */
21
+ setSize: NonNullable<React.AriaAttributes['aria-setsize']>;
22
+ /**
23
+ * An optional value that designates whether a row is expanded or collapsed.
24
+ * Currently this value only sets the correct aria-expanded property on a row,
25
+ * it has no other built-in behavior.
26
+ */
27
+ isExpanded?: boolean;
28
+ };
29
+ declare type RovingTabIndexItemPassThruProps = {
30
+ ref: React.ForwardedRef<any>;
31
+ tabIndex?: number;
32
+ onFocus: React.FocusEventHandler<any>;
33
+ [key: string]: any;
34
+ };
35
+ export declare type RovingTabIndexItemProps = {
36
+ /**
37
+ * A render function that receives the props necessary to make it participate in the
38
+ * roving tabindex. Any extra props will also be passed through to this function.
39
+ *
40
+ * Props passed as an argument to the render prop must be passed to the child
41
+ * focusable component/element within the cell. If a component is used, it must
42
+ * correctly handle the `onFocus`, `tabIndex`, and `ref` props, passing these to the
43
+ * element it renders. These props are used to handle the roving tabindex functionality
44
+ * of the tree grid.
45
+ *
46
+ * ```jsx
47
+ * <TreeGridCell>
48
+ * { ( props ) => (
49
+ * <Button onClick={ doSomething } { ...props }>
50
+ * Do something
51
+ * </Button>
52
+ * ) }
53
+ * </TreeGridCell>
54
+ * ```
55
+ */
56
+ children?: (props: RovingTabIndexItemPassThruProps) => JSX.Element;
57
+ /**
58
+ * If `children` is not a function, this component will be used instead.
59
+ */
60
+ as?: React.ComponentType<RovingTabIndexItemPassThruProps>;
61
+ [key: string]: any;
62
+ };
63
+ export declare type TreeGridCellProps = ({
64
+ /**
65
+ * Render `children` without wrapping it in a `TreeGridItem` component.
66
+ * This means that `children` will not participate in the roving tabindex.
67
+ *
68
+ * @default false
69
+ */
70
+ withoutGridItem?: false;
71
+ } & NonNullable<Pick<RovingTabIndexItemProps, 'children'>>) | {
72
+ children: React.ReactNode;
73
+ withoutGridItem: true;
74
+ };
75
+ export declare type TreeGridProps = {
76
+ /**
77
+ * Label to use for the element with the `application` role.
78
+ */
79
+ applicationAriaLabel?: string;
80
+ /**
81
+ * The children to be rendered in the tree grid.
82
+ */
83
+ children: React.ReactNode;
84
+ /**
85
+ * Callback to fire when row is expanded.
86
+ *
87
+ * @default noop
88
+ */
89
+ onExpandRow?: (row: HTMLElement) => void;
90
+ /**
91
+ * Callback to fire when row is collapsed.
92
+ *
93
+ * @default noop
94
+ */
95
+ onCollapseRow?: (row: HTMLElement) => void;
96
+ /**
97
+ * Callback that fires when focus is shifted from one row to another via
98
+ * the Up and Down keys. Callback is also fired on Home and End keys which
99
+ * move focus from the beginning row to the end row.
100
+ *
101
+ * The callback is passed the event, the start row element that the focus was on
102
+ * originally, and the destination row element after the focus has moved.
103
+ *
104
+ * @default noop
105
+ */
106
+ onFocusRow?: (event: React.KeyboardEvent<HTMLTableElement>, startRow: HTMLElement, destinationRow: HTMLElement) => void;
107
+ };
108
+ export {};
109
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tree-grid/types.ts"],"names":[],"mappings":";AAAA,oBAAY,gBAAgB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,KAAK,EAAE,WAAW,CAAE,KAAK,CAAC,cAAc,CAAE,YAAY,CAAE,CAAE,CAAC;IAC3D;;;OAGG;IACH,aAAa,EAAE,WAAW,CAAE,KAAK,CAAC,cAAc,CAAE,eAAe,CAAE,CAAE,CAAC;IACtE;;;OAGG;IACH,OAAO,EAAE,WAAW,CAAE,KAAK,CAAC,cAAc,CAAE,cAAc,CAAE,CAAE,CAAC;IAC/D;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,aAAK,+BAA+B,GAAG;IACtC,GAAG,EAAE,KAAK,CAAC,YAAY,CAAE,GAAG,CAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAE,GAAG,CAAE,CAAC;IACxC,CAAE,GAAG,EAAE,MAAM,GAAI,GAAG,CAAC;CACrB,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IACrC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,+BAA+B,KAAM,GAAG,CAAC,OAAO,CAAC;IACrE;;OAEG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,+BAA+B,CAAE,CAAC;IAC5D,CAAE,GAAG,EAAE,MAAM,GAAI,GAAG,CAAC;CACrB,CAAC;AAEF,oBAAY,iBAAiB,GAC1B,CAAE;IACF;;;;;OAKG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC;CACvB,GAAG,WAAW,CAAE,IAAI,CAAE,uBAAuB,EAAE,UAAU,CAAE,CAAE,CAAE,GAChE;IACA,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,EAAE,IAAI,CAAC;CACrB,CAAC;AAEL,oBAAY,aAAa,GAAG;IAC3B;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAE,GAAG,EAAE,WAAW,KAAM,IAAI,CAAC;IAC3C;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAE,GAAG,EAAE,WAAW,KAAM,IAAI,CAAC;IAC7C;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,CACZ,KAAK,EAAE,KAAK,CAAC,aAAa,CAAE,gBAAgB,CAAE,EAC9C,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,WAAW,KACvB,IAAI,CAAC;CACV,CAAC"}
@@ -8,8 +8,8 @@ declare type AcceptsTwoArgs<F extends (...args: any) => any, ErrorMessage = neve
8
8
  * Forwards ref (React.ForwardRef) and "Connects" (or registers) a component
9
9
  * within the Context system under a specified namespace.
10
10
  *
11
- * @param Component The component to register into the Context system.
12
- * @param namespace The namespace to register the component under.
11
+ * @param Component The component to register into the Context system.
12
+ * @param namespace The namespace to register the component under.
13
13
  * @return The connected WordPressComponent
14
14
  */
15
15
  export declare function contextConnect<C extends (props: any, ref: ForwardedRef<any>) => JSX.Element | null>(Component: C & AcceptsTwoArgs<C, 'Warning: Your component function does not take a ref as the second argument. Did you mean to use `contextConnectWithoutRef`?'>, namespace: string): WordPressComponentFromProps<Parameters<C & AcceptsTwoArgs<C, "Warning: Your component function does not take a ref as the second argument. Did you mean to use `contextConnectWithoutRef`?">>[0], true>;
@@ -17,23 +17,23 @@ export declare function contextConnect<C extends (props: any, ref: ForwardedRef<
17
17
  * "Connects" (or registers) a component within the Context system under a specified namespace.
18
18
  * Does not forward a ref.
19
19
  *
20
- * @param Component The component to register into the Context system.
21
- * @param namespace The namespace to register the component under.
20
+ * @param Component The component to register into the Context system.
21
+ * @param namespace The namespace to register the component under.
22
22
  * @return The connected WordPressComponent
23
23
  */
24
24
  export declare function contextConnectWithoutRef<P>(Component: (props: P) => JSX.Element | null, namespace: string): WordPressComponentFromProps<P, false>;
25
25
  /**
26
26
  * Attempts to retrieve the connected namespace from a component.
27
27
  *
28
- * @param Component The component to retrieve a namespace from.
28
+ * @param Component The component to retrieve a namespace from.
29
29
  * @return The connected namespaces.
30
30
  */
31
31
  export declare function getConnectNamespace(Component: ReactChild | undefined | {}): string[];
32
32
  /**
33
33
  * Checks to see if a component is connected within the Context system.
34
34
  *
35
- * @param Component The component to retrieve a namespace from.
36
- * @param match The namespace to check.
35
+ * @param Component The component to retrieve a namespace from.
36
+ * @param match The namespace to check.
37
37
  */
38
38
  export declare function hasConnectNamespace(Component: ReactNode, match: string[] | string): boolean;
39
39
  export {};
@@ -2,7 +2,7 @@ import memoize from 'memize';
2
2
  /**
3
3
  * Generates the connected component CSS className based on the namespace.
4
4
  *
5
- * @param namespace The name of the connected component.
5
+ * @param namespace The name of the connected component.
6
6
  * @return The generated CSS className.
7
7
  */
8
8
  declare function getStyledClassName(namespace: string): string;
@@ -5,7 +5,7 @@ import type { ReactNode, ReactChild, ReactFragment, ReactPortal } from 'react';
5
5
  /**
6
6
  * Gets a collection of available children elements from a React component's children prop.
7
7
  *
8
- * @param children
8
+ * @param children
9
9
  *
10
10
  * @return An array of available children.
11
11
  */
@@ -17,7 +17,7 @@ export declare type SpaceInput = number | string;
17
17
  * When given a unit value or one of the named CSS values like `auto`,
18
18
  * it will simply return the value back.
19
19
  *
20
- * @param value A number, numeric string, or a unit value.
20
+ * @param value A number, numeric string, or a unit value.
21
21
  */
22
22
  export declare function space(value?: SpaceInput): string | undefined;
23
23
  //# sourceMappingURL=space.d.ts.map
@@ -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" | "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>>;
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" | "hideHTMLArrows" | "isShiftStepEnabled" | "shiftStep" | "disableUnits" | "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
@@ -18,9 +18,9 @@ export declare const DEFAULT_UNIT: WPUnitControlUnit;
18
18
  * Moving forward, ideally the value should be a string that contains both
19
19
  * the value and unit, example: '10px'
20
20
  *
21
- * @param rawValue The raw value as a string (may or may not contain the unit)
22
- * @param fallbackUnit The unit used as a fallback, if not unit is detected in the `value`
23
- * @param allowedUnits Units to derive from.
21
+ * @param rawValue The raw value as a string (may or may not contain the unit)
22
+ * @param fallbackUnit The unit used as a fallback, if not unit is detected in the `value`
23
+ * @param allowedUnits Units to derive from.
24
24
  * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value
25
25
  * could not be parsed to a number correctly. The unit can be `undefined` in case the unit parse
26
26
  * from the raw value could not be matched against the list of allowed units.
@@ -29,7 +29,7 @@ export declare function getParsedQuantityAndUnit(rawValue?: string | number, fal
29
29
  /**
30
30
  * Checks if units are defined.
31
31
  *
32
- * @param units List of units.
32
+ * @param units List of units.
33
33
  * @return Whether the list actually contains any units.
34
34
  */
35
35
  export declare function hasUnits(units?: WPUnitControlUnit[]): units is WPUnitControlUnit[];
@@ -37,8 +37,8 @@ export declare function hasUnits(units?: WPUnitControlUnit[]): units is WPUnitCo
37
37
  * Parses a quantity and unit from a raw string value, given a list of allowed
38
38
  * units and otherwise falling back to the default unit.
39
39
  *
40
- * @param rawValue The raw value as a string (may or may not contain the unit)
41
- * @param allowedUnits Units to derive from.
40
+ * @param rawValue The raw value as a string (may or may not contain the unit)
41
+ * @param allowedUnits Units to derive from.
42
42
  * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value
43
43
  * could not be parsed to a number correctly. The unit can be `undefined` in case the unit parsed
44
44
  * from the raw value could not be matched against the list of allowed units.
@@ -48,10 +48,10 @@ export declare function parseQuantityAndUnitFromRawValue(rawValue?: string | num
48
48
  * Parses quantity and unit from a raw value. Validates parsed value, using fallback
49
49
  * value if invalid.
50
50
  *
51
- * @param rawValue The next value.
52
- * @param allowedUnits Units to derive from.
53
- * @param fallbackQuantity The fallback quantity, used in case it's not possible to parse a valid quantity from the raw value.
54
- * @param fallbackUnit The fallback unit, used in case it's not possible to parse a valid unit from the raw value.
51
+ * @param rawValue The next value.
52
+ * @param allowedUnits Units to derive from.
53
+ * @param fallbackQuantity The fallback quantity, used in case it's not possible to parse a valid quantity from the raw value.
54
+ * @param fallbackUnit The fallback unit, used in case it's not possible to parse a valid unit from the raw value.
55
55
  * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value
56
56
  * could not be parsed to a number correctly, and the `fallbackQuantity` was also `undefined`. The
57
57
  * unit can be `undefined` only if the unit parsed from the raw value could not be matched against
@@ -63,15 +63,15 @@ export declare function getValidParsedQuantityAndUnit(rawValue: string | number,
63
63
  * Takes a unit value and finds the matching accessibility label for the
64
64
  * unit abbreviation.
65
65
  *
66
- * @param unit Unit value (example: `px`)
66
+ * @param unit Unit value (example: `px`)
67
67
  * @return a11y label for the unit abbreviation
68
68
  */
69
69
  export declare function getAccessibleLabelForUnit(unit: string): string | undefined;
70
70
  /**
71
71
  * Filters available units based on values defined a list of allowed unit values.
72
72
  *
73
- * @param allowedUnitValues Collection of allowed unit value strings.
74
- * @param availableUnits Collection of available unit objects.
73
+ * @param allowedUnitValues Collection of allowed unit value strings.
74
+ * @param availableUnits Collection of available unit objects.
75
75
  * @return Filtered units.
76
76
  */
77
77
  export declare function filterUnitsWithSettings(allowedUnitValues: string[] | undefined, availableUnits: WPUnitControlUnit[]): WPUnitControlUnit[];
@@ -80,10 +80,10 @@ export declare function filterUnitsWithSettings(allowedUnitValues: string[] | un
80
80
  * TODO: ideally this hook shouldn't be needed
81
81
  * https://github.com/WordPress/gutenberg/pull/31822#discussion_r633280823
82
82
  *
83
- * @param args An object containing units, settingPath & defaultUnits.
84
- * @param args.units Collection of all potentially available units.
85
- * @param args.availableUnits Collection of unit value strings for filtering available units.
86
- * @param args.defaultValues Collection of default values for defined units. Example: `{ px: 350, em: 15 }`.
83
+ * @param args An object containing units, settingPath & defaultUnits.
84
+ * @param args.units Collection of all potentially available units.
85
+ * @param args.availableUnits Collection of unit value strings for filtering available units.
86
+ * @param args.defaultValues Collection of default values for defined units. Example: `{ px: 350, em: 15 }`.
87
87
  *
88
88
  * @return Filtered list of units, with their default values updated following the `defaultValues`
89
89
  * argument's property.
@@ -101,9 +101,9 @@ export declare const useCustomUnits: ({ units, availableUnits, defaultValues, }:
101
101
  * accurately displayed in the UI, even if the intention is to hide
102
102
  * the availability of that unit.
103
103
  *
104
- * @param rawValue Selected value to parse.
105
- * @param legacyUnit Legacy unit value, if rawValue needs it appended.
106
- * @param units List of available units.
104
+ * @param rawValue Selected value to parse.
105
+ * @param legacyUnit Legacy unit value, if rawValue needs it appended.
106
+ * @param units List of available units.
107
107
  *
108
108
  * @return A collection of units containing the unit for the current value.
109
109
  */
@@ -3,8 +3,8 @@ declare type EventHandler<T extends Event> = (event: T) => void;
3
3
  * Merges two sets of event handlers together.
4
4
  *
5
5
  * @template TEvent
6
- * @param handlers
7
- * @param extraHandlers
6
+ * @param handlers
7
+ * @param extraHandlers
8
8
  */
9
9
  export declare function mergeEventHandlers<TEvent extends Event, TLeft extends Record<string, EventHandler<TEvent>>, TRight extends Record<string, EventHandler<TEvent>>>(handlers: TLeft, extraHandlers: TRight): TLeft & TRight;
10
10
  export {};
@@ -3,7 +3,7 @@ export type Options<T> = {
3
3
  /**
4
4
  * Initial value
5
5
  */
6
- initial: T | undefined;
6
+ initial?: T | undefined;
7
7
  /**
8
8
  * Fallback value
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"use-controlled-state.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/use-controlled-state.js"],"names":[],"mappings":";;;;;aAac,CAAC,GAAG,SAAS;;;;cACb,CAAC,GAAG,EAAE;;AAapB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,kIAFuC,IAAI,EAmC1C"}
1
+ {"version":3,"file":"use-controlled-state.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/use-controlled-state.js"],"names":[],"mappings":";;;;;;;;;cAcc,CAAC,GAAG,EAAE;;AAapB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,kIAFuC,IAAI,EAmC1C"}
@@ -7,10 +7,10 @@ declare type Props<T> = {
7
7
  /**
8
8
  * Simplified and improved implementation of useControlledState.
9
9
  *
10
- * @param props
11
- * @param props.defaultValue
12
- * @param props.value
13
- * @param props.onChange
10
+ * @param props
11
+ * @param props.defaultValue
12
+ * @param props.value
13
+ * @param props.onChange
14
14
  * @return The controlled value and the value setter.
15
15
  */
16
16
  export declare function useControlledValue<T>({ defaultValue, onChange, value: valueProp, }: Props<T>): readonly [T | undefined, import("react").Dispatch<import("react").SetStateAction<T | undefined>>];
@@ -8,7 +8,7 @@ import type { RefObject } from 'react';
8
8
  *
9
9
  * @see https://codesandbox.io/s/uselatestref-mlj3i?file=/src/App.tsx
10
10
  *
11
- * @param value The value to reference
11
+ * @param value The value to reference
12
12
  * @return The prop reference.
13
13
  */
14
14
  export declare function useLatestRef<T>(value: T): RefObject<T>;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Parses a number and unit from a value.
3
3
  *
4
- * @param toParse Value to parse
4
+ * @param toParse Value to parse
5
5
  *
6
6
  * @return The extracted number and unit.
7
7
  */
@@ -9,8 +9,8 @@ export declare function parseCSSUnitValue(toParse: string): [number | undefined,
9
9
  /**
10
10
  * Combines a value and a unit into a unit value.
11
11
  *
12
- * @param value
13
- * @param unit
12
+ * @param value
13
+ * @param unit
14
14
  *
15
15
  * @return The unit value.
16
16
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "23.3.2",
3
+ "version": "23.4.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -38,23 +38,23 @@
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.26.1",
42
- "@wordpress/compose": "^6.3.2",
43
- "@wordpress/date": "^4.26.2",
44
- "@wordpress/deprecated": "^3.26.1",
45
- "@wordpress/dom": "^3.26.1",
46
- "@wordpress/element": "^5.3.1",
47
- "@wordpress/escape-html": "^2.26.1",
48
- "@wordpress/hooks": "^3.26.1",
49
- "@wordpress/html-entities": "^3.26.1",
50
- "@wordpress/i18n": "^4.26.1",
51
- "@wordpress/icons": "^9.17.1",
52
- "@wordpress/is-shallow-equal": "^4.26.1",
53
- "@wordpress/keycodes": "^3.26.2",
54
- "@wordpress/primitives": "^3.24.1",
55
- "@wordpress/private-apis": "^0.8.1",
56
- "@wordpress/rich-text": "^6.3.2",
57
- "@wordpress/warning": "^2.26.1",
41
+ "@wordpress/a11y": "^3.27.0",
42
+ "@wordpress/compose": "^6.4.0",
43
+ "@wordpress/date": "^4.27.0",
44
+ "@wordpress/deprecated": "^3.27.0",
45
+ "@wordpress/dom": "^3.27.0",
46
+ "@wordpress/element": "^5.4.0",
47
+ "@wordpress/escape-html": "^2.27.0",
48
+ "@wordpress/hooks": "^3.27.0",
49
+ "@wordpress/html-entities": "^3.27.0",
50
+ "@wordpress/i18n": "^4.27.0",
51
+ "@wordpress/icons": "^9.18.0",
52
+ "@wordpress/is-shallow-equal": "^4.27.0",
53
+ "@wordpress/keycodes": "^3.27.0",
54
+ "@wordpress/primitives": "^3.25.0",
55
+ "@wordpress/private-apis": "^0.9.0",
56
+ "@wordpress/rich-text": "^6.4.0",
57
+ "@wordpress/warning": "^2.27.0",
58
58
  "change-case": "^4.1.2",
59
59
  "classnames": "^2.3.1",
60
60
  "colord": "^2.7.0",
@@ -83,5 +83,5 @@
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  },
86
- "gitHead": "1bf01c01a8238ce3a681ad1e517f86033818b78d"
86
+ "gitHead": "c25ff895413bad4354c55c0c2d732552618b0d56"
87
87
  }
@@ -33,7 +33,7 @@ export const ALIGNMENTS = GRID.flat();
33
33
  /**
34
34
  * Parses and transforms an incoming value to better match the alignment values
35
35
  *
36
- * @param value An alignment value to parse.
36
+ * @param value An alignment value to parse.
37
37
  *
38
38
  * @return The parsed value.
39
39
  */
@@ -46,8 +46,8 @@ export function transformValue( value: AlignmentMatrixControlValue ) {
46
46
  /**
47
47
  * Creates an item ID based on a prefix ID and an alignment value.
48
48
  *
49
- * @param prefixId An ID to prefix.
50
- * @param value An alignment value.
49
+ * @param prefixId An ID to prefix.
50
+ * @param value An alignment value.
51
51
  *
52
52
  * @return The item id.
53
53
  */
@@ -63,7 +63,7 @@ export function getItemId(
63
63
  /**
64
64
  * Retrieves the alignment index from a value.
65
65
  *
66
- * @param alignment Value to check.
66
+ * @param alignment Value to check.
67
67
  *
68
68
  * @return The index of a matching alignment.
69
69
  */
@@ -1,6 +1,6 @@
1
1
  # AnglePickerControl
2
2
 
3
- AnglePickerControl is a React component to render a UI that allows users to pick an angle.
3
+ `AnglePickerControl` is a React component to render a UI that allows users to pick an angle.
4
4
  Users can choose an angle in a visual UI with the mouse by dragging an angle indicator inside a circle or by directly inserting the desired angle in a text field.
5
5
 
6
6
  ## Usage
@@ -9,9 +9,15 @@ Users can choose an angle in a visual UI with the mouse by dragging an angle ind
9
9
  import { useState } from '@wordpress/element';
10
10
  import { AnglePickerControl } from '@wordpress/components';
11
11
 
12
- const MyAnglePicker = () => {
13
- const [ angle, setAngle ] = useState();
14
- return <AnglePickerControl value={ angle } onChange={ setAngle } __nextHasNoMarginBottom />;
12
+ function Example() {
13
+ const [ angle, setAngle ] = useState( 0 );
14
+ return (
15
+ <AnglePickerControl
16
+ value={ angle }
17
+ onChange={ setAngle }
18
+ __nextHasNoMarginBottom
19
+ />
20
+ );
15
21
  };
16
22
  ```
17
23
 
@@ -19,31 +25,28 @@ const MyAnglePicker = () => {
19
25
 
20
26
  The component accepts the following props.
21
27
 
22
- ### label
28
+ ### `label`: `string`
23
29
 
24
- Label to use for the angle picker. If not set the a translated label "Angle" is used.
30
+ Label to use for the angle picker.
25
31
 
26
- - Type: `String`
27
32
  - Required: No
33
+ - Default: `__( 'Angle' )`
28
34
 
29
- ### value
35
+ ### `value`: `number | string`
30
36
 
31
37
  The current value of the input. The value represents an angle in degrees and should be a value between 0 and 360.
32
38
 
33
- - Type: `Number`
34
39
  - Required: Yes
35
40
 
36
- ### onChange
41
+ ### `onChange`: `( value: number ) => void`
37
42
 
38
43
  A function that receives the new value of the input.
39
44
 
40
- - Type: `function`
41
45
  - Required: Yes
42
46
 
43
- ### __nextHasNoMarginBottom
47
+ ### `__nextHasNoMarginBottom`: `boolean`
44
48
 
45
49
  Start opting into the new margin-free styles that will become the default in a future version, currently scheduled to be WordPress 6.4. (The prop can be safely removed once this happens.)
46
50
 
47
- - Type: `boolean`
48
51
  - Required: No
49
- - Default: `false`
52
+ - Default: `false`
@@ -13,12 +13,29 @@ import {
13
13
  CircleIndicator,
14
14
  } from './styles/angle-picker-control-styles';
15
15
 
16
- function AngleCircle( { value, onChange, ...props } ) {
17
- const angleCircleRef = useRef();
18
- const angleCircleCenter = useRef();
19
- const previousCursorValue = useRef();
16
+ import type { WordPressComponentProps } from '../ui/context';
17
+ import type { AngleCircleProps } from './types';
18
+
19
+ type UseDraggingArgumentType = Parameters< typeof useDragging >[ 0 ];
20
+ type UseDraggingCallbackEvent =
21
+ | Parameters< UseDraggingArgumentType[ 'onDragStart' ] >[ 0 ]
22
+ | Parameters< UseDraggingArgumentType[ 'onDragMove' ] >[ 0 ]
23
+ | Parameters< UseDraggingArgumentType[ 'onDragEnd' ] >[ 0 ];
24
+
25
+ function AngleCircle( {
26
+ value,
27
+ onChange,
28
+ ...props
29
+ }: WordPressComponentProps< AngleCircleProps, 'div' > ) {
30
+ const angleCircleRef = useRef< HTMLDivElement | null >( null );
31
+ const angleCircleCenter = useRef< { x: number; y: number } | undefined >();
32
+ const previousCursorValue = useRef< CSSStyleDeclaration[ 'cursor' ] >();
20
33
 
21
34
  const setAngleCircleCenter = () => {
35
+ if ( angleCircleRef.current === null ) {
36
+ return;
37
+ }
38
+
22
39
  const rect = angleCircleRef.current.getBoundingClientRect();
23
40
  angleCircleCenter.current = {
24
41
  x: rect.x + rect.width / 2,
@@ -26,14 +43,26 @@ function AngleCircle( { value, onChange, ...props } ) {
26
43
  };
27
44
  };
28
45
 
29
- const changeAngleToPosition = ( event ) => {
30
- const { x: centerX, y: centerY } = angleCircleCenter.current;
46
+ const changeAngleToPosition = ( event: UseDraggingCallbackEvent ) => {
47
+ if ( event === undefined ) {
48
+ return;
49
+ }
50
+
31
51
  // Prevent (drag) mouse events from selecting and accidentally
32
52
  // triggering actions from other elements.
33
53
  event.preventDefault();
34
54
  // Input control needs to lose focus and by preventDefault above, it doesn't.
35
- event.target.focus();
36
- onChange( getAngle( centerX, centerY, event.clientX, event.clientY ) );
55
+ ( event.target as HTMLDivElement | null )?.focus();
56
+
57
+ if (
58
+ angleCircleCenter.current !== undefined &&
59
+ onChange !== undefined
60
+ ) {
61
+ const { x: centerX, y: centerY } = angleCircleCenter.current;
62
+ onChange(
63
+ getAngle( centerX, centerY, event.clientX, event.clientY )
64
+ );
65
+ }
37
66
  };
38
67
 
39
68
  const { startDrag, isDragging } = useDragging( {
@@ -52,13 +81,12 @@ function AngleCircle( { value, onChange, ...props } ) {
52
81
  }
53
82
  document.body.style.cursor = 'grabbing';
54
83
  } else {
55
- document.body.style.cursor = previousCursorValue.current || null;
84
+ document.body.style.cursor = previousCursorValue.current || '';
56
85
  previousCursorValue.current = undefined;
57
86
  }
58
87
  }, [ isDragging ] );
59
88
 
60
89
  return (
61
- /* eslint-disable jsx-a11y/no-static-element-interactions */
62
90
  <CircleRoot
63
91
  ref={ angleCircleRef }
64
92
  onMouseDown={ startDrag }
@@ -76,11 +104,15 @@ function AngleCircle( { value, onChange, ...props } ) {
76
104
  <CircleIndicator className="components-angle-picker-control__angle-circle-indicator" />
77
105
  </CircleIndicatorWrapper>
78
106
  </CircleRoot>
79
- /* eslint-enable jsx-a11y/no-static-element-interactions */
80
107
  );
81
108
  }
82
109
 
83
- function getAngle( centerX, centerY, pointX, pointY ) {
110
+ function getAngle(
111
+ centerX: number,
112
+ centerY: number,
113
+ pointX: number,
114
+ pointY: number
115
+ ) {
84
116
  const y = pointY - centerY;
85
117
  const x = pointX - centerX;
86
118