@veracity/vui 2.25.3 → 2.25.4
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/dist/cjs/notification/consts.d.ts +10 -0
- package/dist/cjs/notification/consts.d.ts.map +1 -1
- package/dist/cjs/notification/consts.js +11 -1
- package/dist/cjs/notification/consts.js.map +1 -1
- package/dist/cjs/notification/notification.js +2 -2
- package/dist/cjs/notification/notification.js.map +1 -1
- package/dist/cjs/notification/notification.types.d.ts +1 -1
- package/dist/cjs/notification/notification.types.d.ts.map +1 -1
- package/dist/esm/notification/consts.d.ts +10 -0
- package/dist/esm/notification/consts.d.ts.map +1 -1
- package/dist/esm/notification/consts.js +10 -0
- package/dist/esm/notification/consts.js.map +1 -1
- package/dist/esm/notification/notification.js +2 -2
- package/dist/esm/notification/notification.js.map +1 -1
- package/dist/esm/notification/notification.types.d.ts +1 -1
- package/dist/esm/notification/notification.types.d.ts.map +1 -1
- package/dist/tsconfig.legacy.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/notification/consts.ts +11 -0
- package/src/notification/notification.tsx +2 -2
- package/src/notification/notification.types.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.4",
|
|
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",
|
|
@@ -69,3 +69,14 @@ export const notificationStatusMapping: NotificationStatusMapping = {
|
|
|
69
69
|
variant: 'bannerYellow',
|
|
70
70
|
},
|
|
71
71
|
}
|
|
72
|
+
|
|
73
|
+
export const closeButtonVariantMapping = {
|
|
74
|
+
subtleRed: 'subtleRed',
|
|
75
|
+
subtleBlue: 'subtleBlue',
|
|
76
|
+
subtleGreen: 'subtleGreen',
|
|
77
|
+
subtleYellow: 'subtleYellow',
|
|
78
|
+
bannerRed: 'subtleRed',
|
|
79
|
+
bannerBlue: 'subtleBlue',
|
|
80
|
+
bannerGreen: 'subtleGreen',
|
|
81
|
+
bannerYellow: 'subtleYellow',
|
|
82
|
+
}
|
|
@@ -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 { bannerNotificationElevation, notificationStatusMapping } from './consts'
|
|
4
|
+
import { bannerNotificationElevation, closeButtonVariantMapping, notificationStatusMapping } from './consts'
|
|
5
5
|
import { NotificationProvider } from './context'
|
|
6
6
|
import { NotificationProps } from './notification.types'
|
|
7
7
|
import NotificationButton from './notificationButton'
|
|
@@ -70,7 +70,7 @@ export const Notification = vui<'div', NotificationProps>((props, ref) => {
|
|
|
70
70
|
aria-label="close"
|
|
71
71
|
icon="falTimes"
|
|
72
72
|
onClick={onClose}
|
|
73
|
-
variant={variant}
|
|
73
|
+
variant={closeButtonVariantMapping?.[variant] ?? variant}
|
|
74
74
|
w="32px"
|
|
75
75
|
/>
|
|
76
76
|
)}
|
|
@@ -12,7 +12,7 @@ export type NotificationProps = Omit<BoxProps, 'size' | 'variant'> &
|
|
|
12
12
|
colorScheme?: 'blue' | 'green' | 'red' | 'yellow'
|
|
13
13
|
/** Socket displaying an icon on the left. */
|
|
14
14
|
icon?: IconProp | JSX.Element
|
|
15
|
-
/**
|
|
15
|
+
/** When provided, displays a close button with this function as the callback. */
|
|
16
16
|
onClose?: () => void
|
|
17
17
|
/** Modifies Notification style and content based on the given status. */
|
|
18
18
|
status?: NotificationStatus
|