@calcom/atoms 2.10.0 → 2.11.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/availability/components/date-override-input-dialog.js +12 -12
- package/dist/booker/components/out-of-office-in-slots.d.ts +1 -0
- package/dist/booker/components/out-of-office-in-slots.d.ts.map +1 -1
- package/dist/booker/components/out-of-office-in-slots.js +25 -24
- package/dist/booker/components/verify-code-dialog.d.ts.map +1 -1
- package/dist/booker/components/verify-code-dialog.js +48 -45
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +53 -48
- package/dist/components/ui/confirmation-dialog-content.js +1 -1
- package/dist/components/ui/dialog.d.ts +28 -42
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +83 -116
- package/dist/components/ui/dropdown.d.ts +2 -2
- package/dist/components/ui/select.d.ts +0 -7
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +76 -95
- package/dist/components/ui/switch.js +23 -23
- package/dist/components/ui/toast.d.ts +1 -1
- package/dist/components/ui/tooltip.d.ts +1 -1
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +33 -33
- package/package.json +1 -1
|
@@ -24,9 +24,9 @@ const J = ({
|
|
|
24
24
|
weekStart: b,
|
|
25
25
|
isDryRun: _ = !1
|
|
26
26
|
}) => {
|
|
27
|
-
const [C, c] = h(), { t: o, i18n: T, isLocaleReady: U } = q(), [
|
|
27
|
+
const [C, c] = h(), { t: o, i18n: T, isLocaleReady: U } = q(), [x, O] = h(
|
|
28
28
|
r && r[0].start.getUTCHours() === 0 && r[0].start.getUTCMinutes() === 0 && r[0].end.getUTCHours() === 0 && r[0].end.getUTCMinutes() === 0
|
|
29
|
-
), [a, n] = h(r ? [d.utc(r[0].start)] : []),
|
|
29
|
+
), [a, n] = h(r ? [d.utc(r[0].start)] : []), w = (e) => {
|
|
30
30
|
if (a.some((s) => f(s) === f(e))) {
|
|
31
31
|
n(a.filter((s) => f(s) !== f(e)));
|
|
32
32
|
return;
|
|
@@ -36,15 +36,15 @@ const J = ({
|
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
n([e]);
|
|
39
|
-
},
|
|
39
|
+
}, y = (p || []).reduce((e, s) => (a[0] && s.days.includes(a[0].day()) && e.push({
|
|
40
40
|
start: d.utc().startOf("day").add(s.startTime, "minute").toDate(),
|
|
41
41
|
end: d.utc().startOf("day").add(s.endTime, "minute").toDate()
|
|
42
42
|
}), e), []);
|
|
43
|
-
|
|
43
|
+
y.length || y.push({
|
|
44
44
|
start: d.utc().startOf("day").add(540, "minute").toDate(),
|
|
45
45
|
end: d.utc().startOf("day").add(1020, "minute").toDate()
|
|
46
46
|
});
|
|
47
|
-
const
|
|
47
|
+
const N = k({
|
|
48
48
|
values: {
|
|
49
49
|
range: r && r[0].start.valueOf() !== r[0].end.valueOf() ? r.map((e) => ({
|
|
50
50
|
start: new Date(
|
|
@@ -53,13 +53,13 @@ const J = ({
|
|
|
53
53
|
end: new Date(
|
|
54
54
|
d.utc().hour(e.end.getUTCHours()).minute(e.end.getUTCMinutes()).second(0).format()
|
|
55
55
|
)
|
|
56
|
-
})) :
|
|
56
|
+
})) : y
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
return /* @__PURE__ */ i(
|
|
60
60
|
P,
|
|
61
61
|
{
|
|
62
|
-
form:
|
|
62
|
+
form: N,
|
|
63
63
|
handleSubmit: (e) => {
|
|
64
64
|
const s = [];
|
|
65
65
|
if (a.length !== 0) {
|
|
@@ -67,7 +67,7 @@ const J = ({
|
|
|
67
67
|
n([]);
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
x ? (a.map((m) => {
|
|
71
71
|
s.push({
|
|
72
72
|
start: m.utc(!0).startOf("day").toDate(),
|
|
73
73
|
end: m.utc(!0).startOf("day").toDate()
|
|
@@ -94,7 +94,7 @@ const J = ({
|
|
|
94
94
|
selected: a,
|
|
95
95
|
showExtraDays: !1,
|
|
96
96
|
onChange: (e) => {
|
|
97
|
-
e &&
|
|
97
|
+
e && w(e);
|
|
98
98
|
},
|
|
99
99
|
onMonthChange: (e) => {
|
|
100
100
|
c(e);
|
|
@@ -107,12 +107,12 @@ const J = ({
|
|
|
107
107
|
/* @__PURE__ */ t("div", { className: "relative mt-8 flex w-full flex-col sm:mt-0 sm:p-4 md:p-8", children: a[0] ? /* @__PURE__ */ i(M, { children: [
|
|
108
108
|
/* @__PURE__ */ i("div", { className: "mb-4 grow stack-y-4", children: [
|
|
109
109
|
/* @__PURE__ */ t("p", { className: "text-medium text-emphasis text-sm", children: o("date_overrides_dialog_which_hours") }),
|
|
110
|
-
/* @__PURE__ */ t("div", { children:
|
|
110
|
+
/* @__PURE__ */ t("div", { children: x ? /* @__PURE__ */ t("p", { className: "text-subtle border-default rounded border p-2 text-sm", children: o("date_overrides_unavailable") }) : /* @__PURE__ */ t(G, { name: "range", userTimeFormat: D }) }),
|
|
111
111
|
/* @__PURE__ */ t(
|
|
112
112
|
E,
|
|
113
113
|
{
|
|
114
114
|
label: o("date_overrides_mark_all_day_unavailable_one"),
|
|
115
|
-
checked:
|
|
115
|
+
checked: x,
|
|
116
116
|
onCheckedChange: O,
|
|
117
117
|
"data-testid": "date-override-mark-unavailable"
|
|
118
118
|
}
|
|
@@ -151,7 +151,7 @@ const J = ({
|
|
|
151
151
|
const [C, c] = h(!1);
|
|
152
152
|
return /* @__PURE__ */ i(j, { isPlatform: b, open: C, onOpenChange: c, children: [
|
|
153
153
|
/* @__PURE__ */ t(B, { asChild: !0, children: r }),
|
|
154
|
-
/* @__PURE__ */ t(R, { className: z("p-0", D), children: /* @__PURE__ */ t(
|
|
154
|
+
/* @__PURE__ */ t(R, { className: z("p-0 sm:max-w-3xl", D), children: /* @__PURE__ */ t(
|
|
155
155
|
J,
|
|
156
156
|
{
|
|
157
157
|
excludedDates: p,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"out-of-office-in-slots.d.ts","sourceRoot":"","sources":["../../../src/booker/components/out-of-office-in-slots.tsx"],"names":[],"mappings":"AAQA,KAAK,eAAe,GAChB;IACE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,GACD,IAAI,GACJ,SAAS,CAAC;AAEd,UAAU,wBAAwB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,wBAAwB,
|
|
1
|
+
{"version":3,"file":"out-of-office-in-slots.d.ts","sourceRoot":"","sources":["../../../src/booker/components/out-of-office-in-slots.tsx"],"names":[],"mappings":"AAQA,KAAK,eAAe,GAChB;IACE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,GACD,IAAI,GACJ,SAAS,CAAC;AAEd,UAAU,wBAAwB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,wBAAwB,uBAwFjE,CAAC"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as e, jsxs as n, Fragment as
|
|
2
|
-
import { useSearchParams as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { useAtomsLocale as
|
|
1
|
+
import { jsx as e, jsxs as n, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { useSearchParams as v, useRouter as _ } from "next/navigation";
|
|
3
|
+
import { Button as k } from "../../components/ui/button.js";
|
|
4
|
+
import { useAtomsLocale as $ } from "../../hooks/use-atoms-locale.js";
|
|
5
5
|
import { cn as u } from "../../lib/utils.js";
|
|
6
|
-
import { ServerTrans as
|
|
7
|
-
const
|
|
8
|
-
const { t: s } =
|
|
9
|
-
fromUser:
|
|
6
|
+
import { ServerTrans as j } from "../../vendor/server-trans.js";
|
|
7
|
+
const F = (p) => {
|
|
8
|
+
const { t: s } = $(), {
|
|
9
|
+
fromUser: a,
|
|
10
10
|
toUser: t,
|
|
11
11
|
emoji: h = "🏝️",
|
|
12
|
-
reason:
|
|
12
|
+
reason: r,
|
|
13
13
|
borderDashed: x = !0,
|
|
14
14
|
date: f,
|
|
15
15
|
className: y,
|
|
16
|
-
notes:
|
|
16
|
+
notes: i,
|
|
17
17
|
showNotePublicly: N
|
|
18
|
-
} = p, o =
|
|
19
|
-
return !
|
|
18
|
+
} = p, o = v(), b = _(), l = !a && r;
|
|
19
|
+
return !l && !a ? null : /* @__PURE__ */ e("div", { className: u("relative h-full pb-5", y), children: /* @__PURE__ */ n(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
22
|
className: u(
|
|
@@ -25,14 +25,14 @@ const C = (p) => {
|
|
|
25
25
|
),
|
|
26
26
|
children: [
|
|
27
27
|
/* @__PURE__ */ e("div", { className: "bg-emphasis flex h-14 w-14 flex-col items-center justify-center rounded-full", children: /* @__PURE__ */ e("span", { className: "m-auto text-center text-lg", children: h }) }),
|
|
28
|
-
/* @__PURE__ */ e("div", { className: "stack-y-2 max-h-[300px] w-full overflow-y-auto text-center", children:
|
|
29
|
-
/* @__PURE__ */ e("p", { className: "mt-2 text-base font-bold", children:
|
|
28
|
+
/* @__PURE__ */ e("div", { className: "stack-y-2 max-h-[300px] w-full overflow-y-auto text-center", children: l ? /* @__PURE__ */ n(m, { children: [
|
|
29
|
+
/* @__PURE__ */ e("p", { className: "mt-2 text-base font-bold", children: r }),
|
|
30
30
|
/* @__PURE__ */ e("p", { className: "text-subtle text-center text-sm", children: s("holiday_no_availability") })
|
|
31
|
-
] }) : /* @__PURE__ */ n(
|
|
32
|
-
/* @__PURE__ */ e("p", { className: "mt-2 text-base font-bold", children: s("ooo_user_is_ooo", { displayName:
|
|
33
|
-
|
|
34
|
-
(
|
|
35
|
-
|
|
31
|
+
] }) : /* @__PURE__ */ n(m, { children: [
|
|
32
|
+
/* @__PURE__ */ e("p", { className: "mt-2 text-base font-bold", children: s("ooo_user_is_ooo", { displayName: a == null ? void 0 : a.displayName }) }),
|
|
33
|
+
i && N && /* @__PURE__ */ e("p", { className: "text-subtle mt-2 max-h-[120px] overflow-y-auto break-words px-2 text-center text-sm italic", children: i }),
|
|
34
|
+
(a == null ? void 0 : a.displayName) && (t == null ? void 0 : t.displayName) && /* @__PURE__ */ e("p", { className: "text-center text-sm", children: /* @__PURE__ */ e(
|
|
35
|
+
j,
|
|
36
36
|
{
|
|
37
37
|
t: s,
|
|
38
38
|
i18nKey: "ooo_slots_returning",
|
|
@@ -41,16 +41,17 @@ const C = (p) => {
|
|
|
41
41
|
}
|
|
42
42
|
) })
|
|
43
43
|
] }) }),
|
|
44
|
-
!
|
|
45
|
-
|
|
44
|
+
!l && (t == null ? void 0 : t.id) && /* @__PURE__ */ e(
|
|
45
|
+
k,
|
|
46
46
|
{
|
|
47
|
+
"data-testid": "ooo-book-with-redirect",
|
|
47
48
|
className: "mt-8 max-w-[90%]",
|
|
48
49
|
variant: "button",
|
|
49
50
|
color: "secondary",
|
|
50
51
|
onClick: () => {
|
|
51
|
-
const c = o == null ? void 0 : o.get("month"),
|
|
52
|
+
const c = o == null ? void 0 : o.get("month"), d = o == null ? void 0 : o.get("layout"), w = (o == null ? void 0 : o.get("date")) || f, g = t.orgAwareUsername ?? t.username;
|
|
52
53
|
b.push(
|
|
53
|
-
`/${
|
|
54
|
+
`/${g}?${c ? `month=${c}&` : ""}date=${w}${d ? `&layout=${d}` : ""}`
|
|
54
55
|
);
|
|
55
56
|
},
|
|
56
57
|
children: /* @__PURE__ */ e("span", { className: "block overflow-hidden text-ellipsis whitespace-nowrap", children: s("ooo_slots_book_with", { displayName: t.displayName }) })
|
|
@@ -61,5 +62,5 @@ const C = (p) => {
|
|
|
61
62
|
) });
|
|
62
63
|
};
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
F as OutOfOfficeInSlots
|
|
65
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-code-dialog.d.ts","sourceRoot":"","sources":["../../../src/booker/components/verify-code-dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"verify-code-dialog.d.ts","sourceRoot":"","sources":["../../../src/booker/components/verify-code-dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAmBtD,eAAO,MAAM,gBAAgB,GAAI,iNAY9B;IACD,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,gCAAgC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,6BAA6B,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,gBA+FA,CAAC"}
|
|
@@ -1,62 +1,65 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Dialog as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Label as
|
|
8
|
-
import { Input as
|
|
9
|
-
import { useAtomsLocale as
|
|
10
|
-
import { useBookerStoreContext as
|
|
11
|
-
const
|
|
12
|
-
isOpenDialog:
|
|
13
|
-
setIsOpenDialog:
|
|
14
|
-
email:
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useCallback as v, useEffect as M } from "react";
|
|
3
|
+
import _ from "react-digit-input";
|
|
4
|
+
import { Button as k } from "../../components/ui/button.js";
|
|
5
|
+
import { Dialog as j, DialogContent as y, DialogHeader as F, DialogTitle as B, DialogDescription as H, DialogFooter as I, DialogClose as L } from "../../components/ui/dialog.js";
|
|
6
|
+
import { Icon as $ } from "../../components/ui/icon.js";
|
|
7
|
+
import { Label as A } from "../../components/ui/label.js";
|
|
8
|
+
import { Input as i } from "../../components/ui/text-field.js";
|
|
9
|
+
import { useAtomsLocale as z } from "../../hooks/use-atoms-locale.js";
|
|
10
|
+
import { useBookerStoreContext as G } from "../booker-store-provider.js";
|
|
11
|
+
const E = ({
|
|
12
|
+
isOpenDialog: f,
|
|
13
|
+
setIsOpenDialog: b,
|
|
14
|
+
email: c,
|
|
15
15
|
isUserSessionRequiredToVerify: u = !0,
|
|
16
16
|
verifyCodeWithSessionNotRequired: p,
|
|
17
17
|
verifyCodeWithSessionRequired: h,
|
|
18
18
|
resetErrors: m,
|
|
19
19
|
setIsPending: x,
|
|
20
20
|
isPending: d,
|
|
21
|
-
error:
|
|
22
|
-
isPlatform:
|
|
21
|
+
error: n,
|
|
22
|
+
isPlatform: J = !1
|
|
23
23
|
}) => {
|
|
24
|
-
const { t:
|
|
24
|
+
const { t: s } = z(), [t, g] = w(""), [C, V] = w(!1), N = G((r) => r.setVerificationCode), a = _({
|
|
25
25
|
acceptedCharacters: /^[0-9]$/,
|
|
26
26
|
length: 6,
|
|
27
27
|
value: t,
|
|
28
|
-
onChange: v((
|
|
29
|
-
m(),
|
|
28
|
+
onChange: v((r) => {
|
|
29
|
+
m(), g(r);
|
|
30
30
|
}, [])
|
|
31
|
-
}),
|
|
32
|
-
m(), x(!0), u ? h(t,
|
|
31
|
+
}), D = v(() => {
|
|
32
|
+
m(), x(!0), u ? h(t, c) : p(t, c), N(t), V(!0);
|
|
33
33
|
}, [
|
|
34
34
|
m,
|
|
35
35
|
x,
|
|
36
36
|
u,
|
|
37
37
|
h,
|
|
38
38
|
t,
|
|
39
|
-
|
|
39
|
+
c,
|
|
40
40
|
p,
|
|
41
|
-
|
|
41
|
+
N
|
|
42
42
|
]);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, [
|
|
43
|
+
M(() => {
|
|
44
|
+
C || n || d || !/^\d{6}$/.test(t.trim()) || D();
|
|
45
|
+
}, [n, d, t, C]), M(() => g(""), [f]);
|
|
46
46
|
const o = "h-12 w-12 text-xl! text-center";
|
|
47
47
|
return /* @__PURE__ */ e(
|
|
48
|
-
|
|
48
|
+
j,
|
|
49
49
|
{
|
|
50
|
-
open:
|
|
50
|
+
open: f,
|
|
51
51
|
onOpenChange: () => {
|
|
52
52
|
m();
|
|
53
53
|
},
|
|
54
|
-
children: /* @__PURE__ */ e(
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
children: /* @__PURE__ */ e(y, { className: "sm:max-w-md", children: /* @__PURE__ */ e("div", { className: "flex flex-row", children: /* @__PURE__ */ l("div", { className: "w-full", children: [
|
|
55
|
+
/* @__PURE__ */ l(F, { children: [
|
|
56
|
+
/* @__PURE__ */ e(B, { children: s("verify_your_email") }),
|
|
57
|
+
/* @__PURE__ */ e(H, { children: s("enter_digit_code", { email: c }) })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ e(A, { htmlFor: "code", children: s("code") }),
|
|
60
|
+
/* @__PURE__ */ l("div", { className: "flex flex-row justify-between", children: [
|
|
58
61
|
/* @__PURE__ */ e(
|
|
59
|
-
|
|
62
|
+
i,
|
|
60
63
|
{
|
|
61
64
|
className: o,
|
|
62
65
|
name: "2fa1",
|
|
@@ -66,24 +69,24 @@ const T = ({
|
|
|
66
69
|
autoComplete: "one-time-code"
|
|
67
70
|
}
|
|
68
71
|
),
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
/* @__PURE__ */ e(
|
|
71
|
-
/* @__PURE__ */ e(
|
|
72
|
-
/* @__PURE__ */ e(
|
|
73
|
-
/* @__PURE__ */ e(
|
|
72
|
+
/* @__PURE__ */ e(i, { className: o, name: "2fa2", inputMode: "decimal", ...a[1] }),
|
|
73
|
+
/* @__PURE__ */ e(i, { className: o, name: "2fa3", inputMode: "decimal", ...a[2] }),
|
|
74
|
+
/* @__PURE__ */ e(i, { className: o, name: "2fa4", inputMode: "decimal", ...a[3] }),
|
|
75
|
+
/* @__PURE__ */ e(i, { className: o, name: "2fa5", inputMode: "decimal", ...a[4] }),
|
|
76
|
+
/* @__PURE__ */ e(i, { className: o, name: "2fa6", inputMode: "decimal", ...a[5] })
|
|
74
77
|
] }),
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
77
|
-
/* @__PURE__ */ e("p", { children:
|
|
78
|
+
n && /* @__PURE__ */ l("div", { className: "mt-2 flex items-center gap-x-2 text-sm text-red-700", children: [
|
|
79
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e($, { name: "info", className: "h-3 w-3" }) }),
|
|
80
|
+
/* @__PURE__ */ e("p", { children: n })
|
|
78
81
|
] }),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */ e(
|
|
81
|
-
/* @__PURE__ */ e(
|
|
82
|
+
/* @__PURE__ */ l(I, { children: [
|
|
83
|
+
/* @__PURE__ */ e(L, { onClick: () => b(!1) }),
|
|
84
|
+
/* @__PURE__ */ e(k, { type: "submit", onClick: D, loading: d, children: s("submit") })
|
|
82
85
|
] })
|
|
83
86
|
] }) }) })
|
|
84
87
|
}
|
|
85
88
|
);
|
|
86
89
|
};
|
|
87
90
|
export {
|
|
88
|
-
|
|
91
|
+
E as VerifyCodeDialog
|
|
89
92
|
};
|
|
@@ -17,7 +17,7 @@ type ButtonBaseProps = {
|
|
|
17
17
|
StartIcon?: IconName;
|
|
18
18
|
EndIcon?: IconName;
|
|
19
19
|
shallow?: boolean;
|
|
20
|
-
tooltip?:
|
|
20
|
+
tooltip?: ReactNode;
|
|
21
21
|
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
22
22
|
tooltipOffset?: number;
|
|
23
23
|
tooltipClassName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,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
|
-
import
|
|
4
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as r, Fragment as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cva as I } from "class-variance-authority";
|
|
3
|
+
import S from "next/link";
|
|
4
|
+
import { forwardRef as V } from "react";
|
|
5
5
|
import { cn as n } from "../../lib/utils.js";
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
const
|
|
6
|
+
import { Icon as a } from "./icon.js";
|
|
7
|
+
import { Tooltip as E } from "./tooltip.js";
|
|
8
|
+
const L = I(
|
|
9
9
|
"group whitespace-nowrap inline-flex items-center text-sm font-medium relative rounded-[10px] transition cursor-pointer disabled:cursor-not-allowed gap-1",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
@@ -152,33 +152,35 @@ const W = B(
|
|
|
152
152
|
size: "base"
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
),
|
|
155
|
+
), O = V(
|
|
156
156
|
function(o, w) {
|
|
157
157
|
const {
|
|
158
158
|
loading: i = !1,
|
|
159
|
-
color:
|
|
159
|
+
color: c = "primary",
|
|
160
160
|
size: g,
|
|
161
161
|
variant: t = "button",
|
|
162
162
|
type: y = "button",
|
|
163
|
+
tooltip: b,
|
|
163
164
|
tooltipSide: N = "top",
|
|
164
165
|
tooltipOffset: k = 4,
|
|
165
166
|
tooltipClassName: C,
|
|
166
|
-
StartIcon:
|
|
167
|
+
StartIcon: d,
|
|
167
168
|
CustomStartIcon: z,
|
|
168
|
-
EndIcon:
|
|
169
|
+
EndIcon: l,
|
|
169
170
|
shallow: u,
|
|
171
|
+
flex: A,
|
|
170
172
|
...m
|
|
171
|
-
} = o, h = o.disabled || i || !1, j = typeof o.href < "u", p = n(
|
|
172
|
-
|
|
173
|
-
} : o.onClick, f = /* @__PURE__ */
|
|
174
|
-
z ||
|
|
175
|
-
/* @__PURE__ */ e(
|
|
176
|
-
/* @__PURE__ */ e(
|
|
173
|
+
} = o, h = o.disabled || i || !1, j = typeof o.href < "u", p = n(L({ color: c, size: g, loading: i, variant: t }), o.className), v = h ? (B) => {
|
|
174
|
+
B.preventDefault();
|
|
175
|
+
} : o.onClick, f = /* @__PURE__ */ r(s, { children: [
|
|
176
|
+
z || d && /* @__PURE__ */ e(s, { children: t === "fab" ? /* @__PURE__ */ r(s, { children: [
|
|
177
|
+
/* @__PURE__ */ e(a, { name: d, className: "hidden h-4 w-4 shrink-0 stroke-[1.5px] md:inline-flex" }),
|
|
178
|
+
/* @__PURE__ */ e(a, { name: "plus", "data-testid": "plus", className: "inline h-6 w-6 shrink-0 md:hidden" })
|
|
177
179
|
] }) : /* @__PURE__ */ e(
|
|
178
|
-
|
|
180
|
+
a,
|
|
179
181
|
{
|
|
180
182
|
"data-name": "start-icon",
|
|
181
|
-
name:
|
|
183
|
+
name: d,
|
|
182
184
|
className: n(
|
|
183
185
|
"shrink-0",
|
|
184
186
|
i ? "invisible" : "visible",
|
|
@@ -200,12 +202,12 @@ const W = B(
|
|
|
200
202
|
children: o.children
|
|
201
203
|
}
|
|
202
204
|
),
|
|
203
|
-
i && /* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: /* @__PURE__ */
|
|
205
|
+
i && /* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: /* @__PURE__ */ r(
|
|
204
206
|
"svg",
|
|
205
207
|
{
|
|
206
208
|
className: n(
|
|
207
209
|
"mx-4 h-5 w-5 animate-spin",
|
|
208
|
-
|
|
210
|
+
c === "primary" ? "text-inverted" : "text-emphasis"
|
|
209
211
|
),
|
|
210
212
|
xmlns: "http://www.w3.org/2000/svg",
|
|
211
213
|
fill: "none",
|
|
@@ -223,13 +225,13 @@ const W = B(
|
|
|
223
225
|
]
|
|
224
226
|
}
|
|
225
227
|
) }),
|
|
226
|
-
|
|
227
|
-
/* @__PURE__ */ e(
|
|
228
|
-
/* @__PURE__ */ e(
|
|
228
|
+
l && /* @__PURE__ */ e(s, { children: t === "fab" ? /* @__PURE__ */ r(s, { children: [
|
|
229
|
+
/* @__PURE__ */ e(a, { name: l, className: "hidden h-4 w-4 shrink-0 stroke-[1.5px] md:inline-flex" }),
|
|
230
|
+
/* @__PURE__ */ e(a, { name: "plus", "data-testid": "plus", className: "inline h-6 w-6 shrink-0 md:hidden" })
|
|
229
231
|
] }) : /* @__PURE__ */ e(
|
|
230
|
-
|
|
232
|
+
a,
|
|
231
233
|
{
|
|
232
|
-
name:
|
|
234
|
+
name: l,
|
|
233
235
|
className: n(
|
|
234
236
|
"shrink-0",
|
|
235
237
|
i ? "invisible" : "visible",
|
|
@@ -240,41 +242,44 @@ const W = B(
|
|
|
240
242
|
}
|
|
241
243
|
) })
|
|
242
244
|
] });
|
|
243
|
-
|
|
244
|
-
|
|
245
|
+
if (j)
|
|
246
|
+
return /* @__PURE__ */ e(
|
|
247
|
+
S,
|
|
248
|
+
{
|
|
249
|
+
...m,
|
|
250
|
+
shallow: u && u,
|
|
251
|
+
className: p,
|
|
252
|
+
onClick: v,
|
|
253
|
+
children: f
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
const x = /* @__PURE__ */ e(
|
|
257
|
+
"button",
|
|
245
258
|
{
|
|
246
259
|
...m,
|
|
247
|
-
|
|
260
|
+
ref: w,
|
|
261
|
+
disabled: h,
|
|
262
|
+
type: y,
|
|
248
263
|
className: p,
|
|
249
264
|
onClick: v,
|
|
250
265
|
children: f
|
|
251
266
|
}
|
|
252
|
-
)
|
|
253
|
-
|
|
267
|
+
);
|
|
268
|
+
return b ? /* @__PURE__ */ e(
|
|
269
|
+
E,
|
|
254
270
|
{
|
|
255
271
|
"data-testid": "tooltip",
|
|
256
272
|
className: C,
|
|
257
|
-
content:
|
|
273
|
+
content: b,
|
|
258
274
|
side: N,
|
|
259
275
|
sideOffset: k,
|
|
260
|
-
children:
|
|
261
|
-
}
|
|
262
|
-
) : /* @__PURE__ */ e(a, { children: r }), { tooltip: o.tooltip, children: /* @__PURE__ */ e(
|
|
263
|
-
"button",
|
|
264
|
-
{
|
|
265
|
-
...m,
|
|
266
|
-
ref: w,
|
|
267
|
-
disabled: h,
|
|
268
|
-
type: y,
|
|
269
|
-
className: p,
|
|
270
|
-
onClick: v,
|
|
271
|
-
children: f
|
|
276
|
+
children: x
|
|
272
277
|
}
|
|
273
|
-
)
|
|
278
|
+
) : x;
|
|
274
279
|
}
|
|
275
280
|
);
|
|
276
|
-
|
|
281
|
+
O.displayName = "Button";
|
|
277
282
|
export {
|
|
278
|
-
|
|
279
|
-
|
|
283
|
+
O as Button,
|
|
284
|
+
L as buttonClasses
|
|
280
285
|
};
|
|
@@ -4,7 +4,7 @@ import { useAtomsLocale as N } from "../../hooks/use-atoms-locale.js";
|
|
|
4
4
|
import { DialogContent as v, DialogClose as d } from "./dialog.js";
|
|
5
5
|
import { AlertCircleIcon as x, CheckIcon as w } from "./icons.js";
|
|
6
6
|
function B(i) {
|
|
7
|
-
return /* @__PURE__ */ e(v, {
|
|
7
|
+
return /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(b, { ...i }) });
|
|
8
8
|
}
|
|
9
9
|
const b = (i) => {
|
|
10
10
|
const { t: r } = N(), {
|