@veracity/vui 2.25.3 → 2.25.5-beta.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.
- package/dist/cjs/input/input.d.ts.map +1 -1
- package/dist/cjs/input/input.js +2 -1
- package/dist/cjs/input/input.js.map +1 -1
- 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/input/input.d.ts.map +1 -1
- package/dist/esm/input/input.js +3 -2
- package/dist/esm/input/input.js.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/input/input.tsx +3 -2
- 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.5-beta.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",
|
package/src/input/input.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useEffect, useId, useMemo, useState } from 'react'
|
|
2
2
|
|
|
3
|
+
import Box from '../box'
|
|
3
4
|
import { IconButton } from '../button'
|
|
4
5
|
import { styled, useStyleConfig, vui, VuiComponent } from '../core'
|
|
5
6
|
import Label from '../label'
|
|
@@ -155,7 +156,7 @@ export const Input = vui<'div', InputProps>((props, ref) => {
|
|
|
155
156
|
filterAutoCompleteOptions={filterAutoCompleteOptions}
|
|
156
157
|
onAutoCompleteSelect={onAutoCompleteSelect}
|
|
157
158
|
>
|
|
158
|
-
|
|
159
|
+
<Box className="vui-inputContainer" column>
|
|
159
160
|
{isString(label) ? (
|
|
160
161
|
<Label
|
|
161
162
|
aria-disabled={disabled}
|
|
@@ -233,7 +234,7 @@ export const Input = vui<'div', InputProps>((props, ref) => {
|
|
|
233
234
|
</T>
|
|
234
235
|
)}
|
|
235
236
|
</InputBase>
|
|
236
|
-
|
|
237
|
+
</Box>
|
|
237
238
|
</AutoCompletePopover>
|
|
238
239
|
)}
|
|
239
240
|
|
|
@@ -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
|