@yimingliao/cms 0.0.130 → 0.0.131

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.
Files changed (71) hide show
  1. package/dist/export/client/index.js +2 -1
  2. package/dist/src/client/infrastructure/contexts/admin.js +5 -4
  3. package/dist/src/client/infrastructure/contexts/theme.js +5 -5
  4. package/dist/src/client/infrastructure/toast/error-display.js +15 -3
  5. package/dist/src/client/interfaces/components/shadcn/avatar.js +5 -4
  6. package/dist/src/client/interfaces/components/shadcn/button.js +3 -2
  7. package/dist/src/client/interfaces/components/shadcn/card.js +9 -8
  8. package/dist/src/client/interfaces/components/shadcn/collapsible.js +4 -3
  9. package/dist/src/client/interfaces/components/shadcn/dropdown-menu.js +36 -29
  10. package/dist/src/client/interfaces/components/shadcn/input-group.js +8 -7
  11. package/dist/src/client/interfaces/components/shadcn/input.js +3 -2
  12. package/dist/src/client/interfaces/components/shadcn/label.js +3 -2
  13. package/dist/src/client/interfaces/components/shadcn/pagination.js +21 -18
  14. package/dist/src/client/interfaces/components/shadcn/select.js +47 -40
  15. package/dist/src/client/interfaces/components/shadcn/separator.js +3 -2
  16. package/dist/src/client/interfaces/components/shadcn/sheet.js +36 -27
  17. package/dist/src/client/interfaces/components/shadcn/sidebar.js +120 -105
  18. package/dist/src/client/interfaces/components/shadcn/skeleton.js +2 -1
  19. package/dist/src/client/interfaces/components/shadcn/spinner.js +2 -1
  20. package/dist/src/client/interfaces/components/shadcn/textarea.js +3 -2
  21. package/dist/src/client/interfaces/components/shadcn/tooltip.js +13 -10
  22. package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/list-cards-container.js +35 -23
  23. package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/page-size-selector.js +20 -14
  24. package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/pagination.js +35 -26
  25. package/dist/src/client/interfaces/components/ui/blocks/page-header/page-header-title.js +10 -1
  26. package/dist/src/client/interfaces/components/ui/blocks/page-header/page-header.js +21 -15
  27. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/batch-create.js +2 -1
  28. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/batch.js +19 -14
  29. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/create.js +2 -1
  30. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/edit.js +2 -1
  31. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/index.js +34 -29
  32. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/show.js +43 -37
  33. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/trash.js +24 -18
  34. package/dist/src/client/interfaces/components/ui/buttons/button.js +8 -4
  35. package/dist/src/client/interfaces/components/ui/buttons/return-button.js +5 -4
  36. package/dist/src/client/interfaces/components/ui/features/expandable-list/expand-bar.js +9 -6
  37. package/dist/src/client/interfaces/components/ui/features/expandable-list/expandable-list-content.js +14 -8
  38. package/dist/src/client/interfaces/components/ui/features/expandable-list/expandable-list.js +22 -17
  39. package/dist/src/client/interfaces/components/ui/form/containers/fields-container.js +5 -4
  40. package/dist/src/client/interfaces/components/ui/form/containers/main-fields.js +5 -4
  41. package/dist/src/client/interfaces/components/ui/form/containers/side-fields.js +5 -4
  42. package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields-display.js +80 -57
  43. package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields-input.js +114 -91
  44. package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields.js +4 -3
  45. package/dist/src/client/interfaces/components/ui/form/field-body.js +31 -28
  46. package/dist/src/client/interfaces/components/ui/form/field.js +12 -1
  47. package/dist/src/client/interfaces/components/ui/form/form.js +2 -1
  48. package/dist/src/client/interfaces/components/ui/form/index-field.js +49 -42
  49. package/dist/src/client/interfaces/components/ui/form/slug-field.js +45 -38
  50. package/dist/src/client/interfaces/components/ui/inputs/array-input.js +63 -52
  51. package/dist/src/client/interfaces/components/ui/inputs/checkbox.js +41 -38
  52. package/dist/src/client/interfaces/components/ui/inputs/input.js +20 -17
  53. package/dist/src/client/interfaces/components/ui/inputs/password-input.js +6 -5
  54. package/dist/src/client/interfaces/components/ui/inputs/search-input.js +6 -5
  55. package/dist/src/client/interfaces/components/ui/inputs/select.js +19 -13
  56. package/dist/src/client/interfaces/components/ui/inputs/textarea.js +3 -2
  57. package/dist/src/client/interfaces/components/ui/layouts/content-container.js +5 -4
  58. package/dist/src/client/interfaces/components/ui/layouts/layout-skeleton.js +20 -7
  59. package/dist/src/client/interfaces/components/ui/layouts/navbar/i18n-selector.js +8 -1
  60. package/dist/src/client/interfaces/components/ui/layouts/navbar/nav-user.js +60 -34
  61. package/dist/src/client/interfaces/components/ui/layouts/navbar/navbar.js +39 -26
  62. package/dist/src/client/interfaces/components/ui/layouts/navbar/sign-out-button.js +6 -2
  63. package/dist/src/client/interfaces/components/ui/layouts/navbar/theme-selector.js +22 -1
  64. package/dist/src/client/interfaces/components/ui/layouts/sidebar/nav-main.js +43 -27
  65. package/dist/src/client/interfaces/pages/auth/change-password.js +81 -70
  66. package/dist/src/client/interfaces/pages/auth/email-unverified.js +39 -21
  67. package/dist/src/client/interfaces/pages/auth/forgot-password.js +41 -26
  68. package/dist/src/client/interfaces/pages/auth/reset-password.js +60 -51
  69. package/dist/src/client/interfaces/pages/auth/sign-in.js +46 -37
  70. package/dist/src/client/interfaces/pages/auth/verify-email.js +2 -1
  71. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import { useTranslator } from 'intor/react';
2
3
  import { Mail } from 'lucide-react';
3
4
  import { useRouter } from 'next/navigation';
@@ -52,31 +53,48 @@ function createEmailUnverifiedPage({
52
53
  () => emailUnverifiedAction({ formData: { email: admin?.email ?? "" } }),
53
54
  { onSuccess: () => startCountdown() }
54
55
  );
55
- const buttonText = !isCounting ? t("auth.email-unverified.button.send-email.text") : /* @__PURE__ */ React.createElement("span", null, t("auth.email-unverified.button.please-wait.text"), /* @__PURE__ */ React.createElement("span", { className: "ml-1 inline-block w-5 text-end" }, timeLeft), "\xA0", t("auth.email-unverified.button.second.text"), "\xA0", t("auth.email-unverified.button.send-again.text"));
56
- return /* @__PURE__ */ React.createElement(
56
+ const buttonText = !isCounting ? t("auth.email-unverified.button.send-email.text") : /* @__PURE__ */ jsxs("span", { children: [
57
+ t("auth.email-unverified.button.please-wait.text"),
58
+ /* @__PURE__ */ jsx("span", { className: "ml-1 inline-block w-5 text-end", children: timeLeft }),
59
+ "\xA0",
60
+ t("auth.email-unverified.button.second.text"),
61
+ "\xA0",
62
+ t("auth.email-unverified.button.send-again.text")
63
+ ] });
64
+ return /* @__PURE__ */ jsx(
57
65
  Form,
58
66
  {
59
67
  className: "mx-auto w-96",
60
68
  style: { marginTop: "56px" },
61
- onSubmit: () => void execute()
62
- },
63
- /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(CardHeader, null, /* @__PURE__ */ React.createElement(CardTitle, { className: "mx-auto" }, t("auth.email-unverified.text"))), /* @__PURE__ */ React.createElement(CardContent, { className: "relative flex flex-col gap-6" }, /* @__PURE__ */ React.createElement(InputGroup, null, /* @__PURE__ */ React.createElement(InputGroupAddon, null, /* @__PURE__ */ React.createElement(Label, { htmlFor: "email", className: "text-foreground" }, /* @__PURE__ */ React.createElement(Mail, { className: "size-4" }))), isLoading ? /* @__PURE__ */ React.createElement("div", { className: "px-2" }, /* @__PURE__ */ React.createElement(Spinner, null)) : /* @__PURE__ */ React.createElement(
64
- InputGroupInput,
65
- {
66
- id: "email",
67
- placeholder: "shadcn@vercel.com",
68
- disabled: true,
69
- value: admin?.email
70
- }
71
- )), /* @__PURE__ */ React.createElement(CardDescription, null, /* @__PURE__ */ React.createElement("p", { className: "text-sm whitespace-pre-line" }, t("auth.email-unverified.notice.text"))), /* @__PURE__ */ React.createElement(
72
- Button,
73
- {
74
- type: "submit",
75
- isLoading: isLoading || isPending,
76
- isDisabled: isCounting
77
- },
78
- buttonText
79
- )))
69
+ onSubmit: () => void execute(),
70
+ children: /* @__PURE__ */ jsxs(Card, { children: [
71
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "mx-auto", children: t("auth.email-unverified.text") }) }),
72
+ /* @__PURE__ */ jsxs(CardContent, { className: "relative flex flex-col gap-6", children: [
73
+ /* @__PURE__ */ jsxs(InputGroup, { children: [
74
+ /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Label, { htmlFor: "email", className: "text-foreground", children: /* @__PURE__ */ jsx(Mail, { className: "size-4" }) }) }),
75
+ isLoading ? /* @__PURE__ */ jsx("div", { className: "px-2", children: /* @__PURE__ */ jsx(Spinner, {}) }) : /* @__PURE__ */ jsx(
76
+ InputGroupInput,
77
+ {
78
+ id: "email",
79
+ placeholder: "shadcn@vercel.com",
80
+ disabled: true,
81
+ value: admin?.email
82
+ }
83
+ )
84
+ ] }),
85
+ /* @__PURE__ */ jsx(CardDescription, { children: /* @__PURE__ */ jsx("p", { className: "text-sm whitespace-pre-line", children: t("auth.email-unverified.notice.text") }) }),
86
+ /* @__PURE__ */ jsx(
87
+ Button,
88
+ {
89
+ type: "submit",
90
+ isLoading: isLoading || isPending,
91
+ isDisabled: isCounting,
92
+ children: buttonText
93
+ }
94
+ )
95
+ ] })
96
+ ] })
97
+ }
80
98
  );
81
99
  };
82
100
  }
@@ -1,3 +1,4 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import { useTranslator } from 'intor/react';
2
3
  import Link from 'next/link';
3
4
  import { useState } from 'react';
@@ -46,36 +47,50 @@ function createForgotPasswordPage({
46
47
  () => forgotPasswordAction({ formData: { email: formData.email } }),
47
48
  { onSuccess: () => startCountdown() }
48
49
  );
49
- const buttonText = !isCounting ? t("auth.forgot-password.button.send-email.text") : /* @__PURE__ */ React.createElement("span", null, t("auth.forgot-password.button.please-wait.text"), /* @__PURE__ */ React.createElement("span", { className: "ml-1 inline-block w-5 text-end" }, timeLeft), "\xA0", t("auth.forgot-password.button.second.text"), "\xA0", t("auth.forgot-password.button.send-again.text"));
50
- return /* @__PURE__ */ React.createElement(
50
+ const buttonText = !isCounting ? t("auth.forgot-password.button.send-email.text") : /* @__PURE__ */ jsxs("span", { children: [
51
+ t("auth.forgot-password.button.please-wait.text"),
52
+ /* @__PURE__ */ jsx("span", { className: "ml-1 inline-block w-5 text-end", children: timeLeft }),
53
+ "\xA0",
54
+ t("auth.forgot-password.button.second.text"),
55
+ "\xA0",
56
+ t("auth.forgot-password.button.send-again.text")
57
+ ] });
58
+ return /* @__PURE__ */ jsx(
51
59
  Form,
52
60
  {
53
61
  className: "mx-auto w-96",
54
62
  style: { marginTop: "56px" },
55
- onSubmit: () => void execute()
56
- },
57
- /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(CardHeader, null, /* @__PURE__ */ React.createElement(CardTitle, { className: "mx-auto" }, t("auth.forgot-password.text"))), /* @__PURE__ */ React.createElement(CardContent, { className: "relative flex flex-col gap-6" }, /* @__PURE__ */ React.createElement(Field, { htmlFor: "email", label: t("auth.forgot-password.email.text") }, /* @__PURE__ */ React.createElement(
58
- Input,
59
- {
60
- id: "email",
61
- placeholder: t("auth.forgot-password.email.placeholder.text"),
62
- autoComplete: "email",
63
- fieldName: "email",
64
- value: formData.email,
65
- setFormData,
66
- isDisabled: isPending || isCounting,
67
- isError: errors.includes("email")
68
- }
69
- )), /* @__PURE__ */ React.createElement(
70
- Button,
71
- {
72
- size: "xs",
73
- variant: "link",
74
- className: "w-fit",
75
- isDisabled: isPending
76
- },
77
- /* @__PURE__ */ React.createElement(Link, { href: PATHS.auth.signIn.path }, t("auth.forgot-password.anchor.text"))
78
- ), /* @__PURE__ */ React.createElement(Button, { type: "submit", isLoading: isPending, isDisabled: isCounting }, buttonText)))
63
+ onSubmit: () => void execute(),
64
+ children: /* @__PURE__ */ jsxs(Card, { children: [
65
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "mx-auto", children: t("auth.forgot-password.text") }) }),
66
+ /* @__PURE__ */ jsxs(CardContent, { className: "relative flex flex-col gap-6", children: [
67
+ /* @__PURE__ */ jsx(Field, { htmlFor: "email", label: t("auth.forgot-password.email.text"), children: /* @__PURE__ */ jsx(
68
+ Input,
69
+ {
70
+ id: "email",
71
+ placeholder: t("auth.forgot-password.email.placeholder.text"),
72
+ autoComplete: "email",
73
+ fieldName: "email",
74
+ value: formData.email,
75
+ setFormData,
76
+ isDisabled: isPending || isCounting,
77
+ isError: errors.includes("email")
78
+ }
79
+ ) }),
80
+ /* @__PURE__ */ jsx(
81
+ Button,
82
+ {
83
+ size: "xs",
84
+ variant: "link",
85
+ className: "w-fit",
86
+ isDisabled: isPending,
87
+ children: /* @__PURE__ */ jsx(Link, { href: PATHS.auth.signIn.path, children: t("auth.forgot-password.anchor.text") })
88
+ }
89
+ ),
90
+ /* @__PURE__ */ jsx(Button, { type: "submit", isLoading: isPending, isDisabled: isCounting, children: buttonText })
91
+ ] })
92
+ ] })
93
+ }
79
94
  );
80
95
  };
81
96
  }
@@ -1,3 +1,4 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import { useTranslator } from 'intor/react';
2
3
  import Link from 'next/link';
3
4
  import { useRouter, useSearchParams } from 'next/navigation';
@@ -47,63 +48,71 @@ function createResetPasswordPage({
47
48
  () => resetPasswordAction({ formData: { passwordResetToken, ...formData } }),
48
49
  { onSuccess: () => router.push(PATHS.auth.signIn.path) }
49
50
  );
50
- return /* @__PURE__ */ React.createElement(
51
+ return /* @__PURE__ */ jsx(
51
52
  Form,
52
53
  {
53
54
  className: "mx-auto w-96",
54
55
  style: { marginTop: "56px" },
55
- onSubmit: () => void execute()
56
- },
57
- /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(CardHeader, null, /* @__PURE__ */ React.createElement(CardTitle, { className: "mx-auto" }, t("auth.reset-password.text"))), /* @__PURE__ */ React.createElement(CardContent, { className: "relative flex flex-col gap-6" }, /* @__PURE__ */ React.createElement(
58
- Field,
59
- {
60
- htmlFor: "newPassword",
61
- label: t("auth.reset-password.new-password.text")
62
- },
63
- /* @__PURE__ */ React.createElement(
64
- PasswordInput,
65
- {
66
- id: "newPassword",
67
- placeholder: t(
68
- "auth.reset-password.new-password.placeholder.text"
56
+ onSubmit: () => void execute(),
57
+ children: /* @__PURE__ */ jsxs(Card, { children: [
58
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "mx-auto", children: t("auth.reset-password.text") }) }),
59
+ /* @__PURE__ */ jsxs(CardContent, { className: "relative flex flex-col gap-6", children: [
60
+ /* @__PURE__ */ jsx(
61
+ Field,
62
+ {
63
+ htmlFor: "newPassword",
64
+ label: t("auth.reset-password.new-password.text"),
65
+ children: /* @__PURE__ */ jsx(
66
+ PasswordInput,
67
+ {
68
+ id: "newPassword",
69
+ placeholder: t(
70
+ "auth.reset-password.new-password.placeholder.text"
71
+ ),
72
+ fieldName: "newPassword",
73
+ value: formData.newPassword,
74
+ setFormData,
75
+ isDisabled: isRedirecting,
76
+ isError: errors.includes("newPassword")
77
+ }
78
+ )
79
+ }
69
80
  ),
70
- fieldName: "newPassword",
71
- value: formData.newPassword,
72
- setFormData,
73
- isDisabled: isRedirecting,
74
- isError: errors.includes("newPassword")
75
- }
76
- )
77
- ), /* @__PURE__ */ React.createElement(
78
- Field,
79
- {
80
- htmlFor: "newPasswordConfirm",
81
- label: t("auth.reset-password.new-password-confirm.text")
82
- },
83
- /* @__PURE__ */ React.createElement(
84
- PasswordInput,
85
- {
86
- id: "newPasswordConfirm",
87
- placeholder: t(
88
- `auth.reset-password.new-password-confirm.placeholder.text`
81
+ /* @__PURE__ */ jsx(
82
+ Field,
83
+ {
84
+ htmlFor: "newPasswordConfirm",
85
+ label: t("auth.reset-password.new-password-confirm.text"),
86
+ children: /* @__PURE__ */ jsx(
87
+ PasswordInput,
88
+ {
89
+ id: "newPasswordConfirm",
90
+ placeholder: t(
91
+ `auth.reset-password.new-password-confirm.placeholder.text`
92
+ ),
93
+ fieldName: "newPasswordConfirm",
94
+ value: formData.newPasswordConfirm,
95
+ setFormData,
96
+ isDisabled: isRedirecting,
97
+ isError: errors.includes("newPasswordConfirm")
98
+ }
99
+ )
100
+ }
89
101
  ),
90
- fieldName: "newPasswordConfirm",
91
- value: formData.newPasswordConfirm,
92
- setFormData,
93
- isDisabled: isRedirecting,
94
- isError: errors.includes("newPasswordConfirm")
95
- }
96
- )
97
- ), /* @__PURE__ */ React.createElement(
98
- Button,
99
- {
100
- size: "xs",
101
- variant: "link",
102
- className: "w-fit",
103
- isDisabled: isRedirecting
104
- },
105
- /* @__PURE__ */ React.createElement(Link, { href: PATHS.auth.signIn.path }, t("auth.reset-password.anchor.text"))
106
- ), /* @__PURE__ */ React.createElement(Button, { type: "submit", isLoading: isRedirecting }, t("auth.reset-password.button.text"))))
102
+ /* @__PURE__ */ jsx(
103
+ Button,
104
+ {
105
+ size: "xs",
106
+ variant: "link",
107
+ className: "w-fit",
108
+ isDisabled: isRedirecting,
109
+ children: /* @__PURE__ */ jsx(Link, { href: PATHS.auth.signIn.path, children: t("auth.reset-password.anchor.text") })
110
+ }
111
+ ),
112
+ /* @__PURE__ */ jsx(Button, { type: "submit", isLoading: isRedirecting, children: t("auth.reset-password.button.text") })
113
+ ] })
114
+ ] })
115
+ }
107
116
  );
108
117
  };
109
118
  }
@@ -1,3 +1,4 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import { useTranslator } from 'intor/react';
2
3
  import Link from 'next/link';
3
4
  import { useState } from 'react';
@@ -51,47 +52,55 @@ function createSignInPage({
51
52
  }),
52
53
  { onSuccess: (data) => setAdmin(data?.admin || null) }
53
54
  );
54
- return /* @__PURE__ */ React.createElement(
55
+ return /* @__PURE__ */ jsx(
55
56
  Form,
56
57
  {
57
58
  className: "mx-auto w-96",
58
59
  style: { marginTop: "56px" },
59
- onSubmit: () => void execute()
60
- },
61
- /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(CardHeader, null, /* @__PURE__ */ React.createElement(CardTitle, { className: "mx-auto" }, t("auth.sign-in.text"))), /* @__PURE__ */ React.createElement(CardContent, { className: "relative flex flex-col gap-6" }, /* @__PURE__ */ React.createElement(Field, { htmlFor: "email", label: t("auth.sign-in.email.text") }, /* @__PURE__ */ React.createElement(
62
- Input,
63
- {
64
- id: "email",
65
- type: "email",
66
- placeholder: t("auth.sign-in.email.placeholder.text"),
67
- autoComplete: "email",
68
- fieldName: "email",
69
- value: formData.email,
70
- setFormData,
71
- isDisabled: isRedirecting,
72
- isError: errors.includes("email")
73
- }
74
- )), /* @__PURE__ */ React.createElement(Field, { htmlFor: "password", label: t("auth.sign-in.password.text") }, /* @__PURE__ */ React.createElement(
75
- PasswordInput,
76
- {
77
- id: "password",
78
- placeholder: t("auth.sign-in.password.placeholder.text"),
79
- fieldName: "password",
80
- value: formData.password,
81
- setFormData,
82
- isDisabled: isRedirecting,
83
- isError: errors.includes("password")
84
- }
85
- )), /* @__PURE__ */ React.createElement(
86
- Button,
87
- {
88
- size: "xs",
89
- variant: "link",
90
- className: "w-fit",
91
- isDisabled: isRedirecting
92
- },
93
- /* @__PURE__ */ React.createElement(Link, { href: PATHS.auth.forgotPassword.path }, t("auth.sign-in.anchor.text"))
94
- ), /* @__PURE__ */ React.createElement(Button, { type: "submit", isLoading: isRedirecting }, t("auth.sign-in.button.text"))))
60
+ onSubmit: () => void execute(),
61
+ children: /* @__PURE__ */ jsxs(Card, { children: [
62
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "mx-auto", children: t("auth.sign-in.text") }) }),
63
+ /* @__PURE__ */ jsxs(CardContent, { className: "relative flex flex-col gap-6", children: [
64
+ /* @__PURE__ */ jsx(Field, { htmlFor: "email", label: t("auth.sign-in.email.text"), children: /* @__PURE__ */ jsx(
65
+ Input,
66
+ {
67
+ id: "email",
68
+ type: "email",
69
+ placeholder: t("auth.sign-in.email.placeholder.text"),
70
+ autoComplete: "email",
71
+ fieldName: "email",
72
+ value: formData.email,
73
+ setFormData,
74
+ isDisabled: isRedirecting,
75
+ isError: errors.includes("email")
76
+ }
77
+ ) }),
78
+ /* @__PURE__ */ jsx(Field, { htmlFor: "password", label: t("auth.sign-in.password.text"), children: /* @__PURE__ */ jsx(
79
+ PasswordInput,
80
+ {
81
+ id: "password",
82
+ placeholder: t("auth.sign-in.password.placeholder.text"),
83
+ fieldName: "password",
84
+ value: formData.password,
85
+ setFormData,
86
+ isDisabled: isRedirecting,
87
+ isError: errors.includes("password")
88
+ }
89
+ ) }),
90
+ /* @__PURE__ */ jsx(
91
+ Button,
92
+ {
93
+ size: "xs",
94
+ variant: "link",
95
+ className: "w-fit",
96
+ isDisabled: isRedirecting,
97
+ children: /* @__PURE__ */ jsx(Link, { href: PATHS.auth.forgotPassword.path, children: t("auth.sign-in.anchor.text") })
98
+ }
99
+ ),
100
+ /* @__PURE__ */ jsx(Button, { type: "submit", isLoading: isRedirecting, children: t("auth.sign-in.button.text") })
101
+ ] })
102
+ ] })
103
+ }
95
104
  );
96
105
  };
97
106
  }
@@ -1,3 +1,4 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { useRouter, useSearchParams } from 'next/navigation';
2
3
  import { useEffect } from 'react';
3
4
  import { PATHS } from '../../../../constants/paths/index.js';
@@ -44,7 +45,7 @@ function createVerifyEmailPage({
44
45
  }
45
46
  })();
46
47
  }, [email, emailVerificationToken]);
47
- return /* @__PURE__ */ React.createElement("div", { className: "flex-center relative flex-1 flex-col" }, /* @__PURE__ */ React.createElement(Spinner, { className: "size-10" }));
48
+ return /* @__PURE__ */ jsx("div", { className: "flex-center relative flex-1 flex-col", children: /* @__PURE__ */ jsx(Spinner, { className: "size-10" }) });
48
49
  };
49
50
  }
50
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yimingliao/cms",
3
- "version": "0.0.130",
3
+ "version": "0.0.131",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",