@react-aria/toast 3.0.0-beta.12 → 3.0.0-beta.14

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 (185) hide show
  1. package/dist/ar-AE.main.js +4 -1
  2. package/dist/ar-AE.main.js.map +1 -1
  3. package/dist/ar-AE.mjs +4 -1
  4. package/dist/ar-AE.module.js +4 -1
  5. package/dist/ar-AE.module.js.map +1 -1
  6. package/dist/bg-BG.main.js +4 -1
  7. package/dist/bg-BG.main.js.map +1 -1
  8. package/dist/bg-BG.mjs +4 -1
  9. package/dist/bg-BG.module.js +4 -1
  10. package/dist/bg-BG.module.js.map +1 -1
  11. package/dist/cs-CZ.main.js +4 -1
  12. package/dist/cs-CZ.main.js.map +1 -1
  13. package/dist/cs-CZ.mjs +4 -1
  14. package/dist/cs-CZ.module.js +4 -1
  15. package/dist/cs-CZ.module.js.map +1 -1
  16. package/dist/da-DK.main.js +4 -1
  17. package/dist/da-DK.main.js.map +1 -1
  18. package/dist/da-DK.mjs +4 -1
  19. package/dist/da-DK.module.js +4 -1
  20. package/dist/da-DK.module.js.map +1 -1
  21. package/dist/de-DE.main.js +4 -1
  22. package/dist/de-DE.main.js.map +1 -1
  23. package/dist/de-DE.mjs +4 -1
  24. package/dist/de-DE.module.js +4 -1
  25. package/dist/de-DE.module.js.map +1 -1
  26. package/dist/el-GR.main.js +4 -1
  27. package/dist/el-GR.main.js.map +1 -1
  28. package/dist/el-GR.mjs +4 -1
  29. package/dist/el-GR.module.js +4 -1
  30. package/dist/el-GR.module.js.map +1 -1
  31. package/dist/en-US.main.js +4 -1
  32. package/dist/en-US.main.js.map +1 -1
  33. package/dist/en-US.mjs +4 -1
  34. package/dist/en-US.module.js +4 -1
  35. package/dist/en-US.module.js.map +1 -1
  36. package/dist/es-ES.main.js +4 -1
  37. package/dist/es-ES.main.js.map +1 -1
  38. package/dist/es-ES.mjs +4 -1
  39. package/dist/es-ES.module.js +4 -1
  40. package/dist/es-ES.module.js.map +1 -1
  41. package/dist/et-EE.main.js +4 -1
  42. package/dist/et-EE.main.js.map +1 -1
  43. package/dist/et-EE.mjs +4 -1
  44. package/dist/et-EE.module.js +4 -1
  45. package/dist/et-EE.module.js.map +1 -1
  46. package/dist/fi-FI.main.js +4 -1
  47. package/dist/fi-FI.main.js.map +1 -1
  48. package/dist/fi-FI.mjs +4 -1
  49. package/dist/fi-FI.module.js +4 -1
  50. package/dist/fi-FI.module.js.map +1 -1
  51. package/dist/fr-FR.main.js +4 -1
  52. package/dist/fr-FR.main.js.map +1 -1
  53. package/dist/fr-FR.mjs +4 -1
  54. package/dist/fr-FR.module.js +4 -1
  55. package/dist/fr-FR.module.js.map +1 -1
  56. package/dist/he-IL.main.js +4 -1
  57. package/dist/he-IL.main.js.map +1 -1
  58. package/dist/he-IL.mjs +4 -1
  59. package/dist/he-IL.module.js +4 -1
  60. package/dist/he-IL.module.js.map +1 -1
  61. package/dist/hr-HR.main.js +4 -1
  62. package/dist/hr-HR.main.js.map +1 -1
  63. package/dist/hr-HR.mjs +4 -1
  64. package/dist/hr-HR.module.js +4 -1
  65. package/dist/hr-HR.module.js.map +1 -1
  66. package/dist/hu-HU.main.js +4 -1
  67. package/dist/hu-HU.main.js.map +1 -1
  68. package/dist/hu-HU.mjs +4 -1
  69. package/dist/hu-HU.module.js +4 -1
  70. package/dist/hu-HU.module.js.map +1 -1
  71. package/dist/it-IT.main.js +4 -1
  72. package/dist/it-IT.main.js.map +1 -1
  73. package/dist/it-IT.mjs +4 -1
  74. package/dist/it-IT.module.js +4 -1
  75. package/dist/it-IT.module.js.map +1 -1
  76. package/dist/ja-JP.main.js +4 -1
  77. package/dist/ja-JP.main.js.map +1 -1
  78. package/dist/ja-JP.mjs +4 -1
  79. package/dist/ja-JP.module.js +4 -1
  80. package/dist/ja-JP.module.js.map +1 -1
  81. package/dist/ko-KR.main.js +4 -1
  82. package/dist/ko-KR.main.js.map +1 -1
  83. package/dist/ko-KR.mjs +4 -1
  84. package/dist/ko-KR.module.js +4 -1
  85. package/dist/ko-KR.module.js.map +1 -1
  86. package/dist/lt-LT.main.js +4 -1
  87. package/dist/lt-LT.main.js.map +1 -1
  88. package/dist/lt-LT.mjs +4 -1
  89. package/dist/lt-LT.module.js +4 -1
  90. package/dist/lt-LT.module.js.map +1 -1
  91. package/dist/lv-LV.main.js +4 -1
  92. package/dist/lv-LV.main.js.map +1 -1
  93. package/dist/lv-LV.mjs +4 -1
  94. package/dist/lv-LV.module.js +4 -1
  95. package/dist/lv-LV.module.js.map +1 -1
  96. package/dist/nb-NO.main.js +4 -1
  97. package/dist/nb-NO.main.js.map +1 -1
  98. package/dist/nb-NO.mjs +4 -1
  99. package/dist/nb-NO.module.js +4 -1
  100. package/dist/nb-NO.module.js.map +1 -1
  101. package/dist/nl-NL.main.js +4 -1
  102. package/dist/nl-NL.main.js.map +1 -1
  103. package/dist/nl-NL.mjs +4 -1
  104. package/dist/nl-NL.module.js +4 -1
  105. package/dist/nl-NL.module.js.map +1 -1
  106. package/dist/pl-PL.main.js +6 -1
  107. package/dist/pl-PL.main.js.map +1 -1
  108. package/dist/pl-PL.mjs +6 -1
  109. package/dist/pl-PL.module.js +6 -1
  110. package/dist/pl-PL.module.js.map +1 -1
  111. package/dist/pt-BR.main.js +4 -1
  112. package/dist/pt-BR.main.js.map +1 -1
  113. package/dist/pt-BR.mjs +4 -1
  114. package/dist/pt-BR.module.js +4 -1
  115. package/dist/pt-BR.module.js.map +1 -1
  116. package/dist/pt-PT.main.js +4 -1
  117. package/dist/pt-PT.main.js.map +1 -1
  118. package/dist/pt-PT.mjs +4 -1
  119. package/dist/pt-PT.module.js +4 -1
  120. package/dist/pt-PT.module.js.map +1 -1
  121. package/dist/ro-RO.main.js +4 -1
  122. package/dist/ro-RO.main.js.map +1 -1
  123. package/dist/ro-RO.mjs +4 -1
  124. package/dist/ro-RO.module.js +4 -1
  125. package/dist/ro-RO.module.js.map +1 -1
  126. package/dist/ru-RU.main.js +4 -1
  127. package/dist/ru-RU.main.js.map +1 -1
  128. package/dist/ru-RU.mjs +4 -1
  129. package/dist/ru-RU.module.js +4 -1
  130. package/dist/ru-RU.module.js.map +1 -1
  131. package/dist/sk-SK.main.js +5 -1
  132. package/dist/sk-SK.main.js.map +1 -1
  133. package/dist/sk-SK.mjs +5 -1
  134. package/dist/sk-SK.module.js +5 -1
  135. package/dist/sk-SK.module.js.map +1 -1
  136. package/dist/sl-SI.main.js +6 -1
  137. package/dist/sl-SI.main.js.map +1 -1
  138. package/dist/sl-SI.mjs +6 -1
  139. package/dist/sl-SI.module.js +6 -1
  140. package/dist/sl-SI.module.js.map +1 -1
  141. package/dist/sr-SP.main.js +4 -1
  142. package/dist/sr-SP.main.js.map +1 -1
  143. package/dist/sr-SP.mjs +4 -1
  144. package/dist/sr-SP.module.js +4 -1
  145. package/dist/sr-SP.module.js.map +1 -1
  146. package/dist/sv-SE.main.js +4 -1
  147. package/dist/sv-SE.main.js.map +1 -1
  148. package/dist/sv-SE.mjs +4 -1
  149. package/dist/sv-SE.module.js +4 -1
  150. package/dist/sv-SE.module.js.map +1 -1
  151. package/dist/tr-TR.main.js +4 -1
  152. package/dist/tr-TR.main.js.map +1 -1
  153. package/dist/tr-TR.mjs +4 -1
  154. package/dist/tr-TR.module.js +4 -1
  155. package/dist/tr-TR.module.js.map +1 -1
  156. package/dist/types.d.ts +6 -5
  157. package/dist/types.d.ts.map +1 -1
  158. package/dist/uk-UA.main.js +4 -1
  159. package/dist/uk-UA.main.js.map +1 -1
  160. package/dist/uk-UA.mjs +4 -1
  161. package/dist/uk-UA.module.js +4 -1
  162. package/dist/uk-UA.module.js.map +1 -1
  163. package/dist/useToast.main.js +14 -22
  164. package/dist/useToast.main.js.map +1 -1
  165. package/dist/useToast.mjs +16 -24
  166. package/dist/useToast.module.js +16 -24
  167. package/dist/useToast.module.js.map +1 -1
  168. package/dist/useToastRegion.main.js +85 -6
  169. package/dist/useToastRegion.main.js.map +1 -1
  170. package/dist/useToastRegion.mjs +86 -7
  171. package/dist/useToastRegion.module.js +86 -7
  172. package/dist/useToastRegion.module.js.map +1 -1
  173. package/dist/zh-CN.main.js +4 -1
  174. package/dist/zh-CN.main.js.map +1 -1
  175. package/dist/zh-CN.mjs +4 -1
  176. package/dist/zh-CN.module.js +4 -1
  177. package/dist/zh-CN.module.js.map +1 -1
  178. package/dist/zh-TW.main.js +4 -1
  179. package/dist/zh-TW.main.js.map +1 -1
  180. package/dist/zh-TW.mjs +4 -1
  181. package/dist/zh-TW.module.js +4 -1
  182. package/dist/zh-TW.module.js.map +1 -1
  183. package/package.json +10 -10
  184. package/src/useToast.ts +24 -30
  185. package/src/useToastRegion.ts +98 -10
@@ -1,6 +1,9 @@
1
1
  module.exports = {
2
2
  "close": `\xcenchide\u{163}i`,
3
- "notifications": `Notific\u{103}ri`
3
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
4
+ one: ()=>`${formatter.number(args.count)} notificare`,
5
+ other: ()=>`${formatter.number(args.count)} notific\u{103}ri`
6
+ })}.`
4
7
  };
5
8
 
6
9
 
@@ -1 +1 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,kBAAS,CAAC;IACtC,iBAAiB,CAAC,gBAAU,CAAC;AAC/B","sources":["packages/@react-aria/toast/intl/ro-RO.json"],"sourcesContent":["{\n \"close\": \"Închideţi\",\n \"notifications\": \"Notificări\"\n}\n"],"names":[],"version":3,"file":"ro-RO.main.js.map"}
1
+ {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,kBAAS,CAAC;IACtC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,WAAW,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,iBAAW,CAAC;QAAA,GAAG,CAAC,CAAC;AAChM","sources":["packages/@react-aria/toast/intl/ro-RO.json"],"sourcesContent":["{\n \"close\": \"Închideţi\",\n \"notifications\": \"{count, plural, one {# notificare} other {# notificări}}.\"\n}\n"],"names":[],"version":3,"file":"ro-RO.main.js.map"}
package/dist/ro-RO.mjs CHANGED
@@ -1,7 +1,10 @@
1
1
  var $e33d3b3868478b04$exports = {};
2
2
  $e33d3b3868478b04$exports = {
3
3
  "close": `\xcenchide\u{163}i`,
4
- "notifications": `Notific\u{103}ri`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} notificare`,
6
+ other: ()=>`${formatter.number(args.count)} notific\u{103}ri`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1,7 +1,10 @@
1
1
  var $e33d3b3868478b04$exports = {};
2
2
  $e33d3b3868478b04$exports = {
3
3
  "close": `\xcenchide\u{163}i`,
4
- "notifications": `Notific\u{103}ri`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} notificare`,
6
+ other: ()=>`${formatter.number(args.count)} notific\u{103}ri`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1 +1 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,kBAAS,CAAC;IACtC,iBAAiB,CAAC,gBAAU,CAAC;AAC/B","sources":["packages/@react-aria/toast/intl/ro-RO.json"],"sourcesContent":["{\n \"close\": \"Închideţi\",\n \"notifications\": \"Notificări\"\n}\n"],"names":[],"version":3,"file":"ro-RO.module.js.map"}
1
+ {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,kBAAS,CAAC;IACtC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,WAAW,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,iBAAW,CAAC;QAAA,GAAG,CAAC,CAAC;AAChM","sources":["packages/@react-aria/toast/intl/ro-RO.json"],"sourcesContent":["{\n \"close\": \"Închideţi\",\n \"notifications\": \"{count, plural, one {# notificare} other {# notificări}}.\"\n}\n"],"names":[],"version":3,"file":"ro-RO.module.js.map"}
@@ -1,6 +1,9 @@
1
1
  module.exports = {
2
2
  "close": `\u{417}\u{430}\u{43A}\u{440}\u{44B}\u{442}\u{44C}`,
3
- "notifications": `\u{423}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{44F}`
3
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
4
+ one: ()=>`${formatter.number(args.count)} \u{443}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{435}`,
5
+ other: ()=>`${formatter.number(args.count)} \u{443}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{44F}`
6
+ })}.`
4
7
  };
5
8
 
6
9
 
@@ -1 +1 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,iDAAO,CAAC;IACpC,iBAAiB,CAAC,6EAAW,CAAC;AAChC","sources":["packages/@react-aria/toast/intl/ru-RU.json"],"sourcesContent":["{\n \"close\": \"Закрыть\",\n \"notifications\": \"Уведомления\"\n}\n"],"names":[],"version":3,"file":"ru-RU.main.js.map"}
1
+ {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,iDAAO,CAAC;IACpC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,8EAAY,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,8EAAY,CAAC;QAAA,GAAG,CAAC,CAAC;AAClM","sources":["packages/@react-aria/toast/intl/ru-RU.json"],"sourcesContent":["{\n \"close\": \"Закрыть\",\n \"notifications\": \"{count, plural, one {# уведомление} other {# уведомления}}.\"\n}\n"],"names":[],"version":3,"file":"ru-RU.main.js.map"}
package/dist/ru-RU.mjs CHANGED
@@ -1,7 +1,10 @@
1
1
  var $9a7dcb914b29cd9f$exports = {};
2
2
  $9a7dcb914b29cd9f$exports = {
3
3
  "close": `\u{417}\u{430}\u{43A}\u{440}\u{44B}\u{442}\u{44C}`,
4
- "notifications": `\u{423}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{44F}`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} \u{443}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{435}`,
6
+ other: ()=>`${formatter.number(args.count)} \u{443}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{44F}`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1,7 +1,10 @@
1
1
  var $9a7dcb914b29cd9f$exports = {};
2
2
  $9a7dcb914b29cd9f$exports = {
3
3
  "close": `\u{417}\u{430}\u{43A}\u{440}\u{44B}\u{442}\u{44C}`,
4
- "notifications": `\u{423}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{44F}`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} \u{443}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{435}`,
6
+ other: ()=>`${formatter.number(args.count)} \u{443}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{44F}`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1 +1 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,iDAAO,CAAC;IACpC,iBAAiB,CAAC,6EAAW,CAAC;AAChC","sources":["packages/@react-aria/toast/intl/ru-RU.json"],"sourcesContent":["{\n \"close\": \"Закрыть\",\n \"notifications\": \"Уведомления\"\n}\n"],"names":[],"version":3,"file":"ru-RU.module.js.map"}
1
+ {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,iDAAO,CAAC;IACpC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,8EAAY,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,8EAAY,CAAC;QAAA,GAAG,CAAC,CAAC;AAClM","sources":["packages/@react-aria/toast/intl/ru-RU.json"],"sourcesContent":["{\n \"close\": \"Закрыть\",\n \"notifications\": \"{count, plural, one {# уведомление} other {# уведомления}}.\"\n}\n"],"names":[],"version":3,"file":"ru-RU.module.js.map"}
@@ -1,6 +1,10 @@
1
1
  module.exports = {
2
2
  "close": `Zatvori\u{165}`,
3
- "notifications": `Ozn\xe1menia`
3
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
4
+ one: ()=>`${formatter.number(args.count)} ozn\xe1menie`,
5
+ few: ()=>`${formatter.number(args.count)} ozn\xe1menia`,
6
+ other: ()=>`${formatter.number(args.count)} ozn\xe1men\xed`
7
+ })}.`
4
8
  };
5
9
 
6
10
 
@@ -1 +1 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,cAAQ,CAAC;IACrC,iBAAiB,CAAC,YAAS,CAAC;AAC9B","sources":["packages/@react-aria/toast/intl/sk-SK.json"],"sourcesContent":["{\n \"close\": \"Zatvoriť\",\n \"notifications\": \"Oznámenia\"\n}\n"],"names":[],"version":3,"file":"sk-SK.main.js.map"}
1
+ {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,cAAQ,CAAC;IACrC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,aAAU,CAAC;YAAE,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,aAAU,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,eAAS,CAAC;QAAA,GAAG,CAAC,CAAC;AACrP","sources":["packages/@react-aria/toast/intl/sk-SK.json"],"sourcesContent":["{\n \"close\": \"Zatvoriť\",\n \"notifications\": \"{count, plural, one {# oznámenie} few {# oznámenia} other {# oznámení}}.\"\n}\n"],"names":[],"version":3,"file":"sk-SK.main.js.map"}
package/dist/sk-SK.mjs CHANGED
@@ -1,7 +1,11 @@
1
1
  var $e43d964a0c7f1266$exports = {};
2
2
  $e43d964a0c7f1266$exports = {
3
3
  "close": `Zatvori\u{165}`,
4
- "notifications": `Ozn\xe1menia`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} ozn\xe1menie`,
6
+ few: ()=>`${formatter.number(args.count)} ozn\xe1menia`,
7
+ other: ()=>`${formatter.number(args.count)} ozn\xe1men\xed`
8
+ })}.`
5
9
  };
6
10
 
7
11
 
@@ -1,7 +1,11 @@
1
1
  var $e43d964a0c7f1266$exports = {};
2
2
  $e43d964a0c7f1266$exports = {
3
3
  "close": `Zatvori\u{165}`,
4
- "notifications": `Ozn\xe1menia`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} ozn\xe1menie`,
6
+ few: ()=>`${formatter.number(args.count)} ozn\xe1menia`,
7
+ other: ()=>`${formatter.number(args.count)} ozn\xe1men\xed`
8
+ })}.`
5
9
  };
6
10
 
7
11
 
@@ -1 +1 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,cAAQ,CAAC;IACrC,iBAAiB,CAAC,YAAS,CAAC;AAC9B","sources":["packages/@react-aria/toast/intl/sk-SK.json"],"sourcesContent":["{\n \"close\": \"Zatvoriť\",\n \"notifications\": \"Oznámenia\"\n}\n"],"names":[],"version":3,"file":"sk-SK.module.js.map"}
1
+ {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,cAAQ,CAAC;IACrC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,aAAU,CAAC;YAAE,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,aAAU,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,eAAS,CAAC;QAAA,GAAG,CAAC,CAAC;AACrP","sources":["packages/@react-aria/toast/intl/sk-SK.json"],"sourcesContent":["{\n \"close\": \"Zatvoriť\",\n \"notifications\": \"{count, plural, one {# oznámenie} few {# oznámenia} other {# oznámení}}.\"\n}\n"],"names":[],"version":3,"file":"sk-SK.module.js.map"}
@@ -1,6 +1,11 @@
1
1
  module.exports = {
2
2
  "close": `Zapri`,
3
- "notifications": `Obvestila`
3
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
4
+ one: ()=>`${formatter.number(args.count)} obvestilo`,
5
+ two: ()=>`${formatter.number(args.count)} obvestili`,
6
+ few: ()=>`${formatter.number(args.count)} obvestila`,
7
+ other: ()=>`${formatter.number(args.count)} obvestil`
8
+ })}.`
4
9
  };
5
10
 
6
11
 
@@ -1 +1 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,SAAS,CAAC;AAC9B","sources":["packages/@react-aria/toast/intl/sl-SI.json"],"sourcesContent":["{\n \"close\": \"Zapri\",\n \"notifications\": \"Obvestila\"\n}\n"],"names":[],"version":3,"file":"sl-SI.main.js.map"}
1
+ {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,UAAU,CAAC;YAAE,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,UAAU,CAAC;YAAE,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,UAAU,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,SAAS,CAAC;QAAA,GAAG,CAAC,CAAC;AAC7S","sources":["packages/@react-aria/toast/intl/sl-SI.json"],"sourcesContent":["{\n \"close\": \"Zapri\",\n \"notifications\": \"{count, plural, one {# obvestilo} two {# obvestili} few {# obvestila} other {# obvestil}}.\"\n}\n"],"names":[],"version":3,"file":"sl-SI.main.js.map"}
package/dist/sl-SI.mjs CHANGED
@@ -1,7 +1,12 @@
1
1
  var $0bc56cee3275bcaa$exports = {};
2
2
  $0bc56cee3275bcaa$exports = {
3
3
  "close": `Zapri`,
4
- "notifications": `Obvestila`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} obvestilo`,
6
+ two: ()=>`${formatter.number(args.count)} obvestili`,
7
+ few: ()=>`${formatter.number(args.count)} obvestila`,
8
+ other: ()=>`${formatter.number(args.count)} obvestil`
9
+ })}.`
5
10
  };
6
11
 
7
12
 
@@ -1,7 +1,12 @@
1
1
  var $0bc56cee3275bcaa$exports = {};
2
2
  $0bc56cee3275bcaa$exports = {
3
3
  "close": `Zapri`,
4
- "notifications": `Obvestila`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} obvestilo`,
6
+ two: ()=>`${formatter.number(args.count)} obvestili`,
7
+ few: ()=>`${formatter.number(args.count)} obvestila`,
8
+ other: ()=>`${formatter.number(args.count)} obvestil`
9
+ })}.`
5
10
  };
6
11
 
7
12
 
@@ -1 +1 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,SAAS,CAAC;AAC9B","sources":["packages/@react-aria/toast/intl/sl-SI.json"],"sourcesContent":["{\n \"close\": \"Zapri\",\n \"notifications\": \"Obvestila\"\n}\n"],"names":[],"version":3,"file":"sl-SI.module.js.map"}
1
+ {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,UAAU,CAAC;YAAE,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,UAAU,CAAC;YAAE,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,UAAU,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,SAAS,CAAC;QAAA,GAAG,CAAC,CAAC;AAC7S","sources":["packages/@react-aria/toast/intl/sl-SI.json"],"sourcesContent":["{\n \"close\": \"Zapri\",\n \"notifications\": \"{count, plural, one {# obvestilo} two {# obvestili} few {# obvestila} other {# obvestil}}.\"\n}\n"],"names":[],"version":3,"file":"sl-SI.module.js.map"}
@@ -1,6 +1,9 @@
1
1
  module.exports = {
2
2
  "close": `Zatvori`,
3
- "notifications": `Obave\u{161}tenja`
3
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
4
+ one: ()=>`${formatter.number(args.count)} obave\u{161}tenje`,
5
+ other: ()=>`${formatter.number(args.count)} obave\u{161}tenja`
6
+ })}.`
4
7
  };
5
8
 
6
9
 
@@ -1 +1 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,OAAO,CAAC;IACpC,iBAAiB,CAAC,iBAAW,CAAC;AAChC","sources":["packages/@react-aria/toast/intl/sr-SP.json"],"sourcesContent":["{\n \"close\": \"Zatvori\",\n \"notifications\": \"Obaveštenja\"\n}\n"],"names":[],"version":3,"file":"sr-SP.main.js.map"}
1
+ {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,OAAO,CAAC;IACpC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,kBAAY,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,kBAAY,CAAC;QAAA,GAAG,CAAC,CAAC;AAClM","sources":["packages/@react-aria/toast/intl/sr-SP.json"],"sourcesContent":["{\n \"close\": \"Zatvori\",\n \"notifications\": \"{count, plural, one {# obaveštenje} other {# obaveštenja}}.\"\n}\n"],"names":[],"version":3,"file":"sr-SP.main.js.map"}
package/dist/sr-SP.mjs CHANGED
@@ -1,7 +1,10 @@
1
1
  var $7dbdd7289c10d2ba$exports = {};
2
2
  $7dbdd7289c10d2ba$exports = {
3
3
  "close": `Zatvori`,
4
- "notifications": `Obave\u{161}tenja`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} obave\u{161}tenje`,
6
+ other: ()=>`${formatter.number(args.count)} obave\u{161}tenja`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1,7 +1,10 @@
1
1
  var $7dbdd7289c10d2ba$exports = {};
2
2
  $7dbdd7289c10d2ba$exports = {
3
3
  "close": `Zatvori`,
4
- "notifications": `Obave\u{161}tenja`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} obave\u{161}tenje`,
6
+ other: ()=>`${formatter.number(args.count)} obave\u{161}tenja`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1 +1 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,OAAO,CAAC;IACpC,iBAAiB,CAAC,iBAAW,CAAC;AAChC","sources":["packages/@react-aria/toast/intl/sr-SP.json"],"sourcesContent":["{\n \"close\": \"Zatvori\",\n \"notifications\": \"Obaveštenja\"\n}\n"],"names":[],"version":3,"file":"sr-SP.module.js.map"}
1
+ {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,OAAO,CAAC;IACpC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,kBAAY,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,kBAAY,CAAC;QAAA,GAAG,CAAC,CAAC;AAClM","sources":["packages/@react-aria/toast/intl/sr-SP.json"],"sourcesContent":["{\n \"close\": \"Zatvori\",\n \"notifications\": \"{count, plural, one {# obaveštenje} other {# obaveštenja}}.\"\n}\n"],"names":[],"version":3,"file":"sr-SP.module.js.map"}
@@ -1,6 +1,9 @@
1
1
  module.exports = {
2
2
  "close": `St\xe4ng`,
3
- "notifications": `Aviseringar`
3
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
4
+ one: ()=>`${formatter.number(args.count)} meddelande`,
5
+ other: ()=>`${formatter.number(args.count)} meddelanden`
6
+ })}.`
4
7
  };
5
8
 
6
9
 
@@ -1 +1 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,QAAK,CAAC;IAClC,iBAAiB,CAAC,WAAW,CAAC;AAChC","sources":["packages/@react-aria/toast/intl/sv-SE.json"],"sourcesContent":["{\n \"close\": \"Stäng\",\n \"notifications\": \"Aviseringar\"\n}\n"],"names":[],"version":3,"file":"sv-SE.main.js.map"}
1
+ {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,QAAK,CAAC;IAClC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,WAAW,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,YAAY,CAAC;QAAA,GAAG,CAAC,CAAC;AACjM","sources":["packages/@react-aria/toast/intl/sv-SE.json"],"sourcesContent":["{\n \"close\": \"Stäng\",\n \"notifications\": \"{count, plural, one {# meddelande} other {# meddelanden}}.\"\n}\n"],"names":[],"version":3,"file":"sv-SE.main.js.map"}
package/dist/sv-SE.mjs CHANGED
@@ -1,7 +1,10 @@
1
1
  var $ccbe6066c10b1e53$exports = {};
2
2
  $ccbe6066c10b1e53$exports = {
3
3
  "close": `St\xe4ng`,
4
- "notifications": `Aviseringar`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} meddelande`,
6
+ other: ()=>`${formatter.number(args.count)} meddelanden`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1,7 +1,10 @@
1
1
  var $ccbe6066c10b1e53$exports = {};
2
2
  $ccbe6066c10b1e53$exports = {
3
3
  "close": `St\xe4ng`,
4
- "notifications": `Aviseringar`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} meddelande`,
6
+ other: ()=>`${formatter.number(args.count)} meddelanden`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1 +1 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,QAAK,CAAC;IAClC,iBAAiB,CAAC,WAAW,CAAC;AAChC","sources":["packages/@react-aria/toast/intl/sv-SE.json"],"sourcesContent":["{\n \"close\": \"Stäng\",\n \"notifications\": \"Aviseringar\"\n}\n"],"names":[],"version":3,"file":"sv-SE.module.js.map"}
1
+ {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,QAAK,CAAC;IAClC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,WAAW,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,YAAY,CAAC;QAAA,GAAG,CAAC,CAAC;AACjM","sources":["packages/@react-aria/toast/intl/sv-SE.json"],"sourcesContent":["{\n \"close\": \"Stäng\",\n \"notifications\": \"{count, plural, one {# meddelande} other {# meddelanden}}.\"\n}\n"],"names":[],"version":3,"file":"sv-SE.module.js.map"}
@@ -1,6 +1,9 @@
1
1
  module.exports = {
2
2
  "close": `Kapat`,
3
- "notifications": `Bildirimler`
3
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
4
+ one: ()=>`${formatter.number(args.count)} bildirim`,
5
+ other: ()=>`${formatter.number(args.count)} bildirim`
6
+ })}.`
4
7
  };
5
8
 
6
9
 
@@ -1 +1 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,WAAW,CAAC;AAChC","sources":["packages/@react-aria/toast/intl/tr-TR.json"],"sourcesContent":["{\n \"close\": \"Kapat\",\n \"notifications\": \"Bildirimler\"\n}\n"],"names":[],"version":3,"file":"tr-TR.main.js.map"}
1
+ {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,SAAS,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,SAAS,CAAC;QAAA,GAAG,CAAC,CAAC;AAC5L","sources":["packages/@react-aria/toast/intl/tr-TR.json"],"sourcesContent":["{\n \"close\": \"Kapat\",\n \"notifications\": \"{count, plural, one {# bildirim} other {# bildirim}}.\"\n}\n"],"names":[],"version":3,"file":"tr-TR.main.js.map"}
package/dist/tr-TR.mjs CHANGED
@@ -1,7 +1,10 @@
1
1
  var $9d503476b9d858b7$exports = {};
2
2
  $9d503476b9d858b7$exports = {
3
3
  "close": `Kapat`,
4
- "notifications": `Bildirimler`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} bildirim`,
6
+ other: ()=>`${formatter.number(args.count)} bildirim`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1,7 +1,10 @@
1
1
  var $9d503476b9d858b7$exports = {};
2
2
  $9d503476b9d858b7$exports = {
3
3
  "close": `Kapat`,
4
- "notifications": `Bildirimler`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} bildirim`,
6
+ other: ()=>`${formatter.number(args.count)} bildirim`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1 +1 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,WAAW,CAAC;AAChC","sources":["packages/@react-aria/toast/intl/tr-TR.json"],"sourcesContent":["{\n \"close\": \"Kapat\",\n \"notifications\": \"Bildirimler\"\n}\n"],"names":[],"version":3,"file":"tr-TR.module.js.map"}
1
+ {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,SAAS,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,SAAS,CAAC;QAAA,GAAG,CAAC,CAAC;AAC5L","sources":["packages/@react-aria/toast/intl/tr-TR.json"],"sourcesContent":["{\n \"close\": \"Kapat\",\n \"notifications\": \"{count, plural, one {# bildirim} other {# bildirim}}.\"\n}\n"],"names":[],"version":3,"file":"tr-TR.module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,14 +1,15 @@
1
1
  import { AriaButtonProps } from "@react-types/button";
2
- import { AriaLabelingProps, DOMAttributes, FocusableElement } from "@react-types/shared";
2
+ import { AriaLabelingProps, DOMAttributes, FocusableElement, RefObject } from "@react-types/shared";
3
3
  import { QueuedToast, ToastState } from "@react-stately/toast";
4
- import { RefObject } from "react";
5
4
  export interface AriaToastProps<T> extends AriaLabelingProps {
6
5
  /** The toast object. */
7
6
  toast: QueuedToast<T>;
8
7
  }
9
8
  export interface ToastAria {
10
- /** Props for the toast container element. */
9
+ /** Props for the toast container, non-modal dialog element. */
11
10
  toastProps: DOMAttributes;
11
+ /** Props for the toast content alert message. */
12
+ contentProps: DOMAttributes;
12
13
  /** Props for the toast title element. */
13
14
  titleProps: DOMAttributes;
14
15
  /** Props for the toast description element, if any. */
@@ -20,7 +21,7 @@ export interface ToastAria {
20
21
  * Provides the behavior and accessibility implementation for a toast component.
21
22
  * Toasts display brief, temporary notifications of actions, errors, or other events in an application.
22
23
  */
23
- export function useToast<T>(props: AriaToastProps<T>, state: ToastState<T>, ref: RefObject<FocusableElement>): ToastAria;
24
+ export function useToast<T>(props: AriaToastProps<T>, state: ToastState<T>, ref: RefObject<FocusableElement | null>): ToastAria;
24
25
  export interface AriaToastRegionProps extends AriaLabelingProps {
25
26
  /**
26
27
  * An accessibility label for the toast region.
@@ -36,6 +37,6 @@ export interface ToastRegionAria {
36
37
  * Provides the behavior and accessibility implementation for a toast region containing one or more toasts.
37
38
  * Toasts display brief, temporary notifications of actions, errors, or other events in an application.
38
39
  */
39
- export function useToastRegion<T>(props: AriaToastRegionProps, state: ToastState<T>, ref: RefObject<HTMLElement>): ToastRegionAria;
40
+ export function useToastRegion<T>(props: AriaToastRegionProps, state: ToastState<T>, ref: RefObject<HTMLElement | null>): ToastRegionAria;
40
41
 
41
42
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";;;;AAqBA,gCAAgC,CAAC,CAAE,SAAQ,iBAAiB;IAC1D,wBAAwB;IACxB,KAAK,EAAE,YAAY,CAAC,CAAC,CAAA;CACtB;AAED;IACE,6CAA6C;IAC7C,UAAU,EAAE,aAAa,CAAC;IAC1B,yCAAyC;IACzC,UAAU,EAAE,aAAa,CAAC;IAC1B,uDAAuD;IACvD,gBAAgB,EAAE,aAAa,CAAC;IAChC,wCAAwC;IACxC,gBAAgB,EAAE,eAAe,CAAA;CAClC;AAED;;;GAGG;AACH,yBAAyB,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,CAAC,GAAG,SAAS,CAqEvH;ACpGD,qCAAsC,SAAQ,iBAAiB;IAC7D;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;IACE,6CAA6C;IAC7C,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED;;;GAGG;AACH,+BAA+B,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,WAAW,CAAC,GAAG,eAAe,CAmDjI","sources":["packages/@react-aria/toast/src/packages/@react-aria/toast/src/useToast.ts","packages/@react-aria/toast/src/packages/@react-aria/toast/src/useToastRegion.ts","packages/@react-aria/toast/src/packages/@react-aria/toast/src/index.ts","packages/@react-aria/toast/src/index.ts"],"sourcesContent":[null,null,null,"/*\n * Copyright 2020 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 */\nexport {useToast} from './useToast';\nexport {useToastRegion} from './useToastRegion';\n\nexport type {AriaToastRegionProps, ToastRegionAria} from './useToastRegion';\nexport type {AriaToastProps, ToastAria} from './useToast';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AAqBA,gCAAgC,CAAC,CAAE,SAAQ,iBAAiB;IAC1D,wBAAwB;IACxB,KAAK,EAAE,YAAY,CAAC,CAAC,CAAA;CACtB;AAED;IACE,+DAA+D;IAC/D,UAAU,EAAE,aAAa,CAAC;IAC1B,iDAAiD;IACjD,YAAY,EAAE,aAAa,CAAC;IAC5B,yCAAyC;IACzC,UAAU,EAAE,aAAa,CAAC;IAC1B,uDAAuD;IACvD,gBAAgB,EAAE,aAAa,CAAC;IAChC,wCAAwC;IACxC,gBAAgB,EAAE,eAAe,CAAA;CAClC;AAED;;;GAGG;AAEH,yBAAyB,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAG,SAAS,CA4D9H;AC9FD,qCAAsC,SAAQ,iBAAiB;IAC7D;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;IACE,6CAA6C;IAC7C,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED;;;GAGG;AACH,+BAA+B,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,WAAW,GAAG,IAAI,CAAC,GAAG,eAAe,CA2IxI","sources":["packages/@react-aria/toast/src/packages/@react-aria/toast/src/useToast.ts","packages/@react-aria/toast/src/packages/@react-aria/toast/src/useToastRegion.ts","packages/@react-aria/toast/src/packages/@react-aria/toast/src/index.ts","packages/@react-aria/toast/src/index.ts"],"sourcesContent":[null,null,null,"/*\n * Copyright 2020 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 */\nexport {useToast} from './useToast';\nexport {useToastRegion} from './useToastRegion';\n\nexport type {AriaToastRegionProps, ToastRegionAria} from './useToastRegion';\nexport type {AriaToastProps, ToastAria} from './useToast';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -1,6 +1,9 @@
1
1
  module.exports = {
2
2
  "close": `\u{417}\u{430}\u{43A}\u{440}\u{438}\u{442}\u{438}`,
3
- "notifications": `\u{421}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`
3
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
4
+ one: ()=>`${formatter.number(args.count)} \u{441}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`,
5
+ other: ()=>`${formatter.number(args.count)} \u{441}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`
6
+ })}.`
4
7
  };
5
8
 
6
9
 
@@ -1 +1 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,iDAAO,CAAC;IACpC,iBAAiB,CAAC,sEAAU,CAAC;AAC/B","sources":["packages/@react-aria/toast/intl/uk-UA.json"],"sourcesContent":["{\n \"close\": \"Закрити\",\n \"notifications\": \"Сповіщення\"\n}\n"],"names":[],"version":3,"file":"uk-UA.main.js.map"}
1
+ {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,iDAAO,CAAC;IACpC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,uEAAW,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,uEAAW,CAAC;QAAA,GAAG,CAAC,CAAC;AAChM","sources":["packages/@react-aria/toast/intl/uk-UA.json"],"sourcesContent":["{\n \"close\": \"Закрити\",\n \"notifications\": \"{count, plural, one {# сповіщення} other {# сповіщення}}.\"\n}\n"],"names":[],"version":3,"file":"uk-UA.main.js.map"}
package/dist/uk-UA.mjs CHANGED
@@ -1,7 +1,10 @@
1
1
  var $32ee419c7b9b7a83$exports = {};
2
2
  $32ee419c7b9b7a83$exports = {
3
3
  "close": `\u{417}\u{430}\u{43A}\u{440}\u{438}\u{442}\u{438}`,
4
- "notifications": `\u{421}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} \u{441}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`,
6
+ other: ()=>`${formatter.number(args.count)} \u{441}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1,7 +1,10 @@
1
1
  var $32ee419c7b9b7a83$exports = {};
2
2
  $32ee419c7b9b7a83$exports = {
3
3
  "close": `\u{417}\u{430}\u{43A}\u{440}\u{438}\u{442}\u{438}`,
4
- "notifications": `\u{421}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`
4
+ "notifications": (args, formatter)=>`${formatter.plural(args.count, {
5
+ one: ()=>`${formatter.number(args.count)} \u{441}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`,
6
+ other: ()=>`${formatter.number(args.count)} \u{441}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`
7
+ })}.`
5
8
  };
6
9
 
7
10
 
@@ -1 +1 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,iDAAO,CAAC;IACpC,iBAAiB,CAAC,sEAAU,CAAC;AAC/B","sources":["packages/@react-aria/toast/intl/uk-UA.json"],"sourcesContent":["{\n \"close\": \"Закрити\",\n \"notifications\": \"Сповіщення\"\n}\n"],"names":[],"version":3,"file":"uk-UA.module.js.map"}
1
+ {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,iDAAO,CAAC;IACpC,iBAAiB,CAAC,MAAM,YAAc,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,KAAK,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,uEAAW,CAAC;YAAE,OAAO,IAAM,CAAC,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,uEAAW,CAAC;QAAA,GAAG,CAAC,CAAC;AAChM","sources":["packages/@react-aria/toast/intl/uk-UA.json"],"sourcesContent":["{\n \"close\": \"Закрити\",\n \"notifications\": \"{count, plural, one {# сповіщення} other {# сповіщення}}.\"\n}\n"],"names":[],"version":3,"file":"uk-UA.module.js.map"}
@@ -39,41 +39,33 @@ function $ec537504faac71d2$export$a407b657d3044108(props, state, ref) {
39
39
  timer,
40
40
  timeout
41
41
  ]);
42
- // Restore focus to the toast container on unmount.
43
- // If there are no more toasts, the container will be unmounted
44
- // and will restore focus to wherever focus was before the user
45
- // focused the toast region.
46
- let focusOnUnmount = (0, $ijFUR$react.useRef)(null);
47
- (0, $ijFUR$reactariautils.useLayoutEffect)(()=>{
48
- let container = ref.current.closest('[role=region]');
49
- return ()=>{
50
- if (container && container.contains(document.activeElement)) // Focus must be delayed for focus ring to appear, but we can't wait
51
- // until useEffect cleanup to check if focus was inside the container.
52
- focusOnUnmount.current = container;
53
- };
54
- }, [
55
- ref
56
- ]);
57
- // eslint-disable-next-line
42
+ let [isEntered, setIsEntered] = (0, ($parcel$interopDefault($ijFUR$react))).useState(false);
58
43
  (0, $ijFUR$react.useEffect)(()=>{
59
- return ()=>{
60
- if (focusOnUnmount.current) focusOnUnmount.current.focus();
61
- };
44
+ if (animation === 'entering' || animation === 'queued') setIsEntered(true);
62
45
  }, [
63
- ref
46
+ animation
64
47
  ]);
65
48
  let titleId = (0, $ijFUR$reactariautils.useId)();
66
49
  let descriptionId = (0, $ijFUR$reactariautils.useSlotId)();
67
50
  let stringFormatter = (0, $ijFUR$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($f49b2d6c91681304$exports))), '@react-aria/toast');
68
51
  return {
69
52
  toastProps: {
70
- role: 'alert',
53
+ role: 'alertdialog',
54
+ 'aria-modal': 'false',
71
55
  'aria-label': props['aria-label'],
72
56
  'aria-labelledby': props['aria-labelledby'] || titleId,
73
57
  'aria-describedby': props['aria-describedby'] || descriptionId,
74
58
  'aria-details': props['aria-details'],
75
59
  // Hide toasts that are animating out so VoiceOver doesn't announce them.
76
- 'aria-hidden': animation === 'exiting' ? 'true' : undefined
60
+ 'aria-hidden': animation === 'exiting' ? 'true' : undefined,
61
+ tabIndex: 0
62
+ },
63
+ contentProps: {
64
+ role: 'alert',
65
+ 'aria-atomic': 'true',
66
+ style: {
67
+ visibility: isEntered || animation === null ? 'visible' : 'hidden'
68
+ }
77
69
  },
78
70
  titleProps: {
79
71
  id: titleId
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AA+BM,SAAS,0CAAY,KAAwB,EAAE,KAAoB,EAAE,GAAgC;IAC1G,IAAI,OACF,GAAG,SACH,KAAK,WACL,OAAO,aACP,SAAS,EACV,GAAG,MAAM,KAAK;IAEf,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,CAAC,OACH;QAGF,MAAM,KAAK,CAAC;QACZ,OAAO;YACL,MAAM,KAAK;QACb;IACF,GAAG;QAAC;QAAO;KAAQ;IAEnB,mDAAmD;IACnD,+DAA+D;IAC/D,+DAA+D;IAC/D,4BAA4B;IAC5B,IAAI,iBAAiB,CAAA,GAAA,mBAAK,EAAE;IAC5B,CAAA,GAAA,qCAAc,EAAE;QACd,IAAI,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;QACpC,OAAO;YACL,IAAI,aAAa,UAAU,QAAQ,CAAC,SAAS,aAAa,GACxD,oEAAoE;YACpE,sEAAsE;YACtE,eAAe,OAAO,GAAG;QAE7B;IACF,GAAG;QAAC;KAAI;IAER,2BAA2B;IAC3B,CAAA,GAAA,sBAAQ,EAAE;QACR,OAAO;YACL,IAAI,eAAe,OAAO,EACxB,eAAe,OAAO,CAAC,KAAK;QAEhC;IACF,GAAG;QAAC;KAAI;IAER,IAAI,UAAU,CAAA,GAAA,2BAAI;IAClB,IAAI,gBAAgB,CAAA,GAAA,+BAAQ;IAC5B,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,OAAO;QACL,YAAY;YACV,MAAM;YACN,cAAc,KAAK,CAAC,aAAa;YACjC,mBAAmB,KAAK,CAAC,kBAAkB,IAAI;YAC/C,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;YACjD,gBAAgB,KAAK,CAAC,eAAe;YACrC,yEAAyE;YACzE,eAAe,cAAc,YAAY,SAAS;QACpD;QACA,YAAY;YACV,IAAI;QACN;QACA,kBAAkB;YAChB,IAAI;QACN;QACA,kBAAkB;YAChB,cAAc,gBAAgB,MAAM,CAAC;YACrC,SAAS,IAAM,MAAM,KAAK,CAAC;QAC7B;IACF;AACF","sources":["packages/@react-aria/toast/src/useToast.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaButtonProps} from '@react-types/button';\nimport {AriaLabelingProps, DOMAttributes, FocusableElement} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {QueuedToast, ToastState} from '@react-stately/toast';\nimport {RefObject, useEffect, useRef} from 'react';\nimport {useId, useLayoutEffect, useSlotId} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AriaToastProps<T> extends AriaLabelingProps {\n /** The toast object. */\n toast: QueuedToast<T>\n}\n\nexport interface ToastAria {\n /** Props for the toast container element. */\n toastProps: DOMAttributes,\n /** Props for the toast title element. */\n titleProps: DOMAttributes,\n /** Props for the toast description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the toast close button. */\n closeButtonProps: AriaButtonProps\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toast component.\n * Toasts display brief, temporary notifications of actions, errors, or other events in an application.\n */\nexport function useToast<T>(props: AriaToastProps<T>, state: ToastState<T>, ref: RefObject<FocusableElement>): ToastAria {\n let {\n key,\n timer,\n timeout,\n animation\n } = props.toast;\n\n useEffect(() => {\n if (!timer) {\n return;\n }\n\n timer.reset(timeout);\n return () => {\n timer.pause();\n };\n }, [timer, timeout]);\n\n // Restore focus to the toast container on unmount.\n // If there are no more toasts, the container will be unmounted\n // and will restore focus to wherever focus was before the user\n // focused the toast region.\n let focusOnUnmount = useRef(null);\n useLayoutEffect(() => {\n let container = ref.current.closest('[role=region]') as HTMLElement;\n return () => {\n if (container && container.contains(document.activeElement)) {\n // Focus must be delayed for focus ring to appear, but we can't wait\n // until useEffect cleanup to check if focus was inside the container.\n focusOnUnmount.current = container;\n }\n };\n }, [ref]);\n\n // eslint-disable-next-line\n useEffect(() => {\n return () => {\n if (focusOnUnmount.current) {\n focusOnUnmount.current.focus();\n }\n };\n }, [ref]);\n\n let titleId = useId();\n let descriptionId = useSlotId();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/toast');\n\n return {\n toastProps: {\n role: 'alert',\n 'aria-label': props['aria-label'],\n 'aria-labelledby': props['aria-labelledby'] || titleId,\n 'aria-describedby': props['aria-describedby'] || descriptionId,\n 'aria-details': props['aria-details'],\n // Hide toasts that are animating out so VoiceOver doesn't announce them.\n 'aria-hidden': animation === 'exiting' ? 'true' : undefined\n },\n titleProps: {\n id: titleId\n },\n descriptionProps: {\n id: descriptionId\n },\n closeButtonProps: {\n 'aria-label': stringFormatter.format('close'),\n onPress: () => state.close(key)\n }\n };\n}\n"],"names":[],"version":3,"file":"useToast.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAkCM,SAAS,0CAAY,KAAwB,EAAE,KAAoB,EAAE,GAAuC;IACjH,IAAI,OACF,GAAG,SACH,KAAK,WACL,OAAO,aACP,SAAS,EACV,GAAG,MAAM,KAAK;IAEf,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,CAAC,OACH;QAGF,MAAM,KAAK,CAAC;QACZ,OAAO;YACL,MAAM,KAAK;QACb;IACF,GAAG;QAAC;QAAO;KAAQ;IAEnB,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC;IAC/C,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,cAAc,cAAc,cAAc,UAC5C,aAAa;IAEjB,GAAG;QAAC;KAAU;IAEd,IAAI,UAAU,CAAA,GAAA,2BAAI;IAClB,IAAI,gBAAgB,CAAA,GAAA,+BAAQ;IAC5B,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,OAAO;QACL,YAAY;YACV,MAAM;YACN,cAAc;YACd,cAAc,KAAK,CAAC,aAAa;YACjC,mBAAmB,KAAK,CAAC,kBAAkB,IAAI;YAC/C,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;YACjD,gBAAgB,KAAK,CAAC,eAAe;YACrC,yEAAyE;YACzE,eAAe,cAAc,YAAY,SAAS;YAClD,UAAU;QACZ;QACA,cAAc;YACZ,MAAM;YACN,eAAe;YACf,OAAO;gBACL,YAAY,aAAa,cAAc,OAAO,YAAY;YAC5D;QACF;QACA,YAAY;YACV,IAAI;QACN;QACA,kBAAkB;YAChB,IAAI;QACN;QACA,kBAAkB;YAChB,cAAc,gBAAgB,MAAM,CAAC;YACrC,SAAS,IAAM,MAAM,KAAK,CAAC;QAC7B;IACF;AACF","sources":["packages/@react-aria/toast/src/useToast.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaButtonProps} from '@react-types/button';\nimport {AriaLabelingProps, DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {QueuedToast, ToastState} from '@react-stately/toast';\nimport React, {useEffect} from 'react';\nimport {useId, useSlotId} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AriaToastProps<T> extends AriaLabelingProps {\n /** The toast object. */\n toast: QueuedToast<T>\n}\n\nexport interface ToastAria {\n /** Props for the toast container, non-modal dialog element. */\n toastProps: DOMAttributes,\n /** Props for the toast content alert message. */\n contentProps: DOMAttributes,\n /** Props for the toast title element. */\n titleProps: DOMAttributes,\n /** Props for the toast description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the toast close button. */\n closeButtonProps: AriaButtonProps\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toast component.\n * Toasts display brief, temporary notifications of actions, errors, or other events in an application.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function useToast<T>(props: AriaToastProps<T>, state: ToastState<T>, ref: RefObject<FocusableElement | null>): ToastAria {\n let {\n key,\n timer,\n timeout,\n animation\n } = props.toast;\n\n useEffect(() => {\n if (!timer) {\n return;\n }\n\n timer.reset(timeout);\n return () => {\n timer.pause();\n };\n }, [timer, timeout]);\n\n let [isEntered, setIsEntered] = React.useState(false);\n useEffect(() => {\n if (animation === 'entering' || animation === 'queued') {\n setIsEntered(true);\n }\n }, [animation]);\n\n let titleId = useId();\n let descriptionId = useSlotId();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/toast');\n\n return {\n toastProps: {\n role: 'alertdialog',\n 'aria-modal': 'false',\n 'aria-label': props['aria-label'],\n 'aria-labelledby': props['aria-labelledby'] || titleId,\n 'aria-describedby': props['aria-describedby'] || descriptionId,\n 'aria-details': props['aria-details'],\n // Hide toasts that are animating out so VoiceOver doesn't announce them.\n 'aria-hidden': animation === 'exiting' ? 'true' : undefined,\n tabIndex: 0\n },\n contentProps: {\n role: 'alert',\n 'aria-atomic': 'true',\n style: {\n visibility: isEntered || animation === null ? 'visible' : 'hidden'\n }\n },\n titleProps: {\n id: titleId\n },\n descriptionProps: {\n id: descriptionId\n },\n closeButtonProps: {\n 'aria-label': stringFormatter.format('close'),\n onPress: () => state.close(key)\n }\n };\n}\n"],"names":[],"version":3,"file":"useToast.main.js.map"}
package/dist/useToast.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import $7WpW4$intlStringsmodulejs from "./intlStrings.mjs";
2
- import {useEffect as $7WpW4$useEffect, useRef as $7WpW4$useRef} from "react";
3
- import {useLayoutEffect as $7WpW4$useLayoutEffect, useId as $7WpW4$useId, useSlotId as $7WpW4$useSlotId} from "@react-aria/utils";
2
+ import $7WpW4$react, {useEffect as $7WpW4$useEffect} from "react";
3
+ import {useId as $7WpW4$useId, useSlotId as $7WpW4$useSlotId} from "@react-aria/utils";
4
4
  import {useLocalizedStringFormatter as $7WpW4$useLocalizedStringFormatter} from "@react-aria/i18n";
5
5
 
6
6
 
@@ -33,41 +33,33 @@ function $d6542812f0669241$export$a407b657d3044108(props, state, ref) {
33
33
  timer,
34
34
  timeout
35
35
  ]);
36
- // Restore focus to the toast container on unmount.
37
- // If there are no more toasts, the container will be unmounted
38
- // and will restore focus to wherever focus was before the user
39
- // focused the toast region.
40
- let focusOnUnmount = (0, $7WpW4$useRef)(null);
41
- (0, $7WpW4$useLayoutEffect)(()=>{
42
- let container = ref.current.closest('[role=region]');
43
- return ()=>{
44
- if (container && container.contains(document.activeElement)) // Focus must be delayed for focus ring to appear, but we can't wait
45
- // until useEffect cleanup to check if focus was inside the container.
46
- focusOnUnmount.current = container;
47
- };
48
- }, [
49
- ref
50
- ]);
51
- // eslint-disable-next-line
36
+ let [isEntered, setIsEntered] = (0, $7WpW4$react).useState(false);
52
37
  (0, $7WpW4$useEffect)(()=>{
53
- return ()=>{
54
- if (focusOnUnmount.current) focusOnUnmount.current.focus();
55
- };
38
+ if (animation === 'entering' || animation === 'queued') setIsEntered(true);
56
39
  }, [
57
- ref
40
+ animation
58
41
  ]);
59
42
  let titleId = (0, $7WpW4$useId)();
60
43
  let descriptionId = (0, $7WpW4$useSlotId)();
61
44
  let stringFormatter = (0, $7WpW4$useLocalizedStringFormatter)((0, ($parcel$interopDefault($7WpW4$intlStringsmodulejs))), '@react-aria/toast');
62
45
  return {
63
46
  toastProps: {
64
- role: 'alert',
47
+ role: 'alertdialog',
48
+ 'aria-modal': 'false',
65
49
  'aria-label': props['aria-label'],
66
50
  'aria-labelledby': props['aria-labelledby'] || titleId,
67
51
  'aria-describedby': props['aria-describedby'] || descriptionId,
68
52
  'aria-details': props['aria-details'],
69
53
  // Hide toasts that are animating out so VoiceOver doesn't announce them.
70
- 'aria-hidden': animation === 'exiting' ? 'true' : undefined
54
+ 'aria-hidden': animation === 'exiting' ? 'true' : undefined,
55
+ tabIndex: 0
56
+ },
57
+ contentProps: {
58
+ role: 'alert',
59
+ 'aria-atomic': 'true',
60
+ style: {
61
+ visibility: isEntered || animation === null ? 'visible' : 'hidden'
62
+ }
71
63
  },
72
64
  titleProps: {
73
65
  id: titleId