@kvell-group/ui 1.18.20 → 1.18.21
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/package.json +7 -6
- package/src/components/DatesProvider/DatesProvider.ts +2 -0
- package/src/components/DatesProvider/index.ts +1 -0
- package/src/components/KvellUiProvider/KvellUiProvider.css +3 -0
- package/src/components/KvellUiProvider/KvellUiProvider.tsx +0 -1
- package/src/components/Notifications/Notification.tsx +10 -0
- package/src/components/Notifications/Notifications.module.css +43 -0
- package/src/components/Notifications/Notifications.ts +2 -0
- package/src/components/Notifications/index.ts +1 -0
- package/src/index.ts +2 -1
- package/src/theme/index.ts +4 -8
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@kvell-group/ui",
|
|
3
3
|
"author": "Kvell Group",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "1.18.
|
|
5
|
+
"version": "1.18.21",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "src/index.ts",
|
|
8
8
|
"types": "src/index.ts",
|
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
"build-storybook": "storybook build"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@mantine/carousel": "^8.2.
|
|
24
|
-
"@mantine/core": "^8.2.
|
|
25
|
-
"@mantine/dates": "^8.2.
|
|
26
|
-
"@mantine/form": "^8.2.
|
|
27
|
-
"@mantine/hooks": "^8.2.
|
|
23
|
+
"@mantine/carousel": "^8.2.8",
|
|
24
|
+
"@mantine/core": "^8.2.8",
|
|
25
|
+
"@mantine/dates": "^8.2.8",
|
|
26
|
+
"@mantine/form": "^8.2.8",
|
|
27
|
+
"@mantine/hooks": "^8.2.8",
|
|
28
|
+
"@mantine/notifications": "^8.2.8"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
31
|
"@remixicon/react": "^4.6.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DatesProvider'
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
--color-background-input-disabled: #fff;
|
|
68
68
|
--color-background-surface-neutral: #f7f7f8;
|
|
69
69
|
--color-background-surface-warning-subtle: #fdead8;
|
|
70
|
+
--color-background-surface-destructive: #fdf2f1;
|
|
70
71
|
--color-border-action-normal: #dee0e3;
|
|
71
72
|
--color-border-action-hover: #c8cad0;
|
|
72
73
|
--color-border-action-disabled: #e9eaec;
|
|
@@ -93,8 +94,10 @@
|
|
|
93
94
|
--color-icon-base-tertiary: #0d112666;
|
|
94
95
|
--color-icon-base-quaternary: #0a0f2940;
|
|
95
96
|
--color-icon-base-inverted: #ffffff;
|
|
97
|
+
--color-icon-status-info: #4778f5;
|
|
96
98
|
--color-icon-status-success: #26bd6c;
|
|
97
99
|
--color-icon-status-warning: #f48e2f;
|
|
100
|
+
--color-icon-status-destructive: #e6483d;
|
|
98
101
|
--color-icon-status-destructive-secondary: #e6483db2;
|
|
99
102
|
--color-icon-status-info-secondary: #3368f099;
|
|
100
103
|
--shadow-focus-ring-light: 0px 0px 0px 2px #c8b2ff80;
|
|
@@ -2,7 +2,6 @@ import { MantineProvider as MantineProviderCore } from '@mantine/core'
|
|
|
2
2
|
import type { MantineProviderProps } from '@mantine/core'
|
|
3
3
|
|
|
4
4
|
import '@mantine/core/styles.layer.css'
|
|
5
|
-
import '@mantine/dates/styles.layer.css'
|
|
6
5
|
import './KvellUiProvider.css'
|
|
7
6
|
|
|
8
7
|
// ----------------------------------------------------------------------
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Notification as MantineNotification } from '@mantine/core'
|
|
2
|
+
import { RiErrorWarningFill } from '@remixicon/react'
|
|
3
|
+
import classNames from './Notifications.module.css'
|
|
4
|
+
|
|
5
|
+
export const Notification = MantineNotification.extend({
|
|
6
|
+
classNames,
|
|
7
|
+
defaultProps: {
|
|
8
|
+
icon: <RiErrorWarningFill size={20} />,
|
|
9
|
+
},
|
|
10
|
+
})
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
--notification-color: var(--color-icon-status-info);
|
|
3
|
+
border: rem(1px) solid var(--color-border-action-normal);
|
|
4
|
+
box-shadow: var(--mantine-shadow-sm);
|
|
5
|
+
padding: rem(16px);
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
|
|
8
|
+
&:global(.error) {
|
|
9
|
+
--notification-color: var(--color-icon-status-destructive);
|
|
10
|
+
background-color: var(--color-background-surface-destructive);
|
|
11
|
+
|
|
12
|
+
& .closeButton {
|
|
13
|
+
@mixin hover {
|
|
14
|
+
background-color: var(--color-background-button-destructive-tertiary);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.icon {
|
|
21
|
+
height: rem(24px);
|
|
22
|
+
width: rem(20px);
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
color: var(--notification-color);
|
|
25
|
+
margin-inline-end: rem(12px);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.title {
|
|
29
|
+
font-size: var(--mantine-font-size-body-s);
|
|
30
|
+
line-height: var(--mantine-line-height-body-s);
|
|
31
|
+
margin-bottom: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.description {
|
|
35
|
+
font-size: var(--mantine-font-size-caption-l);
|
|
36
|
+
line-height: var(--mantine-line-height-caption-l);
|
|
37
|
+
color: var(--color-text-base-secondary);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.closeButton {
|
|
41
|
+
--cb-size: rem(24px);
|
|
42
|
+
color: var(--color-icon-base-secondary);
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Notifications'
|
package/src/index.ts
CHANGED
|
@@ -11,9 +11,10 @@ export { Checkbox } from './components/Inputs/Checkbox'
|
|
|
11
11
|
export { Switch } from './components/Inputs/Switch'
|
|
12
12
|
export { Select } from './components/Inputs/Select'
|
|
13
13
|
export { Textarea } from './components/Inputs/Textarea'
|
|
14
|
-
export { DatesProvider } from '
|
|
14
|
+
export { DatesProvider } from './components/DatesProvider'
|
|
15
15
|
export * from './components/Inputs/DatePickerInput'
|
|
16
16
|
export { PinInput } from './components/Inputs/PinInput'
|
|
17
|
+
export * from './components/Notifications'
|
|
17
18
|
|
|
18
19
|
//providers
|
|
19
20
|
export { KvellUiProvider } from './components/KvellUiProvider'
|
package/src/theme/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { colorsTuple, type MantineThemeOverride } from '@mantine/core'
|
|
2
|
+
import { Notification } from '../components/Notifications/Notification'
|
|
2
3
|
|
|
3
4
|
// ----------------------------------------------------------------------
|
|
4
5
|
|
|
@@ -149,14 +150,9 @@ export const theme: MantineThemeOverride = {
|
|
|
149
150
|
defaultGradient: { from: 'black', to: 'yellow', deg: 25 }, //for example
|
|
150
151
|
// activeClassName: 'class-name', //for example
|
|
151
152
|
// focusClassName: 'class-name', //for example
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
styles: {},
|
|
156
|
-
vars: { order: 5 },
|
|
157
|
-
defaultProps: {},
|
|
158
|
-
}), //for example
|
|
159
|
-
}, */
|
|
153
|
+
components: {
|
|
154
|
+
Notification,
|
|
155
|
+
},
|
|
160
156
|
other: {
|
|
161
157
|
// any additional vars
|
|
162
158
|
/* usage:
|