@react-aria/toast 3.0.0-nightly.2262 → 3.0.0-nightly.2269
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.
- package/dist/import.mjs +4 -4
- package/dist/main.js +4 -4
- package/dist/main.js.map +1 -1
- package/dist/module.js +4 -4
- package/dist/module.js.map +1 -1
- package/package.json +10 -10
package/dist/import.mjs
CHANGED
|
@@ -27,7 +27,7 @@ function $parcel$interopDefault(a) {
|
|
|
27
27
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
28
28
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
29
29
|
* governing permissions and limitations under the License.
|
|
30
|
-
*/ var $
|
|
30
|
+
*/ var $7853651519a70071$exports = {};
|
|
31
31
|
var $ff9177efc58547ad$exports = {};
|
|
32
32
|
$ff9177efc58547ad$exports = {
|
|
33
33
|
"close": `إغلاق`,
|
|
@@ -266,7 +266,7 @@ $52e8b1b00094e5a3$exports = {
|
|
|
266
266
|
};
|
|
267
267
|
|
|
268
268
|
|
|
269
|
-
$
|
|
269
|
+
$7853651519a70071$exports = {
|
|
270
270
|
"ar-AE": $ff9177efc58547ad$exports,
|
|
271
271
|
"bg-BG": $25eb7c0c0c45e544$exports,
|
|
272
272
|
"cs-CZ": $28feffc3d61a8691$exports,
|
|
@@ -344,7 +344,7 @@ function $d6542812f0669241$export$a407b657d3044108(props, state, ref) {
|
|
|
344
344
|
]);
|
|
345
345
|
let titleId = (0, $5bA4N$useId)();
|
|
346
346
|
let descriptionId = (0, $5bA4N$useSlotId)();
|
|
347
|
-
let stringFormatter = (0, $5bA4N$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
347
|
+
let stringFormatter = (0, $5bA4N$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($7853651519a70071$exports))));
|
|
348
348
|
return {
|
|
349
349
|
toastProps: {
|
|
350
350
|
role: "alert",
|
|
@@ -376,7 +376,7 @@ function $d6542812f0669241$export$a407b657d3044108(props, state, ref) {
|
|
|
376
376
|
|
|
377
377
|
|
|
378
378
|
function $6cc546b19ee7130a$export$b8cbbb20a51697de(props, state, ref) {
|
|
379
|
-
let stringFormatter = (0, $5bA4N$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
379
|
+
let stringFormatter = (0, $5bA4N$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($7853651519a70071$exports))));
|
|
380
380
|
let { landmarkProps: landmarkProps } = (0, $5bA4N$useLandmark)({
|
|
381
381
|
role: "region",
|
|
382
382
|
"aria-label": props["aria-label"] || stringFormatter.format("notifications")
|
package/dist/main.js
CHANGED
|
@@ -33,7 +33,7 @@ $parcel$export(module.exports, "useToastRegion", () => $eda7c6204a682dd4$export$
|
|
|
33
33
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
34
34
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
35
35
|
* governing permissions and limitations under the License.
|
|
36
|
-
*/ var $
|
|
36
|
+
*/ var $f49b2d6c91681304$exports = {};
|
|
37
37
|
var $3ba38fcbd805da3c$exports = {};
|
|
38
38
|
$3ba38fcbd805da3c$exports = {
|
|
39
39
|
"close": `إغلاق`,
|
|
@@ -272,7 +272,7 @@ $765deb5c0d35c4bc$exports = {
|
|
|
272
272
|
};
|
|
273
273
|
|
|
274
274
|
|
|
275
|
-
$
|
|
275
|
+
$f49b2d6c91681304$exports = {
|
|
276
276
|
"ar-AE": $3ba38fcbd805da3c$exports,
|
|
277
277
|
"bg-BG": $06073da8a2e837af$exports,
|
|
278
278
|
"cs-CZ": $f53ed7e9d51b5d55$exports,
|
|
@@ -350,7 +350,7 @@ function $ec537504faac71d2$export$a407b657d3044108(props, state, ref) {
|
|
|
350
350
|
]);
|
|
351
351
|
let titleId = (0, $35jN2$reactariautils.useId)();
|
|
352
352
|
let descriptionId = (0, $35jN2$reactariautils.useSlotId)();
|
|
353
|
-
let stringFormatter = (0, $35jN2$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
353
|
+
let stringFormatter = (0, $35jN2$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($f49b2d6c91681304$exports))));
|
|
354
354
|
return {
|
|
355
355
|
toastProps: {
|
|
356
356
|
role: "alert",
|
|
@@ -382,7 +382,7 @@ function $ec537504faac71d2$export$a407b657d3044108(props, state, ref) {
|
|
|
382
382
|
|
|
383
383
|
|
|
384
384
|
function $eda7c6204a682dd4$export$b8cbbb20a51697de(props, state, ref) {
|
|
385
|
-
let stringFormatter = (0, $35jN2$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
385
|
+
let stringFormatter = (0, $35jN2$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($f49b2d6c91681304$exports))));
|
|
386
386
|
let { landmarkProps: landmarkProps } = (0, $35jN2$reactarialandmark.useLandmark)({
|
|
387
387
|
role: "region",
|
|
388
388
|
"aria-label": props["aria-label"] || stringFormatter.format("notifications")
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;;;AEAA,4BAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,OAAO,CAAC;AAC5B;;ADFA;;AEAA,4BAAiB;IAAG,SAAS,CAAC,OAAO,CAAC;IACpC,iBAAiB,CAAC,QAAQ,CAAC;AAC7B;;;;ACFA,4BAAiB;IAAG,SAAS,CAAC,MAAM,CAAC;IACnC,iBAAiB,CAAC,UAAU,CAAC;AAC/B;;;;ACFA,4BAAiB;IAAG,SAAS,CAAC,GAAG,CAAC;IAChC,iBAAiB,CAAC,WAAW,CAAC;AAChC;;;;ACFA,4BAAiB;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AD,EAAE;QACtC,eAAe,CAAC,IAAM;YACpB,MAAM,QAAQ;YACd,YAAY,OAAO,GAAG,EAAE,aAAa;QACvC;QACA,cAAc,IAAM;YAClB,MAAM,SAAS;YACf,YAAY,OAAO,GAAG,IAAI;QAC5B;IACF;IAEA,6EAA6E;IAC7E,+CAA+C;IAC/C,oEAAoE;IACpE,4CAA4C;IAC5C,CAAA,GAAA,sBAAS,AAAD,EAAE,IAAM;QACd,OAAO,IAAM;YACX,IAAI,YAAY,OAAO,IAAI,SAAS,IAAI,CAAC,QAAQ,CAAC,YAAY,OAAO;gBACnE,IAAI,CAAA,GAAA,mDAAqB,QAAQ,WAC/B,CAAA,GAAA,2CAAqB,AAAD,EAAE,YAAY,OAAO;qBAEzC,YAAY,OAAO,CAAC,KAAK;aAE5B;QACH;IACF,GAAG;QAAC;KAAI;IAER,OAAO;QACL,aAAa,CAAA,GAAA,gCAAS,EAAE,eAAe,YAAY,kBAAkB;YACnE,UAAU;YACV,sDAAsD;YACtD,iDAAiD;YACjD,yDAAyD;YACzD,8EAA8E;YAC9E,aAAa;YACb,6BAA6B,IAAI;QACnC;IACF;AACF;","sources":["packages/@react-aria/toast/src/index.ts","packages/@react-aria/toast/src/useToast.ts","packages/@react-aria/toast/intl/*.js","packages/@react-aria/toast/intl/ar-AE.json","packages/@react-aria/toast/intl/bg-BG.json","packages/@react-aria/toast/intl/cs-CZ.json","packages/@react-aria/toast/intl/da-DK.json","packages/@react-aria/toast/intl/de-DE.json","packages/@react-aria/toast/intl/el-GR.json","packages/@react-aria/toast/intl/en-US.json","packages/@react-aria/toast/intl/es-ES.json","packages/@react-aria/toast/intl/et-EE.json","packages/@react-aria/toast/intl/fi-FI.json","packages/@react-aria/toast/intl/fr-FR.json","packages/@react-aria/toast/intl/he-IL.json","packages/@react-aria/toast/intl/hr-HR.json","packages/@react-aria/toast/intl/hu-HU.json","packages/@react-aria/toast/intl/it-IT.json","packages/@react-aria/toast/intl/ja-JP.json","packages/@react-aria/toast/intl/ko-KR.json","packages/@react-aria/toast/intl/lt-LT.json","packages/@react-aria/toast/intl/lv-LV.json","packages/@react-aria/toast/intl/nb-NO.json","packages/@react-aria/toast/intl/nl-NL.json","packages/@react-aria/toast/intl/pl-PL.json","packages/@react-aria/toast/intl/pt-BR.json","packages/@react-aria/toast/intl/pt-PT.json","packages/@react-aria/toast/intl/ro-RO.json","packages/@react-aria/toast/intl/ru-RU.json","packages/@react-aria/toast/intl/sk-SK.json","packages/@react-aria/toast/intl/sl-SI.json","packages/@react-aria/toast/intl/sr-SP.json","packages/@react-aria/toast/intl/sv-SE.json","packages/@react-aria/toast/intl/tr-TR.json","packages/@react-aria/toast/intl/uk-UA.json","packages/@react-aria/toast/intl/zh-CN.json","packages/@react-aria/toast/intl/zh-TW.json","packages/@react-aria/toast/src/useToastRegion.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 */\nexport {useToast} from './useToast';\nexport {useToastRegion} from './useToastRegion';\n\nexport type {AriaToastRegionProps, ToastRegionAria} from './useToastRegion';\nexport type {AriaToastProps, ToastAria} from './useToast';\n","/*\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);\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","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"close\": \"إغلاق\",\n \"notifications\": \"إشعارات\"\n}\n","{\n \"close\": \"Затвори\",\n \"notifications\": \"Известия\"\n}\n","{\n \"close\": \"Zavřít\",\n \"notifications\": \"Upozornění\"\n}\n","{\n \"close\": \"Luk\",\n \"notifications\": \"Påmindelser\"\n}\n","{\n \"close\": \"Schließen\",\n \"notifications\": \"Benachrichtigungen\"\n}\n","{\n \"close\": \"Κλείσιμο\",\n \"notifications\": \"Ειδοποιήσεις\"\n}\n","{\n \"close\": \"Close\",\n \"notifications\": \"Notifications\"\n}\n","{\n \"close\": \"Cerrar\",\n \"notifications\": \"Notificaciones\"\n}\n","{\n \"close\": \"Sule\",\n \"notifications\": \"Teated\"\n}\n","{\n \"close\": \"Sulje\",\n \"notifications\": \"Ilmoitukset\"\n}\n","{\n \"close\": \"Fermer\",\n \"notifications\": \"Notifications\"\n}\n","{\n \"close\": \"סגור\",\n \"notifications\": \"התראות\"\n}\n","{\n \"close\": \"Zatvori\",\n \"notifications\": \"Obavijesti\"\n}\n","{\n \"close\": \"Bezárás\",\n \"notifications\": \"Értesítések\"\n}\n","{\n \"close\": \"Chiudi\",\n \"notifications\": \"Notifiche\"\n}\n","{\n \"close\": \"閉じる\",\n \"notifications\": \"通知\"\n}\n","{\n \"close\": \"닫기\",\n \"notifications\": \"알림\"\n}\n","{\n \"close\": \"Uždaryti\",\n \"notifications\": \"Pranešimai\"\n}\n","{\n \"close\": \"Aizvērt\",\n \"notifications\": \"Paziņojumi\"\n}\n","{\n \"close\": \"Lukk\",\n \"notifications\": \"Varsler\"\n}\n","{\n \"close\": \"Sluiten\",\n \"notifications\": \"Meldingen\"\n}\n","{\n \"close\": \"Zamknij\",\n \"notifications\": \"Powiadomienia\"\n}\n","{\n \"close\": \"Fechar\",\n \"notifications\": \"Notificações\"\n}\n","{\n \"close\": \"Fechar\",\n \"notifications\": \"Notificações\"\n}\n","{\n \"close\": \"Închideţi\",\n \"notifications\": \"Notificări\"\n}\n","{\n \"close\": \"Закрыть\",\n \"notifications\": \"Уведомления\"\n}\n","{\n \"close\": \"Zatvoriť\",\n \"notifications\": \"Oznámenia\"\n}\n","{\n \"close\": \"Zapri\",\n \"notifications\": \"Obvestila\"\n}\n","{\n \"close\": \"Zatvori\",\n \"notifications\": \"Obaveštenja\"\n}\n","{\n \"close\": \"Stäng\",\n \"notifications\": \"Aviseringar\"\n}\n","{\n \"close\": \"Kapat\",\n \"notifications\": \"Bildirimler\"\n}\n","{\n \"close\": \"Закрити\",\n \"notifications\": \"Сповіщення\"\n}\n","{\n \"close\": \"关闭\",\n \"notifications\": \"通知\"\n}\n","{\n \"close\": \"關閉\",\n \"notifications\": \"通知\"\n}\n","import {AriaLabelingProps, DOMAttributes} from '@react-types/shared';\nimport {focusWithoutScrolling, mergeProps} from '@react-aria/utils';\nimport {getInteractionModality, useFocusWithin, useHover} from '@react-aria/interactions';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {RefObject, useEffect, useRef} from 'react';\nimport {ToastState} from '@react-stately/toast';\nimport {useLandmark} from '@react-aria/landmark';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AriaToastRegionProps extends AriaLabelingProps {\n /**\n * An accessibility label for the toast region.\n * @default \"Notifications\"\n */\n 'aria-label'?: string\n}\n\nexport interface ToastRegionAria {\n /** Props for the landmark region element. */\n regionProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toast region containing one or more toasts.\n * Toasts display brief, temporary notifications of actions, errors, or other events in an application.\n */\nexport function useToastRegion<T>(props: AriaToastRegionProps, state: ToastState<T>, ref: RefObject<HTMLElement>): ToastRegionAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let {landmarkProps} = useLandmark({\n role: 'region',\n 'aria-label': props['aria-label'] || stringFormatter.format('notifications')\n }, ref);\n\n let {hoverProps} = useHover({\n onHoverStart: state.pauseAll,\n onHoverEnd: state.resumeAll\n });\n\n let lastFocused = useRef(null);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithin: (e) => {\n state.pauseAll();\n lastFocused.current = e.relatedTarget;\n },\n onBlurWithin: () => {\n state.resumeAll();\n lastFocused.current = null;\n }\n });\n\n // When the region unmounts, restore focus to the last element that had focus\n // before the user moved focus into the region.\n // TODO: handle when the element has unmounted like FocusScope does?\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => {\n if (lastFocused.current && document.body.contains(lastFocused.current)) {\n if (getInteractionModality() === 'pointer') {\n focusWithoutScrolling(lastFocused.current);\n } else {\n lastFocused.current.focus();\n }\n }\n };\n }, [ref]);\n\n return {\n regionProps: mergeProps(landmarkProps, hoverProps, focusWithinProps, {\n tabIndex: -1,\n // Mark the toast region as a \"top layer\", so that it:\n // - is not aria-hidden when opening an overlay\n // - allows focus even outside a containing focus scope\n // - doesn’t dismiss overlays when clicking on it, even though it is outside\n // @ts-ignore\n 'data-react-aria-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AAK,CAAC,aAAa,IAAI,gBAAgB,OAAO;IAC9D,GAAG;IAEH,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;QAC1B,cAAc,MAAM;QACpB,YAAY,MAAM;IACpB;IAEA,IAAI,cAAc,CAAA,GAAA,mBAAK,EAAE;IACzB,IAAI,oBAAC,iBAAgB,EAAC,GAAG,CAAA,GAAA,2CAAa,EAAE;QACtC,eAAe,CAAC;YACd,MAAM;YACN,YAAY,UAAU,EAAE;QAC1B;QACA,cAAc;YACZ,MAAM;YACN,YAAY,UAAU;QACxB;IACF;IAEA,6EAA6E;IAC7E,+CAA+C;IAC/C,oEAAoE;IACpE,4CAA4C;IAC5C,CAAA,GAAA,sBAAQ,EAAE;QACR,OAAO;YACL,IAAI,YAAY,WAAW,SAAS,KAAK,SAAS,YAAY;gBAC5D,IAAI,CAAA,GAAA,mDAAqB,QAAQ,WAC/B,CAAA,GAAA,2CAAoB,EAAE,YAAY;qBAElC,YAAY,QAAQ;;QAG1B;IACF,GAAG;QAAC;KAAI;IAER,OAAO;QACL,aAAa,CAAA,GAAA,gCAAS,EAAE,eAAe,YAAY,kBAAkB;YACnE,UAAU;YACV,sDAAsD;YACtD,iDAAiD;YACjD,yDAAyD;YACzD,8EAA8E;YAC9E,aAAa;YACb,6BAA6B;QAC/B;IACF;AACF;","sources":["packages/@react-aria/toast/src/index.ts","packages/@react-aria/toast/src/useToast.ts","packages/@react-aria/toast/src/*.js","packages/@react-aria/toast/intl/ar-AE.json","packages/@react-aria/toast/intl/bg-BG.json","packages/@react-aria/toast/intl/cs-CZ.json","packages/@react-aria/toast/intl/da-DK.json","packages/@react-aria/toast/intl/de-DE.json","packages/@react-aria/toast/intl/el-GR.json","packages/@react-aria/toast/intl/en-US.json","packages/@react-aria/toast/intl/es-ES.json","packages/@react-aria/toast/intl/et-EE.json","packages/@react-aria/toast/intl/fi-FI.json","packages/@react-aria/toast/intl/fr-FR.json","packages/@react-aria/toast/intl/he-IL.json","packages/@react-aria/toast/intl/hr-HR.json","packages/@react-aria/toast/intl/hu-HU.json","packages/@react-aria/toast/intl/it-IT.json","packages/@react-aria/toast/intl/ja-JP.json","packages/@react-aria/toast/intl/ko-KR.json","packages/@react-aria/toast/intl/lt-LT.json","packages/@react-aria/toast/intl/lv-LV.json","packages/@react-aria/toast/intl/nb-NO.json","packages/@react-aria/toast/intl/nl-NL.json","packages/@react-aria/toast/intl/pl-PL.json","packages/@react-aria/toast/intl/pt-BR.json","packages/@react-aria/toast/intl/pt-PT.json","packages/@react-aria/toast/intl/ro-RO.json","packages/@react-aria/toast/intl/ru-RU.json","packages/@react-aria/toast/intl/sk-SK.json","packages/@react-aria/toast/intl/sl-SI.json","packages/@react-aria/toast/intl/sr-SP.json","packages/@react-aria/toast/intl/sv-SE.json","packages/@react-aria/toast/intl/tr-TR.json","packages/@react-aria/toast/intl/uk-UA.json","packages/@react-aria/toast/intl/zh-CN.json","packages/@react-aria/toast/intl/zh-TW.json","packages/@react-aria/toast/src/useToastRegion.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 */\nexport {useToast} from './useToast';\nexport {useToastRegion} from './useToastRegion';\n\nexport type {AriaToastRegionProps, ToastRegionAria} from './useToastRegion';\nexport type {AriaToastProps, ToastAria} from './useToast';\n","/*\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);\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","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"close\": \"إغلاق\",\n \"notifications\": \"إشعارات\"\n}\n","{\n \"close\": \"Затвори\",\n \"notifications\": \"Известия\"\n}\n","{\n \"close\": \"Zavřít\",\n \"notifications\": \"Upozornění\"\n}\n","{\n \"close\": \"Luk\",\n \"notifications\": \"Påmindelser\"\n}\n","{\n \"close\": \"Schließen\",\n \"notifications\": \"Benachrichtigungen\"\n}\n","{\n \"close\": \"Κλείσιμο\",\n \"notifications\": \"Ειδοποιήσεις\"\n}\n","{\n \"close\": \"Close\",\n \"notifications\": \"Notifications\"\n}\n","{\n \"close\": \"Cerrar\",\n \"notifications\": \"Notificaciones\"\n}\n","{\n \"close\": \"Sule\",\n \"notifications\": \"Teated\"\n}\n","{\n \"close\": \"Sulje\",\n \"notifications\": \"Ilmoitukset\"\n}\n","{\n \"close\": \"Fermer\",\n \"notifications\": \"Notifications\"\n}\n","{\n \"close\": \"סגור\",\n \"notifications\": \"התראות\"\n}\n","{\n \"close\": \"Zatvori\",\n \"notifications\": \"Obavijesti\"\n}\n","{\n \"close\": \"Bezárás\",\n \"notifications\": \"Értesítések\"\n}\n","{\n \"close\": \"Chiudi\",\n \"notifications\": \"Notifiche\"\n}\n","{\n \"close\": \"閉じる\",\n \"notifications\": \"通知\"\n}\n","{\n \"close\": \"닫기\",\n \"notifications\": \"알림\"\n}\n","{\n \"close\": \"Uždaryti\",\n \"notifications\": \"Pranešimai\"\n}\n","{\n \"close\": \"Aizvērt\",\n \"notifications\": \"Paziņojumi\"\n}\n","{\n \"close\": \"Lukk\",\n \"notifications\": \"Varsler\"\n}\n","{\n \"close\": \"Sluiten\",\n \"notifications\": \"Meldingen\"\n}\n","{\n \"close\": \"Zamknij\",\n \"notifications\": \"Powiadomienia\"\n}\n","{\n \"close\": \"Fechar\",\n \"notifications\": \"Notificações\"\n}\n","{\n \"close\": \"Fechar\",\n \"notifications\": \"Notificações\"\n}\n","{\n \"close\": \"Închideţi\",\n \"notifications\": \"Notificări\"\n}\n","{\n \"close\": \"Закрыть\",\n \"notifications\": \"Уведомления\"\n}\n","{\n \"close\": \"Zatvoriť\",\n \"notifications\": \"Oznámenia\"\n}\n","{\n \"close\": \"Zapri\",\n \"notifications\": \"Obvestila\"\n}\n","{\n \"close\": \"Zatvori\",\n \"notifications\": \"Obaveštenja\"\n}\n","{\n \"close\": \"Stäng\",\n \"notifications\": \"Aviseringar\"\n}\n","{\n \"close\": \"Kapat\",\n \"notifications\": \"Bildirimler\"\n}\n","{\n \"close\": \"Закрити\",\n \"notifications\": \"Сповіщення\"\n}\n","{\n \"close\": \"关闭\",\n \"notifications\": \"通知\"\n}\n","{\n \"close\": \"關閉\",\n \"notifications\": \"通知\"\n}\n","import {AriaLabelingProps, DOMAttributes} from '@react-types/shared';\nimport {focusWithoutScrolling, mergeProps} from '@react-aria/utils';\nimport {getInteractionModality, useFocusWithin, useHover} from '@react-aria/interactions';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {RefObject, useEffect, useRef} from 'react';\nimport {ToastState} from '@react-stately/toast';\nimport {useLandmark} from '@react-aria/landmark';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AriaToastRegionProps extends AriaLabelingProps {\n /**\n * An accessibility label for the toast region.\n * @default \"Notifications\"\n */\n 'aria-label'?: string\n}\n\nexport interface ToastRegionAria {\n /** Props for the landmark region element. */\n regionProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toast region containing one or more toasts.\n * Toasts display brief, temporary notifications of actions, errors, or other events in an application.\n */\nexport function useToastRegion<T>(props: AriaToastRegionProps, state: ToastState<T>, ref: RefObject<HTMLElement>): ToastRegionAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let {landmarkProps} = useLandmark({\n role: 'region',\n 'aria-label': props['aria-label'] || stringFormatter.format('notifications')\n }, ref);\n\n let {hoverProps} = useHover({\n onHoverStart: state.pauseAll,\n onHoverEnd: state.resumeAll\n });\n\n let lastFocused = useRef(null);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithin: (e) => {\n state.pauseAll();\n lastFocused.current = e.relatedTarget;\n },\n onBlurWithin: () => {\n state.resumeAll();\n lastFocused.current = null;\n }\n });\n\n // When the region unmounts, restore focus to the last element that had focus\n // before the user moved focus into the region.\n // TODO: handle when the element has unmounted like FocusScope does?\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => {\n if (lastFocused.current && document.body.contains(lastFocused.current)) {\n if (getInteractionModality() === 'pointer') {\n focusWithoutScrolling(lastFocused.current);\n } else {\n lastFocused.current.focus();\n }\n }\n };\n }, [ref]);\n\n return {\n regionProps: mergeProps(landmarkProps, hoverProps, focusWithinProps, {\n tabIndex: -1,\n // Mark the toast region as a \"top layer\", so that it:\n // - is not aria-hidden when opening an overlay\n // - allows focus even outside a containing focus scope\n // - doesn’t dismiss overlays when clicking on it, even though it is outside\n // @ts-ignore\n 'data-react-aria-top-layer': true\n })\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -27,7 +27,7 @@ function $parcel$interopDefault(a) {
|
|
|
27
27
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
28
28
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
29
29
|
* governing permissions and limitations under the License.
|
|
30
|
-
*/ var $
|
|
30
|
+
*/ var $7853651519a70071$exports = {};
|
|
31
31
|
var $ff9177efc58547ad$exports = {};
|
|
32
32
|
$ff9177efc58547ad$exports = {
|
|
33
33
|
"close": `إغلاق`,
|
|
@@ -266,7 +266,7 @@ $52e8b1b00094e5a3$exports = {
|
|
|
266
266
|
};
|
|
267
267
|
|
|
268
268
|
|
|
269
|
-
$
|
|
269
|
+
$7853651519a70071$exports = {
|
|
270
270
|
"ar-AE": $ff9177efc58547ad$exports,
|
|
271
271
|
"bg-BG": $25eb7c0c0c45e544$exports,
|
|
272
272
|
"cs-CZ": $28feffc3d61a8691$exports,
|
|
@@ -344,7 +344,7 @@ function $d6542812f0669241$export$a407b657d3044108(props, state, ref) {
|
|
|
344
344
|
]);
|
|
345
345
|
let titleId = (0, $5bA4N$useId)();
|
|
346
346
|
let descriptionId = (0, $5bA4N$useSlotId)();
|
|
347
|
-
let stringFormatter = (0, $5bA4N$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
347
|
+
let stringFormatter = (0, $5bA4N$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($7853651519a70071$exports))));
|
|
348
348
|
return {
|
|
349
349
|
toastProps: {
|
|
350
350
|
role: "alert",
|
|
@@ -376,7 +376,7 @@ function $d6542812f0669241$export$a407b657d3044108(props, state, ref) {
|
|
|
376
376
|
|
|
377
377
|
|
|
378
378
|
function $6cc546b19ee7130a$export$b8cbbb20a51697de(props, state, ref) {
|
|
379
|
-
let stringFormatter = (0, $5bA4N$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
379
|
+
let stringFormatter = (0, $5bA4N$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($7853651519a70071$exports))));
|
|
380
380
|
let { landmarkProps: landmarkProps } = (0, $5bA4N$useLandmark)({
|
|
381
381
|
role: "region",
|
|
382
382
|
"aria-label": props["aria-label"] || stringFormatter.format("notifications")
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;;;AEAA,4BAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,OAAO,CAAC;AAC5B;;ADFA;;AEAA,4BAAiB;IAAG,SAAS,CAAC,OAAO,CAAC;IACpC,iBAAiB,CAAC,QAAQ,CAAC;AAC7B;;;;ACFA,4BAAiB;IAAG,SAAS,CAAC,MAAM,CAAC;IACnC,iBAAiB,CAAC,UAAU,CAAC;AAC/B;;;;ACFA,4BAAiB;IAAG,SAAS,CAAC,GAAG,CAAC;IAChC,iBAAiB,CAAC,WAAW,CAAC;AAChC;;;;ACFA,4BAAiB;IAAG,SAAS,CAAC,SAAS,CAAC;IACtC,iBAAiB,CAAC,kBAAkB,CAAC;AACvC;;;;ACFA,4BAAiB;IAAG,SAAS,CAAC,QAAQ,CAAC;IACrC,iBAAiB,CAAC,YAAY,CAAC;AACjC;;;;ACFA,4BAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,aAAa,CAAC;AAClC;;;;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S,AAAD,EAAE,IAAM;QACd,OAAO,IAAM;YACX,IAAI,YAAY,OAAO,IAAI,SAAS,IAAI,CAAC,QAAQ,CAAC,YAAY,OAAO;gBACnE,IAAI,CAAA,GAAA,6BAAqB,QAAQ,WAC/B,CAAA,GAAA,4BAAqB,AAAD,EAAE,YAAY,OAAO;qBAEzC,YAAY,OAAO,CAAC,KAAK;aAE5B;QACH;IACF,GAAG;QAAC;KAAI;IAER,OAAO;QACL,aAAa,CAAA,GAAA,iBAAS,EAAE,eAAe,YAAY,kBAAkB;YACnE,UAAU;YACV,sDAAsD;YACtD,iDAAiD;YACjD,yDAAyD;YACzD,8EAA8E;YAC9E,aAAa;YACb,6BAA6B,IAAI;QACnC;IACF;AACF;","sources":["packages/@react-aria/toast/src/index.ts","packages/@react-aria/toast/src/useToast.ts","packages/@react-aria/toast/intl/*.js","packages/@react-aria/toast/intl/ar-AE.json","packages/@react-aria/toast/intl/bg-BG.json","packages/@react-aria/toast/intl/cs-CZ.json","packages/@react-aria/toast/intl/da-DK.json","packages/@react-aria/toast/intl/de-DE.json","packages/@react-aria/toast/intl/el-GR.json","packages/@react-aria/toast/intl/en-US.json","packages/@react-aria/toast/intl/es-ES.json","packages/@react-aria/toast/intl/et-EE.json","packages/@react-aria/toast/intl/fi-FI.json","packages/@react-aria/toast/intl/fr-FR.json","packages/@react-aria/toast/intl/he-IL.json","packages/@react-aria/toast/intl/hr-HR.json","packages/@react-aria/toast/intl/hu-HU.json","packages/@react-aria/toast/intl/it-IT.json","packages/@react-aria/toast/intl/ja-JP.json","packages/@react-aria/toast/intl/ko-KR.json","packages/@react-aria/toast/intl/lt-LT.json","packages/@react-aria/toast/intl/lv-LV.json","packages/@react-aria/toast/intl/nb-NO.json","packages/@react-aria/toast/intl/nl-NL.json","packages/@react-aria/toast/intl/pl-PL.json","packages/@react-aria/toast/intl/pt-BR.json","packages/@react-aria/toast/intl/pt-PT.json","packages/@react-aria/toast/intl/ro-RO.json","packages/@react-aria/toast/intl/ru-RU.json","packages/@react-aria/toast/intl/sk-SK.json","packages/@react-aria/toast/intl/sl-SI.json","packages/@react-aria/toast/intl/sr-SP.json","packages/@react-aria/toast/intl/sv-SE.json","packages/@react-aria/toast/intl/tr-TR.json","packages/@react-aria/toast/intl/uk-UA.json","packages/@react-aria/toast/intl/zh-CN.json","packages/@react-aria/toast/intl/zh-TW.json","packages/@react-aria/toast/src/useToastRegion.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 */\nexport {useToast} from './useToast';\nexport {useToastRegion} from './useToastRegion';\n\nexport type {AriaToastRegionProps, ToastRegionAria} from './useToastRegion';\nexport type {AriaToastProps, ToastAria} from './useToast';\n","/*\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);\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","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"close\": \"إغلاق\",\n \"notifications\": \"إشعارات\"\n}\n","{\n \"close\": \"Затвори\",\n \"notifications\": \"Известия\"\n}\n","{\n \"close\": \"Zavřít\",\n \"notifications\": \"Upozornění\"\n}\n","{\n \"close\": \"Luk\",\n \"notifications\": \"Påmindelser\"\n}\n","{\n \"close\": \"Schließen\",\n \"notifications\": \"Benachrichtigungen\"\n}\n","{\n \"close\": \"Κλείσιμο\",\n \"notifications\": \"Ειδοποιήσεις\"\n}\n","{\n \"close\": \"Close\",\n \"notifications\": \"Notifications\"\n}\n","{\n \"close\": \"Cerrar\",\n \"notifications\": \"Notificaciones\"\n}\n","{\n \"close\": \"Sule\",\n \"notifications\": \"Teated\"\n}\n","{\n \"close\": \"Sulje\",\n \"notifications\": \"Ilmoitukset\"\n}\n","{\n \"close\": \"Fermer\",\n \"notifications\": \"Notifications\"\n}\n","{\n \"close\": \"סגור\",\n \"notifications\": \"התראות\"\n}\n","{\n \"close\": \"Zatvori\",\n \"notifications\": \"Obavijesti\"\n}\n","{\n \"close\": \"Bezárás\",\n \"notifications\": \"Értesítések\"\n}\n","{\n \"close\": \"Chiudi\",\n \"notifications\": \"Notifiche\"\n}\n","{\n \"close\": \"閉じる\",\n \"notifications\": \"通知\"\n}\n","{\n \"close\": \"닫기\",\n \"notifications\": \"알림\"\n}\n","{\n \"close\": \"Uždaryti\",\n \"notifications\": \"Pranešimai\"\n}\n","{\n \"close\": \"Aizvērt\",\n \"notifications\": \"Paziņojumi\"\n}\n","{\n \"close\": \"Lukk\",\n \"notifications\": \"Varsler\"\n}\n","{\n \"close\": \"Sluiten\",\n \"notifications\": \"Meldingen\"\n}\n","{\n \"close\": \"Zamknij\",\n \"notifications\": \"Powiadomienia\"\n}\n","{\n \"close\": \"Fechar\",\n \"notifications\": \"Notificações\"\n}\n","{\n \"close\": \"Fechar\",\n \"notifications\": \"Notificações\"\n}\n","{\n \"close\": \"Închideţi\",\n \"notifications\": \"Notificări\"\n}\n","{\n \"close\": \"Закрыть\",\n \"notifications\": \"Уведомления\"\n}\n","{\n \"close\": \"Zatvoriť\",\n \"notifications\": \"Oznámenia\"\n}\n","{\n \"close\": \"Zapri\",\n \"notifications\": \"Obvestila\"\n}\n","{\n \"close\": \"Zatvori\",\n \"notifications\": \"Obaveštenja\"\n}\n","{\n \"close\": \"Stäng\",\n \"notifications\": \"Aviseringar\"\n}\n","{\n \"close\": \"Kapat\",\n \"notifications\": \"Bildirimler\"\n}\n","{\n \"close\": \"Закрити\",\n \"notifications\": \"Сповіщення\"\n}\n","{\n \"close\": \"关闭\",\n \"notifications\": \"通知\"\n}\n","{\n \"close\": \"關閉\",\n \"notifications\": \"通知\"\n}\n","import {AriaLabelingProps, DOMAttributes} from '@react-types/shared';\nimport {focusWithoutScrolling, mergeProps} from '@react-aria/utils';\nimport {getInteractionModality, useFocusWithin, useHover} from '@react-aria/interactions';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {RefObject, useEffect, useRef} from 'react';\nimport {ToastState} from '@react-stately/toast';\nimport {useLandmark} from '@react-aria/landmark';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AriaToastRegionProps extends AriaLabelingProps {\n /**\n * An accessibility label for the toast region.\n * @default \"Notifications\"\n */\n 'aria-label'?: string\n}\n\nexport interface ToastRegionAria {\n /** Props for the landmark region element. */\n regionProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toast region containing one or more toasts.\n * Toasts display brief, temporary notifications of actions, errors, or other events in an application.\n */\nexport function useToastRegion<T>(props: AriaToastRegionProps, state: ToastState<T>, ref: RefObject<HTMLElement>): ToastRegionAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let {landmarkProps} = useLandmark({\n role: 'region',\n 'aria-label': props['aria-label'] || stringFormatter.format('notifications')\n }, ref);\n\n let {hoverProps} = useHover({\n onHoverStart: state.pauseAll,\n onHoverEnd: state.resumeAll\n });\n\n let lastFocused = useRef(null);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithin: (e) => {\n state.pauseAll();\n lastFocused.current = e.relatedTarget;\n },\n onBlurWithin: () => {\n state.resumeAll();\n lastFocused.current = null;\n }\n });\n\n // When the region unmounts, restore focus to the last element that had focus\n // before the user moved focus into the region.\n // TODO: handle when the element has unmounted like FocusScope does?\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => {\n if (lastFocused.current && document.body.contains(lastFocused.current)) {\n if (getInteractionModality() === 'pointer') {\n focusWithoutScrolling(lastFocused.current);\n } else {\n lastFocused.current.focus();\n }\n }\n };\n }, [ref]);\n\n return {\n regionProps: mergeProps(landmarkProps, hoverProps, focusWithinProps, {\n tabIndex: -1,\n // Mark the toast region as a \"top layer\", so that it:\n // - is not aria-hidden when opening an overlay\n // - allows focus even outside a containing focus scope\n // - doesn’t dismiss overlays when clicking on it, even though it is outside\n // @ts-ignore\n 'data-react-aria-top-layer': true\n })\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;;;AEAA,4BAAiB;IAAG,SAAS,CAAC,KAAK,CAAC;IAClC,iBAAiB,CAAC,OAAO,CAAC;AAC5B;;;;ACFA,4BAAiB;IAAG,SAAS,CAAC,OAAO,CAAC;IACpC,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tC,eAAe,CAAC;YACd,MAAM;YACN,YAAY,UAAU,EAAE;QAC1B;QACA,cAAc;YACZ,MAAM;YACN,YAAY,UAAU;QACxB;IACF;IAEA,6EAA6E;IAC7E,+CAA+C;IAC/C,oEAAoE;IACpE,4CAA4C;IAC5C,CAAA,GAAA,gBAAQ,EAAE;QACR,OAAO;YACL,IAAI,YAAY,WAAW,SAAS,KAAK,SAAS,YAAY;gBAC5D,IAAI,CAAA,GAAA,6BAAqB,QAAQ,WAC/B,CAAA,GAAA,4BAAoB,EAAE,YAAY;qBAElC,YAAY,QAAQ;;QAG1B;IACF,GAAG;QAAC;KAAI;IAER,OAAO;QACL,aAAa,CAAA,GAAA,iBAAS,EAAE,eAAe,YAAY,kBAAkB;YACnE,UAAU;YACV,sDAAsD;YACtD,iDAAiD;YACjD,yDAAyD;YACzD,8EAA8E;YAC9E,aAAa;YACb,6BAA6B;QAC/B;IACF;AACF;","sources":["packages/@react-aria/toast/src/index.ts","packages/@react-aria/toast/src/useToast.ts","packages/@react-aria/toast/src/*.js","packages/@react-aria/toast/intl/ar-AE.json","packages/@react-aria/toast/intl/bg-BG.json","packages/@react-aria/toast/intl/cs-CZ.json","packages/@react-aria/toast/intl/da-DK.json","packages/@react-aria/toast/intl/de-DE.json","packages/@react-aria/toast/intl/el-GR.json","packages/@react-aria/toast/intl/en-US.json","packages/@react-aria/toast/intl/es-ES.json","packages/@react-aria/toast/intl/et-EE.json","packages/@react-aria/toast/intl/fi-FI.json","packages/@react-aria/toast/intl/fr-FR.json","packages/@react-aria/toast/intl/he-IL.json","packages/@react-aria/toast/intl/hr-HR.json","packages/@react-aria/toast/intl/hu-HU.json","packages/@react-aria/toast/intl/it-IT.json","packages/@react-aria/toast/intl/ja-JP.json","packages/@react-aria/toast/intl/ko-KR.json","packages/@react-aria/toast/intl/lt-LT.json","packages/@react-aria/toast/intl/lv-LV.json","packages/@react-aria/toast/intl/nb-NO.json","packages/@react-aria/toast/intl/nl-NL.json","packages/@react-aria/toast/intl/pl-PL.json","packages/@react-aria/toast/intl/pt-BR.json","packages/@react-aria/toast/intl/pt-PT.json","packages/@react-aria/toast/intl/ro-RO.json","packages/@react-aria/toast/intl/ru-RU.json","packages/@react-aria/toast/intl/sk-SK.json","packages/@react-aria/toast/intl/sl-SI.json","packages/@react-aria/toast/intl/sr-SP.json","packages/@react-aria/toast/intl/sv-SE.json","packages/@react-aria/toast/intl/tr-TR.json","packages/@react-aria/toast/intl/uk-UA.json","packages/@react-aria/toast/intl/zh-CN.json","packages/@react-aria/toast/intl/zh-TW.json","packages/@react-aria/toast/src/useToastRegion.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 */\nexport {useToast} from './useToast';\nexport {useToastRegion} from './useToastRegion';\n\nexport type {AriaToastRegionProps, ToastRegionAria} from './useToastRegion';\nexport type {AriaToastProps, ToastAria} from './useToast';\n","/*\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);\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","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"close\": \"إغلاق\",\n \"notifications\": \"إشعارات\"\n}\n","{\n \"close\": \"Затвори\",\n \"notifications\": \"Известия\"\n}\n","{\n \"close\": \"Zavřít\",\n \"notifications\": \"Upozornění\"\n}\n","{\n \"close\": \"Luk\",\n \"notifications\": \"Påmindelser\"\n}\n","{\n \"close\": \"Schließen\",\n \"notifications\": \"Benachrichtigungen\"\n}\n","{\n \"close\": \"Κλείσιμο\",\n \"notifications\": \"Ειδοποιήσεις\"\n}\n","{\n \"close\": \"Close\",\n \"notifications\": \"Notifications\"\n}\n","{\n \"close\": \"Cerrar\",\n \"notifications\": \"Notificaciones\"\n}\n","{\n \"close\": \"Sule\",\n \"notifications\": \"Teated\"\n}\n","{\n \"close\": \"Sulje\",\n \"notifications\": \"Ilmoitukset\"\n}\n","{\n \"close\": \"Fermer\",\n \"notifications\": \"Notifications\"\n}\n","{\n \"close\": \"סגור\",\n \"notifications\": \"התראות\"\n}\n","{\n \"close\": \"Zatvori\",\n \"notifications\": \"Obavijesti\"\n}\n","{\n \"close\": \"Bezárás\",\n \"notifications\": \"Értesítések\"\n}\n","{\n \"close\": \"Chiudi\",\n \"notifications\": \"Notifiche\"\n}\n","{\n \"close\": \"閉じる\",\n \"notifications\": \"通知\"\n}\n","{\n \"close\": \"닫기\",\n \"notifications\": \"알림\"\n}\n","{\n \"close\": \"Uždaryti\",\n \"notifications\": \"Pranešimai\"\n}\n","{\n \"close\": \"Aizvērt\",\n \"notifications\": \"Paziņojumi\"\n}\n","{\n \"close\": \"Lukk\",\n \"notifications\": \"Varsler\"\n}\n","{\n \"close\": \"Sluiten\",\n \"notifications\": \"Meldingen\"\n}\n","{\n \"close\": \"Zamknij\",\n \"notifications\": \"Powiadomienia\"\n}\n","{\n \"close\": \"Fechar\",\n \"notifications\": \"Notificações\"\n}\n","{\n \"close\": \"Fechar\",\n \"notifications\": \"Notificações\"\n}\n","{\n \"close\": \"Închideţi\",\n \"notifications\": \"Notificări\"\n}\n","{\n \"close\": \"Закрыть\",\n \"notifications\": \"Уведомления\"\n}\n","{\n \"close\": \"Zatvoriť\",\n \"notifications\": \"Oznámenia\"\n}\n","{\n \"close\": \"Zapri\",\n \"notifications\": \"Obvestila\"\n}\n","{\n \"close\": \"Zatvori\",\n \"notifications\": \"Obaveštenja\"\n}\n","{\n \"close\": \"Stäng\",\n \"notifications\": \"Aviseringar\"\n}\n","{\n \"close\": \"Kapat\",\n \"notifications\": \"Bildirimler\"\n}\n","{\n \"close\": \"Закрити\",\n \"notifications\": \"Сповіщення\"\n}\n","{\n \"close\": \"关闭\",\n \"notifications\": \"通知\"\n}\n","{\n \"close\": \"關閉\",\n \"notifications\": \"通知\"\n}\n","import {AriaLabelingProps, DOMAttributes} from '@react-types/shared';\nimport {focusWithoutScrolling, mergeProps} from '@react-aria/utils';\nimport {getInteractionModality, useFocusWithin, useHover} from '@react-aria/interactions';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {RefObject, useEffect, useRef} from 'react';\nimport {ToastState} from '@react-stately/toast';\nimport {useLandmark} from '@react-aria/landmark';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AriaToastRegionProps extends AriaLabelingProps {\n /**\n * An accessibility label for the toast region.\n * @default \"Notifications\"\n */\n 'aria-label'?: string\n}\n\nexport interface ToastRegionAria {\n /** Props for the landmark region element. */\n regionProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toast region containing one or more toasts.\n * Toasts display brief, temporary notifications of actions, errors, or other events in an application.\n */\nexport function useToastRegion<T>(props: AriaToastRegionProps, state: ToastState<T>, ref: RefObject<HTMLElement>): ToastRegionAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let {landmarkProps} = useLandmark({\n role: 'region',\n 'aria-label': props['aria-label'] || stringFormatter.format('notifications')\n }, ref);\n\n let {hoverProps} = useHover({\n onHoverStart: state.pauseAll,\n onHoverEnd: state.resumeAll\n });\n\n let lastFocused = useRef(null);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithin: (e) => {\n state.pauseAll();\n lastFocused.current = e.relatedTarget;\n },\n onBlurWithin: () => {\n state.resumeAll();\n lastFocused.current = null;\n }\n });\n\n // When the region unmounts, restore focus to the last element that had focus\n // before the user moved focus into the region.\n // TODO: handle when the element has unmounted like FocusScope does?\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => {\n if (lastFocused.current && document.body.contains(lastFocused.current)) {\n if (getInteractionModality() === 'pointer') {\n focusWithoutScrolling(lastFocused.current);\n } else {\n lastFocused.current.focus();\n }\n }\n };\n }, [ref]);\n\n return {\n regionProps: mergeProps(landmarkProps, hoverProps, focusWithinProps, {\n tabIndex: -1,\n // Mark the toast region as a \"top layer\", so that it:\n // - is not aria-hidden when opening an overlay\n // - allows focus even outside a containing focus scope\n // - doesn’t dismiss overlays when clicking on it, even though it is outside\n // @ts-ignore\n 'data-react-aria-top-layer': true\n })\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/toast",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.2269+e50dc5866",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-aria/i18n": "3.0.0-nightly.
|
|
26
|
-
"@react-aria/interactions": "3.0.0-nightly.
|
|
27
|
-
"@react-aria/landmark": "3.0.0-nightly.
|
|
28
|
-
"@react-aria/utils": "3.0.0-nightly.
|
|
29
|
-
"@react-stately/toast": "3.0.0-nightly.
|
|
30
|
-
"@react-types/button": "3.7.4-nightly.
|
|
31
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
32
|
-
"@swc/helpers": "^0.
|
|
25
|
+
"@react-aria/i18n": "3.0.0-nightly.2269+e50dc5866",
|
|
26
|
+
"@react-aria/interactions": "3.0.0-nightly.2269+e50dc5866",
|
|
27
|
+
"@react-aria/landmark": "3.0.0-nightly.3971+e50dc5866",
|
|
28
|
+
"@react-aria/utils": "3.0.0-nightly.2269+e50dc5866",
|
|
29
|
+
"@react-stately/toast": "3.0.0-nightly.3971+e50dc5866",
|
|
30
|
+
"@react-types/button": "3.7.4-nightly.3971+e50dc5866",
|
|
31
|
+
"@react-types/shared": "3.0.0-nightly.2269+e50dc5866",
|
|
32
|
+
"@swc/helpers": "^0.5.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "e50dc5866c85e5e4015802bec32f1fc24f7f138e"
|
|
41
41
|
}
|