@react-spectrum/s2 1.4.0 → 1.5.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 (421) hide show
  1. package/dist/exports/CenterBaseline.cjs +12 -0
  2. package/dist/exports/CenterBaseline.cjs.map +1 -0
  3. package/dist/exports/CenterBaseline.mjs +7 -0
  4. package/dist/exports/CenterBaseline.mjs.map +1 -0
  5. package/dist/exports/Skeleton.cjs +1 -0
  6. package/dist/exports/Skeleton.cjs.map +1 -1
  7. package/dist/exports/Skeleton.mjs +2 -2
  8. package/dist/exports/Skeleton.mjs.map +1 -1
  9. package/dist/exports/index.cjs +3 -0
  10. package/dist/exports/index.cjs.map +1 -1
  11. package/dist/exports/index.mjs +3 -1
  12. package/dist/exports/index.mjs.map +1 -1
  13. package/dist/private/Accordion.cjs +2 -2
  14. package/dist/private/Accordion.css +2 -2
  15. package/dist/private/Accordion.mjs +2 -2
  16. package/dist/private/ActionBar.cjs +59 -59
  17. package/dist/private/ActionBar.cjs.map +1 -1
  18. package/dist/private/ActionBar.css +58 -58
  19. package/dist/private/ActionBar.css.map +1 -1
  20. package/dist/private/ActionBar.mjs +59 -59
  21. package/dist/private/ActionBar.mjs.map +1 -1
  22. package/dist/private/ActionButton.cjs +247 -247
  23. package/dist/private/ActionButton.cjs.map +1 -1
  24. package/dist/private/ActionButton.css +169 -169
  25. package/dist/private/ActionButton.css.map +1 -1
  26. package/dist/private/ActionButton.mjs +247 -247
  27. package/dist/private/ActionButton.mjs.map +1 -1
  28. package/dist/private/ActionButtonGroup.cjs +15 -15
  29. package/dist/private/ActionButtonGroup.css +9 -9
  30. package/dist/private/ActionButtonGroup.mjs +15 -15
  31. package/dist/private/ActionMenu.cjs.map +1 -1
  32. package/dist/private/ActionMenu.mjs.map +1 -1
  33. package/dist/private/Add.cjs +10 -10
  34. package/dist/private/Add.css +6 -6
  35. package/dist/private/Add.mjs +10 -10
  36. package/dist/private/AlertDialog.cjs +3 -3
  37. package/dist/private/AlertDialog.cjs.map +1 -1
  38. package/dist/private/AlertDialog.css +3 -3
  39. package/dist/private/AlertDialog.css.map +1 -1
  40. package/dist/private/AlertDialog.mjs +3 -3
  41. package/dist/private/AlertDialog.mjs.map +1 -1
  42. package/dist/private/Asterisk.cjs +6 -6
  43. package/dist/private/Asterisk.css +4 -4
  44. package/dist/private/Asterisk.mjs +6 -6
  45. package/dist/private/Avatar.cjs +16 -16
  46. package/dist/private/Avatar.css +16 -16
  47. package/dist/private/Avatar.mjs +16 -16
  48. package/dist/private/AvatarGroup.cjs +120 -120
  49. package/dist/private/AvatarGroup.css +31 -31
  50. package/dist/private/AvatarGroup.mjs +120 -120
  51. package/dist/private/Badge.cjs +197 -197
  52. package/dist/private/Badge.css +125 -125
  53. package/dist/private/Badge.mjs +197 -197
  54. package/dist/private/Breadcrumbs.cjs +234 -234
  55. package/dist/private/Breadcrumbs.cjs.map +1 -1
  56. package/dist/private/Breadcrumbs.css +100 -100
  57. package/dist/private/Breadcrumbs.css.map +1 -1
  58. package/dist/private/Breadcrumbs.mjs +234 -234
  59. package/dist/private/Breadcrumbs.mjs.map +1 -1
  60. package/dist/private/Button.cjs +326 -326
  61. package/dist/private/Button.cjs.map +1 -1
  62. package/dist/private/Button.css +172 -172
  63. package/dist/private/Button.css.map +1 -1
  64. package/dist/private/Button.mjs +326 -326
  65. package/dist/private/Button.mjs.map +1 -1
  66. package/dist/private/ButtonGroup.cjs +23 -20
  67. package/dist/private/ButtonGroup.cjs.map +1 -1
  68. package/dist/private/ButtonGroup.css +19 -15
  69. package/dist/private/ButtonGroup.css.map +1 -1
  70. package/dist/private/ButtonGroup.mjs +23 -20
  71. package/dist/private/ButtonGroup.mjs.map +1 -1
  72. package/dist/private/Calendar.cjs +232 -232
  73. package/dist/private/Calendar.cjs.map +1 -1
  74. package/dist/private/Calendar.css +149 -149
  75. package/dist/private/Calendar.css.map +1 -1
  76. package/dist/private/Calendar.mjs +232 -232
  77. package/dist/private/Calendar.mjs.map +1 -1
  78. package/dist/private/Card.cjs +309 -309
  79. package/dist/private/Card.css +206 -206
  80. package/dist/private/Card.mjs +309 -309
  81. package/dist/private/CardView.cjs +17 -17
  82. package/dist/private/CardView.css +17 -17
  83. package/dist/private/CardView.mjs +17 -17
  84. package/dist/private/CenterBaseline.cjs +1 -1
  85. package/dist/private/CenterBaseline.cjs.map +1 -1
  86. package/dist/private/CenterBaseline.css +2 -2
  87. package/dist/private/CenterBaseline.css.map +1 -1
  88. package/dist/private/CenterBaseline.mjs +1 -1
  89. package/dist/private/CenterBaseline.mjs.map +1 -1
  90. package/dist/private/Checkbox.cjs +188 -188
  91. package/dist/private/Checkbox.css +110 -110
  92. package/dist/private/Checkbox.mjs +188 -188
  93. package/dist/private/CheckboxGroup.cjs +43 -43
  94. package/dist/private/CheckboxGroup.css +37 -37
  95. package/dist/private/CheckboxGroup.mjs +43 -43
  96. package/dist/private/Checkmark.cjs +12 -12
  97. package/dist/private/Checkmark.css +8 -8
  98. package/dist/private/Checkmark.mjs +12 -12
  99. package/dist/private/Chevron.cjs +12 -12
  100. package/dist/private/Chevron.css +10 -10
  101. package/dist/private/Chevron.mjs +12 -12
  102. package/dist/private/ClearButton.cjs +30 -30
  103. package/dist/private/ClearButton.css +30 -30
  104. package/dist/private/ClearButton.mjs +30 -30
  105. package/dist/private/CloseButton.cjs +52 -52
  106. package/dist/private/CloseButton.cjs.map +1 -1
  107. package/dist/private/CloseButton.css +46 -46
  108. package/dist/private/CloseButton.css.map +1 -1
  109. package/dist/private/CloseButton.mjs +52 -52
  110. package/dist/private/CloseButton.mjs.map +1 -1
  111. package/dist/private/ColorArea.cjs +16 -16
  112. package/dist/private/ColorArea.css +16 -16
  113. package/dist/private/ColorArea.mjs +16 -16
  114. package/dist/private/ColorField.cjs +31 -31
  115. package/dist/private/ColorField.css +27 -27
  116. package/dist/private/ColorField.mjs +31 -31
  117. package/dist/private/ColorHandle.cjs +27 -27
  118. package/dist/private/ColorHandle.css +42 -42
  119. package/dist/private/ColorHandle.mjs +27 -27
  120. package/dist/private/ColorSlider.cjs +108 -108
  121. package/dist/private/ColorSlider.css +52 -52
  122. package/dist/private/ColorSlider.mjs +108 -108
  123. package/dist/private/ColorSwatch.cjs +29 -29
  124. package/dist/private/ColorSwatch.css +29 -29
  125. package/dist/private/ColorSwatch.mjs +29 -29
  126. package/dist/private/ColorSwatchPicker.cjs +29 -29
  127. package/dist/private/ColorSwatchPicker.css +48 -48
  128. package/dist/private/ColorSwatchPicker.mjs +29 -29
  129. package/dist/private/ColorWheel.cjs +26 -26
  130. package/dist/private/ColorWheel.css +17 -17
  131. package/dist/private/ColorWheel.mjs +26 -26
  132. package/dist/private/ComboBox.cjs +381 -381
  133. package/dist/private/ComboBox.cjs.map +1 -1
  134. package/dist/private/ComboBox.css +188 -188
  135. package/dist/private/ComboBox.css.map +1 -1
  136. package/dist/private/ComboBox.mjs +381 -381
  137. package/dist/private/ComboBox.mjs.map +1 -1
  138. package/dist/private/ContextualHelp.cjs +5 -5
  139. package/dist/private/ContextualHelp.cjs.map +1 -1
  140. package/dist/private/ContextualHelp.css +50 -50
  141. package/dist/private/ContextualHelp.css.map +1 -1
  142. package/dist/private/ContextualHelp.mjs +5 -5
  143. package/dist/private/ContextualHelp.mjs.map +1 -1
  144. package/dist/private/CornerTriangle.cjs +8 -8
  145. package/dist/private/CornerTriangle.css +6 -6
  146. package/dist/private/CornerTriangle.mjs +8 -8
  147. package/dist/private/Cross.cjs +14 -14
  148. package/dist/private/Cross.css +10 -10
  149. package/dist/private/Cross.mjs +14 -14
  150. package/dist/private/CustomDialog.cjs +25 -25
  151. package/dist/private/CustomDialog.css +25 -25
  152. package/dist/private/CustomDialog.mjs +25 -25
  153. package/dist/private/Dash.cjs +10 -10
  154. package/dist/private/Dash.css +6 -6
  155. package/dist/private/Dash.mjs +10 -10
  156. package/dist/private/DateField.cjs +73 -73
  157. package/dist/private/DateField.css +77 -77
  158. package/dist/private/DateField.mjs +73 -73
  159. package/dist/private/DatePicker.cjs +172 -172
  160. package/dist/private/DatePicker.cjs.map +1 -1
  161. package/dist/private/DatePicker.css +128 -128
  162. package/dist/private/DatePicker.css.map +1 -1
  163. package/dist/private/DatePicker.mjs +172 -172
  164. package/dist/private/DatePicker.mjs.map +1 -1
  165. package/dist/private/DateRangePicker.cjs +55 -55
  166. package/dist/private/DateRangePicker.cjs.map +1 -1
  167. package/dist/private/DateRangePicker.css +59 -59
  168. package/dist/private/DateRangePicker.css.map +1 -1
  169. package/dist/private/DateRangePicker.mjs +55 -55
  170. package/dist/private/DateRangePicker.mjs.map +1 -1
  171. package/dist/private/Dialog.cjs +17 -17
  172. package/dist/private/Dialog.css +70 -70
  173. package/dist/private/Dialog.mjs +17 -17
  174. package/dist/private/Disclosure.cjs +144 -122
  175. package/dist/private/Disclosure.cjs.map +1 -1
  176. package/dist/private/Disclosure.css +112 -112
  177. package/dist/private/Disclosure.css.map +1 -1
  178. package/dist/private/Disclosure.mjs +144 -122
  179. package/dist/private/Disclosure.mjs.map +1 -1
  180. package/dist/private/Divider.cjs +25 -25
  181. package/dist/private/Divider.css +25 -25
  182. package/dist/private/Divider.mjs +25 -25
  183. package/dist/private/DragHandle.cjs +8 -8
  184. package/dist/private/DragHandle.css +6 -6
  185. package/dist/private/DragHandle.mjs +8 -8
  186. package/dist/private/DragPreview.cjs +154 -154
  187. package/dist/private/DragPreview.css +106 -106
  188. package/dist/private/DragPreview.mjs +154 -154
  189. package/dist/private/DropZone.cjs +61 -61
  190. package/dist/private/DropZone.cjs.map +1 -1
  191. package/dist/private/DropZone.css +57 -57
  192. package/dist/private/DropZone.css.map +1 -1
  193. package/dist/private/DropZone.mjs +61 -61
  194. package/dist/private/DropZone.mjs.map +1 -1
  195. package/dist/private/Field.cjs +360 -360
  196. package/dist/private/Field.cjs.map +1 -1
  197. package/dist/private/Field.css +160 -160
  198. package/dist/private/Field.css.map +1 -1
  199. package/dist/private/Field.mjs +360 -360
  200. package/dist/private/Field.mjs.map +1 -1
  201. package/dist/private/Form.cjs +9 -9
  202. package/dist/private/Form.css +9 -9
  203. package/dist/private/Form.mjs +9 -9
  204. package/dist/private/FullscreenDialog.cjs +5 -5
  205. package/dist/private/FullscreenDialog.css +78 -78
  206. package/dist/private/FullscreenDialog.mjs +5 -5
  207. package/dist/private/IllustratedMessage.cjs +228 -228
  208. package/dist/private/IllustratedMessage.css +72 -72
  209. package/dist/private/IllustratedMessage.mjs +228 -228
  210. package/dist/private/Image.cjs +14 -14
  211. package/dist/private/Image.css +14 -14
  212. package/dist/private/Image.mjs +14 -14
  213. package/dist/private/InlineAlert.cjs +100 -100
  214. package/dist/private/InlineAlert.cjs.map +1 -1
  215. package/dist/private/InlineAlert.css +76 -76
  216. package/dist/private/InlineAlert.css.map +1 -1
  217. package/dist/private/InlineAlert.mjs +100 -100
  218. package/dist/private/InlineAlert.mjs.map +1 -1
  219. package/dist/private/LabeledValue.cjs +134 -134
  220. package/dist/private/LabeledValue.css +63 -63
  221. package/dist/private/LabeledValue.mjs +134 -134
  222. package/dist/private/Link.cjs +49 -49
  223. package/dist/private/Link.css +41 -41
  224. package/dist/private/Link.mjs +49 -49
  225. package/dist/private/LinkOut.cjs +8 -8
  226. package/dist/private/LinkOut.css +8 -8
  227. package/dist/private/LinkOut.mjs +8 -8
  228. package/dist/private/ListView.cjs +245 -245
  229. package/dist/private/ListView.cjs.map +1 -1
  230. package/dist/private/ListView.css +177 -177
  231. package/dist/private/ListView.css.map +1 -1
  232. package/dist/private/ListView.mjs +245 -245
  233. package/dist/private/ListView.mjs.map +1 -1
  234. package/dist/private/Menu.cjs +446 -446
  235. package/dist/private/Menu.cjs.map +1 -1
  236. package/dist/private/Menu.css +196 -196
  237. package/dist/private/Menu.css.map +1 -1
  238. package/dist/private/Menu.mjs +446 -446
  239. package/dist/private/Menu.mjs.map +1 -1
  240. package/dist/private/Meter.cjs +153 -153
  241. package/dist/private/Meter.css +91 -91
  242. package/dist/private/Meter.mjs +153 -153
  243. package/dist/private/Modal.cjs +74 -74
  244. package/dist/private/Modal.css +59 -59
  245. package/dist/private/Modal.mjs +74 -74
  246. package/dist/private/NotificationBadge.cjs +56 -56
  247. package/dist/private/NotificationBadge.cjs.map +1 -1
  248. package/dist/private/NotificationBadge.css +49 -49
  249. package/dist/private/NotificationBadge.css.map +1 -1
  250. package/dist/private/NotificationBadge.mjs +56 -56
  251. package/dist/private/NotificationBadge.mjs.map +1 -1
  252. package/dist/private/NumberField.cjs +114 -114
  253. package/dist/private/NumberField.css +99 -99
  254. package/dist/private/NumberField.mjs +114 -114
  255. package/dist/private/Picker.cjs +275 -275
  256. package/dist/private/Picker.cjs.map +1 -1
  257. package/dist/private/Picker.css +173 -173
  258. package/dist/private/Picker.css.map +1 -1
  259. package/dist/private/Picker.mjs +275 -275
  260. package/dist/private/Picker.mjs.map +1 -1
  261. package/dist/private/Popover.cjs +95 -95
  262. package/dist/private/Popover.cjs.map +1 -1
  263. package/dist/private/Popover.css +75 -75
  264. package/dist/private/Popover.css.map +1 -1
  265. package/dist/private/Popover.mjs +95 -95
  266. package/dist/private/Popover.mjs.map +1 -1
  267. package/dist/private/ProgressBar.cjs +163 -163
  268. package/dist/private/ProgressBar.css +99 -99
  269. package/dist/private/ProgressBar.mjs +163 -163
  270. package/dist/private/ProgressCircle.cjs +34 -31
  271. package/dist/private/ProgressCircle.cjs.map +1 -1
  272. package/dist/private/ProgressCircle.css +24 -24
  273. package/dist/private/ProgressCircle.css.map +1 -1
  274. package/dist/private/ProgressCircle.mjs +34 -31
  275. package/dist/private/ProgressCircle.mjs.map +1 -1
  276. package/dist/private/Provider.cjs +19 -19
  277. package/dist/private/Provider.css +15 -15
  278. package/dist/private/Provider.mjs +19 -19
  279. package/dist/private/RadioGroup.cjs +208 -208
  280. package/dist/private/RadioGroup.css +113 -113
  281. package/dist/private/RadioGroup.mjs +208 -208
  282. package/dist/private/RangeCalendar.cjs +16 -16
  283. package/dist/private/RangeCalendar.cjs.map +1 -1
  284. package/dist/private/RangeCalendar.css +17 -17
  285. package/dist/private/RangeCalendar.css.map +1 -1
  286. package/dist/private/RangeCalendar.mjs +16 -16
  287. package/dist/private/RangeCalendar.mjs.map +1 -1
  288. package/dist/private/RangeSlider.cjs.map +1 -1
  289. package/dist/private/RangeSlider.mjs.map +1 -1
  290. package/dist/private/SearchField.cjs +41 -41
  291. package/dist/private/SearchField.css +45 -45
  292. package/dist/private/SearchField.mjs +41 -41
  293. package/dist/private/SegmentedControl.cjs +178 -178
  294. package/dist/private/SegmentedControl.css +123 -123
  295. package/dist/private/SegmentedControl.mjs +178 -178
  296. package/dist/private/SelectBoxGroup.cjs +142 -142
  297. package/dist/private/SelectBoxGroup.css +120 -120
  298. package/dist/private/SelectBoxGroup.mjs +142 -142
  299. package/dist/private/Slider.cjs +292 -292
  300. package/dist/private/Slider.css +159 -159
  301. package/dist/private/Slider.mjs +292 -292
  302. package/dist/private/StatusLight.cjs +115 -115
  303. package/dist/private/StatusLight.css +59 -59
  304. package/dist/private/StatusLight.mjs +115 -115
  305. package/dist/private/Switch.cjs +171 -171
  306. package/dist/private/Switch.css +85 -85
  307. package/dist/private/Switch.mjs +171 -171
  308. package/dist/private/TableView.cjs +551 -534
  309. package/dist/private/TableView.cjs.map +1 -1
  310. package/dist/private/TableView.css +329 -303
  311. package/dist/private/TableView.css.map +1 -1
  312. package/dist/private/TableView.mjs +551 -534
  313. package/dist/private/TableView.mjs.map +1 -1
  314. package/dist/private/Tabs.cjs +131 -125
  315. package/dist/private/Tabs.cjs.map +1 -1
  316. package/dist/private/Tabs.css +105 -105
  317. package/dist/private/Tabs.css.map +1 -1
  318. package/dist/private/Tabs.mjs +131 -125
  319. package/dist/private/Tabs.mjs.map +1 -1
  320. package/dist/private/TabsPicker.cjs +127 -127
  321. package/dist/private/TabsPicker.css +108 -108
  322. package/dist/private/TabsPicker.mjs +127 -127
  323. package/dist/private/TagGroup.cjs +203 -203
  324. package/dist/private/TagGroup.cjs.map +1 -1
  325. package/dist/private/TagGroup.css +146 -146
  326. package/dist/private/TagGroup.css.map +1 -1
  327. package/dist/private/TagGroup.mjs +203 -203
  328. package/dist/private/TagGroup.mjs.map +1 -1
  329. package/dist/private/TextField.cjs +58 -58
  330. package/dist/private/TextField.css +54 -54
  331. package/dist/private/TextField.mjs +58 -58
  332. package/dist/private/TimeField.cjs +51 -51
  333. package/dist/private/TimeField.css +47 -47
  334. package/dist/private/TimeField.mjs +51 -51
  335. package/dist/private/Toast.cjs +120 -120
  336. package/dist/private/Toast.cjs.map +1 -1
  337. package/dist/private/Toast.css +110 -110
  338. package/dist/private/Toast.css.map +1 -1
  339. package/dist/private/Toast.mjs +120 -120
  340. package/dist/private/Toast.mjs.map +1 -1
  341. package/dist/private/ToggleButton.cjs +16 -16
  342. package/dist/private/ToggleButton.css +23 -23
  343. package/dist/private/ToggleButton.mjs +16 -16
  344. package/dist/private/Tooltip.cjs +86 -86
  345. package/dist/private/Tooltip.css +70 -70
  346. package/dist/private/Tooltip.mjs +86 -86
  347. package/dist/private/TreeView.cjs +229 -229
  348. package/dist/private/TreeView.cjs.map +1 -1
  349. package/dist/private/TreeView.css +184 -184
  350. package/dist/private/TreeView.css.map +1 -1
  351. package/dist/private/TreeView.mjs +229 -229
  352. package/dist/private/TreeView.mjs.map +1 -1
  353. package/dist/private/dnd-utils.cjs +42 -42
  354. package/dist/private/dnd-utils.css +39 -39
  355. package/dist/private/dnd-utils.mjs +42 -42
  356. package/dist/types/exports/CenterBaseline.d.ts +1 -0
  357. package/dist/types/exports/Skeleton.d.ts +1 -1
  358. package/dist/types/exports/index.d.ts +1 -0
  359. package/dist/types/src/CenterBaseline.d.ts +17 -0
  360. package/dist/types/src/ContextualHelp.d.ts +1 -1
  361. package/dist/types/src/Disclosure.d.ts +6 -1
  362. package/dist/types/src/ListView.d.ts +1 -1
  363. package/dist/types/src/Menu.d.ts +1 -1
  364. package/dist/types/src/Popover.d.ts +2 -2
  365. package/dist/types/src/style-utils.d.ts +4 -1
  366. package/exports/CenterBaseline.ts +1 -0
  367. package/exports/Skeleton.ts +1 -1
  368. package/exports/index.ts +2 -0
  369. package/icons/Icon.cjs +10 -10
  370. package/icons/Icon.css +9 -9
  371. package/icons/Icon.mjs +10 -10
  372. package/icons/Skeleton.cjs +2 -2
  373. package/icons/Skeleton.cjs.map +1 -1
  374. package/icons/Skeleton.css +6 -6
  375. package/icons/Skeleton.mjs +2 -2
  376. package/icons/Skeleton.mjs.map +1 -1
  377. package/package.json +6 -6
  378. package/src/ActionBar.tsx +0 -1
  379. package/src/ActionButton.tsx +0 -1
  380. package/src/ActionMenu.tsx +0 -1
  381. package/src/AlertDialog.tsx +0 -1
  382. package/src/Breadcrumbs.tsx +0 -4
  383. package/src/Button.tsx +0 -1
  384. package/src/ButtonGroup.tsx +1 -0
  385. package/src/Calendar.tsx +0 -1
  386. package/src/CenterBaseline.tsx +17 -0
  387. package/src/CloseButton.tsx +0 -1
  388. package/src/ComboBox.tsx +0 -1
  389. package/src/ContextualHelp.tsx +1 -2
  390. package/src/DatePicker.tsx +0 -1
  391. package/src/DateRangePicker.tsx +0 -1
  392. package/src/Disclosure.tsx +92 -79
  393. package/src/DropZone.tsx +0 -1
  394. package/src/Field.tsx +0 -1
  395. package/src/InlineAlert.tsx +0 -1
  396. package/src/ListView.tsx +0 -2
  397. package/src/Menu.tsx +1 -8
  398. package/src/NotificationBadge.tsx +0 -1
  399. package/src/Picker.tsx +0 -1
  400. package/src/Popover.tsx +2 -1
  401. package/src/ProgressCircle.tsx +1 -1
  402. package/src/RangeCalendar.tsx +0 -1
  403. package/src/RangeSlider.tsx +0 -1
  404. package/src/TableView.tsx +75 -37
  405. package/src/Tabs.tsx +9 -2
  406. package/src/TagGroup.tsx +0 -1
  407. package/src/Toast.tsx +0 -3
  408. package/src/TreeView.tsx +0 -1
  409. package/src/style-utils.ts +13 -2
  410. package/style/__tests__/style-macro.test.js +71 -71
  411. package/style/dist/main.cjs +25 -25
  412. package/style/dist/module.mjs +13 -13
  413. package/style/dist/properties.mjs +3 -3
  414. package/style/dist/spectrum-theme.cjs +224 -224
  415. package/style/dist/spectrum-theme.mjs +217 -217
  416. package/style/dist/style-macro.cjs +100 -100
  417. package/style/dist/style-macro.mjs +94 -94
  418. package/style/dist/style-utils.cjs +51 -39
  419. package/style/dist/style-utils.cjs.map +1 -1
  420. package/style/dist/style-utils.mjs +50 -38
  421. package/style/dist/style-utils.mjs.map +1 -1
@@ -5,7 +5,7 @@ import { DialogProps } from 'react-aria-components/Dialog';
5
5
  import { DOMRefValue, GlobalDOMAttributes } from '@react-types/shared';
6
6
  import { heightProperties, UnsafeStyles, widthProperties } from './style-utils';
7
7
  import { StyleString } from '../style/types';
8
- export interface PopoverProps extends UnsafeStyles, Omit<AriaPopoverProps, 'arrowSize' | 'isNonModal' | 'arrowBoundaryOffset' | 'isKeyboardDismissDisabled' | 'shouldCloseOnInteractOutside' | 'shouldUpdatePosition' | 'style' | 'className' | 'render' | keyof GlobalDOMAttributes> {
8
+ export interface PopoverProps extends UnsafeStyles, Omit<AriaPopoverProps, 'arrowSize' | 'arrowBoundaryOffset' | 'isKeyboardDismissDisabled' | 'shouldCloseOnInteractOutside' | 'shouldUpdatePosition' | 'style' | 'className' | 'render' | keyof GlobalDOMAttributes> {
9
9
  /**
10
10
  * The styles of the popover.
11
11
  */
@@ -25,7 +25,7 @@ export declare const PopoverContext: import("react").Context<ContextValue<Popove
25
25
  export declare const InPopoverContext: import("react").Context<boolean>;
26
26
  export declare const PopoverBase: import("react").ForwardRefExoticComponent<PopoverProps & import("react").RefAttributes<HTMLDivElement | null>>;
27
27
  type PopoverStylesProp = StyleString<(typeof widthProperties)[number] | (typeof heightProperties)[number]>;
28
- export interface PopoverDialogProps extends Pick<PopoverProps, 'size' | 'hideArrow' | 'placement' | 'shouldFlip' | 'containerPadding' | 'offset' | 'crossOffset' | 'triggerRef' | 'isOpen' | 'onOpenChange'>, Omit<DialogProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, UnsafeStyles {
28
+ export interface PopoverDialogProps extends Pick<PopoverProps, 'size' | 'hideArrow' | 'placement' | 'shouldFlip' | 'containerPadding' | 'offset' | 'crossOffset' | 'getTargetRect' | 'isNonModal' | 'triggerRef' | 'isOpen' | 'onOpenChange'>, Omit<DialogProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, UnsafeStyles {
29
29
  /**
30
30
  * The children of the popover.
31
31
  */
@@ -272,9 +272,11 @@ export declare function control(options: ControlOptions): ControlResult;
272
272
  declare const allowedOverrides: readonly ["margin", "marginStart", "marginEnd", "marginTop", "marginBottom", "marginX", "marginY", "flexGrow", "flexShrink", "flexBasis", "justifySelf", "alignSelf", "order", "gridArea", "gridRowStart", "gridRowEnd", "gridColumnStart", "gridColumnEnd", "position", "zIndex", "top", "bottom", "inset", "insetX", "insetY", "insetStart", "insetEnd", "visibility"];
273
273
  export declare const widthProperties: readonly ["width", "minWidth", "maxWidth"];
274
274
  export declare const heightProperties: readonly ["size", "height", "minHeight", "maxHeight"];
275
+ export declare const fontProperties: readonly ["font", "fontFamily", "fontWeight", "lineHeight", "fontSize"];
275
276
  export type StylesProp = StyleString<(typeof allowedOverrides)[number] | (typeof widthProperties)[number]>;
276
277
  export type StylesPropWithHeight = StyleString<(typeof allowedOverrides)[number] | (typeof widthProperties)[number] | (typeof heightProperties)[number]>;
277
278
  export type StylesPropWithoutWidth = StyleString<(typeof allowedOverrides)[number]>;
279
+ export type StylesPropWithFont = StyleString<(typeof fontProperties)[number]>;
278
280
  export type UnsafeClassName = string & {
279
281
  properties?: never;
280
282
  };
@@ -295,7 +297,8 @@ export interface StyleProps extends UnsafeStyles {
295
297
  /** Spectrum-defined styles, returned by the `style()` macro. */
296
298
  styles?: StylesProp;
297
299
  }
298
- export declare function getAllowedOverrides({ width, height }?: {
300
+ export declare function getAllowedOverrides({ width, height, font }?: {
301
+ font?: boolean | undefined;
299
302
  height?: boolean | undefined;
300
303
  width?: boolean | undefined;
301
304
  }): string[];
@@ -0,0 +1 @@
1
+ export {CenterBaseline} from '../src/CenterBaseline';
@@ -1,2 +1,2 @@
1
- export {Skeleton, useIsSkeleton} from '../src/Skeleton';
1
+ export {Skeleton, SkeletonContext, useIsSkeleton} from '../src/Skeleton';
2
2
  export type {SkeletonProps} from '../src/Skeleton';
package/exports/index.ts CHANGED
@@ -150,6 +150,8 @@ export {pressScale} from '../src/pressScale';
150
150
 
151
151
  export {mergeStyles} from '../style/runtime';
152
152
 
153
+ export {CenterBaseline} from '../src/CenterBaseline';
154
+
153
155
  export {Autocomplete} from 'react-aria-components/Autocomplete';
154
156
  export {Collection} from 'react-aria/Collection';
155
157
  export {FileTrigger} from 'react-aria-components/FileTrigger';
package/icons/Icon.cjs CHANGED
@@ -71,9 +71,9 @@ const $bde97c91243ed164$var$iconStyles = function anonymous(props, overrides) {
71
71
  if (p[1] === "F") height = true;
72
72
  rules += p[0];
73
73
  }
74
- if (!width) rules += ' Zm131';
75
- if (!height) rules += ' Fn131';
76
- rules += ' _va131';
74
+ if (!width) rules += ' Zm15';
75
+ if (!height) rules += ' Fn15';
76
+ rules += ' _va15';
77
77
  return rules;
78
78
  };
79
79
  function $bde97c91243ed164$export$274edc73af1ae9c8(Component, context = $bde97c91243ed164$export$a49f528ae1a4d0ed) {
@@ -114,20 +114,20 @@ const $bde97c91243ed164$var$illustrationStyles = function anonymous(props, overr
114
114
  rules += p[0];
115
115
  }
116
116
  if (props.size === "L") {
117
- if (!width) rules += ' Zq131';
117
+ if (!width) rules += ' Zq15';
118
118
  } else if (props.size === "M") {
119
- if (!width) rules += ' ZH131';
119
+ if (!width) rules += ' ZH15';
120
120
  } else if (props.size === "S") {
121
- if (!width) rules += ' ZF131';
121
+ if (!width) rules += ' ZF15';
122
122
  }
123
123
  if (props.size === "L") {
124
- if (!height) rules += ' Fr131';
124
+ if (!height) rules += ' Fr15';
125
125
  } else if (props.size === "M") {
126
- if (!height) rules += ' FB131';
126
+ if (!height) rules += ' FB15';
127
127
  } else if (props.size === "S") {
128
- if (!height) rules += ' Fz131';
128
+ if (!height) rules += ' Fz15';
129
129
  }
130
- rules += ' _va131';
130
+ rules += ' _va15';
131
131
  return rules;
132
132
  };
133
133
  function $bde97c91243ed164$export$4d00e7be716a0093(Component) {
package/icons/Icon.css CHANGED
@@ -1,37 +1,37 @@
1
1
  @layer _.a {
2
- .Zm131 {
2
+ .Zm15 {
3
3
  width: calc(1.25rem * var(--s2-scale));
4
4
  }
5
5
 
6
- .Fn131 {
6
+ .Fn15 {
7
7
  height: calc(1.25rem * var(--s2-scale));
8
8
  }
9
9
 
10
- .ZF131 {
10
+ .ZF15 {
11
11
  width: calc(3rem * var(--s2-scale));
12
12
  }
13
13
 
14
- .ZH131 {
14
+ .ZH15 {
15
15
  width: calc(6rem * var(--s2-scale));
16
16
  }
17
17
 
18
- .Zq131 {
18
+ .Zq15 {
19
19
  width: calc(10rem * var(--s2-scale));
20
20
  }
21
21
 
22
- .Fz131 {
22
+ .Fz15 {
23
23
  height: calc(3rem * var(--s2-scale));
24
24
  }
25
25
 
26
- .FB131 {
26
+ .FB15 {
27
27
  height: calc(6rem * var(--s2-scale));
28
28
  }
29
29
 
30
- .Fr131 {
30
+ .Fr15 {
31
31
  height: calc(10rem * var(--s2-scale));
32
32
  }
33
33
 
34
- ._va131 {
34
+ ._va15 {
35
35
  flex-shrink: 0;
36
36
  }
37
37
  }
package/icons/Icon.mjs CHANGED
@@ -62,9 +62,9 @@ const $ac8c32e6775ddd1f$var$iconStyles = function anonymous(props, overrides) {
62
62
  if (p[1] === "F") height = true;
63
63
  rules += p[0];
64
64
  }
65
- if (!width) rules += ' Zm131';
66
- if (!height) rules += ' Fn131';
67
- rules += ' _va131';
65
+ if (!width) rules += ' Zm15';
66
+ if (!height) rules += ' Fn15';
67
+ rules += ' _va15';
68
68
  return rules;
69
69
  };
70
70
  function $ac8c32e6775ddd1f$export$274edc73af1ae9c8(Component, context = $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed) {
@@ -105,20 +105,20 @@ const $ac8c32e6775ddd1f$var$illustrationStyles = function anonymous(props, overr
105
105
  rules += p[0];
106
106
  }
107
107
  if (props.size === "L") {
108
- if (!width) rules += ' Zq131';
108
+ if (!width) rules += ' Zq15';
109
109
  } else if (props.size === "M") {
110
- if (!width) rules += ' ZH131';
110
+ if (!width) rules += ' ZH15';
111
111
  } else if (props.size === "S") {
112
- if (!width) rules += ' ZF131';
112
+ if (!width) rules += ' ZF15';
113
113
  }
114
114
  if (props.size === "L") {
115
- if (!height) rules += ' Fr131';
115
+ if (!height) rules += ' Fr15';
116
116
  } else if (props.size === "M") {
117
- if (!height) rules += ' FB131';
117
+ if (!height) rules += ' FB15';
118
118
  } else if (props.size === "S") {
119
- if (!height) rules += ' Fz131';
119
+ if (!height) rules += ' Fz15';
120
120
  }
121
- rules += ' _va131';
121
+ rules += ' _va15';
122
122
  return rules;
123
123
  };
124
124
  function $ac8c32e6775ddd1f$export$4d00e7be716a0093(Component) {
@@ -99,7 +99,7 @@ function $5eb75e0c130e0669$export$cb6ddd830302c2a8({ children: children }) {
99
99
  // @ts-ignore - compatibility with React < 19
100
100
  inert: (0, $lzdFu$reactariaprivateutilsinertValue.inertValue)(true),
101
101
  ref: $5eb75e0c130e0669$export$6b288fe07640c94c(true),
102
- className: $5eb75e0c130e0669$export$d2353276f167b21f + " pw131 _ma131 oa131 na131 ka131 ja131",
102
+ className: $5eb75e0c130e0669$export$d2353276f167b21f + " pw15 _ma15 oa15 na15 ka15 ja15",
103
103
  children: children
104
104
  });
105
105
  }
@@ -120,7 +120,7 @@ function $5eb75e0c130e0669$export$6069cbe61f690103({ children: children }) {
120
120
  }
121
121
  function $5eb75e0c130e0669$export$4b7803c08fe9a32b(styles) {
122
122
  let isSkeleton = (0, $lzdFu$react.useContext)($5eb75e0c130e0669$export$74e166679b1f49ee);
123
- if (isSkeleton) return (0, $308b180f49d82d28$exports.mergeStyles)(" oa131 na131 ka131 ja131", styles);
123
+ if (isSkeleton) return (0, $308b180f49d82d28$exports.mergeStyles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IACF;IACA,OAAO;QAAC;QAAU;KAAM;AAC1B;AAGO,SAAS,0CAAa,YAAC,QAAQ,EAAwB;IAC5D,qBACE,gCAAC;QACC,6CAA6C;QAC7C,OAAO,CAAA,GAAA,iDAAS,EAAE;QAClB,KAAK,0CAAoB;QACzB,WACE;kBAOD;;AAGP;AAGO,SAAS,0CAAgB,YAAC,QAAQ,EAA8B;IACrE,IAAI,YAAY,CAAA,GAAA,uBAAS,EAAE;IAC3B,IAAI,YAAY,0CAAoB,aAAa;IACjD,IAAI,aAAa,MACf,OAAO;IAGT,IAAI,WACF,SAAS,YAAY,CAAC,OAAO,wBAAwB,CAAC,UAAU,QAAQ,MACnE,SAAS,GAAG,GACb,SAAS,KAAK,CAAC,GAAG;IACxB,qBACE,gCAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B,0BACG,CAAA,GAAA,yBAAW,EAAE,UAAU;YACrB,KAAK,CAAA,GAAA,mCAAQ,EAAE,UAAU;YACzB,WAAW,AAAC,CAAA,SAAS,KAAK,CAAC,SAAS,IAAI,EAAC,IAAK,MAAM;YACpD,6CAA6C;YAC7C,OAAO,CAAA,GAAA,iDAAS,EAAE;QACpB,KACA;;AAGV;AAGO,SAAS,0CAAgB,MAAmB;IACjD,IAAI,aAAa,CAAA,GAAA,uBAAS,EAAE;IAC5B,IAAI,YACF,OAAO,CAAA,GAAA,qCAAU,8BAA+B;IAElD,OAAO,UAAW;AACpB","sources":["packages/@react-spectrum/s2/src/Skeleton.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n cloneElement,\n createContext,\n CSSProperties,\n ReactElement,\n ReactNode,\n Ref,\n useCallback,\n useContext,\n useRef\n} from 'react';\nimport {color, style} from '../style' with {type: 'macro'};\nimport {css} from '../style/style-macro' with {type: 'macro'};\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {mergeRefs} from 'react-aria/mergeRefs';\nimport {mergeStyles} from '../style/runtime';\nimport {StyleString} from '../style/types';\nimport {useMediaQuery} from './useMediaQuery';\n\nexport function useLoadingAnimation(isAnimating: boolean): (element: HTMLElement | null) => void {\n let animationRef = useRef<Animation | null>(null);\n let reduceMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\n return useCallback(\n (element: HTMLElement | null) => {\n if (\n isAnimating &&\n !animationRef.current &&\n element &&\n !reduceMotion &&\n typeof element.animate === 'function'\n ) {\n // Use web animation API instead of CSS animations so that we can\n // synchronize it between all loading elements on the page (via startTime).\n animationRef.current = element.animate(\n [{backgroundPosition: '100%'}, {backgroundPosition: '0%'}],\n {\n duration: 2000,\n iterations: Infinity,\n easing: 'ease-in-out'\n }\n );\n animationRef.current.startTime = 0;\n } else if (!isAnimating && animationRef.current) {\n animationRef.current.cancel();\n animationRef.current = null;\n }\n },\n [isAnimating, reduceMotion]\n );\n}\n\nexport type SkeletonElement = ReactElement<{\n children: ReactNode;\n className?: string;\n ref?: Ref<HTMLElement>;\n inert?: boolean | 'true';\n}>;\n\nexport const SkeletonContext = createContext<boolean | null>(null);\nexport function useIsSkeleton(): boolean {\n return useContext(SkeletonContext) || false;\n}\n\nexport interface SkeletonProps {\n children: ReactNode;\n isLoading: boolean;\n}\n\n/**\n * A Skeleton wraps around content to render it as a placeholder.\n */\nexport function Skeleton({children, isLoading}: SkeletonProps): ReactNode {\n // Disable all form components inside a skeleton.\n return <SkeletonContext.Provider value={isLoading}>{children}</SkeletonContext.Provider>;\n}\n\nexport const loadingStyle = css(\n `\n background-image: linear-gradient(to right, ${color('gray-100')} 33%, light-dark(${color('gray-25')}, ${color('gray-300')}), ${color('gray-100')} 66%);\n background-size: 300%;\n * {\n visibility: hidden;\n }\n`,\n 'L'\n); // add to a separate layer so it overrides default style macro styles\n\nexport function useSkeletonText(\n children: ReactNode,\n style: CSSProperties | undefined\n): [ReactNode, CSSProperties | undefined] {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n children = <SkeletonText>{children}</SkeletonText>;\n style = {\n ...style,\n // This ensures the ellipsis on truncated text is also hidden.\n // -webkit-text-fill-color overrides any `color` property that is also set.\n WebkitTextFillColor: 'transparent'\n };\n }\n return [children, style];\n}\n\n// Rendered inside <Text> to create skeleton line boxes via box-decoration-break.\nexport function SkeletonText({children}: {children: ReactNode}): ReactNode {\n return (\n <span\n // @ts-ignore - compatibility with React < 19\n inert={inertValue(true)}\n ref={useLoadingAnimation(true)}\n className={\n loadingStyle +\n style({\n color: 'transparent',\n boxDecorationBreak: 'clone',\n borderRadius: 'sm'\n })\n }>\n {children}\n </span>\n );\n}\n\n// Clones the child element and displays it with skeleton styling.\nexport function SkeletonWrapper({children}: {children: SkeletonElement}): ReactNode {\n let isLoading = useContext(SkeletonContext);\n let animation = useLoadingAnimation(isLoading || false);\n if (isLoading == null) {\n return children;\n }\n\n let childRef =\n 'ref' in children && !Object.getOwnPropertyDescriptor(children, 'ref')?.get\n ? (children.ref as any)\n : children.props.ref;\n return (\n <SkeletonContext.Provider value={null}>\n {isLoading\n ? cloneElement(children, {\n ref: mergeRefs(childRef, animation),\n className: (children.props.className || '') + ' ' + loadingStyle,\n // @ts-ignore - compatibility with React < 19\n inert: inertValue(true)\n })\n : children}\n </SkeletonContext.Provider>\n );\n}\n\n// Adds default border radius around icons when displayed in a skeleton.\nexport function useSkeletonIcon(styles: StyleString): StyleString {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n return mergeStyles(style({borderRadius: 'sm'}), styles);\n }\n return styles || ('' as StyleString);\n}\n"],"names":[],"version":3,"file":"Skeleton.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;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AAC;QACC,6CAA6C;QAC7C,OAAO,CAAA,GAAA,iDAAS,EAAE;QAClB,KAAK,0CAAoB;QACzB,WACE;kBAOD;;AAGP;AAGO,SAAS,0CAAgB,YAAC,QAAQ,EAA8B;IACrE,IAAI,YAAY,CAAA,GAAA,uBAAS,EAAE;IAC3B,IAAI,YAAY,0CAAoB,aAAa;IACjD,IAAI,aAAa,MACf,OAAO;IAGT,IAAI,WACF,SAAS,YAAY,CAAC,OAAO,wBAAwB,CAAC,UAAU,QAAQ,MACnE,SAAS,GAAG,GACb,SAAS,KAAK,CAAC,GAAG;IACxB,qBACE,gCAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B,0BACG,CAAA,GAAA,yBAAW,EAAE,UAAU;YACrB,KAAK,CAAA,GAAA,mCAAQ,EAAE,UAAU;YACzB,WAAW,AAAC,CAAA,SAAS,KAAK,CAAC,SAAS,IAAI,EAAC,IAAK,MAAM;YACpD,6CAA6C;YAC7C,OAAO,CAAA,GAAA,iDAAS,EAAE;QACpB,KACA;;AAGV;AAGO,SAAS,0CAAgB,MAAmB;IACjD,IAAI,aAAa,CAAA,GAAA,uBAAS,EAAE;IAC5B,IAAI,YACF,OAAO,CAAA,GAAA,qCAAU,0BAA+B;IAElD,OAAO,UAAW;AACpB","sources":["packages/@react-spectrum/s2/src/Skeleton.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n cloneElement,\n createContext,\n CSSProperties,\n ReactElement,\n ReactNode,\n Ref,\n useCallback,\n useContext,\n useRef\n} from 'react';\nimport {color, style} from '../style' with {type: 'macro'};\nimport {css} from '../style/style-macro' with {type: 'macro'};\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {mergeRefs} from 'react-aria/mergeRefs';\nimport {mergeStyles} from '../style/runtime';\nimport {StyleString} from '../style/types';\nimport {useMediaQuery} from './useMediaQuery';\n\nexport function useLoadingAnimation(isAnimating: boolean): (element: HTMLElement | null) => void {\n let animationRef = useRef<Animation | null>(null);\n let reduceMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\n return useCallback(\n (element: HTMLElement | null) => {\n if (\n isAnimating &&\n !animationRef.current &&\n element &&\n !reduceMotion &&\n typeof element.animate === 'function'\n ) {\n // Use web animation API instead of CSS animations so that we can\n // synchronize it between all loading elements on the page (via startTime).\n animationRef.current = element.animate(\n [{backgroundPosition: '100%'}, {backgroundPosition: '0%'}],\n {\n duration: 2000,\n iterations: Infinity,\n easing: 'ease-in-out'\n }\n );\n animationRef.current.startTime = 0;\n } else if (!isAnimating && animationRef.current) {\n animationRef.current.cancel();\n animationRef.current = null;\n }\n },\n [isAnimating, reduceMotion]\n );\n}\n\nexport type SkeletonElement = ReactElement<{\n children: ReactNode;\n className?: string;\n ref?: Ref<HTMLElement>;\n inert?: boolean | 'true';\n}>;\n\nexport const SkeletonContext = createContext<boolean | null>(null);\nexport function useIsSkeleton(): boolean {\n return useContext(SkeletonContext) || false;\n}\n\nexport interface SkeletonProps {\n children: ReactNode;\n isLoading: boolean;\n}\n\n/**\n * A Skeleton wraps around content to render it as a placeholder.\n */\nexport function Skeleton({children, isLoading}: SkeletonProps): ReactNode {\n // Disable all form components inside a skeleton.\n return <SkeletonContext.Provider value={isLoading}>{children}</SkeletonContext.Provider>;\n}\n\nexport const loadingStyle = css(\n `\n background-image: linear-gradient(to right, ${color('gray-100')} 33%, light-dark(${color('gray-25')}, ${color('gray-300')}), ${color('gray-100')} 66%);\n background-size: 300%;\n * {\n visibility: hidden;\n }\n`,\n 'L'\n); // add to a separate layer so it overrides default style macro styles\n\nexport function useSkeletonText(\n children: ReactNode,\n style: CSSProperties | undefined\n): [ReactNode, CSSProperties | undefined] {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n children = <SkeletonText>{children}</SkeletonText>;\n style = {\n ...style,\n // This ensures the ellipsis on truncated text is also hidden.\n // -webkit-text-fill-color overrides any `color` property that is also set.\n WebkitTextFillColor: 'transparent'\n };\n }\n return [children, style];\n}\n\n// Rendered inside <Text> to create skeleton line boxes via box-decoration-break.\nexport function SkeletonText({children}: {children: ReactNode}): ReactNode {\n return (\n <span\n // @ts-ignore - compatibility with React < 19\n inert={inertValue(true)}\n ref={useLoadingAnimation(true)}\n className={\n loadingStyle +\n style({\n color: 'transparent',\n boxDecorationBreak: 'clone',\n borderRadius: 'sm'\n })\n }>\n {children}\n </span>\n );\n}\n\n// Clones the child element and displays it with skeleton styling.\nexport function SkeletonWrapper({children}: {children: SkeletonElement}): ReactNode {\n let isLoading = useContext(SkeletonContext);\n let animation = useLoadingAnimation(isLoading || false);\n if (isLoading == null) {\n return children;\n }\n\n let childRef =\n 'ref' in children && !Object.getOwnPropertyDescriptor(children, 'ref')?.get\n ? (children.ref as any)\n : children.props.ref;\n return (\n <SkeletonContext.Provider value={null}>\n {isLoading\n ? cloneElement(children, {\n ref: mergeRefs(childRef, animation),\n className: (children.props.className || '') + ' ' + loadingStyle,\n // @ts-ignore - compatibility with React < 19\n inert: inertValue(true)\n })\n : children}\n </SkeletonContext.Provider>\n );\n}\n\n// Adds default border radius around icons when displayed in a skeleton.\nexport function useSkeletonIcon(styles: StyleString): StyleString {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n return mergeStyles(style({borderRadius: 'sm'}), styles);\n }\n return styles || ('' as StyleString);\n}\n"],"names":[],"version":3,"file":"Skeleton.cjs.map"}
@@ -12,28 +12,28 @@
12
12
  }
13
13
 
14
14
  @layer _.a {
15
- .pw131 {
15
+ .pw15 {
16
16
  color: #0000;
17
17
  }
18
18
 
19
- ._ma131 {
19
+ ._ma15 {
20
20
  -webkit-box-decoration-break: clone;
21
21
  box-decoration-break: clone;
22
22
  }
23
23
 
24
- .oa131 {
24
+ .oa15 {
25
25
  border-start-start-radius: .25rem;
26
26
  }
27
27
 
28
- .na131 {
28
+ .na15 {
29
29
  border-start-end-radius: .25rem;
30
30
  }
31
31
 
32
- .ka131 {
32
+ .ka15 {
33
33
  border-end-start-radius: .25rem;
34
34
  }
35
35
 
36
- .ja131 {
36
+ .ja15 {
37
37
  border-end-end-radius: .25rem;
38
38
  }
39
39
  }
@@ -86,7 +86,7 @@ function $5ad421ec19460c48$export$cb6ddd830302c2a8({ children: children }) {
86
86
  // @ts-ignore - compatibility with React < 19
87
87
  inert: (0, $cHM3s$inertValue)(true),
88
88
  ref: $5ad421ec19460c48$export$6b288fe07640c94c(true),
89
- className: $5ad421ec19460c48$export$d2353276f167b21f + " pw131 _ma131 oa131 na131 ka131 ja131",
89
+ className: $5ad421ec19460c48$export$d2353276f167b21f + " pw15 _ma15 oa15 na15 ka15 ja15",
90
90
  children: children
91
91
  });
92
92
  }
@@ -107,7 +107,7 @@ function $5ad421ec19460c48$export$6069cbe61f690103({ children: children }) {
107
107
  }
108
108
  function $5ad421ec19460c48$export$4b7803c08fe9a32b(styles) {
109
109
  let isSkeleton = (0, $cHM3s$useContext)($5ad421ec19460c48$export$74e166679b1f49ee);
110
- if (isSkeleton) return (0, $feb886035e0d4633$export$e618dc39ac9ad607)(" oa131 na131 ka131 ja131", styles);
110
+ if (isSkeleton) return (0, $feb886035e0d4633$export$e618dc39ac9ad607)(" oa15 na15 ka15 ja15", styles);
111
111
  return styles || '';
112
112
  }
113
113
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAqBM,SAAS,0CAAoB,WAAoB;IACtD,IAAI,eAAe,CAAA,GAAA,aAAK,EAAoB;IAC5C,IAAI,eAAe,CAAA,GAAA,wCAAY,EAAE;IACjC,OAAO,CAAA,GAAA,kBAAU,EAC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B,IAAI,YAAY,0CAAoB,aAAa;IACjD,IAAI,aAAa,MACf,OAAO;IAGT,IAAI,WACF,SAAS,YAAY,CAAC,OAAO,wBAAwB,CAAC,UAAU,QAAQ,MACnE,SAAS,GAAG,GACb,SAAS,KAAK,CAAC,GAAG;IACxB,qBACE,gBAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B,0BACG,CAAA,GAAA,mBAAW,EAAE,UAAU;YACrB,KAAK,CAAA,GAAA,gBAAQ,EAAE,UAAU;YACzB,WAAW,AAAC,CAAA,SAAS,KAAK,CAAC,SAAS,IAAI,EAAC,IAAK,MAAM;YACpD,6CAA6C;YAC7C,OAAO,CAAA,GAAA,iBAAS,EAAE;QACpB,KACA;;AAGV;AAGO,SAAS,0CAAgB,MAAmB;IACjD,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,YACF,OAAO,CAAA,GAAA,yCAAU,8BAA+B;IAElD,OAAO,UAAW;AACpB","sources":["packages/@react-spectrum/s2/src/Skeleton.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n cloneElement,\n createContext,\n CSSProperties,\n ReactElement,\n ReactNode,\n Ref,\n useCallback,\n useContext,\n useRef\n} from 'react';\nimport {color, style} from '../style' with {type: 'macro'};\nimport {css} from '../style/style-macro' with {type: 'macro'};\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {mergeRefs} from 'react-aria/mergeRefs';\nimport {mergeStyles} from '../style/runtime';\nimport {StyleString} from '../style/types';\nimport {useMediaQuery} from './useMediaQuery';\n\nexport function useLoadingAnimation(isAnimating: boolean): (element: HTMLElement | null) => void {\n let animationRef = useRef<Animation | null>(null);\n let reduceMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\n return useCallback(\n (element: HTMLElement | null) => {\n if (\n isAnimating &&\n !animationRef.current &&\n element &&\n !reduceMotion &&\n typeof element.animate === 'function'\n ) {\n // Use web animation API instead of CSS animations so that we can\n // synchronize it between all loading elements on the page (via startTime).\n animationRef.current = element.animate(\n [{backgroundPosition: '100%'}, {backgroundPosition: '0%'}],\n {\n duration: 2000,\n iterations: Infinity,\n easing: 'ease-in-out'\n }\n );\n animationRef.current.startTime = 0;\n } else if (!isAnimating && animationRef.current) {\n animationRef.current.cancel();\n animationRef.current = null;\n }\n },\n [isAnimating, reduceMotion]\n );\n}\n\nexport type SkeletonElement = ReactElement<{\n children: ReactNode;\n className?: string;\n ref?: Ref<HTMLElement>;\n inert?: boolean | 'true';\n}>;\n\nexport const SkeletonContext = createContext<boolean | null>(null);\nexport function useIsSkeleton(): boolean {\n return useContext(SkeletonContext) || false;\n}\n\nexport interface SkeletonProps {\n children: ReactNode;\n isLoading: boolean;\n}\n\n/**\n * A Skeleton wraps around content to render it as a placeholder.\n */\nexport function Skeleton({children, isLoading}: SkeletonProps): ReactNode {\n // Disable all form components inside a skeleton.\n return <SkeletonContext.Provider value={isLoading}>{children}</SkeletonContext.Provider>;\n}\n\nexport const loadingStyle = css(\n `\n background-image: linear-gradient(to right, ${color('gray-100')} 33%, light-dark(${color('gray-25')}, ${color('gray-300')}), ${color('gray-100')} 66%);\n background-size: 300%;\n * {\n visibility: hidden;\n }\n`,\n 'L'\n); // add to a separate layer so it overrides default style macro styles\n\nexport function useSkeletonText(\n children: ReactNode,\n style: CSSProperties | undefined\n): [ReactNode, CSSProperties | undefined] {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n children = <SkeletonText>{children}</SkeletonText>;\n style = {\n ...style,\n // This ensures the ellipsis on truncated text is also hidden.\n // -webkit-text-fill-color overrides any `color` property that is also set.\n WebkitTextFillColor: 'transparent'\n };\n }\n return [children, style];\n}\n\n// Rendered inside <Text> to create skeleton line boxes via box-decoration-break.\nexport function SkeletonText({children}: {children: ReactNode}): ReactNode {\n return (\n <span\n // @ts-ignore - compatibility with React < 19\n inert={inertValue(true)}\n ref={useLoadingAnimation(true)}\n className={\n loadingStyle +\n style({\n color: 'transparent',\n boxDecorationBreak: 'clone',\n borderRadius: 'sm'\n })\n }>\n {children}\n </span>\n );\n}\n\n// Clones the child element and displays it with skeleton styling.\nexport function SkeletonWrapper({children}: {children: SkeletonElement}): ReactNode {\n let isLoading = useContext(SkeletonContext);\n let animation = useLoadingAnimation(isLoading || false);\n if (isLoading == null) {\n return children;\n }\n\n let childRef =\n 'ref' in children && !Object.getOwnPropertyDescriptor(children, 'ref')?.get\n ? (children.ref as any)\n : children.props.ref;\n return (\n <SkeletonContext.Provider value={null}>\n {isLoading\n ? cloneElement(children, {\n ref: mergeRefs(childRef, animation),\n className: (children.props.className || '') + ' ' + loadingStyle,\n // @ts-ignore - compatibility with React < 19\n inert: inertValue(true)\n })\n : children}\n </SkeletonContext.Provider>\n );\n}\n\n// Adds default border radius around icons when displayed in a skeleton.\nexport function useSkeletonIcon(styles: StyleString): StyleString {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n return mergeStyles(style({borderRadius: 'sm'}), styles);\n }\n return styles || ('' as StyleString);\n}\n"],"names":[],"version":3,"file":"Skeleton.mjs.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAqBM,SAAS,0CAAoB,WAAoB;IACtD,IAAI,eAAe,CAAA,GAAA,aAAK,EAAoB;IAC5C,IAAI,eAAe,CAAA,GAAA,wCAAY,EAAE;IACjC,OAAO,CAAA,GAAA,kBAAU,EACf,CAAC;QACC,IACE,eACA,CAAC,aAAa,OAAO,IACrB,WACA,CAAC,gBACD,OAAO,QAAQ,OAAO,KAAK,YAC3B;YACA,iEAAiE;YACj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UAAU,QAAQ,MACnE,SAAS,GAAG,GACb,SAAS,KAAK,CAAC,GAAG;IACxB,qBACE,gBAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B,0BACG,CAAA,GAAA,mBAAW,EAAE,UAAU;YACrB,KAAK,CAAA,GAAA,gBAAQ,EAAE,UAAU;YACzB,WAAW,AAAC,CAAA,SAAS,KAAK,CAAC,SAAS,IAAI,EAAC,IAAK,MAAM;YACpD,6CAA6C;YAC7C,OAAO,CAAA,GAAA,iBAAS,EAAE;QACpB,KACA;;AAGV;AAGO,SAAS,0CAAgB,MAAmB;IACjD,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,YACF,OAAO,CAAA,GAAA,yCAAU,0BAA+B;IAElD,OAAO,UAAW;AACpB","sources":["packages/@react-spectrum/s2/src/Skeleton.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n cloneElement,\n createContext,\n CSSProperties,\n ReactElement,\n ReactNode,\n Ref,\n useCallback,\n useContext,\n useRef\n} from 'react';\nimport {color, style} from '../style' with {type: 'macro'};\nimport {css} from '../style/style-macro' with {type: 'macro'};\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {mergeRefs} from 'react-aria/mergeRefs';\nimport {mergeStyles} from '../style/runtime';\nimport {StyleString} from '../style/types';\nimport {useMediaQuery} from './useMediaQuery';\n\nexport function useLoadingAnimation(isAnimating: boolean): (element: HTMLElement | null) => void {\n let animationRef = useRef<Animation | null>(null);\n let reduceMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\n return useCallback(\n (element: HTMLElement | null) => {\n if (\n isAnimating &&\n !animationRef.current &&\n element &&\n !reduceMotion &&\n typeof element.animate === 'function'\n ) {\n // Use web animation API instead of CSS animations so that we can\n // synchronize it between all loading elements on the page (via startTime).\n animationRef.current = element.animate(\n [{backgroundPosition: '100%'}, {backgroundPosition: '0%'}],\n {\n duration: 2000,\n iterations: Infinity,\n easing: 'ease-in-out'\n }\n );\n animationRef.current.startTime = 0;\n } else if (!isAnimating && animationRef.current) {\n animationRef.current.cancel();\n animationRef.current = null;\n }\n },\n [isAnimating, reduceMotion]\n );\n}\n\nexport type SkeletonElement = ReactElement<{\n children: ReactNode;\n className?: string;\n ref?: Ref<HTMLElement>;\n inert?: boolean | 'true';\n}>;\n\nexport const SkeletonContext = createContext<boolean | null>(null);\nexport function useIsSkeleton(): boolean {\n return useContext(SkeletonContext) || false;\n}\n\nexport interface SkeletonProps {\n children: ReactNode;\n isLoading: boolean;\n}\n\n/**\n * A Skeleton wraps around content to render it as a placeholder.\n */\nexport function Skeleton({children, isLoading}: SkeletonProps): ReactNode {\n // Disable all form components inside a skeleton.\n return <SkeletonContext.Provider value={isLoading}>{children}</SkeletonContext.Provider>;\n}\n\nexport const loadingStyle = css(\n `\n background-image: linear-gradient(to right, ${color('gray-100')} 33%, light-dark(${color('gray-25')}, ${color('gray-300')}), ${color('gray-100')} 66%);\n background-size: 300%;\n * {\n visibility: hidden;\n }\n`,\n 'L'\n); // add to a separate layer so it overrides default style macro styles\n\nexport function useSkeletonText(\n children: ReactNode,\n style: CSSProperties | undefined\n): [ReactNode, CSSProperties | undefined] {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n children = <SkeletonText>{children}</SkeletonText>;\n style = {\n ...style,\n // This ensures the ellipsis on truncated text is also hidden.\n // -webkit-text-fill-color overrides any `color` property that is also set.\n WebkitTextFillColor: 'transparent'\n };\n }\n return [children, style];\n}\n\n// Rendered inside <Text> to create skeleton line boxes via box-decoration-break.\nexport function SkeletonText({children}: {children: ReactNode}): ReactNode {\n return (\n <span\n // @ts-ignore - compatibility with React < 19\n inert={inertValue(true)}\n ref={useLoadingAnimation(true)}\n className={\n loadingStyle +\n style({\n color: 'transparent',\n boxDecorationBreak: 'clone',\n borderRadius: 'sm'\n })\n }>\n {children}\n </span>\n );\n}\n\n// Clones the child element and displays it with skeleton styling.\nexport function SkeletonWrapper({children}: {children: SkeletonElement}): ReactNode {\n let isLoading = useContext(SkeletonContext);\n let animation = useLoadingAnimation(isLoading || false);\n if (isLoading == null) {\n return children;\n }\n\n let childRef =\n 'ref' in children && !Object.getOwnPropertyDescriptor(children, 'ref')?.get\n ? (children.ref as any)\n : children.props.ref;\n return (\n <SkeletonContext.Provider value={null}>\n {isLoading\n ? cloneElement(children, {\n ref: mergeRefs(childRef, animation),\n className: (children.props.className || '') + ' ' + loadingStyle,\n // @ts-ignore - compatibility with React < 19\n inert: inertValue(true)\n })\n : children}\n </SkeletonContext.Provider>\n );\n}\n\n// Adds default border radius around icons when displayed in a skeleton.\nexport function useSkeletonIcon(styles: StyleString): StyleString {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n return mergeStyles(style({borderRadius: 'sm'}), styles);\n }\n return styles || ('' as StyleString);\n}\n"],"names":[],"version":3,"file":"Skeleton.mjs.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/s2",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Spectrum 2 UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -83,10 +83,10 @@
83
83
  "@internationalized/date": "^3.12.2",
84
84
  "@internationalized/number": "^3.6.7",
85
85
  "@parcel/macros": "^2.16.3",
86
- "@react-types/shared": "^3.35.0",
87
- "react-aria": "3.49.0",
88
- "react-aria-components": "1.18.0",
89
- "react-stately": "3.47.0"
86
+ "@react-types/shared": "^3.36.0",
87
+ "react-aria": "3.50.0",
88
+ "react-aria-components": "1.19.0",
89
+ "react-stately": "3.48.0"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "react": "^19.0.0-rc.1",
@@ -96,5 +96,5 @@
96
96
  "page": "dist/page.cjs",
97
97
  "style-main": "style/dist/main.cjs",
98
98
  "style-module": "style/dist/module.mjs",
99
- "gitHead": "3577a20859b9585a000010c720f6ee39c1c588cc"
99
+ "gitHead": "1c84a49a1faf50b571c84e00bcf9c60b22ddd03e"
100
100
  }
package/src/ActionBar.tsx CHANGED
@@ -30,7 +30,6 @@ import {
30
30
  import {DOMProps, DOMRef, DOMRefValue, Key} from '@react-types/shared';
31
31
  import {FocusScope} from 'react-aria/FocusScope';
32
32
  import intlMessages from '../intl/*.json';
33
- // @ts-ignore
34
33
  import {lightDark, style} from '../style' with {type: 'macro'};
35
34
  import {StyleProps} from './style-utils' with {type: 'macro'};
36
35
  import {useControlledState} from 'react-stately/useControlledState';
@@ -34,7 +34,6 @@ import {createContext, forwardRef, ReactNode, useContext} from 'react';
34
34
  import {FocusableRef, FocusableRefValue, GlobalDOMAttributes} from '@react-types/shared';
35
35
  import {IconContext} from './Icon';
36
36
  import {ImageContext} from './Image';
37
- // @ts-ignore
38
37
  import intlMessages from '../intl/*.json';
39
38
  import {NotificationBadgeContext} from './NotificationBadge';
40
39
  import {OverlayTriggerStateContext} from 'react-aria-components/Dialog';
@@ -16,7 +16,6 @@ import {ContextValue} from 'react-aria-components/slots';
16
16
  import {createContext, forwardRef} from 'react';
17
17
  import {filterDOMProps} from 'react-aria/filterDOMProps';
18
18
  import {forwardRefType} from './types';
19
- // @ts-ignore
20
19
  import intlMessages from '../intl/*.json';
21
20
  import {Menu, MenuProps, MenuTrigger, MenuTriggerProps} from './Menu';
22
21
  import MoreIcon from '../s2wf-icons/S2_Icon_More_20_N.svg';
@@ -20,7 +20,6 @@ import {Dialog} from './Dialog';
20
20
  import {DOMProps, DOMRef} from '@react-types/shared';
21
21
  import {forwardRef, ReactNode} from 'react';
22
22
  import {IconContext} from './Icon';
23
- // @ts-ignore
24
23
  import intlMessages from '../intl/*.json';
25
24
  import NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg';
26
25
  import {Provider} from 'react-aria-components/slots';
@@ -11,14 +11,12 @@
11
11
  */
12
12
 
13
13
  import {ActionButton} from './ActionButton';
14
-
15
14
  import {
16
15
  Breadcrumb as AriaBreadcrumb,
17
16
  BreadcrumbProps as AriaBreadcrumbItemProps,
18
17
  BreadcrumbsProps as AriaBreadcrumbsProps,
19
18
  Breadcrumbs as RACBreadcrumbs
20
19
  } from 'react-aria-components/Breadcrumbs';
21
-
22
20
  import {baseColor, focusRing, size, style} from '../style' with {type: 'macro'};
23
21
  import ChevronIcon from '../ui-icons/Chevron';
24
22
  import {
@@ -56,13 +54,11 @@ import {
56
54
  } from 'react';
57
55
  import FolderIcon from '../s2wf-icons/S2_Icon_FolderBreadcrumb_20_N.svg';
58
56
  import {forwardRefType} from './types';
59
- // @ts-ignore
60
57
  import {HeadingContext} from 'react-aria-components/Heading';
61
58
  import {inertValue} from 'react-aria/private/utils/inertValue';
62
59
  import intlMessages from '../intl/*.json';
63
60
  import {Link, LinkRenderProps} from 'react-aria-components/Link';
64
61
  import {Menu, MenuItem, MenuTrigger} from './Menu';
65
- // @ts-ignore
66
62
  import {Text} from './Content';
67
63
  import {useDOMRef} from './useDOMRef';
68
64
  import {useLayoutEffect} from 'react-aria/private/utils/useLayoutEffect';
package/src/Button.tsx CHANGED
@@ -29,7 +29,6 @@ import {FocusableRef, FocusableRefValue, GlobalDOMAttributes} from '@react-types
29
29
  import {IconContext} from './Icon';
30
30
  import intlMessages from '../intl/*.json';
31
31
  import {linearGradient} from '../style/spectrum-theme' with {type: 'macro'};
32
- // @ts-ignore
33
32
  import {Link, LinkProps} from 'react-aria-components/Link';
34
33
  import {OverlayTriggerStateContext} from 'react-aria-components/Dialog';
35
34
  import {pressScale} from './pressScale';
@@ -65,6 +65,7 @@ const buttongroup = style<ButtonGroupStyleProps>(
65
65
  {
66
66
  display: 'inline-flex',
67
67
  position: 'relative',
68
+ maxWidth: 'full',
68
69
  gap: {
69
70
  size: {
70
71
  S: 8,
package/src/Calendar.tsx CHANGED
@@ -40,7 +40,6 @@ import {forwardRefType, GlobalDOMAttributes} from '@react-types/shared';
40
40
  import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
41
41
  import {Header, HeaderContext, HeadingContext} from './Content';
42
42
  import {helpTextStyles} from './Field';
43
- // @ts-ignore
44
43
  import intlMessages from '../intl/*.json';
45
44
  import {pressScale} from './pressScale';
46
45
  import {RangeCalendarContext, RangeCalendarStateContext} from 'react-aria-components/RangeCalendar';
@@ -30,6 +30,23 @@ const styles = style({
30
30
  alignItems: 'center'
31
31
  });
32
32
 
33
+ /**
34
+ * Vertically centers its children against the surrounding text baseline.
35
+ * Use this to align icons or other inline elements with adjacent text without
36
+ * breaking baseline alignment.
37
+ *
38
+ * @example
39
+ * import {CenterBaseline} from '@react-spectrum/s2/CenterBaseline';
40
+ * import {style} from '@react-spectrum/s2/style' with {type: 'macro'};
41
+ * import CheckmarkIcon from '@react-spectrum/s2/icons/Checkmark';
42
+ *
43
+ * <span className={style({display: 'flex', gap: 4, alignItems: 'baseline'})}>
44
+ * <CenterBaseline>
45
+ * <CheckmarkIcon />
46
+ * </CenterBaseline>
47
+ * <span>Done</span>
48
+ * </span>;
49
+ */
33
50
  export function CenterBaseline(props: CenterBaselineProps): ReactNode {
34
51
  let domProps = filterDOMProps(props);
35
52
  return (
@@ -22,7 +22,6 @@ import {
22
22
  import {createContext, forwardRef} from 'react';
23
23
  import CrossIcon from '../ui-icons/Cross';
24
24
  import {FocusableRef, FocusableRefValue} from '@react-types/shared';
25
- // @ts-ignore
26
25
  import intlMessages from '../intl/*.json';
27
26
  import {pressScale} from './pressScale';
28
27
  import {useFocusableRef} from './useDOMRef';
package/src/ComboBox.tsx CHANGED
@@ -77,7 +77,6 @@ import {forwardRefType} from './types';
77
77
  import {HeaderContext, HeadingContext, Text, TextContext} from './Content';
78
78
  import {IconContext} from './Icon';
79
79
  import {InputContext, InputProps} from 'react-aria-components/Input';
80
- // @ts-ignore
81
80
  import intlMessages from '../intl/*.json';
82
81
  import {ListLayout} from 'react-stately/useVirtualizerState';
83
82
  import {mergeRefs} from 'react-aria/mergeRefs';
@@ -17,7 +17,6 @@ import intlMessages from '../intl/*.json';
17
17
  import {mergeProps} from 'react-aria/mergeProps';
18
18
  import {mergeStyles} from '../style/runtime';
19
19
  import {Placement} from 'react-aria-components/Popover';
20
- // @ts-ignore
21
20
  import {Popover, PopoverDialogProps} from './Popover';
22
21
  import {space, style} from '../style' with {type: 'macro'};
23
22
  import {StyleProps} from './style-utils' with {type: 'macro'};
@@ -27,7 +26,7 @@ import {useLabels} from 'react-aria/private/utils/useLabels';
27
26
  import {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';
28
27
  import {useSpectrumContextProps} from './useSpectrumContextProps';
29
28
 
30
- export interface ContextualHelpPopoverProps extends PopoverDialogProps {
29
+ export interface ContextualHelpPopoverProps extends Omit<PopoverDialogProps, 'isNonModal'> {
31
30
  /**
32
31
  * The children of the contextual help popover. Supports Heading, Content, and Footer elements.
33
32
  */
@@ -48,7 +48,6 @@ import {
48
48
  SpectrumLabelableProps
49
49
  } from '@react-types/shared';
50
50
  import {IconContext} from './Icon';
51
- // @ts-ignore
52
51
  import intlMessages from '../intl/*.json';
53
52
  import {Popover} from './Popover';
54
53
  import {PopoverProps} from 'react-aria-components/Popover';
@@ -33,7 +33,6 @@ import {
33
33
  HelpTextProps,
34
34
  SpectrumLabelableProps
35
35
  } from '@react-types/shared';
36
- // @ts-ignore
37
36
  import intlMessages from '../intl/*.json';
38
37
  import {PopoverProps} from 'react-aria-components/Popover';
39
38
  import {RangeCalendar, RangeCalendarProps} from './RangeCalendar';