@wordpress/components 28.6.0 → 28.8.1-next.1f6eadc42.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 (652) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/CONTRIBUTING.md +42 -19
  3. package/build/alignment-matrix-control/cell.js +4 -7
  4. package/build/alignment-matrix-control/cell.js.map +1 -1
  5. package/build/alignment-matrix-control/icon.js +31 -19
  6. package/build/alignment-matrix-control/icon.js.map +1 -1
  7. package/build/alignment-matrix-control/index.js +55 -51
  8. package/build/alignment-matrix-control/index.js.map +1 -1
  9. package/build/alignment-matrix-control/styles.js +73 -0
  10. package/build/alignment-matrix-control/styles.js.map +1 -0
  11. package/build/alignment-matrix-control/types.js.map +1 -1
  12. package/build/angle-picker-control/angle-circle.js +9 -9
  13. package/build/angle-picker-control/angle-circle.js.map +1 -1
  14. package/build/border-control/border-control/component.js +18 -13
  15. package/build/border-control/border-control/component.js.map +1 -1
  16. package/build/box-control/utils.js +1 -1
  17. package/build/box-control/utils.js.map +1 -1
  18. package/build/circular-option-picker/circular-option-picker-option.js +15 -9
  19. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  20. package/build/circular-option-picker/circular-option-picker.js +15 -12
  21. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  22. package/build/circular-option-picker/types.js.map +1 -1
  23. package/build/clipboard-button/index.js +6 -6
  24. package/build/clipboard-button/index.js.map +1 -1
  25. package/build/color-palette/utils.js +1 -2
  26. package/build/color-palette/utils.js.map +1 -1
  27. package/build/color-picker/color-copy-button.js +8 -8
  28. package/build/color-picker/color-copy-button.js.map +1 -1
  29. package/build/color-picker/hex-input.js +8 -8
  30. package/build/color-picker/hex-input.js.map +1 -1
  31. package/build/color-picker/input-with-slider.js +8 -8
  32. package/build/color-picker/input-with-slider.js.map +1 -1
  33. package/build/color-picker/styles.js +8 -8
  34. package/build/color-picker/styles.js.map +1 -1
  35. package/build/combobox-control/types.js.map +1 -1
  36. package/build/composite/context.js +1 -1
  37. package/build/composite/context.js.map +1 -1
  38. package/build/composite/group-label.js +33 -0
  39. package/build/composite/group-label.js.map +1 -0
  40. package/build/composite/group.js +33 -0
  41. package/build/composite/group.js.map +1 -0
  42. package/build/composite/hover.js +33 -0
  43. package/build/composite/hover.js.map +1 -0
  44. package/build/composite/index.js +63 -118
  45. package/build/composite/index.js.map +1 -1
  46. package/build/composite/item.js +33 -0
  47. package/build/composite/item.js.map +1 -0
  48. package/build/composite/legacy/index.js +59 -7
  49. package/build/composite/legacy/index.js.map +1 -1
  50. package/build/composite/row.js +33 -0
  51. package/build/composite/row.js.map +1 -0
  52. package/build/composite/typeahead.js +33 -0
  53. package/build/composite/typeahead.js.map +1 -0
  54. package/build/composite/types.js.map +1 -1
  55. package/build/custom-gradient-picker/gradient-bar/control-points.js +8 -8
  56. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  57. package/build/custom-select-control-v2/styles.js +12 -14
  58. package/build/custom-select-control-v2/styles.js.map +1 -1
  59. package/build/date-time/date/index.js +1 -1
  60. package/build/date-time/date/index.js.map +1 -1
  61. package/build/date-time/date/styles.js +37 -26
  62. package/build/date-time/date/styles.js.map +1 -1
  63. package/build/date-time/date/use-lilius/index.js +163 -0
  64. package/build/date-time/date/use-lilius/index.js.map +1 -0
  65. package/build/date-time/time/time-input/index.js +17 -19
  66. package/build/date-time/time/time-input/index.js.map +1 -1
  67. package/build/dimension-control/index.js +6 -1
  68. package/build/dimension-control/index.js.map +1 -1
  69. package/build/draggable/index.js +4 -4
  70. package/build/draggable/index.js.map +1 -1
  71. package/build/dropdown-menu-v2/checkbox-item.js +69 -0
  72. package/build/dropdown-menu-v2/checkbox-item.js.map +1 -0
  73. package/build/dropdown-menu-v2/context.js +17 -0
  74. package/build/dropdown-menu-v2/context.js.map +1 -0
  75. package/build/dropdown-menu-v2/group-label.js +40 -0
  76. package/build/dropdown-menu-v2/group-label.js.map +1 -0
  77. package/build/dropdown-menu-v2/group.js +29 -0
  78. package/build/dropdown-menu-v2/group.js.map +1 -0
  79. package/build/dropdown-menu-v2/index.js +58 -146
  80. package/build/dropdown-menu-v2/index.js.map +1 -1
  81. package/build/dropdown-menu-v2/item-help-text.js +27 -0
  82. package/build/dropdown-menu-v2/item-help-text.js.map +1 -0
  83. package/build/dropdown-menu-v2/item-label.js +27 -0
  84. package/build/dropdown-menu-v2/item-label.js.map +1 -0
  85. package/build/dropdown-menu-v2/item.js +53 -0
  86. package/build/dropdown-menu-v2/item.js.map +1 -0
  87. package/build/dropdown-menu-v2/radio-item.js +79 -0
  88. package/build/dropdown-menu-v2/radio-item.js.map +1 -0
  89. package/build/dropdown-menu-v2/separator.js +30 -0
  90. package/build/dropdown-menu-v2/separator.js.map +1 -0
  91. package/build/dropdown-menu-v2/styles.js +54 -78
  92. package/build/dropdown-menu-v2/styles.js.map +1 -1
  93. package/build/dropdown-menu-v2/types.js.map +1 -1
  94. package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js +27 -0
  95. package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +1 -0
  96. package/build/focal-point-picker/styles/focal-point-style.js +7 -2
  97. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  98. package/build/form-token-field/types.js.map +1 -1
  99. package/build/index.js +13 -0
  100. package/build/index.js.map +1 -1
  101. package/build/input-control/index.js +2 -2
  102. package/build/input-control/index.js.map +1 -1
  103. package/build/input-control/input-base.js +5 -10
  104. package/build/input-control/input-base.js.map +1 -1
  105. package/build/input-control/input-prefix-wrapper.js +3 -3
  106. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  107. package/build/input-control/input-suffix-wrapper.js +2 -3
  108. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  109. package/build/input-control/reducer/reducer.js +8 -8
  110. package/build/input-control/reducer/reducer.js.map +1 -1
  111. package/build/input-control/styles/input-control-styles.js +75 -45
  112. package/build/input-control/styles/input-control-styles.js.map +1 -1
  113. package/build/input-control/types.js.map +1 -1
  114. package/build/input-control/utils.js +3 -3
  115. package/build/input-control/utils.js.map +1 -1
  116. package/build/item-group/styles.js +10 -10
  117. package/build/item-group/styles.js.map +1 -1
  118. package/build/modal/index.js +16 -9
  119. package/build/modal/index.js.map +1 -1
  120. package/build/navigation/index.js +4 -4
  121. package/build/navigation/index.js.map +1 -1
  122. package/build/navigation/styles/navigation-styles.js +13 -13
  123. package/build/navigation/styles/navigation-styles.js.map +1 -1
  124. package/build/navigator/index.js +12 -13
  125. package/build/navigator/index.js.map +1 -1
  126. package/build/navigator/navigator-back-button/hook.js +2 -2
  127. package/build/navigator/navigator-back-button/hook.js.map +1 -1
  128. package/build/navigator/navigator-button/hook.js +2 -2
  129. package/build/navigator/navigator-button/hook.js.map +1 -1
  130. package/build/navigator/navigator-provider/component.js +99 -67
  131. package/build/navigator/navigator-provider/component.js.map +1 -1
  132. package/build/navigator/navigator-screen/component.js +5 -0
  133. package/build/navigator/navigator-screen/component.js.map +1 -1
  134. package/build/navigator/navigator-to-parent-button/component.js +2 -2
  135. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  136. package/build/navigator/types.js.map +1 -1
  137. package/build/navigator/use-navigator.js +1 -2
  138. package/build/navigator/use-navigator.js.map +1 -1
  139. package/build/palette-edit/index.js +2 -2
  140. package/build/palette-edit/index.js.map +1 -1
  141. package/build/private-apis.js +1 -14
  142. package/build/private-apis.js.map +1 -1
  143. package/build/range-control/styles/range-control-styles.js +30 -30
  144. package/build/range-control/styles/range-control-styles.js.map +1 -1
  145. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
  146. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  147. package/build/select-control/styles/select-control-styles.js +12 -12
  148. package/build/select-control/styles/select-control-styles.js.map +1 -1
  149. package/build/slot-fill/bubbles-virtually/fill.js +4 -4
  150. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  151. package/build/slot-fill/index.js +1 -0
  152. package/build/slot-fill/index.js.map +1 -1
  153. package/build/snackbar/index.js +4 -4
  154. package/build/snackbar/index.js.map +1 -1
  155. package/build/tabs/index.js +4 -4
  156. package/build/tabs/index.js.map +1 -1
  157. package/build/tabs/styles.js +3 -3
  158. package/build/tabs/styles.js.map +1 -1
  159. package/build/tabs/tablist.js +5 -4
  160. package/build/tabs/tablist.js.map +1 -1
  161. package/build/toggle-group-control/toggle-group-control/utils.js +6 -6
  162. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  163. package/build/tools-panel/tools-panel/hook.js +6 -6
  164. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  165. package/build/unit-control/styles/unit-control-styles.js +7 -7
  166. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  167. package/build/utils/config-values.js +6 -4
  168. package/build/utils/config-values.js.map +1 -1
  169. package/build/utils/element-rect.js +73 -105
  170. package/build/utils/element-rect.js.map +1 -1
  171. package/build/utils/hooks/use-update-effect.js +4 -4
  172. package/build/utils/hooks/use-update-effect.js.map +1 -1
  173. package/build-module/alignment-matrix-control/cell.js +2 -5
  174. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  175. package/build-module/alignment-matrix-control/icon.js +31 -19
  176. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  177. package/build-module/alignment-matrix-control/index.js +55 -50
  178. package/build-module/alignment-matrix-control/index.js.map +1 -1
  179. package/build-module/alignment-matrix-control/styles.js +70 -0
  180. package/build-module/alignment-matrix-control/styles.js.map +1 -0
  181. package/build-module/alignment-matrix-control/types.js.map +1 -1
  182. package/build-module/angle-picker-control/angle-circle.js +9 -9
  183. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  184. package/build-module/border-control/border-control/component.js +18 -13
  185. package/build-module/border-control/border-control/component.js.map +1 -1
  186. package/build-module/box-control/utils.js +1 -1
  187. package/build-module/box-control/utils.js.map +1 -1
  188. package/build-module/circular-option-picker/circular-option-picker-option.js +16 -10
  189. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  190. package/build-module/circular-option-picker/circular-option-picker.js +16 -13
  191. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  192. package/build-module/circular-option-picker/types.js.map +1 -1
  193. package/build-module/clipboard-button/index.js +6 -6
  194. package/build-module/clipboard-button/index.js.map +1 -1
  195. package/build-module/color-palette/utils.js +1 -2
  196. package/build-module/color-palette/utils.js.map +1 -1
  197. package/build-module/color-picker/color-copy-button.js +8 -8
  198. package/build-module/color-picker/color-copy-button.js.map +1 -1
  199. package/build-module/color-picker/hex-input.js +7 -8
  200. package/build-module/color-picker/hex-input.js.map +1 -1
  201. package/build-module/color-picker/input-with-slider.js +7 -8
  202. package/build-module/color-picker/input-with-slider.js.map +1 -1
  203. package/build-module/color-picker/styles.js +8 -8
  204. package/build-module/color-picker/styles.js.map +1 -1
  205. package/build-module/combobox-control/types.js.map +1 -1
  206. package/build-module/composite/context.js +1 -1
  207. package/build-module/composite/context.js.map +1 -1
  208. package/build-module/composite/group-label.js +25 -0
  209. package/build-module/composite/group-label.js.map +1 -0
  210. package/build-module/composite/group.js +25 -0
  211. package/build-module/composite/group.js.map +1 -0
  212. package/build-module/composite/hover.js +25 -0
  213. package/build-module/composite/hover.js.map +1 -0
  214. package/build-module/composite/index.js +64 -118
  215. package/build-module/composite/index.js.map +1 -1
  216. package/build-module/composite/item.js +25 -0
  217. package/build-module/composite/item.js.map +1 -0
  218. package/build-module/composite/legacy/index.js +57 -8
  219. package/build-module/composite/legacy/index.js.map +1 -1
  220. package/build-module/composite/row.js +25 -0
  221. package/build-module/composite/row.js.map +1 -0
  222. package/build-module/composite/typeahead.js +25 -0
  223. package/build-module/composite/typeahead.js.map +1 -0
  224. package/build-module/composite/types.js.map +1 -1
  225. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +8 -8
  226. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  227. package/build-module/custom-select-control-v2/styles.js +12 -14
  228. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  229. package/build-module/date-time/date/index.js +1 -2
  230. package/build-module/date-time/date/index.js.map +1 -1
  231. package/build-module/date-time/date/styles.js +33 -26
  232. package/build-module/date-time/date/styles.js.map +1 -1
  233. package/build-module/date-time/date/use-lilius/index.js +158 -0
  234. package/build-module/date-time/date/use-lilius/index.js.map +1 -0
  235. package/build-module/date-time/time/time-input/index.js +17 -19
  236. package/build-module/date-time/time/time-input/index.js.map +1 -1
  237. package/build-module/dimension-control/index.js +6 -1
  238. package/build-module/dimension-control/index.js.map +1 -1
  239. package/build-module/draggable/index.js +4 -4
  240. package/build-module/draggable/index.js.map +1 -1
  241. package/build-module/dropdown-menu-v2/checkbox-item.js +62 -0
  242. package/build-module/dropdown-menu-v2/checkbox-item.js.map +1 -0
  243. package/build-module/dropdown-menu-v2/context.js +11 -0
  244. package/build-module/dropdown-menu-v2/context.js.map +1 -0
  245. package/build-module/dropdown-menu-v2/group-label.js +32 -0
  246. package/build-module/dropdown-menu-v2/group-label.js.map +1 -0
  247. package/build-module/dropdown-menu-v2/group.js +21 -0
  248. package/build-module/dropdown-menu-v2/group.js.map +1 -0
  249. package/build-module/dropdown-menu-v2/index.js +57 -144
  250. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  251. package/build-module/dropdown-menu-v2/item-help-text.js +19 -0
  252. package/build-module/dropdown-menu-v2/item-help-text.js.map +1 -0
  253. package/build-module/dropdown-menu-v2/item-label.js +19 -0
  254. package/build-module/dropdown-menu-v2/item-label.js.map +1 -0
  255. package/build-module/dropdown-menu-v2/item.js +46 -0
  256. package/build-module/dropdown-menu-v2/item.js.map +1 -0
  257. package/build-module/dropdown-menu-v2/radio-item.js +72 -0
  258. package/build-module/dropdown-menu-v2/radio-item.js.map +1 -0
  259. package/build-module/dropdown-menu-v2/separator.js +22 -0
  260. package/build-module/dropdown-menu-v2/separator.js.map +1 -0
  261. package/build-module/dropdown-menu-v2/styles.js +54 -78
  262. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  263. package/build-module/dropdown-menu-v2/types.js.map +1 -1
  264. package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js +20 -0
  265. package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +1 -0
  266. package/build-module/focal-point-picker/styles/focal-point-style.js +6 -2
  267. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  268. package/build-module/form-token-field/types.js.map +1 -1
  269. package/build-module/index.js +3 -1
  270. package/build-module/index.js.map +1 -1
  271. package/build-module/input-control/index.js +2 -2
  272. package/build-module/input-control/index.js.map +1 -1
  273. package/build-module/input-control/input-base.js +6 -11
  274. package/build-module/input-control/input-base.js.map +1 -1
  275. package/build-module/input-control/input-prefix-wrapper.js +4 -3
  276. package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
  277. package/build-module/input-control/input-suffix-wrapper.js +3 -3
  278. package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
  279. package/build-module/input-control/reducer/reducer.js +8 -8
  280. package/build-module/input-control/reducer/reducer.js.map +1 -1
  281. package/build-module/input-control/styles/input-control-styles.js +74 -44
  282. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  283. package/build-module/input-control/types.js.map +1 -1
  284. package/build-module/input-control/utils.js +3 -3
  285. package/build-module/input-control/utils.js.map +1 -1
  286. package/build-module/item-group/styles.js +10 -10
  287. package/build-module/item-group/styles.js.map +1 -1
  288. package/build-module/modal/index.js +17 -9
  289. package/build-module/modal/index.js.map +1 -1
  290. package/build-module/navigation/index.js +4 -4
  291. package/build-module/navigation/index.js.map +1 -1
  292. package/build-module/navigation/styles/navigation-styles.js +14 -14
  293. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  294. package/build-module/navigator/index.js +6 -6
  295. package/build-module/navigator/index.js.map +1 -1
  296. package/build-module/navigator/navigator-back-button/hook.js +1 -1
  297. package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
  298. package/build-module/navigator/navigator-button/hook.js +1 -1
  299. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  300. package/build-module/navigator/navigator-provider/component.js +99 -67
  301. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  302. package/build-module/navigator/navigator-screen/component.js +4 -0
  303. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  304. package/build-module/navigator/navigator-to-parent-button/component.js +1 -1
  305. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  306. package/build-module/navigator/types.js.map +1 -1
  307. package/build-module/navigator/use-navigator.js +1 -2
  308. package/build-module/navigator/use-navigator.js.map +1 -1
  309. package/build-module/palette-edit/index.js +2 -2
  310. package/build-module/palette-edit/index.js.map +1 -1
  311. package/build-module/private-apis.js +1 -14
  312. package/build-module/private-apis.js.map +1 -1
  313. package/build-module/range-control/styles/range-control-styles.js +31 -31
  314. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  315. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +5 -5
  316. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  317. package/build-module/select-control/styles/select-control-styles.js +13 -13
  318. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  319. package/build-module/slot-fill/bubbles-virtually/fill.js +4 -4
  320. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  321. package/build-module/slot-fill/index.js +1 -0
  322. package/build-module/slot-fill/index.js.map +1 -1
  323. package/build-module/snackbar/index.js +4 -4
  324. package/build-module/snackbar/index.js.map +1 -1
  325. package/build-module/tabs/index.js +4 -4
  326. package/build-module/tabs/index.js.map +1 -1
  327. package/build-module/tabs/styles.js +4 -4
  328. package/build-module/tabs/styles.js.map +1 -1
  329. package/build-module/tabs/tablist.js +5 -4
  330. package/build-module/tabs/tablist.js.map +1 -1
  331. package/build-module/toggle-group-control/toggle-group-control/utils.js +6 -6
  332. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  333. package/build-module/tools-panel/tools-panel/hook.js +6 -6
  334. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  335. package/build-module/unit-control/styles/unit-control-styles.js +7 -7
  336. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  337. package/build-module/utils/config-values.js +6 -4
  338. package/build-module/utils/config-values.js.map +1 -1
  339. package/build-module/utils/element-rect.js +74 -105
  340. package/build-module/utils/element-rect.js.map +1 -1
  341. package/build-module/utils/hooks/use-update-effect.js +4 -4
  342. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  343. package/build-style/style-rtl.css +12 -27
  344. package/build-style/style.css +12 -27
  345. package/build-types/alignment-matrix-control/cell.d.ts +1 -1
  346. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
  347. package/build-types/alignment-matrix-control/icon.d.ts +1 -1
  348. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
  349. package/build-types/alignment-matrix-control/index.d.ts +16 -6
  350. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  351. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  352. package/build-types/alignment-matrix-control/{styles/alignment-matrix-control-styles.d.ts → styles.d.ts} +9 -10
  353. package/build-types/alignment-matrix-control/styles.d.ts.map +1 -0
  354. package/build-types/alignment-matrix-control/types.d.ts +12 -1
  355. package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
  356. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  357. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  358. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  359. package/build-types/box-control/utils.d.ts +1 -1
  360. package/build-types/box-control/utils.d.ts.map +1 -1
  361. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  362. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  363. package/build-types/circular-option-picker/types.d.ts +2 -2
  364. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  365. package/build-types/color-palette/utils.d.ts.map +1 -1
  366. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  367. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  368. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  369. package/build-types/color-picker/styles.d.ts.map +1 -1
  370. package/build-types/combobox-control/types.d.ts +1 -0
  371. package/build-types/combobox-control/types.d.ts.map +1 -1
  372. package/build-types/composite/context.d.ts.map +1 -1
  373. package/build-types/composite/group-label.d.ts +3 -0
  374. package/build-types/composite/group-label.d.ts.map +1 -0
  375. package/build-types/composite/group.d.ts +3 -0
  376. package/build-types/composite/group.d.ts.map +1 -0
  377. package/build-types/composite/hover.d.ts +3 -0
  378. package/build-types/composite/hover.d.ts.map +1 -0
  379. package/build-types/composite/index.d.ts +63 -47
  380. package/build-types/composite/index.d.ts.map +1 -1
  381. package/build-types/composite/item.d.ts +3 -0
  382. package/build-types/composite/item.d.ts.map +1 -0
  383. package/build-types/composite/legacy/index.d.ts +23 -3
  384. package/build-types/composite/legacy/index.d.ts.map +1 -1
  385. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
  386. package/build-types/composite/row.d.ts +3 -0
  387. package/build-types/composite/row.d.ts.map +1 -0
  388. package/build-types/composite/stories/index.story.d.ts +9 -8
  389. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  390. package/build-types/composite/typeahead.d.ts +3 -0
  391. package/build-types/composite/typeahead.d.ts.map +1 -0
  392. package/build-types/composite/types.d.ts +12 -11
  393. package/build-types/composite/types.d.ts.map +1 -1
  394. package/build-types/date-time/date/index.d.ts +0 -3
  395. package/build-types/date-time/date/index.d.ts.map +1 -1
  396. package/build-types/date-time/date/styles.d.ts.map +1 -1
  397. package/build-types/date-time/date/test/use-lilius.d.ts +2 -0
  398. package/build-types/date-time/date/test/use-lilius.d.ts.map +1 -0
  399. package/build-types/date-time/date/use-lilius/index.d.ts +169 -0
  400. package/build-types/date-time/date/use-lilius/index.d.ts.map +1 -0
  401. package/build-types/date-time/time/time-input/index.d.ts.map +1 -1
  402. package/build-types/dimension-control/index.d.ts +1 -1
  403. package/build-types/dimension-control/index.d.ts.map +1 -1
  404. package/build-types/dimension-control/stories/index.story.d.ts +5 -0
  405. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  406. package/build-types/dropdown-menu-v2/checkbox-item.d.ts +3 -0
  407. package/build-types/dropdown-menu-v2/checkbox-item.d.ts.map +1 -0
  408. package/build-types/dropdown-menu-v2/context.d.ts +6 -0
  409. package/build-types/dropdown-menu-v2/context.d.ts.map +1 -0
  410. package/build-types/dropdown-menu-v2/group-label.d.ts +3 -0
  411. package/build-types/dropdown-menu-v2/group-label.d.ts.map +1 -0
  412. package/build-types/dropdown-menu-v2/group.d.ts +3 -0
  413. package/build-types/dropdown-menu-v2/group.d.ts.map +1 -0
  414. package/build-types/dropdown-menu-v2/index.d.ts +39 -18
  415. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  416. package/build-types/dropdown-menu-v2/item-help-text.d.ts +6 -0
  417. package/build-types/dropdown-menu-v2/item-help-text.d.ts.map +1 -0
  418. package/build-types/dropdown-menu-v2/item-label.d.ts +6 -0
  419. package/build-types/dropdown-menu-v2/item-label.d.ts.map +1 -0
  420. package/build-types/dropdown-menu-v2/item.d.ts +3 -0
  421. package/build-types/dropdown-menu-v2/item.d.ts.map +1 -0
  422. package/build-types/dropdown-menu-v2/radio-item.d.ts +3 -0
  423. package/build-types/dropdown-menu-v2/radio-item.d.ts.map +1 -0
  424. package/build-types/dropdown-menu-v2/separator.d.ts +3 -0
  425. package/build-types/dropdown-menu-v2/separator.d.ts.map +1 -0
  426. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +10 -10
  427. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  428. package/build-types/dropdown-menu-v2/styles.d.ts +14 -6
  429. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  430. package/build-types/dropdown-menu-v2/types.d.ts +6 -0
  431. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  432. package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts +8 -0
  433. package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts.map +1 -0
  434. package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
  435. package/build-types/form-token-field/types.d.ts +1 -0
  436. package/build-types/form-token-field/types.d.ts.map +1 -1
  437. package/build-types/index.d.ts +4 -1
  438. package/build-types/index.d.ts.map +1 -1
  439. package/build-types/input-control/input-base.d.ts.map +1 -1
  440. package/build-types/input-control/input-prefix-wrapper.d.ts +2 -2
  441. package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
  442. package/build-types/input-control/input-suffix-wrapper.d.ts +2 -2
  443. package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
  444. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  445. package/build-types/input-control/stories/index.story.d.ts +9 -0
  446. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  447. package/build-types/input-control/styles/input-control-styles.d.ts +15 -9
  448. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  449. package/build-types/input-control/types.d.ts +23 -6
  450. package/build-types/input-control/types.d.ts.map +1 -1
  451. package/build-types/modal/index.d.ts.map +1 -1
  452. package/build-types/modal/stories/index.story.d.ts +3 -0
  453. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  454. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  455. package/build-types/navigator/index.d.ts +6 -6
  456. package/build-types/navigator/index.d.ts.map +1 -1
  457. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  458. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  459. package/build-types/navigator/stories/index.story.d.ts +1 -1
  460. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  461. package/build-types/navigator/types.d.ts +3 -1
  462. package/build-types/navigator/types.d.ts.map +1 -1
  463. package/build-types/navigator/use-navigator.d.ts +1 -2
  464. package/build-types/navigator/use-navigator.d.ts.map +1 -1
  465. package/build-types/private-apis.d.ts.map +1 -1
  466. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  467. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  468. package/build-types/select-control/styles/select-control-styles.d.ts +1 -1
  469. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  470. package/build-types/slot-fill/index.d.ts +3 -0
  471. package/build-types/slot-fill/index.d.ts.map +1 -1
  472. package/build-types/tabs/index.d.ts.map +1 -1
  473. package/build-types/tabs/styles.d.ts.map +1 -1
  474. package/build-types/tabs/tablist.d.ts.map +1 -1
  475. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  476. package/build-types/utils/config-values.d.ts +3 -3
  477. package/build-types/utils/element-rect.d.ts +32 -74
  478. package/build-types/utils/element-rect.d.ts.map +1 -1
  479. package/package.json +19 -20
  480. package/src/alignment-matrix-control/README.md +1 -5
  481. package/src/alignment-matrix-control/cell.tsx +3 -9
  482. package/src/alignment-matrix-control/icon.tsx +48 -30
  483. package/src/alignment-matrix-control/index.tsx +60 -50
  484. package/src/alignment-matrix-control/stories/index.story.tsx +3 -12
  485. package/src/alignment-matrix-control/styles.ts +113 -0
  486. package/src/alignment-matrix-control/types.ts +12 -1
  487. package/src/angle-picker-control/angle-circle.tsx +11 -9
  488. package/src/border-control/border-control/component.tsx +23 -16
  489. package/src/box-control/utils.ts +1 -1
  490. package/src/circular-option-picker/circular-option-picker-option.tsx +16 -19
  491. package/src/circular-option-picker/circular-option-picker.tsx +26 -12
  492. package/src/circular-option-picker/types.ts +2 -2
  493. package/src/clipboard-button/index.tsx +6 -6
  494. package/src/color-palette/test/utils.ts +21 -2
  495. package/src/color-palette/utils.ts +1 -3
  496. package/src/color-picker/color-copy-button.tsx +10 -8
  497. package/src/color-picker/hex-input.tsx +6 -10
  498. package/src/color-picker/input-with-slider.tsx +6 -10
  499. package/src/color-picker/styles.ts +1 -1
  500. package/src/combobox-control/types.ts +1 -0
  501. package/src/composite/README.md +5 -24
  502. package/src/composite/{context.ts → context.tsx} +1 -2
  503. package/src/composite/group-label.tsx +30 -0
  504. package/src/composite/group.tsx +30 -0
  505. package/src/composite/hover.tsx +30 -0
  506. package/src/composite/index.tsx +71 -166
  507. package/src/composite/item.tsx +30 -0
  508. package/src/composite/legacy/index.tsx +73 -11
  509. package/src/composite/legacy/stories/index.story.tsx +2 -1
  510. package/src/composite/legacy/test/index.tsx +57 -1
  511. package/src/composite/row.tsx +30 -0
  512. package/src/composite/stories/index.story.tsx +254 -365
  513. package/src/composite/typeahead.tsx +30 -0
  514. package/src/composite/types.ts +14 -16
  515. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +10 -10
  516. package/src/custom-gradient-picker/style.scss +2 -21
  517. package/src/custom-select-control-v2/styles.ts +4 -4
  518. package/src/date-time/date/index.tsx +1 -1
  519. package/src/date-time/date/styles.ts +33 -13
  520. package/src/date-time/date/test/use-lilius.ts +417 -0
  521. package/src/date-time/date/use-lilius/index.ts +394 -0
  522. package/src/date-time/time/test/index.tsx +3 -6
  523. package/src/date-time/time/time-input/index.tsx +25 -25
  524. package/src/date-time/time/time-input/test/index.tsx +6 -7
  525. package/src/dimension-control/README.md +4 -0
  526. package/src/dimension-control/index.tsx +7 -1
  527. package/src/dimension-control/stories/index.story.tsx +7 -2
  528. package/src/dimension-control/test/__snapshots__/index.test.js.snap +16 -16
  529. package/src/dimension-control/test/index.test.js +1 -0
  530. package/src/draggable/index.tsx +4 -4
  531. package/src/dropdown-menu-v2/README.md +73 -60
  532. package/src/dropdown-menu-v2/checkbox-item.tsx +63 -0
  533. package/src/dropdown-menu-v2/context.tsx +13 -0
  534. package/src/dropdown-menu-v2/group-label.tsx +37 -0
  535. package/src/dropdown-menu-v2/group.tsx +26 -0
  536. package/src/dropdown-menu-v2/index.tsx +57 -197
  537. package/src/dropdown-menu-v2/item-help-text.tsx +23 -0
  538. package/src/dropdown-menu-v2/item-label.tsx +23 -0
  539. package/src/dropdown-menu-v2/item.tsx +50 -0
  540. package/src/dropdown-menu-v2/radio-item.tsx +70 -0
  541. package/src/dropdown-menu-v2/separator.tsx +27 -0
  542. package/src/dropdown-menu-v2/stories/index.story.tsx +295 -262
  543. package/src/dropdown-menu-v2/styles.ts +102 -66
  544. package/src/dropdown-menu-v2/test/index.tsx +159 -132
  545. package/src/dropdown-menu-v2/types.ts +7 -0
  546. package/src/dropdown-menu-v2/use-temporary-focus-visible-fix.ts +22 -0
  547. package/src/focal-point-picker/styles/focal-point-style.ts +6 -1
  548. package/src/form-toggle/style.scss +1 -1
  549. package/src/form-token-field/style.scss +2 -3
  550. package/src/form-token-field/types.ts +1 -0
  551. package/src/index.ts +6 -1
  552. package/src/input-control/index.tsx +2 -2
  553. package/src/input-control/input-base.tsx +4 -14
  554. package/src/input-control/input-prefix-wrapper.tsx +8 -4
  555. package/src/input-control/input-suffix-wrapper.tsx +4 -6
  556. package/src/input-control/reducer/reducer.ts +13 -10
  557. package/src/input-control/stories/index.story.tsx +31 -12
  558. package/src/input-control/styles/input-control-styles.tsx +42 -11
  559. package/src/input-control/types.ts +23 -7
  560. package/src/input-control/utils.ts +3 -3
  561. package/src/item-group/styles.ts +3 -3
  562. package/src/item-group/test/__snapshots__/index.js.snap +3 -3
  563. package/src/modal/index.tsx +21 -12
  564. package/src/modal/stories/index.story.tsx +8 -14
  565. package/src/modal/style.scss +5 -9
  566. package/src/navigation/index.tsx +4 -4
  567. package/src/navigation/styles/navigation-styles.tsx +3 -3
  568. package/src/navigator/index.ts +6 -6
  569. package/src/navigator/navigator-back-button/hook.ts +1 -1
  570. package/src/navigator/navigator-button/hook.ts +1 -1
  571. package/src/navigator/navigator-provider/README.md +2 -3
  572. package/src/navigator/navigator-provider/component.tsx +97 -82
  573. package/src/navigator/navigator-screen/component.tsx +7 -0
  574. package/src/navigator/navigator-to-parent-button/component.tsx +1 -1
  575. package/src/navigator/stories/index.story.tsx +82 -253
  576. package/src/navigator/test/index.tsx +8 -0
  577. package/src/navigator/types.ts +3 -1
  578. package/src/navigator/use-navigator.ts +1 -3
  579. package/src/palette-edit/index.tsx +2 -2
  580. package/src/popover/style.scss +2 -1
  581. package/src/private-apis.ts +1 -23
  582. package/src/range-control/styles/range-control-styles.ts +7 -7
  583. package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +2 -2
  584. package/src/resizable-box/style.scss +2 -2
  585. package/src/select-control/README.md +2 -2
  586. package/src/select-control/styles/select-control-styles.ts +5 -5
  587. package/src/slot-fill/bubbles-virtually/fill.tsx +4 -4
  588. package/src/slot-fill/index.tsx +1 -0
  589. package/src/snackbar/index.tsx +4 -4
  590. package/src/tab-panel/style.scss +0 -1
  591. package/src/tabs/index.tsx +8 -4
  592. package/src/tabs/styles.ts +42 -14
  593. package/src/tabs/tablist.tsx +5 -4
  594. package/src/text-control/style.scss +3 -2
  595. package/src/toggle-group-control/toggle-group-control/utils.ts +7 -7
  596. package/src/tools-panel/tools-panel/hook.ts +6 -6
  597. package/src/unit-control/styles/unit-control-styles.ts +2 -1
  598. package/src/utils/config-values.js +6 -4
  599. package/src/utils/element-rect.ts +93 -130
  600. package/src/utils/hooks/use-update-effect.js +4 -4
  601. package/tsconfig.tsbuildinfo +1 -1
  602. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +0 -66
  603. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +0 -1
  604. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +0 -77
  605. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +0 -1
  606. package/build/navigator/navigator-back-button/index.js +0 -14
  607. package/build/navigator/navigator-back-button/index.js.map +0 -1
  608. package/build/navigator/navigator-button/index.js +0 -14
  609. package/build/navigator/navigator-button/index.js.map +0 -1
  610. package/build/navigator/navigator-provider/index.js +0 -14
  611. package/build/navigator/navigator-provider/index.js.map +0 -1
  612. package/build/navigator/navigator-screen/index.js +0 -14
  613. package/build/navigator/navigator-screen/index.js.map +0 -1
  614. package/build/navigator/navigator-to-parent-button/index.js +0 -14
  615. package/build/navigator/navigator-to-parent-button/index.js.map +0 -1
  616. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +0 -63
  617. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +0 -1
  618. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +0 -72
  619. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +0 -1
  620. package/build-module/navigator/navigator-back-button/index.js +0 -2
  621. package/build-module/navigator/navigator-back-button/index.js.map +0 -1
  622. package/build-module/navigator/navigator-button/index.js +0 -2
  623. package/build-module/navigator/navigator-button/index.js.map +0 -1
  624. package/build-module/navigator/navigator-provider/index.js +0 -2
  625. package/build-module/navigator/navigator-provider/index.js.map +0 -1
  626. package/build-module/navigator/navigator-screen/index.js +0 -2
  627. package/build-module/navigator/navigator-screen/index.js.map +0 -1
  628. package/build-module/navigator/navigator-to-parent-button/index.js +0 -2
  629. package/build-module/navigator/navigator-to-parent-button/index.js.map +0 -1
  630. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +0 -18
  631. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +0 -1
  632. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +0 -1
  633. package/build-types/composite/stories/utils.d.ts +0 -29
  634. package/build-types/composite/stories/utils.d.ts.map +0 -1
  635. package/build-types/navigator/navigator-back-button/index.d.ts +0 -2
  636. package/build-types/navigator/navigator-back-button/index.d.ts.map +0 -1
  637. package/build-types/navigator/navigator-button/index.d.ts +0 -2
  638. package/build-types/navigator/navigator-button/index.d.ts.map +0 -1
  639. package/build-types/navigator/navigator-provider/index.d.ts +0 -2
  640. package/build-types/navigator/navigator-provider/index.d.ts.map +0 -1
  641. package/build-types/navigator/navigator-screen/index.d.ts +0 -2
  642. package/build-types/navigator/navigator-screen/index.d.ts.map +0 -1
  643. package/build-types/navigator/navigator-to-parent-button/index.d.ts +0 -2
  644. package/build-types/navigator/navigator-to-parent-button/index.d.ts.map +0 -1
  645. package/src/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.ts +0 -77
  646. package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.ts +0 -102
  647. package/src/composite/stories/utils.tsx +0 -76
  648. package/src/navigator/navigator-back-button/index.ts +0 -1
  649. package/src/navigator/navigator-button/index.ts +0 -1
  650. package/src/navigator/navigator-provider/index.ts +0 -1
  651. package/src/navigator/navigator-screen/index.ts +0 -1
  652. package/src/navigator/navigator-to-parent-button/index.ts +0 -1
@@ -1,79 +1,27 @@
1
- /**
2
- * `useTrackElementRectUpdates` options.
3
- */
4
- export type UseTrackElementRectUpdatesOptions = {
5
- /**
6
- * Whether to trigger the callback when an element's ResizeObserver is
7
- * first set up, including when the target element changes.
8
- *
9
- * @default true
10
- */
11
- fireOnElementInit?: boolean;
12
- };
13
- /**
14
- * Tracks an element's "rect" (size and position) and fires `onRect` for all
15
- * of its discrete values. The element can be changed dynamically and **it
16
- * must not be stored in a ref**. Instead, it should be stored in a React
17
- * state or equivalent.
18
- *
19
- * By default, `onRect` is called initially for the target element (including
20
- * when the target element changes), not only on size or position updates.
21
- * This allows consumers of the hook to always be in sync with all rect values
22
- * of the target element throughout its lifetime. This behavior can be
23
- * disabled by setting the `fireOnElementInit` option to `false`.
24
- *
25
- * Under the hood, it sets up a `ResizeObserver` that tracks the element. The
26
- * target element can be changed dynamically, and the observer will be
27
- * updated accordingly.
28
- *
29
- * @example
30
- *
31
- * ```tsx
32
- * const [ targetElement, setTargetElement ] = useState< HTMLElement | null >();
33
- *
34
- * useTrackElementRectUpdates( targetElement, ( element ) => {
35
- * console.log( 'Element resized:', element );
36
- * } );
37
- *
38
- * <div ref={ setTargetElement } />;
39
- * ```
40
- */
41
- export declare function useTrackElementRectUpdates(
42
- /**
43
- * The target element to observe. It can be changed dynamically.
44
- */
45
- targetElement: HTMLElement | undefined | null,
46
- /**
47
- * Callback to fire when the element is resized. It will also be
48
- * called when the observer is set up, unless `fireOnElementInit` is
49
- * set to `false`.
50
- */
51
- onRect: (
52
- /**
53
- * The element being tracked at the time of this update.
54
- */
55
- element: HTMLElement,
56
- /**
57
- * The list of
58
- * [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)
59
- * objects passed to the `ResizeObserver.observe` callback. This list
60
- * won't be available when the observer is set up, and only on updates.
61
- */
62
- resizeObserverEntries?: ResizeObserverEntry[]) => void, { fireOnElementInit }?: UseTrackElementRectUpdatesOptions): void;
63
1
  /**
64
2
  * The position and dimensions of an element, relative to its offset parent.
65
3
  */
66
4
  export type ElementOffsetRect = {
67
5
  /**
68
- * The distance from the left edge of the offset parent to the left edge of
6
+ * The distance from the top edge of the offset parent to the top edge of
69
7
  * the element.
70
8
  */
71
- left: number;
9
+ top: number;
72
10
  /**
73
- * The distance from the top edge of the offset parent to the top edge of
11
+ * The distance from the right edge of the offset parent to the right edge
12
+ * of the element.
13
+ */
14
+ right: number;
15
+ /**
16
+ * The distance from the bottom edge of the offset parent to the bottom edge
17
+ * of the element.
18
+ */
19
+ bottom: number;
20
+ /**
21
+ * The distance from the left edge of the offset parent to the left edge of
74
22
  * the element.
75
23
  */
76
- top: number;
24
+ left: number;
77
25
  /**
78
26
  * The width of the element.
79
27
  */
@@ -87,25 +35,35 @@ export type ElementOffsetRect = {
87
35
  * An `ElementOffsetRect` object with all values set to zero.
88
36
  */
89
37
  export declare const NULL_ELEMENT_OFFSET_RECT: {
90
- left: number;
91
38
  top: number;
39
+ right: number;
40
+ bottom: number;
41
+ left: number;
92
42
  width: number;
93
43
  height: number;
94
44
  };
95
45
  /**
96
46
  * Returns the position and dimensions of an element, relative to its offset
97
- * parent. This is useful in contexts where `getBoundingClientRect` is not
98
- * suitable, such as when the element is transformed.
47
+ * parent, with subpixel precision. Values reflect the real measures before any
48
+ * potential scaling distortions along the X and Y axes.
99
49
  *
100
- * **Note:** the `left` and `right` values are adjusted due to a limitation
101
- * in the way the browser calculates the offset position of the element,
102
- * which can cause unwanted scrollbars to appear. This adjustment makes the
103
- * values potentially inaccurate within a range of 1 pixel.
50
+ * Useful in contexts where plain `getBoundingClientRect` calls or `ResizeObserver`
51
+ * entries are not suitable, such as when the element is transformed, and when
52
+ * `element.offset<Top|Left|Width|Height>` methods are not precise enough.
53
+ *
54
+ * **Note:** in some contexts, like when the scale is 0, this method will fail
55
+ * because it's impossible to calculate a scaling ratio. When that happens, it
56
+ * will return `undefined`.
104
57
  */
105
- export declare function getElementOffsetRect(element: HTMLElement): ElementOffsetRect;
58
+ export declare function getElementOffsetRect(element: HTMLElement): ElementOffsetRect | undefined;
106
59
  /**
107
60
  * Tracks the position and dimensions of an element, relative to its offset
108
61
  * parent. The element can be changed dynamically.
62
+ *
63
+ * **Note:** sometimes, the measurement will fail (see `getElementOffsetRect`'s
64
+ * documentation for more details). When that happens, this hook will attempt
65
+ * to measure again after a frame, and if that fails, it will poll every 100
66
+ * milliseconds until it succeeds.
109
67
  */
110
68
  export declare function useTrackElementOffsetRect(targetElement: HTMLElement | undefined | null): ElementOffsetRect;
111
69
  //# sourceMappingURL=element-rect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element-rect.d.ts","sourceRoot":"","sources":["../../src/utils/element-rect.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC/C;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,0BAA0B;AACzC;;GAEG;AACH,aAAa,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI;AAC7C;;;;GAIG;AACH,MAAM,EAAE;AACP;;GAEG;AACH,OAAO,EAAE,WAAW;AACpB;;;;;GAKG;AACH,qBAAqB,CAAC,EAAE,mBAAmB,EAAE,KACzC,IAAI,EACT,EAAE,iBAAwB,EAAE,GAAE,iCAAsC,QA0CpE;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;CAKR,CAAC;AAE9B;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,WAAW,GAClB,iBAAiB,CAanB;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACxC,aAAa,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,qBAU7C"}
1
+ {"version":3,"file":"element-rect.d.ts","sourceRoot":"","sources":["../../src/utils/element-rect.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;CAOR,CAAC;AAE9B;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,WAAW,GAClB,iBAAiB,GAAG,SAAS,CAmC/B;AAID;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACxC,aAAa,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,qBAoC7C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "28.6.0",
3
+ "version": "28.8.1-next.1f6eadc42.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -43,23 +43,23 @@
43
43
  "@types/gradient-parser": "0.1.3",
44
44
  "@types/highlight-words-core": "1.2.1",
45
45
  "@use-gesture/react": "^10.3.1",
46
- "@wordpress/a11y": "^4.6.0",
47
- "@wordpress/compose": "^7.6.0",
48
- "@wordpress/date": "^5.6.0",
49
- "@wordpress/deprecated": "^4.6.0",
50
- "@wordpress/dom": "^4.6.0",
51
- "@wordpress/element": "^6.6.0",
52
- "@wordpress/escape-html": "^3.6.0",
53
- "@wordpress/hooks": "^4.6.0",
54
- "@wordpress/html-entities": "^4.6.0",
55
- "@wordpress/i18n": "^5.6.0",
56
- "@wordpress/icons": "^10.6.0",
57
- "@wordpress/is-shallow-equal": "^5.6.0",
58
- "@wordpress/keycodes": "^4.6.0",
59
- "@wordpress/primitives": "^4.6.0",
60
- "@wordpress/private-apis": "^1.6.0",
61
- "@wordpress/rich-text": "^7.6.0",
62
- "@wordpress/warning": "^3.6.0",
46
+ "@wordpress/a11y": "^4.7.1-next.1f6eadc42.0",
47
+ "@wordpress/compose": "^7.8.1-next.1f6eadc42.0",
48
+ "@wordpress/date": "^5.7.1-next.1f6eadc42.0",
49
+ "@wordpress/deprecated": "^4.7.1-next.1f6eadc42.0",
50
+ "@wordpress/dom": "^4.7.1-next.1f6eadc42.0",
51
+ "@wordpress/element": "^6.7.1-next.1f6eadc42.0",
52
+ "@wordpress/escape-html": "^3.7.1-next.1f6eadc42.0",
53
+ "@wordpress/hooks": "^4.7.1-next.1f6eadc42.0",
54
+ "@wordpress/html-entities": "^4.7.1-next.1f6eadc42.0",
55
+ "@wordpress/i18n": "^5.7.1-next.1f6eadc42.0",
56
+ "@wordpress/icons": "^10.7.1-next.1f6eadc42.0",
57
+ "@wordpress/is-shallow-equal": "^5.7.1-next.1f6eadc42.0",
58
+ "@wordpress/keycodes": "^4.7.1-next.1f6eadc42.0",
59
+ "@wordpress/primitives": "^4.7.1-next.1f6eadc42.0",
60
+ "@wordpress/private-apis": "^1.7.1-next.1f6eadc42.0",
61
+ "@wordpress/rich-text": "^7.7.1-next.1f6eadc42.0",
62
+ "@wordpress/warning": "^3.7.1-next.1f6eadc42.0",
63
63
  "change-case": "^4.1.2",
64
64
  "clsx": "^2.1.1",
65
65
  "colord": "^2.7.0",
@@ -75,7 +75,6 @@
75
75
  "re-resizable": "^6.4.0",
76
76
  "react-colorful": "^5.3.1",
77
77
  "remove-accents": "^0.5.0",
78
- "use-lilius": "^2.0.5",
79
78
  "uuid": "^9.0.1"
80
79
  },
81
80
  "peerDependencies": {
@@ -85,5 +84,5 @@
85
84
  "publishConfig": {
86
85
  "access": "public"
87
86
  },
88
- "gitHead": "ab9564947967bb3f00343130954b9efacba6cdd7"
87
+ "gitHead": "960a22b909c9fdbc90e7435b7ba8947b9218837a"
89
88
  }
@@ -1,16 +1,12 @@
1
1
  # AlignmentMatrixControl
2
2
 
3
- <div class="callout callout-alert">
4
- This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
5
- </div>
6
-
7
3
  AlignmentMatrixControl components enable adjustments to horizontal and vertical alignments for UI.
8
4
 
9
5
  ## Usage
10
6
 
11
7
  ```jsx
12
8
  import { useState } from 'react';
13
- import { __experimentalAlignmentMatrixControl as AlignmentMatrixControl } from '@wordpress/components';
9
+ import { AlignmentMatrixControl } from '@wordpress/components';
14
10
 
15
11
  const Example = () => {
16
12
  const [ alignment, setAlignment ] = useState( 'center center' );
@@ -9,23 +9,17 @@ import { VisuallyHidden } from '../visually-hidden';
9
9
  * Internal dependencies
10
10
  */
11
11
  import { ALIGNMENT_LABEL } from './utils';
12
- import {
13
- Cell as CellView,
14
- Point,
15
- } from './styles/alignment-matrix-control-styles';
12
+ import { Cell as CellView, Point } from './styles';
16
13
  import type { AlignmentMatrixControlCellProps } from './types';
17
14
  import type { WordPressComponentProps } from '../context';
18
15
 
19
16
  export default function Cell( {
20
17
  id,
21
- isActive = false,
22
18
  value,
23
19
  ...props
24
20
  }: WordPressComponentProps< AlignmentMatrixControlCellProps, 'span', false > ) {
25
- const tooltipText = ALIGNMENT_LABEL[ value ];
26
-
27
21
  return (
28
- <Tooltip text={ tooltipText }>
22
+ <Tooltip text={ ALIGNMENT_LABEL[ value ] }>
29
23
  <Composite.Item
30
24
  id={ id }
31
25
  render={ <CellView { ...props } role="gridcell" /> }
@@ -34,7 +28,7 @@ export default function Cell( {
34
28
  otherwise it'll announce the content as "blank". So we use a visually
35
29
  hidden element instead of aria-label. */ }
36
30
  <VisuallyHidden>{ value }</VisuallyHidden>
37
- <Point isActive={ isActive } role="presentation" />
31
+ <Point role="presentation" />
38
32
  </Composite.Item>
39
33
  </Tooltip>
40
34
  );
@@ -3,59 +3,77 @@
3
3
  */
4
4
  import clsx from 'clsx';
5
5
 
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { Rect, SVG } from '@wordpress/primitives';
10
+
6
11
  /**
7
12
  * Internal dependencies
8
13
  */
9
14
  import { ALIGNMENTS, getAlignmentIndex } from './utils';
10
- import {
11
- Root,
12
- Cell,
13
- Point,
14
- } from './styles/alignment-matrix-control-icon-styles';
15
15
  import type { AlignmentMatrixControlIconProps } from './types';
16
16
  import type { WordPressComponentProps } from '../context';
17
17
 
18
18
  const BASE_SIZE = 24;
19
+ const GRID_CELL_SIZE = 7;
20
+ const GRID_PADDING = ( BASE_SIZE - 3 * GRID_CELL_SIZE ) / 2;
21
+ const DOT_SIZE = 2;
22
+ const DOT_SIZE_SELECTED = 4;
19
23
 
20
24
  function AlignmentMatrixControlIcon( {
21
25
  className,
22
26
  disablePointerEvents = true,
23
- size = BASE_SIZE,
27
+ size,
28
+ width,
29
+ height,
24
30
  style = {},
25
31
  value = 'center',
26
32
  ...props
27
- }: WordPressComponentProps< AlignmentMatrixControlIconProps, 'div', false > ) {
28
- const alignIndex = getAlignmentIndex( value );
29
- const scale = ( size / BASE_SIZE ).toFixed( 2 );
30
-
31
- const classes = clsx(
32
- 'component-alignment-matrix-control-icon',
33
- className
34
- );
35
-
36
- const styles = {
37
- ...style,
38
- transform: `scale(${ scale })`,
39
- };
40
-
33
+ }: WordPressComponentProps< AlignmentMatrixControlIconProps, 'svg', false > ) {
41
34
  return (
42
- <Root
43
- { ...props }
44
- className={ classes }
45
- disablePointerEvents={ disablePointerEvents }
35
+ <SVG
36
+ xmlns="http://www.w3.org/2000/svg"
37
+ viewBox={ `0 0 ${ BASE_SIZE } ${ BASE_SIZE }` }
38
+ width={ size ?? width ?? BASE_SIZE }
39
+ height={ size ?? height ?? BASE_SIZE }
46
40
  role="presentation"
47
- style={ styles }
41
+ className={ clsx(
42
+ 'component-alignment-matrix-control-icon',
43
+ className
44
+ ) }
45
+ style={ {
46
+ pointerEvents: disablePointerEvents ? 'none' : undefined,
47
+ ...style,
48
+ } }
49
+ { ...props }
48
50
  >
49
51
  { ALIGNMENTS.map( ( align, index ) => {
50
- const isActive = alignIndex === index;
52
+ const dotSize =
53
+ getAlignmentIndex( value ) === index
54
+ ? DOT_SIZE_SELECTED
55
+ : DOT_SIZE;
51
56
 
52
57
  return (
53
- <Cell key={ align }>
54
- <Point isActive={ isActive } />
55
- </Cell>
58
+ <Rect
59
+ key={ align }
60
+ x={
61
+ GRID_PADDING +
62
+ ( index % 3 ) * GRID_CELL_SIZE +
63
+ ( GRID_CELL_SIZE - dotSize ) / 2
64
+ }
65
+ y={
66
+ GRID_PADDING +
67
+ Math.floor( index / 3 ) * GRID_CELL_SIZE +
68
+ ( GRID_CELL_SIZE - dotSize ) / 2
69
+ }
70
+ width={ dotSize }
71
+ height={ dotSize }
72
+ fill="currentColor"
73
+ />
56
74
  );
57
75
  } ) }
58
- </Root>
76
+ </SVG>
59
77
  );
60
78
  }
61
79
 
@@ -2,46 +2,26 @@
2
2
  * External dependencies
3
3
  */
4
4
  import clsx from 'clsx';
5
- import { useStoreState } from '@ariakit/react';
6
5
 
7
6
  /**
8
7
  * WordPress dependencies
9
8
  */
10
9
  import { __, isRTL } from '@wordpress/i18n';
11
10
  import { useInstanceId } from '@wordpress/compose';
11
+ import { useCallback } from '@wordpress/element';
12
12
 
13
13
  /**
14
14
  * Internal dependencies
15
15
  */
16
16
  import Cell from './cell';
17
- import { Composite, useCompositeStore } from '../composite';
18
- import { Root, Row } from './styles/alignment-matrix-control-styles';
17
+ import { Composite } from '../composite';
18
+ import { GridContainer, GridRow } from './styles';
19
19
  import AlignmentMatrixControlIcon from './icon';
20
20
  import { GRID, getItemId, getItemValue } from './utils';
21
21
  import type { WordPressComponentProps } from '../context';
22
22
  import type { AlignmentMatrixControlProps } from './types';
23
23
 
24
- /**
25
- *
26
- * AlignmentMatrixControl components enable adjustments to horizontal and vertical alignments for UI.
27
- *
28
- * ```jsx
29
- * import { __experimentalAlignmentMatrixControl as AlignmentMatrixControl } from '@wordpress/components';
30
- * import { useState } from '@wordpress/element';
31
- *
32
- * const Example = () => {
33
- * const [ alignment, setAlignment ] = useState( 'center center' );
34
- *
35
- * return (
36
- * <AlignmentMatrixControl
37
- * value={ alignment }
38
- * onChange={ setAlignment }
39
- * />
40
- * );
41
- * };
42
- * ```
43
- */
44
- export function AlignmentMatrixControl( {
24
+ function UnforwardedAlignmentMatrixControl( {
45
25
  className,
46
26
  id,
47
27
  label = __( 'Alignment Matrix Control' ),
@@ -52,32 +32,33 @@ export function AlignmentMatrixControl( {
52
32
  ...props
53
33
  }: WordPressComponentProps< AlignmentMatrixControlProps, 'div', false > ) {
54
34
  const baseId = useInstanceId(
55
- AlignmentMatrixControl,
35
+ UnforwardedAlignmentMatrixControl,
56
36
  'alignment-matrix-control',
57
37
  id
58
38
  );
59
39
 
60
- const compositeStore = useCompositeStore( {
61
- defaultActiveId: getItemId( baseId, defaultValue ),
62
- activeId: getItemId( baseId, value ),
63
- setActiveId: ( nextActiveId ) => {
40
+ const setActiveId = useCallback<
41
+ NonNullable< React.ComponentProps< typeof Composite >[ 'setActiveId' ] >
42
+ >(
43
+ ( nextActiveId ) => {
64
44
  const nextValue = getItemValue( baseId, nextActiveId );
65
45
  if ( nextValue ) {
66
46
  onChange?.( nextValue );
67
47
  }
68
48
  },
69
- rtl: isRTL(),
70
- } );
71
-
72
- const activeId = useStoreState( compositeStore, 'activeId' );
49
+ [ baseId, onChange ]
50
+ );
73
51
 
74
52
  const classes = clsx( 'component-alignment-matrix-control', className );
75
53
 
76
54
  return (
77
55
  <Composite
78
- store={ compositeStore }
56
+ defaultActiveId={ getItemId( baseId, defaultValue ) }
57
+ activeId={ getItemId( baseId, value ) }
58
+ setActiveId={ setActiveId }
59
+ rtl={ isRTL() }
79
60
  render={
80
- <Root
61
+ <GridContainer
81
62
  { ...props }
82
63
  aria-label={ label }
83
64
  className={ classes }
@@ -88,26 +69,55 @@ export function AlignmentMatrixControl( {
88
69
  }
89
70
  >
90
71
  { GRID.map( ( cells, index ) => (
91
- <Composite.Row render={ <Row role="row" /> } key={ index }>
92
- { cells.map( ( cell ) => {
93
- const cellId = getItemId( baseId, cell );
94
- const isActive = cellId === activeId;
95
-
96
- return (
97
- <Cell
98
- id={ cellId }
99
- isActive={ isActive }
100
- key={ cell }
101
- value={ cell }
102
- />
103
- );
104
- } ) }
72
+ <Composite.Row render={ <GridRow role="row" /> } key={ index }>
73
+ { cells.map( ( cell ) => (
74
+ <Cell
75
+ id={ getItemId( baseId, cell ) }
76
+ key={ cell }
77
+ value={ cell }
78
+ />
79
+ ) ) }
105
80
  </Composite.Row>
106
81
  ) ) }
107
82
  </Composite>
108
83
  );
109
84
  }
110
85
 
111
- AlignmentMatrixControl.Icon = AlignmentMatrixControlIcon;
86
+ /**
87
+ * AlignmentMatrixControl components enable adjustments to horizontal and vertical alignments for UI.
88
+ *
89
+ * ```jsx
90
+ * import { AlignmentMatrixControl } from '@wordpress/components';
91
+ * import { useState } from '@wordpress/element';
92
+ *
93
+ * const Example = () => {
94
+ * const [ alignment, setAlignment ] = useState( 'center center' );
95
+ *
96
+ * return (
97
+ * <AlignmentMatrixControl
98
+ * value={ alignment }
99
+ * onChange={ setAlignment }
100
+ * />
101
+ * );
102
+ * };
103
+ * ```
104
+ */
105
+ export const AlignmentMatrixControl = Object.assign(
106
+ UnforwardedAlignmentMatrixControl,
107
+ {
108
+ /**
109
+ * Render an alignment matrix as an icon.
110
+ *
111
+ * ```jsx
112
+ * import { AlignmentMatrixControl } from '@wordpress/components';
113
+ *
114
+ * <Icon icon={<AlignmentMatrixControl.Icon value="top left" />} />
115
+ * ```
116
+ */
117
+ Icon: Object.assign( AlignmentMatrixControlIcon, {
118
+ displayName: 'AlignmentMatrixControl.Icon',
119
+ } ),
120
+ }
121
+ );
112
122
 
113
123
  export default AlignmentMatrixControl;
@@ -17,7 +17,7 @@ import { HStack } from '../../h-stack';
17
17
  import type { AlignmentMatrixControlProps } from '../types';
18
18
 
19
19
  const meta: Meta< typeof AlignmentMatrixControl > = {
20
- title: 'Components (Experimental)/AlignmentMatrixControl',
20
+ title: 'Components/AlignmentMatrixControl',
21
21
  component: AlignmentMatrixControl,
22
22
  subcomponents: {
23
23
  // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
@@ -59,18 +59,9 @@ export const Default = Template.bind( {} );
59
59
  export const IconSubcomponent = () => {
60
60
  return (
61
61
  <HStack justify="flex-start">
62
+ <Icon icon={ <AlignmentMatrixControl.Icon value="top left" /> } />
62
63
  <Icon
63
- icon={
64
- <AlignmentMatrixControl.Icon size={ 24 } value="top left" />
65
- }
66
- />
67
- <Icon
68
- icon={
69
- <AlignmentMatrixControl.Icon
70
- size={ 24 }
71
- value="center center"
72
- />
73
- }
64
+ icon={ <AlignmentMatrixControl.Icon value="center center" /> }
74
65
  />
75
66
  </HStack>
76
67
  );
@@ -0,0 +1,113 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import styled from '@emotion/styled';
5
+ import { css } from '@emotion/react';
6
+
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+ import { COLORS, CONFIG } from '../utils';
11
+ import type {
12
+ AlignmentMatrixControlProps,
13
+ AlignmentMatrixControlIconProps,
14
+ } from './types';
15
+
16
+ // Grid structure
17
+
18
+ const rootBase = ( { size = 92 } ) => css`
19
+ direction: ltr;
20
+
21
+ display: grid;
22
+ grid-template-columns: repeat( 3, 1fr );
23
+ grid-template-rows: repeat( 3, 1fr );
24
+
25
+ box-sizing: border-box;
26
+ width: ${ size }px;
27
+ aspect-ratio: 1;
28
+
29
+ border-radius: ${ CONFIG.radiusMedium };
30
+ outline: none;
31
+ `;
32
+
33
+ export const GridContainer = styled.div< {
34
+ size?: AlignmentMatrixControlProps[ 'width' ];
35
+ disablePointerEvents?: AlignmentMatrixControlIconProps[ 'disablePointerEvents' ];
36
+ } >`
37
+ ${ rootBase }
38
+
39
+ border: 1px solid transparent;
40
+
41
+ ${ ( props ) =>
42
+ props.disablePointerEvents
43
+ ? css``
44
+ : css`
45
+ cursor: pointer;
46
+ ` }
47
+ `;
48
+
49
+ export const GridRow = styled.div`
50
+ grid-column: 1 / -1;
51
+
52
+ box-sizing: border-box;
53
+ display: grid;
54
+ grid-template-columns: repeat( 3, 1fr );
55
+ `;
56
+
57
+ // Cell
58
+ export const Cell = styled.span`
59
+ position: relative;
60
+
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+
65
+ box-sizing: border-box;
66
+ margin: 0;
67
+ padding: 0;
68
+
69
+ appearance: none;
70
+ border: none;
71
+ outline: none;
72
+ `;
73
+
74
+ const POINT_SIZE = 6;
75
+ export const Point = styled.span`
76
+ display: block;
77
+ contain: strict;
78
+
79
+ box-sizing: border-box;
80
+ width: ${ POINT_SIZE }px;
81
+ aspect-ratio: 1;
82
+
83
+ margin: auto;
84
+
85
+ color: ${ COLORS.theme.gray[ 400 ] };
86
+
87
+ /* Use border instead of background color so that the point shows
88
+ in Windows High Contrast Mode */
89
+ border: ${ POINT_SIZE / 2 }px solid currentColor;
90
+
91
+ /* Highlight active item */
92
+ ${ Cell }[data-active-item] & {
93
+ color: ${ COLORS.gray[ 900 ] };
94
+ transform: scale( calc( 5 / 3 ) );
95
+ }
96
+
97
+ /* Hover styles for non-active items */
98
+ ${ Cell }:not([data-active-item]):hover & {
99
+ color: ${ COLORS.theme.accent };
100
+ }
101
+
102
+ /* Show an outline only when interacting with keyboard */
103
+ ${ Cell }[data-focus-visible] & {
104
+ outline: 1px solid ${ COLORS.theme.accent };
105
+ outline-offset: 1px;
106
+ }
107
+
108
+ @media not ( prefers-reduced-motion ) {
109
+ transition-property: color, transform;
110
+ transition-duration: 120ms;
111
+ transition-timing-function: linear;
112
+ }
113
+ `;