@fvc/notification 1.2.0 → 1.2.2-next-3607140332290efd627f3fac1cb34e4dcb36274e
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/README.md
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# @fvc/notification
|
|
2
|
+
|
|
3
|
+
`@fvc/notification` wraps Ant Design's notification system with FE-VIS design tokens and icons. It applies the dark card background, per-type icon colours, and Roboto typography automatically. Supports both a hook-based API (recommended) and static methods for non-component contexts.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @fvc/notification
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Peer Dependencies
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
bun add react antd @fvc/icons
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Import
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { notification } from '@fvc/notification';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { notification } from '@fvc/notification';
|
|
27
|
+
|
|
28
|
+
function SaveButton() {
|
|
29
|
+
const [api, contextHolder] = notification.useNotification({});
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<>
|
|
33
|
+
{contextHolder}
|
|
34
|
+
<button onClick={() => api.success({ message: 'Changes saved' })}>
|
|
35
|
+
Save
|
|
36
|
+
</button>
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Notification Types
|
|
43
|
+
|
|
44
|
+
| Type | Auto icon | Message colour |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| `success` | `CheckCircleOutline` | `--link-on-dark-bg-color-400` |
|
|
47
|
+
| `info` | `Info` | `--gray-300` |
|
|
48
|
+
| `warning` | `Warning` | `--orange-200` |
|
|
49
|
+
| `error` | `Report` | `--warning-icon-on-dark-bg-color-400` |
|
|
50
|
+
|
|
51
|
+
Icons and colours are applied automatically by type. Pass `icon` explicitly to override.
|
|
52
|
+
|
|
53
|
+
## Usage Patterns
|
|
54
|
+
|
|
55
|
+
### `useNotification` — recommended
|
|
56
|
+
|
|
57
|
+
Binds the notification to the React tree so it inherits `ConfigProvider` context (locale, theme, etc.). `contextHolder` must be rendered somewhere in the tree above where the notification is triggered — placing it at the top of the component is sufficient.
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
function Page() {
|
|
61
|
+
const [api, contextHolder] = notification.useNotification({});
|
|
62
|
+
|
|
63
|
+
const handleError = () => {
|
|
64
|
+
api.error({
|
|
65
|
+
message: 'Request failed',
|
|
66
|
+
innerComponent: <button onClick={retry}>Retry</button>,
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<>
|
|
72
|
+
{contextHolder}
|
|
73
|
+
<button onClick={handleError}>Submit</button>
|
|
74
|
+
</>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Static API — deprecated
|
|
80
|
+
|
|
81
|
+
Works without a hook but does not inherit React context. Suitable for non-component code such as axios interceptors where a hook cannot be called.
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
notification.success({ message: 'Done' });
|
|
85
|
+
notification.error({ message: 'Something went wrong' });
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
> **Deprecated.** Static methods (`success`, `error`, `info`, `warning`) will be removed in a future major version. Use `notification.useNotification()` for all new code.
|
|
89
|
+
|
|
90
|
+
## Methods
|
|
91
|
+
|
|
92
|
+
| Method | Description |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| `useNotification(config)` | Returns `[api, contextHolder]`. Recommended pattern. |
|
|
95
|
+
| `open(config)` | Opens a notification without a preset type. |
|
|
96
|
+
| `success(config)` | Opens a success notification. Deprecated. |
|
|
97
|
+
| `info(config)` | Opens an info notification. Deprecated. |
|
|
98
|
+
| `warning(config)` | Opens a warning notification. Deprecated. |
|
|
99
|
+
| `error(config)` | Opens an error notification. Deprecated. |
|
|
100
|
+
| `destroy(key?)` | Destroys one notification by key, or all if no key is provided. |
|
|
101
|
+
| `config(globalConfig)` | Sets global defaults (placement, duration, maxCount, etc.). |
|
|
102
|
+
|
|
103
|
+
## Config (`ArgsProps`)
|
|
104
|
+
|
|
105
|
+
Extends antd's `ArgsProps`. The `description` field from antd is replaced by `innerComponent`.
|
|
106
|
+
|
|
107
|
+
| Prop | Type | Description |
|
|
108
|
+
| --- | --- | --- |
|
|
109
|
+
| `message` | `ReactNode` | Notification title. |
|
|
110
|
+
| `innerComponent` | `ReactNode` | Content rendered below the title. Replaces antd's `description`. |
|
|
111
|
+
| `icon` | `ReactNode` | Overrides the automatic type icon. |
|
|
112
|
+
| `duration` | `number` | Auto-close in seconds. `0` disables auto-close. |
|
|
113
|
+
| `placement` | `NotificationPlacement` | Where the notification appears. Default: `topRight`. |
|
|
114
|
+
| `key` | `string` | Unique key for programmatic updates or targeted destruction. |
|
|
115
|
+
| `onClose` | `() => void` | Called when the notification closes. |
|
|
116
|
+
|
|
117
|
+
## Common Usage
|
|
118
|
+
|
|
119
|
+
### With `innerComponent`
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
api.warning({
|
|
123
|
+
message: 'Session expiring soon',
|
|
124
|
+
duration: 0,
|
|
125
|
+
innerComponent: (
|
|
126
|
+
<button onClick={extendSession}>Extend session</button>
|
|
127
|
+
),
|
|
128
|
+
});
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Custom placement
|
|
132
|
+
|
|
133
|
+
```tsx
|
|
134
|
+
const [api, contextHolder] = notification.useNotification({
|
|
135
|
+
placement: 'bottomRight',
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Custom icon
|
|
140
|
+
|
|
141
|
+
```tsx
|
|
142
|
+
import { Icon } from '@fvc/icons';
|
|
143
|
+
|
|
144
|
+
api.open({
|
|
145
|
+
message: 'Upload complete',
|
|
146
|
+
icon: <Icon.CheckCircle color="var(--green-400)" width={24} height={24} />,
|
|
147
|
+
});
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Persistent notification
|
|
151
|
+
|
|
152
|
+
```tsx
|
|
153
|
+
api.error({
|
|
154
|
+
key: 'save-error',
|
|
155
|
+
message: 'Could not save changes',
|
|
156
|
+
duration: 0,
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// Dismiss programmatically
|
|
160
|
+
api.destroy('save-error');
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Consumer Example
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
import { notification } from '@fvc/notification';
|
|
167
|
+
|
|
168
|
+
function useFormSubmit() {
|
|
169
|
+
const [api, contextHolder] = notification.useNotification({
|
|
170
|
+
placement: 'bottomRight',
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
const submit = async (data: FormData) => {
|
|
174
|
+
try {
|
|
175
|
+
await postData(data);
|
|
176
|
+
api.success({ message: 'Record saved successfully' });
|
|
177
|
+
} catch {
|
|
178
|
+
api.error({
|
|
179
|
+
message: 'Save failed',
|
|
180
|
+
duration: 0,
|
|
181
|
+
innerComponent: (
|
|
182
|
+
<button onClick={() => submit(data)}>Try again</button>
|
|
183
|
+
),
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
return { submit, contextHolder };
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Testing
|
|
193
|
+
|
|
194
|
+
Notifications render outside the React tree in a portal. Call `notification.destroy()` in `afterEach` to prevent toast leakage between test cases.
|
|
195
|
+
|
|
196
|
+
```ts
|
|
197
|
+
afterEach(() => {
|
|
198
|
+
notification.destroy();
|
|
199
|
+
});
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## CSS Classes
|
|
203
|
+
|
|
204
|
+
| Class | Description |
|
|
205
|
+
| --- | --- |
|
|
206
|
+
| `.fvc-notification` | Root notification container |
|
|
207
|
+
| `.fvc-notification-notice-wrapper` | Individual notification card (dark background) |
|
|
208
|
+
| `.fvc-notification-notice` | Inner notice element |
|
|
209
|
+
| `.fvc-notification-notice-message` | Title text |
|
|
210
|
+
| `.fvc-notification-notice-icon` | Icon slot |
|
|
211
|
+
| `.fvc-notification-notice-btn` | `innerComponent` slot |
|
|
212
|
+
| `.fvc-notification-notice-close` | Close button |
|
|
213
|
+
| `.fvc-notification-notice-success` | Applied on `success` type notifications |
|
|
214
|
+
| `.fvc-notification-notice-info` | Applied on `info` type notifications |
|
|
215
|
+
| `.fvc-notification-notice-warning` | Applied on `warning` type notifications |
|
|
216
|
+
| `.fvc-notification-notice-error` | Applied on `error` type notifications |
|
|
217
|
+
|
|
218
|
+
## Development
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
bun run lint
|
|
222
|
+
bun run type-check
|
|
223
|
+
bun run test
|
|
224
|
+
```
|
package/dist/lib/index.js
CHANGED
|
@@ -3,4 +3,4 @@ import{notification as n}from"antd";import t,{useMemo as i}from"react";import{Ic
|
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/var f,s=(r||(r=1,f=a,function(){var n={}.hasOwnProperty;function t(){for(var n="",t=0;t<arguments.length;t++){var e=arguments[t];e&&(n=o(n,i(e)))}return n}function i(i){if("string"==typeof i||"number"==typeof i)return i;if("object"!=typeof i)return"";if(Array.isArray(i))return t.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var e="";for(var c in i)n.call(i,c)&&i[c]&&(e=o(e,c));return e}function o(n,t){return t?n?n+" "+t:n+t:n}f.exports?(t.default=t,f.exports=t):window.classNames=t}()),a.exports),p=c(s);const l="fvc-notification",v=n=>{switch(n){case e.success:return t.createElement(o.CheckCircleOutline,{color:"var(--link-on-dark-bg-color-400)",width:24,height:24});case e.info:return t.createElement(o.Info,{color:"var(--gray-300)",width:24,height:24});case e.warning:return t.createElement(o.Warning,{color:"var(--orange-200)",width:24,height:24});case e.error:return t.createElement(o.Report,{color:"var(--warning-text-on-dark-bg-color-400)",width:24,height:24});default:return}},g=n=>{var{icon:t,innerComponent:i}=n,o=function(n,t){var i={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&t.indexOf(o)<0&&(i[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var e=0;for(o=Object.getOwnPropertySymbols(n);e<o.length;e++)t.indexOf(o[e])<0&&Object.prototype.propertyIsEnumerable.call(n,o[e])&&(i[o[e]]=n[o[e]])}return i}(n,["icon","innerComponent"]);return Object.assign(Object.assign({},o),{icon:t||v(o.type),btn:i,className:p({[o.className]:!!o.className})})},u=(t,i=n)=>n=>i[t](Object.assign({},g(Object.assign(Object.assign({},n),{type:t}))));!function(n,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css","top"===i&&o.firstChild?o.insertBefore(e,o.firstChild):o.appendChild(e),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}}('.fvc-notification {\n font-family: "Roboto", sans-serif;\n}\n.fvc-notification .fvc-notification-notice-wrapper {\n background-color: var(--blue-gray-700) !important;\n border-radius: 8px;\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice {\n padding: 16px;\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-close {\n width: 16px;\n height: 16px;\n top: 4px;\n right: 4px;\n border-radius: 50%;\n background-color: var(--blue-gray-900);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-close:hover {\n background-color: var(--blue-gray-900);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-close-icon {\n width: 7px;\n height: 7px;\n color: var(--blue-gray-250);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-with-icon .fvc-notification-notice-message, .fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-message {\n font-family: Roboto, Arial, sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 16px;\n margin-bottom: 0;\n margin-left: 0;\n color: var(--neutral-0);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-with-icon .fvc-notification-notice-message {\n margin-left: 32px;\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-icon {\n transform: translateY(-3px);\n display: flex;\n align-items: flex-start;\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-btn {\n display: flex;\n width: 100%;\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-success .fvc-notification-notice-message {\n color: var(--link-on-dark-bg-color-400);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-info .fvc-notification-notice-message {\n color: var(--gray-300);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-error .fvc-notification-notice-message {\n color: var(--warning-icon-on-dark-bg-color-400);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-warning .fvc-notification-notice-message {\n color: var(--orange-200);\n}');const d={config:t=>{n.config(Object.assign(Object.assign({},t),{prefixCls:l}))},destroy:t=>{n.destroy(t)},open:t=>{n.open(Object.assign({},g(t)))},success:u(e.success),info:u(e.info),warning:u(e.warning),error:u(e.error),useNotification:t=>{const[o,c]=n.useNotification(Object.assign(Object.assign({},t),{prefixCls:l}));return[i((
|
|
6
|
+
*/var f,s=(r||(r=1,f=a,function(){var n={}.hasOwnProperty;function t(){for(var n="",t=0;t<arguments.length;t++){var e=arguments[t];e&&(n=o(n,i(e)))}return n}function i(i){if("string"==typeof i||"number"==typeof i)return i;if("object"!=typeof i)return"";if(Array.isArray(i))return t.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var e="";for(var c in i)n.call(i,c)&&i[c]&&(e=o(e,c));return e}function o(n,t){return t?n?n+" "+t:n+t:n}f.exports?(t.default=t,f.exports=t):window.classNames=t}()),a.exports),p=c(s);const l="fvc-notification",v=n=>{switch(n){case e.success:return t.createElement(o.CheckCircleOutline,{color:"var(--link-on-dark-bg-color-400)",width:24,height:24});case e.info:return t.createElement(o.Info,{color:"var(--gray-300)",width:24,height:24});case e.warning:return t.createElement(o.Warning,{color:"var(--orange-200)",width:24,height:24});case e.error:return t.createElement(o.Report,{color:"var(--warning-text-on-dark-bg-color-400)",width:24,height:24});default:return}},g=n=>{var{icon:t,innerComponent:i}=n,o=function(n,t){var i={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&t.indexOf(o)<0&&(i[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var e=0;for(o=Object.getOwnPropertySymbols(n);e<o.length;e++)t.indexOf(o[e])<0&&Object.prototype.propertyIsEnumerable.call(n,o[e])&&(i[o[e]]=n[o[e]])}return i}(n,["icon","innerComponent"]);return Object.assign(Object.assign({},o),{icon:t||v(o.type),btn:i,className:p({[o.className]:!!o.className})})},u=(t,i=n)=>n=>i[t](Object.assign({},g(Object.assign(Object.assign({},n),{type:t}))));!function(n,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css","top"===i&&o.firstChild?o.insertBefore(e,o.firstChild):o.appendChild(e),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}}('.fvc-notification {\n font-family: "Roboto", sans-serif;\n}\n.fvc-notification .fvc-notification-notice-wrapper {\n background-color: var(--blue-gray-700) !important;\n border-radius: 8px;\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice {\n padding: 16px;\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-close {\n width: 16px;\n height: 16px;\n top: 4px;\n right: 4px;\n border-radius: 50%;\n background-color: var(--blue-gray-900);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-close:hover {\n background-color: var(--blue-gray-900);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-close-icon {\n width: 7px;\n height: 7px;\n color: var(--blue-gray-250);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-with-icon .fvc-notification-notice-message, .fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-message {\n font-family: Roboto, Arial, sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 16px;\n margin-bottom: 0;\n margin-left: 0;\n color: var(--neutral-0);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-with-icon .fvc-notification-notice-message {\n margin-left: 32px;\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-icon {\n transform: translateY(-3px);\n display: flex;\n align-items: flex-start;\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-btn {\n display: flex;\n width: 100%;\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-success .fvc-notification-notice-message {\n color: var(--link-on-dark-bg-color-400);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-info .fvc-notification-notice-message {\n color: var(--gray-300);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-error .fvc-notification-notice-message {\n color: var(--warning-icon-on-dark-bg-color-400);\n}\n.fvc-notification .fvc-notification-notice-wrapper .fvc-notification-notice-warning .fvc-notification-notice-message {\n color: var(--orange-200);\n}');const d={config:t=>{n.config(Object.assign(Object.assign({},t),{prefixCls:l}))},destroy:t=>{n.destroy(t)},open:t=>{n.open(Object.assign({},g(t)))},success:u(e.success),info:u(e.info),warning:u(e.warning),error:u(e.error),useNotification:t=>{const[o,c]=n.useNotification(Object.assign(Object.assign({},t),{prefixCls:l}));return[i(()=>({info:u(e.info,o),success:u(e.success,o),error:u(e.error,o),warning:u(e.warning,o),open:n=>{o.open(Object.assign({},g(Object.assign({},n))))},destroy:o.destroy}),[o]),c]}};export{d as notification};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
1
|
import { ArgsProps as BaseArgsProps } from 'antd/es/notification';
|
|
3
2
|
import { GlobalConfigProps, NotificationConfig as BaseNotificationConfig, NotificationInstance as BaseNotificationInstance } from 'antd/es/notification/interface';
|
|
3
|
+
import React, { ReactNode } from 'react';
|
|
4
4
|
export type ArgsProps = Omit<BaseArgsProps, 'description'> & {
|
|
5
5
|
innerComponent?: ReactNode;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { notification as baseNotification, NotificationArgsProps as BaseNotificationArgsProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { ArgsProps, NotificationInstance, NotificationTypes, StaticFn } from '../types';
|
|
4
4
|
export declare const prefixCls = "fvc-notification";
|
|
5
5
|
export declare const getNotificationIcon: (type: BaseNotificationArgsProps["type"]) => React.JSX.Element | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fvc/notification",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2-next-3607140332290efd627f3fac1cb34e4dcb36274e",
|
|
4
4
|
"main": "./dist/lib/index.js",
|
|
5
5
|
"types": "./dist/lib/notification/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -18,15 +18,29 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
21
|
+
"build": "rollup -c ./rollup.config.mjs",
|
|
22
|
+
"clean": "rm -rf dist && rm -rf .rollup.cache && rm -rf .turbo",
|
|
23
|
+
"lint": "eslint --config ../../eslint.config.js \"src/**/*.{ts,tsx}\"",
|
|
24
|
+
"lint:fix": "eslint --config ../../eslint.config.js \"src/**/*.{ts,tsx}\" --fix",
|
|
25
|
+
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
26
|
+
"type-check": "tsc --noEmit",
|
|
27
|
+
"test": "bun test --preload ../../tests/happydom.ts --preload ../../tests/testing-library.tsx"
|
|
26
28
|
},
|
|
27
29
|
"peerDependencies": {
|
|
28
|
-
"@fvc/icons": "
|
|
30
|
+
"@fvc/icons": "1.1.4-next-3607140332290efd627f3fac1cb34e4dcb36274e",
|
|
29
31
|
"react": "^18.0.0",
|
|
30
32
|
"antd": "^5.0.0"
|
|
31
|
-
}
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"react",
|
|
36
|
+
"react-component",
|
|
37
|
+
"fvc",
|
|
38
|
+
"fe-vis-core",
|
|
39
|
+
"ui",
|
|
40
|
+
"notification",
|
|
41
|
+
"toast",
|
|
42
|
+
"alert",
|
|
43
|
+
"design-system",
|
|
44
|
+
"antd"
|
|
45
|
+
]
|
|
32
46
|
}
|