@servicetitan/confirm 29.0.2 → 29.1.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/confirm.d.ts +0 -1
- package/dist/confirm.d.ts.map +1 -1
- package/dist/confirm.js +2 -14
- package/dist/confirm.js.map +1 -1
- package/dist/confirm.stories.d.ts +11 -0
- package/dist/confirm.stories.d.ts.map +1 -0
- package/dist/confirm.stories.js +17 -0
- package/dist/confirm.stories.js.map +1 -0
- package/dist/confirmation-messages/default-confirmation.js +1 -15
- package/dist/confirmation-messages/default-confirmation.js.map +1 -1
- package/dist/use-confirm.d.ts.map +1 -1
- package/dist/use-confirm.js +5 -26
- package/dist/use-confirm.js.map +1 -1
- package/package.json +2 -2
- package/src/confirm.tsx +1 -1
package/dist/confirm.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConfirmProps as InnerConfirmProps, ConfirmationProps } from './use-confirm';
|
|
3
2
|
import { DefaultConfirmationProps } from './confirmation-messages/default-confirmation';
|
|
4
3
|
type ConfirmProps<T extends (...args: any[]) => any, P extends ConfirmationProps> = {
|
package/dist/confirm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm.d.ts","sourceRoot":"","sources":["../src/confirm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"confirm.d.ts","sourceRoot":"","sources":["../src/confirm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,YAAY,IAAI,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF,KAAK,YAAY,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,CAAC,SAAS,iBAAiB,IAAI;IAChF,SAAS,EAAE,CAAC,CAAC;IACb,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC;CACrC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAEzB,eAAO,MAAM,OAAO,GAChB,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACjC,CAAC,SAAS,iBAAiB,GAAG,wBAAwB,EACxD,8CAKC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,4CAUpB,CAAC"}
|
package/dist/confirm.js
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { Fragment } from 'react';
|
|
14
3
|
import { useConfirm } from './use-confirm';
|
|
15
|
-
export const Confirm = (
|
|
16
|
-
var { onConfirm, onDecline, children } = _a, props = __rest(_a, ["onConfirm", "onDecline", "children"]);
|
|
4
|
+
export const Confirm = ({ onConfirm, onDecline, children, ...props }) => {
|
|
17
5
|
const [Confirm, handler] = useConfirm(onConfirm, onDecline);
|
|
18
|
-
return (_jsxs(Fragment, { children: [children(handler), _jsx(Confirm,
|
|
6
|
+
return (_jsxs(Fragment, { children: [children(handler), _jsx(Confirm, { ...props })] }));
|
|
19
7
|
};
|
|
20
8
|
//# sourceMappingURL=confirm.js.map
|
package/dist/confirm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm.js","sourceRoot":"","sources":["../src/confirm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"confirm.js","sourceRoot":"","sources":["../src/confirm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAwD,MAAM,eAAe,CAAC;AASjG,MAAM,CAAC,MAAM,OAAO,GAAG,CAGrB,EACE,SAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACS,EAAE,EAAE;IACrB,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAE5D,OAAO,CACH,MAAC,QAAQ,eACJ,QAAQ,CAAC,OAAO,CAAC,EAElB,KAAC,OAAO,OAAM,KAAyC,GAAI,IACpD,CACd,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
};
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Basic: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const Hook: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Configurable: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Toggleable: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const YesNo: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const Custom: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=confirm.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm.stories.d.ts","sourceRoot":"","sources":["../src/confirm.stories.tsx"],"names":[],"mappings":";;;AAYA,wBAEE;AAEF,eAAO,MAAM,KAAK,+CAA6C,CAAC;AAChE,eAAO,MAAM,IAAI,+CAAkC,CAAC;AACpD,eAAO,MAAM,YAAY,+CAA2D,CAAC;AACrF,eAAO,MAAM,UAAU,+CAAqD,CAAC;AAC7E,eAAO,MAAM,KAAK,+CAAyD,CAAC;AAC5E,eAAO,MAAM,MAAM,+CAAuD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment } from 'react';
|
|
3
|
+
import { Text } from '@servicetitan/design-system';
|
|
4
|
+
import { BasicExample, HookExample, ConfigurableExample, ToggleableExample, YesNoExample, CustomExample, } from './demo';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Confirm/Demos',
|
|
7
|
+
};
|
|
8
|
+
export const Basic = wrap('Default confirmation', BasicExample);
|
|
9
|
+
export const Hook = wrap('Hook usage', HookExample);
|
|
10
|
+
export const Configurable = wrap('Configurable default dialog', ConfigurableExample);
|
|
11
|
+
export const Toggleable = wrap('Toggleable confirmation', ToggleableExample);
|
|
12
|
+
export const YesNo = wrap('(Yes / No / Cancel) confrimation', YesNoExample);
|
|
13
|
+
export const Custom = wrap('Custom confirmation component', CustomExample);
|
|
14
|
+
function wrap(name, Component) {
|
|
15
|
+
return () => (_jsxs(Fragment, { children: [_jsx(Text, { size: 4, className: "m-b-half", children: name }), _jsx(Component, {})] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=confirm.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm.stories.js","sourceRoot":"","sources":["../src/confirm.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAM,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAEnD,OAAO,EACH,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,aAAa,GAChB,MAAM,QAAQ,CAAC;AAEhB,eAAe;IACX,KAAK,EAAE,eAAe;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,sBAAsB,EAAE,YAAY,CAAC,CAAC;AAChE,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,yBAAyB,EAAE,iBAAiB,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,kCAAkC,EAAE,YAAY,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,+BAA+B,EAAE,aAAa,CAAC,CAAC;AAE3E,SAAS,IAAI,CAAC,IAAY,EAAE,SAAa;IACrC,OAAO,GAAG,EAAE,CAAC,CACT,MAAC,QAAQ,eACL,KAAC,IAAI,IAAC,IAAI,EAAE,CAAC,EAAE,SAAS,EAAC,UAAU,YAC9B,IAAI,GACF,EAEP,KAAC,SAAS,KAAG,IACN,CACd,CAAC;AACN,CAAC"}
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { Dialog } from '@servicetitan/design-system';
|
|
14
|
-
export const DefaultConfirmation = (
|
|
15
|
-
var { negative = true, title = 'Are you sure?', message = '', onConfirm, onCancel } = _a, props = __rest(_a, ["negative", "title", "message", "onConfirm", "onCancel"]);
|
|
16
|
-
return (_jsx(Dialog, Object.assign({ open: true, negative: negative, onClose: onCancel, title: title, onPrimaryActionClick: onConfirm, primaryActionName: "Confirm", onSecondaryActionClick: onCancel, secondaryActionName: "Cancel" }, props, { children: message })));
|
|
17
|
-
};
|
|
3
|
+
export const DefaultConfirmation = ({ negative = true, title = 'Are you sure?', message = '', onConfirm, onCancel, ...props }) => (_jsx(Dialog, { open: true, negative: negative, onClose: onCancel, title: title, onPrimaryActionClick: onConfirm, primaryActionName: "Confirm", onSecondaryActionClick: onCancel, secondaryActionName: "Cancel", ...props, children: message }));
|
|
18
4
|
//# sourceMappingURL=default-confirmation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-confirmation.js","sourceRoot":"","sources":["../../src/confirmation-messages/default-confirmation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default-confirmation.js","sourceRoot":"","sources":["../../src/confirmation-messages/default-confirmation.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,6BAA6B,CAAC;AAiBlE,MAAM,CAAC,MAAM,mBAAmB,GAAiC,CAAC,EAC9D,QAAQ,GAAG,IAAI,EACf,KAAK,GAAG,eAAe,EACvB,OAAO,GAAG,EAAE,EACZ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACX,EAAE,EAAE,CAAC,CACF,KAAC,MAAM,IACH,IAAI,QACJ,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,KAAK,EACZ,oBAAoB,EAAE,SAAS,EAC/B,iBAAiB,EAAC,SAAS,EAC3B,sBAAsB,EAAE,QAAQ,EAChC,mBAAmB,EAAC,QAAQ,KACxB,KAAK,YAER,OAAO,GACH,CACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-confirm.d.ts","sourceRoot":"","sources":["../src/use-confirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAEH,wBAAwB,EAC3B,MAAM,8CAA8C,CAAC;AAQtD,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,IAAI,IAAI,CAAC;IAClB,SAAS,IAAI,IAAI,CAAC;IAClB,QAAQ,IAAI,IAAI,CAAC;CACpB;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,iBAAiB,IAAI;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACnC,GAAG,IAAI,CAAC,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAEjE,wBAAgB,UAAU,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"use-confirm.d.ts","sourceRoot":"","sources":["../src/use-confirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAEH,wBAAwB,EAC3B,MAAM,8CAA8C,CAAC;AAQtD,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,IAAI,IAAI,CAAC;IAClB,SAAS,IAAI,IAAI,CAAC;IAClB,QAAQ,IAAI,IAAI,CAAC;CACpB;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,iBAAiB,IAAI;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACnC,GAAG,IAAI,CAAC,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAEjE,wBAAgB,UAAU,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,GA0DxD,EA1BpB,CAAC,SAAS,iBAAiB,6EAIzB,YAAY,CAAC,CAAC,CAAC,qDAsBoB,CAAC,CAAC,CACnD"}
|
package/dist/use-confirm.js
CHANGED
|
@@ -1,32 +1,12 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
-
var t = {};
|
|
12
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
-
t[p] = s[p];
|
|
14
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
-
t[p[i]] = s[p[i]];
|
|
18
|
-
}
|
|
19
|
-
return t;
|
|
20
|
-
};
|
|
21
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
2
|
import { useState, useCallback, useMemo } from 'react';
|
|
23
3
|
import { DefaultConfirmation, } from './confirmation-messages/default-confirmation';
|
|
24
4
|
export function useConfirm(onConfirm, onDecline) {
|
|
25
5
|
const [defer, setDefer] = useState(undefined);
|
|
26
|
-
const handler = useCallback((...args) =>
|
|
6
|
+
const handler = useCallback(async (...args) => {
|
|
27
7
|
let isConfirmed;
|
|
28
8
|
try {
|
|
29
|
-
isConfirmed =
|
|
9
|
+
isConfirmed = await new Promise((resolve, reject) => {
|
|
30
10
|
setDefer({
|
|
31
11
|
confirm: () => resolve(true),
|
|
32
12
|
decline: () => resolve(false),
|
|
@@ -46,9 +26,8 @@ export function useConfirm(onConfirm, onDecline) {
|
|
|
46
26
|
else if (onDecline) {
|
|
47
27
|
onDecline(...args);
|
|
48
28
|
}
|
|
49
|
-
}
|
|
50
|
-
const Confirm = useMemo(() => (
|
|
51
|
-
var { when = true, confirmation: Confirmation = DefaultConfirmation } = _a, props = __rest(_a, ["when", "confirmation"]);
|
|
29
|
+
}, [onConfirm, onDecline]);
|
|
30
|
+
const Confirm = useMemo(() => ({ when = true, confirmation: Confirmation = DefaultConfirmation, ...props }) => {
|
|
52
31
|
if (!defer) {
|
|
53
32
|
return null;
|
|
54
33
|
}
|
|
@@ -56,7 +35,7 @@ export function useConfirm(onConfirm, onDecline) {
|
|
|
56
35
|
defer.confirm();
|
|
57
36
|
return null;
|
|
58
37
|
}
|
|
59
|
-
return (_jsx(Confirmation,
|
|
38
|
+
return (_jsx(Confirmation, { ...props, onConfirm: defer.confirm, onDecline: defer.decline, onCancel: defer.cancel }));
|
|
60
39
|
}, [defer]);
|
|
61
40
|
return [Confirm, handler];
|
|
62
41
|
}
|
package/dist/use-confirm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-confirm.js","sourceRoot":"","sources":["../src/use-confirm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-confirm.js","sourceRoot":"","sources":["../src/use-confirm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAiB,MAAM,OAAO,CAAC;AAEtE,OAAO,EACH,mBAAmB,GAEtB,MAAM,8CAA8C,CAAC;AAqBtD,MAAM,UAAU,UAAU,CAAoC,SAAY,EAAE,SAAa;IACrF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAoB,SAAS,CAAC,CAAC;IAEjE,MAAM,OAAO,GAAG,WAAW,CACvB,KAAK,EAAE,GAAG,IAAW,EAAE,EAAE;QACrB,IAAI,WAAoB,CAAC;QAEzB,IAAI,CAAC;YACD,WAAW,GAAG,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBAChD,QAAQ,CAAC;oBACL,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;oBAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;oBAC7B,MAAM,EAAE,MAAM;iBACjB,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;QAAC,WAAM,CAAC;YACL,OAAO;QACX,CAAC;gBAAS,CAAC;YACP,QAAQ,CAAC,SAAS,CAAC,CAAC;QACxB,CAAC;QAED,IAAI,WAAW,EAAE,CAAC;YACd,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;QACvB,CAAC;aAAM,IAAI,SAAS,EAAE,CAAC;YACnB,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;QACvB,CAAC;IACL,CAAC,EACD,CAAC,SAAS,EAAE,SAAS,CAAC,CACzB,CAAC;IAEF,MAAM,OAAO,GAAG,OAAO,CACnB,GAAG,EAAE,CACD,CAAyD,EACrD,IAAI,GAAG,IAAI,EACX,YAAY,EAAE,YAAY,GAAG,mBAAuC,EACpE,GAAG,KAAK,EACM,EAAE,EAAE;QAClB,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,CAAC,IAAI,EAAE,CAAC;YACR,KAAK,CAAC,OAAO,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,CACH,KAAC,YAAY,OACJ,KAAW,EAChB,SAAS,EAAE,KAAK,CAAC,OAAO,EACxB,SAAS,EAAE,KAAK,CAAC,OAAO,EACxB,QAAQ,EAAE,KAAK,CAAC,MAAM,GACxB,CACL,CAAC;IACN,CAAC,EACL,CAAC,KAAK,CAAC,CACV,CAAC;IAEF,OAAO,CAAC,OAAO,EAAE,OAAO,CAAwB,CAAC;AACrD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/confirm",
|
|
3
|
-
"version": "29.0
|
|
3
|
+
"version": "29.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/confirm",
|
|
6
6
|
"repository": {
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"cli": {
|
|
34
34
|
"webpack": false
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "c1d645b3e5643ba5a50e4898d9f786212334792a"
|
|
37
37
|
}
|
package/src/confirm.tsx
CHANGED
|
@@ -11,7 +11,7 @@ type ConfirmProps<T extends (...args: any[]) => any, P extends ConfirmationProps
|
|
|
11
11
|
|
|
12
12
|
export const Confirm = <
|
|
13
13
|
T extends (...args: any[]) => any,
|
|
14
|
-
P extends ConfirmationProps = DefaultConfirmationProps
|
|
14
|
+
P extends ConfirmationProps = DefaultConfirmationProps,
|
|
15
15
|
>({
|
|
16
16
|
onConfirm,
|
|
17
17
|
onDecline,
|