@newtonschool/grauity 1.2.0 → 1.2.2

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.
Files changed (43) hide show
  1. package/dist/index.d.ts +271 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/main.cjs +1 -1
  4. package/dist/main.cjs.map +1 -1
  5. package/dist/module.mjs +1 -1
  6. package/dist/module.mjs.map +1 -1
  7. package/dist/ui/elements/Accordion/Accordion.styles.d.ts.map +1 -1
  8. package/dist/ui/elements/Alert/Alert.d.ts +8 -0
  9. package/dist/ui/elements/Alert/Alert.d.ts.map +1 -0
  10. package/dist/ui/elements/Alert/Alert.styles.d.ts +7 -0
  11. package/dist/ui/elements/Alert/Alert.styles.d.ts.map +1 -0
  12. package/dist/ui/elements/Alert/constants.d.ts +140 -0
  13. package/dist/ui/elements/Alert/constants.d.ts.map +1 -0
  14. package/dist/ui/elements/Alert/index.d.ts +7 -0
  15. package/dist/ui/elements/Alert/index.d.ts.map +1 -0
  16. package/dist/ui/elements/Alert/types.d.ts +125 -0
  17. package/dist/ui/elements/Alert/types.d.ts.map +1 -0
  18. package/dist/ui/elements/AlertBanner/AlertBanner.d.ts +9 -0
  19. package/dist/ui/elements/AlertBanner/AlertBanner.d.ts.map +1 -0
  20. package/dist/ui/elements/AlertBanner/AlertBanner.styles.d.ts +4 -0
  21. package/dist/ui/elements/AlertBanner/AlertBanner.styles.d.ts.map +1 -0
  22. package/dist/ui/elements/AlertBanner/constants.d.ts +140 -0
  23. package/dist/ui/elements/AlertBanner/constants.d.ts.map +1 -0
  24. package/dist/ui/elements/AlertBanner/index.d.ts +7 -0
  25. package/dist/ui/elements/AlertBanner/index.d.ts.map +1 -0
  26. package/dist/ui/elements/AlertBanner/types.d.ts +111 -0
  27. package/dist/ui/elements/AlertBanner/types.d.ts.map +1 -0
  28. package/dist/ui/elements/AlertBanner/utils.d.ts +105 -0
  29. package/dist/ui/elements/AlertBanner/utils.d.ts.map +1 -0
  30. package/dist/ui/elements/Tooltip/Tooltip.d.ts +4 -0
  31. package/dist/ui/elements/Tooltip/Tooltip.d.ts.map +1 -0
  32. package/dist/ui/elements/Tooltip/Tooltip.styles.d.ts +5 -0
  33. package/dist/ui/elements/Tooltip/Tooltip.styles.d.ts.map +1 -0
  34. package/dist/ui/elements/Tooltip/constants.d.ts +15 -0
  35. package/dist/ui/elements/Tooltip/constants.d.ts.map +1 -0
  36. package/dist/ui/elements/Tooltip/index.d.ts +3 -0
  37. package/dist/ui/elements/Tooltip/index.d.ts.map +1 -0
  38. package/dist/ui/elements/Tooltip/types.d.ts +66 -0
  39. package/dist/ui/elements/Tooltip/types.d.ts.map +1 -0
  40. package/dist/ui/index.d.ts +3 -0
  41. package/dist/ui/index.d.ts.map +1 -1
  42. package/dist/ui/themes/GlobalStyle.d.ts +1 -1
  43. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.styles.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Accordion/Accordion.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,qBAAqB,6FAajC,CAAC;AAEF,eAAO,MAAM,sBAAsB,sLAKlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,iFAGlC,CAAC;AAEF,eAAO,MAAM,UAAU,qEAGtB,CAAC"}
1
+ {"version":3,"file":"Accordion.styles.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Accordion/Accordion.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,qBAAqB,6FAcjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,sLAOlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,iFAGlC,CAAC;AAEF,eAAO,MAAM,UAAU,qEAGtB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { AlertProps } from './types';
3
+ /**
4
+ * An alert component is used to display important messages to the user.
5
+ */
6
+ declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
7
+ export default Alert;
8
+ //# sourceMappingURL=Alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Alert/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAkBjD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,QAAA,MAAM,KAAK,mFAwFT,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { AlertBodyProps, AlertContainerProps, AlertDescriptionProps, AlertTitleProps } from './types';
2
+ export declare const StyledAlertContainer: import("styled-components").StyledComponent<string, any, AlertContainerProps, never>;
3
+ export declare const StyledAlertBody: import("styled-components").StyledComponent<string, any, AlertBodyProps, never>;
4
+ export declare const StyledAlertContent: import("styled-components").StyledComponent<string, any, {}, never>;
5
+ export declare const StyledAlertTitle: import("styled-components").StyledComponent<string, any, AlertTitleProps, never>;
6
+ export declare const StyledAlertDescription: import("styled-components").StyledComponent<string, any, AlertDescriptionProps, never>;
7
+ //# sourceMappingURL=Alert.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.styles.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Alert/Alert.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EAClB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,oBAAoB,sFAWhC,CAAC;AAEF,eAAO,MAAM,eAAe,iFAe3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,qEAM9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,kFAQ5B,CAAC;AAEF,eAAO,MAAM,sBAAsB,wFAQlC,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { grauityIconName } from '../../core';
2
+ import { BUTTON_VARIANTS_ENUM } from '../Button';
3
+ export declare enum ALERT_TYPES_ENUM {
4
+ DEFAULT = "default",
5
+ OUTLINED = "outlined",
6
+ FILLED = "filled"
7
+ }
8
+ export declare enum ALERT_VARIANTS_ENUM {
9
+ PRIMARY = "primary",
10
+ SUCCESS = "success",
11
+ WARNING = "warning",
12
+ ERROR = "error",
13
+ DEFAULT = "default"
14
+ }
15
+ export declare const ERRONEOUS_ALERT_VARIANTS: ALERT_VARIANTS_ENUM[];
16
+ export declare const ALERT_VARIANTS: ALERT_VARIANTS_ENUM[];
17
+ export declare const ALERT_TYPES: ALERT_TYPES_ENUM[];
18
+ export declare const DEFAULT_ALERT_VARIANT_ICON_MAPPING: Record<ALERT_VARIANTS_ENUM, grauityIconName>;
19
+ export declare const ALERT_COLOR_MAPPINGS: {
20
+ default: {
21
+ primary: {
22
+ iconColor: string;
23
+ textColor: string;
24
+ backgroundColor: string;
25
+ borderColor: string;
26
+ };
27
+ success: {
28
+ iconColor: string;
29
+ textColor: string;
30
+ backgroundColor: string;
31
+ borderColor: string;
32
+ };
33
+ warning: {
34
+ iconColor: string;
35
+ textColor: string;
36
+ backgroundColor: string;
37
+ borderColor: string;
38
+ };
39
+ error: {
40
+ iconColor: string;
41
+ textColor: string;
42
+ backgroundColor: string;
43
+ borderColor: string;
44
+ };
45
+ default: {
46
+ iconColor: string;
47
+ textColor: string;
48
+ backgroundColor: string;
49
+ borderColor: string;
50
+ };
51
+ };
52
+ outlined: {
53
+ primary: {
54
+ iconColor: string;
55
+ textColor: string;
56
+ backgroundColor: string;
57
+ borderColor: string;
58
+ };
59
+ success: {
60
+ iconColor: string;
61
+ textColor: string;
62
+ backgroundColor: string;
63
+ borderColor: string;
64
+ };
65
+ warning: {
66
+ iconColor: string;
67
+ textColor: string;
68
+ backgroundColor: string;
69
+ borderColor: string;
70
+ };
71
+ error: {
72
+ iconColor: string;
73
+ textColor: string;
74
+ backgroundColor: string;
75
+ borderColor: string;
76
+ };
77
+ default: {
78
+ iconColor: string;
79
+ textColor: string;
80
+ backgroundColor: string;
81
+ borderColor: string;
82
+ };
83
+ };
84
+ filled: {
85
+ primary: {
86
+ iconColor: string;
87
+ textColor: string;
88
+ backgroundColor: string;
89
+ borderColor: string;
90
+ };
91
+ success: {
92
+ iconColor: string;
93
+ textColor: string;
94
+ backgroundColor: string;
95
+ borderColor: string;
96
+ };
97
+ warning: {
98
+ iconColor: string;
99
+ textColor: string;
100
+ backgroundColor: string;
101
+ borderColor: string;
102
+ };
103
+ error: {
104
+ iconColor: string;
105
+ textColor: string;
106
+ backgroundColor: string;
107
+ borderColor: string;
108
+ };
109
+ default: {
110
+ iconColor: string;
111
+ textColor: string;
112
+ backgroundColor: string;
113
+ borderColor: string;
114
+ };
115
+ };
116
+ };
117
+ export declare const ALERT_TYPE_AND_VARIANT_TO_BUTTON_VARIANT_MAPPING: {
118
+ default: {
119
+ primary: BUTTON_VARIANTS_ENUM;
120
+ success: BUTTON_VARIANTS_ENUM;
121
+ warning: BUTTON_VARIANTS_ENUM;
122
+ error: BUTTON_VARIANTS_ENUM;
123
+ default: BUTTON_VARIANTS_ENUM;
124
+ };
125
+ outlined: {
126
+ primary: BUTTON_VARIANTS_ENUM;
127
+ success: BUTTON_VARIANTS_ENUM;
128
+ warning: BUTTON_VARIANTS_ENUM;
129
+ error: BUTTON_VARIANTS_ENUM;
130
+ default: BUTTON_VARIANTS_ENUM;
131
+ };
132
+ filled: {
133
+ primary: BUTTON_VARIANTS_ENUM;
134
+ success: BUTTON_VARIANTS_ENUM;
135
+ warning: BUTTON_VARIANTS_ENUM;
136
+ error: BUTTON_VARIANTS_ENUM;
137
+ default: BUTTON_VARIANTS_ENUM;
138
+ };
139
+ };
140
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Alert/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,oBAAY,gBAAgB;IACxB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;CACpB;AAED,oBAAY,mBAAmB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;CACtB;AAED,eAAO,MAAM,wBAAwB,uBAGpC,CAAC;AAEF,eAAO,MAAM,cAAc,uBAM1B,CAAC;AAEF,eAAO,MAAM,WAAW,oBAIvB,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,MAAM,CACnD,mBAAmB,EACnB,eAAe,CAOlB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGhC,CAAC;AAEF,eAAO,MAAM,gDAAgD;;;;;;;;;;;;;;;;;;;;;;CAsB5D,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { default } from './Alert';
2
+ export { ALERT_VARIANTS_ENUM } from './constants';
3
+ export { ALERT_VARIANTS } from './constants';
4
+ export { ALERT_TYPES_ENUM } from './constants';
5
+ export { ALERT_TYPES } from './constants';
6
+ export type { AlertProps } from './types';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,125 @@
1
+ import React from 'react';
2
+ import { grauityIconName } from '../../core';
3
+ import { ButtonProps } from '../Button';
4
+ export type AlertType = 'default' | 'outlined' | 'filled';
5
+ export type AlertVariant = 'primary' | 'success' | 'warning' | 'error' | 'default';
6
+ export interface AlertProps {
7
+ /**
8
+ * Type of the alert
9
+ *
10
+ * Available choices: `'default'`, `'outlined'`, `'filled'`
11
+ *
12
+ * Default: `'default'`
13
+ * */
14
+ type?: AlertType;
15
+ /**
16
+ * Variant of the alert
17
+ *
18
+ * Available choices: `'primary'`, `'secondary'`, `'tertiary'`, `'success'`, `'danger'`, `'warning'`
19
+ *
20
+ * Default: `'primary'`
21
+ * */
22
+ variant?: AlertVariant;
23
+ /**
24
+ * Alert icon, used to override the default icons used in the alert
25
+ *
26
+ * Use value `auto` to automatically select the icon based on the variant (error vs checkmark icon)
27
+ *
28
+ * Default: `null`
29
+ * */
30
+ icon?: grauityIconName | 'auto' | null;
31
+ /**
32
+ * Alert title
33
+ * */
34
+ title?: React.ReactNode;
35
+ /**
36
+ * Alert description
37
+ * */
38
+ description?: React.ReactNode;
39
+ /**
40
+ * Alert top position, useful for fixed positioning
41
+ *
42
+ * Default: `null`
43
+ * */
44
+ top?: string;
45
+ /**
46
+ * Alert bottom position, useful for fixed positioning
47
+ *
48
+ * Default: `null`
49
+ * */
50
+ bottom?: string;
51
+ /**
52
+ * Alert left position, useful for fixed positioning
53
+ *
54
+ * Default: `null`
55
+ * */
56
+ left?: string;
57
+ /**
58
+ * Alert right position, useful for fixed positioning
59
+ *
60
+ * Default: `null`
61
+ * */
62
+ right?: string;
63
+ /**
64
+ * Alert position, useful for fixed positioning
65
+ *
66
+ * Default: `'static'`
67
+ * */
68
+ position?: 'static' | 'fixed' | 'absolute' | 'relative';
69
+ /**
70
+ * Alert close button click handler
71
+ * */
72
+ onClose?: () => void;
73
+ /**
74
+ * Show close button
75
+ *
76
+ * Default: `false`
77
+ * */
78
+ showCloseButton?: boolean;
79
+ /**
80
+ * Alert action buttons.
81
+ *
82
+ * Type: ButtonProps[]
83
+ * */
84
+ actionButtons?: ButtonProps[];
85
+ /**
86
+ * Show action buttons inline
87
+ *
88
+ * Default: `false`
89
+ * */
90
+ inlineButtons?: boolean;
91
+ /**
92
+ * Maximum width of the alert
93
+ *
94
+ * Default: `'440px'`
95
+ * */
96
+ maxWidth?: string;
97
+ }
98
+ export interface AlertContainerProps {
99
+ position: string;
100
+ top: string;
101
+ bottom: string;
102
+ left: string;
103
+ right: string;
104
+ backgroundColor: string;
105
+ borderColor: string;
106
+ ref: React.Ref<HTMLDivElement>;
107
+ role: string;
108
+ children: React.ReactNode;
109
+ maxWidth: string;
110
+ }
111
+ export interface AlertBodyProps {
112
+ inlineButtons: boolean;
113
+ children: React.ReactNode;
114
+ }
115
+ export interface AlertTitleProps {
116
+ textColor: string;
117
+ children: React.ReactNode;
118
+ id: string;
119
+ }
120
+ export interface AlertDescriptionProps {
121
+ textColor: string;
122
+ children: React.ReactNode;
123
+ id?: string;
124
+ }
125
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Alert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE1D,MAAM,MAAM,YAAY,GAClB,SAAS,GACT,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,CAAC;A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,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { AlertBannerProps } from './types';
3
+ /**
4
+ * An alert banner is a component that is used to typically display
5
+ * important messages to the user. It is normally shown at the top of the page.
6
+ */
7
+ declare const AlertBanner: React.ForwardRefExoticComponent<AlertBannerProps & React.RefAttributes<HTMLDivElement>>;
8
+ export default AlertBanner;
9
+ //# sourceMappingURL=AlertBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertBanner.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAO3C;;;GAGG;AACH,QAAA,MAAM,WAAW,yFAiFhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { AlertBannerContainerProps } from './types';
2
+ export declare const StyledAlertBannerContainer: import("styled-components").StyledComponent<string, any, AlertBannerContainerProps, never>;
3
+ export declare const StyledAlertBannerContent: import("styled-components").StyledComponent<string, any, any, never>;
4
+ //# sourceMappingURL=AlertBanner.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertBanner.styles.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/AlertBanner.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,0BAA0B,4FAkBtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,sEAUpC,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { grauityIconName } from '../../core';
2
+ import { BUTTON_VARIANTS_ENUM } from '../Button';
3
+ export declare enum ALERT_BANNER_TYPES_ENUM {
4
+ DEFAULT = "default",
5
+ OUTLINED = "outlined",
6
+ FILLED = "filled"
7
+ }
8
+ export declare enum ALERT_BANNER_VARIANTS_ENUM {
9
+ PRIMARY = "primary",
10
+ SUCCESS = "success",
11
+ WARNING = "warning",
12
+ ERROR = "error",
13
+ DEFAULT = "default"
14
+ }
15
+ export declare const ERRONEOUS_ALERT_BANNER_VARIANTS: ALERT_BANNER_VARIANTS_ENUM[];
16
+ export declare const ALERT_BANNER_VARIANTS: ALERT_BANNER_VARIANTS_ENUM[];
17
+ export declare const ALERT_BANNER_TYPES: ALERT_BANNER_TYPES_ENUM[];
18
+ export declare const DEFAULT_ALERT_VARIANT_ICON_MAPPING: Record<ALERT_BANNER_VARIANTS_ENUM, grauityIconName>;
19
+ export declare const ALERT_BANNER_COLOR_MAPPINGS: {
20
+ default: {
21
+ primary: {
22
+ iconColor: string;
23
+ textColor: string;
24
+ backgroundColor: string;
25
+ borderColor: string;
26
+ };
27
+ success: {
28
+ iconColor: string;
29
+ textColor: string;
30
+ backgroundColor: string;
31
+ borderColor: string;
32
+ };
33
+ warning: {
34
+ iconColor: string;
35
+ textColor: string;
36
+ backgroundColor: string;
37
+ borderColor: string;
38
+ };
39
+ error: {
40
+ iconColor: string;
41
+ textColor: string;
42
+ backgroundColor: string;
43
+ borderColor: string;
44
+ };
45
+ default: {
46
+ iconColor: string;
47
+ textColor: string;
48
+ backgroundColor: string;
49
+ borderColor: string;
50
+ };
51
+ };
52
+ outlined: {
53
+ primary: {
54
+ iconColor: string;
55
+ textColor: string;
56
+ backgroundColor: string;
57
+ borderColor: string;
58
+ };
59
+ success: {
60
+ iconColor: string;
61
+ textColor: string;
62
+ backgroundColor: string;
63
+ borderColor: string;
64
+ };
65
+ warning: {
66
+ iconColor: string;
67
+ textColor: string;
68
+ backgroundColor: string;
69
+ borderColor: string;
70
+ };
71
+ error: {
72
+ iconColor: string;
73
+ textColor: string;
74
+ backgroundColor: string;
75
+ borderColor: string;
76
+ };
77
+ default: {
78
+ iconColor: string;
79
+ textColor: string;
80
+ backgroundColor: string;
81
+ borderColor: string;
82
+ };
83
+ };
84
+ filled: {
85
+ primary: {
86
+ iconColor: string;
87
+ textColor: string;
88
+ backgroundColor: string;
89
+ borderColor: string;
90
+ };
91
+ success: {
92
+ iconColor: string;
93
+ textColor: string;
94
+ backgroundColor: string;
95
+ borderColor: string;
96
+ };
97
+ warning: {
98
+ iconColor: string;
99
+ textColor: string;
100
+ backgroundColor: string;
101
+ borderColor: string;
102
+ };
103
+ error: {
104
+ iconColor: string;
105
+ textColor: string;
106
+ backgroundColor: string;
107
+ borderColor: string;
108
+ };
109
+ default: {
110
+ iconColor: string;
111
+ textColor: string;
112
+ backgroundColor: string;
113
+ borderColor: string;
114
+ };
115
+ };
116
+ };
117
+ export declare const ALERT_BANNER_TYPE_AND_VARIANT_TO_BUTTON_VARIANT_MAPPING: {
118
+ default: {
119
+ primary: BUTTON_VARIANTS_ENUM;
120
+ success: BUTTON_VARIANTS_ENUM;
121
+ warning: BUTTON_VARIANTS_ENUM;
122
+ error: BUTTON_VARIANTS_ENUM;
123
+ default: BUTTON_VARIANTS_ENUM;
124
+ };
125
+ outlined: {
126
+ primary: BUTTON_VARIANTS_ENUM;
127
+ success: BUTTON_VARIANTS_ENUM;
128
+ warning: BUTTON_VARIANTS_ENUM;
129
+ error: BUTTON_VARIANTS_ENUM;
130
+ default: BUTTON_VARIANTS_ENUM;
131
+ };
132
+ filled: {
133
+ primary: BUTTON_VARIANTS_ENUM;
134
+ success: BUTTON_VARIANTS_ENUM;
135
+ warning: BUTTON_VARIANTS_ENUM;
136
+ error: BUTTON_VARIANTS_ENUM;
137
+ default: BUTTON_VARIANTS_ENUM;
138
+ };
139
+ };
140
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,oBAAY,uBAAuB;IAC/B,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;CACpB;AAED,oBAAY,0BAA0B;IAClC,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;CACtB;AAED,eAAO,MAAM,+BAA+B,8BAG3C,CAAC;AAEF,eAAO,MAAM,qBAAqB,8BAMjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,2BAI9B,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,MAAM,CACnD,0BAA0B,EAC1B,eAAe,CAOlB,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGvC,CAAC;AAEF,eAAO,MAAM,uDAAuD;;;;;;;;;;;;;;;;;;;;;;CAgCnE,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { default } from './AlertBanner';
2
+ export { ALERT_BANNER_VARIANTS_ENUM } from './constants';
3
+ export { ALERT_BANNER_VARIANTS } from './constants';
4
+ export { ALERT_BANNER_TYPES_ENUM } from './constants';
5
+ export { ALERT_BANNER_TYPES } from './constants';
6
+ export type { AlertBannerProps } from './types';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,111 @@
1
+ import React from 'react';
2
+ import { grauityIconName } from '../../core';
3
+ import { ButtonProps } from '../Button';
4
+ export type AlertBannerType = 'default' | 'outlined' | 'filled';
5
+ export type AlertBannerVariant = 'primary' | 'success' | 'warning' | 'error' | 'default';
6
+ export interface AlertBannerProps {
7
+ /**
8
+ * Type of the alert banner
9
+ *
10
+ * Available choices: `'default'`, `'outlined'`, `'filled'`
11
+ *
12
+ * Default: `'default'`
13
+ * */
14
+ type?: AlertBannerType;
15
+ /**
16
+ * Variant of the alert banner
17
+ *
18
+ * Available choices: `'primary'`, `'secondary'`, `'tertiary'`, `'success'`, `'danger'`, `'warning'`
19
+ *
20
+ * Default: `'primary'`
21
+ * */
22
+ variant?: AlertBannerVariant;
23
+ /**
24
+ * Alert banner padding
25
+ *
26
+ * Default: `'var(--spacing-8px, 8px)'`
27
+ * */
28
+ padding?: string;
29
+ /**
30
+ * Alert banner icon, used to override the default icons used in the alert banner
31
+ *
32
+ * Use value `auto` to automatically select the icon based on the variant (error vs checkmark icon)
33
+ *
34
+ * Default: `null`
35
+ * */
36
+ icon?: grauityIconName | 'auto';
37
+ /**
38
+ * Alert banner top position, useful for fixed positioning
39
+ *
40
+ * Default: `null`
41
+ * */
42
+ top?: string;
43
+ /**
44
+ * Alert banner bottom position, useful for fixed positioning
45
+ *
46
+ * Default: `null`
47
+ * */
48
+ bottom?: string;
49
+ /**
50
+ * Alert banner left position, useful for fixed positioning
51
+ *
52
+ * Default: `null`
53
+ * */
54
+ left?: string;
55
+ /**
56
+ * Alert banner right position, useful for fixed positioning
57
+ *
58
+ * Default: `null`
59
+ * */
60
+ right?: string;
61
+ /**
62
+ * Alert banner position, useful for fixed positioning
63
+ *
64
+ * Default: `'static'`
65
+ * */
66
+ position?: 'static' | 'fixed' | 'absolute' | 'relative';
67
+ /**
68
+ * Alert banner content
69
+ * */
70
+ children: React.ReactNode;
71
+ /**
72
+ * Alert banner content justify content
73
+ *
74
+ * Default: `'center'`
75
+ * */
76
+ justifyContent?: 'center' | 'space-between' | 'space-around';
77
+ /**
78
+ * Alert banner close button click handler
79
+ * */
80
+ onClose?: () => void;
81
+ /**
82
+ * Show close button
83
+ *
84
+ * Default: `false`
85
+ * */
86
+ showCloseButton?: boolean;
87
+ /**
88
+ * Alert banner action buttons.
89
+ *
90
+ * Type: ButtonProps[]
91
+ * */
92
+ actionButtons?: ButtonProps[];
93
+ }
94
+ export interface AlertBannerContainerProps {
95
+ type: AlertBannerType;
96
+ variant: AlertBannerVariant;
97
+ justifyContent: string;
98
+ padding: string;
99
+ top: string;
100
+ bottom: string;
101
+ left: string;
102
+ right: string;
103
+ position: string;
104
+ textColor: string;
105
+ backgroundColor: string;
106
+ borderColor: string;
107
+ children: React.ReactNode;
108
+ ref: React.Ref<HTMLDivElement>;
109
+ role: string;
110
+ }
111
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,eAAe,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