@react-spectrum/s2 0.7.1 → 0.8.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 (346) hide show
  1. package/dist/ActionBar.cjs.map +1 -1
  2. package/dist/ActionBar.css.map +1 -1
  3. package/dist/ActionBar.mjs.map +1 -1
  4. package/dist/ActionButton.cjs +26 -7
  5. package/dist/ActionButton.cjs.map +1 -1
  6. package/dist/ActionButton.css +74 -18
  7. package/dist/ActionButton.css.map +1 -1
  8. package/dist/ActionButton.mjs +26 -7
  9. package/dist/ActionButton.mjs.map +1 -1
  10. package/dist/Add.cjs.map +1 -1
  11. package/dist/Add.mjs.map +1 -1
  12. package/dist/Asterisk.cjs.map +1 -1
  13. package/dist/Asterisk.mjs.map +1 -1
  14. package/dist/Breadcrumbs.cjs.map +1 -1
  15. package/dist/Breadcrumbs.css.map +1 -1
  16. package/dist/Breadcrumbs.mjs.map +1 -1
  17. package/dist/Button.cjs.map +1 -1
  18. package/dist/Button.css.map +1 -1
  19. package/dist/Button.mjs.map +1 -1
  20. package/dist/ButtonGroup.cjs +3 -2
  21. package/dist/ButtonGroup.cjs.map +1 -1
  22. package/dist/ButtonGroup.css.map +1 -1
  23. package/dist/ButtonGroup.mjs +3 -2
  24. package/dist/ButtonGroup.mjs.map +1 -1
  25. package/dist/Card.cjs +1 -1
  26. package/dist/Card.cjs.map +1 -1
  27. package/dist/Card.css.map +1 -1
  28. package/dist/Card.mjs +1 -1
  29. package/dist/Card.mjs.map +1 -1
  30. package/dist/CenterBaseline.cjs.map +1 -1
  31. package/dist/CenterBaseline.css.map +1 -1
  32. package/dist/CenterBaseline.mjs.map +1 -1
  33. package/dist/Checkmark.cjs.map +1 -1
  34. package/dist/Checkmark.mjs.map +1 -1
  35. package/dist/Chevron.cjs.map +1 -1
  36. package/dist/Chevron.mjs.map +1 -1
  37. package/dist/ColorHandle.cjs.map +1 -1
  38. package/dist/ColorHandle.css.map +1 -1
  39. package/dist/ColorHandle.mjs.map +1 -1
  40. package/dist/ColorSwatchPicker.cjs +2 -2
  41. package/dist/ColorSwatchPicker.cjs.map +1 -1
  42. package/dist/ColorSwatchPicker.css.map +1 -1
  43. package/dist/ColorSwatchPicker.mjs +2 -2
  44. package/dist/ColorSwatchPicker.mjs.map +1 -1
  45. package/dist/ComboBox.cjs.map +1 -1
  46. package/dist/ComboBox.css.map +1 -1
  47. package/dist/ComboBox.mjs.map +1 -1
  48. package/dist/Content.cjs +6 -6
  49. package/dist/Content.cjs.map +1 -1
  50. package/dist/Content.mjs +6 -6
  51. package/dist/Content.mjs.map +1 -1
  52. package/dist/Cross.cjs.map +1 -1
  53. package/dist/Cross.mjs.map +1 -1
  54. package/dist/Dash.cjs.map +1 -1
  55. package/dist/Dash.mjs.map +1 -1
  56. package/dist/DialogContainer.cjs.map +1 -1
  57. package/dist/DialogContainer.mjs.map +1 -1
  58. package/dist/DialogTrigger.cjs.map +1 -1
  59. package/dist/DialogTrigger.mjs.map +1 -1
  60. package/dist/Disclosure.cjs +24 -21
  61. package/dist/Disclosure.cjs.map +1 -1
  62. package/dist/Disclosure.css +12 -20
  63. package/dist/Disclosure.css.map +1 -1
  64. package/dist/Disclosure.mjs +24 -21
  65. package/dist/Disclosure.mjs.map +1 -1
  66. package/dist/Divider.cjs +6 -0
  67. package/dist/Divider.cjs.map +1 -1
  68. package/dist/Divider.css +8 -0
  69. package/dist/Divider.css.map +1 -1
  70. package/dist/Divider.mjs +6 -0
  71. package/dist/Divider.mjs.map +1 -1
  72. package/dist/Field.cjs.map +1 -1
  73. package/dist/Field.css.map +1 -1
  74. package/dist/Field.mjs.map +1 -1
  75. package/dist/Image.cjs +1 -1
  76. package/dist/Image.cjs.map +1 -1
  77. package/dist/Image.css.map +1 -1
  78. package/dist/Image.mjs +1 -1
  79. package/dist/Image.mjs.map +1 -1
  80. package/dist/ImageCoordinator.cjs.map +1 -1
  81. package/dist/ImageCoordinator.mjs.map +1 -1
  82. package/dist/Link.cjs.map +1 -1
  83. package/dist/Link.css.map +1 -1
  84. package/dist/Link.mjs.map +1 -1
  85. package/dist/LinkOut.cjs.map +1 -1
  86. package/dist/LinkOut.mjs.map +1 -1
  87. package/dist/Menu.cjs.map +1 -1
  88. package/dist/Menu.css.map +1 -1
  89. package/dist/Menu.mjs.map +1 -1
  90. package/dist/NotificationBadge.cjs +163 -0
  91. package/dist/NotificationBadge.cjs.map +1 -0
  92. package/dist/NotificationBadge.css +227 -0
  93. package/dist/NotificationBadge.css.map +1 -0
  94. package/dist/NotificationBadge.mjs +157 -0
  95. package/dist/NotificationBadge.mjs.map +1 -0
  96. package/dist/Picker.cjs.map +1 -1
  97. package/dist/Picker.css.map +1 -1
  98. package/dist/Picker.mjs.map +1 -1
  99. package/dist/Provider.cjs.map +1 -1
  100. package/dist/Provider.css.map +1 -1
  101. package/dist/Provider.mjs.map +1 -1
  102. package/dist/Slider.cjs.map +1 -1
  103. package/dist/Slider.css.map +1 -1
  104. package/dist/Slider.mjs.map +1 -1
  105. package/dist/StatusLight.cjs +2 -2
  106. package/dist/StatusLight.cjs.map +1 -1
  107. package/dist/StatusLight.css.map +1 -1
  108. package/dist/StatusLight.mjs +2 -2
  109. package/dist/StatusLight.mjs.map +1 -1
  110. package/dist/Tabs.cjs +1 -0
  111. package/dist/Tabs.cjs.map +1 -1
  112. package/dist/Tabs.css.map +1 -1
  113. package/dist/Tabs.mjs +1 -0
  114. package/dist/Tabs.mjs.map +1 -1
  115. package/dist/TabsPicker.cjs.map +1 -1
  116. package/dist/TabsPicker.css.map +1 -1
  117. package/dist/TabsPicker.mjs.map +1 -1
  118. package/dist/Toast.cjs +557 -0
  119. package/dist/Toast.cjs.map +1 -0
  120. package/dist/Toast.css +461 -0
  121. package/dist/Toast.css.map +1 -0
  122. package/dist/Toast.mjs +551 -0
  123. package/dist/Toast.mjs.map +1 -0
  124. package/dist/Toast_module.cjs +70 -0
  125. package/dist/Toast_module.cjs.map +1 -0
  126. package/dist/Toast_module.css +119 -0
  127. package/dist/Toast_module.css.map +1 -0
  128. package/dist/Toast_module.mjs +72 -0
  129. package/dist/Toast_module.mjs.map +1 -0
  130. package/dist/ToggleButton.cjs.map +1 -1
  131. package/dist/ToggleButton.css.map +1 -1
  132. package/dist/ToggleButton.mjs.map +1 -1
  133. package/dist/Tooltip.cjs.map +1 -1
  134. package/dist/Tooltip.css.map +1 -1
  135. package/dist/Tooltip.mjs.map +1 -1
  136. package/dist/TreeView.cjs.map +1 -1
  137. package/dist/TreeView.css.map +1 -1
  138. package/dist/TreeView.mjs.map +1 -1
  139. package/dist/ar-AE.cjs +6 -1
  140. package/dist/ar-AE.cjs.map +1 -1
  141. package/dist/ar-AE.mjs +6 -1
  142. package/dist/ar-AE.mjs.map +1 -1
  143. package/dist/bg-BG.cjs +6 -1
  144. package/dist/bg-BG.cjs.map +1 -1
  145. package/dist/bg-BG.mjs +6 -1
  146. package/dist/bg-BG.mjs.map +1 -1
  147. package/dist/cs-CZ.cjs +10 -2
  148. package/dist/cs-CZ.cjs.map +1 -1
  149. package/dist/cs-CZ.mjs +10 -2
  150. package/dist/cs-CZ.mjs.map +1 -1
  151. package/dist/da-DK.cjs +8 -3
  152. package/dist/da-DK.cjs.map +1 -1
  153. package/dist/da-DK.mjs +8 -3
  154. package/dist/da-DK.mjs.map +1 -1
  155. package/dist/de-DE.cjs +7 -3
  156. package/dist/de-DE.cjs.map +1 -1
  157. package/dist/de-DE.mjs +7 -3
  158. package/dist/de-DE.mjs.map +1 -1
  159. package/dist/el-GR.cjs +6 -1
  160. package/dist/el-GR.cjs.map +1 -1
  161. package/dist/el-GR.mjs +6 -1
  162. package/dist/el-GR.mjs.map +1 -1
  163. package/dist/en-US.cjs +6 -1
  164. package/dist/en-US.cjs.map +1 -1
  165. package/dist/en-US.mjs +6 -1
  166. package/dist/en-US.mjs.map +1 -1
  167. package/dist/es-ES.cjs +10 -6
  168. package/dist/es-ES.cjs.map +1 -1
  169. package/dist/es-ES.mjs +10 -6
  170. package/dist/es-ES.mjs.map +1 -1
  171. package/dist/et-EE.cjs +6 -1
  172. package/dist/et-EE.cjs.map +1 -1
  173. package/dist/et-EE.mjs +6 -1
  174. package/dist/et-EE.mjs.map +1 -1
  175. package/dist/fi-FI.cjs +7 -2
  176. package/dist/fi-FI.cjs.map +1 -1
  177. package/dist/fi-FI.mjs +7 -2
  178. package/dist/fi-FI.mjs.map +1 -1
  179. package/dist/fr-FR.cjs +7 -3
  180. package/dist/fr-FR.cjs.map +1 -1
  181. package/dist/fr-FR.mjs +7 -3
  182. package/dist/fr-FR.mjs.map +1 -1
  183. package/dist/he-IL.cjs +9 -5
  184. package/dist/he-IL.cjs.map +1 -1
  185. package/dist/he-IL.mjs +9 -5
  186. package/dist/he-IL.mjs.map +1 -1
  187. package/dist/hr-HR.cjs +11 -3
  188. package/dist/hr-HR.cjs.map +1 -1
  189. package/dist/hr-HR.mjs +11 -3
  190. package/dist/hr-HR.mjs.map +1 -1
  191. package/dist/hu-HU.cjs +6 -1
  192. package/dist/hu-HU.cjs.map +1 -1
  193. package/dist/hu-HU.mjs +6 -1
  194. package/dist/hu-HU.mjs.map +1 -1
  195. package/dist/it-IT.cjs +6 -2
  196. package/dist/it-IT.cjs.map +1 -1
  197. package/dist/it-IT.mjs +6 -2
  198. package/dist/it-IT.mjs.map +1 -1
  199. package/dist/ja-JP.cjs +7 -2
  200. package/dist/ja-JP.cjs.map +1 -1
  201. package/dist/ja-JP.mjs +7 -2
  202. package/dist/ja-JP.mjs.map +1 -1
  203. package/dist/ko-KR.cjs +8 -3
  204. package/dist/ko-KR.cjs.map +1 -1
  205. package/dist/ko-KR.mjs +8 -3
  206. package/dist/ko-KR.mjs.map +1 -1
  207. package/dist/lt-LT.cjs +8 -3
  208. package/dist/lt-LT.cjs.map +1 -1
  209. package/dist/lt-LT.mjs +8 -3
  210. package/dist/lt-LT.mjs.map +1 -1
  211. package/dist/lv-LV.cjs +9 -4
  212. package/dist/lv-LV.cjs.map +1 -1
  213. package/dist/lv-LV.mjs +9 -4
  214. package/dist/lv-LV.mjs.map +1 -1
  215. package/dist/main.cjs +9 -0
  216. package/dist/main.cjs.map +1 -1
  217. package/dist/module.mjs +6 -2
  218. package/dist/module.mjs.map +1 -1
  219. package/dist/nb-NO.cjs +12 -4
  220. package/dist/nb-NO.cjs.map +1 -1
  221. package/dist/nb-NO.mjs +12 -4
  222. package/dist/nb-NO.mjs.map +1 -1
  223. package/dist/nl-NL.cjs +6 -1
  224. package/dist/nl-NL.cjs.map +1 -1
  225. package/dist/nl-NL.mjs +6 -1
  226. package/dist/nl-NL.mjs.map +1 -1
  227. package/dist/pl-PL.cjs +11 -3
  228. package/dist/pl-PL.cjs.map +1 -1
  229. package/dist/pl-PL.mjs +11 -3
  230. package/dist/pl-PL.mjs.map +1 -1
  231. package/dist/pressScale.cjs.map +1 -1
  232. package/dist/pressScale.mjs.map +1 -1
  233. package/dist/pt-BR.cjs +6 -1
  234. package/dist/pt-BR.cjs.map +1 -1
  235. package/dist/pt-BR.mjs +6 -1
  236. package/dist/pt-BR.mjs.map +1 -1
  237. package/dist/pt-PT.cjs +6 -1
  238. package/dist/pt-PT.cjs.map +1 -1
  239. package/dist/pt-PT.mjs +6 -1
  240. package/dist/pt-PT.mjs.map +1 -1
  241. package/dist/ro-RO.cjs +8 -4
  242. package/dist/ro-RO.cjs.map +1 -1
  243. package/dist/ro-RO.mjs +8 -4
  244. package/dist/ro-RO.mjs.map +1 -1
  245. package/dist/ru-RU.cjs +11 -3
  246. package/dist/ru-RU.cjs.map +1 -1
  247. package/dist/ru-RU.mjs +11 -3
  248. package/dist/ru-RU.mjs.map +1 -1
  249. package/dist/sk-SK.cjs +10 -2
  250. package/dist/sk-SK.cjs.map +1 -1
  251. package/dist/sk-SK.mjs +10 -2
  252. package/dist/sk-SK.mjs.map +1 -1
  253. package/dist/sl-SI.cjs +11 -3
  254. package/dist/sl-SI.cjs.map +1 -1
  255. package/dist/sl-SI.mjs +11 -3
  256. package/dist/sl-SI.mjs.map +1 -1
  257. package/dist/sr-SP.cjs +10 -2
  258. package/dist/sr-SP.cjs.map +1 -1
  259. package/dist/sr-SP.mjs +10 -2
  260. package/dist/sr-SP.mjs.map +1 -1
  261. package/dist/sv-SE.cjs +6 -2
  262. package/dist/sv-SE.cjs.map +1 -1
  263. package/dist/sv-SE.mjs +6 -2
  264. package/dist/sv-SE.mjs.map +1 -1
  265. package/dist/tr-TR.cjs +7 -2
  266. package/dist/tr-TR.cjs.map +1 -1
  267. package/dist/tr-TR.mjs +7 -2
  268. package/dist/tr-TR.mjs.map +1 -1
  269. package/dist/types.d.ts +97 -29
  270. package/dist/types.d.ts.map +1 -1
  271. package/dist/uk-UA.cjs +10 -2
  272. package/dist/uk-UA.cjs.map +1 -1
  273. package/dist/uk-UA.mjs +10 -2
  274. package/dist/uk-UA.mjs.map +1 -1
  275. package/dist/zh-CN.cjs +6 -1
  276. package/dist/zh-CN.cjs.map +1 -1
  277. package/dist/zh-CN.mjs +6 -1
  278. package/dist/zh-CN.mjs.map +1 -1
  279. package/dist/zh-TW.cjs +6 -1
  280. package/dist/zh-TW.cjs.map +1 -1
  281. package/dist/zh-TW.mjs +6 -1
  282. package/dist/zh-TW.mjs.map +1 -1
  283. package/icons/Skeleton.cjs.map +1 -1
  284. package/icons/Skeleton.css.map +1 -1
  285. package/icons/Skeleton.mjs.map +1 -1
  286. package/package.json +21 -19
  287. package/src/ActionBar.tsx +9 -2
  288. package/src/ActionButton.tsx +38 -3
  289. package/src/Breadcrumbs.tsx +1 -1
  290. package/src/Button.tsx +2 -2
  291. package/src/ButtonGroup.tsx +4 -2
  292. package/src/Calendar.tsx +2 -1
  293. package/src/Card.tsx +1 -1
  294. package/src/CenterBaseline.tsx +1 -1
  295. package/src/ColorHandle.tsx +2 -2
  296. package/src/ColorSwatchPicker.tsx +2 -1
  297. package/src/ComboBox.tsx +2 -2
  298. package/src/Content.tsx +6 -6
  299. package/src/DateField.tsx +1 -1
  300. package/src/DatePicker.tsx +1 -1
  301. package/src/DateRangePicker.tsx +1 -1
  302. package/src/DialogContainer.tsx +2 -2
  303. package/src/DialogTrigger.tsx +2 -1
  304. package/src/Disclosure.tsx +18 -24
  305. package/src/Divider.tsx +2 -0
  306. package/src/Field.tsx +2 -2
  307. package/src/Image.tsx +1 -1
  308. package/src/ImageCoordinator.tsx +3 -3
  309. package/src/Link.tsx +1 -1
  310. package/src/ListBox.tsx +3 -2
  311. package/src/Menu.tsx +5 -5
  312. package/src/NotificationBadge.tsx +172 -0
  313. package/src/Picker.tsx +2 -2
  314. package/src/Provider.tsx +1 -1
  315. package/src/RangeCalendar.tsx +2 -1
  316. package/src/Skeleton.tsx +4 -4
  317. package/src/Slider.tsx +1 -1
  318. package/src/StatusLight.tsx +2 -2
  319. package/src/Tabs.tsx +4 -3
  320. package/src/TabsPicker.tsx +1 -1
  321. package/src/TimeField.tsx +1 -1
  322. package/src/Toast.module.css +153 -0
  323. package/src/Toast.tsx +579 -0
  324. package/src/ToggleButton.tsx +1 -1
  325. package/src/Toolbar.tsx +2 -1
  326. package/src/Tooltip.tsx +2 -2
  327. package/src/TreeView.tsx +2 -2
  328. package/src/index.ts +6 -1
  329. package/src/page.macro.ts +3 -3
  330. package/src/pressScale.ts +1 -1
  331. package/src/style-utils.ts +2 -2
  332. package/style/dist/main.cjs +18 -18
  333. package/style/dist/module.mjs +9 -9
  334. package/style/dist/spectrum-theme.cjs +191 -191
  335. package/style/dist/spectrum-theme.cjs.map +1 -1
  336. package/style/dist/spectrum-theme.mjs +183 -183
  337. package/style/dist/spectrum-theme.mjs.map +1 -1
  338. package/style/dist/style-macro.cjs +74 -74
  339. package/style/dist/style-macro.cjs.map +1 -1
  340. package/style/dist/style-macro.mjs +68 -68
  341. package/style/dist/style-macro.mjs.map +1 -1
  342. package/style/dist/types.d.ts +4 -4
  343. package/style/dist/types.d.ts.map +1 -1
  344. package/style/spectrum-theme.ts +5 -5
  345. package/style/style-macro.ts +3 -3
  346. package/style/tokens.ts +22 -6
@@ -0,0 +1,70 @@
1
+
2
+ function $parcel$export(e, n, v, s) {
3
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
+ }
5
+
6
+ $parcel$export(module.exports, "background-toast", () => $aa16d99d2c9699f6$export$edbbb856c11a0d96, (v) => $aa16d99d2c9699f6$export$edbbb856c11a0d96 = v);
7
+ $parcel$export(module.exports, "bottom", () => $aa16d99d2c9699f6$export$40e543e69a8b3fbb, (v) => $aa16d99d2c9699f6$export$40e543e69a8b3fbb = v);
8
+ $parcel$export(module.exports, "end", () => $aa16d99d2c9699f6$export$bd5df0f255a350f8, (v) => $aa16d99d2c9699f6$export$bd5df0f255a350f8 = v);
9
+ $parcel$export(module.exports, "slide-in", () => $aa16d99d2c9699f6$export$1c220dee9e4dbe34, (v) => $aa16d99d2c9699f6$export$1c220dee9e4dbe34 = v);
10
+ $parcel$export(module.exports, "slide-out", () => $aa16d99d2c9699f6$export$ec7246eb5d3e2aa3, (v) => $aa16d99d2c9699f6$export$ec7246eb5d3e2aa3 = v);
11
+ $parcel$export(module.exports, "start", () => $aa16d99d2c9699f6$export$b3571188c770cc5a, (v) => $aa16d99d2c9699f6$export$b3571188c770cc5a = v);
12
+ $parcel$export(module.exports, "toast", () => $aa16d99d2c9699f6$export$b410431fab84fa58, (v) => $aa16d99d2c9699f6$export$b410431fab84fa58 = v);
13
+ $parcel$export(module.exports, "toast-action", () => $aa16d99d2c9699f6$export$3d00e48b8962d9f0, (v) => $aa16d99d2c9699f6$export$3d00e48b8962d9f0 = v);
14
+ $parcel$export(module.exports, "toast-add", () => $aa16d99d2c9699f6$export$b684c8de946176be, (v) => $aa16d99d2c9699f6$export$b684c8de946176be = v);
15
+ $parcel$export(module.exports, "toast-background", () => $aa16d99d2c9699f6$export$9a03a30b325163ea, (v) => $aa16d99d2c9699f6$export$9a03a30b325163ea = v);
16
+ $parcel$export(module.exports, "toast-clear", () => $aa16d99d2c9699f6$export$7cbc9cee106851da, (v) => $aa16d99d2c9699f6$export$7cbc9cee106851da = v);
17
+ $parcel$export(module.exports, "toast-close", () => $aa16d99d2c9699f6$export$cf9b85a5ed109c94, (v) => $aa16d99d2c9699f6$export$cf9b85a5ed109c94 = v);
18
+ $parcel$export(module.exports, "toast-collapse", () => $aa16d99d2c9699f6$export$eb15d68452870263, (v) => $aa16d99d2c9699f6$export$eb15d68452870263 = v);
19
+ $parcel$export(module.exports, "toast-content", () => $aa16d99d2c9699f6$export$83df85987eadac53, (v) => $aa16d99d2c9699f6$export$83df85987eadac53 = v);
20
+ $parcel$export(module.exports, "toast-controls", () => $aa16d99d2c9699f6$export$b5485e66c0963f26, (v) => $aa16d99d2c9699f6$export$b5485e66c0963f26 = v);
21
+ $parcel$export(module.exports, "toast-expand", () => $aa16d99d2c9699f6$export$b19c3e4c0d595545, (v) => $aa16d99d2c9699f6$export$b19c3e4c0d595545 = v);
22
+ $parcel$export(module.exports, "toast-list-collapsed", () => $aa16d99d2c9699f6$export$a87160c50f0b3a26, (v) => $aa16d99d2c9699f6$export$a87160c50f0b3a26 = v);
23
+ $parcel$export(module.exports, "toast-list-expanded", () => $aa16d99d2c9699f6$export$c2bf6e0c0f84b201, (v) => $aa16d99d2c9699f6$export$c2bf6e0c0f84b201 = v);
24
+ $parcel$export(module.exports, "toast-remove", () => $aa16d99d2c9699f6$export$e6c629548fb56b1d, (v) => $aa16d99d2c9699f6$export$e6c629548fb56b1d = v);
25
+ $parcel$export(module.exports, "top", () => $aa16d99d2c9699f6$export$1e95b668f3b82d, (v) => $aa16d99d2c9699f6$export$1e95b668f3b82d = v);
26
+ var $aa16d99d2c9699f6$export$edbbb856c11a0d96;
27
+ var $aa16d99d2c9699f6$export$40e543e69a8b3fbb;
28
+ var $aa16d99d2c9699f6$export$bd5df0f255a350f8;
29
+ var $aa16d99d2c9699f6$export$1c220dee9e4dbe34;
30
+ var $aa16d99d2c9699f6$export$ec7246eb5d3e2aa3;
31
+ var $aa16d99d2c9699f6$export$b3571188c770cc5a;
32
+ var $aa16d99d2c9699f6$export$b410431fab84fa58;
33
+ var $aa16d99d2c9699f6$export$3d00e48b8962d9f0;
34
+ var $aa16d99d2c9699f6$export$b684c8de946176be;
35
+ var $aa16d99d2c9699f6$export$9a03a30b325163ea;
36
+ var $aa16d99d2c9699f6$export$7cbc9cee106851da;
37
+ var $aa16d99d2c9699f6$export$cf9b85a5ed109c94;
38
+ var $aa16d99d2c9699f6$export$eb15d68452870263;
39
+ var $aa16d99d2c9699f6$export$83df85987eadac53;
40
+ var $aa16d99d2c9699f6$export$b5485e66c0963f26;
41
+ var $aa16d99d2c9699f6$export$b19c3e4c0d595545;
42
+ var $aa16d99d2c9699f6$export$a87160c50f0b3a26;
43
+ var $aa16d99d2c9699f6$export$c2bf6e0c0f84b201;
44
+ var $aa16d99d2c9699f6$export$e6c629548fb56b1d;
45
+ var $aa16d99d2c9699f6$export$1e95b668f3b82d;
46
+ $aa16d99d2c9699f6$export$edbbb856c11a0d96 = `wo0zeG_background-toast`;
47
+ $aa16d99d2c9699f6$export$40e543e69a8b3fbb = `wo0zeG_bottom`;
48
+ $aa16d99d2c9699f6$export$bd5df0f255a350f8 = `wo0zeG_end`;
49
+ $aa16d99d2c9699f6$export$1c220dee9e4dbe34 = `wo0zeG_slide-in`;
50
+ $aa16d99d2c9699f6$export$1c220dee9e4dbe34;
51
+ $aa16d99d2c9699f6$export$ec7246eb5d3e2aa3 = `wo0zeG_slide-out`;
52
+ $aa16d99d2c9699f6$export$ec7246eb5d3e2aa3;
53
+ $aa16d99d2c9699f6$export$b3571188c770cc5a = `wo0zeG_start`;
54
+ $aa16d99d2c9699f6$export$b410431fab84fa58 = `wo0zeG_toast`;
55
+ $aa16d99d2c9699f6$export$3d00e48b8962d9f0 = `wo0zeG_toast-action`;
56
+ $aa16d99d2c9699f6$export$b684c8de946176be = `wo0zeG_toast-add`;
57
+ $aa16d99d2c9699f6$export$9a03a30b325163ea = `wo0zeG_toast-background`;
58
+ $aa16d99d2c9699f6$export$7cbc9cee106851da = `wo0zeG_toast-clear`;
59
+ $aa16d99d2c9699f6$export$cf9b85a5ed109c94 = `wo0zeG_toast-close`;
60
+ $aa16d99d2c9699f6$export$eb15d68452870263 = `wo0zeG_toast-collapse`;
61
+ $aa16d99d2c9699f6$export$83df85987eadac53 = `wo0zeG_toast-content`;
62
+ $aa16d99d2c9699f6$export$b5485e66c0963f26 = `wo0zeG_toast-controls`;
63
+ $aa16d99d2c9699f6$export$b19c3e4c0d595545 = `wo0zeG_toast-expand`;
64
+ $aa16d99d2c9699f6$export$a87160c50f0b3a26 = `wo0zeG_toast-list-collapsed`;
65
+ $aa16d99d2c9699f6$export$c2bf6e0c0f84b201 = `wo0zeG_toast-list-expanded`;
66
+ $aa16d99d2c9699f6$export$e6c629548fb56b1d = `wo0zeG_toast-remove`;
67
+ $aa16d99d2c9699f6$export$1e95b668f3b82d = `wo0zeG_top`;
68
+
69
+
70
+ //# sourceMappingURL=Toast_module.cjs.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAEA,IAAA;AAEA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AArBA,4CAAqC,CAAC,uBAAuB,CAAC;AAC9D,4CAA2B,CAAC,aAAa,CAAC;AAC1C,4CAAwB,CAAC,UAAU,CAAC;AACpC,4CAA6B,CAAC,eAAe,CAAC;AAC9C;AACA,4CAA8B,CAAC,gBAAgB,CAAC;AAChD;AACA,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,4CAA8B,CAAC,gBAAgB,CAAC;AAChD,4CAAqC,CAAC,uBAAuB,CAAC;AAC9D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAkC,CAAC,oBAAoB,CAAC;AACxD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAAwC,CAAC,0BAA0B,CAAC;AACpE,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,0CAAwB,CAAC,UAAU,CAAC","sources":["packages/@react-spectrum/s2/src/Toast.module.css"],"sourcesContent":["/* Safari doesn't support :active-view-transition-type() yet, so we fall back to a class on the html element */\nhtml.toast-add,\nhtml.toast-remove,\nhtml.toast-expand,\nhtml.toast-collapse,\nhtml.toast-clear,\nhtml:active-view-transition-type(toast-add, toast-remove, toast-expand, toast-collapse, toast-clear) {\n view-transition-name: none;\n\n .toast-controls {\n view-transition-name: toast-controls;\n }\n\n .toast-background {\n view-transition-name: toast-background;\n }\n\n &::view-transition-group(toast-background) {\n z-index: -1;\n }\n\n &::view-transition-group(*) {\n animation-duration: 400ms;\n }\n}\n\nhtml.toast-add,\nhtml.toast-remove,\nhtml:active-view-transition-type(toast-add, toast-remove) {\n /* The new toast should slide in and out. With reduce motion enabled, it fades by default. */\n @media (prefers-reduced-motion: no-preference) {\n &::view-transition-new(.toast):only-child {\n animation-name: slide-in;\n }\n\n &::view-transition-old(.toast):only-child {\n animation-name: slide-out;\n }\n }\n\n &::view-transition-group(.toast.bottom) {\n --slideX: 0;\n --slideY: calc(100% + 12px);\n }\n \n &::view-transition-group(.toast.top) {\n --slideX: 0;\n --slideY: calc(-100% - 12px);\n }\n \n &::view-transition-group(.toast.start) {\n --slideX: calc(-100% - 12px);\n --slideY: 0;\n }\n \n &::view-transition-group(.toast.end) {\n --slideX: calc(100% + 12px);\n --slideY: 0;\n } \n}\n\n/* Make the \"Show all\" button animate slightly faster/slower than other components when expanding/collapsing.\n * This prevents it from appearing to overlap the text when it fades out and the text repositions. */\nhtml.toast-expand,\nhtml:active-view-transition-type(toast-expand) {\n &::view-transition-group(toast-expand) {\n animation-duration: 300ms;\n }\n}\n\nhtml.toast-collapse,\nhtml:active-view-transition-type(toast-collapse) {\n &::view-transition-group(toast-expand) {\n animation-duration: 600ms;\n }\n}\n\nhtml.toast-expand,\nhtml.toast-collapse,\nhtml:active-view-transition-type(toast-expand, toast-collapse) {\n @media (prefers-reduced-motion: no-preference) {\n /* When expanding/collapsing, animate the components of the main toast individually. */\n .toast-content {\n view-transition-name: toast-content;\n }\n\n .toast-expand {\n view-transition-name: toast-expand;\n }\n\n .toast-action {\n view-transition-name: toast-action;\n }\n\n .toast-close {\n view-transition-name: toast-close;\n }\n\n /* Force toast controls to be visible during the animation */\n .toast-controls {\n display: flex;\n }\n\n /* Smoothly transition the size of toasts. */\n &::view-transition-old(.toast),\n &::view-transition-new(.toast) {\n /* Make the old and new images fill the size of the parent group. */\n height: 100%;\n width: 100%;\n }\n\n /* Background toasts don't have their components split apart in separate view transitions.\n * This means we need to do some tricks to get the aspect ratio to transition smoothly.\n * Clipping messes up the shadows a bit, but it's less noticeable on the background toasts. */\n &::view-transition-old(.background-toast),\n &::view-transition-new(.background-toast) {\n /* Cover all of the available space without stretching the aspect ratio */\n object-fit: cover;\n object-position: top center;\n /* Clip to retain rounded corners */\n clip-path: inset(0px round 10px);\n }\n }\n\n @media (prefers-reduced-motion) {\n /* Do not animate individual toasts in reduced motion. The whole list cross-fades instead. */\n .toast {\n view-transition-name: none !important;\n }\n\n .toast-list-expanded {\n view-transition-name: toast-list-expanded;\n }\n\n .toast-list-collapsed {\n view-transition-name: toast-list-collapsed;\n }\n }\n}\n\n@keyframes slide-in {\n from {\n translate: var(--slideX) var(--slideY);\n opacity: 0;\n }\n}\n\n@keyframes slide-out {\n to {\n translate: var(--slideX) var(--slideY);\n opacity: 0;\n }\n}\n"],"names":[],"version":3,"file":"Toast_module.cjs.map"}
@@ -0,0 +1,119 @@
1
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html.wo0zeG_toast-clear, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove, wo0zeG_toast-expand, wo0zeG_toast-collapse, wo0zeG_toast-clear)) {
2
+ view-transition-name: none;
3
+ }
4
+
5
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html.wo0zeG_toast-clear, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove, wo0zeG_toast-expand, wo0zeG_toast-collapse, wo0zeG_toast-clear)) .wo0zeG_toast-controls {
6
+ view-transition-name: wo0zeG_toast-controls;
7
+ }
8
+
9
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html.wo0zeG_toast-clear, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove, wo0zeG_toast-expand, wo0zeG_toast-collapse, wo0zeG_toast-clear)) .wo0zeG_toast-background {
10
+ view-transition-name: wo0zeG_toast-background;
11
+ }
12
+
13
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html.wo0zeG_toast-clear, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove, wo0zeG_toast-expand, wo0zeG_toast-collapse, wo0zeG_toast-clear))::view-transition-group(wo0zeG_toast-background) {
14
+ z-index: -1;
15
+ }
16
+
17
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html.wo0zeG_toast-clear, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove, wo0zeG_toast-expand, wo0zeG_toast-collapse, wo0zeG_toast-clear))::view-transition-group(*) {
18
+ animation-duration: .4s;
19
+ }
20
+
21
+ @media (prefers-reduced-motion: no-preference) {
22
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove))::view-transition-new(.wo0zeG_toast):only-child {
23
+ animation-name: wo0zeG_slide-in;
24
+ }
25
+
26
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove))::view-transition-old(.wo0zeG_toast):only-child {
27
+ animation-name: wo0zeG_slide-out;
28
+ }
29
+ }
30
+
31
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove))::view-transition-group(.wo0zeG_toast.wo0zeG_bottom) {
32
+ --slideX: 0;
33
+ --slideY: calc(100% + 12px);
34
+ }
35
+
36
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove))::view-transition-group(.wo0zeG_toast.wo0zeG_top) {
37
+ --slideX: 0;
38
+ --slideY: calc(-100% - 12px);
39
+ }
40
+
41
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove))::view-transition-group(.wo0zeG_toast.wo0zeG_start) {
42
+ --slideX: calc(-100% - 12px);
43
+ --slideY: 0;
44
+ }
45
+
46
+ :is(html.wo0zeG_toast-add, html.wo0zeG_toast-remove, html:active-view-transition-type(wo0zeG_toast-add, wo0zeG_toast-remove))::view-transition-group(.wo0zeG_toast.wo0zeG_end) {
47
+ --slideX: calc(100% + 12px);
48
+ --slideY: 0;
49
+ }
50
+
51
+ :is(html.wo0zeG_toast-expand, html:active-view-transition-type(wo0zeG_toast-expand))::view-transition-group(wo0zeG_toast-expand) {
52
+ animation-duration: .3s;
53
+ }
54
+
55
+ :is(html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-collapse))::view-transition-group(wo0zeG_toast-expand) {
56
+ animation-duration: .6s;
57
+ }
58
+
59
+ @media (prefers-reduced-motion: no-preference) {
60
+ :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse)) .wo0zeG_toast-content {
61
+ view-transition-name: wo0zeG_toast-content;
62
+ }
63
+
64
+ :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse)) .wo0zeG_toast-expand {
65
+ view-transition-name: wo0zeG_toast-expand;
66
+ }
67
+
68
+ :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse)) .wo0zeG_toast-action {
69
+ view-transition-name: wo0zeG_toast-action;
70
+ }
71
+
72
+ :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse)) .wo0zeG_toast-close {
73
+ view-transition-name: wo0zeG_toast-close;
74
+ }
75
+
76
+ :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse)) .wo0zeG_toast-controls {
77
+ display: flex;
78
+ }
79
+
80
+ :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse))::view-transition-old(.wo0zeG_toast), :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse))::view-transition-new(.wo0zeG_toast) {
81
+ width: 100%;
82
+ height: 100%;
83
+ }
84
+
85
+ :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse))::view-transition-old(.wo0zeG_background-toast), :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse))::view-transition-new(.wo0zeG_background-toast) {
86
+ object-fit: cover;
87
+ object-position: top center;
88
+ clip-path: inset(0 round 10px);
89
+ }
90
+ }
91
+
92
+ @media (prefers-reduced-motion) {
93
+ :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse)) .wo0zeG_toast {
94
+ view-transition-name: none !important;
95
+ }
96
+
97
+ :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse)) .wo0zeG_toast-list-expanded {
98
+ view-transition-name: wo0zeG_toast-list-expanded;
99
+ }
100
+
101
+ :is(html.wo0zeG_toast-expand, html.wo0zeG_toast-collapse, html:active-view-transition-type(wo0zeG_toast-expand, wo0zeG_toast-collapse)) .wo0zeG_toast-list-collapsed {
102
+ view-transition-name: wo0zeG_toast-list-collapsed;
103
+ }
104
+ }
105
+
106
+ @keyframes wo0zeG_slide-in {
107
+ from {
108
+ translate: var(--slideX) var(--slideY);
109
+ opacity: 0;
110
+ }
111
+ }
112
+
113
+ @keyframes wo0zeG_slide-out {
114
+ to {
115
+ translate: var(--slideX) var(--slideY);
116
+ opacity: 0;
117
+ }
118
+ }
119
+ /*# sourceMappingURL=Toast_module.css.map */
@@ -0,0 +1 @@
1
+ {"mappings":"AACA;;;;AAQE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AASA;EACE;;;;EAIA;;;;;AAKF;;;;;AAKA;;;;;AAKA;;;;;AAKA;;;;;AAUA;;;;AAOA;;;;AAQA;EAEE;;;;EAIA;;;;EAIA;;;;EAIA;;;;EAKA;;;;EAKA;;;;;EAUA;;;;;;;AAUF;EAEE;;;;EAIA;;;;EAIA;;;;;AAMJ;;;;;;;AAOA","sources":["packages/@react-spectrum/s2/src/Toast.module.css"],"sourcesContent":["/* Safari doesn't support :active-view-transition-type() yet, so we fall back to a class on the html element */\nhtml.toast-add,\nhtml.toast-remove,\nhtml.toast-expand,\nhtml.toast-collapse,\nhtml.toast-clear,\nhtml:active-view-transition-type(toast-add, toast-remove, toast-expand, toast-collapse, toast-clear) {\n view-transition-name: none;\n\n .toast-controls {\n view-transition-name: toast-controls;\n }\n\n .toast-background {\n view-transition-name: toast-background;\n }\n\n &::view-transition-group(toast-background) {\n z-index: -1;\n }\n\n &::view-transition-group(*) {\n animation-duration: 400ms;\n }\n}\n\nhtml.toast-add,\nhtml.toast-remove,\nhtml:active-view-transition-type(toast-add, toast-remove) {\n /* The new toast should slide in and out. With reduce motion enabled, it fades by default. */\n @media (prefers-reduced-motion: no-preference) {\n &::view-transition-new(.toast):only-child {\n animation-name: slide-in;\n }\n\n &::view-transition-old(.toast):only-child {\n animation-name: slide-out;\n }\n }\n\n &::view-transition-group(.toast.bottom) {\n --slideX: 0;\n --slideY: calc(100% + 12px);\n }\n \n &::view-transition-group(.toast.top) {\n --slideX: 0;\n --slideY: calc(-100% - 12px);\n }\n \n &::view-transition-group(.toast.start) {\n --slideX: calc(-100% - 12px);\n --slideY: 0;\n }\n \n &::view-transition-group(.toast.end) {\n --slideX: calc(100% + 12px);\n --slideY: 0;\n } \n}\n\n/* Make the \"Show all\" button animate slightly faster/slower than other components when expanding/collapsing.\n * This prevents it from appearing to overlap the text when it fades out and the text repositions. */\nhtml.toast-expand,\nhtml:active-view-transition-type(toast-expand) {\n &::view-transition-group(toast-expand) {\n animation-duration: 300ms;\n }\n}\n\nhtml.toast-collapse,\nhtml:active-view-transition-type(toast-collapse) {\n &::view-transition-group(toast-expand) {\n animation-duration: 600ms;\n }\n}\n\nhtml.toast-expand,\nhtml.toast-collapse,\nhtml:active-view-transition-type(toast-expand, toast-collapse) {\n @media (prefers-reduced-motion: no-preference) {\n /* When expanding/collapsing, animate the components of the main toast individually. */\n .toast-content {\n view-transition-name: toast-content;\n }\n\n .toast-expand {\n view-transition-name: toast-expand;\n }\n\n .toast-action {\n view-transition-name: toast-action;\n }\n\n .toast-close {\n view-transition-name: toast-close;\n }\n\n /* Force toast controls to be visible during the animation */\n .toast-controls {\n display: flex;\n }\n\n /* Smoothly transition the size of toasts. */\n &::view-transition-old(.toast),\n &::view-transition-new(.toast) {\n /* Make the old and new images fill the size of the parent group. */\n height: 100%;\n width: 100%;\n }\n\n /* Background toasts don't have their components split apart in separate view transitions.\n * This means we need to do some tricks to get the aspect ratio to transition smoothly.\n * Clipping messes up the shadows a bit, but it's less noticeable on the background toasts. */\n &::view-transition-old(.background-toast),\n &::view-transition-new(.background-toast) {\n /* Cover all of the available space without stretching the aspect ratio */\n object-fit: cover;\n object-position: top center;\n /* Clip to retain rounded corners */\n clip-path: inset(0px round 10px);\n }\n }\n\n @media (prefers-reduced-motion) {\n /* Do not animate individual toasts in reduced motion. The whole list cross-fades instead. */\n .toast {\n view-transition-name: none !important;\n }\n\n .toast-list-expanded {\n view-transition-name: toast-list-expanded;\n }\n\n .toast-list-collapsed {\n view-transition-name: toast-list-collapsed;\n }\n }\n}\n\n@keyframes slide-in {\n from {\n translate: var(--slideX) var(--slideY);\n opacity: 0;\n }\n}\n\n@keyframes slide-out {\n to {\n translate: var(--slideX) var(--slideY);\n opacity: 0;\n }\n}\n"],"names":[],"version":3,"file":"Toast_module.css.map"}
@@ -0,0 +1,72 @@
1
+
2
+ function $parcel$export(e, n, v, s) {
3
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
+ }
5
+ var $9cff1fc922af8248$exports = {};
6
+
7
+ $parcel$export($9cff1fc922af8248$exports, "background-toast", () => $9cff1fc922af8248$export$edbbb856c11a0d96, (v) => $9cff1fc922af8248$export$edbbb856c11a0d96 = v);
8
+ $parcel$export($9cff1fc922af8248$exports, "bottom", () => $9cff1fc922af8248$export$40e543e69a8b3fbb, (v) => $9cff1fc922af8248$export$40e543e69a8b3fbb = v);
9
+ $parcel$export($9cff1fc922af8248$exports, "end", () => $9cff1fc922af8248$export$bd5df0f255a350f8, (v) => $9cff1fc922af8248$export$bd5df0f255a350f8 = v);
10
+ $parcel$export($9cff1fc922af8248$exports, "slide-in", () => $9cff1fc922af8248$export$1c220dee9e4dbe34, (v) => $9cff1fc922af8248$export$1c220dee9e4dbe34 = v);
11
+ $parcel$export($9cff1fc922af8248$exports, "slide-out", () => $9cff1fc922af8248$export$ec7246eb5d3e2aa3, (v) => $9cff1fc922af8248$export$ec7246eb5d3e2aa3 = v);
12
+ $parcel$export($9cff1fc922af8248$exports, "start", () => $9cff1fc922af8248$export$b3571188c770cc5a, (v) => $9cff1fc922af8248$export$b3571188c770cc5a = v);
13
+ $parcel$export($9cff1fc922af8248$exports, "toast", () => $9cff1fc922af8248$export$b410431fab84fa58, (v) => $9cff1fc922af8248$export$b410431fab84fa58 = v);
14
+ $parcel$export($9cff1fc922af8248$exports, "toast-action", () => $9cff1fc922af8248$export$3d00e48b8962d9f0, (v) => $9cff1fc922af8248$export$3d00e48b8962d9f0 = v);
15
+ $parcel$export($9cff1fc922af8248$exports, "toast-add", () => $9cff1fc922af8248$export$b684c8de946176be, (v) => $9cff1fc922af8248$export$b684c8de946176be = v);
16
+ $parcel$export($9cff1fc922af8248$exports, "toast-background", () => $9cff1fc922af8248$export$9a03a30b325163ea, (v) => $9cff1fc922af8248$export$9a03a30b325163ea = v);
17
+ $parcel$export($9cff1fc922af8248$exports, "toast-clear", () => $9cff1fc922af8248$export$7cbc9cee106851da, (v) => $9cff1fc922af8248$export$7cbc9cee106851da = v);
18
+ $parcel$export($9cff1fc922af8248$exports, "toast-close", () => $9cff1fc922af8248$export$cf9b85a5ed109c94, (v) => $9cff1fc922af8248$export$cf9b85a5ed109c94 = v);
19
+ $parcel$export($9cff1fc922af8248$exports, "toast-collapse", () => $9cff1fc922af8248$export$eb15d68452870263, (v) => $9cff1fc922af8248$export$eb15d68452870263 = v);
20
+ $parcel$export($9cff1fc922af8248$exports, "toast-content", () => $9cff1fc922af8248$export$83df85987eadac53, (v) => $9cff1fc922af8248$export$83df85987eadac53 = v);
21
+ $parcel$export($9cff1fc922af8248$exports, "toast-controls", () => $9cff1fc922af8248$export$b5485e66c0963f26, (v) => $9cff1fc922af8248$export$b5485e66c0963f26 = v);
22
+ $parcel$export($9cff1fc922af8248$exports, "toast-expand", () => $9cff1fc922af8248$export$b19c3e4c0d595545, (v) => $9cff1fc922af8248$export$b19c3e4c0d595545 = v);
23
+ $parcel$export($9cff1fc922af8248$exports, "toast-list-collapsed", () => $9cff1fc922af8248$export$a87160c50f0b3a26, (v) => $9cff1fc922af8248$export$a87160c50f0b3a26 = v);
24
+ $parcel$export($9cff1fc922af8248$exports, "toast-list-expanded", () => $9cff1fc922af8248$export$c2bf6e0c0f84b201, (v) => $9cff1fc922af8248$export$c2bf6e0c0f84b201 = v);
25
+ $parcel$export($9cff1fc922af8248$exports, "toast-remove", () => $9cff1fc922af8248$export$e6c629548fb56b1d, (v) => $9cff1fc922af8248$export$e6c629548fb56b1d = v);
26
+ $parcel$export($9cff1fc922af8248$exports, "top", () => $9cff1fc922af8248$export$1e95b668f3b82d, (v) => $9cff1fc922af8248$export$1e95b668f3b82d = v);
27
+ var $9cff1fc922af8248$export$edbbb856c11a0d96;
28
+ var $9cff1fc922af8248$export$40e543e69a8b3fbb;
29
+ var $9cff1fc922af8248$export$bd5df0f255a350f8;
30
+ var $9cff1fc922af8248$export$1c220dee9e4dbe34;
31
+ var $9cff1fc922af8248$export$ec7246eb5d3e2aa3;
32
+ var $9cff1fc922af8248$export$b3571188c770cc5a;
33
+ var $9cff1fc922af8248$export$b410431fab84fa58;
34
+ var $9cff1fc922af8248$export$3d00e48b8962d9f0;
35
+ var $9cff1fc922af8248$export$b684c8de946176be;
36
+ var $9cff1fc922af8248$export$9a03a30b325163ea;
37
+ var $9cff1fc922af8248$export$7cbc9cee106851da;
38
+ var $9cff1fc922af8248$export$cf9b85a5ed109c94;
39
+ var $9cff1fc922af8248$export$eb15d68452870263;
40
+ var $9cff1fc922af8248$export$83df85987eadac53;
41
+ var $9cff1fc922af8248$export$b5485e66c0963f26;
42
+ var $9cff1fc922af8248$export$b19c3e4c0d595545;
43
+ var $9cff1fc922af8248$export$a87160c50f0b3a26;
44
+ var $9cff1fc922af8248$export$c2bf6e0c0f84b201;
45
+ var $9cff1fc922af8248$export$e6c629548fb56b1d;
46
+ var $9cff1fc922af8248$export$1e95b668f3b82d;
47
+ $9cff1fc922af8248$export$edbbb856c11a0d96 = `wo0zeG_background-toast`;
48
+ $9cff1fc922af8248$export$40e543e69a8b3fbb = `wo0zeG_bottom`;
49
+ $9cff1fc922af8248$export$bd5df0f255a350f8 = `wo0zeG_end`;
50
+ $9cff1fc922af8248$export$1c220dee9e4dbe34 = `wo0zeG_slide-in`;
51
+ $9cff1fc922af8248$export$1c220dee9e4dbe34;
52
+ $9cff1fc922af8248$export$ec7246eb5d3e2aa3 = `wo0zeG_slide-out`;
53
+ $9cff1fc922af8248$export$ec7246eb5d3e2aa3;
54
+ $9cff1fc922af8248$export$b3571188c770cc5a = `wo0zeG_start`;
55
+ $9cff1fc922af8248$export$b410431fab84fa58 = `wo0zeG_toast`;
56
+ $9cff1fc922af8248$export$3d00e48b8962d9f0 = `wo0zeG_toast-action`;
57
+ $9cff1fc922af8248$export$b684c8de946176be = `wo0zeG_toast-add`;
58
+ $9cff1fc922af8248$export$9a03a30b325163ea = `wo0zeG_toast-background`;
59
+ $9cff1fc922af8248$export$7cbc9cee106851da = `wo0zeG_toast-clear`;
60
+ $9cff1fc922af8248$export$cf9b85a5ed109c94 = `wo0zeG_toast-close`;
61
+ $9cff1fc922af8248$export$eb15d68452870263 = `wo0zeG_toast-collapse`;
62
+ $9cff1fc922af8248$export$83df85987eadac53 = `wo0zeG_toast-content`;
63
+ $9cff1fc922af8248$export$b5485e66c0963f26 = `wo0zeG_toast-controls`;
64
+ $9cff1fc922af8248$export$b19c3e4c0d595545 = `wo0zeG_toast-expand`;
65
+ $9cff1fc922af8248$export$a87160c50f0b3a26 = `wo0zeG_toast-list-collapsed`;
66
+ $9cff1fc922af8248$export$c2bf6e0c0f84b201 = `wo0zeG_toast-list-expanded`;
67
+ $9cff1fc922af8248$export$e6c629548fb56b1d = `wo0zeG_toast-remove`;
68
+ $9cff1fc922af8248$export$1e95b668f3b82d = `wo0zeG_top`;
69
+
70
+
71
+ export {$9cff1fc922af8248$exports as default};
72
+ //# sourceMappingURL=Toast_module.mjs.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAEA,IAAA;AAEA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AArBA,4CAAqC,CAAC,uBAAuB,CAAC;AAC9D,4CAA2B,CAAC,aAAa,CAAC;AAC1C,4CAAwB,CAAC,UAAU,CAAC;AACpC,4CAA6B,CAAC,eAAe,CAAC;AAC9C;AACA,4CAA8B,CAAC,gBAAgB,CAAC;AAChD;AACA,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,4CAA8B,CAAC,gBAAgB,CAAC;AAChD,4CAAqC,CAAC,uBAAuB,CAAC;AAC9D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAkC,CAAC,oBAAoB,CAAC;AACxD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAAwC,CAAC,0BAA0B,CAAC;AACpE,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,0CAAwB,CAAC,UAAU,CAAC","sources":["packages/@react-spectrum/s2/src/Toast.module.css"],"sourcesContent":["/* Safari doesn't support :active-view-transition-type() yet, so we fall back to a class on the html element */\nhtml.toast-add,\nhtml.toast-remove,\nhtml.toast-expand,\nhtml.toast-collapse,\nhtml.toast-clear,\nhtml:active-view-transition-type(toast-add, toast-remove, toast-expand, toast-collapse, toast-clear) {\n view-transition-name: none;\n\n .toast-controls {\n view-transition-name: toast-controls;\n }\n\n .toast-background {\n view-transition-name: toast-background;\n }\n\n &::view-transition-group(toast-background) {\n z-index: -1;\n }\n\n &::view-transition-group(*) {\n animation-duration: 400ms;\n }\n}\n\nhtml.toast-add,\nhtml.toast-remove,\nhtml:active-view-transition-type(toast-add, toast-remove) {\n /* The new toast should slide in and out. With reduce motion enabled, it fades by default. */\n @media (prefers-reduced-motion: no-preference) {\n &::view-transition-new(.toast):only-child {\n animation-name: slide-in;\n }\n\n &::view-transition-old(.toast):only-child {\n animation-name: slide-out;\n }\n }\n\n &::view-transition-group(.toast.bottom) {\n --slideX: 0;\n --slideY: calc(100% + 12px);\n }\n \n &::view-transition-group(.toast.top) {\n --slideX: 0;\n --slideY: calc(-100% - 12px);\n }\n \n &::view-transition-group(.toast.start) {\n --slideX: calc(-100% - 12px);\n --slideY: 0;\n }\n \n &::view-transition-group(.toast.end) {\n --slideX: calc(100% + 12px);\n --slideY: 0;\n } \n}\n\n/* Make the \"Show all\" button animate slightly faster/slower than other components when expanding/collapsing.\n * This prevents it from appearing to overlap the text when it fades out and the text repositions. */\nhtml.toast-expand,\nhtml:active-view-transition-type(toast-expand) {\n &::view-transition-group(toast-expand) {\n animation-duration: 300ms;\n }\n}\n\nhtml.toast-collapse,\nhtml:active-view-transition-type(toast-collapse) {\n &::view-transition-group(toast-expand) {\n animation-duration: 600ms;\n }\n}\n\nhtml.toast-expand,\nhtml.toast-collapse,\nhtml:active-view-transition-type(toast-expand, toast-collapse) {\n @media (prefers-reduced-motion: no-preference) {\n /* When expanding/collapsing, animate the components of the main toast individually. */\n .toast-content {\n view-transition-name: toast-content;\n }\n\n .toast-expand {\n view-transition-name: toast-expand;\n }\n\n .toast-action {\n view-transition-name: toast-action;\n }\n\n .toast-close {\n view-transition-name: toast-close;\n }\n\n /* Force toast controls to be visible during the animation */\n .toast-controls {\n display: flex;\n }\n\n /* Smoothly transition the size of toasts. */\n &::view-transition-old(.toast),\n &::view-transition-new(.toast) {\n /* Make the old and new images fill the size of the parent group. */\n height: 100%;\n width: 100%;\n }\n\n /* Background toasts don't have their components split apart in separate view transitions.\n * This means we need to do some tricks to get the aspect ratio to transition smoothly.\n * Clipping messes up the shadows a bit, but it's less noticeable on the background toasts. */\n &::view-transition-old(.background-toast),\n &::view-transition-new(.background-toast) {\n /* Cover all of the available space without stretching the aspect ratio */\n object-fit: cover;\n object-position: top center;\n /* Clip to retain rounded corners */\n clip-path: inset(0px round 10px);\n }\n }\n\n @media (prefers-reduced-motion) {\n /* Do not animate individual toasts in reduced motion. The whole list cross-fades instead. */\n .toast {\n view-transition-name: none !important;\n }\n\n .toast-list-expanded {\n view-transition-name: toast-list-expanded;\n }\n\n .toast-list-collapsed {\n view-transition-name: toast-list-collapsed;\n }\n }\n}\n\n@keyframes slide-in {\n from {\n translate: var(--slideX) var(--slideY);\n opacity: 0;\n }\n}\n\n@keyframes slide-out {\n to {\n translate: var(--slideX) var(--slideY);\n opacity: 0;\n }\n}\n"],"names":[],"version":3,"file":"Toast_module.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;AAyBM,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAAkF;AAM1H,MAAM,0DAAe,CAAA,GAAA,uBAAS,EAAE,SAAS,aAAa,KAAwB,EAAE,GAAoC;IACzH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,IAAI,MAAM,CAAA,GAAA,4CAAgB,EAAE,CAAA,GAAA,kDAAuB;IACnD,IAAI,YAAY,CAAC,CAAC;IAClB,IAAI,WACF,UAAU,wBACV,WAAW,eACX,cAAc,2BACd,cAAc,MAAM,WAAW,WAC/B,UAAU,MAAM,OAAO,gBACvB,eAAe,MAAM,YAAY,QACjC,OAAO,MAAM,IAAI,IAAI,iBACrB,aAAa,MAAM,UAAU,EAC9B,GAAG,OAAO,CAAC;IAEZ,qBACE,gCAAC,CAAA,GAAA,uCAAc;QACZ,GAAG,KAAK;QACT,YAAY;QACZ,KAAK;QACL,OAAO,CAAA,GAAA,oCAAS,EAAE,QAAQ,MAAM,YAAY;QAC5C,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,CAAA,GAAA,mCAAQ,EAAE;gBACnE,GAAG,WAAW;6BACd;gBACA,eAAe,CAAC,CAAC;sBACjB;yBACA;8BACA;gBACA,WAAW;yBACX;6BACA;6BACA;2BACA;YACF,GAAG,MAAM,MAAM;kBACf,cAAA,gCAAC,CAAA,GAAA,mCAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,yCAAc;oBAAG;iBAAK;gBACvB;oBAAC,CAAA,GAAA,qCAAU;oBAAG;wBAAC,MAAM;oBAA+D;iBAAE;gBACtF;oBAAC,CAAA,GAAA,qCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,wCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gCAAC,CAAA,GAAA,8BAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F","sources":["packages/@react-spectrum/s2/src/ToggleButton.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 {ActionButtonStyleProps, btnStyles} from './ActionButton';\nimport {centerBaseline} from './CenterBaseline';\nimport {ContextValue, Provider, ToggleButton as RACToggleButton, ToggleButtonProps as RACToggleButtonProps, useSlottedContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {StyleProps} from './style-utils';\nimport {Text, TextContext} from './Content';\nimport {ToggleButtonGroupContext} from './ToggleButtonGroup';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the button. */\n children: ReactNode,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<Partial<ToggleButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nexport const ToggleButton = forwardRef(function ToggleButton(props: ToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ToggleButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let ctx = useSlottedContext(ToggleButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n isEmphasized = props.isEmphasized,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACToggleButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n isEmphasized,\n isPending: false,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACToggleButton>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;AAyBM,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAAkF;AAM1H,MAAM,0DAAe,CAAA,GAAA,uBAAS,EAAE,SAAS,aAAa,KAAwB,EAAE,GAAoC;IACzH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,IAAI,MAAM,CAAA,GAAA,4CAAgB,EAAE,CAAA,GAAA,kDAAuB;IACnD,IAAI,YAAY,CAAC,CAAC;IAClB,IAAI,WACF,UAAU,wBACV,WAAW,eACX,cAAc,2BACd,cAAc,MAAM,WAAW,WAC/B,UAAU,MAAM,OAAO,gBACvB,eAAe,MAAM,YAAY,QACjC,OAAO,MAAM,IAAI,IAAI,iBACrB,aAAa,MAAM,UAAU,EAC9B,GAAG,OAAO,CAAC;IAEZ,qBACE,gCAAC,CAAA,GAAA,uCAAc;QACZ,GAAG,KAAK;QACT,YAAY;QACZ,KAAK;QACL,OAAO,CAAA,GAAA,oCAAS,EAAE,QAAQ,MAAM,YAAY;QAC5C,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,CAAA,GAAA,mCAAQ,EAAE;gBACnE,GAAG,WAAW;6BACd;gBACA,eAAe,CAAC,CAAC;sBACjB;yBACA;8BACA;gBACA,WAAW;yBACX;6BACA;6BACA;2BACA;YACF,GAAG,MAAM,MAAM;kBACf,cAAA,gCAAC,CAAA,GAAA,mCAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,yCAAc;oBAAG;iBAAK;gBACvB;oBAAC,CAAA,GAAA,qCAAU;oBAAG;wBAAC,MAAM;oBAA+D;iBAAE;gBACtF;oBAAC,CAAA,GAAA,qCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,wCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gCAAC,CAAA,GAAA,8BAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F","sources":["packages/@react-spectrum/s2/src/ToggleButton.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 {ActionButtonStyleProps, btnStyles} from './ActionButton';\nimport {centerBaseline} from './CenterBaseline';\nimport {ContextValue, Provider, ToggleButton as RACToggleButton, ToggleButtonProps as RACToggleButtonProps, useSlottedContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {StyleProps} from './style-utils';\nimport {Text, TextContext} from './Content';\nimport {ToggleButtonGroupContext} from './ToggleButtonGroup';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the button. */\n children: ReactNode,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<Partial<ToggleButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nexport const ToggleButton = forwardRef(function ToggleButton(props: ToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ToggleButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let ctx = useSlottedContext(ToggleButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n isEmphasized = props.isEmphasized,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACToggleButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n isEmphasized,\n isPending: false,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACToggleButton>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":"ACgFiC;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAEyB;;;;EACtC;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAHa","sources":["bc1013d4d937a6f8","packages/@react-spectrum/s2/src/ToggleButton.tsx"],"sourcesContent":["@import \"2356498b79989caa\";\n@import \"00644bdfe594b970\";\n@import \"2645bae9c4681078\";\n","/*\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 {ActionButtonStyleProps, btnStyles} from './ActionButton';\nimport {centerBaseline} from './CenterBaseline';\nimport {ContextValue, Provider, ToggleButton as RACToggleButton, ToggleButtonProps as RACToggleButtonProps, useSlottedContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {StyleProps} from './style-utils';\nimport {Text, TextContext} from './Content';\nimport {ToggleButtonGroupContext} from './ToggleButtonGroup';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the button. */\n children: ReactNode,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<Partial<ToggleButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nexport const ToggleButton = forwardRef(function ToggleButton(props: ToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ToggleButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let ctx = useSlottedContext(ToggleButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n isEmphasized = props.isEmphasized,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACToggleButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n isEmphasized,\n isPending: false,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACToggleButton>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.css.map"}
1
+ {"mappings":"ACgFiC;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAEyB;;;;EACtC;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAHa","sources":["bc1013d4d937a6f8","packages/@react-spectrum/s2/src/ToggleButton.tsx"],"sourcesContent":["@import \"2356498b79989caa\";\n@import \"00644bdfe594b970\";\n@import \"2645bae9c4681078\";\n","/*\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 {ActionButtonStyleProps, btnStyles} from './ActionButton';\nimport {centerBaseline} from './CenterBaseline';\nimport {ContextValue, Provider, ToggleButton as RACToggleButton, ToggleButtonProps as RACToggleButtonProps, useSlottedContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {StyleProps} from './style-utils';\nimport {Text, TextContext} from './Content';\nimport {ToggleButtonGroupContext} from './ToggleButtonGroup';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the button. */\n children: ReactNode,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<Partial<ToggleButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nexport const ToggleButton = forwardRef(function ToggleButton(props: ToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ToggleButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let ctx = useSlottedContext(ToggleButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n isEmphasized = props.isEmphasized,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACToggleButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n isEmphasized,\n isPending: false,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACToggleButton>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.css.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;AAyBM,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAkF;AAM1H,MAAM,0DAAe,CAAA,GAAA,iBAAS,EAAE,SAAS,aAAa,KAAwB,EAAE,GAAoC;IACzH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,MAAM,CAAA,GAAA,wBAAgB,EAAE,CAAA,GAAA,yCAAuB;IACnD,IAAI,YAAY,CAAC,CAAC;IAClB,IAAI,WACF,UAAU,wBACV,WAAW,eACX,cAAc,2BACd,cAAc,MAAM,WAAW,WAC/B,UAAU,MAAM,OAAO,gBACvB,eAAe,MAAM,YAAY,QACjC,OAAO,MAAM,IAAI,IAAI,iBACrB,aAAa,MAAM,UAAU,EAC9B,GAAG,OAAO,CAAC;IAEZ,qBACE,gBAAC,CAAA,GAAA,mBAAc;QACZ,GAAG,KAAK;QACT,YAAY;QACZ,KAAK;QACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ,MAAM,YAAY;QAC5C,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,CAAA,GAAA,yCAAQ,EAAE;gBACnE,GAAG,WAAW;6BACd;gBACA,eAAe,CAAC,CAAC;sBACjB;yBACA;8BACA;gBACA,WAAW;yBACX;6BACA;6BACA;2BACA;YACF,GAAG,MAAM,MAAM;kBACf,cAAA,gBAAC,CAAA,GAAA,eAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,yCAAc;oBAAG;iBAAK;gBACvB;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBAAC,MAAM;oBAA+D;iBAAE;gBACtF;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,yCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gBAAC,CAAA,GAAA,yCAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F","sources":["packages/@react-spectrum/s2/src/ToggleButton.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 {ActionButtonStyleProps, btnStyles} from './ActionButton';\nimport {centerBaseline} from './CenterBaseline';\nimport {ContextValue, Provider, ToggleButton as RACToggleButton, ToggleButtonProps as RACToggleButtonProps, useSlottedContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {StyleProps} from './style-utils';\nimport {Text, TextContext} from './Content';\nimport {ToggleButtonGroupContext} from './ToggleButtonGroup';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the button. */\n children: ReactNode,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<Partial<ToggleButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nexport const ToggleButton = forwardRef(function ToggleButton(props: ToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ToggleButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let ctx = useSlottedContext(ToggleButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n isEmphasized = props.isEmphasized,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACToggleButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n isEmphasized,\n isPending: false,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACToggleButton>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;AAyBM,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAkF;AAM1H,MAAM,0DAAe,CAAA,GAAA,iBAAS,EAAE,SAAS,aAAa,KAAwB,EAAE,GAAoC;IACzH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,MAAM,CAAA,GAAA,wBAAgB,EAAE,CAAA,GAAA,yCAAuB;IACnD,IAAI,YAAY,CAAC,CAAC;IAClB,IAAI,WACF,UAAU,wBACV,WAAW,eACX,cAAc,2BACd,cAAc,MAAM,WAAW,WAC/B,UAAU,MAAM,OAAO,gBACvB,eAAe,MAAM,YAAY,QACjC,OAAO,MAAM,IAAI,IAAI,iBACrB,aAAa,MAAM,UAAU,EAC9B,GAAG,OAAO,CAAC;IAEZ,qBACE,gBAAC,CAAA,GAAA,mBAAc;QACZ,GAAG,KAAK;QACT,YAAY;QACZ,KAAK;QACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ,MAAM,YAAY;QAC5C,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,CAAA,GAAA,yCAAQ,EAAE;gBACnE,GAAG,WAAW;6BACd;gBACA,eAAe,CAAC,CAAC;sBACjB;yBACA;8BACA;gBACA,WAAW;yBACX;6BACA;6BACA;2BACA;YACF,GAAG,MAAM,MAAM;kBACf,cAAA,gBAAC,CAAA,GAAA,eAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,yCAAc;oBAAG;iBAAK;gBACvB;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBAAC,MAAM;oBAA+D;iBAAE;gBACtF;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,yCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gBAAC,CAAA,GAAA,yCAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F","sources":["packages/@react-spectrum/s2/src/ToggleButton.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 {ActionButtonStyleProps, btnStyles} from './ActionButton';\nimport {centerBaseline} from './CenterBaseline';\nimport {ContextValue, Provider, ToggleButton as RACToggleButton, ToggleButtonProps as RACToggleButtonProps, useSlottedContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {StyleProps} from './style-utils';\nimport {Text, TextContext} from './Content';\nimport {ToggleButtonGroupContext} from './ToggleButtonGroup';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the button. */\n children: ReactNode,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<Partial<ToggleButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nexport const ToggleButton = forwardRef(function ToggleButton(props: ToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ToggleButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let ctx = useSlottedContext(ToggleButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n isEmphasized = props.isEmphasized,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACToggleButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n isEmphasized,\n isPending: false,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACToggleButton>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAmCD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DN,MAAM;;;;;;;;;;;;AAmBN,IAAI,oEAAgC,CAAA,GAAA,0BAAY,EAAgC,CAAC;AAK1E,MAAM,0DAAU,CAAA,GAAA,uBAAS,EAAE,SAAS,QAAQ,KAAmB,EAAE,GAA2B;IACjG,IAAI,YAAC,QAAQ,gBAAE,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IACtD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,oBACF,gBAAgB,eAChB,WAAW,UACX,MAAM,aACN,YAAY,mBACZ,UAAU,EACX,GAAG,CAAA,GAAA,uBAAS,EAAE;IACf,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,4CAAiB;IAC9C,IAAI,UAAC,MAAM,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,oCAAQ;IAClC,IAAI,CAAC,cAAc,gBAAgB,GAAG,CAAA,GAAA,qBAAO,EAAE;IAE/C,0DAA0D;IAC1D,IAAI,aAAa,CAAA,GAAA,wBAAU,EAAE,CAAC;QAC3B,OAA4C,OAAO,GAAG;QACvD,IAAI,IAAI;YACN,GAAG,IAAI,GAAG;YACV,GAAG,GAAG,GAAG;YACT,IAAI,uBAAuB,OAAO,WAAW,cAAc,OAAO,gBAAgB,CAAC,IAAI,YAAY,GAAG;YACtG,IAAI,yBAAyB,IAC3B,gBAAgB,SAAS,sBAAsB;QAEnD;IACF,GAAG;QAAC;QAAQ;QAAW;KAAO;IAE9B,qBACE,gCAAC,CAAA,GAAA,kCAAU;QACR,GAAG,KAAK;QACT,qBAAqB;QACrB,kBAAkB;QAClB,aAAa;QACb,QAAQ;QACR,WAAW;QACX,YAAY;QACZ,KAAK;QACL,OAAO;QACP,WAAW,CAAA,cAAe,mBAAmB,8BAAQ;gBAAC,GAAG,WAAW;6BAAE;YAAW;kBAChF,CAAA,4BACC;;kCACE,gCAAC,CAAA,GAAA,uCAAW;kCACV,cAAA,gCAAC;4BAAI,WAAW,kCAAY;4BAAc,OAAM;4BAA6B,OAAM;4BAAK,QAAO;4BAAI,SAAQ;sCACzG,cAAA,gCAAC;gCAAK,GAAE;;;;oBAGX;;;;AAKX;AAOO,SAAS,0CAAe,KAA0B;IACvD,IAAI,oBACF,gBAAgB,eAChB,WAAW,UACX,MAAM,aACN,SAAS,cACT,UAAU,EACV,GAAG,cACJ,GAAG;IAEJ,qBACE,gCAAC,CAAA,GAAA,yCAAiB;QAAG,GAAG,YAAY;kBAClC,cAAA,gCAAC,oDAA8B,QAAQ;YACrC,OAAO;gBACL,kBAAkB;gBAClB,aAAa;gBACb,QAAQ;gBACR,WAAW;gBACX,YAAY;YACd;sBACC,MAAM,QAAQ;;;AAIvB;AAMO,SAAS,0CAAgB,KAAgB;IAC9C,qBAAO,gCAAC;AACV","sources":["packages/@react-spectrum/s2/src/Tooltip.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n Tooltip as AriaTooltip,\n TooltipProps as AriaTooltipProps,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps,\n OverlayArrow,\n TooltipRenderProps,\n useLocale\n} from 'react-aria-components';\nimport {centerPadding, colorScheme, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {ColorScheme} from '@react-types/provider';\nimport {ColorSchemeContext} from './Provider';\nimport {createContext, forwardRef, MutableRefObject, ReactNode, useCallback, useContext, useState} from 'react';\nimport {DOMRef} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface TooltipTriggerProps extends Omit<AriaTooltipTriggerComponentProps, 'children' | 'closeDelay'>, Pick<AriaTooltipProps, 'shouldFlip' | 'containerPadding' | 'offset' | 'crossOffset'> {\n /** The content of the tooltip. */\n children: ReactNode,\n /**\n * The placement of the element with respect to its anchor element.\n *\n * @default 'top'\n */\n placement?: 'start' | 'end' | 'right' | 'left' | 'top' | 'bottom'\n}\n\nexport interface TooltipProps extends Omit<AriaTooltipProps, 'children' | 'className' | 'style' | 'triggerRef' | 'UNSTABLE_portalContainer' | 'isEntering' | 'isExiting' | 'placement' | 'containerPadding' | 'offset' | 'crossOffset' | 'shouldFlip' | 'arrowBoundaryOffset' | 'isOpen' | 'defaultOpen' | 'onOpenChange'>, UnsafeStyles {\n /** The content of the tooltip. */\n children: ReactNode\n}\n\nconst tooltip = style<TooltipRenderProps & {colorScheme: ColorScheme | 'light dark' | null}>({\n ...colorScheme(),\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: 160,\n minHeight: 24,\n boxSizing: 'border-box',\n font: 'ui-sm',\n color: {\n default: 'gray-25',\n forcedColors: 'ButtonText'\n },\n borderWidth: {\n forcedColors: 1\n },\n borderStyle: {\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: 'transparent'\n },\n backgroundColor: 'neutral',\n borderRadius: 'control',\n paddingX: 'edge-to-text',\n paddingY: centerPadding(),\n margin: 8,\n transition: 'default',\n transitionDuration: 200,\n transitionTimingFunction: {\n isExiting: 'in'\n },\n translateX: {\n placement: {\n left: {\n isEntering: 4,\n isExiting: 4\n },\n right: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n translateY: {\n placement: {\n top: {\n isEntering: 4,\n isExiting: 4\n },\n bottom: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n opacity: {\n isEntering: 0,\n isExiting: 0\n }\n});\n\nconst arrowStyles = style<TooltipRenderProps>({\n display: 'block',\n fill: 'gray-800',\n rotate: {\n placement: {\n top: 0,\n bottom: '180deg',\n left: '-90deg',\n right: '90deg'\n }\n },\n translateX: {\n placement: {\n left: '[-25%]',\n right: '[25%]'\n }\n }\n});\n\nlet InternalTooltipTriggerContext = createContext<Partial<TooltipTriggerProps>>({});\n\n/**\n * Display container for Tooltip content. Has a directional arrow dependent on its placement.\n */\nexport const Tooltip = forwardRef(function Tooltip(props: TooltipProps, ref: DOMRef<HTMLDivElement>) {\n let {children, UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useDOMRef(ref);\n let {\n containerPadding,\n crossOffset,\n offset,\n placement = 'top',\n shouldFlip\n } = useContext(InternalTooltipTriggerContext);\n let colorScheme = useContext(ColorSchemeContext);\n let {locale, direction} = useLocale();\n let [borderRadius, setBorderRadius] = useState(0);\n\n // TODO: should we pass through lang and dir props in RAC?\n let tooltipRef = useCallback((el: HTMLDivElement) => {\n (domRef as MutableRefObject<HTMLDivElement>).current = el;\n if (el) {\n el.lang = locale;\n el.dir = direction;\n let spectrumBorderRadius = typeof window !== 'undefined' ? window.getComputedStyle(el).borderRadius : '';\n if (spectrumBorderRadius !== '') {\n setBorderRadius(parseInt(spectrumBorderRadius, 10));\n }\n }\n }, [locale, direction, domRef]);\n\n return (\n <AriaTooltip\n {...props}\n arrowBoundaryOffset={borderRadius}\n containerPadding={containerPadding}\n crossOffset={crossOffset}\n offset={offset}\n placement={placement}\n shouldFlip={shouldFlip}\n ref={tooltipRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + tooltip({...renderProps, colorScheme})}>\n {renderProps => (\n <>\n <OverlayArrow>\n <svg className={arrowStyles(renderProps)} xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"5\" viewBox=\"0 0 10 5\">\n <path d=\"M4.29289 4.29289L0 0H10L5.70711 4.29289C5.31658 4.68342 4.68342 4.68342 4.29289 4.29289Z\" />\n </svg>\n </OverlayArrow>\n {children}\n </>\n )}\n </AriaTooltip>\n );\n});\n\n/**\n * TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing\n * the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip\n * relative to the trigger.\n */\nexport function TooltipTrigger(props: TooltipTriggerProps) {\n let {\n containerPadding,\n crossOffset,\n offset,\n placement,\n shouldFlip,\n ...triggerProps\n } = props;\n\n return (\n <AriaTooltipTrigger {...triggerProps}>\n <InternalTooltipTriggerContext.Provider\n value={{\n containerPadding: containerPadding,\n crossOffset: crossOffset,\n offset: offset,\n placement: placement,\n shouldFlip: shouldFlip\n }}>\n {props.children}\n </InternalTooltipTriggerContext.Provider>\n </AriaTooltipTrigger>\n );\n}\n\n\n// This is purely so that storybook generates the types for both Menu and MenuTrigger\ninterface ICombined extends Omit<TooltipProps, 'placement'>, TooltipTriggerProps {}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function CombinedTooltip(props: ICombined) {\n return <div />;\n}\n"],"names":[],"version":3,"file":"Tooltip.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAmCD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DN,MAAM;;;;;;;;;;;;AAmBN,IAAI,oEAAgC,CAAA,GAAA,0BAAY,EAAgC,CAAC;AAK1E,MAAM,0DAAU,CAAA,GAAA,uBAAS,EAAE,SAAS,QAAQ,KAAmB,EAAE,GAA2B;IACjG,IAAI,YAAC,QAAQ,gBAAE,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IACtD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,oBACF,gBAAgB,eAChB,WAAW,UACX,MAAM,aACN,YAAY,mBACZ,UAAU,EACX,GAAG,CAAA,GAAA,uBAAS,EAAE;IACf,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,4CAAiB;IAC9C,IAAI,UAAC,MAAM,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,oCAAQ;IAClC,IAAI,CAAC,cAAc,gBAAgB,GAAG,CAAA,GAAA,qBAAO,EAAE;IAE/C,0DAA0D;IAC1D,IAAI,aAAa,CAAA,GAAA,wBAAU,EAAE,CAAC;QAC3B,OAA4C,OAAO,GAAG;QACvD,IAAI,IAAI;YACN,GAAG,IAAI,GAAG;YACV,GAAG,GAAG,GAAG;YACT,IAAI,uBAAuB,OAAO,WAAW,cAAc,OAAO,gBAAgB,CAAC,IAAI,YAAY,GAAG;YACtG,IAAI,yBAAyB,IAC3B,gBAAgB,SAAS,sBAAsB;QAEnD;IACF,GAAG;QAAC;QAAQ;QAAW;KAAO;IAE9B,qBACE,gCAAC,CAAA,GAAA,kCAAU;QACR,GAAG,KAAK;QACT,qBAAqB;QACrB,kBAAkB;QAClB,aAAa;QACb,QAAQ;QACR,WAAW;QACX,YAAY;QACZ,KAAK;QACL,OAAO;QACP,WAAW,CAAA,cAAe,mBAAmB,8BAAQ;gBAAC,GAAG,WAAW;6BAAE;YAAW;kBAChF,CAAA,4BACC;;kCACE,gCAAC,CAAA,GAAA,uCAAW;kCACV,cAAA,gCAAC;4BAAI,WAAW,kCAAY;4BAAc,OAAM;4BAA6B,OAAM;4BAAK,QAAO;4BAAI,SAAQ;sCACzG,cAAA,gCAAC;gCAAK,GAAE;;;;oBAGX;;;;AAKX;AAOO,SAAS,0CAAe,KAA0B;IACvD,IAAI,oBACF,gBAAgB,eAChB,WAAW,UACX,MAAM,aACN,SAAS,cACT,UAAU,EACV,GAAG,cACJ,GAAG;IAEJ,qBACE,gCAAC,CAAA,GAAA,yCAAiB;QAAG,GAAG,YAAY;kBAClC,cAAA,gCAAC,oDAA8B,QAAQ;YACrC,OAAO;gBACL,kBAAkB;gBAClB,aAAa;gBACb,QAAQ;gBACR,WAAW;gBACX,YAAY;YACd;sBACC,MAAM,QAAQ;;;AAIvB;AAMO,SAAS,0CAAgB,KAAgB;IAC9C,qBAAO,gCAAC;AACV","sources":["packages/@react-spectrum/s2/src/Tooltip.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n Tooltip as AriaTooltip,\n TooltipProps as AriaTooltipProps,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps,\n OverlayArrow,\n TooltipRenderProps,\n useLocale\n} from 'react-aria-components';\nimport {centerPadding, colorScheme, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {ColorScheme} from '@react-types/provider';\nimport {ColorSchemeContext} from './Provider';\nimport {createContext, forwardRef, MutableRefObject, ReactNode, useCallback, useContext, useState} from 'react';\nimport {DOMRef} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface TooltipTriggerProps extends Omit<AriaTooltipTriggerComponentProps, 'children' | 'closeDelay'>, Pick<AriaTooltipProps, 'shouldFlip' | 'containerPadding' | 'offset' | 'crossOffset'> {\n /** The content of the tooltip. */\n children: ReactNode,\n /**\n * The placement of the element with respect to its anchor element.\n *\n * @default 'top'\n */\n placement?: 'start' | 'end' | 'right' | 'left' | 'top' | 'bottom'\n}\n\nexport interface TooltipProps extends Omit<AriaTooltipProps, 'children' | 'className' | 'style' | 'triggerRef' | 'UNSTABLE_portalContainer' | 'isEntering' | 'isExiting' | 'placement' | 'containerPadding' | 'offset' | 'crossOffset' | 'shouldFlip' | 'arrowBoundaryOffset' | 'isOpen' | 'defaultOpen' | 'onOpenChange'>, UnsafeStyles {\n /** The content of the tooltip. */\n children: ReactNode\n}\n\nconst tooltip = style<TooltipRenderProps & {colorScheme: ColorScheme | 'light dark' | null}>({\n ...colorScheme(),\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: 160,\n minHeight: 24,\n boxSizing: 'border-box',\n font: 'ui-sm',\n color: {\n default: 'gray-25',\n forcedColors: 'ButtonText'\n },\n borderWidth: {\n forcedColors: 1\n },\n borderStyle: {\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: 'transparent'\n },\n backgroundColor: 'neutral',\n borderRadius: 'control',\n paddingX: 'edge-to-text',\n paddingY: centerPadding(),\n margin: 8,\n transition: 'default',\n transitionDuration: 200,\n transitionTimingFunction: {\n isExiting: 'in'\n },\n translateX: {\n placement: {\n left: {\n isEntering: 4,\n isExiting: 4\n },\n right: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n translateY: {\n placement: {\n top: {\n isEntering: 4,\n isExiting: 4\n },\n bottom: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n opacity: {\n isEntering: 0,\n isExiting: 0\n }\n});\n\nconst arrowStyles = style<TooltipRenderProps>({\n display: 'block',\n fill: 'gray-800',\n rotate: {\n placement: {\n top: 0,\n bottom: '180deg',\n left: '-90deg',\n right: '90deg'\n }\n },\n translateX: {\n placement: {\n left: '[-25%]',\n right: '[25%]'\n }\n }\n});\n\nlet InternalTooltipTriggerContext = createContext<Partial<TooltipTriggerProps>>({});\n\n/**\n * Display container for Tooltip content. Has a directional arrow dependent on its placement.\n */\nexport const Tooltip = forwardRef(function Tooltip(props: TooltipProps, ref: DOMRef<HTMLDivElement>) {\n let {children, UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useDOMRef(ref);\n let {\n containerPadding,\n crossOffset,\n offset,\n placement = 'top',\n shouldFlip\n } = useContext(InternalTooltipTriggerContext);\n let colorScheme = useContext(ColorSchemeContext);\n let {locale, direction} = useLocale();\n let [borderRadius, setBorderRadius] = useState(0);\n\n // TODO: should we pass through lang and dir props in RAC?\n let tooltipRef = useCallback((el: HTMLDivElement) => {\n (domRef as MutableRefObject<HTMLDivElement>).current = el;\n if (el) {\n el.lang = locale;\n el.dir = direction;\n let spectrumBorderRadius = typeof window !== 'undefined' ? window.getComputedStyle(el).borderRadius : '';\n if (spectrumBorderRadius !== '') {\n setBorderRadius(parseInt(spectrumBorderRadius, 10));\n }\n }\n }, [locale, direction, domRef]);\n\n return (\n <AriaTooltip\n {...props}\n arrowBoundaryOffset={borderRadius}\n containerPadding={containerPadding}\n crossOffset={crossOffset}\n offset={offset}\n placement={placement}\n shouldFlip={shouldFlip}\n ref={tooltipRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + tooltip({...renderProps, colorScheme})}>\n {renderProps => (\n <>\n <OverlayArrow>\n <svg className={arrowStyles(renderProps)} xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"5\" viewBox=\"0 0 10 5\">\n <path d=\"M4.29289 4.29289L0 0H10L5.70711 4.29289C5.31658 4.68342 4.68342 4.68342 4.29289 4.29289Z\" />\n </svg>\n </OverlayArrow>\n {children}\n </>\n )}\n </AriaTooltip>\n );\n});\n\n/**\n * TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing\n * the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip\n * relative to the trigger.\n */\nexport function TooltipTrigger(props: TooltipTriggerProps): ReactNode {\n let {\n containerPadding,\n crossOffset,\n offset,\n placement,\n shouldFlip,\n ...triggerProps\n } = props;\n\n return (\n <AriaTooltipTrigger {...triggerProps}>\n <InternalTooltipTriggerContext.Provider\n value={{\n containerPadding: containerPadding,\n crossOffset: crossOffset,\n offset: offset,\n placement: placement,\n shouldFlip: shouldFlip\n }}>\n {props.children}\n </InternalTooltipTriggerContext.Provider>\n </AriaTooltipTrigger>\n );\n}\n\n\n// This is purely so that storybook generates the types for both Menu and MenuTrigger\ninterface ICombined extends Omit<TooltipProps, 'placement'>, TooltipTriggerProps {}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function CombinedTooltip(props: ICombined): ReactNode {\n return <div />;\n}\n"],"names":[],"version":3,"file":"Tooltip.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":"AC6CgB;EAAA;;;;EAAA;;;;;;EAAA;IAAA;;;;;;EAAA;;;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;;;EAAA;;;;;;EAAA;;;;;;EAAA;;;;;EAAA;;;;EA6DI;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAAA;;;;;;AA7DJ;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["aa7688246f893a38","packages/@react-spectrum/s2/src/Tooltip.tsx"],"sourcesContent":["@import \"98a0a1b80e895d38\";\n@import \"c07030e64bc8758c\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n Tooltip as AriaTooltip,\n TooltipProps as AriaTooltipProps,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps,\n OverlayArrow,\n TooltipRenderProps,\n useLocale\n} from 'react-aria-components';\nimport {centerPadding, colorScheme, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {ColorScheme} from '@react-types/provider';\nimport {ColorSchemeContext} from './Provider';\nimport {createContext, forwardRef, MutableRefObject, ReactNode, useCallback, useContext, useState} from 'react';\nimport {DOMRef} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface TooltipTriggerProps extends Omit<AriaTooltipTriggerComponentProps, 'children' | 'closeDelay'>, Pick<AriaTooltipProps, 'shouldFlip' | 'containerPadding' | 'offset' | 'crossOffset'> {\n /** The content of the tooltip. */\n children: ReactNode,\n /**\n * The placement of the element with respect to its anchor element.\n *\n * @default 'top'\n */\n placement?: 'start' | 'end' | 'right' | 'left' | 'top' | 'bottom'\n}\n\nexport interface TooltipProps extends Omit<AriaTooltipProps, 'children' | 'className' | 'style' | 'triggerRef' | 'UNSTABLE_portalContainer' | 'isEntering' | 'isExiting' | 'placement' | 'containerPadding' | 'offset' | 'crossOffset' | 'shouldFlip' | 'arrowBoundaryOffset' | 'isOpen' | 'defaultOpen' | 'onOpenChange'>, UnsafeStyles {\n /** The content of the tooltip. */\n children: ReactNode\n}\n\nconst tooltip = style<TooltipRenderProps & {colorScheme: ColorScheme | 'light dark' | null}>({\n ...colorScheme(),\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: 160,\n minHeight: 24,\n boxSizing: 'border-box',\n font: 'ui-sm',\n color: {\n default: 'gray-25',\n forcedColors: 'ButtonText'\n },\n borderWidth: {\n forcedColors: 1\n },\n borderStyle: {\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: 'transparent'\n },\n backgroundColor: 'neutral',\n borderRadius: 'control',\n paddingX: 'edge-to-text',\n paddingY: centerPadding(),\n margin: 8,\n transition: 'default',\n transitionDuration: 200,\n transitionTimingFunction: {\n isExiting: 'in'\n },\n translateX: {\n placement: {\n left: {\n isEntering: 4,\n isExiting: 4\n },\n right: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n translateY: {\n placement: {\n top: {\n isEntering: 4,\n isExiting: 4\n },\n bottom: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n opacity: {\n isEntering: 0,\n isExiting: 0\n }\n});\n\nconst arrowStyles = style<TooltipRenderProps>({\n display: 'block',\n fill: 'gray-800',\n rotate: {\n placement: {\n top: 0,\n bottom: '180deg',\n left: '-90deg',\n right: '90deg'\n }\n },\n translateX: {\n placement: {\n left: '[-25%]',\n right: '[25%]'\n }\n }\n});\n\nlet InternalTooltipTriggerContext = createContext<Partial<TooltipTriggerProps>>({});\n\n/**\n * Display container for Tooltip content. Has a directional arrow dependent on its placement.\n */\nexport const Tooltip = forwardRef(function Tooltip(props: TooltipProps, ref: DOMRef<HTMLDivElement>) {\n let {children, UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useDOMRef(ref);\n let {\n containerPadding,\n crossOffset,\n offset,\n placement = 'top',\n shouldFlip\n } = useContext(InternalTooltipTriggerContext);\n let colorScheme = useContext(ColorSchemeContext);\n let {locale, direction} = useLocale();\n let [borderRadius, setBorderRadius] = useState(0);\n\n // TODO: should we pass through lang and dir props in RAC?\n let tooltipRef = useCallback((el: HTMLDivElement) => {\n (domRef as MutableRefObject<HTMLDivElement>).current = el;\n if (el) {\n el.lang = locale;\n el.dir = direction;\n let spectrumBorderRadius = typeof window !== 'undefined' ? window.getComputedStyle(el).borderRadius : '';\n if (spectrumBorderRadius !== '') {\n setBorderRadius(parseInt(spectrumBorderRadius, 10));\n }\n }\n }, [locale, direction, domRef]);\n\n return (\n <AriaTooltip\n {...props}\n arrowBoundaryOffset={borderRadius}\n containerPadding={containerPadding}\n crossOffset={crossOffset}\n offset={offset}\n placement={placement}\n shouldFlip={shouldFlip}\n ref={tooltipRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + tooltip({...renderProps, colorScheme})}>\n {renderProps => (\n <>\n <OverlayArrow>\n <svg className={arrowStyles(renderProps)} xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"5\" viewBox=\"0 0 10 5\">\n <path d=\"M4.29289 4.29289L0 0H10L5.70711 4.29289C5.31658 4.68342 4.68342 4.68342 4.29289 4.29289Z\" />\n </svg>\n </OverlayArrow>\n {children}\n </>\n )}\n </AriaTooltip>\n );\n});\n\n/**\n * TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing\n * the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip\n * relative to the trigger.\n */\nexport function TooltipTrigger(props: TooltipTriggerProps) {\n let {\n containerPadding,\n crossOffset,\n offset,\n placement,\n shouldFlip,\n ...triggerProps\n } = props;\n\n return (\n <AriaTooltipTrigger {...triggerProps}>\n <InternalTooltipTriggerContext.Provider\n value={{\n containerPadding: containerPadding,\n crossOffset: crossOffset,\n offset: offset,\n placement: placement,\n shouldFlip: shouldFlip\n }}>\n {props.children}\n </InternalTooltipTriggerContext.Provider>\n </AriaTooltipTrigger>\n );\n}\n\n\n// This is purely so that storybook generates the types for both Menu and MenuTrigger\ninterface ICombined extends Omit<TooltipProps, 'placement'>, TooltipTriggerProps {}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function CombinedTooltip(props: ICombined) {\n return <div />;\n}\n"],"names":[],"version":3,"file":"Tooltip.css.map"}
1
+ {"mappings":"AC6CgB;EAAA;;;;EAAA;;;;;;EAAA;IAAA;;;;;;EAAA;;;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;;;EAAA;;;;;;EAAA;;;;;;EAAA;;;;;EAAA;;;;EA6DI;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAAA;;;;;;AA7DJ;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["aa7688246f893a38","packages/@react-spectrum/s2/src/Tooltip.tsx"],"sourcesContent":["@import \"98a0a1b80e895d38\";\n@import \"c07030e64bc8758c\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n Tooltip as AriaTooltip,\n TooltipProps as AriaTooltipProps,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps,\n OverlayArrow,\n TooltipRenderProps,\n useLocale\n} from 'react-aria-components';\nimport {centerPadding, colorScheme, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {ColorScheme} from '@react-types/provider';\nimport {ColorSchemeContext} from './Provider';\nimport {createContext, forwardRef, MutableRefObject, ReactNode, useCallback, useContext, useState} from 'react';\nimport {DOMRef} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface TooltipTriggerProps extends Omit<AriaTooltipTriggerComponentProps, 'children' | 'closeDelay'>, Pick<AriaTooltipProps, 'shouldFlip' | 'containerPadding' | 'offset' | 'crossOffset'> {\n /** The content of the tooltip. */\n children: ReactNode,\n /**\n * The placement of the element with respect to its anchor element.\n *\n * @default 'top'\n */\n placement?: 'start' | 'end' | 'right' | 'left' | 'top' | 'bottom'\n}\n\nexport interface TooltipProps extends Omit<AriaTooltipProps, 'children' | 'className' | 'style' | 'triggerRef' | 'UNSTABLE_portalContainer' | 'isEntering' | 'isExiting' | 'placement' | 'containerPadding' | 'offset' | 'crossOffset' | 'shouldFlip' | 'arrowBoundaryOffset' | 'isOpen' | 'defaultOpen' | 'onOpenChange'>, UnsafeStyles {\n /** The content of the tooltip. */\n children: ReactNode\n}\n\nconst tooltip = style<TooltipRenderProps & {colorScheme: ColorScheme | 'light dark' | null}>({\n ...colorScheme(),\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: 160,\n minHeight: 24,\n boxSizing: 'border-box',\n font: 'ui-sm',\n color: {\n default: 'gray-25',\n forcedColors: 'ButtonText'\n },\n borderWidth: {\n forcedColors: 1\n },\n borderStyle: {\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: 'transparent'\n },\n backgroundColor: 'neutral',\n borderRadius: 'control',\n paddingX: 'edge-to-text',\n paddingY: centerPadding(),\n margin: 8,\n transition: 'default',\n transitionDuration: 200,\n transitionTimingFunction: {\n isExiting: 'in'\n },\n translateX: {\n placement: {\n left: {\n isEntering: 4,\n isExiting: 4\n },\n right: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n translateY: {\n placement: {\n top: {\n isEntering: 4,\n isExiting: 4\n },\n bottom: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n opacity: {\n isEntering: 0,\n isExiting: 0\n }\n});\n\nconst arrowStyles = style<TooltipRenderProps>({\n display: 'block',\n fill: 'gray-800',\n rotate: {\n placement: {\n top: 0,\n bottom: '180deg',\n left: '-90deg',\n right: '90deg'\n }\n },\n translateX: {\n placement: {\n left: '[-25%]',\n right: '[25%]'\n }\n }\n});\n\nlet InternalTooltipTriggerContext = createContext<Partial<TooltipTriggerProps>>({});\n\n/**\n * Display container for Tooltip content. Has a directional arrow dependent on its placement.\n */\nexport const Tooltip = forwardRef(function Tooltip(props: TooltipProps, ref: DOMRef<HTMLDivElement>) {\n let {children, UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useDOMRef(ref);\n let {\n containerPadding,\n crossOffset,\n offset,\n placement = 'top',\n shouldFlip\n } = useContext(InternalTooltipTriggerContext);\n let colorScheme = useContext(ColorSchemeContext);\n let {locale, direction} = useLocale();\n let [borderRadius, setBorderRadius] = useState(0);\n\n // TODO: should we pass through lang and dir props in RAC?\n let tooltipRef = useCallback((el: HTMLDivElement) => {\n (domRef as MutableRefObject<HTMLDivElement>).current = el;\n if (el) {\n el.lang = locale;\n el.dir = direction;\n let spectrumBorderRadius = typeof window !== 'undefined' ? window.getComputedStyle(el).borderRadius : '';\n if (spectrumBorderRadius !== '') {\n setBorderRadius(parseInt(spectrumBorderRadius, 10));\n }\n }\n }, [locale, direction, domRef]);\n\n return (\n <AriaTooltip\n {...props}\n arrowBoundaryOffset={borderRadius}\n containerPadding={containerPadding}\n crossOffset={crossOffset}\n offset={offset}\n placement={placement}\n shouldFlip={shouldFlip}\n ref={tooltipRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + tooltip({...renderProps, colorScheme})}>\n {renderProps => (\n <>\n <OverlayArrow>\n <svg className={arrowStyles(renderProps)} xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"5\" viewBox=\"0 0 10 5\">\n <path d=\"M4.29289 4.29289L0 0H10L5.70711 4.29289C5.31658 4.68342 4.68342 4.68342 4.29289 4.29289Z\" />\n </svg>\n </OverlayArrow>\n {children}\n </>\n )}\n </AriaTooltip>\n );\n});\n\n/**\n * TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing\n * the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip\n * relative to the trigger.\n */\nexport function TooltipTrigger(props: TooltipTriggerProps): ReactNode {\n let {\n containerPadding,\n crossOffset,\n offset,\n placement,\n shouldFlip,\n ...triggerProps\n } = props;\n\n return (\n <AriaTooltipTrigger {...triggerProps}>\n <InternalTooltipTriggerContext.Provider\n value={{\n containerPadding: containerPadding,\n crossOffset: crossOffset,\n offset: offset,\n placement: placement,\n shouldFlip: shouldFlip\n }}>\n {props.children}\n </InternalTooltipTriggerContext.Provider>\n </AriaTooltipTrigger>\n );\n}\n\n\n// This is purely so that storybook generates the types for both Menu and MenuTrigger\ninterface ICombined extends Omit<TooltipProps, 'placement'>, TooltipTriggerProps {}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function CombinedTooltip(props: ICombined): ReactNode {\n return <div />;\n}\n"],"names":[],"version":3,"file":"Tooltip.css.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAmCD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DN,MAAM;;;;;;;;;;;;AAmBN,IAAI,oEAAgC,CAAA,GAAA,oBAAY,EAAgC,CAAC;AAK1E,MAAM,0DAAU,CAAA,GAAA,iBAAS,EAAE,SAAS,QAAQ,KAAmB,EAAE,GAA2B;IACjG,IAAI,YAAC,QAAQ,gBAAE,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IACtD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,oBACF,gBAAgB,eAChB,WAAW,UACX,MAAM,aACN,YAAY,mBACZ,UAAU,EACX,GAAG,CAAA,GAAA,iBAAS,EAAE;IACf,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAiB;IAC9C,IAAI,UAAC,MAAM,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAClC,IAAI,CAAC,cAAc,gBAAgB,GAAG,CAAA,GAAA,eAAO,EAAE;IAE/C,0DAA0D;IAC1D,IAAI,aAAa,CAAA,GAAA,kBAAU,EAAE,CAAC;QAC3B,OAA4C,OAAO,GAAG;QACvD,IAAI,IAAI;YACN,GAAG,IAAI,GAAG;YACV,GAAG,GAAG,GAAG;YACT,IAAI,uBAAuB,OAAO,WAAW,cAAc,OAAO,gBAAgB,CAAC,IAAI,YAAY,GAAG;YACtG,IAAI,yBAAyB,IAC3B,gBAAgB,SAAS,sBAAsB;QAEnD;IACF,GAAG;QAAC;QAAQ;QAAW;KAAO;IAE9B,qBACE,gBAAC,CAAA,GAAA,cAAU;QACR,GAAG,KAAK;QACT,qBAAqB;QACrB,kBAAkB;QAClB,aAAa;QACb,QAAQ;QACR,WAAW;QACX,YAAY;QACZ,KAAK;QACL,OAAO;QACP,WAAW,CAAA,cAAe,mBAAmB,8BAAQ;gBAAC,GAAG,WAAW;6BAAE;YAAW;kBAChF,CAAA,4BACC;;kCACE,gBAAC,CAAA,GAAA,mBAAW;kCACV,cAAA,gBAAC;4BAAI,WAAW,kCAAY;4BAAc,OAAM;4BAA6B,OAAM;4BAAK,QAAO;4BAAI,SAAQ;sCACzG,cAAA,gBAAC;gCAAK,GAAE;;;;oBAGX;;;;AAKX;AAOO,SAAS,0CAAe,KAA0B;IACvD,IAAI,oBACF,gBAAgB,eAChB,WAAW,UACX,MAAM,aACN,SAAS,cACT,UAAU,EACV,GAAG,cACJ,GAAG;IAEJ,qBACE,gBAAC,CAAA,GAAA,qBAAiB;QAAG,GAAG,YAAY;kBAClC,cAAA,gBAAC,oDAA8B,QAAQ;YACrC,OAAO;gBACL,kBAAkB;gBAClB,aAAa;gBACb,QAAQ;gBACR,WAAW;gBACX,YAAY;YACd;sBACC,MAAM,QAAQ;;;AAIvB;AAMO,SAAS,0CAAgB,KAAgB;IAC9C,qBAAO,gBAAC;AACV","sources":["packages/@react-spectrum/s2/src/Tooltip.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n Tooltip as AriaTooltip,\n TooltipProps as AriaTooltipProps,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps,\n OverlayArrow,\n TooltipRenderProps,\n useLocale\n} from 'react-aria-components';\nimport {centerPadding, colorScheme, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {ColorScheme} from '@react-types/provider';\nimport {ColorSchemeContext} from './Provider';\nimport {createContext, forwardRef, MutableRefObject, ReactNode, useCallback, useContext, useState} from 'react';\nimport {DOMRef} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface TooltipTriggerProps extends Omit<AriaTooltipTriggerComponentProps, 'children' | 'closeDelay'>, Pick<AriaTooltipProps, 'shouldFlip' | 'containerPadding' | 'offset' | 'crossOffset'> {\n /** The content of the tooltip. */\n children: ReactNode,\n /**\n * The placement of the element with respect to its anchor element.\n *\n * @default 'top'\n */\n placement?: 'start' | 'end' | 'right' | 'left' | 'top' | 'bottom'\n}\n\nexport interface TooltipProps extends Omit<AriaTooltipProps, 'children' | 'className' | 'style' | 'triggerRef' | 'UNSTABLE_portalContainer' | 'isEntering' | 'isExiting' | 'placement' | 'containerPadding' | 'offset' | 'crossOffset' | 'shouldFlip' | 'arrowBoundaryOffset' | 'isOpen' | 'defaultOpen' | 'onOpenChange'>, UnsafeStyles {\n /** The content of the tooltip. */\n children: ReactNode\n}\n\nconst tooltip = style<TooltipRenderProps & {colorScheme: ColorScheme | 'light dark' | null}>({\n ...colorScheme(),\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: 160,\n minHeight: 24,\n boxSizing: 'border-box',\n font: 'ui-sm',\n color: {\n default: 'gray-25',\n forcedColors: 'ButtonText'\n },\n borderWidth: {\n forcedColors: 1\n },\n borderStyle: {\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: 'transparent'\n },\n backgroundColor: 'neutral',\n borderRadius: 'control',\n paddingX: 'edge-to-text',\n paddingY: centerPadding(),\n margin: 8,\n transition: 'default',\n transitionDuration: 200,\n transitionTimingFunction: {\n isExiting: 'in'\n },\n translateX: {\n placement: {\n left: {\n isEntering: 4,\n isExiting: 4\n },\n right: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n translateY: {\n placement: {\n top: {\n isEntering: 4,\n isExiting: 4\n },\n bottom: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n opacity: {\n isEntering: 0,\n isExiting: 0\n }\n});\n\nconst arrowStyles = style<TooltipRenderProps>({\n display: 'block',\n fill: 'gray-800',\n rotate: {\n placement: {\n top: 0,\n bottom: '180deg',\n left: '-90deg',\n right: '90deg'\n }\n },\n translateX: {\n placement: {\n left: '[-25%]',\n right: '[25%]'\n }\n }\n});\n\nlet InternalTooltipTriggerContext = createContext<Partial<TooltipTriggerProps>>({});\n\n/**\n * Display container for Tooltip content. Has a directional arrow dependent on its placement.\n */\nexport const Tooltip = forwardRef(function Tooltip(props: TooltipProps, ref: DOMRef<HTMLDivElement>) {\n let {children, UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useDOMRef(ref);\n let {\n containerPadding,\n crossOffset,\n offset,\n placement = 'top',\n shouldFlip\n } = useContext(InternalTooltipTriggerContext);\n let colorScheme = useContext(ColorSchemeContext);\n let {locale, direction} = useLocale();\n let [borderRadius, setBorderRadius] = useState(0);\n\n // TODO: should we pass through lang and dir props in RAC?\n let tooltipRef = useCallback((el: HTMLDivElement) => {\n (domRef as MutableRefObject<HTMLDivElement>).current = el;\n if (el) {\n el.lang = locale;\n el.dir = direction;\n let spectrumBorderRadius = typeof window !== 'undefined' ? window.getComputedStyle(el).borderRadius : '';\n if (spectrumBorderRadius !== '') {\n setBorderRadius(parseInt(spectrumBorderRadius, 10));\n }\n }\n }, [locale, direction, domRef]);\n\n return (\n <AriaTooltip\n {...props}\n arrowBoundaryOffset={borderRadius}\n containerPadding={containerPadding}\n crossOffset={crossOffset}\n offset={offset}\n placement={placement}\n shouldFlip={shouldFlip}\n ref={tooltipRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + tooltip({...renderProps, colorScheme})}>\n {renderProps => (\n <>\n <OverlayArrow>\n <svg className={arrowStyles(renderProps)} xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"5\" viewBox=\"0 0 10 5\">\n <path d=\"M4.29289 4.29289L0 0H10L5.70711 4.29289C5.31658 4.68342 4.68342 4.68342 4.29289 4.29289Z\" />\n </svg>\n </OverlayArrow>\n {children}\n </>\n )}\n </AriaTooltip>\n );\n});\n\n/**\n * TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing\n * the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip\n * relative to the trigger.\n */\nexport function TooltipTrigger(props: TooltipTriggerProps) {\n let {\n containerPadding,\n crossOffset,\n offset,\n placement,\n shouldFlip,\n ...triggerProps\n } = props;\n\n return (\n <AriaTooltipTrigger {...triggerProps}>\n <InternalTooltipTriggerContext.Provider\n value={{\n containerPadding: containerPadding,\n crossOffset: crossOffset,\n offset: offset,\n placement: placement,\n shouldFlip: shouldFlip\n }}>\n {props.children}\n </InternalTooltipTriggerContext.Provider>\n </AriaTooltipTrigger>\n );\n}\n\n\n// This is purely so that storybook generates the types for both Menu and MenuTrigger\ninterface ICombined extends Omit<TooltipProps, 'placement'>, TooltipTriggerProps {}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function CombinedTooltip(props: ICombined) {\n return <div />;\n}\n"],"names":[],"version":3,"file":"Tooltip.mjs.map"}
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAmCD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DN,MAAM;;;;;;;;;;;;AAmBN,IAAI,oEAAgC,CAAA,GAAA,oBAAY,EAAgC,CAAC;AAK1E,MAAM,0DAAU,CAAA,GAAA,iBAAS,EAAE,SAAS,QAAQ,KAAmB,EAAE,GAA2B;IACjG,IAAI,YAAC,QAAQ,gBAAE,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IACtD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,oBACF,gBAAgB,eAChB,WAAW,UACX,MAAM,aACN,YAAY,mBACZ,UAAU,EACX,GAAG,CAAA,GAAA,iBAAS,EAAE;IACf,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAiB;IAC9C,IAAI,UAAC,MAAM,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAClC,IAAI,CAAC,cAAc,gBAAgB,GAAG,CAAA,GAAA,eAAO,EAAE;IAE/C,0DAA0D;IAC1D,IAAI,aAAa,CAAA,GAAA,kBAAU,EAAE,CAAC;QAC3B,OAA4C,OAAO,GAAG;QACvD,IAAI,IAAI;YACN,GAAG,IAAI,GAAG;YACV,GAAG,GAAG,GAAG;YACT,IAAI,uBAAuB,OAAO,WAAW,cAAc,OAAO,gBAAgB,CAAC,IAAI,YAAY,GAAG;YACtG,IAAI,yBAAyB,IAC3B,gBAAgB,SAAS,sBAAsB;QAEnD;IACF,GAAG;QAAC;QAAQ;QAAW;KAAO;IAE9B,qBACE,gBAAC,CAAA,GAAA,cAAU;QACR,GAAG,KAAK;QACT,qBAAqB;QACrB,kBAAkB;QAClB,aAAa;QACb,QAAQ;QACR,WAAW;QACX,YAAY;QACZ,KAAK;QACL,OAAO;QACP,WAAW,CAAA,cAAe,mBAAmB,8BAAQ;gBAAC,GAAG,WAAW;6BAAE;YAAW;kBAChF,CAAA,4BACC;;kCACE,gBAAC,CAAA,GAAA,mBAAW;kCACV,cAAA,gBAAC;4BAAI,WAAW,kCAAY;4BAAc,OAAM;4BAA6B,OAAM;4BAAK,QAAO;4BAAI,SAAQ;sCACzG,cAAA,gBAAC;gCAAK,GAAE;;;;oBAGX;;;;AAKX;AAOO,SAAS,0CAAe,KAA0B;IACvD,IAAI,oBACF,gBAAgB,eAChB,WAAW,UACX,MAAM,aACN,SAAS,cACT,UAAU,EACV,GAAG,cACJ,GAAG;IAEJ,qBACE,gBAAC,CAAA,GAAA,qBAAiB;QAAG,GAAG,YAAY;kBAClC,cAAA,gBAAC,oDAA8B,QAAQ;YACrC,OAAO;gBACL,kBAAkB;gBAClB,aAAa;gBACb,QAAQ;gBACR,WAAW;gBACX,YAAY;YACd;sBACC,MAAM,QAAQ;;;AAIvB;AAMO,SAAS,0CAAgB,KAAgB;IAC9C,qBAAO,gBAAC;AACV","sources":["packages/@react-spectrum/s2/src/Tooltip.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n Tooltip as AriaTooltip,\n TooltipProps as AriaTooltipProps,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps,\n OverlayArrow,\n TooltipRenderProps,\n useLocale\n} from 'react-aria-components';\nimport {centerPadding, colorScheme, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {ColorScheme} from '@react-types/provider';\nimport {ColorSchemeContext} from './Provider';\nimport {createContext, forwardRef, MutableRefObject, ReactNode, useCallback, useContext, useState} from 'react';\nimport {DOMRef} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface TooltipTriggerProps extends Omit<AriaTooltipTriggerComponentProps, 'children' | 'closeDelay'>, Pick<AriaTooltipProps, 'shouldFlip' | 'containerPadding' | 'offset' | 'crossOffset'> {\n /** The content of the tooltip. */\n children: ReactNode,\n /**\n * The placement of the element with respect to its anchor element.\n *\n * @default 'top'\n */\n placement?: 'start' | 'end' | 'right' | 'left' | 'top' | 'bottom'\n}\n\nexport interface TooltipProps extends Omit<AriaTooltipProps, 'children' | 'className' | 'style' | 'triggerRef' | 'UNSTABLE_portalContainer' | 'isEntering' | 'isExiting' | 'placement' | 'containerPadding' | 'offset' | 'crossOffset' | 'shouldFlip' | 'arrowBoundaryOffset' | 'isOpen' | 'defaultOpen' | 'onOpenChange'>, UnsafeStyles {\n /** The content of the tooltip. */\n children: ReactNode\n}\n\nconst tooltip = style<TooltipRenderProps & {colorScheme: ColorScheme | 'light dark' | null}>({\n ...colorScheme(),\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: 160,\n minHeight: 24,\n boxSizing: 'border-box',\n font: 'ui-sm',\n color: {\n default: 'gray-25',\n forcedColors: 'ButtonText'\n },\n borderWidth: {\n forcedColors: 1\n },\n borderStyle: {\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: 'transparent'\n },\n backgroundColor: 'neutral',\n borderRadius: 'control',\n paddingX: 'edge-to-text',\n paddingY: centerPadding(),\n margin: 8,\n transition: 'default',\n transitionDuration: 200,\n transitionTimingFunction: {\n isExiting: 'in'\n },\n translateX: {\n placement: {\n left: {\n isEntering: 4,\n isExiting: 4\n },\n right: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n translateY: {\n placement: {\n top: {\n isEntering: 4,\n isExiting: 4\n },\n bottom: {\n isEntering: -4,\n isExiting: -4\n }\n }\n },\n opacity: {\n isEntering: 0,\n isExiting: 0\n }\n});\n\nconst arrowStyles = style<TooltipRenderProps>({\n display: 'block',\n fill: 'gray-800',\n rotate: {\n placement: {\n top: 0,\n bottom: '180deg',\n left: '-90deg',\n right: '90deg'\n }\n },\n translateX: {\n placement: {\n left: '[-25%]',\n right: '[25%]'\n }\n }\n});\n\nlet InternalTooltipTriggerContext = createContext<Partial<TooltipTriggerProps>>({});\n\n/**\n * Display container for Tooltip content. Has a directional arrow dependent on its placement.\n */\nexport const Tooltip = forwardRef(function Tooltip(props: TooltipProps, ref: DOMRef<HTMLDivElement>) {\n let {children, UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useDOMRef(ref);\n let {\n containerPadding,\n crossOffset,\n offset,\n placement = 'top',\n shouldFlip\n } = useContext(InternalTooltipTriggerContext);\n let colorScheme = useContext(ColorSchemeContext);\n let {locale, direction} = useLocale();\n let [borderRadius, setBorderRadius] = useState(0);\n\n // TODO: should we pass through lang and dir props in RAC?\n let tooltipRef = useCallback((el: HTMLDivElement) => {\n (domRef as MutableRefObject<HTMLDivElement>).current = el;\n if (el) {\n el.lang = locale;\n el.dir = direction;\n let spectrumBorderRadius = typeof window !== 'undefined' ? window.getComputedStyle(el).borderRadius : '';\n if (spectrumBorderRadius !== '') {\n setBorderRadius(parseInt(spectrumBorderRadius, 10));\n }\n }\n }, [locale, direction, domRef]);\n\n return (\n <AriaTooltip\n {...props}\n arrowBoundaryOffset={borderRadius}\n containerPadding={containerPadding}\n crossOffset={crossOffset}\n offset={offset}\n placement={placement}\n shouldFlip={shouldFlip}\n ref={tooltipRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + tooltip({...renderProps, colorScheme})}>\n {renderProps => (\n <>\n <OverlayArrow>\n <svg className={arrowStyles(renderProps)} xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"5\" viewBox=\"0 0 10 5\">\n <path d=\"M4.29289 4.29289L0 0H10L5.70711 4.29289C5.31658 4.68342 4.68342 4.68342 4.29289 4.29289Z\" />\n </svg>\n </OverlayArrow>\n {children}\n </>\n )}\n </AriaTooltip>\n );\n});\n\n/**\n * TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing\n * the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip\n * relative to the trigger.\n */\nexport function TooltipTrigger(props: TooltipTriggerProps): ReactNode {\n let {\n containerPadding,\n crossOffset,\n offset,\n placement,\n shouldFlip,\n ...triggerProps\n } = props;\n\n return (\n <AriaTooltipTrigger {...triggerProps}>\n <InternalTooltipTriggerContext.Provider\n value={{\n containerPadding: containerPadding,\n crossOffset: crossOffset,\n offset: offset,\n placement: placement,\n shouldFlip: shouldFlip\n }}>\n {props.children}\n </InternalTooltipTriggerContext.Provider>\n </AriaTooltipTrigger>\n );\n}\n\n\n// This is purely so that storybook generates the types for both Menu and MenuTrigger\ninterface ICombined extends Omit<TooltipProps, 'placement'>, TooltipTriggerProps {}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function CombinedTooltip(props: ICombined): ReactNode {\n return <div />;\n}\n"],"names":[],"version":3,"file":"Tooltip.mjs.map"}