@akinon/ui-notification 0.2.0 → 0.4.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/index.css +47 -0
- package/dist/cjs/index.d.ts +4 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +22 -3
- package/dist/esm/index.css +47 -0
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +18 -0
- package/package.json +4 -9
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.ant-notification-notice {
|
|
2
|
+
padding: 21px 70px 21px 24px !important;
|
|
3
|
+
border-radius: 5px;
|
|
4
|
+
background-color: var(--color-ebonyClay-500);
|
|
5
|
+
|
|
6
|
+
.ant-notification-notice-icon {
|
|
7
|
+
right: 24.5px !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ant-notification-notice-message {
|
|
11
|
+
color: var(--color-neutral-50) !important;
|
|
12
|
+
font-size: var(--token-fontSize) !important;
|
|
13
|
+
line-height: 1.4285714285714286 !important;
|
|
14
|
+
margin: 0 !important;
|
|
15
|
+
font-family: var(--token-fontFamily);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ant-notification-notice-success {
|
|
20
|
+
border: 1px solid var(--color-green-954);
|
|
21
|
+
|
|
22
|
+
.ant-notification-notice-icon {
|
|
23
|
+
svg {
|
|
24
|
+
color: var(--color-green-954);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ant-notification-notice-info {
|
|
30
|
+
border: 1px solid var(--color-orange-954);
|
|
31
|
+
|
|
32
|
+
.ant-notification-notice-icon {
|
|
33
|
+
svg {
|
|
34
|
+
color: var(--color-orange-954);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ant-notification-notice-error {
|
|
40
|
+
border: 1px solid var(--color-red-425);
|
|
41
|
+
|
|
42
|
+
.ant-notification-notice-icon {
|
|
43
|
+
svg {
|
|
44
|
+
color: var(--color-red-425);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import type { openNotificationParamsType } from './types';
|
|
3
|
+
export type * from './types';
|
|
4
|
+
export declare const openNotification: (openNotificationParams: openNotificationParamsType) => void;
|
|
1
5
|
export { notification } from 'antd';
|
|
2
|
-
export type { NotificationPlacement } from 'antd/es/notification/interface';
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAMrB,OAAO,KAAK,EAGV,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB,mBAAmB,SAAS,CAAC;AAE7B,eAAO,MAAM,gBAAgB,2BACH,0BAA0B,KACjD,IAiBF,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.notification = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
exports.notification = exports.openNotification = void 0;
|
|
4
|
+
require("./index.css");
|
|
5
|
+
const icons_1 = require("@akinon/icons");
|
|
6
|
+
const antd_1 = require("antd");
|
|
7
|
+
const React = require("react");
|
|
8
|
+
const openNotification = (openNotificationParams) => {
|
|
9
|
+
const { message, type } = openNotificationParams;
|
|
10
|
+
const ICON_NAME = {
|
|
11
|
+
success: 'katalogkontrol',
|
|
12
|
+
info: 'info-outlined',
|
|
13
|
+
error: 'warning_tri'
|
|
14
|
+
};
|
|
15
|
+
antd_1.notification[type]({
|
|
16
|
+
message,
|
|
17
|
+
closeIcon: false,
|
|
18
|
+
placement: 'top',
|
|
19
|
+
icon: React.createElement(icons_1.Icon, { icon: ICON_NAME[type] })
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.openNotification = openNotification;
|
|
23
|
+
var antd_2 = require("antd");
|
|
24
|
+
Object.defineProperty(exports, "notification", { enumerable: true, get: function () { return antd_2.notification; } });
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.ant-notification-notice {
|
|
2
|
+
padding: 21px 70px 21px 24px !important;
|
|
3
|
+
border-radius: 5px;
|
|
4
|
+
background-color: var(--color-ebonyClay-500);
|
|
5
|
+
|
|
6
|
+
.ant-notification-notice-icon {
|
|
7
|
+
right: 24.5px !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ant-notification-notice-message {
|
|
11
|
+
color: var(--color-neutral-50) !important;
|
|
12
|
+
font-size: var(--token-fontSize) !important;
|
|
13
|
+
line-height: 1.4285714285714286 !important;
|
|
14
|
+
margin: 0 !important;
|
|
15
|
+
font-family: var(--token-fontFamily);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ant-notification-notice-success {
|
|
20
|
+
border: 1px solid var(--color-green-954);
|
|
21
|
+
|
|
22
|
+
.ant-notification-notice-icon {
|
|
23
|
+
svg {
|
|
24
|
+
color: var(--color-green-954);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ant-notification-notice-info {
|
|
30
|
+
border: 1px solid var(--color-orange-954);
|
|
31
|
+
|
|
32
|
+
.ant-notification-notice-icon {
|
|
33
|
+
svg {
|
|
34
|
+
color: var(--color-orange-954);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ant-notification-notice-error {
|
|
40
|
+
border: 1px solid var(--color-red-425);
|
|
41
|
+
|
|
42
|
+
.ant-notification-notice-icon {
|
|
43
|
+
svg {
|
|
44
|
+
color: var(--color-red-425);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import type { openNotificationParamsType } from './types';
|
|
3
|
+
export type * from './types';
|
|
4
|
+
export declare const openNotification: (openNotificationParams: openNotificationParamsType) => void;
|
|
1
5
|
export { notification } from 'antd';
|
|
2
|
-
export type { NotificationPlacement } from 'antd/es/notification/interface';
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAMrB,OAAO,KAAK,EAGV,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB,mBAAmB,SAAS,CAAC;AAE7B,eAAO,MAAM,gBAAgB,2BACH,0BAA0B,KACjD,IAiBF,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1,19 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import { Icon } from '@akinon/icons';
|
|
3
|
+
import { notification } from 'antd';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
export const openNotification = (openNotificationParams) => {
|
|
6
|
+
const { message, type } = openNotificationParams;
|
|
7
|
+
const ICON_NAME = {
|
|
8
|
+
success: 'katalogkontrol',
|
|
9
|
+
info: 'info-outlined',
|
|
10
|
+
error: 'warning_tri'
|
|
11
|
+
};
|
|
12
|
+
notification[type]({
|
|
13
|
+
message,
|
|
14
|
+
closeIcon: false,
|
|
15
|
+
placement: 'top',
|
|
16
|
+
icon: React.createElement(Icon, { icon: ICON_NAME[type] })
|
|
17
|
+
});
|
|
18
|
+
};
|
|
1
19
|
export { notification } from 'antd';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-notification",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -9,16 +9,15 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"antd": "5.
|
|
12
|
+
"antd": "5.17.0",
|
|
13
|
+
"@akinon/icons": "0.5.0"
|
|
13
14
|
},
|
|
14
15
|
"devDependencies": {
|
|
15
16
|
"clean-package": "2.2.0",
|
|
16
17
|
"copyfiles": "^2.4.1",
|
|
17
18
|
"rimraf": "^5.0.5",
|
|
18
19
|
"typescript": "^5.2.2",
|
|
19
|
-
"@akinon/
|
|
20
|
-
"@akinon/typescript-config": "0.1.0",
|
|
21
|
-
"@akinon/vite-config": "0.3.0"
|
|
20
|
+
"@akinon/typescript-config": "0.3.0"
|
|
22
21
|
},
|
|
23
22
|
"peerDependencies": {
|
|
24
23
|
"react": ">=18",
|
|
@@ -40,10 +39,6 @@
|
|
|
40
39
|
"build:commonjs": "tsc --module commonjs --outDir dist/cjs",
|
|
41
40
|
"copy:files": "copyfiles -u 1 src/**/*.css dist/esm && copyfiles -u 1 src/**/*.css dist/cjs",
|
|
42
41
|
"clean": "rimraf dist/",
|
|
43
|
-
"lint": "eslint *.ts*",
|
|
44
|
-
"test": "vitest run",
|
|
45
|
-
"test:ui": "vitest --ui",
|
|
46
|
-
"test:watch": "vitest watch",
|
|
47
42
|
"typecheck": "tsc --noEmit"
|
|
48
43
|
}
|
|
49
44
|
}
|