@calcom/atoms 2.10.1 → 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.
@@ -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(), [y, O] = h(
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)] : []), N = (e) => {
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
- }, x = (p || []).reduce((e, s) => (a[0] && s.days.includes(a[0].day()) && e.push({
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
- x.length || x.push({
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 w = k({
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
- })) : x
56
+ })) : y
57
57
  }
58
58
  });
59
59
  return /* @__PURE__ */ i(
60
60
  P,
61
61
  {
62
- form: w,
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
- y ? (a.map((m) => {
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 && N(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: y ? /* @__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 }) }),
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: y,
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,6 +1,7 @@
1
1
  type OutOfOfficeUser = {
2
2
  id?: number | null;
3
3
  username?: string | null;
4
+ orgAwareUsername?: string | null;
4
5
  displayName?: string | null;
5
6
  } | null | undefined;
6
7
  interface IOutOfOfficeInSlotsProps {
@@ -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,uBAsFjE,CAAC"}
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 d } from "react/jsx-runtime";
2
- import { useSearchParams as w, useRouter as g } from "next/navigation";
3
- import { Button as _ } from "../../components/ui/button.js";
4
- import { useAtomsLocale as k } from "../../hooks/use-atoms-locale.js";
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 $ } from "../../vendor/server-trans.js";
7
- const C = (p) => {
8
- const { t: s } = k(), {
9
- fromUser: l,
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: i,
12
+ reason: r,
13
13
  borderDashed: x = !0,
14
14
  date: f,
15
15
  className: y,
16
- notes: r,
16
+ notes: i,
17
17
  showNotePublicly: N
18
- } = p, o = w(), b = g(), a = !l && i;
19
- return !a && !l ? null : /* @__PURE__ */ e("div", { className: u("relative h-full pb-5", y), children: /* @__PURE__ */ n(
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: a ? /* @__PURE__ */ n(d, { children: [
29
- /* @__PURE__ */ e("p", { className: "mt-2 text-base font-bold", children: i }),
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(d, { children: [
32
- /* @__PURE__ */ e("p", { className: "mt-2 text-base font-bold", children: s("ooo_user_is_ooo", { displayName: l == null ? void 0 : l.displayName }) }),
33
- r && 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: r }),
34
- (l == null ? void 0 : l.displayName) && (t == null ? void 0 : t.displayName) && /* @__PURE__ */ e("p", { className: "text-center text-sm", children: /* @__PURE__ */ e(
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
- !a && (t == null ? void 0 : t.id) && /* @__PURE__ */ e(
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"), m = o == null ? void 0 : o.get("layout"), v = (o == null ? void 0 : o.get("date")) || f;
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
- `/${t.username}?${c ? `month=${c}&` : ""}date=${v}${m ? `&layout=${m}` : ""}`
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
- C as OutOfOfficeInSlots
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,K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S,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 s } from "react/jsx-runtime";
2
- import { useState as b, useCallback as v, useEffect as D } from "react";
3
- import V from "react-digit-input";
4
- import { Button as _ } from "../../components/ui/button.js";
5
- import { Dialog as y, DialogContent as j, DialogHeader as F, DialogFooter as B, DialogClose as H } from "../../components/ui/dialog.js";
6
- import { Icon as I } from "../../components/ui/icon.js";
7
- import { Label as L } from "../../components/ui/label.js";
8
- import { Input as l } from "../../components/ui/text-field.js";
9
- import { useAtomsLocale as $ } from "../../hooks/use-atoms-locale.js";
10
- import { useBookerStoreContext as A } from "../booker-store-provider.js";
11
- const T = ({
12
- isOpenDialog: r,
13
- setIsOpenDialog: M,
14
- email: i,
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: c,
22
- isPlatform: z = !1
21
+ error: n,
22
+ isPlatform: J = !1
23
23
  }) => {
24
- const { t: n } = $(), [t, C] = b(""), [N, k] = b(!1), g = A((f) => f.setVerificationCode), a = V({
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((f) => {
29
- m(), C(f);
28
+ onChange: v((r) => {
29
+ m(), g(r);
30
30
  }, [])
31
- }), w = v(() => {
32
- m(), x(!0), u ? h(t, i) : p(t, i), g(t), k(!0);
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
- i,
39
+ c,
40
40
  p,
41
- g
41
+ N
42
42
  ]);
43
- D(() => {
44
- N || c || d || !/^\d{6}$/.test(t.trim()) || w();
45
- }, [c, d, t, N]), D(() => C(""), [r]);
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
- y,
48
+ j,
49
49
  {
50
- open: r,
50
+ open: f,
51
51
  onOpenChange: () => {
52
52
  m();
53
53
  },
54
- children: /* @__PURE__ */ e(j, { className: "sm:max-w-md", children: /* @__PURE__ */ e("div", { className: "flex flex-row", children: /* @__PURE__ */ s("div", { className: "w-full", children: [
55
- /* @__PURE__ */ e(F, { title: n("verify_your_email"), subtitle: n("enter_digit_code", { email: i }) }),
56
- /* @__PURE__ */ e(L, { htmlFor: "code", children: n("code") }),
57
- /* @__PURE__ */ s("div", { className: "flex flex-row justify-between", children: [
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
- l,
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(l, { className: o, name: "2fa2", inputMode: "decimal", ...a[1] }),
70
- /* @__PURE__ */ e(l, { className: o, name: "2fa3", inputMode: "decimal", ...a[2] }),
71
- /* @__PURE__ */ e(l, { className: o, name: "2fa4", inputMode: "decimal", ...a[3] }),
72
- /* @__PURE__ */ e(l, { className: o, name: "2fa5", inputMode: "decimal", ...a[4] }),
73
- /* @__PURE__ */ e(l, { className: o, name: "2fa6", inputMode: "decimal", ...a[5] })
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
- c && /* @__PURE__ */ s("div", { className: "mt-2 flex items-center gap-x-2 text-sm text-red-700", children: [
76
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(I, { name: "info", className: "h-3 w-3" }) }),
77
- /* @__PURE__ */ e("p", { children: c })
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__ */ s(B, { noSticky: !0, children: [
80
- /* @__PURE__ */ e(H, { onClick: () => M(!1) }),
81
- /* @__PURE__ */ e(_, { type: "submit", onClick: w, loading: d, children: n("submit") })
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
- T as VerifyCodeDialog
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?: string | ReactNode;
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,EAAE,oBAAoB,EAAE,UAAU,EAAE,SAAS,EAAO,MAAM,OAAO,CAAC;AAGpG,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAG7C,QAAA,MAAM,aAAa;;;;;mFAuJlB,CAAC;AAEF,KAAK,oBAAoB,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAE/D,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;AACrE,MAAM,MAAM,aAAa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Ae,GACtC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,GAC3E,SAAS,CAAC;AAEZ,KAAK,mBAAmB,GAAG,eAAe,GACxC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,GAAG;IACnE,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,CAAC;AAEJ,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;AAElE,eAAO,MAAM,MAAM,+HA8JlB,CAAC;AAIF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { jsxs as r, Fragment as s, jsx as e } from "react/jsx-runtime";
2
- import { cva as B } from "class-variance-authority";
3
- import I from "next/link";
4
- import { forwardRef as S } from "react";
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
6
  import { Icon as a } from "./icon.js";
7
- import { Tooltip as V } from "./tooltip.js";
8
- const E = B(
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,26 +152,28 @@ const E = B(
152
152
  size: "base"
153
153
  }
154
154
  }
155
- ), L = S(
156
- function(t, x) {
155
+ ), O = V(
156
+ function(o, w) {
157
157
  const {
158
158
  loading: i = !1,
159
159
  color: c = "primary",
160
- size: w,
161
- variant: o = "button",
162
- type: g = "button",
163
- tooltipSide: y = "top",
164
- tooltipOffset: N = 4,
165
- tooltipClassName: k,
160
+ size: g,
161
+ variant: t = "button",
162
+ type: y = "button",
163
+ tooltip: b,
164
+ tooltipSide: N = "top",
165
+ tooltipOffset: k = 4,
166
+ tooltipClassName: C,
166
167
  StartIcon: d,
167
- CustomStartIcon: C,
168
+ CustomStartIcon: z,
168
169
  EndIcon: l,
169
- shallow: b,
170
- ...u
171
- } = t, m = t.disabled || i || !1, z = typeof t.href < "u", h = n(E({ color: c, size: w, loading: i, variant: o }), t.className), v = m ? (j) => {
172
- j.preventDefault();
173
- } : t.onClick, p = /* @__PURE__ */ r(s, { children: [
174
- C || d && /* @__PURE__ */ e(s, { children: o === "fab" ? /* @__PURE__ */ r(s, { children: [
170
+ shallow: u,
171
+ flex: A,
172
+ ...m
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: [
175
177
  /* @__PURE__ */ e(a, { name: d, className: "hidden h-4 w-4 shrink-0 stroke-[1.5px] md:inline-flex" }),
176
178
  /* @__PURE__ */ e(a, { name: "plus", "data-testid": "plus", className: "inline h-6 w-6 shrink-0 md:hidden" })
177
179
  ] }) : /* @__PURE__ */ e(
@@ -183,8 +185,8 @@ const E = B(
183
185
  "shrink-0",
184
186
  i ? "invisible" : "visible",
185
187
  "button-icon group-[:not(div):active]:translate-y-[0.5px]",
186
- o === "icon" && "h-4 w-4",
187
- o === "button" && "h-4 w-4 stroke-[1.5px] "
188
+ t === "icon" && "h-4 w-4",
189
+ t === "button" && "h-4 w-4 stroke-[1.5px] "
188
190
  )
189
191
  }
190
192
  ) }),
@@ -194,10 +196,10 @@ const E = B(
194
196
  className: n(
195
197
  "contents",
196
198
  i ? "invisible" : "visible",
197
- o === "fab" ? "hidden md:contents" : "",
199
+ t === "fab" ? "hidden md:contents" : "",
198
200
  "group-[:not(div):active]:translate-y-[0.5px]"
199
201
  ),
200
- children: t.children
202
+ children: o.children
201
203
  }
202
204
  ),
203
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(
@@ -223,7 +225,7 @@ const E = B(
223
225
  ]
224
226
  }
225
227
  ) }),
226
- l && /* @__PURE__ */ e(s, { children: o === "fab" ? /* @__PURE__ */ r(s, { children: [
228
+ l && /* @__PURE__ */ e(s, { children: t === "fab" ? /* @__PURE__ */ r(s, { children: [
227
229
  /* @__PURE__ */ e(a, { name: l, className: "hidden h-4 w-4 shrink-0 stroke-[1.5px] md:inline-flex" }),
228
230
  /* @__PURE__ */ e(a, { name: "plus", "data-testid": "plus", className: "inline h-6 w-6 shrink-0 md:hidden" })
229
231
  ] }) : /* @__PURE__ */ e(
@@ -234,50 +236,50 @@ const E = B(
234
236
  "shrink-0",
235
237
  i ? "invisible" : "visible",
236
238
  "group-[:not(div):active]:translate-y-[0.5px]",
237
- o === "icon" && "h-4 w-4",
238
- o === "button" && "h-4 w-4 stroke-[1.5px] "
239
+ t === "icon" && "h-4 w-4",
240
+ t === "button" && "h-4 w-4 stroke-[1.5px] "
239
241
  )
240
242
  }
241
243
  ) })
242
244
  ] });
243
- if (z)
245
+ if (j)
244
246
  return /* @__PURE__ */ e(
245
- I,
247
+ S,
246
248
  {
247
- ...u,
248
- shallow: b && b,
249
- className: h,
249
+ ...m,
250
+ shallow: u && u,
251
+ className: p,
250
252
  onClick: v,
251
- children: p
253
+ children: f
252
254
  }
253
255
  );
254
- const f = /* @__PURE__ */ e(
256
+ const x = /* @__PURE__ */ e(
255
257
  "button",
256
258
  {
257
- ...u,
258
- ref: x,
259
- disabled: m,
260
- type: g,
261
- className: h,
259
+ ...m,
260
+ ref: w,
261
+ disabled: h,
262
+ type: y,
263
+ className: p,
262
264
  onClick: v,
263
- children: p
265
+ children: f
264
266
  }
265
267
  );
266
- return t.tooltip ? /* @__PURE__ */ e(
267
- V,
268
+ return b ? /* @__PURE__ */ e(
269
+ E,
268
270
  {
269
271
  "data-testid": "tooltip",
270
- className: k,
271
- content: t.tooltip,
272
- side: y,
273
- sideOffset: N,
274
- children: f
272
+ className: C,
273
+ content: b,
274
+ side: N,
275
+ sideOffset: k,
276
+ children: x
275
277
  }
276
- ) : f;
278
+ ) : x;
277
279
  }
278
280
  );
279
- L.displayName = "Button";
281
+ O.displayName = "Button";
280
282
  export {
281
- L as Button,
282
- E as buttonClasses
283
+ O as Button,
284
+ L as buttonClasses
283
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, { type: "creation", children: /* @__PURE__ */ e(b, { ...i }) });
7
+ return /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(b, { ...i }) });
8
8
  }
9
9
  const b = (i) => {
10
10
  const { t: r } = N(), {