@react-spectrum/s2 0.5.0 → 0.6.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 (598) hide show
  1. package/dist/Accordion.cjs +5 -8
  2. package/dist/Accordion.cjs.map +1 -1
  3. package/dist/Accordion.css +2 -2
  4. package/dist/Accordion.css.map +1 -1
  5. package/dist/Accordion.mjs +5 -8
  6. package/dist/Accordion.mjs.map +1 -1
  7. package/dist/ActionBar.cjs +264 -0
  8. package/dist/ActionBar.cjs.map +1 -0
  9. package/dist/ActionBar.css +267 -0
  10. package/dist/ActionBar.css.map +1 -0
  11. package/dist/ActionBar.mjs +257 -0
  12. package/dist/ActionBar.mjs.map +1 -0
  13. package/dist/ActionButton.cjs +121 -147
  14. package/dist/ActionButton.cjs.map +1 -1
  15. package/dist/ActionButton.css +133 -153
  16. package/dist/ActionButton.css.map +1 -1
  17. package/dist/ActionButton.mjs +122 -148
  18. package/dist/ActionButton.mjs.map +1 -1
  19. package/dist/ActionButtonGroup.cjs +6 -9
  20. package/dist/ActionButtonGroup.cjs.map +1 -1
  21. package/dist/ActionButtonGroup.css +3 -3
  22. package/dist/ActionButtonGroup.css.map +1 -1
  23. package/dist/ActionButtonGroup.mjs +6 -9
  24. package/dist/ActionButtonGroup.mjs.map +1 -1
  25. package/dist/ActionMenu.cjs +2 -5
  26. package/dist/ActionMenu.cjs.map +1 -1
  27. package/dist/ActionMenu.mjs +2 -5
  28. package/dist/ActionMenu.mjs.map +1 -1
  29. package/dist/AlertDialog.cjs +2 -5
  30. package/dist/AlertDialog.cjs.map +1 -1
  31. package/dist/AlertDialog.css.map +1 -1
  32. package/dist/AlertDialog.mjs +2 -5
  33. package/dist/AlertDialog.mjs.map +1 -1
  34. package/dist/Avatar.cjs +12 -15
  35. package/dist/Avatar.cjs.map +1 -1
  36. package/dist/Avatar.css +11 -11
  37. package/dist/Avatar.css.map +1 -1
  38. package/dist/Avatar.mjs +12 -15
  39. package/dist/Avatar.mjs.map +1 -1
  40. package/dist/AvatarGroup.cjs +99 -102
  41. package/dist/AvatarGroup.cjs.map +1 -1
  42. package/dist/AvatarGroup.css +31 -31
  43. package/dist/AvatarGroup.css.map +1 -1
  44. package/dist/AvatarGroup.mjs +99 -102
  45. package/dist/AvatarGroup.mjs.map +1 -1
  46. package/dist/Badge.cjs +99 -102
  47. package/dist/Badge.cjs.map +1 -1
  48. package/dist/Badge.css +76 -76
  49. package/dist/Badge.css.map +1 -1
  50. package/dist/Badge.mjs +99 -102
  51. package/dist/Badge.mjs.map +1 -1
  52. package/dist/Breadcrumbs.cjs +93 -94
  53. package/dist/Breadcrumbs.cjs.map +1 -1
  54. package/dist/Breadcrumbs.css +70 -64
  55. package/dist/Breadcrumbs.css.map +1 -1
  56. package/dist/Breadcrumbs.mjs +94 -95
  57. package/dist/Breadcrumbs.mjs.map +1 -1
  58. package/dist/Button.cjs +305 -278
  59. package/dist/Button.cjs.map +1 -1
  60. package/dist/Button.css +255 -182
  61. package/dist/Button.css.map +1 -1
  62. package/dist/Button.mjs +307 -280
  63. package/dist/Button.mjs.map +1 -1
  64. package/dist/ButtonGroup.cjs +17 -20
  65. package/dist/ButtonGroup.cjs.map +1 -1
  66. package/dist/ButtonGroup.css +11 -11
  67. package/dist/ButtonGroup.css.map +1 -1
  68. package/dist/ButtonGroup.mjs +18 -21
  69. package/dist/ButtonGroup.mjs.map +1 -1
  70. package/dist/Card.cjs +167 -167
  71. package/dist/Card.css +121 -121
  72. package/dist/Card.mjs +167 -167
  73. package/dist/CardView.cjs +47 -21
  74. package/dist/CardView.cjs.map +1 -1
  75. package/dist/CardView.css +39 -15
  76. package/dist/CardView.css.map +1 -1
  77. package/dist/CardView.mjs +49 -23
  78. package/dist/CardView.mjs.map +1 -1
  79. package/dist/CenterBaseline.cjs +1 -1
  80. package/dist/CenterBaseline.css +2 -2
  81. package/dist/CenterBaseline.mjs +1 -1
  82. package/dist/Checkbox.cjs +58 -62
  83. package/dist/Checkbox.cjs.map +1 -1
  84. package/dist/Checkbox.css +54 -54
  85. package/dist/Checkbox.css.map +1 -1
  86. package/dist/Checkbox.mjs +59 -63
  87. package/dist/Checkbox.mjs.map +1 -1
  88. package/dist/CheckboxGroup.cjs +43 -45
  89. package/dist/CheckboxGroup.cjs.map +1 -1
  90. package/dist/CheckboxGroup.css +32 -32
  91. package/dist/CheckboxGroup.css.map +1 -1
  92. package/dist/CheckboxGroup.mjs +44 -46
  93. package/dist/CheckboxGroup.mjs.map +1 -1
  94. package/dist/ClearButton.cjs +7 -8
  95. package/dist/ClearButton.cjs.map +1 -1
  96. package/dist/ClearButton.css +5 -5
  97. package/dist/ClearButton.css.map +1 -1
  98. package/dist/ClearButton.mjs +7 -8
  99. package/dist/ClearButton.mjs.map +1 -1
  100. package/dist/CloseButton.cjs +40 -53
  101. package/dist/CloseButton.cjs.map +1 -1
  102. package/dist/CloseButton.css +45 -49
  103. package/dist/CloseButton.css.map +1 -1
  104. package/dist/CloseButton.mjs +40 -53
  105. package/dist/CloseButton.mjs.map +1 -1
  106. package/dist/ColorArea.cjs +12 -15
  107. package/dist/ColorArea.cjs.map +1 -1
  108. package/dist/ColorArea.css +10 -10
  109. package/dist/ColorArea.css.map +1 -1
  110. package/dist/ColorArea.mjs +12 -15
  111. package/dist/ColorArea.mjs.map +1 -1
  112. package/dist/ColorField.cjs +31 -34
  113. package/dist/ColorField.cjs.map +1 -1
  114. package/dist/ColorField.css +24 -24
  115. package/dist/ColorField.css.map +1 -1
  116. package/dist/ColorField.mjs +32 -35
  117. package/dist/ColorField.mjs.map +1 -1
  118. package/dist/ColorHandle.cjs +11 -11
  119. package/dist/ColorHandle.css +19 -19
  120. package/dist/ColorHandle.mjs +11 -11
  121. package/dist/ColorSlider.cjs +43 -46
  122. package/dist/ColorSlider.cjs.map +1 -1
  123. package/dist/ColorSlider.css +43 -43
  124. package/dist/ColorSlider.css.map +1 -1
  125. package/dist/ColorSlider.mjs +44 -47
  126. package/dist/ColorSlider.mjs.map +1 -1
  127. package/dist/ColorSwatch.cjs +8 -11
  128. package/dist/ColorSwatch.cjs.map +1 -1
  129. package/dist/ColorSwatch.css +14 -14
  130. package/dist/ColorSwatch.css.map +1 -1
  131. package/dist/ColorSwatch.mjs +9 -12
  132. package/dist/ColorSwatch.mjs.map +1 -1
  133. package/dist/ColorSwatchPicker.cjs +15 -18
  134. package/dist/ColorSwatchPicker.cjs.map +1 -1
  135. package/dist/ColorSwatchPicker.css +33 -33
  136. package/dist/ColorSwatchPicker.css.map +1 -1
  137. package/dist/ColorSwatchPicker.mjs +15 -18
  138. package/dist/ColorSwatchPicker.mjs.map +1 -1
  139. package/dist/ColorWheel.cjs +18 -21
  140. package/dist/ColorWheel.cjs.map +1 -1
  141. package/dist/ColorWheel.css +15 -15
  142. package/dist/ColorWheel.css.map +1 -1
  143. package/dist/ColorWheel.mjs +18 -21
  144. package/dist/ColorWheel.mjs.map +1 -1
  145. package/dist/ComboBox.cjs +61 -61
  146. package/dist/ComboBox.cjs.map +1 -1
  147. package/dist/ComboBox.css +52 -52
  148. package/dist/ComboBox.css.map +1 -1
  149. package/dist/ComboBox.mjs +62 -62
  150. package/dist/ComboBox.mjs.map +1 -1
  151. package/dist/Content.cjs +12 -19
  152. package/dist/Content.cjs.map +1 -1
  153. package/dist/Content.mjs +12 -19
  154. package/dist/Content.mjs.map +1 -1
  155. package/dist/ContextualHelp.cjs +7 -10
  156. package/dist/ContextualHelp.cjs.map +1 -1
  157. package/dist/ContextualHelp.css +23 -23
  158. package/dist/ContextualHelp.css.map +1 -1
  159. package/dist/ContextualHelp.mjs +7 -10
  160. package/dist/ContextualHelp.mjs.map +1 -1
  161. package/dist/CustomDialog.cjs +10 -13
  162. package/dist/CustomDialog.cjs.map +1 -1
  163. package/dist/CustomDialog.css +9 -9
  164. package/dist/CustomDialog.css.map +1 -1
  165. package/dist/CustomDialog.mjs +10 -13
  166. package/dist/CustomDialog.mjs.map +1 -1
  167. package/dist/Dialog.cjs +12 -16
  168. package/dist/Dialog.cjs.map +1 -1
  169. package/dist/Dialog.css +39 -39
  170. package/dist/Dialog.css.map +1 -1
  171. package/dist/Dialog.mjs +12 -16
  172. package/dist/Dialog.mjs.map +1 -1
  173. package/dist/Disclosure.cjs +60 -69
  174. package/dist/Disclosure.cjs.map +1 -1
  175. package/dist/Disclosure.css +49 -49
  176. package/dist/Disclosure.css.map +1 -1
  177. package/dist/Disclosure.mjs +61 -70
  178. package/dist/Disclosure.mjs.map +1 -1
  179. package/dist/Divider.cjs +15 -19
  180. package/dist/Divider.cjs.map +1 -1
  181. package/dist/Divider.css +18 -18
  182. package/dist/Divider.css.map +1 -1
  183. package/dist/Divider.mjs +15 -19
  184. package/dist/Divider.mjs.map +1 -1
  185. package/dist/DropZone.cjs +30 -33
  186. package/dist/DropZone.cjs.map +1 -1
  187. package/dist/DropZone.css +26 -26
  188. package/dist/DropZone.css.map +1 -1
  189. package/dist/DropZone.mjs +30 -33
  190. package/dist/DropZone.mjs.map +1 -1
  191. package/dist/Field.cjs +133 -131
  192. package/dist/Field.cjs.map +1 -1
  193. package/dist/Field.css +76 -84
  194. package/dist/Field.css.map +1 -1
  195. package/dist/Field.mjs +133 -131
  196. package/dist/Field.mjs.map +1 -1
  197. package/dist/Form.cjs +6 -9
  198. package/dist/Form.cjs.map +1 -1
  199. package/dist/Form.css +3 -3
  200. package/dist/Form.css.map +1 -1
  201. package/dist/Form.mjs +6 -9
  202. package/dist/Form.mjs.map +1 -1
  203. package/dist/FullscreenDialog.cjs +7 -10
  204. package/dist/FullscreenDialog.cjs.map +1 -1
  205. package/dist/FullscreenDialog.css +54 -54
  206. package/dist/FullscreenDialog.css.map +1 -1
  207. package/dist/FullscreenDialog.mjs +7 -10
  208. package/dist/FullscreenDialog.mjs.map +1 -1
  209. package/dist/IllustratedMessage.cjs +128 -132
  210. package/dist/IllustratedMessage.cjs.map +1 -1
  211. package/dist/IllustratedMessage.css +58 -58
  212. package/dist/IllustratedMessage.css.map +1 -1
  213. package/dist/IllustratedMessage.mjs +128 -132
  214. package/dist/IllustratedMessage.mjs.map +1 -1
  215. package/dist/Image.cjs +12 -13
  216. package/dist/Image.cjs.map +1 -1
  217. package/dist/Image.css +11 -11
  218. package/dist/Image.css.map +1 -1
  219. package/dist/Image.mjs +13 -14
  220. package/dist/Image.mjs.map +1 -1
  221. package/dist/InlineAlert.cjs +75 -84
  222. package/dist/InlineAlert.cjs.map +1 -1
  223. package/dist/InlineAlert.css +59 -63
  224. package/dist/InlineAlert.css.map +1 -1
  225. package/dist/InlineAlert.mjs +76 -85
  226. package/dist/InlineAlert.mjs.map +1 -1
  227. package/dist/Link.cjs +36 -39
  228. package/dist/Link.cjs.map +1 -1
  229. package/dist/Link.css +42 -42
  230. package/dist/Link.css.map +1 -1
  231. package/dist/Link.mjs +37 -40
  232. package/dist/Link.mjs.map +1 -1
  233. package/dist/Menu.cjs +322 -234
  234. package/dist/Menu.cjs.map +1 -1
  235. package/dist/Menu.css +118 -116
  236. package/dist/Menu.css.map +1 -1
  237. package/dist/Menu.mjs +323 -235
  238. package/dist/Menu.mjs.map +1 -1
  239. package/dist/Meter.cjs +66 -70
  240. package/dist/Meter.cjs.map +1 -1
  241. package/dist/Meter.css +69 -73
  242. package/dist/Meter.css.map +1 -1
  243. package/dist/Meter.mjs +66 -70
  244. package/dist/Meter.mjs.map +1 -1
  245. package/dist/Modal.cjs +36 -45
  246. package/dist/Modal.cjs.map +1 -1
  247. package/dist/Modal.css +48 -72
  248. package/dist/Modal.css.map +1 -1
  249. package/dist/Modal.mjs +37 -46
  250. package/dist/Modal.mjs.map +1 -1
  251. package/dist/NumberField.cjs +66 -69
  252. package/dist/NumberField.cjs.map +1 -1
  253. package/dist/NumberField.css +70 -70
  254. package/dist/NumberField.css.map +1 -1
  255. package/dist/NumberField.mjs +67 -70
  256. package/dist/NumberField.mjs.map +1 -1
  257. package/dist/Picker.cjs +122 -122
  258. package/dist/Picker.cjs.map +1 -1
  259. package/dist/Picker.css +84 -84
  260. package/dist/Picker.css.map +1 -1
  261. package/dist/Picker.mjs +123 -123
  262. package/dist/Picker.mjs.map +1 -1
  263. package/dist/Popover.cjs +47 -69
  264. package/dist/Popover.cjs.map +1 -1
  265. package/dist/Popover.css +55 -126
  266. package/dist/Popover.css.map +1 -1
  267. package/dist/Popover.mjs +48 -70
  268. package/dist/Popover.mjs.map +1 -1
  269. package/dist/ProgressBar.cjs +85 -87
  270. package/dist/ProgressBar.cjs.map +1 -1
  271. package/dist/ProgressBar.css +81 -85
  272. package/dist/ProgressBar.css.map +1 -1
  273. package/dist/ProgressBar.mjs +85 -87
  274. package/dist/ProgressBar.mjs.map +1 -1
  275. package/dist/ProgressCircle.cjs +16 -18
  276. package/dist/ProgressCircle.cjs.map +1 -1
  277. package/dist/ProgressCircle.css +16 -16
  278. package/dist/ProgressCircle.css.map +1 -1
  279. package/dist/ProgressCircle.mjs +16 -18
  280. package/dist/ProgressCircle.mjs.map +1 -1
  281. package/dist/Provider.cjs +5 -5
  282. package/dist/Provider.css +6 -6
  283. package/dist/Provider.mjs +5 -5
  284. package/dist/Radio.cjs +54 -58
  285. package/dist/Radio.cjs.map +1 -1
  286. package/dist/Radio.css +50 -50
  287. package/dist/Radio.css.map +1 -1
  288. package/dist/Radio.mjs +55 -59
  289. package/dist/Radio.mjs.map +1 -1
  290. package/dist/RadioGroup.cjs +39 -43
  291. package/dist/RadioGroup.cjs.map +1 -1
  292. package/dist/RadioGroup.css +32 -32
  293. package/dist/RadioGroup.css.map +1 -1
  294. package/dist/RadioGroup.mjs +40 -44
  295. package/dist/RadioGroup.mjs.map +1 -1
  296. package/dist/RangeSlider.cjs +2 -3
  297. package/dist/RangeSlider.cjs.map +1 -1
  298. package/dist/RangeSlider.mjs +3 -4
  299. package/dist/RangeSlider.mjs.map +1 -1
  300. package/dist/SearchField.cjs +34 -37
  301. package/dist/SearchField.cjs.map +1 -1
  302. package/dist/SearchField.css +30 -30
  303. package/dist/SearchField.css.map +1 -1
  304. package/dist/SearchField.mjs +35 -38
  305. package/dist/SearchField.mjs.map +1 -1
  306. package/dist/SegmentedControl.cjs +67 -73
  307. package/dist/SegmentedControl.cjs.map +1 -1
  308. package/dist/SegmentedControl.css +63 -63
  309. package/dist/SegmentedControl.css.map +1 -1
  310. package/dist/SegmentedControl.mjs +68 -74
  311. package/dist/SegmentedControl.mjs.map +1 -1
  312. package/dist/Slider.cjs +111 -112
  313. package/dist/Slider.cjs.map +1 -1
  314. package/dist/Slider.css +87 -87
  315. package/dist/Slider.css.map +1 -1
  316. package/dist/Slider.mjs +112 -113
  317. package/dist/Slider.mjs.map +1 -1
  318. package/dist/StatusLight.cjs +28 -32
  319. package/dist/StatusLight.cjs.map +1 -1
  320. package/dist/StatusLight.css +26 -26
  321. package/dist/StatusLight.css.map +1 -1
  322. package/dist/StatusLight.mjs +28 -32
  323. package/dist/StatusLight.mjs.map +1 -1
  324. package/dist/Switch.cjs +56 -60
  325. package/dist/Switch.cjs.map +1 -1
  326. package/dist/Switch.css +48 -48
  327. package/dist/Switch.css.map +1 -1
  328. package/dist/Switch.mjs +57 -61
  329. package/dist/Switch.mjs.map +1 -1
  330. package/dist/TableView.cjs +209 -196
  331. package/dist/TableView.cjs.map +1 -1
  332. package/dist/TableView.css +95 -95
  333. package/dist/TableView.css.map +1 -1
  334. package/dist/TableView.mjs +211 -198
  335. package/dist/TableView.mjs.map +1 -1
  336. package/dist/Tabs.cjs +59 -62
  337. package/dist/Tabs.cjs.map +1 -1
  338. package/dist/Tabs.css +42 -42
  339. package/dist/Tabs.css.map +1 -1
  340. package/dist/Tabs.mjs +59 -62
  341. package/dist/Tabs.mjs.map +1 -1
  342. package/dist/TagGroup.cjs +122 -124
  343. package/dist/TagGroup.cjs.map +1 -1
  344. package/dist/TagGroup.css +93 -93
  345. package/dist/TagGroup.css.map +1 -1
  346. package/dist/TagGroup.mjs +122 -124
  347. package/dist/TagGroup.mjs.map +1 -1
  348. package/dist/TextField.cjs +44 -55
  349. package/dist/TextField.cjs.map +1 -1
  350. package/dist/TextField.css +33 -33
  351. package/dist/TextField.css.map +1 -1
  352. package/dist/TextField.mjs +45 -56
  353. package/dist/TextField.mjs.map +1 -1
  354. package/dist/ToggleButton.cjs +6 -9
  355. package/dist/ToggleButton.cjs.map +1 -1
  356. package/dist/ToggleButton.css +7 -7
  357. package/dist/ToggleButton.css.map +1 -1
  358. package/dist/ToggleButton.mjs +6 -9
  359. package/dist/ToggleButton.mjs.map +1 -1
  360. package/dist/ToggleButtonGroup.cjs +2 -5
  361. package/dist/ToggleButtonGroup.cjs.map +1 -1
  362. package/dist/ToggleButtonGroup.mjs +2 -5
  363. package/dist/ToggleButtonGroup.mjs.map +1 -1
  364. package/dist/Tooltip.cjs +48 -48
  365. package/dist/Tooltip.cjs.map +1 -1
  366. package/dist/Tooltip.css +55 -70
  367. package/dist/Tooltip.css.map +1 -1
  368. package/dist/Tooltip.mjs +49 -49
  369. package/dist/Tooltip.mjs.map +1 -1
  370. package/dist/ar-AE.cjs +10 -2
  371. package/dist/ar-AE.cjs.map +1 -1
  372. package/dist/ar-AE.mjs +10 -2
  373. package/dist/ar-AE.mjs.map +1 -1
  374. package/dist/bg-BG.cjs +11 -2
  375. package/dist/bg-BG.cjs.map +1 -1
  376. package/dist/bg-BG.mjs +11 -2
  377. package/dist/bg-BG.mjs.map +1 -1
  378. package/dist/cs-CZ.cjs +7 -2
  379. package/dist/cs-CZ.cjs.map +1 -1
  380. package/dist/cs-CZ.mjs +7 -2
  381. package/dist/cs-CZ.mjs.map +1 -1
  382. package/dist/da-DK.cjs +12 -4
  383. package/dist/da-DK.cjs.map +1 -1
  384. package/dist/da-DK.mjs +12 -4
  385. package/dist/da-DK.mjs.map +1 -1
  386. package/dist/de-DE.cjs +11 -2
  387. package/dist/de-DE.cjs.map +1 -1
  388. package/dist/de-DE.mjs +11 -2
  389. package/dist/de-DE.mjs.map +1 -1
  390. package/dist/el-GR.cjs +11 -2
  391. package/dist/el-GR.cjs.map +1 -1
  392. package/dist/el-GR.mjs +11 -2
  393. package/dist/el-GR.mjs.map +1 -1
  394. package/dist/en-US.cjs +8 -0
  395. package/dist/en-US.cjs.map +1 -1
  396. package/dist/en-US.mjs +8 -0
  397. package/dist/en-US.mjs.map +1 -1
  398. package/dist/es-ES.cjs +11 -2
  399. package/dist/es-ES.cjs.map +1 -1
  400. package/dist/es-ES.mjs +11 -2
  401. package/dist/es-ES.mjs.map +1 -1
  402. package/dist/et-EE.cjs +10 -2
  403. package/dist/et-EE.cjs.map +1 -1
  404. package/dist/et-EE.mjs +10 -2
  405. package/dist/et-EE.mjs.map +1 -1
  406. package/dist/fi-FI.cjs +10 -2
  407. package/dist/fi-FI.cjs.map +1 -1
  408. package/dist/fi-FI.mjs +10 -2
  409. package/dist/fi-FI.mjs.map +1 -1
  410. package/dist/fr-FR.cjs +11 -2
  411. package/dist/fr-FR.cjs.map +1 -1
  412. package/dist/fr-FR.mjs +11 -2
  413. package/dist/fr-FR.mjs.map +1 -1
  414. package/dist/he-IL.cjs +11 -2
  415. package/dist/he-IL.cjs.map +1 -1
  416. package/dist/he-IL.mjs +11 -2
  417. package/dist/he-IL.mjs.map +1 -1
  418. package/dist/hr-HR.cjs +7 -2
  419. package/dist/hr-HR.cjs.map +1 -1
  420. package/dist/hr-HR.mjs +7 -2
  421. package/dist/hr-HR.mjs.map +1 -1
  422. package/dist/hu-HU.cjs +10 -2
  423. package/dist/hu-HU.cjs.map +1 -1
  424. package/dist/hu-HU.mjs +10 -2
  425. package/dist/hu-HU.mjs.map +1 -1
  426. package/dist/it-IT.cjs +11 -2
  427. package/dist/it-IT.cjs.map +1 -1
  428. package/dist/it-IT.mjs +11 -2
  429. package/dist/it-IT.mjs.map +1 -1
  430. package/dist/ja-JP.cjs +10 -2
  431. package/dist/ja-JP.cjs.map +1 -1
  432. package/dist/ja-JP.mjs +10 -2
  433. package/dist/ja-JP.mjs.map +1 -1
  434. package/dist/ko-KR.cjs +12 -4
  435. package/dist/ko-KR.cjs.map +1 -1
  436. package/dist/ko-KR.mjs +12 -4
  437. package/dist/ko-KR.mjs.map +1 -1
  438. package/dist/lt-LT.cjs +9 -4
  439. package/dist/lt-LT.cjs.map +1 -1
  440. package/dist/lt-LT.mjs +9 -4
  441. package/dist/lt-LT.mjs.map +1 -1
  442. package/dist/lv-LV.cjs +11 -3
  443. package/dist/lv-LV.cjs.map +1 -1
  444. package/dist/lv-LV.mjs +11 -3
  445. package/dist/lv-LV.mjs.map +1 -1
  446. package/dist/main.cjs +4 -0
  447. package/dist/main.cjs.map +1 -1
  448. package/dist/module.mjs +3 -1
  449. package/dist/module.mjs.map +1 -1
  450. package/dist/nb-NO.cjs +9 -4
  451. package/dist/nb-NO.cjs.map +1 -1
  452. package/dist/nb-NO.mjs +9 -4
  453. package/dist/nb-NO.mjs.map +1 -1
  454. package/dist/nl-NL.cjs +10 -2
  455. package/dist/nl-NL.cjs.map +1 -1
  456. package/dist/nl-NL.mjs +10 -2
  457. package/dist/nl-NL.mjs.map +1 -1
  458. package/dist/pl-PL.cjs +8 -3
  459. package/dist/pl-PL.cjs.map +1 -1
  460. package/dist/pl-PL.mjs +8 -3
  461. package/dist/pl-PL.mjs.map +1 -1
  462. package/dist/pt-BR.cjs +11 -2
  463. package/dist/pt-BR.cjs.map +1 -1
  464. package/dist/pt-BR.mjs +11 -2
  465. package/dist/pt-BR.mjs.map +1 -1
  466. package/dist/pt-PT.cjs +11 -2
  467. package/dist/pt-PT.cjs.map +1 -1
  468. package/dist/pt-PT.mjs +11 -2
  469. package/dist/pt-PT.mjs.map +1 -1
  470. package/dist/ro-RO.cjs +12 -3
  471. package/dist/ro-RO.cjs.map +1 -1
  472. package/dist/ro-RO.mjs +12 -3
  473. package/dist/ro-RO.mjs.map +1 -1
  474. package/dist/ru-RU.cjs +7 -2
  475. package/dist/ru-RU.cjs.map +1 -1
  476. package/dist/ru-RU.mjs +7 -2
  477. package/dist/ru-RU.mjs.map +1 -1
  478. package/dist/sk-SK.cjs +7 -2
  479. package/dist/sk-SK.cjs.map +1 -1
  480. package/dist/sk-SK.mjs +7 -2
  481. package/dist/sk-SK.mjs.map +1 -1
  482. package/dist/sl-SI.cjs +7 -2
  483. package/dist/sl-SI.cjs.map +1 -1
  484. package/dist/sl-SI.mjs +7 -2
  485. package/dist/sl-SI.mjs.map +1 -1
  486. package/dist/sr-SP.cjs +7 -2
  487. package/dist/sr-SP.cjs.map +1 -1
  488. package/dist/sr-SP.mjs +7 -2
  489. package/dist/sr-SP.mjs.map +1 -1
  490. package/dist/sv-SE.cjs +11 -2
  491. package/dist/sv-SE.cjs.map +1 -1
  492. package/dist/sv-SE.mjs +11 -2
  493. package/dist/sv-SE.mjs.map +1 -1
  494. package/dist/tr-TR.cjs +10 -2
  495. package/dist/tr-TR.cjs.map +1 -1
  496. package/dist/tr-TR.mjs +10 -2
  497. package/dist/tr-TR.mjs.map +1 -1
  498. package/dist/types.d.ts +109 -89
  499. package/dist/types.d.ts.map +1 -1
  500. package/dist/uk-UA.cjs +7 -2
  501. package/dist/uk-UA.cjs.map +1 -1
  502. package/dist/uk-UA.mjs +7 -2
  503. package/dist/uk-UA.mjs.map +1 -1
  504. package/dist/zh-CN.cjs +10 -2
  505. package/dist/zh-CN.cjs.map +1 -1
  506. package/dist/zh-CN.mjs +10 -2
  507. package/dist/zh-CN.mjs.map +1 -1
  508. package/dist/zh-TW.cjs +10 -2
  509. package/dist/zh-TW.cjs.map +1 -1
  510. package/dist/zh-TW.mjs +10 -2
  511. package/dist/zh-TW.mjs.map +1 -1
  512. package/icons/Skeleton.cjs +2 -2
  513. package/icons/Skeleton.css +5 -5
  514. package/icons/Skeleton.mjs +2 -2
  515. package/package.json +20 -21
  516. package/src/Accordion.tsx +5 -8
  517. package/src/ActionBar.tsx +229 -0
  518. package/src/ActionButton.tsx +25 -52
  519. package/src/ActionButtonGroup.tsx +9 -11
  520. package/src/ActionMenu.tsx +5 -8
  521. package/src/AlertDialog.tsx +5 -8
  522. package/src/Avatar.tsx +5 -8
  523. package/src/AvatarGroup.tsx +5 -8
  524. package/src/Badge.tsx +5 -8
  525. package/src/Breadcrumbs.tsx +6 -12
  526. package/src/Button.tsx +197 -154
  527. package/src/ButtonGroup.tsx +5 -8
  528. package/src/CardView.tsx +37 -12
  529. package/src/Checkbox.tsx +6 -9
  530. package/src/CheckboxGroup.tsx +6 -9
  531. package/src/ClearButton.tsx +2 -5
  532. package/src/CloseButton.tsx +21 -31
  533. package/src/ColorArea.tsx +5 -8
  534. package/src/ColorField.tsx +5 -8
  535. package/src/ColorSlider.tsx +5 -8
  536. package/src/ColorSwatch.tsx +5 -8
  537. package/src/ColorSwatchPicker.tsx +5 -8
  538. package/src/ColorWheel.tsx +5 -8
  539. package/src/ComboBox.tsx +7 -9
  540. package/src/Content.tsx +12 -30
  541. package/src/ContextualHelp.tsx +5 -8
  542. package/src/CustomDialog.tsx +5 -8
  543. package/src/Dialog.tsx +6 -9
  544. package/src/Disclosure.tsx +15 -24
  545. package/src/Divider.tsx +16 -25
  546. package/src/DropZone.tsx +5 -8
  547. package/src/Field.tsx +25 -32
  548. package/src/Form.tsx +5 -8
  549. package/src/FullscreenDialog.tsx +5 -8
  550. package/src/IllustratedMessage.tsx +6 -9
  551. package/src/Image.tsx +3 -6
  552. package/src/InlineAlert.tsx +6 -10
  553. package/src/Link.tsx +13 -21
  554. package/src/Menu.tsx +69 -33
  555. package/src/Meter.tsx +13 -23
  556. package/src/Modal.tsx +22 -52
  557. package/src/NumberField.tsx +5 -8
  558. package/src/Picker.tsx +7 -9
  559. package/src/Popover.tsx +30 -104
  560. package/src/ProgressBar.tsx +14 -24
  561. package/src/ProgressCircle.tsx +18 -24
  562. package/src/Radio.tsx +6 -9
  563. package/src/RadioGroup.tsx +6 -9
  564. package/src/RangeSlider.tsx +2 -5
  565. package/src/SearchField.tsx +5 -8
  566. package/src/SegmentedControl.tsx +10 -16
  567. package/src/Slider.tsx +2 -5
  568. package/src/StatusLight.tsx +6 -9
  569. package/src/Switch.tsx +6 -9
  570. package/src/TableView.tsx +53 -50
  571. package/src/Tabs.tsx +5 -8
  572. package/src/TagGroup.tsx +7 -14
  573. package/src/TextField.tsx +20 -28
  574. package/src/ToggleButton.tsx +7 -9
  575. package/src/ToggleButtonGroup.tsx +5 -8
  576. package/src/Tooltip.tsx +30 -51
  577. package/src/bar-utils.ts +3 -10
  578. package/src/index.ts +2 -0
  579. package/src/style-utils.ts +15 -8
  580. package/style/dist/main.cjs +1 -0
  581. package/style/dist/main.cjs.map +1 -1
  582. package/style/dist/module.mjs +2 -2
  583. package/style/dist/module.mjs.map +1 -1
  584. package/style/dist/spectrum-theme.cjs +72 -5
  585. package/style/dist/spectrum-theme.cjs.map +1 -1
  586. package/style/dist/spectrum-theme.mjs +72 -6
  587. package/style/dist/spectrum-theme.mjs.map +1 -1
  588. package/style/dist/style-macro.cjs +13 -1
  589. package/style/dist/style-macro.cjs.map +1 -1
  590. package/style/dist/style-macro.mjs +13 -1
  591. package/style/dist/style-macro.mjs.map +1 -1
  592. package/style/dist/types.d.ts +50 -29
  593. package/style/dist/types.d.ts.map +1 -1
  594. package/style/index.ts +1 -1
  595. package/style/spectrum-theme.ts +72 -7
  596. package/style/style-macro.ts +20 -4
  597. package/style/tokens.ts +30 -0
  598. package/style/types.ts +1 -1
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAwBM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAA4E;AAEzH,SAAS,iCAA6B,KAAyB,EAAE,GAAoC;IACnG,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IACxD,IAAI,WAAW,CAAC,aAAa,KAAK,WAChC,WAAW,CAAC,aAAa,GAAG,gBAAgB,MAAM,CAAC;IAGrD,qBACE,iCAAC,CAAA,GAAA,qCAAU;QACT,QAAQ,MAAM,MAAM;QACpB,aAAa,MAAM,WAAW;QAC9B,cAAc,MAAM,YAAY;QAChC,OAAO,MAAM,KAAK;QAClB,WAAW,MAAM,SAAS;QAC1B,YAAY,MAAM,UAAU;;0BAC5B,gCAAC,CAAA,GAAA,sCAAW;gBACV,KAAK;gBACL,MAAM,MAAM,IAAI;gBAChB,YAAY,MAAM,UAAU;gBAC5B,WAAW,MAAM,SAAS;gBAC1B,SAAS,MAAM,OAAO;gBACtB,QAAQ,MAAM,MAAM;gBACnB,GAAG,WAAW;0BACf,cAAA,gCAAC,CAAA,GAAA,iCAAO;;0BAEV,gCAAC,CAAA,GAAA,8BAAG;gBACF,OAAO,MAAM,KAAK;gBAClB,cAAc,MAAM,YAAY;gBAChC,UAAU,MAAM,QAAQ;gBACxB,MAAM,MAAM,QAAQ;0BACnB,MAAM,QAAQ;;;;AAIvB;AAEA;;CAEC,GACD,IAAI,4CAA2B,AAAb,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAqB","sources":["packages/@react-spectrum/s2/src/ActionMenu.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 {ActionButton, ActionButtonProps} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {forwardRefType} from './types';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Menu, MenuProps, MenuTrigger, MenuTriggerProps} from './Menu';\nimport MoreIcon from '../s2wf-icons/S2_Icon_More_20_N.svg';\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionMenuProps<T> extends\n Pick<MenuTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'align' | 'direction' | 'shouldFlip'>,\n Pick<MenuProps<T>, 'children' | 'items' | 'disabledKeys' | 'onAction'>,\n Pick<ActionButtonProps, 'isDisabled' | 'isQuiet' | 'autoFocus' | 'size'>,\n StyleProps, DOMProps, AriaLabelingProps {\n menuSize?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ActionMenuContext = createContext<ContextValue<ActionMenuProps<any>, FocusableRefValue<HTMLButtonElement>>>(null);\n\nfunction ActionMenu<T extends object>(props: ActionMenuProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ActionMenuContext);\n let buttonProps = filterDOMProps(props, {labelable: true});\n if (buttonProps['aria-label'] === undefined) {\n buttonProps['aria-label'] = stringFormatter.format('menu.moreActions');\n }\n\n return (\n <MenuTrigger\n isOpen={props.isOpen}\n defaultOpen={props.defaultOpen}\n onOpenChange={props.onOpenChange}\n align={props.align}\n direction={props.direction}\n shouldFlip={props.shouldFlip}>\n <ActionButton\n ref={ref}\n size={props.size}\n isDisabled={props.isDisabled}\n autoFocus={props.autoFocus}\n isQuiet={props.isQuiet}\n styles={props.styles}\n {...buttonProps}>\n <MoreIcon />\n </ActionButton>\n <Menu\n items={props.items}\n disabledKeys={props.disabledKeys}\n onAction={props.onAction}\n size={props.menuSize}>\n {props.children}\n </Menu>\n </MenuTrigger>\n );\n}\n\n/**\n * ActionMenu combines an ActionButton with a Menu for simple \"more actions\" use cases.\n */\nlet _ActionMenu = /*#__PURE__*/(forwardRef as forwardRefType)(ActionMenu);\nexport {_ActionMenu as ActionMenu};\n"],"names":[],"version":3,"file":"ActionMenu.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAwBM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAA4E;AAKlH,MAAM,4CAA0B,AAAb,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAqB,SAAS,WAA6B,KAAyB,EAAE,GAAoC;IACzK,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IACxD,IAAI,WAAW,CAAC,aAAa,KAAK,WAChC,WAAW,CAAC,aAAa,GAAG,gBAAgB,MAAM,CAAC;IAGrD,qBACE,iCAAC,CAAA,GAAA,qCAAU;QACT,QAAQ,MAAM,MAAM;QACpB,aAAa,MAAM,WAAW;QAC9B,cAAc,MAAM,YAAY;QAChC,OAAO,MAAM,KAAK;QAClB,WAAW,MAAM,SAAS;QAC1B,YAAY,MAAM,UAAU;;0BAC5B,gCAAC,CAAA,GAAA,sCAAW;gBACV,KAAK;gBACL,MAAM,MAAM,IAAI;gBAChB,YAAY,MAAM,UAAU;gBAC5B,WAAW,MAAM,SAAS;gBAC1B,SAAS,MAAM,OAAO;gBACtB,QAAQ,MAAM,MAAM;gBACnB,GAAG,WAAW;0BACf,cAAA,gCAAC,CAAA,GAAA,iCAAO;;0BAEV,gCAAC,CAAA,GAAA,8BAAG;gBACF,OAAO,MAAM,KAAK;gBAClB,cAAc,MAAM,YAAY;gBAChC,UAAU,MAAM,QAAQ;gBACxB,MAAM,MAAM,QAAQ;0BACnB,MAAM,QAAQ;;;;AAIvB","sources":["packages/@react-spectrum/s2/src/ActionMenu.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 {ActionButton, ActionButtonProps} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {forwardRefType} from './types';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Menu, MenuProps, MenuTrigger, MenuTriggerProps} from './Menu';\nimport MoreIcon from '../s2wf-icons/S2_Icon_More_20_N.svg';\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionMenuProps<T> extends\n Pick<MenuTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'align' | 'direction' | 'shouldFlip'>,\n Pick<MenuProps<T>, 'children' | 'items' | 'disabledKeys' | 'onAction'>,\n Pick<ActionButtonProps, 'isDisabled' | 'isQuiet' | 'autoFocus' | 'size'>,\n StyleProps, DOMProps, AriaLabelingProps {\n menuSize?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ActionMenuContext = createContext<ContextValue<ActionMenuProps<any>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ActionMenu combines an ActionButton with a Menu for simple \"more actions\" use cases.\n */\nexport const ActionMenu = /*#__PURE__*/(forwardRef as forwardRefType)(function ActionMenu<T extends object>(props: ActionMenuProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ActionMenuContext);\n let buttonProps = filterDOMProps(props, {labelable: true});\n if (buttonProps['aria-label'] === undefined) {\n buttonProps['aria-label'] = stringFormatter.format('menu.moreActions');\n }\n\n return (\n <MenuTrigger\n isOpen={props.isOpen}\n defaultOpen={props.defaultOpen}\n onOpenChange={props.onOpenChange}\n align={props.align}\n direction={props.direction}\n shouldFlip={props.shouldFlip}>\n <ActionButton\n ref={ref}\n size={props.size}\n isDisabled={props.isDisabled}\n autoFocus={props.autoFocus}\n isQuiet={props.isQuiet}\n styles={props.styles}\n {...buttonProps}>\n <MoreIcon />\n </ActionButton>\n <Menu\n items={props.items}\n disabledKeys={props.disabledKeys}\n onAction={props.onAction}\n size={props.menuSize}>\n {props.children}\n </Menu>\n </MenuTrigger>\n );\n});\n"],"names":[],"version":3,"file":"ActionMenu.cjs.map"}
@@ -32,7 +32,7 @@ function $parcel$interopDefault(a) {
32
32
 
33
33
 
34
34
  const $8bf3cd2442eb485e$export$7f4b66acaca28bd5 = /*#__PURE__*/ (0, $auwyh$createContext)(null);
35
- function $8bf3cd2442eb485e$var$ActionMenu(props, ref) {
35
+ const $8bf3cd2442eb485e$export$ed57a210b9d13bb6 = /*#__PURE__*/ (0, $auwyh$forwardRef)(function ActionMenu(props, ref) {
36
36
  let stringFormatter = (0, $auwyh$useLocalizedStringFormatter)((0, ($parcel$interopDefault($auwyh$intlStringsmjs))), '@react-spectrum/s2');
37
37
  [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $8bf3cd2442eb485e$export$7f4b66acaca28bd5);
38
38
  let buttonProps = (0, $auwyh$filterDOMProps)(props, {
@@ -66,10 +66,7 @@ function $8bf3cd2442eb485e$var$ActionMenu(props, ref) {
66
66
  })
67
67
  ]
68
68
  });
69
- }
70
- /**
71
- * ActionMenu combines an ActionButton with a Menu for simple "more actions" use cases.
72
- */ let $8bf3cd2442eb485e$export$ed57a210b9d13bb6 = /*#__PURE__*/ (0, $auwyh$forwardRef)($8bf3cd2442eb485e$var$ActionMenu);
69
+ });
73
70
 
74
71
 
75
72
  export {$8bf3cd2442eb485e$export$7f4b66acaca28bd5 as ActionMenuContext, $8bf3cd2442eb485e$export$ed57a210b9d13bb6 as ActionMenu};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAwBM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAA4E;AAEzH,SAAS,iCAA6B,KAAyB,EAAE,GAAoC;IACnG,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IACxD,IAAI,WAAW,CAAC,aAAa,KAAK,WAChC,WAAW,CAAC,aAAa,GAAG,gBAAgB,MAAM,CAAC;IAGrD,qBACE,iBAAC,CAAA,GAAA,yCAAU;QACT,QAAQ,MAAM,MAAM;QACpB,aAAa,MAAM,WAAW;QAC9B,cAAc,MAAM,YAAY;QAChC,OAAO,MAAM,KAAK;QAClB,WAAW,MAAM,SAAS;QAC1B,YAAY,MAAM,UAAU;;0BAC5B,gBAAC,CAAA,GAAA,yCAAW;gBACV,KAAK;gBACL,MAAM,MAAM,IAAI;gBAChB,YAAY,MAAM,UAAU;gBAC5B,WAAW,MAAM,SAAS;gBAC1B,SAAS,MAAM,OAAO;gBACtB,QAAQ,MAAM,MAAM;gBACnB,GAAG,WAAW;0BACf,cAAA,gBAAC,CAAA,GAAA,wCAAO;;0BAEV,gBAAC,CAAA,GAAA,yCAAG;gBACF,OAAO,MAAM,KAAK;gBAClB,cAAc,MAAM,YAAY;gBAChC,UAAU,MAAM,QAAQ;gBACxB,MAAM,MAAM,QAAQ;0BACnB,MAAM,QAAQ;;;;AAIvB;AAEA;;CAEC,GACD,IAAI,4CAA2B,AAAb,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAqB","sources":["packages/@react-spectrum/s2/src/ActionMenu.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 {ActionButton, ActionButtonProps} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {forwardRefType} from './types';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Menu, MenuProps, MenuTrigger, MenuTriggerProps} from './Menu';\nimport MoreIcon from '../s2wf-icons/S2_Icon_More_20_N.svg';\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionMenuProps<T> extends\n Pick<MenuTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'align' | 'direction' | 'shouldFlip'>,\n Pick<MenuProps<T>, 'children' | 'items' | 'disabledKeys' | 'onAction'>,\n Pick<ActionButtonProps, 'isDisabled' | 'isQuiet' | 'autoFocus' | 'size'>,\n StyleProps, DOMProps, AriaLabelingProps {\n menuSize?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ActionMenuContext = createContext<ContextValue<ActionMenuProps<any>, FocusableRefValue<HTMLButtonElement>>>(null);\n\nfunction ActionMenu<T extends object>(props: ActionMenuProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ActionMenuContext);\n let buttonProps = filterDOMProps(props, {labelable: true});\n if (buttonProps['aria-label'] === undefined) {\n buttonProps['aria-label'] = stringFormatter.format('menu.moreActions');\n }\n\n return (\n <MenuTrigger\n isOpen={props.isOpen}\n defaultOpen={props.defaultOpen}\n onOpenChange={props.onOpenChange}\n align={props.align}\n direction={props.direction}\n shouldFlip={props.shouldFlip}>\n <ActionButton\n ref={ref}\n size={props.size}\n isDisabled={props.isDisabled}\n autoFocus={props.autoFocus}\n isQuiet={props.isQuiet}\n styles={props.styles}\n {...buttonProps}>\n <MoreIcon />\n </ActionButton>\n <Menu\n items={props.items}\n disabledKeys={props.disabledKeys}\n onAction={props.onAction}\n size={props.menuSize}>\n {props.children}\n </Menu>\n </MenuTrigger>\n );\n}\n\n/**\n * ActionMenu combines an ActionButton with a Menu for simple \"more actions\" use cases.\n */\nlet _ActionMenu = /*#__PURE__*/(forwardRef as forwardRefType)(ActionMenu);\nexport {_ActionMenu as ActionMenu};\n"],"names":[],"version":3,"file":"ActionMenu.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAwBM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAA4E;AAKlH,MAAM,4CAA0B,AAAb,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAqB,SAAS,WAA6B,KAAyB,EAAE,GAAoC;IACzK,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IACxD,IAAI,WAAW,CAAC,aAAa,KAAK,WAChC,WAAW,CAAC,aAAa,GAAG,gBAAgB,MAAM,CAAC;IAGrD,qBACE,iBAAC,CAAA,GAAA,yCAAU;QACT,QAAQ,MAAM,MAAM;QACpB,aAAa,MAAM,WAAW;QAC9B,cAAc,MAAM,YAAY;QAChC,OAAO,MAAM,KAAK;QAClB,WAAW,MAAM,SAAS;QAC1B,YAAY,MAAM,UAAU;;0BAC5B,gBAAC,CAAA,GAAA,yCAAW;gBACV,KAAK;gBACL,MAAM,MAAM,IAAI;gBAChB,YAAY,MAAM,UAAU;gBAC5B,WAAW,MAAM,SAAS;gBAC1B,SAAS,MAAM,OAAO;gBACtB,QAAQ,MAAM,MAAM;gBACnB,GAAG,WAAW;0BACf,cAAA,gBAAC,CAAA,GAAA,wCAAO;;0BAEV,gBAAC,CAAA,GAAA,yCAAG;gBACF,OAAO,MAAM,KAAK;gBAClB,cAAc,MAAM,YAAY;gBAChC,UAAU,MAAM,QAAQ;gBACxB,MAAM,MAAM,QAAQ;0BACnB,MAAM,QAAQ;;;;AAIvB","sources":["packages/@react-spectrum/s2/src/ActionMenu.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 {ActionButton, ActionButtonProps} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {forwardRefType} from './types';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Menu, MenuProps, MenuTrigger, MenuTriggerProps} from './Menu';\nimport MoreIcon from '../s2wf-icons/S2_Icon_More_20_N.svg';\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionMenuProps<T> extends\n Pick<MenuTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'align' | 'direction' | 'shouldFlip'>,\n Pick<MenuProps<T>, 'children' | 'items' | 'disabledKeys' | 'onAction'>,\n Pick<ActionButtonProps, 'isDisabled' | 'isQuiet' | 'autoFocus' | 'size'>,\n StyleProps, DOMProps, AriaLabelingProps {\n menuSize?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ActionMenuContext = createContext<ContextValue<ActionMenuProps<any>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ActionMenu combines an ActionButton with a Menu for simple \"more actions\" use cases.\n */\nexport const ActionMenu = /*#__PURE__*/(forwardRef as forwardRefType)(function ActionMenu<T extends object>(props: ActionMenuProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ActionMenuContext);\n let buttonProps = filterDOMProps(props, {labelable: true});\n if (buttonProps['aria-label'] === undefined) {\n buttonProps['aria-label'] = stringFormatter.format('menu.moreActions');\n }\n\n return (\n <MenuTrigger\n isOpen={props.isOpen}\n defaultOpen={props.defaultOpen}\n onOpenChange={props.onOpenChange}\n align={props.align}\n direction={props.direction}\n shouldFlip={props.shouldFlip}>\n <ActionButton\n ref={ref}\n size={props.size}\n isDisabled={props.isDisabled}\n autoFocus={props.autoFocus}\n isQuiet={props.isQuiet}\n styles={props.styles}\n {...buttonProps}>\n <MoreIcon />\n </ActionButton>\n <Menu\n items={props.items}\n disabledKeys={props.disabledKeys}\n onAction={props.onAction}\n size={props.menuSize}>\n {props.children}\n </Menu>\n </MenuTrigger>\n );\n});\n"],"names":[],"version":3,"file":"ActionMenu.mjs.map"}
@@ -55,7 +55,7 @@ const $d67aa10f4fac9e2b$var$icon = function anonymous(props) {
55
55
  else if (props.variant === "error") rules += ' -rwx0fg_e-e';
56
56
  return rules;
57
57
  };
58
- function $d67aa10f4fac9e2b$var$AlertDialog(props, ref) {
58
+ const $d67aa10f4fac9e2b$export$de466dd8317b0b75 = /*#__PURE__*/ (0, $dZ5J1$react.forwardRef)(function AlertDialog(props, ref) {
59
59
  let stringFormatter = (0, $dZ5J1$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($4526404114e78c80$exports))), '@react-spectrum/s2');
60
60
  let { autoFocusButton: autoFocusButton, cancelLabel: cancelLabel, secondaryActionLabel: secondaryActionLabel, primaryActionLabel: primaryActionLabel, isSecondaryActionDisabled: isSecondaryActionDisabled, isPrimaryActionDisabled: isPrimaryActionDisabled, onCancel: onCancel = ()=>{}, onPrimaryAction: onPrimaryAction = ()=>{}, onSecondaryAction: onSecondaryAction = ()=>{}, title: title, children: children, variant: variant = 'confirmation' } = props;
61
61
  let buttonVariant = 'primary';
@@ -127,10 +127,7 @@ function $d67aa10f4fac9e2b$var$AlertDialog(props, ref) {
127
127
  ]
128
128
  })
129
129
  });
130
- }
131
- /**
132
- * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge.
133
- */ let $d67aa10f4fac9e2b$export$de466dd8317b0b75 = /*#__PURE__*/ (0, $dZ5J1$react.forwardRef)($d67aa10f4fac9e2b$var$AlertDialog);
130
+ });
134
131
 
135
132
 
136
133
  //# sourceMappingURL=AlertDialog.cjs.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;AAqDD,MAAM;;;;;;;AAaN,SAAS,kCAAY,KAAuB,EAAE,GAAW;IACvD,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,mBACF,eAAe,eACf,WAAW,wBACX,oBAAoB,sBACpB,kBAAkB,6BAClB,yBAAyB,2BACzB,uBAAuB,YACvB,WAAW,KAAO,oBAClB,kBAAkB,KAAO,sBACzB,oBAAoB,KAAO,UAC3B,KAAK,YACL,QAAQ,WACR,UAAU,gBACX,GAAG;IAEJ,IAAI,gBAAgB;IACpB,IAAI,YAAY,gBACd,gBAAgB;SACX,IAAI,YAAY,eACrB,gBAAgB;IAGlB,qBACE,gCAAC,CAAA,GAAA,gCAAK;QACJ,MAAK;QACL,KAAK;QACL,MAAM,MAAM,IAAI;QAChB,cAAc,MAAM,YAAY;QAChC,kBAAmB,MAAM,gBAAgB,IAAI;kBAC5C,CAAC,SAAC,KAAK,EAAC,iBACP;;kCACE,gCAAC,CAAA,GAAA,mCAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,qCAAU;gCAAG;oCAAC,QAAQ,2BAAK;iDAAC;oCAAO;gCAAE;6BAAE;yBACzC;kCACD,cAAA,gCAAC,CAAA,GAAA,iCAAM;4BAAE,MAAK;sCACZ,cAAA,iCAAC,CAAA,GAAA,wCAAa;;oCACX,YAAY,yBAAW,gCAAC,CAAA,GAAA,iCAAY;wCAAE,cAAY,gBAAgB,MAAM,CAAC;;oCACzE,YAAY,2BAAa,gCAAC,CAAA,GAAA,iCAAW;wCAAE,cAAY,gBAAgB,MAAM,CAAC;;oCAC1E;;;;;kCAIP,gCAAC,CAAA,GAAA,iCAAM;kCAAG;;kCACV,iCAAC,CAAA,GAAA,qCAAU;;4BACR,6BACC,gCAAC,CAAA,GAAA,gCAAK;gCACJ,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,SAAS;gCAC9B,SAAQ;gCACR,WAAU;gCACV,WAAW,oBAAoB;0CAC9B;;4BAGJ,sCACC,gCAAC,CAAA,GAAA,gCAAK;gCACJ,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,SAAS;gCAC9B,SAAQ;gCACR,YAAY;gCACZ,WAAU;gCACV,WAAW,oBAAoB;0CAC9B;;0CAGL,gCAAC,CAAA,GAAA,gCAAK;gCACJ,SAAS;gCACT,YAAY;gCACZ,WAAW,oBAAoB;gCAC/B,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,SAAS;0CAC7B;;;;;;;AAOf;AAEA;;CAEC,GACD,IAAI,0DAAe,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/AlertDialog.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 AlertTriangle from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg';\nimport {Button} from './Button';\nimport {ButtonGroup} from './ButtonGroup';\nimport {CenterBaseline} from './CenterBaseline';\nimport {chain} from '@react-aria/utils';\nimport {Content, Heading} from './Content';\nimport {Dialog} from './Dialog';\nimport {DOMProps, DOMRef} from '@react-types/shared';\nimport {forwardRef, ReactNode} from 'react';\nimport {IconContext} from './Icon';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg';\nimport {Provider} from 'react-aria-components';\nimport {style} from '../style' with {type: 'macro'};\nimport {UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AlertDialogProps extends DOMProps, UnsafeStyles {\n /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */\n variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning',\n /** The title of the AlertDialog. */\n title: string,\n /** The contents of the AlertDialog. */\n children: ReactNode,\n /** The label to display within the cancel button. */\n cancelLabel?: string,\n /** The label to display within the confirm button. */\n primaryActionLabel: string,\n /** The label to display within the secondary button. */\n secondaryActionLabel?: string,\n /** Whether the primary button is disabled. */\n isPrimaryActionDisabled?: boolean,\n /** Whether the secondary button is disabled. */\n isSecondaryActionDisabled?: boolean,\n /** Handler that is called when the cancel button is pressed. */\n onCancel?: () => void,\n /** Handler that is called when the primary button is pressed. */\n onPrimaryAction?: () => void,\n /** Handler that is called when the secondary button is pressed. */\n onSecondaryAction?: () => void,\n /** Button to focus by default when the dialog opens. */\n autoFocusButton?: 'cancel' | 'primary' | 'secondary',\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nconst icon = style({\n marginEnd: 8,\n '--iconPrimary': {\n type: 'fill',\n value: {\n variant: {\n error: 'negative',\n warning: 'notice'\n }\n }\n }\n});\n\nfunction AlertDialog(props: AlertDialogProps, ref: DOMRef) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n autoFocusButton,\n cancelLabel,\n secondaryActionLabel,\n primaryActionLabel,\n isSecondaryActionDisabled,\n isPrimaryActionDisabled,\n onCancel = () => {},\n onPrimaryAction = () => {},\n onSecondaryAction = () => {},\n title,\n children,\n variant = 'confirmation'\n } = props;\n\n let buttonVariant = 'primary';\n if (variant === 'confirmation') {\n buttonVariant = 'accent';\n } else if (variant === 'destructive') {\n buttonVariant = 'negative';\n }\n\n return (\n <Dialog\n role=\"alertdialog\"\n ref={ref}\n size={props.size}\n UNSAFE_style={props.UNSAFE_style}\n UNSAFE_className={(props.UNSAFE_className || '')}>\n {({close}) => (\n <>\n <Provider\n values={[\n [IconContext, {styles: icon({variant})}]\n ]}>\n <Heading slot=\"title\">\n <CenterBaseline>\n {variant === 'error' && <AlertTriangle aria-label={stringFormatter.format('dialog.alert')} />}\n {variant === 'warning' && <NoticeSquare aria-label={stringFormatter.format('dialog.alert')} />}\n {title}\n </CenterBaseline>\n </Heading>\n </Provider>\n <Content>{children}</Content>\n <ButtonGroup>\n {cancelLabel &&\n <Button\n onPress={() => chain(close(), onCancel())}\n variant=\"secondary\"\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'cancel'}>\n {cancelLabel}\n </Button>\n }\n {secondaryActionLabel &&\n <Button\n onPress={() => chain(close(), onSecondaryAction())}\n variant=\"secondary\"\n isDisabled={isSecondaryActionDisabled}\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'secondary'}>\n {secondaryActionLabel}\n </Button>\n }\n <Button\n variant={buttonVariant as 'primary' | 'accent' | 'negative'}\n isDisabled={isPrimaryActionDisabled}\n autoFocus={autoFocusButton === 'primary'}\n onPress={() => chain(close(), onPrimaryAction())}>\n {primaryActionLabel}\n </Button>\n </ButtonGroup>\n </>\n )}\n </Dialog>\n );\n}\n\n/**\n * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge.\n */\nlet _AlertDialog = forwardRef(AlertDialog);\nexport {_AlertDialog as AlertDialog};\n"],"names":[],"version":3,"file":"AlertDialog.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;AAqDD,MAAM;;;;;;;AAgBC,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAW;IAC7F,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,mBACF,eAAe,eACf,WAAW,wBACX,oBAAoB,sBACpB,kBAAkB,6BAClB,yBAAyB,2BACzB,uBAAuB,YACvB,WAAW,KAAO,oBAClB,kBAAkB,KAAO,sBACzB,oBAAoB,KAAO,UAC3B,KAAK,YACL,QAAQ,WACR,UAAU,gBACX,GAAG;IAEJ,IAAI,gBAAgB;IACpB,IAAI,YAAY,gBACd,gBAAgB;SACX,IAAI,YAAY,eACrB,gBAAgB;IAGlB,qBACE,gCAAC,CAAA,GAAA,gCAAK;QACJ,MAAK;QACL,KAAK;QACL,MAAM,MAAM,IAAI;QAChB,cAAc,MAAM,YAAY;QAChC,kBAAmB,MAAM,gBAAgB,IAAI;kBAC5C,CAAC,SAAC,KAAK,EAAC,iBACP;;kCACE,gCAAC,CAAA,GAAA,mCAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,qCAAU;gCAAG;oCAAC,QAAQ,2BAAK;iDAAC;oCAAO;gCAAE;6BAAE;yBACzC;kCACD,cAAA,gCAAC,CAAA,GAAA,iCAAM;4BAAE,MAAK;sCACZ,cAAA,iCAAC,CAAA,GAAA,wCAAa;;oCACX,YAAY,yBAAW,gCAAC,CAAA,GAAA,iCAAY;wCAAE,cAAY,gBAAgB,MAAM,CAAC;;oCACzE,YAAY,2BAAa,gCAAC,CAAA,GAAA,iCAAW;wCAAE,cAAY,gBAAgB,MAAM,CAAC;;oCAC1E;;;;;kCAIP,gCAAC,CAAA,GAAA,iCAAM;kCAAG;;kCACV,iCAAC,CAAA,GAAA,qCAAU;;4BACR,6BACC,gCAAC,CAAA,GAAA,gCAAK;gCACJ,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,SAAS;gCAC9B,SAAQ;gCACR,WAAU;gCACV,WAAW,oBAAoB;0CAC9B;;4BAGJ,sCACC,gCAAC,CAAA,GAAA,gCAAK;gCACJ,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,SAAS;gCAC9B,SAAQ;gCACR,YAAY;gCACZ,WAAU;gCACV,WAAW,oBAAoB;0CAC9B;;0CAGL,gCAAC,CAAA,GAAA,gCAAK;gCACJ,SAAS;gCACT,YAAY;gCACZ,WAAW,oBAAoB;gCAC/B,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,SAAS;0CAC7B;;;;;;;AAOf","sources":["packages/@react-spectrum/s2/src/AlertDialog.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 AlertTriangle from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg';\nimport {Button} from './Button';\nimport {ButtonGroup} from './ButtonGroup';\nimport {CenterBaseline} from './CenterBaseline';\nimport {chain} from '@react-aria/utils';\nimport {Content, Heading} from './Content';\nimport {Dialog} from './Dialog';\nimport {DOMProps, DOMRef} from '@react-types/shared';\nimport {forwardRef, ReactNode} from 'react';\nimport {IconContext} from './Icon';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg';\nimport {Provider} from 'react-aria-components';\nimport {style} from '../style' with {type: 'macro'};\nimport {UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AlertDialogProps extends DOMProps, UnsafeStyles {\n /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */\n variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning',\n /** The title of the AlertDialog. */\n title: string,\n /** The contents of the AlertDialog. */\n children: ReactNode,\n /** The label to display within the cancel button. */\n cancelLabel?: string,\n /** The label to display within the confirm button. */\n primaryActionLabel: string,\n /** The label to display within the secondary button. */\n secondaryActionLabel?: string,\n /** Whether the primary button is disabled. */\n isPrimaryActionDisabled?: boolean,\n /** Whether the secondary button is disabled. */\n isSecondaryActionDisabled?: boolean,\n /** Handler that is called when the cancel button is pressed. */\n onCancel?: () => void,\n /** Handler that is called when the primary button is pressed. */\n onPrimaryAction?: () => void,\n /** Handler that is called when the secondary button is pressed. */\n onSecondaryAction?: () => void,\n /** Button to focus by default when the dialog opens. */\n autoFocusButton?: 'cancel' | 'primary' | 'secondary',\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nconst icon = style({\n marginEnd: 8,\n '--iconPrimary': {\n type: 'fill',\n value: {\n variant: {\n error: 'negative',\n warning: 'notice'\n }\n }\n }\n});\n\n/**\n * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge.\n */\nexport const AlertDialog = forwardRef(function AlertDialog(props: AlertDialogProps, ref: DOMRef) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n autoFocusButton,\n cancelLabel,\n secondaryActionLabel,\n primaryActionLabel,\n isSecondaryActionDisabled,\n isPrimaryActionDisabled,\n onCancel = () => {},\n onPrimaryAction = () => {},\n onSecondaryAction = () => {},\n title,\n children,\n variant = 'confirmation'\n } = props;\n\n let buttonVariant = 'primary';\n if (variant === 'confirmation') {\n buttonVariant = 'accent';\n } else if (variant === 'destructive') {\n buttonVariant = 'negative';\n }\n\n return (\n <Dialog\n role=\"alertdialog\"\n ref={ref}\n size={props.size}\n UNSAFE_style={props.UNSAFE_style}\n UNSAFE_className={(props.UNSAFE_className || '')}>\n {({close}) => (\n <>\n <Provider\n values={[\n [IconContext, {styles: icon({variant})}]\n ]}>\n <Heading slot=\"title\">\n <CenterBaseline>\n {variant === 'error' && <AlertTriangle aria-label={stringFormatter.format('dialog.alert')} />}\n {variant === 'warning' && <NoticeSquare aria-label={stringFormatter.format('dialog.alert')} />}\n {title}\n </CenterBaseline>\n </Heading>\n </Provider>\n <Content>{children}</Content>\n <ButtonGroup>\n {cancelLabel &&\n <Button\n onPress={() => chain(close(), onCancel())}\n variant=\"secondary\"\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'cancel'}>\n {cancelLabel}\n </Button>\n }\n {secondaryActionLabel &&\n <Button\n onPress={() => chain(close(), onSecondaryAction())}\n variant=\"secondary\"\n isDisabled={isSecondaryActionDisabled}\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'secondary'}>\n {secondaryActionLabel}\n </Button>\n }\n <Button\n variant={buttonVariant as 'primary' | 'accent' | 'negative'}\n isDisabled={isPrimaryActionDisabled}\n autoFocus={autoFocusButton === 'primary'}\n onPress={() => chain(close(), onPrimaryAction())}>\n {primaryActionLabel}\n </Button>\n </ButtonGroup>\n </>\n )}\n </Dialog>\n );\n});\n"],"names":[],"version":3,"file":"AlertDialog.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":"AA+Da;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA","sources":["packages/@react-spectrum/s2/src/AlertDialog.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 AlertTriangle from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg';\nimport {Button} from './Button';\nimport {ButtonGroup} from './ButtonGroup';\nimport {CenterBaseline} from './CenterBaseline';\nimport {chain} from '@react-aria/utils';\nimport {Content, Heading} from './Content';\nimport {Dialog} from './Dialog';\nimport {DOMProps, DOMRef} from '@react-types/shared';\nimport {forwardRef, ReactNode} from 'react';\nimport {IconContext} from './Icon';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg';\nimport {Provider} from 'react-aria-components';\nimport {style} from '../style' with {type: 'macro'};\nimport {UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AlertDialogProps extends DOMProps, UnsafeStyles {\n /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */\n variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning',\n /** The title of the AlertDialog. */\n title: string,\n /** The contents of the AlertDialog. */\n children: ReactNode,\n /** The label to display within the cancel button. */\n cancelLabel?: string,\n /** The label to display within the confirm button. */\n primaryActionLabel: string,\n /** The label to display within the secondary button. */\n secondaryActionLabel?: string,\n /** Whether the primary button is disabled. */\n isPrimaryActionDisabled?: boolean,\n /** Whether the secondary button is disabled. */\n isSecondaryActionDisabled?: boolean,\n /** Handler that is called when the cancel button is pressed. */\n onCancel?: () => void,\n /** Handler that is called when the primary button is pressed. */\n onPrimaryAction?: () => void,\n /** Handler that is called when the secondary button is pressed. */\n onSecondaryAction?: () => void,\n /** Button to focus by default when the dialog opens. */\n autoFocusButton?: 'cancel' | 'primary' | 'secondary',\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nconst icon = style({\n marginEnd: 8,\n '--iconPrimary': {\n type: 'fill',\n value: {\n variant: {\n error: 'negative',\n warning: 'notice'\n }\n }\n }\n});\n\nfunction AlertDialog(props: AlertDialogProps, ref: DOMRef) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n autoFocusButton,\n cancelLabel,\n secondaryActionLabel,\n primaryActionLabel,\n isSecondaryActionDisabled,\n isPrimaryActionDisabled,\n onCancel = () => {},\n onPrimaryAction = () => {},\n onSecondaryAction = () => {},\n title,\n children,\n variant = 'confirmation'\n } = props;\n\n let buttonVariant = 'primary';\n if (variant === 'confirmation') {\n buttonVariant = 'accent';\n } else if (variant === 'destructive') {\n buttonVariant = 'negative';\n }\n\n return (\n <Dialog\n role=\"alertdialog\"\n ref={ref}\n size={props.size}\n UNSAFE_style={props.UNSAFE_style}\n UNSAFE_className={(props.UNSAFE_className || '')}>\n {({close}) => (\n <>\n <Provider\n values={[\n [IconContext, {styles: icon({variant})}]\n ]}>\n <Heading slot=\"title\">\n <CenterBaseline>\n {variant === 'error' && <AlertTriangle aria-label={stringFormatter.format('dialog.alert')} />}\n {variant === 'warning' && <NoticeSquare aria-label={stringFormatter.format('dialog.alert')} />}\n {title}\n </CenterBaseline>\n </Heading>\n </Provider>\n <Content>{children}</Content>\n <ButtonGroup>\n {cancelLabel &&\n <Button\n onPress={() => chain(close(), onCancel())}\n variant=\"secondary\"\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'cancel'}>\n {cancelLabel}\n </Button>\n }\n {secondaryActionLabel &&\n <Button\n onPress={() => chain(close(), onSecondaryAction())}\n variant=\"secondary\"\n isDisabled={isSecondaryActionDisabled}\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'secondary'}>\n {secondaryActionLabel}\n </Button>\n }\n <Button\n variant={buttonVariant as 'primary' | 'accent' | 'negative'}\n isDisabled={isPrimaryActionDisabled}\n autoFocus={autoFocusButton === 'primary'}\n onPress={() => chain(close(), onPrimaryAction())}>\n {primaryActionLabel}\n </Button>\n </ButtonGroup>\n </>\n )}\n </Dialog>\n );\n}\n\n/**\n * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge.\n */\nlet _AlertDialog = forwardRef(AlertDialog);\nexport {_AlertDialog as AlertDialog};\n"],"names":[],"version":3,"file":"AlertDialog.css.map"}
1
+ {"mappings":"AA+Da;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA","sources":["packages/@react-spectrum/s2/src/AlertDialog.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 AlertTriangle from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg';\nimport {Button} from './Button';\nimport {ButtonGroup} from './ButtonGroup';\nimport {CenterBaseline} from './CenterBaseline';\nimport {chain} from '@react-aria/utils';\nimport {Content, Heading} from './Content';\nimport {Dialog} from './Dialog';\nimport {DOMProps, DOMRef} from '@react-types/shared';\nimport {forwardRef, ReactNode} from 'react';\nimport {IconContext} from './Icon';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg';\nimport {Provider} from 'react-aria-components';\nimport {style} from '../style' with {type: 'macro'};\nimport {UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AlertDialogProps extends DOMProps, UnsafeStyles {\n /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */\n variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning',\n /** The title of the AlertDialog. */\n title: string,\n /** The contents of the AlertDialog. */\n children: ReactNode,\n /** The label to display within the cancel button. */\n cancelLabel?: string,\n /** The label to display within the confirm button. */\n primaryActionLabel: string,\n /** The label to display within the secondary button. */\n secondaryActionLabel?: string,\n /** Whether the primary button is disabled. */\n isPrimaryActionDisabled?: boolean,\n /** Whether the secondary button is disabled. */\n isSecondaryActionDisabled?: boolean,\n /** Handler that is called when the cancel button is pressed. */\n onCancel?: () => void,\n /** Handler that is called when the primary button is pressed. */\n onPrimaryAction?: () => void,\n /** Handler that is called when the secondary button is pressed. */\n onSecondaryAction?: () => void,\n /** Button to focus by default when the dialog opens. */\n autoFocusButton?: 'cancel' | 'primary' | 'secondary',\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nconst icon = style({\n marginEnd: 8,\n '--iconPrimary': {\n type: 'fill',\n value: {\n variant: {\n error: 'negative',\n warning: 'notice'\n }\n }\n }\n});\n\n/**\n * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge.\n */\nexport const AlertDialog = forwardRef(function AlertDialog(props: AlertDialogProps, ref: DOMRef) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n autoFocusButton,\n cancelLabel,\n secondaryActionLabel,\n primaryActionLabel,\n isSecondaryActionDisabled,\n isPrimaryActionDisabled,\n onCancel = () => {},\n onPrimaryAction = () => {},\n onSecondaryAction = () => {},\n title,\n children,\n variant = 'confirmation'\n } = props;\n\n let buttonVariant = 'primary';\n if (variant === 'confirmation') {\n buttonVariant = 'accent';\n } else if (variant === 'destructive') {\n buttonVariant = 'negative';\n }\n\n return (\n <Dialog\n role=\"alertdialog\"\n ref={ref}\n size={props.size}\n UNSAFE_style={props.UNSAFE_style}\n UNSAFE_className={(props.UNSAFE_className || '')}>\n {({close}) => (\n <>\n <Provider\n values={[\n [IconContext, {styles: icon({variant})}]\n ]}>\n <Heading slot=\"title\">\n <CenterBaseline>\n {variant === 'error' && <AlertTriangle aria-label={stringFormatter.format('dialog.alert')} />}\n {variant === 'warning' && <NoticeSquare aria-label={stringFormatter.format('dialog.alert')} />}\n {title}\n </CenterBaseline>\n </Heading>\n </Provider>\n <Content>{children}</Content>\n <ButtonGroup>\n {cancelLabel &&\n <Button\n onPress={() => chain(close(), onCancel())}\n variant=\"secondary\"\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'cancel'}>\n {cancelLabel}\n </Button>\n }\n {secondaryActionLabel &&\n <Button\n onPress={() => chain(close(), onSecondaryAction())}\n variant=\"secondary\"\n isDisabled={isSecondaryActionDisabled}\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'secondary'}>\n {secondaryActionLabel}\n </Button>\n }\n <Button\n variant={buttonVariant as 'primary' | 'accent' | 'negative'}\n isDisabled={isPrimaryActionDisabled}\n autoFocus={autoFocusButton === 'primary'}\n onPress={() => chain(close(), onPrimaryAction())}>\n {primaryActionLabel}\n </Button>\n </ButtonGroup>\n </>\n )}\n </Dialog>\n );\n});\n"],"names":[],"version":3,"file":"AlertDialog.css.map"}
@@ -49,7 +49,7 @@ const $94a8ad475d9a330c$var$icon = function anonymous(props) {
49
49
  else if (props.variant === "error") rules += ' -rwx0fg_e-e';
50
50
  return rules;
51
51
  };
52
- function $94a8ad475d9a330c$var$AlertDialog(props, ref) {
52
+ const $94a8ad475d9a330c$export$de466dd8317b0b75 = /*#__PURE__*/ (0, $2iZqV$forwardRef)(function AlertDialog(props, ref) {
53
53
  let stringFormatter = (0, $2iZqV$useLocalizedStringFormatter)((0, ($parcel$interopDefault($2iZqV$intlStringsmjs))), '@react-spectrum/s2');
54
54
  let { autoFocusButton: autoFocusButton, cancelLabel: cancelLabel, secondaryActionLabel: secondaryActionLabel, primaryActionLabel: primaryActionLabel, isSecondaryActionDisabled: isSecondaryActionDisabled, isPrimaryActionDisabled: isPrimaryActionDisabled, onCancel: onCancel = ()=>{}, onPrimaryAction: onPrimaryAction = ()=>{}, onSecondaryAction: onSecondaryAction = ()=>{}, title: title, children: children, variant: variant = 'confirmation' } = props;
55
55
  let buttonVariant = 'primary';
@@ -121,10 +121,7 @@ function $94a8ad475d9a330c$var$AlertDialog(props, ref) {
121
121
  ]
122
122
  })
123
123
  });
124
- }
125
- /**
126
- * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge.
127
- */ let $94a8ad475d9a330c$export$de466dd8317b0b75 = /*#__PURE__*/ (0, $2iZqV$forwardRef)($94a8ad475d9a330c$var$AlertDialog);
124
+ });
128
125
 
129
126
 
130
127
  export {$94a8ad475d9a330c$export$de466dd8317b0b75 as AlertDialog};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;AAqDD,MAAM;;;;;;;AAaN,SAAS,kCAAY,KAAuB,EAAE,GAAW;IACvD,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,IAAI,mBACF,eAAe,eACf,WAAW,wBACX,oBAAoB,sBACpB,kBAAkB,6BAClB,yBAAyB,2BACzB,uBAAuB,YACvB,WAAW,KAAO,oBAClB,kBAAkB,KAAO,sBACzB,oBAAoB,KAAO,UAC3B,KAAK,YACL,QAAQ,WACR,UAAU,gBACX,GAAG;IAEJ,IAAI,gBAAgB;IACpB,IAAI,YAAY,gBACd,gBAAgB;SACX,IAAI,YAAY,eACrB,gBAAgB;IAGlB,qBACE,gBAAC,CAAA,GAAA,yCAAK;QACJ,MAAK;QACL,KAAK;QACL,MAAM,MAAM,IAAI;QAChB,cAAc,MAAM,YAAY;QAChC,kBAAmB,MAAM,gBAAgB,IAAI;kBAC5C,CAAC,SAAC,KAAK,EAAC,iBACP;;kCACE,gBAAC,CAAA,GAAA,eAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,yCAAU;gCAAG;oCAAC,QAAQ,2BAAK;iDAAC;oCAAO;gCAAE;6BAAE;yBACzC;kCACD,cAAA,gBAAC,CAAA,GAAA,yCAAM;4BAAE,MAAK;sCACZ,cAAA,iBAAC,CAAA,GAAA,yCAAa;;oCACX,YAAY,yBAAW,gBAAC,CAAA,GAAA,wCAAY;wCAAE,cAAY,gBAAgB,MAAM,CAAC;;oCACzE,YAAY,2BAAa,gBAAC,CAAA,GAAA,wCAAW;wCAAE,cAAY,gBAAgB,MAAM,CAAC;;oCAC1E;;;;;kCAIP,gBAAC,CAAA,GAAA,yCAAM;kCAAG;;kCACV,iBAAC,CAAA,GAAA,yCAAU;;4BACR,6BACC,gBAAC,CAAA,GAAA,yCAAK;gCACJ,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,SAAS;gCAC9B,SAAQ;gCACR,WAAU;gCACV,WAAW,oBAAoB;0CAC9B;;4BAGJ,sCACC,gBAAC,CAAA,GAAA,yCAAK;gCACJ,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,SAAS;gCAC9B,SAAQ;gCACR,YAAY;gCACZ,WAAU;gCACV,WAAW,oBAAoB;0CAC9B;;0CAGL,gBAAC,CAAA,GAAA,yCAAK;gCACJ,SAAS;gCACT,YAAY;gCACZ,WAAW,oBAAoB;gCAC/B,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,SAAS;0CAC7B;;;;;;;AAOf;AAEA;;CAEC,GACD,IAAI,0DAAe,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/AlertDialog.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 AlertTriangle from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg';\nimport {Button} from './Button';\nimport {ButtonGroup} from './ButtonGroup';\nimport {CenterBaseline} from './CenterBaseline';\nimport {chain} from '@react-aria/utils';\nimport {Content, Heading} from './Content';\nimport {Dialog} from './Dialog';\nimport {DOMProps, DOMRef} from '@react-types/shared';\nimport {forwardRef, ReactNode} from 'react';\nimport {IconContext} from './Icon';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg';\nimport {Provider} from 'react-aria-components';\nimport {style} from '../style' with {type: 'macro'};\nimport {UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AlertDialogProps extends DOMProps, UnsafeStyles {\n /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */\n variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning',\n /** The title of the AlertDialog. */\n title: string,\n /** The contents of the AlertDialog. */\n children: ReactNode,\n /** The label to display within the cancel button. */\n cancelLabel?: string,\n /** The label to display within the confirm button. */\n primaryActionLabel: string,\n /** The label to display within the secondary button. */\n secondaryActionLabel?: string,\n /** Whether the primary button is disabled. */\n isPrimaryActionDisabled?: boolean,\n /** Whether the secondary button is disabled. */\n isSecondaryActionDisabled?: boolean,\n /** Handler that is called when the cancel button is pressed. */\n onCancel?: () => void,\n /** Handler that is called when the primary button is pressed. */\n onPrimaryAction?: () => void,\n /** Handler that is called when the secondary button is pressed. */\n onSecondaryAction?: () => void,\n /** Button to focus by default when the dialog opens. */\n autoFocusButton?: 'cancel' | 'primary' | 'secondary',\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nconst icon = style({\n marginEnd: 8,\n '--iconPrimary': {\n type: 'fill',\n value: {\n variant: {\n error: 'negative',\n warning: 'notice'\n }\n }\n }\n});\n\nfunction AlertDialog(props: AlertDialogProps, ref: DOMRef) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n autoFocusButton,\n cancelLabel,\n secondaryActionLabel,\n primaryActionLabel,\n isSecondaryActionDisabled,\n isPrimaryActionDisabled,\n onCancel = () => {},\n onPrimaryAction = () => {},\n onSecondaryAction = () => {},\n title,\n children,\n variant = 'confirmation'\n } = props;\n\n let buttonVariant = 'primary';\n if (variant === 'confirmation') {\n buttonVariant = 'accent';\n } else if (variant === 'destructive') {\n buttonVariant = 'negative';\n }\n\n return (\n <Dialog\n role=\"alertdialog\"\n ref={ref}\n size={props.size}\n UNSAFE_style={props.UNSAFE_style}\n UNSAFE_className={(props.UNSAFE_className || '')}>\n {({close}) => (\n <>\n <Provider\n values={[\n [IconContext, {styles: icon({variant})}]\n ]}>\n <Heading slot=\"title\">\n <CenterBaseline>\n {variant === 'error' && <AlertTriangle aria-label={stringFormatter.format('dialog.alert')} />}\n {variant === 'warning' && <NoticeSquare aria-label={stringFormatter.format('dialog.alert')} />}\n {title}\n </CenterBaseline>\n </Heading>\n </Provider>\n <Content>{children}</Content>\n <ButtonGroup>\n {cancelLabel &&\n <Button\n onPress={() => chain(close(), onCancel())}\n variant=\"secondary\"\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'cancel'}>\n {cancelLabel}\n </Button>\n }\n {secondaryActionLabel &&\n <Button\n onPress={() => chain(close(), onSecondaryAction())}\n variant=\"secondary\"\n isDisabled={isSecondaryActionDisabled}\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'secondary'}>\n {secondaryActionLabel}\n </Button>\n }\n <Button\n variant={buttonVariant as 'primary' | 'accent' | 'negative'}\n isDisabled={isPrimaryActionDisabled}\n autoFocus={autoFocusButton === 'primary'}\n onPress={() => chain(close(), onPrimaryAction())}>\n {primaryActionLabel}\n </Button>\n </ButtonGroup>\n </>\n )}\n </Dialog>\n );\n}\n\n/**\n * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge.\n */\nlet _AlertDialog = forwardRef(AlertDialog);\nexport {_AlertDialog as AlertDialog};\n"],"names":[],"version":3,"file":"AlertDialog.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;AAqDD,MAAM;;;;;;;AAgBC,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAW;IAC7F,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,IAAI,mBACF,eAAe,eACf,WAAW,wBACX,oBAAoB,sBACpB,kBAAkB,6BAClB,yBAAyB,2BACzB,uBAAuB,YACvB,WAAW,KAAO,oBAClB,kBAAkB,KAAO,sBACzB,oBAAoB,KAAO,UAC3B,KAAK,YACL,QAAQ,WACR,UAAU,gBACX,GAAG;IAEJ,IAAI,gBAAgB;IACpB,IAAI,YAAY,gBACd,gBAAgB;SACX,IAAI,YAAY,eACrB,gBAAgB;IAGlB,qBACE,gBAAC,CAAA,GAAA,yCAAK;QACJ,MAAK;QACL,KAAK;QACL,MAAM,MAAM,IAAI;QAChB,cAAc,MAAM,YAAY;QAChC,kBAAmB,MAAM,gBAAgB,IAAI;kBAC5C,CAAC,SAAC,KAAK,EAAC,iBACP;;kCACE,gBAAC,CAAA,GAAA,eAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,yCAAU;gCAAG;oCAAC,QAAQ,2BAAK;iDAAC;oCAAO;gCAAE;6BAAE;yBACzC;kCACD,cAAA,gBAAC,CAAA,GAAA,yCAAM;4BAAE,MAAK;sCACZ,cAAA,iBAAC,CAAA,GAAA,yCAAa;;oCACX,YAAY,yBAAW,gBAAC,CAAA,GAAA,wCAAY;wCAAE,cAAY,gBAAgB,MAAM,CAAC;;oCACzE,YAAY,2BAAa,gBAAC,CAAA,GAAA,wCAAW;wCAAE,cAAY,gBAAgB,MAAM,CAAC;;oCAC1E;;;;;kCAIP,gBAAC,CAAA,GAAA,yCAAM;kCAAG;;kCACV,iBAAC,CAAA,GAAA,yCAAU;;4BACR,6BACC,gBAAC,CAAA,GAAA,yCAAK;gCACJ,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,SAAS;gCAC9B,SAAQ;gCACR,WAAU;gCACV,WAAW,oBAAoB;0CAC9B;;4BAGJ,sCACC,gBAAC,CAAA,GAAA,yCAAK;gCACJ,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,SAAS;gCAC9B,SAAQ;gCACR,YAAY;gCACZ,WAAU;gCACV,WAAW,oBAAoB;0CAC9B;;0CAGL,gBAAC,CAAA,GAAA,yCAAK;gCACJ,SAAS;gCACT,YAAY;gCACZ,WAAW,oBAAoB;gCAC/B,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,SAAS;0CAC7B;;;;;;;AAOf","sources":["packages/@react-spectrum/s2/src/AlertDialog.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 AlertTriangle from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg';\nimport {Button} from './Button';\nimport {ButtonGroup} from './ButtonGroup';\nimport {CenterBaseline} from './CenterBaseline';\nimport {chain} from '@react-aria/utils';\nimport {Content, Heading} from './Content';\nimport {Dialog} from './Dialog';\nimport {DOMProps, DOMRef} from '@react-types/shared';\nimport {forwardRef, ReactNode} from 'react';\nimport {IconContext} from './Icon';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg';\nimport {Provider} from 'react-aria-components';\nimport {style} from '../style' with {type: 'macro'};\nimport {UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AlertDialogProps extends DOMProps, UnsafeStyles {\n /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */\n variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning',\n /** The title of the AlertDialog. */\n title: string,\n /** The contents of the AlertDialog. */\n children: ReactNode,\n /** The label to display within the cancel button. */\n cancelLabel?: string,\n /** The label to display within the confirm button. */\n primaryActionLabel: string,\n /** The label to display within the secondary button. */\n secondaryActionLabel?: string,\n /** Whether the primary button is disabled. */\n isPrimaryActionDisabled?: boolean,\n /** Whether the secondary button is disabled. */\n isSecondaryActionDisabled?: boolean,\n /** Handler that is called when the cancel button is pressed. */\n onCancel?: () => void,\n /** Handler that is called when the primary button is pressed. */\n onPrimaryAction?: () => void,\n /** Handler that is called when the secondary button is pressed. */\n onSecondaryAction?: () => void,\n /** Button to focus by default when the dialog opens. */\n autoFocusButton?: 'cancel' | 'primary' | 'secondary',\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nconst icon = style({\n marginEnd: 8,\n '--iconPrimary': {\n type: 'fill',\n value: {\n variant: {\n error: 'negative',\n warning: 'notice'\n }\n }\n }\n});\n\n/**\n * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge.\n */\nexport const AlertDialog = forwardRef(function AlertDialog(props: AlertDialogProps, ref: DOMRef) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n autoFocusButton,\n cancelLabel,\n secondaryActionLabel,\n primaryActionLabel,\n isSecondaryActionDisabled,\n isPrimaryActionDisabled,\n onCancel = () => {},\n onPrimaryAction = () => {},\n onSecondaryAction = () => {},\n title,\n children,\n variant = 'confirmation'\n } = props;\n\n let buttonVariant = 'primary';\n if (variant === 'confirmation') {\n buttonVariant = 'accent';\n } else if (variant === 'destructive') {\n buttonVariant = 'negative';\n }\n\n return (\n <Dialog\n role=\"alertdialog\"\n ref={ref}\n size={props.size}\n UNSAFE_style={props.UNSAFE_style}\n UNSAFE_className={(props.UNSAFE_className || '')}>\n {({close}) => (\n <>\n <Provider\n values={[\n [IconContext, {styles: icon({variant})}]\n ]}>\n <Heading slot=\"title\">\n <CenterBaseline>\n {variant === 'error' && <AlertTriangle aria-label={stringFormatter.format('dialog.alert')} />}\n {variant === 'warning' && <NoticeSquare aria-label={stringFormatter.format('dialog.alert')} />}\n {title}\n </CenterBaseline>\n </Heading>\n </Provider>\n <Content>{children}</Content>\n <ButtonGroup>\n {cancelLabel &&\n <Button\n onPress={() => chain(close(), onCancel())}\n variant=\"secondary\"\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'cancel'}>\n {cancelLabel}\n </Button>\n }\n {secondaryActionLabel &&\n <Button\n onPress={() => chain(close(), onSecondaryAction())}\n variant=\"secondary\"\n isDisabled={isSecondaryActionDisabled}\n fillStyle=\"outline\"\n autoFocus={autoFocusButton === 'secondary'}>\n {secondaryActionLabel}\n </Button>\n }\n <Button\n variant={buttonVariant as 'primary' | 'accent' | 'negative'}\n isDisabled={isPrimaryActionDisabled}\n autoFocus={autoFocusButton === 'primary'}\n onPress={() => chain(close(), onPrimaryAction())}>\n {primaryActionLabel}\n </Button>\n </ButtonGroup>\n </>\n )}\n </Dialog>\n );\n});\n"],"names":[],"version":3,"file":"AlertDialog.mjs.map"}
package/dist/Avatar.cjs CHANGED
@@ -31,32 +31,32 @@ $parcel$export(module.exports, "Avatar", () => $38071d9ce246d4cf$export$e2255cf6
31
31
 
32
32
  const $38071d9ce246d4cf$var$imageStyles = function anonymous(props, overrides) {
33
33
  let rules = " .";
34
- let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|_8|h|_5|_4|__A|__c|__d|__a|__b|U|__Q|X|Z|V|W)[^\s]+/g) || [];
34
+ let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X)[^\s]+/g) || [];
35
35
  rules += matches.join('');
36
- let $_8 = false;
37
36
  let $_9 = false;
37
+ let $__a = false;
38
38
  for (let p of matches){
39
- if (/^\s*_8/.test(p)) $_8 = true;
40
39
  if (/^\s*_9/.test(p)) $_9 = true;
40
+ if (/^\s*__a/.test(p)) $__a = true;
41
41
  }
42
- rules += ' _vf';
43
42
  rules += ' _wf';
44
43
  rules += ' _xf';
45
44
  rules += ' _yf';
45
+ rules += ' _zf';
46
46
  rules += ' lI';
47
47
  rules += ' kI';
48
- if (!$_8) rules += ' _8-3t1x';
49
48
  if (!$_9) rules += ' _9-3t1x';
50
- rules += ' __R-yksgrp';
51
- if (props.isOverBackground) rules += ' _Lb';
52
- else rules += ' _La';
49
+ if (!$__a) rules += ' __a-3t1x';
50
+ rules += ' __S-yksgrp';
51
+ if (props.isOverBackground) rules += ' _Mb';
52
+ else rules += ' _Ma';
53
53
  rules += ' d-1de2x0q';
54
- if (props.isLarge) rules += ' _Nc';
55
- else rules += ' _Nb';
54
+ if (props.isLarge) rules += ' _Oc';
55
+ else rules += ' _Ob';
56
56
  return rules;
57
57
  };
58
58
  const $38071d9ce246d4cf$export$a20dad690e1279e2 = /*#__PURE__*/ (0, $1YWJ0$react.createContext)(null);
59
- function $38071d9ce246d4cf$var$Avatar(props, ref) {
59
+ const $38071d9ce246d4cf$export$e2255cf6045e8d47 = /*#__PURE__*/ (0, $1YWJ0$react.forwardRef)(function Avatar(props, ref) {
60
60
  [props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $38071d9ce246d4cf$export$a20dad690e1279e2);
61
61
  let domRef = (0, $1YWJ0$reactspectrumutils.useDOMRef)(ref);
62
62
  let { alt: alt = '', src: src, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className = '', size: size = 24, isOverBackground: isOverBackground, slot: slot = 'avatar', ...otherProps } = props;
@@ -80,10 +80,7 @@ function $38071d9ce246d4cf$var$Avatar(props, ref) {
80
80
  }, props.styles),
81
81
  src: src
82
82
  });
83
- }
84
- /**
85
- * An avatar is a thumbnail representation of an entity, such as a user or an organization.
86
- */ let $38071d9ce246d4cf$export$e2255cf6045e8d47 = /*#__PURE__*/ (0, $1YWJ0$react.forwardRef)($38071d9ce246d4cf$var$Avatar);
83
+ });
87
84
 
88
85
 
89
86
  //# sourceMappingURL=Avatar.cjs.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AA4BD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBC,MAAM,0DAAgB,CAAA,GAAA,0BAAY,EAA4D;AAErG,SAAS,6BAAO,KAAkB,EAAE,GAA6B;IAC/D,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,OACF,MAAM,SACN,GAAG,gBACH,YAAY,oBACZ,mBAAmB,UACnB,OAAO,sBACP,gBAAgB,QAChB,OAAO,UACP,GAAG,YACJ,GAAG;IACJ,MAAM,WAAW,CAAA,GAAA,oCAAa,EAAE;IAEhC,IAAI,UAAU,OAAO,KAAK;IAC1B,IAAI,UAAU,QAAQ;IACtB,qBACE,gCAAC,CAAA,GAAA,+BAAI;QACF,GAAG,QAAQ;QACZ,KAAK;QACL,MAAM;QACN,KAAK;QACL,cAAc;YACZ,GAAG,YAAY;YACf,OAAO;YACP,QAAQ;QACV;QACA,kBAAkB;QAClB,QAAQ,kCAAY;8BAAC;qBAAkB;QAAO,GAAG,MAAM,MAAM;QAC7D,KAAK;;AAEX;AAEA;;CAEC,GACD,IAAI,0DAAU,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Avatar.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 {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithoutWidth, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {Image} from './Image';\nimport {style} from '../style' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface AvatarProps extends UnsafeStyles, DOMProps, SlotProps {\n /** Text description of the avatar. */\n alt?: string,\n /** The image URL for the avatar. */\n src?: string,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithoutWidth,\n /**\n * The size of the avatar.\n * @default 24\n */\n size?: 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 96 | 112 | (number & {}),\n /** Whether the avatar is over a color background. */\n isOverBackground?: boolean\n}\n\nconst imageStyles = style({\n borderRadius: 'full',\n size: 20,\n flexShrink: 0,\n flexGrow: 0,\n disableTapHighlight: true,\n outlineStyle: {\n default: 'none',\n isOverBackground: 'solid'\n },\n outlineColor: '--s2-container-bg',\n outlineWidth: {\n default: 1,\n isLarge: 2\n }\n}, getAllowedOverrides({width: false}));\n\nexport const AvatarContext = createContext<ContextValue<AvatarProps, DOMRefValue<HTMLImageElement>>>(null);\n\nfunction Avatar(props: AvatarProps, ref: DOMRef<HTMLImageElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, AvatarContext);\n let domRef = useDOMRef(ref);\n let {\n alt = '',\n src,\n UNSAFE_style,\n UNSAFE_className = '',\n size = 24,\n isOverBackground,\n slot = 'avatar',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n\n let remSize = size / 16 + 'rem';\n let isLarge = size >= 64;\n return (\n <Image\n {...domProps}\n ref={domRef}\n slot={slot}\n alt={alt}\n UNSAFE_style={{\n ...UNSAFE_style,\n width: remSize,\n height: remSize\n }}\n UNSAFE_className={UNSAFE_className}\n styles={imageStyles({isOverBackground, isLarge}, props.styles)}\n src={src} />\n );\n}\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nlet _Avatar = forwardRef(Avatar);\nexport {_Avatar as Avatar};\n"],"names":[],"version":3,"file":"Avatar.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AA4BD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBC,MAAM,0DAAgB,CAAA,GAAA,0BAAY,EAA4D;AAK9F,MAAM,0DAAS,CAAA,GAAA,uBAAS,EAAE,SAAS,OAAO,KAAkB,EAAE,GAA6B;IAChG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,OACF,MAAM,SACN,GAAG,gBACH,YAAY,oBACZ,mBAAmB,UACnB,OAAO,sBACP,gBAAgB,QAChB,OAAO,UACP,GAAG,YACJ,GAAG;IACJ,MAAM,WAAW,CAAA,GAAA,oCAAa,EAAE;IAEhC,IAAI,UAAU,OAAO,KAAK;IAC1B,IAAI,UAAU,QAAQ;IACtB,qBACE,gCAAC,CAAA,GAAA,+BAAI;QACF,GAAG,QAAQ;QACZ,KAAK;QACL,MAAM;QACN,KAAK;QACL,cAAc;YACZ,GAAG,YAAY;YACf,OAAO;YACP,QAAQ;QACV;QACA,kBAAkB;QAClB,QAAQ,kCAAY;8BAAC;qBAAkB;QAAO,GAAG,MAAM,MAAM;QAC7D,KAAK;;AAEX","sources":["packages/@react-spectrum/s2/src/Avatar.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 {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithoutWidth, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {Image} from './Image';\nimport {style} from '../style' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface AvatarProps extends UnsafeStyles, DOMProps, SlotProps {\n /** Text description of the avatar. */\n alt?: string,\n /** The image URL for the avatar. */\n src?: string,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithoutWidth,\n /**\n * The size of the avatar.\n * @default 24\n */\n size?: 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 96 | 112 | (number & {}),\n /** Whether the avatar is over a color background. */\n isOverBackground?: boolean\n}\n\nconst imageStyles = style({\n borderRadius: 'full',\n size: 20,\n flexShrink: 0,\n flexGrow: 0,\n disableTapHighlight: true,\n outlineStyle: {\n default: 'none',\n isOverBackground: 'solid'\n },\n outlineColor: '--s2-container-bg',\n outlineWidth: {\n default: 1,\n isLarge: 2\n }\n}, getAllowedOverrides({width: false}));\n\nexport const AvatarContext = createContext<ContextValue<AvatarProps, DOMRefValue<HTMLImageElement>>>(null);\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nexport const Avatar = forwardRef(function Avatar(props: AvatarProps, ref: DOMRef<HTMLImageElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, AvatarContext);\n let domRef = useDOMRef(ref);\n let {\n alt = '',\n src,\n UNSAFE_style,\n UNSAFE_className = '',\n size = 24,\n isOverBackground,\n slot = 'avatar',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n\n let remSize = size / 16 + 'rem';\n let isLarge = size >= 64;\n return (\n <Image\n {...domProps}\n ref={domRef}\n slot={slot}\n alt={alt}\n UNSAFE_style={{\n ...UNSAFE_style,\n width: remSize,\n height: remSize\n }}\n UNSAFE_className={UNSAFE_className}\n styles={imageStyles({isOverBackground, isLarge}, props.styles)}\n src={src} />\n );\n});\n"],"names":[],"version":3,"file":"Avatar.cjs.map"}
package/dist/Avatar.css CHANGED
@@ -3,19 +3,19 @@
3
3
  }
4
4
 
5
5
  @layer _.a {
6
- ._vf {
6
+ ._wf {
7
7
  border-start-start-radius: 9999px;
8
8
  }
9
9
 
10
- ._wf {
10
+ ._xf {
11
11
  border-start-end-radius: 9999px;
12
12
  }
13
13
 
14
- ._xf {
14
+ ._yf {
15
15
  border-end-start-radius: 9999px;
16
16
  }
17
17
 
18
- ._yf {
18
+ ._zf {
19
19
  border-end-end-radius: 9999px;
20
20
  }
21
21
 
@@ -27,23 +27,23 @@
27
27
  height: calc(1.25rem * var(--s2-scale));
28
28
  }
29
29
 
30
- ._8-3t1x {
30
+ ._9-3t1x {
31
31
  flex-shrink: 0;
32
32
  }
33
33
 
34
- ._9-3t1x {
34
+ .__a-3t1x {
35
35
  flex-grow: 0;
36
36
  }
37
37
 
38
- .__R-yksgrp {
38
+ .__S-yksgrp {
39
39
  -webkit-tap-highlight-color: #0000;
40
40
  }
41
41
 
42
- ._La {
42
+ ._Ma {
43
43
  outline-style: none;
44
44
  }
45
45
 
46
- ._Lb {
46
+ ._Mb {
47
47
  outline-style: solid;
48
48
  }
49
49
 
@@ -51,11 +51,11 @@
51
51
  outline-color: var(--s2-container-bg);
52
52
  }
53
53
 
54
- ._Nb {
54
+ ._Ob {
55
55
  outline-width: 1px;
56
56
  }
57
57
 
58
- ._Nc {
58
+ ._Oc {
59
59
  outline-width: 2px;
60
60
  }
61
61
  }
@@ -1 +1 @@
1
- {"mappings":"AAsCoB;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA","sources":["packages/@react-spectrum/s2/src/Avatar.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 {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithoutWidth, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {Image} from './Image';\nimport {style} from '../style' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface AvatarProps extends UnsafeStyles, DOMProps, SlotProps {\n /** Text description of the avatar. */\n alt?: string,\n /** The image URL for the avatar. */\n src?: string,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithoutWidth,\n /**\n * The size of the avatar.\n * @default 24\n */\n size?: 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 96 | 112 | (number & {}),\n /** Whether the avatar is over a color background. */\n isOverBackground?: boolean\n}\n\nconst imageStyles = style({\n borderRadius: 'full',\n size: 20,\n flexShrink: 0,\n flexGrow: 0,\n disableTapHighlight: true,\n outlineStyle: {\n default: 'none',\n isOverBackground: 'solid'\n },\n outlineColor: '--s2-container-bg',\n outlineWidth: {\n default: 1,\n isLarge: 2\n }\n}, getAllowedOverrides({width: false}));\n\nexport const AvatarContext = createContext<ContextValue<AvatarProps, DOMRefValue<HTMLImageElement>>>(null);\n\nfunction Avatar(props: AvatarProps, ref: DOMRef<HTMLImageElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, AvatarContext);\n let domRef = useDOMRef(ref);\n let {\n alt = '',\n src,\n UNSAFE_style,\n UNSAFE_className = '',\n size = 24,\n isOverBackground,\n slot = 'avatar',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n\n let remSize = size / 16 + 'rem';\n let isLarge = size >= 64;\n return (\n <Image\n {...domProps}\n ref={domRef}\n slot={slot}\n alt={alt}\n UNSAFE_style={{\n ...UNSAFE_style,\n width: remSize,\n height: remSize\n }}\n UNSAFE_className={UNSAFE_className}\n styles={imageStyles({isOverBackground, isLarge}, props.styles)}\n src={src} />\n );\n}\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nlet _Avatar = forwardRef(Avatar);\nexport {_Avatar as Avatar};\n"],"names":[],"version":3,"file":"Avatar.css.map"}
1
+ {"mappings":"AAsCoB;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA","sources":["packages/@react-spectrum/s2/src/Avatar.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 {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithoutWidth, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {Image} from './Image';\nimport {style} from '../style' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface AvatarProps extends UnsafeStyles, DOMProps, SlotProps {\n /** Text description of the avatar. */\n alt?: string,\n /** The image URL for the avatar. */\n src?: string,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithoutWidth,\n /**\n * The size of the avatar.\n * @default 24\n */\n size?: 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 96 | 112 | (number & {}),\n /** Whether the avatar is over a color background. */\n isOverBackground?: boolean\n}\n\nconst imageStyles = style({\n borderRadius: 'full',\n size: 20,\n flexShrink: 0,\n flexGrow: 0,\n disableTapHighlight: true,\n outlineStyle: {\n default: 'none',\n isOverBackground: 'solid'\n },\n outlineColor: '--s2-container-bg',\n outlineWidth: {\n default: 1,\n isLarge: 2\n }\n}, getAllowedOverrides({width: false}));\n\nexport const AvatarContext = createContext<ContextValue<AvatarProps, DOMRefValue<HTMLImageElement>>>(null);\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nexport const Avatar = forwardRef(function Avatar(props: AvatarProps, ref: DOMRef<HTMLImageElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, AvatarContext);\n let domRef = useDOMRef(ref);\n let {\n alt = '',\n src,\n UNSAFE_style,\n UNSAFE_className = '',\n size = 24,\n isOverBackground,\n slot = 'avatar',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n\n let remSize = size / 16 + 'rem';\n let isLarge = size >= 64;\n return (\n <Image\n {...domProps}\n ref={domRef}\n slot={slot}\n alt={alt}\n UNSAFE_style={{\n ...UNSAFE_style,\n width: remSize,\n height: remSize\n }}\n UNSAFE_className={UNSAFE_className}\n styles={imageStyles({isOverBackground, isLarge}, props.styles)}\n src={src} />\n );\n});\n"],"names":[],"version":3,"file":"Avatar.css.map"}
package/dist/Avatar.mjs CHANGED
@@ -24,32 +24,32 @@ import {useDOMRef as $lGIgj$useDOMRef} from "@react-spectrum/utils";
24
24
 
25
25
  const $3ffa2cd930156220$var$imageStyles = function anonymous(props, overrides) {
26
26
  let rules = " .";
27
- let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|_8|h|_5|_4|__A|__c|__d|__a|__b|U|__Q|X|Z|V|W)[^\s]+/g) || [];
27
+ let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X)[^\s]+/g) || [];
28
28
  rules += matches.join('');
29
- let $_8 = false;
30
29
  let $_9 = false;
30
+ let $__a = false;
31
31
  for (let p of matches){
32
- if (/^\s*_8/.test(p)) $_8 = true;
33
32
  if (/^\s*_9/.test(p)) $_9 = true;
33
+ if (/^\s*__a/.test(p)) $__a = true;
34
34
  }
35
- rules += ' _vf';
36
35
  rules += ' _wf';
37
36
  rules += ' _xf';
38
37
  rules += ' _yf';
38
+ rules += ' _zf';
39
39
  rules += ' lI';
40
40
  rules += ' kI';
41
- if (!$_8) rules += ' _8-3t1x';
42
41
  if (!$_9) rules += ' _9-3t1x';
43
- rules += ' __R-yksgrp';
44
- if (props.isOverBackground) rules += ' _Lb';
45
- else rules += ' _La';
42
+ if (!$__a) rules += ' __a-3t1x';
43
+ rules += ' __S-yksgrp';
44
+ if (props.isOverBackground) rules += ' _Mb';
45
+ else rules += ' _Ma';
46
46
  rules += ' d-1de2x0q';
47
- if (props.isLarge) rules += ' _Nc';
48
- else rules += ' _Nb';
47
+ if (props.isLarge) rules += ' _Oc';
48
+ else rules += ' _Ob';
49
49
  return rules;
50
50
  };
51
51
  const $3ffa2cd930156220$export$a20dad690e1279e2 = /*#__PURE__*/ (0, $lGIgj$createContext)(null);
52
- function $3ffa2cd930156220$var$Avatar(props, ref) {
52
+ const $3ffa2cd930156220$export$e2255cf6045e8d47 = /*#__PURE__*/ (0, $lGIgj$forwardRef)(function Avatar(props, ref) {
53
53
  [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $3ffa2cd930156220$export$a20dad690e1279e2);
54
54
  let domRef = (0, $lGIgj$useDOMRef)(ref);
55
55
  let { alt: alt = '', src: src, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className = '', size: size = 24, isOverBackground: isOverBackground, slot: slot = 'avatar', ...otherProps } = props;
@@ -73,10 +73,7 @@ function $3ffa2cd930156220$var$Avatar(props, ref) {
73
73
  }, props.styles),
74
74
  src: src
75
75
  });
76
- }
77
- /**
78
- * An avatar is a thumbnail representation of an entity, such as a user or an organization.
79
- */ let $3ffa2cd930156220$export$e2255cf6045e8d47 = /*#__PURE__*/ (0, $lGIgj$forwardRef)($3ffa2cd930156220$var$Avatar);
76
+ });
80
77
 
81
78
 
82
79
  export {$3ffa2cd930156220$export$a20dad690e1279e2 as AvatarContext, $3ffa2cd930156220$export$e2255cf6045e8d47 as Avatar};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AA4BD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBC,MAAM,0DAAgB,CAAA,GAAA,oBAAY,EAA4D;AAErG,SAAS,6BAAO,KAAkB,EAAE,GAA6B;IAC/D,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,OACF,MAAM,SACN,GAAG,gBACH,YAAY,oBACZ,mBAAmB,UACnB,OAAO,sBACP,gBAAgB,QAChB,OAAO,UACP,GAAG,YACJ,GAAG;IACJ,MAAM,WAAW,CAAA,GAAA,qBAAa,EAAE;IAEhC,IAAI,UAAU,OAAO,KAAK;IAC1B,IAAI,UAAU,QAAQ;IACtB,qBACE,gBAAC,CAAA,GAAA,yCAAI;QACF,GAAG,QAAQ;QACZ,KAAK;QACL,MAAM;QACN,KAAK;QACL,cAAc;YACZ,GAAG,YAAY;YACf,OAAO;YACP,QAAQ;QACV;QACA,kBAAkB;QAClB,QAAQ,kCAAY;8BAAC;qBAAkB;QAAO,GAAG,MAAM,MAAM;QAC7D,KAAK;;AAEX;AAEA;;CAEC,GACD,IAAI,0DAAU,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Avatar.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 {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithoutWidth, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {Image} from './Image';\nimport {style} from '../style' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface AvatarProps extends UnsafeStyles, DOMProps, SlotProps {\n /** Text description of the avatar. */\n alt?: string,\n /** The image URL for the avatar. */\n src?: string,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithoutWidth,\n /**\n * The size of the avatar.\n * @default 24\n */\n size?: 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 96 | 112 | (number & {}),\n /** Whether the avatar is over a color background. */\n isOverBackground?: boolean\n}\n\nconst imageStyles = style({\n borderRadius: 'full',\n size: 20,\n flexShrink: 0,\n flexGrow: 0,\n disableTapHighlight: true,\n outlineStyle: {\n default: 'none',\n isOverBackground: 'solid'\n },\n outlineColor: '--s2-container-bg',\n outlineWidth: {\n default: 1,\n isLarge: 2\n }\n}, getAllowedOverrides({width: false}));\n\nexport const AvatarContext = createContext<ContextValue<AvatarProps, DOMRefValue<HTMLImageElement>>>(null);\n\nfunction Avatar(props: AvatarProps, ref: DOMRef<HTMLImageElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, AvatarContext);\n let domRef = useDOMRef(ref);\n let {\n alt = '',\n src,\n UNSAFE_style,\n UNSAFE_className = '',\n size = 24,\n isOverBackground,\n slot = 'avatar',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n\n let remSize = size / 16 + 'rem';\n let isLarge = size >= 64;\n return (\n <Image\n {...domProps}\n ref={domRef}\n slot={slot}\n alt={alt}\n UNSAFE_style={{\n ...UNSAFE_style,\n width: remSize,\n height: remSize\n }}\n UNSAFE_className={UNSAFE_className}\n styles={imageStyles({isOverBackground, isLarge}, props.styles)}\n src={src} />\n );\n}\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nlet _Avatar = forwardRef(Avatar);\nexport {_Avatar as Avatar};\n"],"names":[],"version":3,"file":"Avatar.mjs.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AA4BD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBC,MAAM,0DAAgB,CAAA,GAAA,oBAAY,EAA4D;AAK9F,MAAM,0DAAS,CAAA,GAAA,iBAAS,EAAE,SAAS,OAAO,KAAkB,EAAE,GAA6B;IAChG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,OACF,MAAM,SACN,GAAG,gBACH,YAAY,oBACZ,mBAAmB,UACnB,OAAO,sBACP,gBAAgB,QAChB,OAAO,UACP,GAAG,YACJ,GAAG;IACJ,MAAM,WAAW,CAAA,GAAA,qBAAa,EAAE;IAEhC,IAAI,UAAU,OAAO,KAAK;IAC1B,IAAI,UAAU,QAAQ;IACtB,qBACE,gBAAC,CAAA,GAAA,yCAAI;QACF,GAAG,QAAQ;QACZ,KAAK;QACL,MAAM;QACN,KAAK;QACL,cAAc;YACZ,GAAG,YAAY;YACf,OAAO;YACP,QAAQ;QACV;QACA,kBAAkB;QAClB,QAAQ,kCAAY;8BAAC;qBAAkB;QAAO,GAAG,MAAM,MAAM;QAC7D,KAAK;;AAEX","sources":["packages/@react-spectrum/s2/src/Avatar.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 {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithoutWidth, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {Image} from './Image';\nimport {style} from '../style' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface AvatarProps extends UnsafeStyles, DOMProps, SlotProps {\n /** Text description of the avatar. */\n alt?: string,\n /** The image URL for the avatar. */\n src?: string,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithoutWidth,\n /**\n * The size of the avatar.\n * @default 24\n */\n size?: 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 96 | 112 | (number & {}),\n /** Whether the avatar is over a color background. */\n isOverBackground?: boolean\n}\n\nconst imageStyles = style({\n borderRadius: 'full',\n size: 20,\n flexShrink: 0,\n flexGrow: 0,\n disableTapHighlight: true,\n outlineStyle: {\n default: 'none',\n isOverBackground: 'solid'\n },\n outlineColor: '--s2-container-bg',\n outlineWidth: {\n default: 1,\n isLarge: 2\n }\n}, getAllowedOverrides({width: false}));\n\nexport const AvatarContext = createContext<ContextValue<AvatarProps, DOMRefValue<HTMLImageElement>>>(null);\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nexport const Avatar = forwardRef(function Avatar(props: AvatarProps, ref: DOMRef<HTMLImageElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, AvatarContext);\n let domRef = useDOMRef(ref);\n let {\n alt = '',\n src,\n UNSAFE_style,\n UNSAFE_className = '',\n size = 24,\n isOverBackground,\n slot = 'avatar',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n\n let remSize = size / 16 + 'rem';\n let isLarge = size >= 64;\n return (\n <Image\n {...domProps}\n ref={domRef}\n slot={slot}\n alt={alt}\n UNSAFE_style={{\n ...UNSAFE_style,\n width: remSize,\n height: remSize\n }}\n UNSAFE_className={UNSAFE_className}\n styles={imageStyles({isOverBackground, isLarge}, props.styles)}\n src={src} />\n );\n});\n"],"names":[],"version":3,"file":"Avatar.mjs.map"}