ag-common 0.0.375 → 0.0.376

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.
@@ -8,5 +8,8 @@ export interface IProgressBar {
8
8
  backColour?: string;
9
9
  /** default 25,50,75 */
10
10
  dotPercentages?: number[] | null;
11
+ className?: string;
12
+ /** if true, will transition to the end in X ms */
13
+ transitionToMs?: number;
11
14
  }
12
15
  export declare const ProgressBar: (p: IProgressBar) => JSX.Element;
@@ -1,11 +1,34 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
27
  };
5
28
  Object.defineProperty(exports, "__esModule", { value: true });
6
29
  exports.ProgressBar = void 0;
7
30
  const styled_1 = __importDefault(require("@emotion/styled"));
8
- const react_1 = __importDefault(require("react"));
31
+ const react_1 = __importStar(require("react"));
9
32
  const styles_1 = require("../../styles");
10
33
  const Base = styled_1.default.div `
11
34
  position: relative;
@@ -20,7 +43,6 @@ const Bar = styled_1.default.div `
20
43
  top: 0;
21
44
  bottom: 0;
22
45
  left: 0;
23
- transition: width 0.2s ease;
24
46
  `;
25
47
  const Dot = styled_1.default.div `
26
48
  position: absolute;
@@ -35,16 +57,29 @@ const Dot = styled_1.default.div `
35
57
  }
36
58
  `;
37
59
  const ProgressBar = (p) => {
38
- const { min, max, frontColour = styles_1.colours.notificationBlue, backColour = '#eee', dotPercentages = [25, 50, 75], } = p;
39
- const barWidth = (min / max) * 100;
40
- return (react_1.default.createElement(Base, { style: { backgroundColor: backColour } },
60
+ const { transitionToMs = 200, frontColour = styles_1.colours.notificationBlue, backColour = '#eee', dotPercentages = [25, 50, 75], } = p;
61
+ const [barWidth, setBarWidth] = (0, react_1.useState)((p.min / p.max) * 100);
62
+ (0, react_1.useEffect)(() => {
63
+ const newbw = (p.min / p.max) * 100;
64
+ if (barWidth !== newbw) {
65
+ setBarWidth(newbw);
66
+ }
67
+ // eslint-disable-next-line react-hooks/exhaustive-deps
68
+ }, [p.min, p.max]);
69
+ (0, react_1.useEffect)(() => {
70
+ if (transitionToMs) {
71
+ setBarWidth(p.max);
72
+ }
73
+ // eslint-disable-next-line react-hooks/exhaustive-deps
74
+ }, []);
75
+ return (react_1.default.createElement(Base, { style: {
76
+ backgroundColor: backColour,
77
+ }, className: p.className },
41
78
  react_1.default.createElement(Bar, { style: {
42
79
  width: `${barWidth}%`,
43
80
  backgroundColor: frontColour,
44
- } }),
45
- (dotPercentages === null || dotPercentages === void 0 ? void 0 : dotPercentages.map) &&
46
- dotPercentages.map((v) => {
47
- return (react_1.default.createElement(Dot, { key: v, style: { left: `calc(${v}% - 0.25rem)` }, "data-invert": v > barWidth }));
48
- })));
81
+ transition: `width ${transitionToMs}ms linear`,
82
+ } }), dotPercentages === null || dotPercentages === void 0 ? void 0 :
83
+ dotPercentages.map((v) => (react_1.default.createElement(Dot, { key: v, style: { left: `calc(${v}% - 0.25rem)` }, "data-invert": v > barWidth })))));
49
84
  };
50
85
  exports.ProgressBar = ProgressBar;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Cross: () => JSX.Element;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Cross = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const Cross = () => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" },
9
+ react_1.default.createElement("defs", null,
10
+ react_1.default.createElement("linearGradient", { id: "a", x2: "0", y1: "47.37", y2: "-1.429", gradientUnits: "userSpaceOnUse" },
11
+ react_1.default.createElement("stop", { stopColor: "#c52828" }),
12
+ react_1.default.createElement("stop", { offset: "1", stopColor: "#ff5454" }))),
13
+ react_1.default.createElement("g", { style: { fillOpacity: 1 }, transform: "translate(-58.37 .882) scale(.99999)" },
14
+ react_1.default.createElement("circle", { cx: "82.37", cy: "23.12", r: "24", fill: "url(#a)", style: { fillOpacity: 1, fill: '#d33' } }),
15
+ react_1.default.createElement("path", { fill: "#fff", fillOpacity: ".842", d: "m87.77 23.725 5.939-5.939c.377-.372.566-.835.566-1.373 0-.54-.189-.997-.566-1.374l-2.747-2.747a1.888 1.888 0 0 0-1.373-.564c-.539 0-.997.186-1.374.564l-5.939 5.939-5.939-5.939a1.889 1.889 0 0 0-1.374-.564c-.539 0-.997.186-1.374.564l-2.748 2.747a1.873 1.873 0 0 0-.566 1.374c0 .54.188.997.566 1.373l5.939 5.939-5.939 5.94a1.862 1.862 0 0 0-.566 1.373c0 .54.188.997.566 1.373l2.748 2.747c.377.378.835.564 1.374.564.539 0 .997-.186 1.374-.564l5.939-5.939 5.94 5.939c.377.378.835.564 1.374.564.539 0 .997-.186 1.373-.564l2.747-2.747c.377-.372.566-.835.566-1.373 0-.54-.188-.997-.566-1.373l-5.939-5.94", style: { fillOpacity: 1, fill: '#fff' } }))));
16
+ exports.Cross = Cross;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Tick: () => JSX.Element;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Tick = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const Tick = () => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64" },
9
+ react_1.default.createElement("circle", { cx: "32", cy: "32", r: "30", fill: "#fff" }),
10
+ react_1.default.createElement("path", { fill: "#7cb342", d: "M32 2C15.431 2 2 15.432 2 32c0 16.568 13.432 30 30 30 16.568 0 30-13.432 30-30C62 15.432 48.568 2 32 2zm-6.975 48-.02-.02-.017.02L11 35.6l7.029-7.164 6.977 7.184 21-21.619L53 21.199 25.025 50z" })));
11
+ exports.Tick = Tick;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Warning: () => JSX.Element;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Warning = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const Warning = () => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64" },
9
+ react_1.default.createElement("defs", null,
10
+ react_1.default.createElement("linearGradient", { id: "a", x2: "0", y1: "45.47", y2: "-.599", gradientTransform: "matrix(1.31117 0 0 1.30239 737.39 159.91)", gradientUnits: "userSpaceOnUse" },
11
+ react_1.default.createElement("stop", { stopColor: "#ffc515" }),
12
+ react_1.default.createElement("stop", { offset: "1", stopColor: "#ffd55b" }))),
13
+ react_1.default.createElement("path", { fill: "url(#a)", d: "m797.94 212.01-25.607-48c-.736-1.333-2.068-2.074-3.551-2.074s-2.822.889-3.569 2.222l-25.417 48c-.598 1.185-.605 2.815.132 4s1.921 1.778 3.404 1.778h51.02c1.483 0 2.821-.741 3.42-1.926.747-1.185.753-2.667.165-4", transform: "translate(-627.02 -130.8) scale(.85714)" }),
14
+ react_1.default.createElement("path", { fillOpacity: ".75", stroke: "#40330d", strokeWidth: ".90168", d: "M31.996 24.239a1.93 1.93 0 0 0-1.926 1.92v11.559c0 1.06.855 1.92 1.926 1.92a1.929 1.929 0 0 0 1.925-1.92v-11.56c0-1.06-.853-1.92-1.925-1.92zm0 19.249c-1.064 0-1.926.86-1.926 1.925 0 1.064.86 1.925 1.926 1.925 1.064 0 1.925-.86 1.925-1.925a1.922 1.922 0 0 0-1.925-1.925z" })));
15
+ exports.Warning = Warning;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { IToastInt, IToastProviderOptions, TAddToast } from './types';
3
+ export declare const ToastContext: React.Context<{
4
+ addToast: TAddToast;
5
+ }>;
6
+ export declare const Toast: ({ toast, close, providerOptions, }: {
7
+ toast: IToastInt;
8
+ providerOptions: IToastProviderOptions;
9
+ close: (s: string) => void;
10
+ }) => JSX.Element;
11
+ export declare const ToastProvider: ({ children, providerOptions, }: {
12
+ children: React.ReactNode;
13
+ providerOptions?: IToastProviderOptions | undefined;
14
+ }) => JSX.Element;
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ToastProvider = exports.Toast = exports.ToastContext = void 0;
30
+ const styled_1 = __importDefault(require("@emotion/styled"));
31
+ const react_1 = __importStar(require("react"));
32
+ const react_dom_1 = require("react-dom");
33
+ const common_1 = require("../../../common");
34
+ const ProgressBar_1 = require("../ProgressBar");
35
+ const Cross_1 = require("./Cross");
36
+ const Tick_1 = require("./Tick");
37
+ const Warning_1 = require("./Warning");
38
+ exports.ToastContext = (0, react_1.createContext)({});
39
+ const ToastContainerStyle = styled_1.default.div `
40
+ position: fixed;
41
+ bottom: 0;
42
+ right: 0;
43
+ margin: 0.5rem;
44
+ z-index: 10000;
45
+ `;
46
+ const ToastStyle = styled_1.default.div `
47
+ display: flex;
48
+ flex-flow: row wrap;
49
+ align-items: center;
50
+ padding: 0.5rem;
51
+ position: relative;
52
+ color: white;
53
+ font-size: 1.2rem;
54
+ &:not(:last-of-type) {
55
+ margin-bottom: 8px;
56
+ }
57
+
58
+ border-radius: 6px;
59
+ background-color: rgba(0, 0, 0, 0.8);
60
+ color: white;
61
+ &[data-dark='false'] {
62
+ background-color: rgba(255, 255, 255, 0.8);
63
+ color: black;
64
+ }
65
+ `;
66
+ const CloseStyle = styled_1.default.span `
67
+ position: absolute;
68
+ top: 0;
69
+ right: 0;
70
+ width: 0.5rem;
71
+ height: 0.5rem;
72
+
73
+ cursor: pointer;
74
+ border-radius: 50%;
75
+ padding: 0.5rem;
76
+ display: flex;
77
+ justify-content: center;
78
+ align-items: center;
79
+ color: white;
80
+ &:hover {
81
+ background-color: #333;
82
+ }
83
+
84
+ &[data-dark='false'] {
85
+ color: #000;
86
+ &:hover {
87
+ background-color: #eee;
88
+ }
89
+ }
90
+ `;
91
+ const Icon = styled_1.default.div `
92
+ width: 1.5rem;
93
+ height: 1.5rem;
94
+ margin-right: 0.5rem;
95
+ `;
96
+ const ProgressBarStyled = (0, styled_1.default)(ProgressBar_1.ProgressBar) `
97
+ height: 0.75rem;
98
+ margin-top: 0.5rem;
99
+ `;
100
+ const Toast = ({ toast, close, providerOptions, }) => {
101
+ var _a, _b, _c, _d, _e;
102
+ const darkMode = (_a = providerOptions === null || providerOptions === void 0 ? void 0 : providerOptions.darkMode) !== null && _a !== void 0 ? _a : false;
103
+ let closeMs;
104
+ if ((_b = toast.options) === null || _b === void 0 ? void 0 : _b.autoClose) {
105
+ closeMs = (_c = toast.options) === null || _c === void 0 ? void 0 : _c.autoClose;
106
+ }
107
+ else if (((_d = toast.options) === null || _d === void 0 ? void 0 : _d.autoClose) === undefined) {
108
+ closeMs = 5000;
109
+ }
110
+ let icon = react_1.default.createElement(Tick_1.Tick, null);
111
+ switch ((_e = toast === null || toast === void 0 ? void 0 : toast.options) === null || _e === void 0 ? void 0 : _e.appearance) {
112
+ case 'error': {
113
+ closeMs = undefined;
114
+ icon = react_1.default.createElement(Cross_1.Cross, null);
115
+ break;
116
+ }
117
+ case 'warning': {
118
+ closeMs = undefined;
119
+ icon = react_1.default.createElement(Warning_1.Warning, null);
120
+ break;
121
+ }
122
+ }
123
+ (0, react_1.useEffect)(() => {
124
+ if (!closeMs) {
125
+ return;
126
+ }
127
+ const timeout = setTimeout(() => close(toast.id), closeMs);
128
+ return () => clearTimeout(timeout);
129
+ // eslint-disable-next-line react-hooks/exhaustive-deps
130
+ }, []);
131
+ return (react_1.default.createElement(ToastStyle, { "data-dark": darkMode },
132
+ react_1.default.createElement(CloseStyle, { "data-dark": darkMode, onClick: () => close(toast.id) }, "\u00D7"),
133
+ react_1.default.createElement(Icon, null, icon),
134
+ toast.message,
135
+ closeMs !== undefined && (react_1.default.createElement(ProgressBarStyled, { max: 100, min: 0, dotPercentages: null, transitionToMs: closeMs }))));
136
+ };
137
+ exports.Toast = Toast;
138
+ const ToastProvider = ({ children, providerOptions, }) => {
139
+ const [toasts, setToasts] = (0, react_1.useState)([]);
140
+ const addToast = (message, options) => setToasts((currentToasts) => [
141
+ ...currentToasts,
142
+ { id: (0, common_1.getRandomInt)(10000).toString(), message, options },
143
+ ]);
144
+ const close = (id) => setToasts((currentToasts) => currentToasts.filter((toast) => toast.id !== id));
145
+ const contextValue = (0, react_1.useMemo)(() => ({ addToast }), []);
146
+ return (react_1.default.createElement(exports.ToastContext.Provider, { value: contextValue },
147
+ children,
148
+ (0, react_dom_1.createPortal)(react_1.default.createElement(ToastContainerStyle, null, toasts.map((toast) => (react_1.default.createElement(exports.Toast, { key: toast.id, toast: toast, close: close, providerOptions: providerOptions || {} })))), document.body)));
149
+ };
150
+ exports.ToastProvider = ToastProvider;
@@ -1,10 +1,2 @@
1
- /// <reference types="react" />
2
- import { ToastPosition } from 'react-hot-toast';
3
- export interface IToastOptions {
4
- appearance: 'error' | 'success';
5
- autoClose?: number;
6
- }
7
- export declare const addToast: (m: string, options?: IToastOptions) => void;
8
- export declare const ToastProvider: ({ position }: {
9
- position: ToastPosition;
10
- }) => JSX.Element;
1
+ export * from './base';
2
+ export * from './types';
@@ -10,37 +10,9 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
15
  };
28
16
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.ToastProvider = exports.addToast = void 0;
30
- const react_1 = __importDefault(require("react"));
31
- const react_hot_toast_1 = __importStar(require("react-hot-toast"));
32
- const addToast = (m, options) => {
33
- if ((options === null || options === void 0 ? void 0 : options.appearance) === 'error') {
34
- react_hot_toast_1.default.error(m, {
35
- duration: (options === null || options === void 0 ? void 0 : options.autoClose) || 5000,
36
- });
37
- }
38
- else {
39
- react_hot_toast_1.default.success(m, {
40
- duration: (options === null || options === void 0 ? void 0 : options.autoClose) || 5000,
41
- });
42
- }
43
- };
44
- exports.addToast = addToast;
45
- const ToastProvider = ({ position }) => (react_1.default.createElement(react_hot_toast_1.Toaster, { position: position }));
46
- exports.ToastProvider = ToastProvider;
17
+ __exportStar(require("./base"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,18 @@
1
+ export type TToastAppearance = 'error' | 'warning' | 'success';
2
+ export type TToastOptions = {
3
+ appearance: TToastAppearance;
4
+ /** default 5 seconds for success only. null to override */
5
+ autoClose?: number | null;
6
+ } | undefined;
7
+ export type TAddToast = (m: string, options?: TToastOptions) => void;
8
+ export interface IToastProviderOptions {
9
+ /** default false */
10
+ darkMode?: boolean;
11
+ }
12
+ export interface IToast {
13
+ message: string;
14
+ options?: TToastOptions;
15
+ }
16
+ export interface IToastInt extends IToast {
17
+ id: string;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -20,3 +20,4 @@ export * from './useOnScroll';
20
20
  export * from './useOverloadPageSearch';
21
21
  export * from './useQueryString';
22
22
  export * from './useResize';
23
+ export * from './useTimeout';
@@ -36,3 +36,4 @@ __exportStar(require("./useOnScroll"), exports);
36
36
  __exportStar(require("./useOverloadPageSearch"), exports);
37
37
  __exportStar(require("./useQueryString"), exports);
38
38
  __exportStar(require("./useResize"), exports);
39
+ __exportStar(require("./useTimeout"), exports);
@@ -0,0 +1,3 @@
1
+ export declare function useTimeout(callback: () => void | Promise<void>,
2
+ /** if null wont trigger */
3
+ delay: number | null): void;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useTimeout = void 0;
4
+ const react_1 = require("react");
5
+ function useTimeout(callback,
6
+ /** if null wont trigger */
7
+ delay) {
8
+ const savedCallback = (0, react_1.useRef)(callback);
9
+ (0, react_1.useEffect)(() => {
10
+ savedCallback.current = callback;
11
+ }, [callback]);
12
+ (0, react_1.useEffect)(() => {
13
+ let id;
14
+ function tick() {
15
+ const ret = savedCallback.current();
16
+ if (ret instanceof Promise) {
17
+ void ret.then(() => {
18
+ if (delay !== null) {
19
+ id = setTimeout(tick, delay);
20
+ }
21
+ });
22
+ }
23
+ else {
24
+ if (delay !== null) {
25
+ id = setTimeout(tick, delay);
26
+ }
27
+ }
28
+ }
29
+ if (delay !== null) {
30
+ id = setTimeout(tick, delay);
31
+ return () => id && clearTimeout(id);
32
+ }
33
+ }, [delay]);
34
+ }
35
+ exports.useTimeout = useTimeout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-common",
3
- "version": "0.0.375",
3
+ "version": "0.0.376",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Andrei Gec <@andreigec> (https://gec.dev/)",
@@ -8,7 +8,7 @@
8
8
  "license": "ISC",
9
9
  "scripts": {
10
10
  "preinstall": "npx only-allow pnpm",
11
- "format": "npx eslint --ext .ts,.tsx ./src --fix",
11
+ "format": "npx eslint --ext .ts,.tsx ./src --fix && npx eslint --ext .ts,.tsx ./story --fix",
12
12
  "build": "rimraf dist && npm run lint && tsc",
13
13
  "lint": "npx eslint --ext .ts,.tsx ./src",
14
14
  "start": "cross-env BROWSER=none start-storybook -p 6006",
@@ -25,7 +25,6 @@
25
25
  "openapi-request-validator": "12.0.2",
26
26
  "react": "18.2.0",
27
27
  "react-dom": "18.2.0",
28
- "react-hot-toast": "2.x",
29
28
  "typescript": "4.x",
30
29
  "eslint-import-resolver-typescript": "3.x",
31
30
  "eslint-plugin-simple-import-sort": ">=8"