@cerberus-design/react 0.14.2-next-6531b4c → 0.14.2-next-d5ed509
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/build/legacy/_tsup-dts-rollup.d.cts +77 -1
- package/build/legacy/components/Notification.cjs +1 -0
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/context/notification-center/store.cjs +66 -0
- package/build/legacy/context/notification-center/store.cjs.map +1 -0
- package/build/legacy/context/notification-center/types.cjs +19 -0
- package/build/legacy/context/notification-center/types.cjs.map +1 -0
- package/build/legacy/context/notification-center.cjs +102 -58
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/index.cjs +102 -58
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +77 -1
- package/build/modern/{chunk-JQCRDZNI.js → chunk-BAWZBF5Q.js} +4 -4
- package/build/modern/{chunk-UMF2TWZN.js → chunk-D252JE4V.js} +7 -7
- package/build/modern/{chunk-KF35CYT4.js → chunk-RDRD6ACD.js} +2 -1
- package/build/modern/{chunk-KF35CYT4.js.map → chunk-RDRD6ACD.js.map} +1 -1
- package/build/modern/{chunk-EMNBMH7Z.js → chunk-USYM6XU6.js} +4 -4
- package/build/modern/chunk-V3M3ZOQI.js +38 -0
- package/build/modern/chunk-V3M3ZOQI.js.map +1 -0
- package/build/modern/{chunk-Z64YZ5IH.js → chunk-XDDLXEFV.js} +13 -13
- package/build/modern/{chunk-CCTLGF5U.js → chunk-YJI4Y7BH.js} +13 -13
- package/build/modern/chunk-YLMGZAKU.js +180 -0
- package/build/modern/chunk-YLMGZAKU.js.map +1 -0
- package/build/modern/{chunk-QKZZHZL4.js → chunk-ZHBHPMTP.js} +16 -16
- package/build/modern/components/AccordionItemGroup.js +3 -3
- package/build/modern/components/DatePicker.client.js +3 -3
- package/build/modern/components/FileStatus.js +2 -2
- package/build/modern/components/Notification.js +1 -1
- package/build/modern/context/confirm-modal.js +5 -5
- package/build/modern/context/cta-modal.js +5 -5
- package/build/modern/context/notification-center/store.js +15 -0
- package/build/modern/context/notification-center/store.js.map +1 -0
- package/build/modern/context/notification-center/types.js +1 -0
- package/build/modern/context/notification-center/types.js.map +1 -0
- package/build/modern/context/notification-center.js +4 -3
- package/build/modern/context/prompt-modal.js +6 -6
- package/build/modern/index.js +76 -75
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Notification.tsx +2 -0
- package/src/context/notification-center/store.ts +88 -0
- package/src/context/notification-center/types.ts +28 -0
- package/src/context/notification-center.tsx +81 -46
- package/build/modern/chunk-N3L3PEMF.js +0 -162
- package/build/modern/chunk-N3L3PEMF.js.map +0 -1
- /package/build/modern/{chunk-JQCRDZNI.js.map → chunk-BAWZBF5Q.js.map} +0 -0
- /package/build/modern/{chunk-UMF2TWZN.js.map → chunk-D252JE4V.js.map} +0 -0
- /package/build/modern/{chunk-EMNBMH7Z.js.map → chunk-USYM6XU6.js.map} +0 -0
- /package/build/modern/{chunk-Z64YZ5IH.js.map → chunk-XDDLXEFV.js.map} +0 -0
- /package/build/modern/{chunk-CCTLGF5U.js.map → chunk-YJI4Y7BH.js.map} +0 -0
- /package/build/modern/{chunk-QKZZHZL4.js.map → chunk-ZHBHPMTP.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AccordionItemGroup
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-BUVVRQLZ.js";
|
|
3
|
+
} from "../chunk-BAWZBF5Q.js";
|
|
5
4
|
import "../chunk-XZGXRRSQ.js";
|
|
6
|
-
import "../chunk-GITT5645.js";
|
|
7
5
|
import "../chunk-IGHMP4WA.js";
|
|
6
|
+
import "../chunk-BUVVRQLZ.js";
|
|
7
|
+
import "../chunk-GITT5645.js";
|
|
8
8
|
export {
|
|
9
9
|
AccordionItemGroup
|
|
10
10
|
};
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
DatePickerViewControlGroup,
|
|
11
11
|
DatePickerYearView,
|
|
12
12
|
RangePickerInput
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-D252JE4V.js";
|
|
14
14
|
import "../chunk-IQJDVFPP.js";
|
|
15
|
-
import "../chunk-5EWCH7AI.js";
|
|
16
15
|
import "../chunk-APD6IX5R.js";
|
|
17
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-5EWCH7AI.js";
|
|
18
17
|
import "../chunk-UZDVOIW5.js";
|
|
19
18
|
import "../chunk-GITT5645.js";
|
|
19
|
+
import "../chunk-EXGKZGML.js";
|
|
20
20
|
export {
|
|
21
21
|
DatePicker,
|
|
22
22
|
DatePickerCalendar,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
FileStatus,
|
|
4
4
|
processStatus
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-USYM6XU6.js";
|
|
6
6
|
import "../chunk-WZJ5UQNM.js";
|
|
7
7
|
import "../chunk-APD6IX5R.js";
|
|
8
8
|
import "../chunk-JWIJHSI6.js";
|
|
9
|
-
import "../chunk-GCQMH4QA.js";
|
|
10
9
|
import "../chunk-UZDVOIW5.js";
|
|
10
|
+
import "../chunk-GCQMH4QA.js";
|
|
11
11
|
import "../chunk-BUVVRQLZ.js";
|
|
12
12
|
import "../chunk-GITT5645.js";
|
|
13
13
|
export {
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ConfirmModal,
|
|
4
4
|
useConfirmModal
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-XY6WL55R.js";
|
|
7
|
-
import "../chunk-2UXE5PDG.js";
|
|
5
|
+
} from "../chunk-YJI4Y7BH.js";
|
|
8
6
|
import "../chunk-BE4EOU2P.js";
|
|
9
7
|
import "../chunk-Q7BRMIBR.js";
|
|
8
|
+
import "../chunk-XY6WL55R.js";
|
|
9
|
+
import "../chunk-2UXE5PDG.js";
|
|
10
10
|
import "../chunk-IQJDVFPP.js";
|
|
11
11
|
import "../chunk-GCQMH4QA.js";
|
|
12
|
-
import "../chunk-EXGKZGML.js";
|
|
13
12
|
import "../chunk-BUVVRQLZ.js";
|
|
14
|
-
import "../chunk-KGQG5JGW.js";
|
|
15
13
|
import "../chunk-GITT5645.js";
|
|
14
|
+
import "../chunk-EXGKZGML.js";
|
|
15
|
+
import "../chunk-KGQG5JGW.js";
|
|
16
16
|
import "../chunk-JIZQFTW6.js";
|
|
17
17
|
export {
|
|
18
18
|
ConfirmModal,
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CTAModal,
|
|
4
4
|
useCTAModal
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-XY6WL55R.js";
|
|
7
|
-
import "../chunk-2UXE5PDG.js";
|
|
5
|
+
} from "../chunk-XDDLXEFV.js";
|
|
8
6
|
import "../chunk-BE4EOU2P.js";
|
|
9
7
|
import "../chunk-Q7BRMIBR.js";
|
|
8
|
+
import "../chunk-XY6WL55R.js";
|
|
9
|
+
import "../chunk-2UXE5PDG.js";
|
|
10
10
|
import "../chunk-IQJDVFPP.js";
|
|
11
11
|
import "../chunk-APD6IX5R.js";
|
|
12
12
|
import "../chunk-GCQMH4QA.js";
|
|
13
|
-
import "../chunk-EXGKZGML.js";
|
|
14
13
|
import "../chunk-BUVVRQLZ.js";
|
|
15
|
-
import "../chunk-KGQG5JGW.js";
|
|
16
14
|
import "../chunk-GITT5645.js";
|
|
15
|
+
import "../chunk-EXGKZGML.js";
|
|
16
|
+
import "../chunk-KGQG5JGW.js";
|
|
17
17
|
import "../chunk-JIZQFTW6.js";
|
|
18
18
|
export {
|
|
19
19
|
CTAModal,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addNotification,
|
|
3
|
+
clearNotificationState,
|
|
4
|
+
notificationCenterReducer,
|
|
5
|
+
removeNotification,
|
|
6
|
+
updateNotificationState
|
|
7
|
+
} from "../../chunk-V3M3ZOQI.js";
|
|
8
|
+
export {
|
|
9
|
+
addNotification,
|
|
10
|
+
clearNotificationState,
|
|
11
|
+
notificationCenterReducer,
|
|
12
|
+
removeNotification,
|
|
13
|
+
updateNotificationState
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
NotificationCenter,
|
|
4
4
|
useNotificationCenter
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-KF35CYT4.js";
|
|
5
|
+
} from "../chunk-YLMGZAKU.js";
|
|
7
6
|
import "../chunk-UXY3KCC3.js";
|
|
8
7
|
import "../chunk-SLHYBPJ5.js";
|
|
8
|
+
import "../chunk-RDRD6ACD.js";
|
|
9
9
|
import "../chunk-IQJDVFPP.js";
|
|
10
|
-
import "../chunk-EXGKZGML.js";
|
|
11
10
|
import "../chunk-BUVVRQLZ.js";
|
|
12
11
|
import "../chunk-GITT5645.js";
|
|
12
|
+
import "../chunk-EXGKZGML.js";
|
|
13
|
+
import "../chunk-V3M3ZOQI.js";
|
|
13
14
|
import "../chunk-JIZQFTW6.js";
|
|
14
15
|
export {
|
|
15
16
|
NotificationCenter,
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
import {
|
|
3
3
|
PromptModal,
|
|
4
4
|
usePromptModal
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-ZHBHPMTP.js";
|
|
6
|
+
import "../chunk-BE4EOU2P.js";
|
|
7
|
+
import "../chunk-Q7BRMIBR.js";
|
|
6
8
|
import "../chunk-XY6WL55R.js";
|
|
7
9
|
import "../chunk-2UXE5PDG.js";
|
|
8
10
|
import "../chunk-MZ3UCDUL.js";
|
|
9
11
|
import "../chunk-NMF2HYWO.js";
|
|
10
|
-
import "../chunk-BE4EOU2P.js";
|
|
11
|
-
import "../chunk-Q7BRMIBR.js";
|
|
12
12
|
import "../chunk-IQJDVFPP.js";
|
|
13
|
-
import "../chunk-GCQMH4QA.js";
|
|
14
|
-
import "../chunk-EXGKZGML.js";
|
|
15
13
|
import "../chunk-UZDVOIW5.js";
|
|
14
|
+
import "../chunk-GCQMH4QA.js";
|
|
16
15
|
import "../chunk-BUVVRQLZ.js";
|
|
17
|
-
import "../chunk-KGQG5JGW.js";
|
|
18
16
|
import "../chunk-GITT5645.js";
|
|
17
|
+
import "../chunk-EXGKZGML.js";
|
|
18
|
+
import "../chunk-KGQG5JGW.js";
|
|
19
19
|
import "../chunk-JIZQFTW6.js";
|
|
20
20
|
export {
|
|
21
21
|
PromptModal,
|
package/build/modern/index.js
CHANGED
|
@@ -1,26 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NotificationCenter,
|
|
3
|
+
useNotificationCenter
|
|
4
|
+
} from "./chunk-YLMGZAKU.js";
|
|
1
5
|
import {
|
|
2
6
|
PromptModal,
|
|
3
7
|
usePromptModal
|
|
4
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZHBHPMTP.js";
|
|
5
9
|
import {
|
|
6
10
|
ThemeProvider,
|
|
7
11
|
useThemeContext
|
|
8
12
|
} from "./chunk-EB37HRCN.js";
|
|
13
|
+
import {
|
|
14
|
+
Thead
|
|
15
|
+
} from "./chunk-Y6QQCRQV.js";
|
|
16
|
+
import {
|
|
17
|
+
Toggle
|
|
18
|
+
} from "./chunk-XQICKZH4.js";
|
|
9
19
|
import {
|
|
10
20
|
Tooltip
|
|
11
21
|
} from "./chunk-LPALHB6R.js";
|
|
12
22
|
import {
|
|
13
23
|
ConfirmModal,
|
|
14
24
|
useConfirmModal
|
|
15
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-YJI4Y7BH.js";
|
|
16
26
|
import {
|
|
17
27
|
CTAModal,
|
|
18
28
|
useCTAModal
|
|
19
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-XDDLXEFV.js";
|
|
20
30
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} from "./chunk-
|
|
31
|
+
Table,
|
|
32
|
+
Tr
|
|
33
|
+
} from "./chunk-B4CVET74.js";
|
|
34
|
+
import {
|
|
35
|
+
Tab,
|
|
36
|
+
TabIndicator,
|
|
37
|
+
TabList,
|
|
38
|
+
TabPanel,
|
|
39
|
+
TabsList
|
|
40
|
+
} from "./chunk-N7O6D7BW.js";
|
|
41
|
+
import {
|
|
42
|
+
Tabs,
|
|
43
|
+
TabsContext,
|
|
44
|
+
useTabsContext
|
|
45
|
+
} from "./chunk-RZ7NG77U.js";
|
|
24
46
|
import {
|
|
25
47
|
Tag
|
|
26
48
|
} from "./chunk-EDARV2EI.js";
|
|
@@ -40,11 +62,11 @@ import {
|
|
|
40
62
|
Th
|
|
41
63
|
} from "./chunk-SGKHA4EB.js";
|
|
42
64
|
import {
|
|
43
|
-
|
|
44
|
-
} from "./chunk-
|
|
65
|
+
NotificationDescription
|
|
66
|
+
} from "./chunk-UXY3KCC3.js";
|
|
45
67
|
import {
|
|
46
|
-
|
|
47
|
-
} from "./chunk-
|
|
68
|
+
NotificationHeading
|
|
69
|
+
} from "./chunk-SLHYBPJ5.js";
|
|
48
70
|
import {
|
|
49
71
|
Radio
|
|
50
72
|
} from "./chunk-FTPZHG6J.js";
|
|
@@ -56,21 +78,11 @@ import {
|
|
|
56
78
|
Spinner
|
|
57
79
|
} from "./chunk-7SYJFI5E.js";
|
|
58
80
|
import {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} from "./chunk-B4CVET74.js";
|
|
62
|
-
import {
|
|
63
|
-
Tab,
|
|
64
|
-
TabIndicator,
|
|
65
|
-
TabList,
|
|
66
|
-
TabPanel,
|
|
67
|
-
TabsList
|
|
68
|
-
} from "./chunk-N7O6D7BW.js";
|
|
81
|
+
Modal
|
|
82
|
+
} from "./chunk-BE4EOU2P.js";
|
|
69
83
|
import {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
useTabsContext
|
|
73
|
-
} from "./chunk-RZ7NG77U.js";
|
|
84
|
+
ModalDescription
|
|
85
|
+
} from "./chunk-Q7BRMIBR.js";
|
|
74
86
|
import {
|
|
75
87
|
ModalHeader
|
|
76
88
|
} from "./chunk-XY6WL55R.js";
|
|
@@ -93,13 +105,17 @@ import {
|
|
|
93
105
|
} from "./chunk-6WS765J3.js";
|
|
94
106
|
import {
|
|
95
107
|
Notification
|
|
96
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-RDRD6ACD.js";
|
|
97
109
|
import {
|
|
98
|
-
|
|
99
|
-
} from "./chunk-
|
|
110
|
+
FieldsetLabel
|
|
111
|
+
} from "./chunk-PZAZKQMO.js";
|
|
100
112
|
import {
|
|
101
|
-
|
|
102
|
-
|
|
113
|
+
FileStatus,
|
|
114
|
+
processStatus
|
|
115
|
+
} from "./chunk-USYM6XU6.js";
|
|
116
|
+
import {
|
|
117
|
+
ProgressBar
|
|
118
|
+
} from "./chunk-WZJ5UQNM.js";
|
|
103
119
|
import {
|
|
104
120
|
FileUploader
|
|
105
121
|
} from "./chunk-25HMVHLT.js";
|
|
@@ -122,11 +138,11 @@ import {
|
|
|
122
138
|
MenuTrigger
|
|
123
139
|
} from "./chunk-RUR5MV54.js";
|
|
124
140
|
import {
|
|
125
|
-
|
|
126
|
-
} from "./chunk-
|
|
141
|
+
Checkbox
|
|
142
|
+
} from "./chunk-N24COMHJ.js";
|
|
127
143
|
import {
|
|
128
|
-
|
|
129
|
-
} from "./chunk-
|
|
144
|
+
CircularProgress
|
|
145
|
+
} from "./chunk-6QHOKCV3.js";
|
|
130
146
|
import {
|
|
131
147
|
DatePicker,
|
|
132
148
|
DatePickerCalendar,
|
|
@@ -138,10 +154,13 @@ import {
|
|
|
138
154
|
DatePickerViewControlGroup,
|
|
139
155
|
DatePickerYearView,
|
|
140
156
|
RangePickerInput
|
|
141
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-D252JE4V.js";
|
|
142
158
|
import {
|
|
143
159
|
Portal
|
|
144
160
|
} from "./chunk-IQJDVFPP.js";
|
|
161
|
+
import {
|
|
162
|
+
IconButton
|
|
163
|
+
} from "./chunk-APD6IX5R.js";
|
|
145
164
|
import {
|
|
146
165
|
DatePickerContext,
|
|
147
166
|
DatePickerLabel,
|
|
@@ -162,28 +181,28 @@ import {
|
|
|
162
181
|
FeatureFlags,
|
|
163
182
|
useFeatureFlags
|
|
164
183
|
} from "./chunk-CJFW36DZ.js";
|
|
184
|
+
import {
|
|
185
|
+
FieldMessage
|
|
186
|
+
} from "./chunk-JWIJHSI6.js";
|
|
165
187
|
import {
|
|
166
188
|
Fieldset
|
|
167
189
|
} from "./chunk-3ZDFQO25.js";
|
|
168
190
|
import {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
FileStatus,
|
|
173
|
-
processStatus
|
|
174
|
-
} from "./chunk-EMNBMH7Z.js";
|
|
175
|
-
import {
|
|
176
|
-
ProgressBar
|
|
177
|
-
} from "./chunk-WZJ5UQNM.js";
|
|
191
|
+
Field,
|
|
192
|
+
useFieldContext
|
|
193
|
+
} from "./chunk-UZDVOIW5.js";
|
|
178
194
|
import {
|
|
179
|
-
|
|
180
|
-
} from "./chunk-
|
|
195
|
+
AccordionItemGroup
|
|
196
|
+
} from "./chunk-BAWZBF5Q.js";
|
|
181
197
|
import {
|
|
182
|
-
|
|
183
|
-
} from "./chunk-
|
|
198
|
+
AccordionItemIndicator
|
|
199
|
+
} from "./chunk-XZGXRRSQ.js";
|
|
184
200
|
import {
|
|
185
|
-
|
|
186
|
-
|
|
201
|
+
Accordion,
|
|
202
|
+
AccordionItem,
|
|
203
|
+
AccordionItemContent,
|
|
204
|
+
AccordionItemTrigger
|
|
205
|
+
} from "./chunk-IGHMP4WA.js";
|
|
187
206
|
import {
|
|
188
207
|
Admonition,
|
|
189
208
|
AdmonitionDescription,
|
|
@@ -193,22 +212,16 @@ import "./chunk-ISCJ542I.js";
|
|
|
193
212
|
import {
|
|
194
213
|
Avatar
|
|
195
214
|
} from "./chunk-GCQMH4QA.js";
|
|
196
|
-
import {
|
|
197
|
-
Button
|
|
198
|
-
} from "./chunk-EXGKZGML.js";
|
|
199
|
-
import {
|
|
200
|
-
Checkbox
|
|
201
|
-
} from "./chunk-N24COMHJ.js";
|
|
202
|
-
import {
|
|
203
|
-
Field,
|
|
204
|
-
useFieldContext
|
|
205
|
-
} from "./chunk-UZDVOIW5.js";
|
|
206
|
-
import {
|
|
207
|
-
CircularProgress
|
|
208
|
-
} from "./chunk-6QHOKCV3.js";
|
|
209
215
|
import {
|
|
210
216
|
Show
|
|
211
217
|
} from "./chunk-BUVVRQLZ.js";
|
|
218
|
+
import {
|
|
219
|
+
CerberusProvider,
|
|
220
|
+
useCerberusContext
|
|
221
|
+
} from "./chunk-GITT5645.js";
|
|
222
|
+
import {
|
|
223
|
+
Button
|
|
224
|
+
} from "./chunk-EXGKZGML.js";
|
|
212
225
|
import {
|
|
213
226
|
useModal
|
|
214
227
|
} from "./chunk-KGQG5JGW.js";
|
|
@@ -230,19 +243,7 @@ import {
|
|
|
230
243
|
getLocalStorage,
|
|
231
244
|
setLocalStorage
|
|
232
245
|
} from "./chunk-FQLMPEYX.js";
|
|
233
|
-
import
|
|
234
|
-
AccordionItemIndicator
|
|
235
|
-
} from "./chunk-XZGXRRSQ.js";
|
|
236
|
-
import {
|
|
237
|
-
CerberusProvider,
|
|
238
|
-
useCerberusContext
|
|
239
|
-
} from "./chunk-GITT5645.js";
|
|
240
|
-
import {
|
|
241
|
-
Accordion,
|
|
242
|
-
AccordionItem,
|
|
243
|
-
AccordionItemContent,
|
|
244
|
-
AccordionItemTrigger
|
|
245
|
-
} from "./chunk-IGHMP4WA.js";
|
|
246
|
+
import "./chunk-V3M3ZOQI.js";
|
|
246
247
|
import "./chunk-55J6XMHW.js";
|
|
247
248
|
import {
|
|
248
249
|
createNavTriggerProps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * This module is the entry point for the Cerberus React package.\n * @module\n */\n\n// components\n\nexport * from './components/Accordion'\nexport * from './components/Accordion.client'\nexport * from './components/AccordionItemGroup'\nexport * from './components/Admonition'\nexport * from './components/Avatar'\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/CircularProgress'\nexport * from './components/DatePicker.client'\nexport * from './components/DatePicker.server'\nexport * from './components/Droppable'\nexport * from './components/FieldMessage'\nexport * from './components/FeatureFlag'\nexport * from './components/Fieldset'\nexport * from './components/FieldsetLabel'\nexport * from './components/FileStatus'\nexport * from './components/FileUploader'\nexport * from './components/IconButton'\nexport * from './components/Input'\nexport * from './components/Label'\nexport * from './components/Legend'\nexport * from './components/Menu'\nexport * from './components/Modal'\nexport * from './components/ModalHeader'\nexport * from './components/ModalHeading'\nexport * from './components/ModalDescription'\nexport * from './components/NavMenuTrigger'\nexport * from './components/NavMenuList'\nexport * from './components/NavMenuLink'\nexport * from './components/Notification'\nexport * from './components/NotificationHeading'\nexport * from './components/NotificationDescription'\nexport * from './components/Portal'\nexport * from './components/ProgressBar'\nexport * from './components/Radio'\nexport * from './components/Select'\nexport * from './components/Spinner'\nexport * from './components/Tabs.client'\nexport * from './components/Table'\nexport * from './components/Thead'\nexport * from './components/Th'\nexport * from './components/Td'\nexport * from './components/Tbody'\nexport * from './components/Tag'\nexport * from './components/Text'\nexport * from './components/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Tooltip'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/cerberus'\nexport * from './context/confirm-modal'\nexport * from './context/cta-modal'\nexport * from './context/feature-flags'\nexport * from './context/field'\nexport * from './context/navMenu'\nexport * from './context/notification-center'\nexport * from './context/prompt-modal'\nexport * from './context/tabs'\nexport * from './context/theme'\n\n// hooks\n\nexport * from './hooks/useDate'\nexport * from './hooks/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\nexport * from './hooks/useRootColors'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/index'\nexport * from './utils/index'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * This module is the entry point for the Cerberus React package.\n * @module\n */\n\n// components\n\nexport * from './components/Accordion'\nexport * from './components/Accordion.client'\nexport * from './components/AccordionItemGroup'\nexport * from './components/Admonition'\nexport * from './components/Avatar'\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/CircularProgress'\nexport * from './components/DatePicker.client'\nexport * from './components/DatePicker.server'\nexport * from './components/Droppable'\nexport * from './components/FieldMessage'\nexport * from './components/FeatureFlag'\nexport * from './components/Fieldset'\nexport * from './components/FieldsetLabel'\nexport * from './components/FileStatus'\nexport * from './components/FileUploader'\nexport * from './components/IconButton'\nexport * from './components/Input'\nexport * from './components/Label'\nexport * from './components/Legend'\nexport * from './components/Menu'\nexport * from './components/Modal'\nexport * from './components/ModalHeader'\nexport * from './components/ModalHeading'\nexport * from './components/ModalDescription'\nexport * from './components/NavMenuTrigger'\nexport * from './components/NavMenuList'\nexport * from './components/NavMenuLink'\nexport * from './components/Notification'\nexport * from './components/NotificationHeading'\nexport * from './components/NotificationDescription'\nexport * from './components/Portal'\nexport * from './components/ProgressBar'\nexport * from './components/Radio'\nexport * from './components/Select'\nexport * from './components/Spinner'\nexport * from './components/Tabs.client'\nexport * from './components/Table'\nexport * from './components/Thead'\nexport * from './components/Th'\nexport * from './components/Td'\nexport * from './components/Tbody'\nexport * from './components/Tag'\nexport * from './components/Text'\nexport * from './components/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Tooltip'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/cerberus'\nexport * from './context/confirm-modal'\nexport * from './context/cta-modal'\nexport * from './context/feature-flags'\nexport * from './context/field'\nexport * from './context/navMenu'\nexport * from './context/notification-center'\nexport * from './context/prompt-modal'\nexport * from './context/tabs'\nexport * from './context/theme'\n\n// hooks\n\nexport * from './hooks/useDate'\nexport * from './hooks/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\nexport * from './hooks/useRootColors'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/index'\nexport * from './utils/index'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FA,cAAc;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerberus-design/react",
|
|
3
|
-
"version": "0.14.2-next-
|
|
3
|
+
"version": "0.14.2-next-d5ed509",
|
|
4
4
|
"description": "The Cerberus Design React component library.",
|
|
5
5
|
"browserslist": "> 0.25%, not dead",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"react-dom": "^18",
|
|
27
27
|
"tsup": "^8.1.0",
|
|
28
28
|
"@cerberus-design/configs": "0.0.0",
|
|
29
|
-
"@cerberus/styled-system": "npm:@cerberus-design/styled-system@0.14.2-next-
|
|
29
|
+
"@cerberus/styled-system": "npm:@cerberus-design/styled-system@0.14.2-next-d5ed509"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
@@ -63,6 +63,7 @@ export type NotificationProps = NotificationBaseProps & NotificationVariantProps
|
|
|
63
63
|
export function Notification(props: PropsWithChildren<NotificationProps>) {
|
|
64
64
|
const { children, palette, onClose, ...nativeProps } = props
|
|
65
65
|
const ref = useRef<HTMLDialogElement>(null)
|
|
66
|
+
|
|
66
67
|
const onKeyDown = trapFocus(ref)
|
|
67
68
|
const styles = notification({ palette })
|
|
68
69
|
|
|
@@ -72,6 +73,7 @@ export function Notification(props: PropsWithChildren<NotificationProps>) {
|
|
|
72
73
|
return (
|
|
73
74
|
<dialog
|
|
74
75
|
{...nativeProps}
|
|
76
|
+
data-placement="left"
|
|
75
77
|
className={cx(
|
|
76
78
|
nativeProps.className,
|
|
77
79
|
hstack({
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Dispatch } from 'react'
|
|
2
|
+
import type {
|
|
3
|
+
AddNotifyAction,
|
|
4
|
+
ClearNotifyAction,
|
|
5
|
+
NotificationsStore,
|
|
6
|
+
RemoveNotifyAction,
|
|
7
|
+
UpdateNotifyAction,
|
|
8
|
+
} from './types'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* This module contains the reducer store and actions for the notification
|
|
12
|
+
* center.
|
|
13
|
+
* @module notification-center/store
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The reducer for the notification center.
|
|
18
|
+
* @param state An array of notifications.
|
|
19
|
+
* @param action An action to take on the notifications.
|
|
20
|
+
* @returns The new state of the notifications.
|
|
21
|
+
*/
|
|
22
|
+
export function notificationCenterReducer(
|
|
23
|
+
state: NotificationsStore,
|
|
24
|
+
action:
|
|
25
|
+
| AddNotifyAction
|
|
26
|
+
| RemoveNotifyAction
|
|
27
|
+
| UpdateNotifyAction
|
|
28
|
+
| ClearNotifyAction,
|
|
29
|
+
): NotificationsStore {
|
|
30
|
+
switch (action.type) {
|
|
31
|
+
case 'ADD_NOTIFICATION':
|
|
32
|
+
return [...state, action.payload]
|
|
33
|
+
case 'REMOVE_NOTIFICATION':
|
|
34
|
+
return state.filter((n) => n.id !== action.payload.id)
|
|
35
|
+
case 'UPDATE_NOTIFICATION':
|
|
36
|
+
return state.map((n) =>
|
|
37
|
+
n.id === action.payload.id ? { ...n, ...action.payload } : n,
|
|
38
|
+
)
|
|
39
|
+
case 'CLEAR_NOTIFICATIONS':
|
|
40
|
+
return []
|
|
41
|
+
default:
|
|
42
|
+
return state
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Adds a notification to the notification center.
|
|
48
|
+
* @param dispatch The dispatch function.
|
|
49
|
+
* @param options The notification options.
|
|
50
|
+
*/
|
|
51
|
+
export function addNotification(
|
|
52
|
+
dispatch: Dispatch<AddNotifyAction>,
|
|
53
|
+
options: AddNotifyAction['payload'],
|
|
54
|
+
) {
|
|
55
|
+
dispatch({ type: 'ADD_NOTIFICATION', payload: { ...options } })
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Removes a notification from the notification center.
|
|
60
|
+
* @param dispatch The dispatch function.
|
|
61
|
+
* @param id The id of the notification to remove.
|
|
62
|
+
*/
|
|
63
|
+
export function removeNotification(
|
|
64
|
+
dispatch: Dispatch<RemoveNotifyAction>,
|
|
65
|
+
id: RemoveNotifyAction['payload']['id'],
|
|
66
|
+
) {
|
|
67
|
+
dispatch({ type: 'REMOVE_NOTIFICATION', payload: { id } })
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Updates a notification in the notification center.
|
|
72
|
+
* @param dispatch The dispatch function.
|
|
73
|
+
* @param options The notification options.
|
|
74
|
+
*/
|
|
75
|
+
export function updateNotificationState(
|
|
76
|
+
dispatch: Dispatch<UpdateNotifyAction>,
|
|
77
|
+
options: UpdateNotifyAction['payload'],
|
|
78
|
+
) {
|
|
79
|
+
dispatch({ type: 'UPDATE_NOTIFICATION', payload: { ...options } })
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Clears the notification state.
|
|
84
|
+
* @param dispatch The dispatch function.
|
|
85
|
+
*/
|
|
86
|
+
export function clearNotificationState(dispatch: Dispatch<ClearNotifyAction>) {
|
|
87
|
+
dispatch({ type: 'CLEAR_NOTIFICATIONS' })
|
|
88
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { NotifyOptions } from '../notification-center'
|
|
2
|
+
|
|
3
|
+
export type NotificationsStore = NotificationOption[]
|
|
4
|
+
|
|
5
|
+
export type NotificationOption = NotifyOptions & {
|
|
6
|
+
state: 'open' | 'closed'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Actions
|
|
10
|
+
|
|
11
|
+
export type AddNotifyAction = {
|
|
12
|
+
type: 'ADD_NOTIFICATION'
|
|
13
|
+
payload: NotificationOption
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type RemoveNotifyAction = {
|
|
17
|
+
type: 'REMOVE_NOTIFICATION'
|
|
18
|
+
payload: { id: Required<NotificationOption['id']> }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type UpdateNotifyAction = {
|
|
22
|
+
type: 'UPDATE_NOTIFICATION'
|
|
23
|
+
payload: {
|
|
24
|
+
id: Required<NotificationOption['id']>
|
|
25
|
+
} & Partial<NotificationOption>
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type ClearNotifyAction = { type: 'CLEAR_NOTIFICATIONS' }
|