@midas-ds/components 1.0.2 → 1.0.3
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/Button-B4vMZbC6.js +182 -0
- package/CHANGELOG.md +10 -0
- package/Checkbox-DnKWanep.js +402 -0
- package/{Collection-B3xUVWPF.js → Collection-COLWgm24.js} +179 -152
- package/Dialog-Cb6toyXO.js +1951 -0
- package/DragAndDrop-B0T3WgjL.js +40 -0
- package/FocusScope-C8i7CH6y.js +513 -0
- package/Form-BQQs3jUk.js +238 -0
- package/Group-CdwXhx8Q.js +42 -0
- package/{Hidden-BQWDvze4.js → Hidden-DngIphiL.js} +1 -1
- package/Link-iAZLB3RI.js +75 -0
- package/ListBox-BKWkIIm6.js +474 -0
- package/ListKeyboardDelegate-BH-K5hyq.js +172 -0
- package/{PressResponder-DP8ZDNGy.js → PressResponder-Cz-TRBHO.js} +10 -10
- package/README.md +21 -3
- package/SelectionManager-8o40f7mx.js +1047 -0
- package/Separator-BlvmQjwz.js +49 -0
- package/Tag--W5TgxmK.js +728 -0
- package/Text-CQPW6xs7.js +15 -0
- package/TextField-DeK_yiK-.js +225 -0
- package/TextField.module-0-u4LVPp.js +143 -0
- package/{VisuallyHidden-B_XzVvlX.js → VisuallyHidden-CFx06Bae.js} +1 -1
- package/{context-ScOIq_Gu.js → context-Bnqknrce.js} +1 -1
- package/index-B-jHjTDC.js +120 -0
- package/{index-CorR1LBD.js → index-BPdc9gJ8.js} +3 -3
- package/index-DK9ZACEc.js +642 -0
- package/{index-Dl1Q-tbj.js → index-KSgQWWiy.js} +5315 -5315
- package/index.js +45 -47
- package/index15.js +1 -1
- package/index16.js +1 -1
- package/index25.js +1 -1
- package/index26.js +1 -1
- package/index3.js +2 -4
- package/index31.js +3 -3
- package/index32.js +2 -2
- package/index33.js +2 -2
- package/index34.js +1 -1
- package/index35.js +1 -1
- package/index36.js +1 -1
- package/index37.js +1 -1
- package/index38.js +1 -1
- package/index39.js +1 -1
- package/index40.js +1 -1
- package/index41.js +1 -1
- package/index42.js +1 -1
- package/index43.js +1 -1
- package/index45.js +3 -3
- package/index5.js +1 -1
- package/index50.js +1 -1
- package/index52.js +3 -3
- package/index53.js +3 -3
- package/index54.js +1 -1
- package/index55.js +4 -4
- package/index56.js +1 -1
- package/index57.js +1 -1
- package/index58.js +1 -1
- package/index59.js +3 -3
- package/index60.js +1 -1
- package/index61.js +1 -1
- package/index62.js +1 -1
- package/index63.js +4 -4
- package/index64.js +3 -3
- package/index65.js +3 -3
- package/index66.js +1 -1
- package/index67.js +3 -3
- package/index68.js +2 -2
- package/index69.js +1 -1
- package/index71.js +1 -1
- package/index76.js +5 -5
- package/index77.js +2 -2
- package/index78.js +2 -2
- package/index79.js +1 -1
- package/index80.js +226 -227
- package/index81.js +197 -199
- package/index82.js +192 -195
- package/index83.js +181 -183
- package/index84.js +52 -54
- package/index85.js +261 -262
- package/index86.js +262 -262
- package/index87.js +209 -211
- package/index88.js +436 -440
- package/index89.js +962 -964
- package/index90.js +2401 -2399
- package/index92.js +5 -5
- package/index93.js +1 -1
- package/index94.js +1 -1
- package/link/Link.d.ts +2 -2
- package/link-button/LinkButton.d.ts +1 -1
- package/package.json +7 -1
- package/{react.esm-D8HpDGKP.js → react.esm-sMU8Z7rL.js} +1872 -1872
- package/textfield/index.d.ts +0 -2
- package/{useControlledState-S_TYcV_c.js → useControlledState-DrAoodI6.js} +1 -1
- package/{useDescription-D4_zk_sA.js → useDescription-BPs7eRff.js} +1 -1
- package/useField-Dz62UHCP.js +67 -0
- package/{useFilter-BnJDBCkt.js → useFilter-ViwzkzZe.js} +1 -1
- package/useFocusRing-BKGhL91C.js +1297 -0
- package/{useFocusable-C-N9wcwm.js → useFocusable-CRSmYEQc.js} +11 -8
- package/{useGridSelectionCheckbox-i1rsjlC-.js → useGridSelectionCheckbox-CVEvUCJL.js} +3 -3
- package/useHasTabbableChild-C8y4fwiY.js +34 -0
- package/{useHighlightSelectionDescription-JVx2MW_e.js → useHighlightSelectionDescription-CD74uzLh.js} +19 -19
- package/useListState-DKnP5TB5.js +119 -0
- package/{useLocalizedStringFormatter-DVCAZqcL.js → useLocalizedStringFormatter-DsZ-ZWSk.js} +29 -29
- package/{useSingleSelectListState-CmX9_L5H.js → useSingleSelectListState-BHTLh8Ob.js} +5 -5
- package/Button-CCevm2s3.js +0 -183
- package/Checkbox-CllWDBxF.js +0 -405
- package/Dialog-CLTyYwkS.js +0 -1889
- package/DragAndDrop-OTN7La7U.js +0 -42
- package/FocusScope-BR0SJ-cZ.js +0 -512
- package/Form-DXLoQL91.js +0 -240
- package/Group-DPMuN3h8.js +0 -44
- package/Label-C18A_4Z5.js +0 -69
- package/Link-BU1h3K2a.js +0 -77
- package/ListBox-D21tdwTs.js +0 -463
- package/ListKeyboardDelegate-DxMjfMsI.js +0 -172
- package/SelectionManager-D4WtKtey.js +0 -988
- package/Separator-DLUHK9vv.js +0 -48
- package/Tag-CEd6WWSc.js +0 -725
- package/Text-DGLaY3HR.js +0 -17
- package/TextField-C_hq9WeT.js +0 -226
- package/TextField.module-Cwq1FAm7.js +0 -141
- package/index-CEg5vZQH.js +0 -132
- package/index-CgfokhRq.js +0 -674
- package/useFocusRing-D97-G3fT.js +0 -1324
- package/useHasTabbableChild-DeuCnGGv.js +0 -34
- package/useListState-DSOTbsL3.js +0 -119
package/index86.js
CHANGED
|
@@ -2,287 +2,287 @@ import { jsx as h, jsxs as E, Fragment as he } from "react/jsx-runtime";
|
|
|
2
2
|
import { Button as $e } from "./index69.js";
|
|
3
3
|
import { c as pe } from "./clsx-OuTLNxxd.js";
|
|
4
4
|
import y, { useEffect as v, useState as ve, useCallback as T, useRef as x, useMemo as xe } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { $ as w } from "./useLocalizedStringFormatter-
|
|
7
|
-
import { s as I } from "./index-
|
|
5
|
+
import { l as ke, B as Ee, k as A, b as Te, N as k, f as ge, w as L, e as ye } from "./useFocusRing-BKGhL91C.js";
|
|
6
|
+
import { $ as w } from "./useLocalizedStringFormatter-DsZ-ZWSk.js";
|
|
7
|
+
import { s as I } from "./index-B-jHjTDC.js";
|
|
8
8
|
import { createPortal as _e } from "react-dom";
|
|
9
9
|
import { X as Le } from "./x-JK7i-TQC.js";
|
|
10
10
|
import { C as Be, I as Ae, a as we, T as Ie } from "./triangle-alert-1OYl9KWz.js";
|
|
11
11
|
import './Toast.css';var C = {};
|
|
12
12
|
C = {
|
|
13
13
|
close: "إغلاق",
|
|
14
|
-
notifications: (
|
|
15
|
-
one: () => `${e.number(
|
|
16
|
-
other: () => `${e.number(
|
|
14
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
15
|
+
one: () => `${e.number(n.count)} إشعار`,
|
|
16
|
+
other: () => `${e.number(n.count)} إشعارات`
|
|
17
17
|
})}.`
|
|
18
18
|
};
|
|
19
19
|
var P = {};
|
|
20
20
|
P = {
|
|
21
21
|
close: "Затвори",
|
|
22
|
-
notifications: (
|
|
23
|
-
one: () => `${e.number(
|
|
24
|
-
other: () => `${e.number(
|
|
22
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
23
|
+
one: () => `${e.number(n.count)} известие`,
|
|
24
|
+
other: () => `${e.number(n.count)} известия`
|
|
25
25
|
})}.`
|
|
26
26
|
};
|
|
27
27
|
var F = {};
|
|
28
28
|
F = {
|
|
29
29
|
close: "Zavřít",
|
|
30
|
-
notifications: (
|
|
31
|
-
one: () => `${e.number(
|
|
32
|
-
other: () => `${e.number(
|
|
30
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
31
|
+
one: () => `${e.number(n.count)} oznámení`,
|
|
32
|
+
other: () => `${e.number(n.count)} oznámení`
|
|
33
33
|
})}.`
|
|
34
34
|
};
|
|
35
35
|
var R = {};
|
|
36
36
|
R = {
|
|
37
37
|
close: "Luk",
|
|
38
|
-
notifications: (
|
|
39
|
-
one: () => `${e.number(
|
|
40
|
-
other: () => `${e.number(
|
|
38
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
39
|
+
one: () => `${e.number(n.count)} besked`,
|
|
40
|
+
other: () => `${e.number(n.count)} beskeder`
|
|
41
41
|
})}.`
|
|
42
42
|
};
|
|
43
43
|
var N = {};
|
|
44
44
|
N = {
|
|
45
45
|
close: "Schließen",
|
|
46
|
-
notifications: (
|
|
47
|
-
one: () => `${e.number(
|
|
48
|
-
other: () => `${e.number(
|
|
46
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
47
|
+
one: () => `${e.number(n.count)} Benachrichtigung`,
|
|
48
|
+
other: () => `${e.number(n.count)} Benachrichtigungen`
|
|
49
49
|
})}.`
|
|
50
50
|
};
|
|
51
51
|
var S = {};
|
|
52
52
|
S = {
|
|
53
53
|
close: "Κλείσιμο",
|
|
54
|
-
notifications: (
|
|
55
|
-
one: () => `${e.number(
|
|
56
|
-
other: () => `${e.number(
|
|
54
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
55
|
+
one: () => `${e.number(n.count)} ειδοποίηση`,
|
|
56
|
+
other: () => `${e.number(n.count)} ειδοποιήσεις`
|
|
57
57
|
})}.`
|
|
58
58
|
};
|
|
59
59
|
var D = {};
|
|
60
60
|
D = {
|
|
61
61
|
close: "Close",
|
|
62
|
-
notifications: (
|
|
63
|
-
one: () => `${e.number(
|
|
64
|
-
other: () => `${e.number(
|
|
62
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
63
|
+
one: () => `${e.number(n.count)} notification`,
|
|
64
|
+
other: () => `${e.number(n.count)} notifications`
|
|
65
65
|
})}.`
|
|
66
66
|
};
|
|
67
67
|
var M = {};
|
|
68
68
|
M = {
|
|
69
69
|
close: "Cerrar",
|
|
70
|
-
notifications: (
|
|
71
|
-
one: () => `${e.number(
|
|
72
|
-
other: () => `${e.number(
|
|
70
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
71
|
+
one: () => `${e.number(n.count)} notificación`,
|
|
72
|
+
other: () => `${e.number(n.count)} notificaciones`
|
|
73
73
|
})}.`
|
|
74
74
|
};
|
|
75
75
|
var H = {};
|
|
76
76
|
H = {
|
|
77
77
|
close: "Sule",
|
|
78
|
-
notifications: (
|
|
79
|
-
one: () => `${e.number(
|
|
80
|
-
other: () => `${e.number(
|
|
78
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
79
|
+
one: () => `${e.number(n.count)} teatis`,
|
|
80
|
+
other: () => `${e.number(n.count)} teatist`
|
|
81
81
|
})}.`
|
|
82
82
|
};
|
|
83
83
|
var O = {};
|
|
84
84
|
O = {
|
|
85
85
|
close: "Sulje",
|
|
86
|
-
notifications: (
|
|
87
|
-
one: () => `${e.number(
|
|
88
|
-
other: () => `${e.number(
|
|
86
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
87
|
+
one: () => `${e.number(n.count)} ilmoitus`,
|
|
88
|
+
other: () => `${e.number(n.count)} ilmoitusta`
|
|
89
89
|
})}.`
|
|
90
90
|
};
|
|
91
91
|
var V = {};
|
|
92
92
|
V = {
|
|
93
93
|
close: "Fermer",
|
|
94
|
-
notifications: (
|
|
95
|
-
one: () => `${e.number(
|
|
96
|
-
other: () => `${e.number(
|
|
94
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
95
|
+
one: () => `${e.number(n.count)} notification`,
|
|
96
|
+
other: () => `${e.number(n.count)} notifications`
|
|
97
97
|
})}.`
|
|
98
98
|
};
|
|
99
99
|
var z = {};
|
|
100
100
|
z = {
|
|
101
101
|
close: "סגור",
|
|
102
|
-
notifications: (
|
|
103
|
-
one: () => `${e.number(
|
|
104
|
-
other: () => `${e.number(
|
|
102
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
103
|
+
one: () => `${e.number(n.count)} התראה`,
|
|
104
|
+
other: () => `${e.number(n.count)} התראות`
|
|
105
105
|
})}.`
|
|
106
106
|
};
|
|
107
107
|
var j = {};
|
|
108
108
|
j = {
|
|
109
109
|
close: "Zatvori",
|
|
110
|
-
notifications: (
|
|
111
|
-
one: () => `${e.number(
|
|
112
|
-
other: () => `${e.number(
|
|
110
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
111
|
+
one: () => `${e.number(n.count)} obavijest`,
|
|
112
|
+
other: () => `${e.number(n.count)} obavijesti`
|
|
113
113
|
})}.`
|
|
114
114
|
};
|
|
115
|
-
var
|
|
116
|
-
|
|
115
|
+
var G = {};
|
|
116
|
+
G = {
|
|
117
117
|
close: "Bezárás",
|
|
118
|
-
notifications: (
|
|
119
|
-
one: () => `${e.number(
|
|
120
|
-
other: () => `${e.number(
|
|
118
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
119
|
+
one: () => `${e.number(n.count)} értesítés`,
|
|
120
|
+
other: () => `${e.number(n.count)} értesítés`
|
|
121
121
|
})}.`
|
|
122
122
|
};
|
|
123
|
-
var
|
|
124
|
-
|
|
123
|
+
var K = {};
|
|
124
|
+
K = {
|
|
125
125
|
close: "Chiudi",
|
|
126
|
-
notifications: (
|
|
127
|
-
one: () => `${e.number(
|
|
128
|
-
other: () => `${e.number(
|
|
126
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
127
|
+
one: () => `${e.number(n.count)} notifica`,
|
|
128
|
+
other: () => `${e.number(n.count)} notifiche`
|
|
129
129
|
})}.`
|
|
130
130
|
};
|
|
131
131
|
var U = {};
|
|
132
132
|
U = {
|
|
133
133
|
close: "閉じる",
|
|
134
|
-
notifications: (
|
|
135
|
-
one: () => `${e.number(
|
|
136
|
-
other: () => `${e.number(
|
|
134
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
135
|
+
one: () => `${e.number(n.count)} 個の通知`,
|
|
136
|
+
other: () => `${e.number(n.count)} 個の通知`
|
|
137
137
|
})}。`
|
|
138
138
|
};
|
|
139
139
|
var W = {};
|
|
140
140
|
W = {
|
|
141
141
|
close: "닫기",
|
|
142
|
-
notifications: (
|
|
143
|
-
one: () => `${e.number(
|
|
144
|
-
other: () => `${e.number(
|
|
142
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
143
|
+
one: () => `${e.number(n.count)}개 알림`,
|
|
144
|
+
other: () => `${e.number(n.count)}개 알림`
|
|
145
145
|
})}.`
|
|
146
146
|
};
|
|
147
147
|
var Z = {};
|
|
148
148
|
Z = {
|
|
149
149
|
close: "Uždaryti",
|
|
150
|
-
notifications: (
|
|
151
|
-
one: () => `${e.number(
|
|
152
|
-
other: () => `${e.number(
|
|
150
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
151
|
+
one: () => `${e.number(n.count)} pranešimas`,
|
|
152
|
+
other: () => `${e.number(n.count)} pranešimai`
|
|
153
153
|
})}.`
|
|
154
154
|
};
|
|
155
155
|
var q = {};
|
|
156
156
|
q = {
|
|
157
157
|
close: "Aizvērt",
|
|
158
|
-
notifications: (
|
|
159
|
-
one: () => `${e.number(
|
|
160
|
-
other: () => `${e.number(
|
|
158
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
159
|
+
one: () => `${e.number(n.count)} paziņojums`,
|
|
160
|
+
other: () => `${e.number(n.count)} paziņojumi`
|
|
161
161
|
})}.`
|
|
162
162
|
};
|
|
163
163
|
var Y = {};
|
|
164
164
|
Y = {
|
|
165
165
|
close: "Lukk",
|
|
166
|
-
notifications: (
|
|
167
|
-
one: () => `${e.number(
|
|
168
|
-
other: () => `${e.number(
|
|
166
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
167
|
+
one: () => `${e.number(n.count)} varsling`,
|
|
168
|
+
other: () => `${e.number(n.count)} varsler`
|
|
169
169
|
})}.`
|
|
170
170
|
};
|
|
171
171
|
var J = {};
|
|
172
172
|
J = {
|
|
173
173
|
close: "Sluiten",
|
|
174
|
-
notifications: (
|
|
175
|
-
one: () => `${e.number(
|
|
176
|
-
other: () => `${e.number(
|
|
174
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
175
|
+
one: () => `${e.number(n.count)} melding`,
|
|
176
|
+
other: () => `${e.number(n.count)} meldingen`
|
|
177
177
|
})}.`
|
|
178
178
|
};
|
|
179
179
|
var Q = {};
|
|
180
180
|
Q = {
|
|
181
181
|
close: "Zamknij",
|
|
182
|
-
notifications: (
|
|
183
|
-
one: () => `${e.number(
|
|
184
|
-
few: () => `${e.number(
|
|
185
|
-
many: () => `${e.number(
|
|
186
|
-
other: () => `${e.number(
|
|
182
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
183
|
+
one: () => `${e.number(n.count)} powiadomienie`,
|
|
184
|
+
few: () => `${e.number(n.count)} powiadomienia`,
|
|
185
|
+
many: () => `${e.number(n.count)} powiadomień`,
|
|
186
|
+
other: () => `${e.number(n.count)} powiadomienia`
|
|
187
187
|
})}.`
|
|
188
188
|
};
|
|
189
189
|
var X = {};
|
|
190
190
|
X = {
|
|
191
191
|
close: "Fechar",
|
|
192
|
-
notifications: (
|
|
193
|
-
one: () => `${e.number(
|
|
194
|
-
other: () => `${e.number(
|
|
192
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
193
|
+
one: () => `${e.number(n.count)} notificação`,
|
|
194
|
+
other: () => `${e.number(n.count)} notificações`
|
|
195
195
|
})}.`
|
|
196
196
|
};
|
|
197
197
|
var ee = {};
|
|
198
198
|
ee = {
|
|
199
199
|
close: "Fechar",
|
|
200
|
-
notifications: (
|
|
201
|
-
one: () => `${e.number(
|
|
202
|
-
other: () => `${e.number(
|
|
200
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
201
|
+
one: () => `${e.number(n.count)} notificação`,
|
|
202
|
+
other: () => `${e.number(n.count)} notificações`
|
|
203
203
|
})}.`
|
|
204
204
|
};
|
|
205
|
-
var
|
|
206
|
-
|
|
205
|
+
var ne = {};
|
|
206
|
+
ne = {
|
|
207
207
|
close: "Închideţi",
|
|
208
|
-
notifications: (
|
|
209
|
-
one: () => `${e.number(
|
|
210
|
-
other: () => `${e.number(
|
|
208
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
209
|
+
one: () => `${e.number(n.count)} notificare`,
|
|
210
|
+
other: () => `${e.number(n.count)} notificări`
|
|
211
211
|
})}.`
|
|
212
212
|
};
|
|
213
|
-
var
|
|
214
|
-
|
|
213
|
+
var te = {};
|
|
214
|
+
te = {
|
|
215
215
|
close: "Закрыть",
|
|
216
|
-
notifications: (
|
|
217
|
-
one: () => `${e.number(
|
|
218
|
-
other: () => `${e.number(
|
|
216
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
217
|
+
one: () => `${e.number(n.count)} уведомление`,
|
|
218
|
+
other: () => `${e.number(n.count)} уведомления`
|
|
219
219
|
})}.`
|
|
220
220
|
};
|
|
221
221
|
var ie = {};
|
|
222
222
|
ie = {
|
|
223
223
|
close: "Zatvoriť",
|
|
224
|
-
notifications: (
|
|
225
|
-
one: () => `${e.number(
|
|
226
|
-
few: () => `${e.number(
|
|
227
|
-
other: () => `${e.number(
|
|
224
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
225
|
+
one: () => `${e.number(n.count)} oznámenie`,
|
|
226
|
+
few: () => `${e.number(n.count)} oznámenia`,
|
|
227
|
+
other: () => `${e.number(n.count)} oznámení`
|
|
228
228
|
})}.`
|
|
229
229
|
};
|
|
230
230
|
var oe = {};
|
|
231
231
|
oe = {
|
|
232
232
|
close: "Zapri",
|
|
233
|
-
notifications: (
|
|
234
|
-
one: () => `${e.number(
|
|
235
|
-
two: () => `${e.number(
|
|
236
|
-
few: () => `${e.number(
|
|
237
|
-
other: () => `${e.number(
|
|
233
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
234
|
+
one: () => `${e.number(n.count)} obvestilo`,
|
|
235
|
+
two: () => `${e.number(n.count)} obvestili`,
|
|
236
|
+
few: () => `${e.number(n.count)} obvestila`,
|
|
237
|
+
other: () => `${e.number(n.count)} obvestil`
|
|
238
238
|
})}.`
|
|
239
239
|
};
|
|
240
240
|
var ue = {};
|
|
241
241
|
ue = {
|
|
242
242
|
close: "Zatvori",
|
|
243
|
-
notifications: (
|
|
244
|
-
one: () => `${e.number(
|
|
245
|
-
other: () => `${e.number(
|
|
243
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
244
|
+
one: () => `${e.number(n.count)} obaveštenje`,
|
|
245
|
+
other: () => `${e.number(n.count)} obaveštenja`
|
|
246
246
|
})}.`
|
|
247
247
|
};
|
|
248
248
|
var ae = {};
|
|
249
249
|
ae = {
|
|
250
250
|
close: "Stäng",
|
|
251
|
-
notifications: (
|
|
252
|
-
one: () => `${e.number(
|
|
253
|
-
other: () => `${e.number(
|
|
251
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
252
|
+
one: () => `${e.number(n.count)} meddelande`,
|
|
253
|
+
other: () => `${e.number(n.count)} meddelanden`
|
|
254
254
|
})}.`
|
|
255
255
|
};
|
|
256
256
|
var se = {};
|
|
257
257
|
se = {
|
|
258
258
|
close: "Kapat",
|
|
259
|
-
notifications: (
|
|
260
|
-
one: () => `${e.number(
|
|
261
|
-
other: () => `${e.number(
|
|
259
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
260
|
+
one: () => `${e.number(n.count)} bildirim`,
|
|
261
|
+
other: () => `${e.number(n.count)} bildirim`
|
|
262
262
|
})}.`
|
|
263
263
|
};
|
|
264
264
|
var re = {};
|
|
265
265
|
re = {
|
|
266
266
|
close: "Закрити",
|
|
267
|
-
notifications: (
|
|
268
|
-
one: () => `${e.number(
|
|
269
|
-
other: () => `${e.number(
|
|
267
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
268
|
+
one: () => `${e.number(n.count)} сповіщення`,
|
|
269
|
+
other: () => `${e.number(n.count)} сповіщення`
|
|
270
270
|
})}.`
|
|
271
271
|
};
|
|
272
272
|
var le = {};
|
|
273
273
|
le = {
|
|
274
274
|
close: "关闭",
|
|
275
|
-
notifications: (
|
|
276
|
-
one: () => `${e.number(
|
|
277
|
-
other: () => `${e.number(
|
|
275
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
276
|
+
one: () => `${e.number(n.count)} 个通知`,
|
|
277
|
+
other: () => `${e.number(n.count)} 个通知`
|
|
278
278
|
})}。`
|
|
279
279
|
};
|
|
280
280
|
var ce = {};
|
|
281
281
|
ce = {
|
|
282
282
|
close: "關閉",
|
|
283
|
-
notifications: (
|
|
284
|
-
one: () => `${e.number(
|
|
285
|
-
other: () => `${e.number(
|
|
283
|
+
notifications: (n, e) => `${e.plural(n.count, {
|
|
284
|
+
one: () => `${e.number(n.count)} 個通知`,
|
|
285
|
+
other: () => `${e.number(n.count)} 個通知`
|
|
286
286
|
})}。`
|
|
287
287
|
};
|
|
288
288
|
var _ = {};
|
|
@@ -300,8 +300,8 @@ _ = {
|
|
|
300
300
|
"fr-FR": V,
|
|
301
301
|
"he-IL": z,
|
|
302
302
|
"hr-HR": j,
|
|
303
|
-
"hu-HU":
|
|
304
|
-
"it-IT":
|
|
303
|
+
"hu-HU": G,
|
|
304
|
+
"it-IT": K,
|
|
305
305
|
"ja-JP": U,
|
|
306
306
|
"ko-KR": W,
|
|
307
307
|
"lt-LT": Z,
|
|
@@ -311,8 +311,8 @@ _ = {
|
|
|
311
311
|
"pl-PL": Q,
|
|
312
312
|
"pt-BR": X,
|
|
313
313
|
"pt-PT": ee,
|
|
314
|
-
"ro-RO":
|
|
315
|
-
"ru-RU":
|
|
314
|
+
"ro-RO": ne,
|
|
315
|
+
"ru-RU": te,
|
|
316
316
|
"sk-SK": ie,
|
|
317
317
|
"sl-SI": oe,
|
|
318
318
|
"sr-SP": ue,
|
|
@@ -322,11 +322,11 @@ _ = {
|
|
|
322
322
|
"zh-CN": le,
|
|
323
323
|
"zh-TW": ce
|
|
324
324
|
};
|
|
325
|
-
function Ce(
|
|
326
|
-
return
|
|
325
|
+
function Ce(n) {
|
|
326
|
+
return n && n.__esModule ? n.default : n;
|
|
327
327
|
}
|
|
328
|
-
function Pe(
|
|
329
|
-
let { key: i, timer: o, timeout: u, animation: a } =
|
|
328
|
+
function Pe(n, e, t) {
|
|
329
|
+
let { key: i, timer: o, timeout: u, animation: a } = n.toast;
|
|
330
330
|
v(() => {
|
|
331
331
|
if (!(o == null || u == null))
|
|
332
332
|
return o.reset(u), () => {
|
|
@@ -347,10 +347,10 @@ function Pe(t, e, n) {
|
|
|
347
347
|
toastProps: {
|
|
348
348
|
role: "alertdialog",
|
|
349
349
|
"aria-modal": "false",
|
|
350
|
-
"aria-label":
|
|
351
|
-
"aria-labelledby":
|
|
352
|
-
"aria-describedby":
|
|
353
|
-
"aria-details":
|
|
350
|
+
"aria-label": n["aria-label"],
|
|
351
|
+
"aria-labelledby": n["aria-labelledby"] || r,
|
|
352
|
+
"aria-describedby": n["aria-describedby"] || $,
|
|
353
|
+
"aria-details": n["aria-details"],
|
|
354
354
|
// Hide toasts that are animating out so VoiceOver doesn't announce them.
|
|
355
355
|
"aria-hidden": a === "exiting" ? "true" : void 0,
|
|
356
356
|
tabIndex: 0
|
|
@@ -375,13 +375,13 @@ function Pe(t, e, n) {
|
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
377
|
const de = 1, g = Symbol.for("react-aria-landmark-manager");
|
|
378
|
-
function Fe(
|
|
379
|
-
return document.addEventListener("react-aria-landmark-manager-change",
|
|
378
|
+
function Fe(n) {
|
|
379
|
+
return document.addEventListener("react-aria-landmark-manager-change", n), () => document.removeEventListener("react-aria-landmark-manager-change", n);
|
|
380
380
|
}
|
|
381
381
|
function B() {
|
|
382
382
|
if (typeof document > "u") return null;
|
|
383
|
-
let
|
|
384
|
-
return
|
|
383
|
+
let n = document[g];
|
|
384
|
+
return n && n.version >= de ? n : (document[g] = new Ne(), document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")), document[g]);
|
|
385
385
|
}
|
|
386
386
|
function Re() {
|
|
387
387
|
return I.useSyncExternalStore(Fe, B, B);
|
|
@@ -405,21 +405,21 @@ class Ne {
|
|
|
405
405
|
capture: !0
|
|
406
406
|
}), this.isListening = !1);
|
|
407
407
|
}
|
|
408
|
-
focusLandmark(e,
|
|
408
|
+
focusLandmark(e, t) {
|
|
409
409
|
var i, o;
|
|
410
|
-
(o = this.landmarks.find((u) => u.ref.current === e)) === null || o === void 0 || (i = o.focus) === null || i === void 0 || i.call(o,
|
|
410
|
+
(o = this.landmarks.find((u) => u.ref.current === e)) === null || o === void 0 || (i = o.focus) === null || i === void 0 || i.call(o, t);
|
|
411
411
|
}
|
|
412
412
|
/**
|
|
413
413
|
* Return set of landmarks with a specific role.
|
|
414
414
|
*/
|
|
415
415
|
getLandmarksByRole(e) {
|
|
416
|
-
return new Set(this.landmarks.filter((
|
|
416
|
+
return new Set(this.landmarks.filter((t) => t.role === e));
|
|
417
417
|
}
|
|
418
418
|
/**
|
|
419
419
|
* Return first landmark with a specific role.
|
|
420
420
|
*/
|
|
421
421
|
getLandmarkByRole(e) {
|
|
422
|
-
return this.landmarks.find((
|
|
422
|
+
return this.landmarks.find((t) => t.role === e);
|
|
423
423
|
}
|
|
424
424
|
addLandmark(e) {
|
|
425
425
|
if (this.setupIfNeeded(), this.landmarks.find((o) => o.ref === e.ref) || !e.ref.current) return;
|
|
@@ -429,22 +429,22 @@ class Ne {
|
|
|
429
429
|
], this.checkLabels(e.role);
|
|
430
430
|
return;
|
|
431
431
|
}
|
|
432
|
-
let
|
|
433
|
-
for (;
|
|
434
|
-
let o = Math.floor((
|
|
435
|
-
!!(u & Node.DOCUMENT_POSITION_PRECEDING || u & Node.DOCUMENT_POSITION_CONTAINS) ?
|
|
432
|
+
let t = 0, i = this.landmarks.length - 1;
|
|
433
|
+
for (; t <= i; ) {
|
|
434
|
+
let o = Math.floor((t + i) / 2), u = e.ref.current.compareDocumentPosition(this.landmarks[o].ref.current);
|
|
435
|
+
!!(u & Node.DOCUMENT_POSITION_PRECEDING || u & Node.DOCUMENT_POSITION_CONTAINS) ? t = o + 1 : i = o - 1;
|
|
436
436
|
}
|
|
437
|
-
this.landmarks.splice(
|
|
437
|
+
this.landmarks.splice(t, 0, e), this.checkLabels(e.role);
|
|
438
438
|
}
|
|
439
439
|
updateLandmark(e) {
|
|
440
|
-
let
|
|
441
|
-
|
|
442
|
-
...this.landmarks[
|
|
440
|
+
let t = this.landmarks.findIndex((i) => i.ref === e.ref);
|
|
441
|
+
t >= 0 && (this.landmarks[t] = {
|
|
442
|
+
...this.landmarks[t],
|
|
443
443
|
...e
|
|
444
|
-
}, this.checkLabels(this.landmarks[
|
|
444
|
+
}, this.checkLabels(this.landmarks[t].role));
|
|
445
445
|
}
|
|
446
446
|
removeLandmark(e) {
|
|
447
|
-
this.landmarks = this.landmarks.filter((
|
|
447
|
+
this.landmarks = this.landmarks.filter((t) => t.ref !== e), this.teardownIfNeeded();
|
|
448
448
|
}
|
|
449
449
|
/**
|
|
450
450
|
* Warn if there are 2+ landmarks with the same role but no label.
|
|
@@ -453,19 +453,19 @@ class Ne {
|
|
|
453
453
|
* See https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/.
|
|
454
454
|
*/
|
|
455
455
|
checkLabels(e) {
|
|
456
|
-
let
|
|
457
|
-
if (
|
|
456
|
+
let t = this.getLandmarksByRole(e);
|
|
457
|
+
if (t.size > 1) {
|
|
458
458
|
let i = [
|
|
459
|
-
...
|
|
459
|
+
...t
|
|
460
460
|
].filter((o) => !o.label);
|
|
461
461
|
if (i.length > 0) console.warn(`Page contains more than one landmark with the '${e}' role. If two or more landmarks on a page share the same role, all must be labeled with an aria-label or aria-labelledby attribute: `, i.map((o) => o.ref.current));
|
|
462
462
|
else {
|
|
463
463
|
let o = [
|
|
464
|
-
...
|
|
464
|
+
...t
|
|
465
465
|
].map((a) => a.label);
|
|
466
466
|
o.filter((a, s) => o.indexOf(a) !== s).forEach((a) => {
|
|
467
467
|
console.warn(`Page contains more than one landmark with the '${e}' role and '${a}' label. If two or more landmarks on a page share the same role, they must have unique labels: `, [
|
|
468
|
-
...
|
|
468
|
+
...t
|
|
469
469
|
].filter((s) => s.label === a).map((s) => s.ref.current));
|
|
470
470
|
});
|
|
471
471
|
}
|
|
@@ -476,12 +476,12 @@ class Ne {
|
|
|
476
476
|
* Returns undefined if no parent is a landmark.
|
|
477
477
|
*/
|
|
478
478
|
closestLandmark(e) {
|
|
479
|
-
let
|
|
479
|
+
let t = new Map(this.landmarks.map((o) => [
|
|
480
480
|
o.ref.current,
|
|
481
481
|
o
|
|
482
482
|
])), i = e;
|
|
483
|
-
for (; i && !
|
|
484
|
-
return
|
|
483
|
+
for (; i && !t.has(i) && i !== document.body && i.parentElement; ) i = i.parentElement;
|
|
484
|
+
return t.get(i);
|
|
485
485
|
}
|
|
486
486
|
/**
|
|
487
487
|
* Gets the next landmark, in DOM focus order, or previous if backwards is specified.
|
|
@@ -489,10 +489,10 @@ class Ne {
|
|
|
489
489
|
* If not inside a landmark, will return first landmark.
|
|
490
490
|
* Returns undefined if there are no landmarks.
|
|
491
491
|
*/
|
|
492
|
-
getNextLandmark(e, { backward:
|
|
492
|
+
getNextLandmark(e, { backward: t }) {
|
|
493
493
|
var i;
|
|
494
|
-
let o = this.closestLandmark(e), u =
|
|
495
|
-
o && (u = this.landmarks.indexOf(o) + (
|
|
494
|
+
let o = this.closestLandmark(e), u = t ? this.landmarks.length - 1 : 0;
|
|
495
|
+
o && (u = this.landmarks.indexOf(o) + (t ? -1 : 1));
|
|
496
496
|
let a = () => {
|
|
497
497
|
if (u < 0) {
|
|
498
498
|
if (!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation", {
|
|
@@ -518,7 +518,7 @@ class Ne {
|
|
|
518
518
|
if (a()) return;
|
|
519
519
|
let s = u;
|
|
520
520
|
for (; !((i = this.landmarks[u].ref.current) === null || i === void 0) && i.closest("[aria-hidden=true]"); ) {
|
|
521
|
-
if (u +=
|
|
521
|
+
if (u += t ? -1 : 1, a()) return;
|
|
522
522
|
if (u === s) break;
|
|
523
523
|
}
|
|
524
524
|
return this.landmarks[u];
|
|
@@ -535,9 +535,9 @@ class Ne {
|
|
|
535
535
|
let e = this.getLandmarkByRole("main");
|
|
536
536
|
return e && e.ref.current && document.contains(e.ref.current) ? (this.focusLandmark(e.ref.current, "forward"), !0) : !1;
|
|
537
537
|
}
|
|
538
|
-
navigate(e,
|
|
538
|
+
navigate(e, t) {
|
|
539
539
|
let i = this.getNextLandmark(e, {
|
|
540
|
-
backward:
|
|
540
|
+
backward: t
|
|
541
541
|
});
|
|
542
542
|
if (!i) return !1;
|
|
543
543
|
if (i.lastFocused) {
|
|
@@ -545,16 +545,16 @@ class Ne {
|
|
|
545
545
|
if (document.body.contains(o))
|
|
546
546
|
return o.focus(), !0;
|
|
547
547
|
}
|
|
548
|
-
return i.ref.current && document.contains(i.ref.current) ? (this.focusLandmark(i.ref.current,
|
|
548
|
+
return i.ref.current && document.contains(i.ref.current) ? (this.focusLandmark(i.ref.current, t ? "backward" : "forward"), !0) : !1;
|
|
549
549
|
}
|
|
550
550
|
/**
|
|
551
551
|
* Sets lastFocused for a landmark, if focus is moved within that landmark.
|
|
552
552
|
* Lets the last focused landmark know it was blurred if something else is focused.
|
|
553
553
|
*/
|
|
554
554
|
focusinHandler(e) {
|
|
555
|
-
let
|
|
556
|
-
|
|
557
|
-
ref:
|
|
555
|
+
let t = this.closestLandmark(e.target);
|
|
556
|
+
t && t.ref.current !== e.target && this.updateLandmark({
|
|
557
|
+
ref: t.ref,
|
|
558
558
|
lastFocused: e.target
|
|
559
559
|
});
|
|
560
560
|
let i = e.relatedTarget;
|
|
@@ -567,25 +567,25 @@ class Ne {
|
|
|
567
567
|
* Track if the focus is lost to the body. If it is, do cleanup on the landmark that last had focus.
|
|
568
568
|
*/
|
|
569
569
|
focusoutHandler(e) {
|
|
570
|
-
let
|
|
570
|
+
let t = e.target, i = e.relatedTarget;
|
|
571
571
|
if (!i || i === document) {
|
|
572
|
-
let o = this.closestLandmark(
|
|
573
|
-
o && o.ref.current ===
|
|
572
|
+
let o = this.closestLandmark(t);
|
|
573
|
+
o && o.ref.current === t && o.blur();
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
createLandmarkController() {
|
|
577
577
|
let e = this;
|
|
578
578
|
return e.refCount++, e.setupIfNeeded(), {
|
|
579
|
-
navigate(
|
|
579
|
+
navigate(t, i) {
|
|
580
580
|
let o = (i == null ? void 0 : i.from) || document.activeElement;
|
|
581
|
-
return e.navigate(o,
|
|
581
|
+
return e.navigate(o, t === "backward");
|
|
582
582
|
},
|
|
583
|
-
focusNext(
|
|
584
|
-
let i = (
|
|
583
|
+
focusNext(t) {
|
|
584
|
+
let i = (t == null ? void 0 : t.from) || document.activeElement;
|
|
585
585
|
return e.navigate(i, !1);
|
|
586
586
|
},
|
|
587
|
-
focusPrevious(
|
|
588
|
-
let i = (
|
|
587
|
+
focusPrevious(t) {
|
|
588
|
+
let i = (t == null ? void 0 : t.from) || document.activeElement;
|
|
589
589
|
return e.navigate(i, !0);
|
|
590
590
|
},
|
|
591
591
|
focusMain() {
|
|
@@ -597,14 +597,14 @@ class Ne {
|
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
599
|
registerLandmark(e) {
|
|
600
|
-
return this.landmarks.find((
|
|
600
|
+
return this.landmarks.find((t) => t.ref === e.ref) ? this.updateLandmark(e) : this.addLandmark(e), () => this.removeLandmark(e.ref);
|
|
601
601
|
}
|
|
602
602
|
constructor() {
|
|
603
603
|
this.landmarks = [], this.isListening = !1, this.refCount = 0, this.version = de, this.f6Handler = this.f6Handler.bind(this), this.focusinHandler = this.focusinHandler.bind(this), this.focusoutHandler = this.focusoutHandler.bind(this);
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
function Se(
|
|
607
|
-
const { role:
|
|
606
|
+
function Se(n, e) {
|
|
607
|
+
const { role: t, "aria-label": i, "aria-labelledby": o, focus: u } = n;
|
|
608
608
|
let a = Re(), s = i || o, [l, r] = ve(!1), $ = T(() => {
|
|
609
609
|
r(!0);
|
|
610
610
|
}, [
|
|
@@ -618,7 +618,7 @@ function Se(t, e) {
|
|
|
618
618
|
if (a) return a.registerLandmark({
|
|
619
619
|
ref: e,
|
|
620
620
|
label: s,
|
|
621
|
-
role:
|
|
621
|
+
role: t,
|
|
622
622
|
focus: u || $,
|
|
623
623
|
blur: d
|
|
624
624
|
});
|
|
@@ -626,7 +626,7 @@ function Se(t, e) {
|
|
|
626
626
|
a,
|
|
627
627
|
s,
|
|
628
628
|
e,
|
|
629
|
-
|
|
629
|
+
t,
|
|
630
630
|
u,
|
|
631
631
|
$,
|
|
632
632
|
d
|
|
@@ -638,33 +638,33 @@ function Se(t, e) {
|
|
|
638
638
|
e
|
|
639
639
|
]), {
|
|
640
640
|
landmarkProps: {
|
|
641
|
-
role:
|
|
641
|
+
role: t,
|
|
642
642
|
tabIndex: l ? -1 : void 0,
|
|
643
643
|
"aria-label": i,
|
|
644
644
|
"aria-labelledby": o
|
|
645
645
|
}
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
|
-
function De(
|
|
649
|
-
return
|
|
648
|
+
function De(n) {
|
|
649
|
+
return n && n.__esModule ? n.default : n;
|
|
650
650
|
}
|
|
651
|
-
function Me(
|
|
651
|
+
function Me(n, e, t) {
|
|
652
652
|
let i = w(De(_), "@react-aria/toast"), { landmarkProps: o } = Se({
|
|
653
653
|
role: "region",
|
|
654
|
-
"aria-label":
|
|
654
|
+
"aria-label": n["aria-label"] || i.format("notifications", {
|
|
655
655
|
count: e.visibleToasts.length
|
|
656
656
|
})
|
|
657
|
-
},
|
|
657
|
+
}, t), { hoverProps: u } = Te({
|
|
658
658
|
onHoverStart: e.pauseAll,
|
|
659
659
|
onHoverEnd: e.resumeAll
|
|
660
660
|
}), a = x([]), s = x(e.visibleToasts), l = x(null);
|
|
661
661
|
A(() => {
|
|
662
|
-
if (l.current === -1 || e.visibleToasts.length === 0 || !
|
|
662
|
+
if (l.current === -1 || e.visibleToasts.length === 0 || !t.current) {
|
|
663
663
|
a.current = [], s.current = e.visibleToasts;
|
|
664
664
|
return;
|
|
665
665
|
}
|
|
666
666
|
if (a.current = [
|
|
667
|
-
...
|
|
667
|
+
...t.current.querySelectorAll('[role="alertdialog"]')
|
|
668
668
|
], s.current.length === e.visibleToasts.length && e.visibleToasts.every((c, f) => c.key === s.current[f].key)) {
|
|
669
669
|
s.current = e.visibleToasts;
|
|
670
670
|
return;
|
|
@@ -690,7 +690,7 @@ function Me(t, e, n) {
|
|
|
690
690
|
s.current = e.visibleToasts;
|
|
691
691
|
}, [
|
|
692
692
|
e.visibleToasts,
|
|
693
|
-
|
|
693
|
+
t
|
|
694
694
|
]);
|
|
695
695
|
let r = x(null), { focusWithinProps: $ } = ge({
|
|
696
696
|
onFocusWithin: (d) => {
|
|
@@ -703,12 +703,12 @@ function Me(t, e, n) {
|
|
|
703
703
|
return v(() => {
|
|
704
704
|
e.visibleToasts.length === 0 && r.current && document.body.contains(r.current) && (L() === "pointer" ? k(r.current) : r.current.focus(), r.current = null);
|
|
705
705
|
}, [
|
|
706
|
-
|
|
706
|
+
t,
|
|
707
707
|
e.visibleToasts.length
|
|
708
708
|
]), v(() => () => {
|
|
709
709
|
r.current && document.body.contains(r.current) && (L() === "pointer" ? k(r.current) : r.current.focus(), r.current = null);
|
|
710
710
|
}, [
|
|
711
|
-
|
|
711
|
+
t
|
|
712
712
|
]), {
|
|
713
713
|
regionProps: ye(o, u, $, {
|
|
714
714
|
tabIndex: -1,
|
|
@@ -730,29 +730,29 @@ function Me(t, e, n) {
|
|
|
730
730
|
})
|
|
731
731
|
};
|
|
732
732
|
}
|
|
733
|
-
function He(
|
|
734
|
-
let { maxVisibleToasts: e = 1, hasExitAnimation:
|
|
733
|
+
function He(n = {}) {
|
|
734
|
+
let { maxVisibleToasts: e = 1, hasExitAnimation: t = !1 } = n, i = xe(() => new be({
|
|
735
735
|
maxVisibleToasts: e,
|
|
736
|
-
hasExitAnimation:
|
|
736
|
+
hasExitAnimation: t
|
|
737
737
|
}), [
|
|
738
738
|
e,
|
|
739
|
-
|
|
739
|
+
t
|
|
740
740
|
]);
|
|
741
741
|
return fe(i);
|
|
742
742
|
}
|
|
743
|
-
function fe(
|
|
744
|
-
let e = T((o) =>
|
|
745
|
-
|
|
746
|
-
]),
|
|
747
|
-
|
|
743
|
+
function fe(n) {
|
|
744
|
+
let e = T((o) => n.subscribe(o), [
|
|
745
|
+
n
|
|
746
|
+
]), t = T(() => n.visibleToasts, [
|
|
747
|
+
n
|
|
748
748
|
]);
|
|
749
749
|
return {
|
|
750
|
-
visibleToasts: I.useSyncExternalStore(e,
|
|
751
|
-
add: (o, u) =>
|
|
752
|
-
close: (o) =>
|
|
753
|
-
remove: (o) =>
|
|
754
|
-
pauseAll: () =>
|
|
755
|
-
resumeAll: () =>
|
|
750
|
+
visibleToasts: I.useSyncExternalStore(e, t, t),
|
|
751
|
+
add: (o, u) => n.add(o, u),
|
|
752
|
+
close: (o) => n.close(o),
|
|
753
|
+
remove: (o) => n.remove(o),
|
|
754
|
+
pauseAll: () => n.pauseAll(),
|
|
755
|
+
resumeAll: () => n.resumeAll()
|
|
756
756
|
};
|
|
757
757
|
}
|
|
758
758
|
class be {
|
|
@@ -761,12 +761,12 @@ class be {
|
|
|
761
761
|
return this.subscriptions.add(e), () => this.subscriptions.delete(e);
|
|
762
762
|
}
|
|
763
763
|
/** Adds a new toast to the queue. */
|
|
764
|
-
add(e,
|
|
764
|
+
add(e, t = {}) {
|
|
765
765
|
let i = Math.random().toString(36), o = {
|
|
766
|
-
...
|
|
766
|
+
...t,
|
|
767
767
|
content: e,
|
|
768
768
|
key: i,
|
|
769
|
-
timer:
|
|
769
|
+
timer: t.timeout ? new Oe(() => this.close(i), t.timeout) : void 0
|
|
770
770
|
}, u = 0, a = this.queue.length;
|
|
771
771
|
for (; u < a; ) {
|
|
772
772
|
let l = Math.floor((u + a) / 2);
|
|
@@ -784,10 +784,10 @@ class be {
|
|
|
784
784
|
* transitions to an "exiting" state instead of being removed immediately.
|
|
785
785
|
*/
|
|
786
786
|
close(e) {
|
|
787
|
-
let
|
|
788
|
-
if (
|
|
787
|
+
let t = this.queue.findIndex((u) => u.key === e);
|
|
788
|
+
if (t >= 0) {
|
|
789
789
|
var i, o;
|
|
790
|
-
(i = (o = this.queue[
|
|
790
|
+
(i = (o = this.queue[t]).onClose) === null || i === void 0 || i.call(o), this.queue.splice(t, 1);
|
|
791
791
|
}
|
|
792
792
|
this.updateVisibleToasts({
|
|
793
793
|
action: "close",
|
|
@@ -802,8 +802,8 @@ class be {
|
|
|
802
802
|
});
|
|
803
803
|
}
|
|
804
804
|
updateVisibleToasts(e) {
|
|
805
|
-
let { action:
|
|
806
|
-
if (
|
|
805
|
+
let { action: t, key: i } = e, o = this.queue.slice(0, this.maxVisibleToasts);
|
|
806
|
+
if (t === "add" && this.hasExitAnimation) {
|
|
807
807
|
let u = this.visibleToasts.filter((a) => !o.some((s) => a.key === s.key)).map((a) => ({
|
|
808
808
|
...a,
|
|
809
809
|
animation: "exiting"
|
|
@@ -812,7 +812,7 @@ class be {
|
|
|
812
812
|
var l, r;
|
|
813
813
|
return ((l = s.priority) !== null && l !== void 0 ? l : 0) - ((r = a.priority) !== null && r !== void 0 ? r : 0);
|
|
814
814
|
});
|
|
815
|
-
} else
|
|
815
|
+
} else t === "close" && this.hasExitAnimation ? this.visibleToasts = this.visibleToasts.map((u) => u.key !== i ? u : {
|
|
816
816
|
...u,
|
|
817
817
|
animation: "exiting"
|
|
818
818
|
}) : this.visibleToasts = o;
|
|
@@ -828,8 +828,8 @@ class be {
|
|
|
828
828
|
}
|
|
829
829
|
constructor(e) {
|
|
830
830
|
this.queue = [], this.subscriptions = /* @__PURE__ */ new Set(), this.visibleToasts = [];
|
|
831
|
-
var
|
|
832
|
-
this.maxVisibleToasts = (
|
|
831
|
+
var t;
|
|
832
|
+
this.maxVisibleToasts = (t = e == null ? void 0 : e.maxVisibleToasts) !== null && t !== void 0 ? t : 1;
|
|
833
833
|
var i;
|
|
834
834
|
this.hasExitAnimation = (i = e == null ? void 0 : e.hasExitAnimation) !== null && i !== void 0 ? i : !1;
|
|
835
835
|
}
|
|
@@ -846,16 +846,16 @@ class Oe {
|
|
|
846
846
|
this.timerId = null, this.remaining = 0, this.callback();
|
|
847
847
|
}, this.remaining));
|
|
848
848
|
}
|
|
849
|
-
constructor(e,
|
|
850
|
-
this.startTime = null, this.remaining =
|
|
849
|
+
constructor(e, t) {
|
|
850
|
+
this.startTime = null, this.remaining = t, this.callback = e;
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
|
-
const Ve = '"../theme/tokens.css"', ze = '"Inter", sans-serif', je = "#d5f2d9",
|
|
853
|
+
const Ve = '"../theme/tokens.css"', ze = '"Inter", sans-serif', je = "#d5f2d9", Ge = "#008d3c", Ke = "#eaf2f6", Ue = "#0066cc", We = "#fff8e1", Ze = "#f1c21b", qe = "#ffdfdf", Ye = "#e62323", Je = "#1f1f1f", Qe = "0 0 0 2px #ffffff, 0 0 0 4px #000000", Xe = "(min-width: 768px)", en = "_toastRegion_i4o11_52", nn = "_toast_i4o11_52", tn = "_success_i4o11_96", on = "_info_i4o11_104", un = "_important_i4o11_112", an = "_warning_i4o11_120", sn = "_icon_i4o11_128", rn = "_toastContent_i4o11_138", ln = "_toastMessage_i4o11_145", cn = "_slideInTop_i4o11_1", dn = "_slideInEnd_i4o11_1", fn = "_slideOutTop_i4o11_1", bn = "_slideOutEnd_i4o11_1", p = {
|
|
854
854
|
tokens: Ve,
|
|
855
855
|
display: ze,
|
|
856
856
|
signalGreen10: je,
|
|
857
|
-
signalGreen100:
|
|
858
|
-
signalBlue10:
|
|
857
|
+
signalGreen100: Ge,
|
|
858
|
+
signalBlue10: Ke,
|
|
859
859
|
signalBlue100: Ue,
|
|
860
860
|
signalYellow10: We,
|
|
861
861
|
signalYellow100: Ze,
|
|
@@ -864,94 +864,94 @@ const Ve = '"../theme/tokens.css"', ze = '"Inter", sans-serif', je = "#d5f2d9",
|
|
|
864
864
|
gray150: Je,
|
|
865
865
|
focus: Qe,
|
|
866
866
|
mdBreakpoint: Xe,
|
|
867
|
-
toastRegion:
|
|
868
|
-
toast:
|
|
869
|
-
success:
|
|
870
|
-
info:
|
|
871
|
-
important:
|
|
872
|
-
warning:
|
|
873
|
-
icon:
|
|
874
|
-
toastContent:
|
|
875
|
-
toastMessage:
|
|
876
|
-
slideInTop:
|
|
877
|
-
slideInEnd:
|
|
878
|
-
slideOutTop:
|
|
879
|
-
slideOutEnd:
|
|
880
|
-
},
|
|
867
|
+
toastRegion: en,
|
|
868
|
+
toast: nn,
|
|
869
|
+
success: tn,
|
|
870
|
+
info: on,
|
|
871
|
+
important: un,
|
|
872
|
+
warning: an,
|
|
873
|
+
icon: sn,
|
|
874
|
+
toastContent: rn,
|
|
875
|
+
toastMessage: ln,
|
|
876
|
+
slideInTop: cn,
|
|
877
|
+
slideInEnd: dn,
|
|
878
|
+
slideOutTop: fn,
|
|
879
|
+
slideOutEnd: bn
|
|
880
|
+
}, mn = {
|
|
881
881
|
success: Be,
|
|
882
882
|
info: Ae,
|
|
883
883
|
important: we,
|
|
884
884
|
warning: Ie
|
|
885
|
-
},
|
|
885
|
+
}, hn = new be({
|
|
886
886
|
maxVisibleToasts: 5,
|
|
887
887
|
hasExitAnimation: !0
|
|
888
|
-
}),
|
|
889
|
-
const e = fe(
|
|
888
|
+
}), Bn = (n) => {
|
|
889
|
+
const e = fe(hn);
|
|
890
890
|
return e.visibleToasts.length > 0 ? _e(
|
|
891
891
|
/* @__PURE__ */ h(
|
|
892
892
|
me,
|
|
893
893
|
{
|
|
894
|
-
...
|
|
894
|
+
...n,
|
|
895
895
|
state: e
|
|
896
896
|
}
|
|
897
897
|
),
|
|
898
898
|
document.body
|
|
899
899
|
) : null;
|
|
900
|
-
},
|
|
901
|
-
const
|
|
900
|
+
}, An = ({ children: n, ...e }) => {
|
|
901
|
+
const t = He({
|
|
902
902
|
maxVisibleToasts: 5,
|
|
903
903
|
hasExitAnimation: !0
|
|
904
904
|
});
|
|
905
905
|
return /* @__PURE__ */ E(he, { children: [
|
|
906
|
-
typeof
|
|
907
|
-
|
|
906
|
+
typeof n == "function" ? n(t) : n,
|
|
907
|
+
t.visibleToasts.length > 0 && /* @__PURE__ */ h(
|
|
908
908
|
me,
|
|
909
909
|
{
|
|
910
910
|
...e,
|
|
911
|
-
state:
|
|
911
|
+
state: t
|
|
912
912
|
}
|
|
913
913
|
)
|
|
914
914
|
] });
|
|
915
915
|
};
|
|
916
916
|
function me({
|
|
917
|
-
state:
|
|
917
|
+
state: n,
|
|
918
918
|
...e
|
|
919
919
|
}) {
|
|
920
|
-
const
|
|
920
|
+
const t = y.useRef(null), { regionProps: i } = Me(e, n, t);
|
|
921
921
|
return /* @__PURE__ */ h(
|
|
922
922
|
"div",
|
|
923
923
|
{
|
|
924
924
|
...i,
|
|
925
|
-
ref:
|
|
925
|
+
ref: t,
|
|
926
926
|
className: p.toastRegion,
|
|
927
|
-
children:
|
|
928
|
-
|
|
927
|
+
children: n.visibleToasts.map((o) => /* @__PURE__ */ h(
|
|
928
|
+
$n,
|
|
929
929
|
{
|
|
930
930
|
toast: o,
|
|
931
|
-
state:
|
|
931
|
+
state: n
|
|
932
932
|
},
|
|
933
933
|
o.key
|
|
934
934
|
))
|
|
935
935
|
}
|
|
936
936
|
);
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
state:
|
|
938
|
+
function $n({
|
|
939
|
+
state: n,
|
|
940
940
|
...e
|
|
941
941
|
}) {
|
|
942
|
-
const
|
|
942
|
+
const t = y.useRef(null), { toastProps: i, contentProps: o, titleProps: u, closeButtonProps: a } = Pe(
|
|
943
943
|
e,
|
|
944
|
-
|
|
945
|
-
), s =
|
|
944
|
+
n
|
|
945
|
+
), s = mn[e.toast.content.type];
|
|
946
946
|
return /* @__PURE__ */ E(
|
|
947
947
|
"div",
|
|
948
948
|
{
|
|
949
949
|
...i,
|
|
950
|
-
ref:
|
|
950
|
+
ref: t,
|
|
951
951
|
className: pe(p.toast, p[e.toast.content.type]),
|
|
952
952
|
"data-animation": e.toast.animation,
|
|
953
953
|
onAnimationEnd: () => {
|
|
954
|
-
e.toast.animation === "exiting" &&
|
|
954
|
+
e.toast.animation === "exiting" && n.remove(e.toast.key);
|
|
955
955
|
},
|
|
956
956
|
children: [
|
|
957
957
|
/* @__PURE__ */ E(
|
|
@@ -1001,9 +1001,9 @@ function ht({
|
|
|
1001
1001
|
);
|
|
1002
1002
|
}
|
|
1003
1003
|
export {
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1004
|
+
Bn as GlobalToastRegion,
|
|
1005
|
+
$n as Toast,
|
|
1006
|
+
An as ToastProvider,
|
|
1007
1007
|
me as ToastRegion,
|
|
1008
|
-
|
|
1008
|
+
hn as toastQueue
|
|
1009
1009
|
};
|