@pibit.ai/cure-design-system 0.6.34 → 0.6.35
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/confirm-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAgBvC,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AA0BtE,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,2EAA2E;IAC3E,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,uEAAuE;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uEAAuE;IACvE,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,kEAAkE;IAClE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6EAA6E;IAC7E,eAAe,CAAC,EAAE,4BAA4B,CAAC;IAC/C,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wFAAwF;IACxF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC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1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as j, useEffect as q } from "react";
|
|
3
3
|
import { InfoCircle as A, AlertTriangle as F, AlertCircle as R, XClose as $ } from "@untitledui/icons";
|
|
4
4
|
import { ButtonUtility as E } from "../../primitives/button/button-utility.js";
|
|
@@ -35,13 +35,13 @@ const S = {
|
|
|
35
35
|
isLoading: r = !1,
|
|
36
36
|
tone: m = "primary",
|
|
37
37
|
icon: v,
|
|
38
|
-
secondaryAction:
|
|
38
|
+
secondaryAction: i,
|
|
39
39
|
testIdPrefix: f,
|
|
40
40
|
isDismissable: N = !0,
|
|
41
41
|
ignoreClickAway: w = !1,
|
|
42
|
-
"data-testid":
|
|
42
|
+
"data-testid": D
|
|
43
43
|
}) => {
|
|
44
|
-
const { Icon:
|
|
44
|
+
const { Icon: z, iconBox: B, icon: k, confirmColor: I } = S[m], t = (l) => f ? `${f}-${l}` : void 0, x = () => n(!1), u = j(null);
|
|
45
45
|
return q(() => {
|
|
46
46
|
if (!a) return;
|
|
47
47
|
const l = requestAnimationFrame(() => {
|
|
@@ -54,16 +54,16 @@ const S = {
|
|
|
54
54
|
{
|
|
55
55
|
isOpen: a,
|
|
56
56
|
onClose: n,
|
|
57
|
-
isDismissable: N,
|
|
57
|
+
isDismissable: N && !r,
|
|
58
58
|
ignoreClickAway: w,
|
|
59
|
-
"data-testid":
|
|
60
|
-
children: /* @__PURE__ */
|
|
59
|
+
"data-testid": D,
|
|
60
|
+
children: /* @__PURE__ */ o(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
ref: u,
|
|
64
64
|
className: b(
|
|
65
65
|
"relative max-w-[90vw] rounded-2xl bg-primary p-5",
|
|
66
|
-
|
|
66
|
+
i ? "w-[520px]" : "w-[400px]"
|
|
67
67
|
),
|
|
68
68
|
children: [
|
|
69
69
|
/* @__PURE__ */ e(
|
|
@@ -77,13 +77,13 @@ const S = {
|
|
|
77
77
|
"data-testid": t("close")
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */ e("div", { className: b("flex size-12 shrink-0 items-center justify-center rounded-xl p-3",
|
|
82
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col gap-5", children: [
|
|
81
|
+
/* @__PURE__ */ e("div", { className: b("flex size-12 shrink-0 items-center justify-center rounded-xl p-3", B), children: v ?? /* @__PURE__ */ e(z, { size: 24, "aria-label": s, className: k }) }),
|
|
82
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: [
|
|
83
83
|
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-primary", children: s }),
|
|
84
84
|
d != null && /* @__PURE__ */ e("div", { className: "text-sm leading-6 text-tertiary", children: d })
|
|
85
85
|
] }),
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ o("div", { className: "flex gap-3", children: [
|
|
87
87
|
/* @__PURE__ */ e(
|
|
88
88
|
c,
|
|
89
89
|
{
|
|
@@ -98,7 +98,7 @@ const S = {
|
|
|
98
98
|
children: h
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
|
-
|
|
101
|
+
i && /* @__PURE__ */ e(
|
|
102
102
|
c,
|
|
103
103
|
{
|
|
104
104
|
type: "button",
|
|
@@ -106,9 +106,9 @@ const S = {
|
|
|
106
106
|
color: "secondary",
|
|
107
107
|
className: "flex-1",
|
|
108
108
|
isDisabled: r,
|
|
109
|
-
onClick:
|
|
109
|
+
onClick: i.onAction,
|
|
110
110
|
"data-testid": t("secondary"),
|
|
111
|
-
children:
|
|
111
|
+
children: i.label
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
114
|
/* @__PURE__ */ e(
|