@goodhood-web/ui 3.0.0-development.22 → 3.0.0-development.24
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/index.js +62 -62
- package/index.mjs +4732 -4750
- package/lib/Molecules/Notices/Notice/Notice.d.ts +2 -2
- package/lib/Molecules/Notices/Notice/Notice.types.d.ts +59 -12
- package/package.json +1 -1
- package/style.css +1 -1
- package/lib/Molecules/Notices/Notice/InfoNotice/InfoNotice.d.ts +0 -3
- package/lib/Molecules/Notices/Notice/WarningNotice/WarningNotice.d.ts +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const Notice: (
|
|
1
|
+
import { NoticeInfoProps, NoticeWarningProps } from './Notice.types';
|
|
2
|
+
declare const Notice: ({ bodyText, color, context, cta, dismissible, headline, icon, markdown, notificationBubble, onDismiss, size, type, variant, }: NoticeWarningProps | NoticeInfoProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Notice;
|
|
@@ -1,18 +1,65 @@
|
|
|
1
1
|
import { IconButtonProps } from '../../../Atoms/Buttons/IconButton/IconButton.types';
|
|
2
2
|
import { TextButtonProps } from '../../../Atoms/Buttons/TextButton/TextButton.types';
|
|
3
3
|
import { NotificationBubbleProps } from '../../../Atoms/NotificationBubble/NotificationBubble.types';
|
|
4
|
-
import { Icon24 } from '../../../Base/Icon/Icon.types';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { Icon24, Icon32 } from '../../../Base/Icon/Icon.types';
|
|
5
|
+
interface NoticePropsBase {
|
|
6
|
+
bodyText?: string;
|
|
7
|
+
cta?: {
|
|
8
|
+
color?: TextButtonProps['color'];
|
|
9
|
+
onClick: TextButtonProps['onClick'];
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
headline: string;
|
|
13
|
+
icon?: {
|
|
14
|
+
name: Icon24;
|
|
15
|
+
size?: '24';
|
|
16
|
+
} | {
|
|
17
|
+
name: Icon32;
|
|
18
|
+
size: '32';
|
|
19
|
+
};
|
|
9
20
|
markdown?: boolean;
|
|
10
21
|
notificationBubble?: NotificationBubbleProps;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
secondaryText?: string;
|
|
15
|
-
size: 'small' | 'medium';
|
|
16
|
-
textButton?: string;
|
|
17
|
-
type: 'embedded' | 'sticky';
|
|
22
|
+
size?: 'small' | 'medium';
|
|
23
|
+
type?: 'embedded' | 'sticky';
|
|
24
|
+
variant?: 'detailed' | 'simple';
|
|
18
25
|
}
|
|
26
|
+
type NoticeProps = (NoticePropsBase & ({
|
|
27
|
+
bodyText?: never;
|
|
28
|
+
variant?: 'simple';
|
|
29
|
+
} | {
|
|
30
|
+
bodyText: string;
|
|
31
|
+
variant: 'detailed';
|
|
32
|
+
}) & {
|
|
33
|
+
dismissible?: false;
|
|
34
|
+
onDismiss?: IconButtonProps['onClick'];
|
|
35
|
+
}) | (NoticePropsBase & ({
|
|
36
|
+
bodyText: string;
|
|
37
|
+
variant: 'detailed';
|
|
38
|
+
} | {
|
|
39
|
+
bodyText?: never;
|
|
40
|
+
variant?: 'simple';
|
|
41
|
+
}) & {
|
|
42
|
+
dismissible?: true;
|
|
43
|
+
onDismiss: IconButtonProps['onClick'];
|
|
44
|
+
});
|
|
45
|
+
export type NoticeWarningProps = {
|
|
46
|
+
color?: 'pinkDark' | 'pinkLight';
|
|
47
|
+
context: 'warning';
|
|
48
|
+
} & NoticeProps;
|
|
49
|
+
export type NoticeInfoProps = {
|
|
50
|
+
color?: 'green' | 'grey' | 'vanilla';
|
|
51
|
+
context?: 'info';
|
|
52
|
+
} & NoticeProps;
|
|
53
|
+
export declare const VariantEnum: {
|
|
54
|
+
readonly DETAILED: "detailed";
|
|
55
|
+
readonly SIMPLE: "simple";
|
|
56
|
+
};
|
|
57
|
+
export declare const SizeEnum: {
|
|
58
|
+
readonly MEDIUM: "medium";
|
|
59
|
+
readonly SMALL: "small";
|
|
60
|
+
};
|
|
61
|
+
export declare const ContextEnum: {
|
|
62
|
+
readonly INFO: "info";
|
|
63
|
+
readonly WARNING: "warning";
|
|
64
|
+
};
|
|
65
|
+
export {};
|