@veracity/vui 2.25.0-beta.0 → 2.25.0

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 (41) hide show
  1. package/dist/cjs/notification/consts.d.ts +1 -0
  2. package/dist/cjs/notification/consts.d.ts.map +1 -1
  3. package/dist/cjs/notification/consts.js +34 -1
  4. package/dist/cjs/notification/consts.js.map +1 -1
  5. package/dist/cjs/notification/notification.d.ts.map +1 -1
  6. package/dist/cjs/notification/notification.js +1 -1
  7. package/dist/cjs/notification/notification.js.map +1 -1
  8. package/dist/cjs/notification/notification.types.d.ts +2 -1
  9. package/dist/cjs/notification/notification.types.d.ts.map +1 -1
  10. package/dist/cjs/notification/theme.d.ts +31 -0
  11. package/dist/cjs/notification/theme.d.ts.map +1 -1
  12. package/dist/cjs/notification/theme.js +31 -0
  13. package/dist/cjs/notification/theme.js.map +1 -1
  14. package/dist/cjs/theme/components.d.ts +31 -0
  15. package/dist/cjs/theme/components.d.ts.map +1 -1
  16. package/dist/cjs/theme/defaultTheme.d.ts +31 -0
  17. package/dist/cjs/theme/defaultTheme.d.ts.map +1 -1
  18. package/dist/esm/notification/consts.d.ts +1 -0
  19. package/dist/esm/notification/consts.d.ts.map +1 -1
  20. package/dist/esm/notification/consts.js +33 -0
  21. package/dist/esm/notification/consts.js.map +1 -1
  22. package/dist/esm/notification/notification.d.ts.map +1 -1
  23. package/dist/esm/notification/notification.js +2 -2
  24. package/dist/esm/notification/notification.js.map +1 -1
  25. package/dist/esm/notification/notification.types.d.ts +2 -1
  26. package/dist/esm/notification/notification.types.d.ts.map +1 -1
  27. package/dist/esm/notification/theme.d.ts +31 -0
  28. package/dist/esm/notification/theme.d.ts.map +1 -1
  29. package/dist/esm/notification/theme.js +31 -0
  30. package/dist/esm/notification/theme.js.map +1 -1
  31. package/dist/esm/theme/components.d.ts +31 -0
  32. package/dist/esm/theme/components.d.ts.map +1 -1
  33. package/dist/esm/theme/defaultTheme.d.ts +31 -0
  34. package/dist/esm/theme/defaultTheme.d.ts.map +1 -1
  35. package/dist/tsconfig.legacy.tsbuildinfo +1 -1
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/package.json +1 -1
  38. package/src/notification/consts.ts +34 -0
  39. package/src/notification/notification.tsx +2 -1
  40. package/src/notification/notification.types.ts +21 -1
  41. package/src/notification/theme.ts +31 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "2.25.0-beta.0",
3
+ "version": "2.25.0",
4
4
  "description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
5
5
  "module": "./dist/esm/index.js",
6
6
  "main": "./dist/cjs/index.js",
@@ -1,6 +1,8 @@
1
1
  import { iconDictionary } from '../message/consts'
2
2
  import { NotificationStatusMapping } from './notification.types'
3
3
 
4
+ export const bannerNotificationElevation = 2
5
+
4
6
  export const notificationStatusMapping: NotificationStatusMapping = {
5
7
  error: {
6
8
  iconProps: {
@@ -34,4 +36,36 @@ export const notificationStatusMapping: NotificationStatusMapping = {
34
36
  },
35
37
  variant: 'subtleYellow',
36
38
  },
39
+ bannerError: {
40
+ iconProps: {
41
+ name: iconDictionary.error,
42
+ },
43
+ variant: 'bannerRed',
44
+ },
45
+ bannerInfo: {
46
+ iconProps: {
47
+ name: iconDictionary.info,
48
+ },
49
+ variant: 'bannerBlue',
50
+ },
51
+ bannerLoading: {
52
+ iconProps: {
53
+ animation: 'vui-spin 0.6s linear infinite',
54
+ name: 'fadSpinnerThird',
55
+ pathFill: ['blue.40', 'blue.60'],
56
+ },
57
+ variant: 'bannerBlue',
58
+ },
59
+ bannerSuccess: {
60
+ iconProps: {
61
+ name: iconDictionary.success,
62
+ },
63
+ variant: 'bannerGreen',
64
+ },
65
+ bannerWarning: {
66
+ iconProps: {
67
+ name: iconDictionary.warning,
68
+ },
69
+ variant: 'bannerYellow',
70
+ },
37
71
  }
@@ -1,7 +1,7 @@
1
1
  import Box from '../box'
2
2
  import { useStyleConfig, vui, VuiComponent } from '../core'
3
3
  import { cs, filterUndefined, isReactText, isString } from '../utils'
4
- import { notificationStatusMapping } from './consts'
4
+ import { bannerNotificationElevation, notificationStatusMapping } from './consts'
5
5
  import { NotificationProvider } from './context'
6
6
  import { NotificationProps } from './notification.types'
7
7
  import NotificationButton from './notificationButton'
@@ -47,6 +47,7 @@ export const Notification = vui<'div', NotificationProps>((props, ref) => {
47
47
  borderRadius="md"
48
48
  borderWidth={1}
49
49
  className={cs('vui-notification', className)}
50
+ elevation={variant.includes('banner') ? bannerNotificationElevation : undefined}
50
51
  ref={ref}
51
52
  role="mark"
52
53
  w="fit-content"
@@ -24,7 +24,27 @@ export type NotificationProps = Omit<BoxProps, 'size' | 'variant'> &
24
24
  title?: ReactNode
25
25
  }
26
26
 
27
- export type NotificationStatus = 'error' | 'info' | 'loading' | 'success' | 'warning'
27
+ export type NotificationStatus =
28
+ | 'error'
29
+ | 'info'
30
+ | 'loading'
31
+ | 'success'
32
+ | 'warning'
33
+ | 'bannerError'
34
+ | 'bannerInfo'
35
+ | 'bannerLoading'
36
+ | 'bannerSuccess'
37
+ | 'bannerWarning'
38
+
39
+ export type NotificationVariant =
40
+ | 'subtleBlue'
41
+ | 'subtleRed'
42
+ | 'subtleYellow'
43
+ | 'subtleGreen'
44
+ | 'bannerBlue'
45
+ | 'bannerRed'
46
+ | 'bannerYellow'
47
+ | 'bannerGreen'
28
48
 
29
49
  export type NotificationStatusMapping = Record<
30
50
  string,
@@ -40,6 +40,37 @@ const variants = {
40
40
  color: 'landGreen.30',
41
41
  },
42
42
  },
43
+ bannerBlue: {
44
+ container: {
45
+ bg: 'skyBlue.95',
46
+ borderColor: 'skyBlue.95',
47
+ color: 'seaBlue.main',
48
+ },
49
+ button: {
50
+ borderColor: 'transparent',
51
+ },
52
+ },
53
+ bannerRed: {
54
+ container: {
55
+ bg: 'energyRed.95',
56
+ borderColor: 'energyRed.95',
57
+ color: 'energyRed.45',
58
+ },
59
+ },
60
+ bannerYellow: {
61
+ container: {
62
+ bg: 'sunflower.85',
63
+ borderColor: 'sunflower.85',
64
+ color: 'sunflower.15',
65
+ },
66
+ },
67
+ bannerGreen: {
68
+ container: {
69
+ bg: 'landGreen.95',
70
+ borderColor: 'landGreen.95',
71
+ color: 'landGreen.30',
72
+ },
73
+ },
43
74
  }
44
75
 
45
76
  export default {