@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
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
admonition,
|
|
3
|
-
type AdmonitionVariantProps,
|
|
4
|
-
} from '@cerberus/styled-system/recipes'
|
|
5
|
-
import { cx } from '@cerberus/styled-system/css'
|
|
6
|
-
import { hstack } from '@cerberus/styled-system/patterns'
|
|
7
|
-
import type { HTMLAttributes, ReactNode } from 'react'
|
|
8
|
-
import { Show } from './Show'
|
|
9
|
-
import { MatchAvatar } from './Admonition.client'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* This module provides a set of components for creating admonitions.
|
|
13
|
-
* @module Admonition
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export type AdmonitionProps = HTMLAttributes<HTMLDivElement> &
|
|
17
|
-
AdmonitionVariantProps & {
|
|
18
|
-
/**
|
|
19
|
-
* One off replacement for the icon.
|
|
20
|
-
*/
|
|
21
|
-
icon?: ReactNode
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The `Admonition` component is used to create an admonition.
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* <Admonition palette="page">
|
|
29
|
-
* <AdmonitionHeading palette="page">Page</AdmonitionHeading>
|
|
30
|
-
* <AdmonitionDescription palette="page">
|
|
31
|
-
* This is a page admonition.
|
|
32
|
-
* </AdmonitionDescription>
|
|
33
|
-
* </Admonition>
|
|
34
|
-
* ```
|
|
35
|
-
* @see https://cerberus.digitalu.design/react/admonition
|
|
36
|
-
*/
|
|
37
|
-
export function Admonition(props: AdmonitionProps) {
|
|
38
|
-
const { children, palette = 'page', usage, icon, ...nativeProps } = props
|
|
39
|
-
return (
|
|
40
|
-
<aside
|
|
41
|
-
{...nativeProps}
|
|
42
|
-
className={cx(
|
|
43
|
-
nativeProps.className,
|
|
44
|
-
hstack({
|
|
45
|
-
gap: 'md',
|
|
46
|
-
w: 'full',
|
|
47
|
-
}),
|
|
48
|
-
admonition({ palette, usage }).root,
|
|
49
|
-
)}
|
|
50
|
-
>
|
|
51
|
-
<Show when={Boolean(icon)} fallback={<MatchAvatar palette={palette} />}>
|
|
52
|
-
{icon}
|
|
53
|
-
</Show>
|
|
54
|
-
<div>{children}</div>
|
|
55
|
-
</aside>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export type AdmonitionHeadingProps = HTMLAttributes<HTMLParagraphElement> &
|
|
60
|
-
AdmonitionVariantProps
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* The `AdmonitionHeading` component is used to create a heading within an
|
|
64
|
-
* admonition.
|
|
65
|
-
* @example
|
|
66
|
-
* ```tsx
|
|
67
|
-
* <Admonition palette="page">
|
|
68
|
-
* <AdmonitionHeading palette="page">Page</AdmonitionHeading>
|
|
69
|
-
* <AdmonitionDescription palette="page">
|
|
70
|
-
* This is a page admonition.
|
|
71
|
-
* </AdmonitionDescription>
|
|
72
|
-
* </Admonition>
|
|
73
|
-
* ```
|
|
74
|
-
* @see https://cerberus.digitalu.design/react/admonition
|
|
75
|
-
*/
|
|
76
|
-
export function AdmonitionHeading(props: AdmonitionHeadingProps) {
|
|
77
|
-
const { palette, usage, ...nativeProps } = props
|
|
78
|
-
return (
|
|
79
|
-
<p
|
|
80
|
-
{...nativeProps}
|
|
81
|
-
className={cx(
|
|
82
|
-
nativeProps.className,
|
|
83
|
-
admonition({ palette, usage }).heading,
|
|
84
|
-
)}
|
|
85
|
-
/>
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export type AdmonitionDescriptionProps = HTMLAttributes<HTMLParagraphElement> &
|
|
90
|
-
AdmonitionVariantProps
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* The `AdmonitionDescription` component is used to create a description within
|
|
94
|
-
* an admonition.
|
|
95
|
-
* @example
|
|
96
|
-
* ```tsx
|
|
97
|
-
* <Admonition palette="page">
|
|
98
|
-
* <AdmonitionHeading palette="page">Page</AdmonitionHeading>
|
|
99
|
-
* <AdmonitionDescription palette="page">
|
|
100
|
-
* This is a page admonition.
|
|
101
|
-
* </AdmonitionDescription>
|
|
102
|
-
* </Admonition>
|
|
103
|
-
* ```
|
|
104
|
-
* @see https://cerberus.digitalu.design/react/admonition
|
|
105
|
-
*/
|
|
106
|
-
export function AdmonitionDescription(props: AdmonitionDescriptionProps) {
|
|
107
|
-
const { palette, usage, ...nativeProps } = props
|
|
108
|
-
return (
|
|
109
|
-
<p
|
|
110
|
-
{...nativeProps}
|
|
111
|
-
className={cx(
|
|
112
|
-
nativeProps.className,
|
|
113
|
-
admonition({ palette, usage }).description,
|
|
114
|
-
)}
|
|
115
|
-
/>
|
|
116
|
-
)
|
|
117
|
-
}
|
|
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
|