@cerberus-design/react 0.16.0-next-7f1fa64 → 0.16.0-next-d049636
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 +94 -48
- package/build/legacy/components/admonition/admonition.cjs +314 -0
- package/build/legacy/components/admonition/admonition.cjs.map +1 -0
- package/build/legacy/components/admonition/index.cjs +326 -0
- package/build/legacy/components/admonition/index.cjs.map +1 -0
- package/build/legacy/components/{Admonition.client.cjs → admonition/match-avatar.cjs} +61 -65
- package/build/legacy/components/admonition/match-avatar.cjs.map +1 -0
- package/build/legacy/components/admonition/parts.cjs +88 -0
- package/build/legacy/components/admonition/parts.cjs.map +1 -0
- package/build/legacy/components/admonition/primitives.cjs +85 -0
- package/build/legacy/components/admonition/primitives.cjs.map +1 -0
- package/build/legacy/index.cjs +749 -718
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +94 -48
- package/build/modern/chunk-572S5CLA.js +41 -0
- package/build/modern/chunk-572S5CLA.js.map +1 -0
- package/build/modern/{chunk-32M5JS5F.js → chunk-6I2FW4WI.js} +5 -5
- package/build/modern/{chunk-3B4SFTQB.js → chunk-A45TFOGO.js} +4 -4
- package/build/modern/{chunk-J7SAFAW3.js → chunk-EKIAT7N7.js} +4 -4
- package/build/modern/{chunk-Z6EXPMTS.js → chunk-EKZENP7X.js} +6 -6
- package/build/modern/{chunk-WA3QADO4.js → chunk-EQPYRZ3X.js} +4 -4
- package/build/modern/{chunk-R7IDIIST.js → chunk-LT62577B.js} +2 -2
- package/build/modern/{chunk-3J5D3O6Z.js → chunk-NTU5OYUF.js} +2 -2
- package/build/modern/chunk-RKGFPKKK.js +59 -0
- package/build/modern/chunk-RKGFPKKK.js.map +1 -0
- package/build/modern/chunk-RQCJKDXU.js +21 -0
- package/build/modern/chunk-RQCJKDXU.js.map +1 -0
- package/build/modern/chunk-TM6TVO2D.js +78 -0
- package/build/modern/chunk-TM6TVO2D.js.map +1 -0
- package/build/modern/chunk-UR2NYAQC.js +1 -0
- package/build/modern/{chunk-VNPLKMEM.js → chunk-VSTOSLFS.js} +4 -4
- package/build/modern/{chunk-R662TP4N.js → chunk-XYDJ5TRW.js} +12 -12
- package/build/modern/components/FileStatus.js +6 -6
- package/build/modern/components/admonition/admonition.js +15 -0
- package/build/modern/components/admonition/index.js +30 -0
- package/build/modern/components/admonition/index.js.map +1 -0
- package/build/modern/components/admonition/match-avatar.js +11 -0
- package/build/modern/components/admonition/match-avatar.js.map +1 -0
- package/build/modern/components/admonition/parts.js +8 -0
- package/build/modern/components/admonition/parts.js.map +1 -0
- package/build/modern/components/admonition/primitives.js +15 -0
- package/build/modern/components/admonition/primitives.js.map +1 -0
- package/build/modern/components/combobox/combobox.js +2 -2
- package/build/modern/components/combobox/index.js +6 -6
- package/build/modern/components/cta-dialog/index.js +2 -2
- package/build/modern/components/cta-dialog/provider.js +2 -2
- package/build/modern/components/deprecated/Label.js +5 -5
- package/build/modern/components/field/field.js +3 -3
- package/build/modern/components/field/index.js +6 -6
- package/build/modern/components/field/parts.js +3 -3
- package/build/modern/components/field/primitives.js +2 -2
- package/build/modern/context/confirm-modal.js +2 -2
- package/build/modern/context/field.js +2 -2
- package/build/modern/context/prompt-modal.js +9 -9
- package/build/modern/index.js +126 -113
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/admonition/admonition.tsx +65 -0
- package/src/components/admonition/index.ts +3 -0
- package/src/components/admonition/match-avatar.tsx +84 -0
- package/src/components/admonition/parts.ts +53 -0
- package/src/components/admonition/primitives.tsx +73 -0
- package/src/index.ts +1 -1
- package/build/legacy/components/Admonition.cjs +0 -273
- package/build/legacy/components/Admonition.cjs.map +0 -1
- package/build/legacy/components/Admonition.client.cjs.map +0 -1
- package/build/modern/chunk-2HOUQ2DX.js +0 -82
- package/build/modern/chunk-2HOUQ2DX.js.map +0 -1
- package/build/modern/chunk-DXBZ3HMY.js +0 -68
- package/build/modern/chunk-DXBZ3HMY.js.map +0 -1
- package/build/modern/components/Admonition.client.js +0 -11
- package/build/modern/components/Admonition.js +0 -15
- package/src/components/Admonition.client.tsx +0 -73
- package/src/components/Admonition.tsx +0 -117
- /package/build/modern/{chunk-32M5JS5F.js.map → chunk-6I2FW4WI.js.map} +0 -0
- /package/build/modern/{chunk-3B4SFTQB.js.map → chunk-A45TFOGO.js.map} +0 -0
- /package/build/modern/{chunk-J7SAFAW3.js.map → chunk-EKIAT7N7.js.map} +0 -0
- /package/build/modern/{chunk-Z6EXPMTS.js.map → chunk-EKZENP7X.js.map} +0 -0
- /package/build/modern/{chunk-WA3QADO4.js.map → chunk-EQPYRZ3X.js.map} +0 -0
- /package/build/modern/{chunk-R7IDIIST.js.map → chunk-LT62577B.js.map} +0 -0
- /package/build/modern/{chunk-3J5D3O6Z.js.map → chunk-NTU5OYUF.js.map} +0 -0
- /package/build/modern/{components/Admonition.client.js.map → chunk-UR2NYAQC.js.map} +0 -0
- /package/build/modern/{chunk-VNPLKMEM.js.map → chunk-VSTOSLFS.js.map} +0 -0
- /package/build/modern/{chunk-R662TP4N.js.map → chunk-XYDJ5TRW.js.map} +0 -0
- /package/build/modern/components/{Admonition.js.map → admonition/admonition.js.map} +0 -0
package/build/modern/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ModalHeader
|
|
3
|
+
} from "./chunk-AUALRL3U.js";
|
|
4
|
+
import {
|
|
5
|
+
ModalHeading
|
|
6
|
+
} from "./chunk-SWX5JWZR.js";
|
|
7
|
+
import {
|
|
8
|
+
NavMenuLink
|
|
9
|
+
} from "./chunk-YOTXFCCC.js";
|
|
1
10
|
import {
|
|
2
11
|
NavMenuList,
|
|
3
12
|
getPosition
|
|
@@ -13,22 +22,13 @@ import {
|
|
|
13
22
|
} from "./chunk-DRDNNRU3.js";
|
|
14
23
|
import {
|
|
15
24
|
Label
|
|
16
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-LT62577B.js";
|
|
17
26
|
import {
|
|
18
27
|
Modal
|
|
19
28
|
} from "./chunk-Q3I4H6EC.js";
|
|
20
29
|
import {
|
|
21
30
|
ModalDescription
|
|
22
31
|
} from "./chunk-WECB67DC.js";
|
|
23
|
-
import {
|
|
24
|
-
ModalHeader
|
|
25
|
-
} from "./chunk-AUALRL3U.js";
|
|
26
|
-
import {
|
|
27
|
-
ModalHeading
|
|
28
|
-
} from "./chunk-SWX5JWZR.js";
|
|
29
|
-
import {
|
|
30
|
-
NavMenuLink
|
|
31
|
-
} from "./chunk-YOTXFCCC.js";
|
|
32
32
|
import {
|
|
33
33
|
ThemeProvider,
|
|
34
34
|
useThemeContext
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
ConfirmModal,
|
|
38
38
|
useConfirmModal
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-EQPYRZ3X.js";
|
|
40
40
|
import {
|
|
41
41
|
NavMenu,
|
|
42
42
|
useNavMenuContext
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
import {
|
|
49
49
|
PromptModal,
|
|
50
50
|
usePromptModal
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-XYDJ5TRW.js";
|
|
52
52
|
import {
|
|
53
53
|
Tab,
|
|
54
54
|
TabIndicator,
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
import {
|
|
106
106
|
FileStatus,
|
|
107
107
|
processStatus
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-EKZENP7X.js";
|
|
109
109
|
import {
|
|
110
110
|
ProgressBar
|
|
111
111
|
} from "./chunk-WZJ5UQNM.js";
|
|
@@ -124,13 +124,15 @@ import {
|
|
|
124
124
|
MenuSeparator,
|
|
125
125
|
MenuTrigger
|
|
126
126
|
} from "./chunk-RUR5MV54.js";
|
|
127
|
-
import "./chunk-
|
|
127
|
+
import "./chunk-V4YYGGMH.js";
|
|
128
128
|
import {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
ToggleParts
|
|
130
|
+
} from "./chunk-2CVGNLIM.js";
|
|
131
|
+
import {
|
|
132
|
+
ToggleIndicator,
|
|
133
|
+
ToggleRoot
|
|
134
|
+
} from "./chunk-CIMY2U22.js";
|
|
135
|
+
import "./chunk-V3M3ZOQI.js";
|
|
134
136
|
import {
|
|
135
137
|
CircularProgress
|
|
136
138
|
} from "./chunk-6QHOKCV3.js";
|
|
@@ -156,6 +158,23 @@ import {
|
|
|
156
158
|
DatePickerView,
|
|
157
159
|
DatePickerViewControl
|
|
158
160
|
} from "./chunk-5EWCH7AI.js";
|
|
161
|
+
import "./chunk-OGYMMATX.js";
|
|
162
|
+
import {
|
|
163
|
+
Radio
|
|
164
|
+
} from "./chunk-STLN7BMJ.js";
|
|
165
|
+
import {
|
|
166
|
+
RadioParts
|
|
167
|
+
} from "./chunk-FUL2VRDU.js";
|
|
168
|
+
import {
|
|
169
|
+
RadioGroup,
|
|
170
|
+
RadioGroupIndicator,
|
|
171
|
+
RadioGroupItem,
|
|
172
|
+
RadioGroupItemControl,
|
|
173
|
+
RadioGroupItemHiddenInput,
|
|
174
|
+
RadioGroupItemText,
|
|
175
|
+
RadioGroupLabel,
|
|
176
|
+
RadioGroupRoot
|
|
177
|
+
} from "./chunk-5RTNSVYU.js";
|
|
159
178
|
import "./chunk-ZOSGUATV.js";
|
|
160
179
|
import {
|
|
161
180
|
Rating
|
|
@@ -199,21 +218,50 @@ import {
|
|
|
199
218
|
SwitchRoot,
|
|
200
219
|
SwitchThumb
|
|
201
220
|
} from "./chunk-LZWNHXRP.js";
|
|
202
|
-
import "./chunk-
|
|
221
|
+
import "./chunk-IKDXADLX.js";
|
|
203
222
|
import {
|
|
204
|
-
|
|
205
|
-
|
|
223
|
+
CTAModal,
|
|
224
|
+
useCTAModal
|
|
225
|
+
} from "./chunk-A45TFOGO.js";
|
|
226
|
+
import "./chunk-4LSTU6WU.js";
|
|
227
|
+
import "./chunk-MVO2GNUA.js";
|
|
206
228
|
import {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
229
|
+
For
|
|
230
|
+
} from "./chunk-DXOKSZVQ.js";
|
|
231
|
+
import {
|
|
232
|
+
createCTAModalActions
|
|
233
|
+
} from "./chunk-PLHYOCY3.js";
|
|
234
|
+
import "./chunk-DJOYRUNT.js";
|
|
235
|
+
import {
|
|
236
|
+
DialogCloseIconTrigger
|
|
237
|
+
} from "./chunk-NZKE7C53.js";
|
|
238
|
+
import {
|
|
239
|
+
Dialog
|
|
240
|
+
} from "./chunk-MH6CIBDU.js";
|
|
241
|
+
import {
|
|
242
|
+
IconButton
|
|
243
|
+
} from "./chunk-APD6IX5R.js";
|
|
244
|
+
import {
|
|
245
|
+
DialogParts
|
|
246
|
+
} from "./chunk-FCSO6N2Y.js";
|
|
247
|
+
import {
|
|
248
|
+
DialogBackdrop,
|
|
249
|
+
DialogCloseTrigger,
|
|
250
|
+
DialogContent,
|
|
251
|
+
DialogDescription,
|
|
252
|
+
DialogHeading,
|
|
253
|
+
DialogPositioner,
|
|
254
|
+
DialogProvider,
|
|
255
|
+
DialogRoot,
|
|
256
|
+
DialogTrigger
|
|
257
|
+
} from "./chunk-D7UIWAFO.js";
|
|
210
258
|
import "./chunk-TYPULJMJ.js";
|
|
211
259
|
import {
|
|
212
260
|
Field
|
|
213
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-NTU5OYUF.js";
|
|
214
262
|
import {
|
|
215
263
|
FieldParts
|
|
216
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-6I2FW4WI.js";
|
|
217
265
|
import {
|
|
218
266
|
FieldErrorText,
|
|
219
267
|
FieldHelperText,
|
|
@@ -224,13 +272,13 @@ import {
|
|
|
224
272
|
FieldTextarea,
|
|
225
273
|
Input,
|
|
226
274
|
Textarea
|
|
227
|
-
} from "./chunk-
|
|
228
|
-
import {
|
|
229
|
-
FieldStatusIndicator
|
|
230
|
-
} from "./chunk-CNA2VKAH.js";
|
|
275
|
+
} from "./chunk-VSTOSLFS.js";
|
|
231
276
|
import {
|
|
232
277
|
FieldStartIndicator
|
|
233
278
|
} from "./chunk-Z52R6ABJ.js";
|
|
279
|
+
import {
|
|
280
|
+
FieldStatusIndicator
|
|
281
|
+
} from "./chunk-CNA2VKAH.js";
|
|
234
282
|
import "./chunk-IDTAB2UJ.js";
|
|
235
283
|
import {
|
|
236
284
|
Fieldset
|
|
@@ -244,27 +292,35 @@ import {
|
|
|
244
292
|
FieldsetLegend,
|
|
245
293
|
FieldsetRoot
|
|
246
294
|
} from "./chunk-Z3FDG263.js";
|
|
247
|
-
import "./chunk-
|
|
295
|
+
import "./chunk-UR2NYAQC.js";
|
|
248
296
|
import {
|
|
249
|
-
|
|
250
|
-
} from "./chunk-
|
|
297
|
+
Admonition
|
|
298
|
+
} from "./chunk-572S5CLA.js";
|
|
299
|
+
import "./chunk-TM6TVO2D.js";
|
|
251
300
|
import {
|
|
252
|
-
|
|
253
|
-
} from "./chunk-
|
|
301
|
+
Avatar
|
|
302
|
+
} from "./chunk-SXLPDPOZ.js";
|
|
254
303
|
import {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
} from "./chunk-
|
|
304
|
+
AdmonitionParts
|
|
305
|
+
} from "./chunk-RQCJKDXU.js";
|
|
306
|
+
import {
|
|
307
|
+
AdmonitionContent,
|
|
308
|
+
AdmonitionDescription,
|
|
309
|
+
AdmonitionHeading,
|
|
310
|
+
AdmonitionIndicator,
|
|
311
|
+
AdmonitionRoot
|
|
312
|
+
} from "./chunk-RKGFPKKK.js";
|
|
264
313
|
import "./chunk-CYC2YUKU.js";
|
|
265
314
|
import {
|
|
266
315
|
ButtonParts
|
|
267
316
|
} from "./chunk-2BIHLH4V.js";
|
|
317
|
+
import {
|
|
318
|
+
Button,
|
|
319
|
+
ButtonIcon
|
|
320
|
+
} from "./chunk-6KZVE4HC.js";
|
|
321
|
+
import {
|
|
322
|
+
Spinner
|
|
323
|
+
} from "./chunk-7SYJFI5E.js";
|
|
268
324
|
import "./chunk-TIJAFPHQ.js";
|
|
269
325
|
import {
|
|
270
326
|
Checkbox
|
|
@@ -287,33 +343,13 @@ import {
|
|
|
287
343
|
import "./chunk-ML2IKLMJ.js";
|
|
288
344
|
import {
|
|
289
345
|
Combobox
|
|
290
|
-
} from "./chunk-
|
|
346
|
+
} from "./chunk-EKIAT7N7.js";
|
|
291
347
|
import {
|
|
292
348
|
ComboItemGroup
|
|
293
349
|
} from "./chunk-FZ53535Q.js";
|
|
294
350
|
import {
|
|
295
351
|
ComboItemWithIndicator
|
|
296
352
|
} from "./chunk-XBUXVNTY.js";
|
|
297
|
-
import {
|
|
298
|
-
ComboboxParts
|
|
299
|
-
} from "./chunk-HIC7Z23X.js";
|
|
300
|
-
import {
|
|
301
|
-
ComboItemText,
|
|
302
|
-
ComboboxClearTrigger,
|
|
303
|
-
ComboboxContent,
|
|
304
|
-
ComboboxControl,
|
|
305
|
-
ComboboxInput,
|
|
306
|
-
ComboboxItem,
|
|
307
|
-
ComboboxItemGroup,
|
|
308
|
-
ComboboxItemGroupLabel,
|
|
309
|
-
ComboboxItemIndicator,
|
|
310
|
-
ComboboxItemText,
|
|
311
|
-
ComboboxLabel,
|
|
312
|
-
ComboboxPositioner,
|
|
313
|
-
ComboboxRoot,
|
|
314
|
-
ComboboxStartIcon,
|
|
315
|
-
ComboboxTrigger
|
|
316
|
-
} from "./chunk-NR5XDIJ7.js";
|
|
317
353
|
import {
|
|
318
354
|
useStatefulCollection
|
|
319
355
|
} from "./chunk-MR4DX76C.js";
|
|
@@ -335,56 +371,29 @@ import {
|
|
|
335
371
|
SelectValueText,
|
|
336
372
|
createSelectCollection
|
|
337
373
|
} from "./chunk-QCBLRACK.js";
|
|
338
|
-
import "./chunk-IKDXADLX.js";
|
|
339
|
-
import {
|
|
340
|
-
CTAModal,
|
|
341
|
-
useCTAModal
|
|
342
|
-
} from "./chunk-3B4SFTQB.js";
|
|
343
|
-
import "./chunk-4LSTU6WU.js";
|
|
344
|
-
import "./chunk-MVO2GNUA.js";
|
|
345
|
-
import {
|
|
346
|
-
For
|
|
347
|
-
} from "./chunk-DXOKSZVQ.js";
|
|
348
|
-
import {
|
|
349
|
-
Avatar
|
|
350
|
-
} from "./chunk-SXLPDPOZ.js";
|
|
351
|
-
import {
|
|
352
|
-
createCTAModalActions
|
|
353
|
-
} from "./chunk-PLHYOCY3.js";
|
|
354
|
-
import "./chunk-DJOYRUNT.js";
|
|
355
|
-
import {
|
|
356
|
-
DialogCloseIconTrigger
|
|
357
|
-
} from "./chunk-NZKE7C53.js";
|
|
358
|
-
import {
|
|
359
|
-
Dialog
|
|
360
|
-
} from "./chunk-MH6CIBDU.js";
|
|
361
|
-
import {
|
|
362
|
-
IconButton
|
|
363
|
-
} from "./chunk-APD6IX5R.js";
|
|
364
|
-
import {
|
|
365
|
-
DialogParts
|
|
366
|
-
} from "./chunk-FCSO6N2Y.js";
|
|
367
|
-
import {
|
|
368
|
-
DialogBackdrop,
|
|
369
|
-
DialogCloseTrigger,
|
|
370
|
-
DialogContent,
|
|
371
|
-
DialogDescription,
|
|
372
|
-
DialogHeading,
|
|
373
|
-
DialogPositioner,
|
|
374
|
-
DialogProvider,
|
|
375
|
-
DialogRoot,
|
|
376
|
-
DialogTrigger
|
|
377
|
-
} from "./chunk-D7UIWAFO.js";
|
|
378
|
-
import {
|
|
379
|
-
Button,
|
|
380
|
-
ButtonIcon
|
|
381
|
-
} from "./chunk-6KZVE4HC.js";
|
|
382
|
-
import {
|
|
383
|
-
Spinner
|
|
384
|
-
} from "./chunk-7SYJFI5E.js";
|
|
385
374
|
import {
|
|
386
375
|
Portal
|
|
387
376
|
} from "./chunk-IQJDVFPP.js";
|
|
377
|
+
import {
|
|
378
|
+
ComboboxParts
|
|
379
|
+
} from "./chunk-HIC7Z23X.js";
|
|
380
|
+
import {
|
|
381
|
+
ComboItemText,
|
|
382
|
+
ComboboxClearTrigger,
|
|
383
|
+
ComboboxContent,
|
|
384
|
+
ComboboxControl,
|
|
385
|
+
ComboboxInput,
|
|
386
|
+
ComboboxItem,
|
|
387
|
+
ComboboxItemGroup,
|
|
388
|
+
ComboboxItemGroupLabel,
|
|
389
|
+
ComboboxItemIndicator,
|
|
390
|
+
ComboboxItemText,
|
|
391
|
+
ComboboxLabel,
|
|
392
|
+
ComboboxPositioner,
|
|
393
|
+
ComboboxRoot,
|
|
394
|
+
ComboboxStartIcon,
|
|
395
|
+
ComboboxTrigger
|
|
396
|
+
} from "./chunk-NR5XDIJ7.js";
|
|
388
397
|
import {
|
|
389
398
|
useModal
|
|
390
399
|
} from "./chunk-KGQG5JGW.js";
|
|
@@ -466,8 +475,12 @@ export {
|
|
|
466
475
|
AccordionParts,
|
|
467
476
|
AccordionRoot,
|
|
468
477
|
Admonition,
|
|
478
|
+
AdmonitionContent,
|
|
469
479
|
AdmonitionDescription,
|
|
470
480
|
AdmonitionHeading,
|
|
481
|
+
AdmonitionIndicator,
|
|
482
|
+
AdmonitionParts,
|
|
483
|
+
AdmonitionRoot,
|
|
471
484
|
Avatar,
|
|
472
485
|
Button,
|
|
473
486
|
ButtonIcon,
|
|
@@ -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// deprecated\n\nexport * from './components/deprecated/FieldMessage'\nexport * from './components/deprecated/FieldsetLabel'\nexport * from './components/deprecated/Label'\nexport * from './components/deprecated/Modal'\nexport * from './components/deprecated/ModalHeader'\nexport * from './components/deprecated/ModalHeading'\nexport * from './components/deprecated/ModalDescription'\nexport * from './components/deprecated/NavMenuTrigger'\nexport * from './components/deprecated/NavMenuList'\nexport * from './components/deprecated/NavMenuLink'\nexport * from './hooks/useDate'\nexport * from './hooks/useModal'\nexport * from './hooks/useToggle'\n\n// components\n\nexport * from './components/
|
|
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// deprecated\n\nexport * from './components/deprecated/FieldMessage'\nexport * from './components/deprecated/FieldsetLabel'\nexport * from './components/deprecated/Label'\nexport * from './components/deprecated/Modal'\nexport * from './components/deprecated/ModalHeader'\nexport * from './components/deprecated/ModalHeading'\nexport * from './components/deprecated/ModalDescription'\nexport * from './components/deprecated/NavMenuTrigger'\nexport * from './components/deprecated/NavMenuList'\nexport * from './components/deprecated/NavMenuLink'\nexport * from './hooks/useDate'\nexport * from './hooks/useModal'\nexport * from './hooks/useToggle'\n\n// components\n\nexport * from './components/admonition/index'\nexport * from './components/accordion/index'\nexport * from './components/Avatar'\nexport * from './components/button/index'\nexport * from './components/checkbox/index'\nexport * from './components/CircularProgress'\nexport * from './components/combobox/index'\nexport * from './components/cta-dialog/index'\nexport * from './components/DatePicker.client'\nexport * from './components/DatePicker.server'\nexport * from './components/dialog/index'\nexport * from './components/Droppable'\nexport * from './components/FeatureFlag'\nexport * from './components/field/index'\nexport * from './components/fieldset/index'\nexport * from './components/FileStatus'\nexport * from './components/FileUploader'\nexport * from './components/for'\nexport * from './components/IconButton'\nexport * from './components/Legend'\nexport * from './components/Menu'\nexport * from './components/Notification'\nexport * from './components/NotificationHeading'\nexport * from './components/NotificationDescription'\nexport * from './components/Portal'\nexport * from './components/ProgressBar'\nexport * from './components/radio/index'\nexport * from './components/rating/index'\nexport * from './components/select/index'\nexport * from './components/Show'\nexport * from './components/Spinner'\nexport * from './components/switch/index'\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/toggle/index'\nexport * from './components/Tooltip'\n\n// context\n\nexport * from './context/cerberus'\nexport * from './context/confirm-modal'\nexport * from './context/feature-flags'\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/useTheme'\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkGA,cAAc;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerberus-design/react",
|
|
3
|
-
"version": "0.16.0-next-
|
|
3
|
+
"version": "0.16.0-next-d049636",
|
|
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.16.0-next-
|
|
29
|
+
"@cerberus/styled-system": "npm:@cerberus-design/styled-system@0.16.0-next-d049636"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { HTMLArkProps } from '@ark-ui/react/factory'
|
|
2
|
+
import type { AdmonitionVariantProps } from '@cerberus/styled-system/recipes'
|
|
3
|
+
import type { ReactNode } from 'react'
|
|
4
|
+
import { splitProps } from '../../utils/index'
|
|
5
|
+
import { AdmonitionParts } from './parts'
|
|
6
|
+
import { Show } from '../Show'
|
|
7
|
+
import { MatchAvatar } from './match-avatar'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* This module provides an abstraction for the Admonition component.
|
|
11
|
+
* @module 'admonition/admonition'
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export interface AdmonitionProps
|
|
15
|
+
extends AdmonitionVariantProps,
|
|
16
|
+
HTMLArkProps<'aside'> {
|
|
17
|
+
/**
|
|
18
|
+
* The heading title for the Admonition.
|
|
19
|
+
*/
|
|
20
|
+
heading?: string
|
|
21
|
+
/**
|
|
22
|
+
* One off replacement for the icon.
|
|
23
|
+
*/
|
|
24
|
+
icon?: ReactNode
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The Admonition component is an abstraction of the primitives which
|
|
29
|
+
* displays a Admonition with a label.
|
|
30
|
+
*
|
|
31
|
+
* @description [Cerberus Docs](https://cerberus.digitalu.design/react/admonition)
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
*
|
|
35
|
+
* For a customizable Admonition, use the `AdmonitionParts` object to access the
|
|
36
|
+
* individual primitives of the Admonition component.
|
|
37
|
+
*/
|
|
38
|
+
export function Admonition(props: AdmonitionProps) {
|
|
39
|
+
const [elProps, styleProps, rootProps] = splitProps(
|
|
40
|
+
props,
|
|
41
|
+
['heading', 'icon', 'children'],
|
|
42
|
+
['palette', 'usage'],
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<AdmonitionParts.Root {...styleProps} {...rootProps}>
|
|
47
|
+
<Show
|
|
48
|
+
when={Boolean(elProps.icon)}
|
|
49
|
+
fallback={<MatchAvatar palette={styleProps.palette} />}
|
|
50
|
+
>
|
|
51
|
+
<AdmonitionParts.Indicator>{elProps.icon}</AdmonitionParts.Indicator>
|
|
52
|
+
</Show>
|
|
53
|
+
|
|
54
|
+
<AdmonitionParts.Content>
|
|
55
|
+
<Show when={Boolean(elProps.heading)}>
|
|
56
|
+
<AdmonitionParts.Heading>{elProps.heading}</AdmonitionParts.Heading>
|
|
57
|
+
</Show>
|
|
58
|
+
|
|
59
|
+
<AdmonitionParts.Description>
|
|
60
|
+
{elProps.children}
|
|
61
|
+
</AdmonitionParts.Description>
|
|
62
|
+
</AdmonitionParts.Content>
|
|
63
|
+
</AdmonitionParts.Root>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import type { AdmonitionVariantProps } from '@cerberus/styled-system/recipes'
|
|
4
|
+
import { useCerberusContext } from '../../context/cerberus'
|
|
5
|
+
import { Avatar } from '../Avatar'
|
|
6
|
+
import { useRef, type ReactNode } from 'react'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This module provides a component for creating the admonition indicator.
|
|
10
|
+
* @module 'admonition/match-avatar'
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
interface AvatarRefProps {
|
|
14
|
+
page: ReactNode
|
|
15
|
+
info: ReactNode
|
|
16
|
+
success: ReactNode
|
|
17
|
+
warning: ReactNode
|
|
18
|
+
danger: ReactNode
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type MatchAvatarProps = AdmonitionVariantProps
|
|
22
|
+
|
|
23
|
+
export function MatchAvatar(props: MatchAvatarProps) {
|
|
24
|
+
const { palette = 'page' } = props
|
|
25
|
+
|
|
26
|
+
const { icons } = useCerberusContext()
|
|
27
|
+
const {
|
|
28
|
+
infoNotification: InfoIcon,
|
|
29
|
+
successNotification: SuccessIcon,
|
|
30
|
+
warningNotification: WarningIcon,
|
|
31
|
+
dangerNotification: DangerIcon,
|
|
32
|
+
} = icons
|
|
33
|
+
|
|
34
|
+
// cache the el since the result is static and the component is client side
|
|
35
|
+
const elRef = useRef<AvatarRefProps>({
|
|
36
|
+
page: (
|
|
37
|
+
<Avatar
|
|
38
|
+
gradient="charon-light"
|
|
39
|
+
ariaLabel=""
|
|
40
|
+
icon={<InfoIcon />}
|
|
41
|
+
size="sm"
|
|
42
|
+
src=""
|
|
43
|
+
/>
|
|
44
|
+
),
|
|
45
|
+
info: (
|
|
46
|
+
<Avatar
|
|
47
|
+
gradient="amphiaraus-dark"
|
|
48
|
+
ariaLabel=""
|
|
49
|
+
icon={<InfoIcon />}
|
|
50
|
+
size="sm"
|
|
51
|
+
src=""
|
|
52
|
+
/>
|
|
53
|
+
),
|
|
54
|
+
success: (
|
|
55
|
+
<Avatar
|
|
56
|
+
gradient="thanatos-dark"
|
|
57
|
+
ariaLabel=""
|
|
58
|
+
icon={<SuccessIcon />}
|
|
59
|
+
size="sm"
|
|
60
|
+
src=""
|
|
61
|
+
/>
|
|
62
|
+
),
|
|
63
|
+
warning: (
|
|
64
|
+
<Avatar
|
|
65
|
+
gradient="asphodel-light"
|
|
66
|
+
ariaLabel=""
|
|
67
|
+
icon={<WarningIcon />}
|
|
68
|
+
size="sm"
|
|
69
|
+
src=""
|
|
70
|
+
/>
|
|
71
|
+
),
|
|
72
|
+
danger: (
|
|
73
|
+
<Avatar
|
|
74
|
+
gradient="hades-light"
|
|
75
|
+
ariaLabel=""
|
|
76
|
+
icon={<DangerIcon />}
|
|
77
|
+
size="sm"
|
|
78
|
+
src=""
|
|
79
|
+
/>
|
|
80
|
+
),
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
return <>{elRef.current[palette]}</>
|
|
84
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ElementType } from 'react'
|
|
2
|
+
import {
|
|
3
|
+
AdmonitionContent,
|
|
4
|
+
AdmonitionDescription,
|
|
5
|
+
AdmonitionHeading,
|
|
6
|
+
AdmonitionIndicator,
|
|
7
|
+
AdmonitionRoot,
|
|
8
|
+
} from './primitives'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* This module contains the parts of the Admonition component.
|
|
12
|
+
* @module 'admonition/parts'
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
interface AdmonitionPartsValue {
|
|
16
|
+
/**
|
|
17
|
+
* The context provider of the Admonition.
|
|
18
|
+
*/
|
|
19
|
+
Root: ElementType
|
|
20
|
+
/**
|
|
21
|
+
* The indicator of the Admonition.
|
|
22
|
+
*/
|
|
23
|
+
Indicator: ElementType
|
|
24
|
+
/**
|
|
25
|
+
* The content of the Admonition.
|
|
26
|
+
*/
|
|
27
|
+
Content: ElementType
|
|
28
|
+
/**
|
|
29
|
+
* The heading of the Admonition.
|
|
30
|
+
*/
|
|
31
|
+
Heading: ElementType
|
|
32
|
+
/**
|
|
33
|
+
* The description of the Admonition.
|
|
34
|
+
*/
|
|
35
|
+
Description: ElementType
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* An Object containing the parts of the Accordion component. For users that
|
|
40
|
+
* prefer Object component syntax.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
*
|
|
44
|
+
* When using object component syntax, you import the AdmonitionParts object and
|
|
45
|
+
* the entire family of components vs. only what you use.
|
|
46
|
+
*/
|
|
47
|
+
export const AdmonitionParts: AdmonitionPartsValue = {
|
|
48
|
+
Root: AdmonitionRoot,
|
|
49
|
+
Indicator: AdmonitionIndicator,
|
|
50
|
+
Content: AdmonitionContent,
|
|
51
|
+
Heading: AdmonitionHeading,
|
|
52
|
+
Description: AdmonitionDescription,
|
|
53
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ark, type HTMLArkProps } from '@ark-ui/react/factory'
|
|
2
|
+
import { cx } from '@cerberus/styled-system/css'
|
|
3
|
+
import {
|
|
4
|
+
admonition,
|
|
5
|
+
type AdmonitionVariantProps,
|
|
6
|
+
} from '@cerberus/styled-system/recipes'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This module contains the primitives of the Admonition components.
|
|
10
|
+
* @module 'admonition/primitives'
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The `AdmonitionRoot` component is the container for the Admonition.
|
|
15
|
+
*/
|
|
16
|
+
export function AdmonitionRoot(
|
|
17
|
+
props: HTMLArkProps<'aside'> & AdmonitionVariantProps,
|
|
18
|
+
) {
|
|
19
|
+
const { palette, usage, ...nativeProps } = props
|
|
20
|
+
const styles = admonition({ palette, usage })
|
|
21
|
+
return (
|
|
22
|
+
<ark.aside
|
|
23
|
+
{...nativeProps}
|
|
24
|
+
className={cx(styles.root, nativeProps.className)}
|
|
25
|
+
data-scope="admonition"
|
|
26
|
+
data-part="root"
|
|
27
|
+
/>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The `AdmonitionIndicator` component is the indicator for the Admonition.
|
|
33
|
+
*/
|
|
34
|
+
export function AdmonitionIndicator(props: HTMLArkProps<'span'>) {
|
|
35
|
+
return <ark.span {...props} data-scope="admonition" data-part="indicator" />
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The `AdmonitionContent` component is the content for the Admonition.
|
|
40
|
+
*/
|
|
41
|
+
export function AdmonitionContent(props: HTMLArkProps<'div'>) {
|
|
42
|
+
return <ark.div {...props} data-scope="admonition" data-part="content" />
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The `AdmonitionHeading` component is the heading title for the Admonition.
|
|
47
|
+
*/
|
|
48
|
+
export function AdmonitionHeading(props: HTMLArkProps<'p'>) {
|
|
49
|
+
const styles = admonition()
|
|
50
|
+
return (
|
|
51
|
+
<ark.p
|
|
52
|
+
{...props}
|
|
53
|
+
className={cx(styles.heading, props.className)}
|
|
54
|
+
data-scope="admonition"
|
|
55
|
+
data-part="heading"
|
|
56
|
+
/>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The `AdmonitionDescription` component is the description for the Admonition.
|
|
62
|
+
*/
|
|
63
|
+
export function AdmonitionDescription(props: HTMLArkProps<'p'>) {
|
|
64
|
+
const styles = admonition()
|
|
65
|
+
return (
|
|
66
|
+
<ark.p
|
|
67
|
+
{...props}
|
|
68
|
+
className={cx(styles.description, props.className)}
|
|
69
|
+
data-scope="admonition"
|
|
70
|
+
data-part="description"
|
|
71
|
+
/>
|
|
72
|
+
)
|
|
73
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -21,8 +21,8 @@ export * from './hooks/useToggle'
|
|
|
21
21
|
|
|
22
22
|
// components
|
|
23
23
|
|
|
24
|
+
export * from './components/admonition/index'
|
|
24
25
|
export * from './components/accordion/index'
|
|
25
|
-
export * from './components/Admonition'
|
|
26
26
|
export * from './components/Avatar'
|
|
27
27
|
export * from './components/button/index'
|
|
28
28
|
export * from './components/checkbox/index'
|