@cerberus-design/react 0.10.4-next-271fee4 → 0.10.4-next-57d0ee2
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 +75 -0
- package/build/legacy/components/Admonition.cjs +419 -0
- package/build/legacy/components/Admonition.cjs.map +1 -0
- package/build/legacy/components/Avatar.cjs +4 -4
- package/build/legacy/components/Avatar.cjs.map +1 -1
- package/build/legacy/components/Checkbox.cjs +4 -4
- package/build/legacy/components/Checkbox.cjs.map +1 -1
- package/build/legacy/components/FileStatus.cjs +4 -4
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs +4 -4
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/Input.cjs +4 -4
- package/build/legacy/components/Input.cjs.map +1 -1
- package/build/legacy/components/Notification.cjs +4 -4
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/components/Select.cjs +4 -4
- package/build/legacy/components/Select.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs +4 -4
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Toggle.cjs +4 -4
- package/build/legacy/components/Toggle.cjs.map +1 -1
- package/build/legacy/config/cerbIcons.cjs +4 -4
- package/build/legacy/config/cerbIcons.cjs.map +1 -1
- package/build/legacy/config/defineIcons.cjs +4 -4
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +4 -4
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +4 -4
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +4 -4
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/index.cjs +552 -424
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +75 -0
- package/build/modern/{chunk-QHVJAPSD.js → chunk-243VUIA6.js} +2 -2
- package/build/modern/{chunk-BADJ7VVO.js → chunk-3NE6C66J.js} +6 -6
- package/build/modern/{chunk-5NELG2TB.js → chunk-FT7DFRHQ.js} +2 -2
- package/build/modern/{chunk-P3THICWW.js → chunk-HCB5NQ5J.js} +3 -3
- package/build/modern/{chunk-A42MQEHJ.js → chunk-KLUBAM4U.js} +2 -2
- package/build/modern/{chunk-DH57GIIW.js → chunk-MDIUFBDX.js} +2 -2
- package/build/modern/{chunk-3XZRRGFQ.js → chunk-PA5EB7EO.js} +2 -2
- package/build/modern/{chunk-ZUQ2MHMQ.js → chunk-RDQHHCFR.js} +2 -2
- package/build/modern/{chunk-V7YG7JUJ.js → chunk-TMR7JGMP.js} +7 -8
- package/build/modern/chunk-TMR7JGMP.js.map +1 -0
- package/build/modern/{chunk-WSGQZZVU.js → chunk-UJKS4DDN.js} +2 -2
- package/build/modern/{chunk-XFKPALXB.js → chunk-X4Y4WTRU.js} +3 -3
- package/build/modern/{chunk-XREDYSAP.js → chunk-YMJMB6OP.js} +3 -3
- package/build/modern/{chunk-SRGQQYBQ.js → chunk-YWCTMLLO.js} +2 -2
- package/build/modern/chunk-ZW3FFE37.js +138 -0
- package/build/modern/chunk-ZW3FFE37.js.map +1 -0
- package/build/modern/{chunk-XWQEINEL.js → chunk-ZX6DBC2Z.js} +2 -2
- package/build/modern/components/Admonition.js +17 -0
- package/build/modern/components/Admonition.js.map +1 -0
- package/build/modern/components/Avatar.js +3 -3
- package/build/modern/components/Checkbox.js +3 -3
- package/build/modern/components/FileStatus.js +4 -4
- package/build/modern/components/FileUploader.js +4 -4
- package/build/modern/components/Input.js +3 -3
- package/build/modern/components/Notification.js +3 -3
- package/build/modern/components/Select.js +3 -3
- package/build/modern/components/Tag.js +3 -3
- package/build/modern/components/Toggle.js +3 -3
- package/build/modern/config/cerbIcons.js +1 -1
- package/build/modern/config/defineIcons.js +2 -2
- package/build/modern/context/confirm-modal.js +4 -4
- package/build/modern/context/notification-center.js +4 -4
- package/build/modern/context/prompt-modal.js +5 -5
- package/build/modern/index.js +38 -30
- package/build/modern/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/Admonition.tsx +186 -0
- package/src/config/cerbIcons.ts +6 -7
- package/src/index.ts +1 -0
- package/build/modern/chunk-V7YG7JUJ.js.map +0 -1
- /package/build/modern/{chunk-QHVJAPSD.js.map → chunk-243VUIA6.js.map} +0 -0
- /package/build/modern/{chunk-BADJ7VVO.js.map → chunk-3NE6C66J.js.map} +0 -0
- /package/build/modern/{chunk-5NELG2TB.js.map → chunk-FT7DFRHQ.js.map} +0 -0
- /package/build/modern/{chunk-P3THICWW.js.map → chunk-HCB5NQ5J.js.map} +0 -0
- /package/build/modern/{chunk-A42MQEHJ.js.map → chunk-KLUBAM4U.js.map} +0 -0
- /package/build/modern/{chunk-DH57GIIW.js.map → chunk-MDIUFBDX.js.map} +0 -0
- /package/build/modern/{chunk-3XZRRGFQ.js.map → chunk-PA5EB7EO.js.map} +0 -0
- /package/build/modern/{chunk-ZUQ2MHMQ.js.map → chunk-RDQHHCFR.js.map} +0 -0
- /package/build/modern/{chunk-WSGQZZVU.js.map → chunk-UJKS4DDN.js.map} +0 -0
- /package/build/modern/{chunk-XFKPALXB.js.map → chunk-X4Y4WTRU.js.map} +0 -0
- /package/build/modern/{chunk-XREDYSAP.js.map → chunk-YMJMB6OP.js.map} +0 -0
- /package/build/modern/{chunk-SRGQQYBQ.js.map → chunk-YWCTMLLO.js.map} +0 -0
- /package/build/modern/{chunk-XWQEINEL.js.map → chunk-ZX6DBC2Z.js.map} +0 -0
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Option,
|
|
4
4
|
Select
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-PA5EB7EO.js";
|
|
6
6
|
import "../chunk-UZDVOIW5.js";
|
|
7
7
|
import "../chunk-BUVVRQLZ.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-FT7DFRHQ.js";
|
|
9
|
+
import "../chunk-TMR7JGMP.js";
|
|
10
10
|
import "../chunk-CP7OUC2Q.js";
|
|
11
11
|
import "../chunk-HVKM54BA.js";
|
|
12
12
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tag
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-243VUIA6.js";
|
|
4
4
|
import "../chunk-BUVVRQLZ.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-FT7DFRHQ.js";
|
|
6
|
+
import "../chunk-TMR7JGMP.js";
|
|
7
7
|
import "../chunk-CP7OUC2Q.js";
|
|
8
8
|
import "../chunk-HVKM54BA.js";
|
|
9
9
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Toggle
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-YWCTMLLO.js";
|
|
5
5
|
import "../chunk-UZDVOIW5.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-FT7DFRHQ.js";
|
|
7
|
+
import "../chunk-TMR7JGMP.js";
|
|
8
8
|
import "../chunk-CP7OUC2Q.js";
|
|
9
9
|
import "../chunk-HVKM54BA.js";
|
|
10
10
|
export {
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ConfirmModal,
|
|
4
4
|
useConfirmModal
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-X4Y4WTRU.js";
|
|
6
6
|
import "../chunk-GLY7GU5S.js";
|
|
7
7
|
import "../chunk-BE4EOU2P.js";
|
|
8
8
|
import "../chunk-Q7BRMIBR.js";
|
|
9
9
|
import "../chunk-ULYQLKWA.js";
|
|
10
10
|
import "../chunk-2UXE5PDG.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-ZX6DBC2Z.js";
|
|
12
12
|
import "../chunk-EXGKZGML.js";
|
|
13
13
|
import "../chunk-BUVVRQLZ.js";
|
|
14
14
|
import "../chunk-JIZQFTW6.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-FT7DFRHQ.js";
|
|
16
|
+
import "../chunk-TMR7JGMP.js";
|
|
17
17
|
import "../chunk-CP7OUC2Q.js";
|
|
18
18
|
import "../chunk-HVKM54BA.js";
|
|
19
19
|
import "../chunk-7T3JIGM7.js";
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
NotificationCenter,
|
|
4
4
|
useNotificationCenter
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-RDQHHCFR.js";
|
|
6
|
+
import "../chunk-KLUBAM4U.js";
|
|
7
7
|
import "../chunk-XEW6TJJ4.js";
|
|
8
8
|
import "../chunk-SXIXDXG3.js";
|
|
9
9
|
import "../chunk-GLY7GU5S.js";
|
|
10
10
|
import "../chunk-EXGKZGML.js";
|
|
11
11
|
import "../chunk-BUVVRQLZ.js";
|
|
12
12
|
import "../chunk-JIZQFTW6.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-FT7DFRHQ.js";
|
|
14
|
+
import "../chunk-TMR7JGMP.js";
|
|
15
15
|
import "../chunk-CP7OUC2Q.js";
|
|
16
16
|
import "../chunk-HVKM54BA.js";
|
|
17
17
|
export {
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
PromptModal,
|
|
4
4
|
usePromptModal
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-3NE6C66J.js";
|
|
6
6
|
import "../chunk-GLY7GU5S.js";
|
|
7
|
+
import "../chunk-UJKS4DDN.js";
|
|
7
8
|
import "../chunk-NMF2HYWO.js";
|
|
8
9
|
import "../chunk-BE4EOU2P.js";
|
|
9
10
|
import "../chunk-Q7BRMIBR.js";
|
|
10
11
|
import "../chunk-ULYQLKWA.js";
|
|
11
12
|
import "../chunk-2UXE5PDG.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-XWQEINEL.js";
|
|
13
|
+
import "../chunk-ZX6DBC2Z.js";
|
|
14
14
|
import "../chunk-EXGKZGML.js";
|
|
15
15
|
import "../chunk-UZDVOIW5.js";
|
|
16
16
|
import "../chunk-BUVVRQLZ.js";
|
|
17
17
|
import "../chunk-JIZQFTW6.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-FT7DFRHQ.js";
|
|
19
|
+
import "../chunk-TMR7JGMP.js";
|
|
20
20
|
import "../chunk-CP7OUC2Q.js";
|
|
21
21
|
import "../chunk-HVKM54BA.js";
|
|
22
22
|
import "../chunk-7T3JIGM7.js";
|
package/build/modern/index.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NotificationCenter,
|
|
3
3
|
useNotificationCenter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RDQHHCFR.js";
|
|
5
5
|
import {
|
|
6
6
|
PromptModal,
|
|
7
7
|
usePromptModal
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3NE6C66J.js";
|
|
9
9
|
import {
|
|
10
10
|
ThemeProvider,
|
|
11
11
|
useThemeContext
|
|
12
12
|
} from "./chunk-EB37HRCN.js";
|
|
13
|
+
import {
|
|
14
|
+
Tbody
|
|
15
|
+
} from "./chunk-PKQTTFWA.js";
|
|
13
16
|
import {
|
|
14
17
|
Td
|
|
15
18
|
} from "./chunk-HPM2XRWT.js";
|
|
@@ -24,11 +27,15 @@ import {
|
|
|
24
27
|
} from "./chunk-PKY46RRA.js";
|
|
25
28
|
import {
|
|
26
29
|
Toggle
|
|
27
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-YWCTMLLO.js";
|
|
28
31
|
import {
|
|
29
32
|
ConfirmModal,
|
|
30
33
|
useConfirmModal
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-X4Y4WTRU.js";
|
|
35
|
+
import {
|
|
36
|
+
Option,
|
|
37
|
+
Select
|
|
38
|
+
} from "./chunk-PA5EB7EO.js";
|
|
32
39
|
import {
|
|
33
40
|
Spinner
|
|
34
41
|
} from "./chunk-7SYJFI5E.js";
|
|
@@ -47,16 +54,21 @@ import {
|
|
|
47
54
|
} from "./chunk-B4CVET74.js";
|
|
48
55
|
import {
|
|
49
56
|
Tag
|
|
50
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-243VUIA6.js";
|
|
51
58
|
import {
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
NavMenuList,
|
|
60
|
+
getPosition
|
|
61
|
+
} from "./chunk-5V5MBSM3.js";
|
|
54
62
|
import {
|
|
55
63
|
NavMenuTrigger
|
|
56
64
|
} from "./chunk-OWKN5IV7.js";
|
|
65
|
+
import {
|
|
66
|
+
NavMenu,
|
|
67
|
+
useNavMenuContext
|
|
68
|
+
} from "./chunk-O75QAT4Z.js";
|
|
57
69
|
import {
|
|
58
70
|
Notification
|
|
59
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-KLUBAM4U.js";
|
|
60
72
|
import {
|
|
61
73
|
NotificationDescription
|
|
62
74
|
} from "./chunk-XEW6TJJ4.js";
|
|
@@ -70,9 +82,8 @@ import {
|
|
|
70
82
|
Radio
|
|
71
83
|
} from "./chunk-FTPZHG6J.js";
|
|
72
84
|
import {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
} from "./chunk-3XZRRGFQ.js";
|
|
85
|
+
Input
|
|
86
|
+
} from "./chunk-UJKS4DDN.js";
|
|
76
87
|
import {
|
|
77
88
|
Label
|
|
78
89
|
} from "./chunk-NMF2HYWO.js";
|
|
@@ -95,13 +106,8 @@ import {
|
|
|
95
106
|
NavMenuLink
|
|
96
107
|
} from "./chunk-KBBASJIY.js";
|
|
97
108
|
import {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
} from "./chunk-5V5MBSM3.js";
|
|
101
|
-
import {
|
|
102
|
-
NavMenu,
|
|
103
|
-
useNavMenuContext
|
|
104
|
-
} from "./chunk-O75QAT4Z.js";
|
|
109
|
+
Droppable
|
|
110
|
+
} from "./chunk-TKI2CKHH.js";
|
|
105
111
|
import {
|
|
106
112
|
FeatureFlag
|
|
107
113
|
} from "./chunk-BIDE4IJG.js";
|
|
@@ -118,7 +124,7 @@ import {
|
|
|
118
124
|
import {
|
|
119
125
|
FileStatus,
|
|
120
126
|
processStatus
|
|
121
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-YMJMB6OP.js";
|
|
122
128
|
import {
|
|
123
129
|
ProgressBar
|
|
124
130
|
} from "./chunk-KCANMM64.js";
|
|
@@ -127,13 +133,10 @@ import {
|
|
|
127
133
|
} from "./chunk-JWIJHSI6.js";
|
|
128
134
|
import {
|
|
129
135
|
FileUploader
|
|
130
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-HCB5NQ5J.js";
|
|
131
137
|
import {
|
|
132
138
|
IconButton
|
|
133
139
|
} from "./chunk-APD6IX5R.js";
|
|
134
|
-
import {
|
|
135
|
-
Input
|
|
136
|
-
} from "./chunk-WSGQZZVU.js";
|
|
137
140
|
import {
|
|
138
141
|
MODE_KEY,
|
|
139
142
|
THEME_KEY,
|
|
@@ -142,15 +145,20 @@ import {
|
|
|
142
145
|
import {
|
|
143
146
|
useToggle
|
|
144
147
|
} from "./chunk-REO5GUNC.js";
|
|
148
|
+
import {
|
|
149
|
+
Admonition,
|
|
150
|
+
AdmonitionDescription,
|
|
151
|
+
AdmonitionHeading
|
|
152
|
+
} from "./chunk-ZW3FFE37.js";
|
|
145
153
|
import {
|
|
146
154
|
Avatar
|
|
147
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-ZX6DBC2Z.js";
|
|
148
156
|
import {
|
|
149
157
|
Button
|
|
150
158
|
} from "./chunk-EXGKZGML.js";
|
|
151
159
|
import {
|
|
152
160
|
Checkbox
|
|
153
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-MDIUFBDX.js";
|
|
154
162
|
import {
|
|
155
163
|
Field,
|
|
156
164
|
useFieldContext
|
|
@@ -161,9 +169,6 @@ import {
|
|
|
161
169
|
import {
|
|
162
170
|
Show
|
|
163
171
|
} from "./chunk-BUVVRQLZ.js";
|
|
164
|
-
import {
|
|
165
|
-
Droppable
|
|
166
|
-
} from "./chunk-TKI2CKHH.js";
|
|
167
172
|
import "./chunk-55J6XMHW.js";
|
|
168
173
|
import {
|
|
169
174
|
createNavTriggerProps
|
|
@@ -182,8 +187,8 @@ import {
|
|
|
182
187
|
import {
|
|
183
188
|
$cerberusIcons,
|
|
184
189
|
defineIcons
|
|
185
|
-
} from "./chunk-
|
|
186
|
-
import "./chunk-
|
|
190
|
+
} from "./chunk-FT7DFRHQ.js";
|
|
191
|
+
import "./chunk-TMR7JGMP.js";
|
|
187
192
|
import "./chunk-CP7OUC2Q.js";
|
|
188
193
|
import "./chunk-HVKM54BA.js";
|
|
189
194
|
import {
|
|
@@ -194,6 +199,9 @@ import {
|
|
|
194
199
|
export * from "@dnd-kit/core";
|
|
195
200
|
export {
|
|
196
201
|
$cerberusIcons,
|
|
202
|
+
Admonition,
|
|
203
|
+
AdmonitionDescription,
|
|
204
|
+
AdmonitionHeading,
|
|
197
205
|
Avatar,
|
|
198
206
|
Button,
|
|
199
207
|
Checkbox,
|
|
@@ -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/Avatar'\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/CircularProgress'\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/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/Tab'\nexport * from './components/TabList'\nexport * from './components/TabPanel'\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/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/confirm-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/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/tabs.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/defineIcons'\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/Admonition'\nexport * from './components/Avatar'\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/CircularProgress'\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/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/Tab'\nexport * from './components/TabList'\nexport * from './components/TabPanel'\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/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/confirm-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/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/tabs.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/defineIcons'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFA,cAAc;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerberus-design/react",
|
|
3
|
-
"version": "0.10.4-next-
|
|
3
|
+
"version": "0.10.4-next-57d0ee2",
|
|
4
4
|
"description": "The Cerberus Design React component library.",
|
|
5
5
|
"browserslist": "> 0.25%, not dead",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"react": "^18",
|
|
26
26
|
"react-dom": "^18",
|
|
27
27
|
"tsup": "^8.1.0",
|
|
28
|
-
"@cerberus-design/
|
|
29
|
-
"@cerberus-design/
|
|
28
|
+
"@cerberus-design/styled-system": "0.10.4-next-57d0ee2",
|
|
29
|
+
"@cerberus-design/configs": "0.0.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import {
|
|
2
|
+
admonition,
|
|
3
|
+
type AdmonitionVariantProps,
|
|
4
|
+
} from '@cerberus/styled-system/recipes'
|
|
5
|
+
import { cx } from '@cerberus-design/styled-system/css'
|
|
6
|
+
import { hstack } from '@cerberus/styled-system/patterns'
|
|
7
|
+
import { $cerberusIcons } from '../config/defineIcons'
|
|
8
|
+
import type { HTMLAttributes, ReactNode } from 'react'
|
|
9
|
+
import { Avatar } from './Avatar'
|
|
10
|
+
import { Show } from './Show'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This module provides a set of components for creating admonitions.
|
|
14
|
+
* @module Admonition
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export type AdmonitionProps = HTMLAttributes<HTMLDivElement> &
|
|
18
|
+
AdmonitionVariantProps & {
|
|
19
|
+
/**
|
|
20
|
+
* One off replacement for the icon.
|
|
21
|
+
*/
|
|
22
|
+
icon?: ReactNode
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The `Admonition` component is used to create an admonition.
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <Admonition palette="page">
|
|
30
|
+
* <AdmonitionHeading palette="page">Page</AdmonitionHeading>
|
|
31
|
+
* <AdmonitionDescription palette="page">
|
|
32
|
+
* This is a page admonition.
|
|
33
|
+
* </AdmonitionDescription>
|
|
34
|
+
* </Admonition>
|
|
35
|
+
* ```
|
|
36
|
+
* @see https://cerberus.digitalu.design/react/admonition
|
|
37
|
+
*/
|
|
38
|
+
export function Admonition(props: AdmonitionProps) {
|
|
39
|
+
const { children, palette = 'page', usage, icon, ...nativeProps } = props
|
|
40
|
+
return (
|
|
41
|
+
<aside
|
|
42
|
+
{...nativeProps}
|
|
43
|
+
className={cx(
|
|
44
|
+
nativeProps.className,
|
|
45
|
+
hstack({
|
|
46
|
+
gap: 'md',
|
|
47
|
+
w: 'full',
|
|
48
|
+
}),
|
|
49
|
+
admonition({ palette, usage }).root,
|
|
50
|
+
)}
|
|
51
|
+
>
|
|
52
|
+
<Show when={Boolean(icon)} fallback={<MatchAvatar palette={palette} />}>
|
|
53
|
+
{icon}
|
|
54
|
+
</Show>
|
|
55
|
+
<div>{children}</div>
|
|
56
|
+
</aside>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type AdmonitionHeadingProps = HTMLAttributes<HTMLParagraphElement> &
|
|
61
|
+
AdmonitionVariantProps
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The `AdmonitionHeading` component is used to create a heading within an
|
|
65
|
+
* admonition.
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* <Admonition palette="page">
|
|
69
|
+
* <AdmonitionHeading palette="page">Page</AdmonitionHeading>
|
|
70
|
+
* <AdmonitionDescription palette="page">
|
|
71
|
+
* This is a page admonition.
|
|
72
|
+
* </AdmonitionDescription>
|
|
73
|
+
* </Admonition>
|
|
74
|
+
* ```
|
|
75
|
+
* @see https://cerberus.digitalu.design/react/admonition
|
|
76
|
+
*/
|
|
77
|
+
export function AdmonitionHeading(props: AdmonitionHeadingProps) {
|
|
78
|
+
const { palette, usage, ...nativeProps } = props
|
|
79
|
+
return (
|
|
80
|
+
<p
|
|
81
|
+
{...nativeProps}
|
|
82
|
+
className={cx(
|
|
83
|
+
nativeProps.className,
|
|
84
|
+
admonition({ palette, usage }).heading,
|
|
85
|
+
)}
|
|
86
|
+
/>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export type AdmonitionDescriptionProps = HTMLAttributes<HTMLParagraphElement> &
|
|
91
|
+
AdmonitionVariantProps
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The `AdmonitionDescription` component is used to create a description within
|
|
95
|
+
* an admonition.
|
|
96
|
+
* @example
|
|
97
|
+
* ```tsx
|
|
98
|
+
* <Admonition palette="page">
|
|
99
|
+
* <AdmonitionHeading palette="page">Page</AdmonitionHeading>
|
|
100
|
+
* <AdmonitionDescription palette="page">
|
|
101
|
+
* This is a page admonition.
|
|
102
|
+
* </AdmonitionDescription>
|
|
103
|
+
* </Admonition>
|
|
104
|
+
* ```
|
|
105
|
+
* @see https://cerberus.digitalu.design/react/admonition
|
|
106
|
+
*/
|
|
107
|
+
export function AdmonitionDescription(props: AdmonitionDescriptionProps) {
|
|
108
|
+
const { palette, usage, ...nativeProps } = props
|
|
109
|
+
return (
|
|
110
|
+
<p
|
|
111
|
+
{...nativeProps}
|
|
112
|
+
className={cx(
|
|
113
|
+
nativeProps.className,
|
|
114
|
+
admonition({ palette, usage }).description,
|
|
115
|
+
)}
|
|
116
|
+
/>
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Private components
|
|
121
|
+
|
|
122
|
+
type MatchAvatarProps = AdmonitionVariantProps
|
|
123
|
+
|
|
124
|
+
function MatchAvatar(props: MatchAvatarProps) {
|
|
125
|
+
const {
|
|
126
|
+
infoNotification: InfoIcon,
|
|
127
|
+
successNotification: SuccessIcon,
|
|
128
|
+
warningNotification: WarningIcon,
|
|
129
|
+
dangerNotification: DangerIcon,
|
|
130
|
+
} = $cerberusIcons
|
|
131
|
+
switch (props.palette) {
|
|
132
|
+
case 'page':
|
|
133
|
+
return (
|
|
134
|
+
<Avatar
|
|
135
|
+
gradient="charon-light"
|
|
136
|
+
ariaLabel=""
|
|
137
|
+
icon={<InfoIcon />}
|
|
138
|
+
size="sm"
|
|
139
|
+
src=""
|
|
140
|
+
/>
|
|
141
|
+
)
|
|
142
|
+
case 'info':
|
|
143
|
+
return (
|
|
144
|
+
<Avatar
|
|
145
|
+
gradient="amphiaraus-dark"
|
|
146
|
+
ariaLabel=""
|
|
147
|
+
icon={<InfoIcon />}
|
|
148
|
+
size="sm"
|
|
149
|
+
src=""
|
|
150
|
+
/>
|
|
151
|
+
)
|
|
152
|
+
case 'success':
|
|
153
|
+
return (
|
|
154
|
+
<Avatar
|
|
155
|
+
gradient="thanatos-dark"
|
|
156
|
+
ariaLabel=""
|
|
157
|
+
icon={<SuccessIcon />}
|
|
158
|
+
size="sm"
|
|
159
|
+
src=""
|
|
160
|
+
/>
|
|
161
|
+
)
|
|
162
|
+
case 'warning':
|
|
163
|
+
return (
|
|
164
|
+
<Avatar
|
|
165
|
+
gradient="asphodel-light"
|
|
166
|
+
ariaLabel=""
|
|
167
|
+
icon={<WarningIcon />}
|
|
168
|
+
size="sm"
|
|
169
|
+
src=""
|
|
170
|
+
/>
|
|
171
|
+
)
|
|
172
|
+
case 'danger':
|
|
173
|
+
return (
|
|
174
|
+
<Avatar
|
|
175
|
+
gradient="hades-light"
|
|
176
|
+
ariaLabel=""
|
|
177
|
+
icon={<DangerIcon />}
|
|
178
|
+
size="sm"
|
|
179
|
+
src=""
|
|
180
|
+
/>
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
default:
|
|
184
|
+
throw new Error('Unsupported admonition palette')
|
|
185
|
+
}
|
|
186
|
+
}
|
package/src/config/cerbIcons.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Checkmark,
|
|
3
|
-
|
|
3
|
+
CheckmarkOutline,
|
|
4
4
|
ChevronDown,
|
|
5
5
|
CloseFilled,
|
|
6
6
|
CloudUpload,
|
|
7
|
-
ErrorFilled,
|
|
8
7
|
Information,
|
|
9
|
-
InformationFilled,
|
|
10
8
|
Restart,
|
|
11
9
|
TrashCan,
|
|
12
10
|
UserFilled,
|
|
13
11
|
Warning,
|
|
12
|
+
WarningAlt,
|
|
14
13
|
WarningFilled,
|
|
15
14
|
type CarbonIconType,
|
|
16
15
|
} from '@cerberus/icons'
|
|
@@ -51,10 +50,10 @@ export const defaultIcons: DefinedIcons = {
|
|
|
51
50
|
waitingFileUploader: CloudUpload,
|
|
52
51
|
fileUploader: AnimatingUploadIcon,
|
|
53
52
|
indeterminate: IndeterminateIcon,
|
|
54
|
-
infoNotification:
|
|
55
|
-
successNotification:
|
|
56
|
-
warningNotification:
|
|
57
|
-
dangerNotification:
|
|
53
|
+
infoNotification: Information,
|
|
54
|
+
successNotification: CheckmarkOutline,
|
|
55
|
+
warningNotification: WarningAlt,
|
|
56
|
+
dangerNotification: WarningFilled,
|
|
58
57
|
invalid: WarningFilled,
|
|
59
58
|
invalidAlt: Warning,
|
|
60
59
|
redo: Restart,
|
package/src/index.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/cerbIcons.ts"],"sourcesContent":["import {\n Checkmark,\n CheckmarkFilled,\n ChevronDown,\n CloseFilled,\n CloudUpload,\n ErrorFilled,\n Information,\n InformationFilled,\n Restart,\n TrashCan,\n UserFilled,\n Warning,\n WarningFilled,\n type CarbonIconType,\n} from '@cerberus/icons'\nimport type { ElementType } from 'react'\nimport { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\nimport { AnimatingUploadIcon } from '../components/AnimatingUploadIcon'\n\nexport type IconType = CarbonIconType | ElementType\n\nexport interface DefinedIcons {\n avatar?: IconType\n checkbox?: IconType\n close?: IconType\n confirmModal?: IconType\n delete?: IconType\n promptModal?: IconType\n waitingFileUploader?: IconType\n fileUploader?: IconType\n indeterminate?: IconType\n infoNotification?: IconType\n successNotification?: IconType\n warningNotification?: IconType\n dangerNotification?: IconType\n invalid: IconType\n invalidAlt?: IconType\n redo?: IconType\n selectArrow?: IconType\n toggleChecked?: IconType\n}\n\nexport const defaultIcons: DefinedIcons = {\n avatar: UserFilled,\n checkbox: CheckmarkIcon,\n close: CloseFilled,\n confirmModal: Information,\n delete: TrashCan,\n promptModal: Information,\n waitingFileUploader: CloudUpload,\n fileUploader: AnimatingUploadIcon,\n indeterminate: IndeterminateIcon,\n infoNotification: InformationFilled,\n successNotification: CheckmarkFilled,\n warningNotification: WarningFilled,\n dangerNotification: ErrorFilled,\n invalid: WarningFilled,\n invalidAlt: Warning,\n redo: Restart,\n selectArrow: ChevronDown,\n toggleChecked: Checkmark,\n}\n"],"mappings":";;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AA4BA,IAAM,eAA6B;AAAA,EACxC,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,eAAe;AACjB;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|