@better-auth-ui/react 1.6.1 → 1.6.2

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 (201) hide show
  1. package/dist/components/auth/auth-provider.d.ts +4 -3
  2. package/dist/components/auth/auth-provider.js +24 -40
  3. package/dist/components/email/email-changed.d.ts +2 -2
  4. package/dist/components/email/email-changed.js +154 -68
  5. package/dist/components/email/email-localization.js +18 -23
  6. package/dist/components/email/email-styles.js +52 -77
  7. package/dist/components/email/email-verification.d.ts +2 -2
  8. package/dist/components/email/email-verification.js +138 -73
  9. package/dist/components/email/index.d.ts +9 -9
  10. package/dist/components/email/index.js +9 -9
  11. package/dist/components/email/magic-link.d.ts +2 -2
  12. package/dist/components/email/magic-link.js +139 -70
  13. package/dist/components/email/new-device.d.ts +2 -2
  14. package/dist/components/email/new-device.js +221 -88
  15. package/dist/components/email/otp-email.d.ts +2 -2
  16. package/dist/components/email/otp-email.js +127 -63
  17. package/dist/components/email/password-changed.d.ts +2 -2
  18. package/dist/components/email/password-changed.js +157 -74
  19. package/dist/components/email/reset-password.d.ts +2 -2
  20. package/dist/components/email/reset-password.js +138 -66
  21. package/dist/components/icons/apple.d.ts +1 -1
  22. package/dist/components/icons/apple.js +16 -9
  23. package/dist/components/icons/atlassian.d.ts +1 -1
  24. package/dist/components/icons/atlassian.js +38 -13
  25. package/dist/components/icons/cognito.d.ts +1 -1
  26. package/dist/components/icons/cognito.js +19 -9
  27. package/dist/components/icons/discord.d.ts +1 -1
  28. package/dist/components/icons/discord.js +16 -9
  29. package/dist/components/icons/dropbox.d.ts +1 -1
  30. package/dist/components/icons/dropbox.js +16 -9
  31. package/dist/components/icons/facebook.d.ts +1 -1
  32. package/dist/components/icons/facebook.js +19 -11
  33. package/dist/components/icons/figma.d.ts +1 -1
  34. package/dist/components/icons/figma.js +34 -12
  35. package/dist/components/icons/github.d.ts +1 -1
  36. package/dist/components/icons/github.js +16 -11
  37. package/dist/components/icons/gitlab.d.ts +1 -1
  38. package/dist/components/icons/gitlab.js +30 -9
  39. package/dist/components/icons/google.d.ts +1 -1
  40. package/dist/components/icons/google.js +39 -9
  41. package/dist/components/icons/huggingface.d.ts +1 -1
  42. package/dist/components/icons/huggingface.js +38 -9
  43. package/dist/components/icons/index.d.ts +35 -35
  44. package/dist/components/icons/index.js +35 -35
  45. package/dist/components/icons/kakao.d.ts +1 -1
  46. package/dist/components/icons/kakao.js +16 -11
  47. package/dist/components/icons/kick.d.ts +1 -1
  48. package/dist/components/icons/kick.js +20 -11
  49. package/dist/components/icons/line.d.ts +1 -1
  50. package/dist/components/icons/line.js +16 -9
  51. package/dist/components/icons/linear.d.ts +1 -1
  52. package/dist/components/icons/linear.js +16 -9
  53. package/dist/components/icons/linkedin.d.ts +1 -1
  54. package/dist/components/icons/linkedin.js +33 -9
  55. package/dist/components/icons/microsoft.d.ts +1 -1
  56. package/dist/components/icons/microsoft.js +30 -9
  57. package/dist/components/icons/naver.d.ts +1 -1
  58. package/dist/components/icons/naver.js +16 -9
  59. package/dist/components/icons/notion.d.ts +1 -1
  60. package/dist/components/icons/notion.js +16 -9
  61. package/dist/components/icons/paybin.d.ts +1 -1
  62. package/dist/components/icons/paybin.js +32 -8
  63. package/dist/components/icons/paypal.d.ts +1 -1
  64. package/dist/components/icons/paypal.js +30 -9
  65. package/dist/components/icons/polar.d.ts +1 -1
  66. package/dist/components/icons/polar.js +24 -9
  67. package/dist/components/icons/railway.d.ts +1 -1
  68. package/dist/components/icons/railway.js +16 -9
  69. package/dist/components/icons/reddit.d.ts +1 -1
  70. package/dist/components/icons/reddit.js +21 -9
  71. package/dist/components/icons/roblox.d.ts +1 -1
  72. package/dist/components/icons/roblox.js +17 -12
  73. package/dist/components/icons/salesforce.d.ts +1 -1
  74. package/dist/components/icons/salesforce.js +16 -9
  75. package/dist/components/icons/slack.d.ts +1 -1
  76. package/dist/components/icons/slack.js +30 -9
  77. package/dist/components/icons/spotify.d.ts +1 -1
  78. package/dist/components/icons/spotify.js +16 -9
  79. package/dist/components/icons/tiktok.d.ts +1 -1
  80. package/dist/components/icons/tiktok.js +23 -10
  81. package/dist/components/icons/twitch.d.ts +1 -1
  82. package/dist/components/icons/twitch.js +43 -12
  83. package/dist/components/icons/vercel.d.ts +1 -1
  84. package/dist/components/icons/vercel.js +16 -9
  85. package/dist/components/icons/vk.d.ts +1 -1
  86. package/dist/components/icons/vk.js +16 -9
  87. package/dist/components/icons/wechat.d.ts +1 -1
  88. package/dist/components/icons/wechat.js +16 -9
  89. package/dist/components/icons/x.d.ts +1 -1
  90. package/dist/components/icons/x.js +16 -9
  91. package/dist/components/icons/zoom.d.ts +1 -1
  92. package/dist/components/icons/zoom.js +69 -11
  93. package/dist/components/settings/account/theme-preview.js +286 -7
  94. package/dist/core.d.ts +1 -1
  95. package/dist/hooks/auth/use-auth-mutation.d.ts +2 -2
  96. package/dist/hooks/auth/use-auth-mutation.js +12 -9
  97. package/dist/hooks/auth/use-auth-query.d.ts +3 -3
  98. package/dist/hooks/auth/use-auth-query.js +12 -9
  99. package/dist/hooks/auth/use-authenticate.d.ts +2 -2
  100. package/dist/hooks/auth/use-authenticate.js +22 -27
  101. package/dist/hooks/auth/use-is-username-available.d.ts +19 -0
  102. package/dist/hooks/auth/use-is-username-available.js +12 -0
  103. package/dist/hooks/auth/use-request-password-reset.d.ts +5 -6
  104. package/dist/hooks/auth/use-request-password-reset.js +11 -13
  105. package/dist/hooks/auth/use-reset-password.d.ts +8 -9
  106. package/dist/hooks/auth/use-reset-password.js +11 -12
  107. package/dist/hooks/auth/use-send-verification-email.d.ts +5 -6
  108. package/dist/hooks/auth/use-send-verification-email.js +11 -12
  109. package/dist/hooks/auth/use-session.d.ts +2 -2
  110. package/dist/hooks/auth/use-session.js +14 -17
  111. package/dist/hooks/auth/use-sign-in-email.d.ts +6 -7
  112. package/dist/hooks/auth/use-sign-in-email.js +17 -24
  113. package/dist/hooks/auth/use-sign-in-magic-link.d.ts +5 -6
  114. package/dist/hooks/auth/use-sign-in-magic-link.js +11 -12
  115. package/dist/hooks/auth/use-sign-in-passkey.d.ts +14 -14
  116. package/dist/hooks/auth/use-sign-in-passkey.js +17 -24
  117. package/dist/hooks/auth/use-sign-in-social.d.ts +8 -9
  118. package/dist/hooks/auth/use-sign-in-social.js +11 -12
  119. package/dist/hooks/auth/use-sign-in-username.d.ts +53 -0
  120. package/dist/hooks/auth/use-sign-in-username.js +18 -0
  121. package/dist/hooks/auth/use-sign-out.d.ts +4 -5
  122. package/dist/hooks/auth/use-sign-out.js +17 -23
  123. package/dist/hooks/auth/use-sign-up-email.d.ts +166 -167
  124. package/dist/hooks/auth/use-sign-up-email.js +17 -24
  125. package/dist/hooks/auth/use-user.d.ts +58 -58
  126. package/dist/hooks/auth/use-user.js +10 -13
  127. package/dist/hooks/settings/use-account-info.d.ts +5 -5
  128. package/dist/hooks/settings/use-account-info.js +20 -24
  129. package/dist/hooks/settings/use-add-passkey.d.ts +10 -10
  130. package/dist/hooks/settings/use-add-passkey.js +17 -23
  131. package/dist/hooks/settings/use-change-email.d.ts +5 -5
  132. package/dist/hooks/settings/use-change-email.js +17 -22
  133. package/dist/hooks/settings/use-change-password.d.ts +6 -7
  134. package/dist/hooks/settings/use-change-password.js +11 -10
  135. package/dist/hooks/settings/use-delete-passkey.d.ts +5 -5
  136. package/dist/hooks/settings/use-delete-passkey.js +17 -23
  137. package/dist/hooks/settings/use-delete-user.d.ts +8 -9
  138. package/dist/hooks/settings/use-delete-user.js +11 -10
  139. package/dist/hooks/settings/use-link-social.d.ts +5 -5
  140. package/dist/hooks/settings/use-link-social.js +11 -9
  141. package/dist/hooks/settings/use-list-accounts.d.ts +4 -4
  142. package/dist/hooks/settings/use-list-accounts.js +20 -22
  143. package/dist/hooks/settings/use-list-device-sessions.d.ts +2 -2
  144. package/dist/hooks/settings/use-list-device-sessions.js +20 -21
  145. package/dist/hooks/settings/use-list-sessions.d.ts +4 -4
  146. package/dist/hooks/settings/use-list-sessions.js +20 -21
  147. package/dist/hooks/settings/use-list-user-passkeys.d.ts +3 -3
  148. package/dist/hooks/settings/use-list-user-passkeys.js +20 -21
  149. package/dist/hooks/settings/use-revoke-multi-session.d.ts +5 -5
  150. package/dist/hooks/settings/use-revoke-multi-session.js +17 -19
  151. package/dist/hooks/settings/use-revoke-session.d.ts +5 -5
  152. package/dist/hooks/settings/use-revoke-session.js +17 -20
  153. package/dist/hooks/settings/use-set-active-session.d.ts +5 -5
  154. package/dist/hooks/settings/use-set-active-session.js +20 -27
  155. package/dist/hooks/settings/use-unlink-account.d.ts +5 -5
  156. package/dist/hooks/settings/use-unlink-account.js +17 -20
  157. package/dist/hooks/settings/use-update-user.d.ts +2 -2
  158. package/dist/hooks/settings/use-update-user.js +24 -28
  159. package/dist/index.d.ts +40 -36
  160. package/dist/index.js +84 -36
  161. package/dist/lib/auth-client.d.ts +1254 -1254
  162. package/dist/lib/auth-client.js +11 -11
  163. package/dist/lib/auth-config.d.ts +3 -3
  164. package/dist/lib/auth-context.d.ts +2 -2
  165. package/dist/lib/auth-context.js +5 -2
  166. package/dist/lib/provider-icons.d.ts +2 -2
  167. package/dist/lib/provider-icons.js +75 -47
  168. package/dist/lib/utils.d.ts +1 -1
  169. package/dist/lib/utils.js +7 -4
  170. package/package.json +11 -11
  171. package/src/components/auth/auth-provider.tsx +4 -6
  172. package/src/hooks/auth/use-authenticate.ts +3 -1
  173. package/src/hooks/auth/use-is-username-available.ts +22 -0
  174. package/src/hooks/auth/use-request-password-reset.ts +4 -6
  175. package/src/hooks/auth/use-reset-password.ts +4 -6
  176. package/src/hooks/auth/use-send-verification-email.ts +4 -6
  177. package/src/hooks/auth/use-session.ts +2 -1
  178. package/src/hooks/auth/use-sign-in-email.ts +6 -8
  179. package/src/hooks/auth/use-sign-in-magic-link.ts +4 -6
  180. package/src/hooks/auth/use-sign-in-social.ts +4 -6
  181. package/src/hooks/auth/use-sign-in-username.ts +34 -0
  182. package/src/hooks/auth/use-sign-out.ts +6 -7
  183. package/src/hooks/auth/use-sign-up-email.ts +6 -8
  184. package/src/hooks/auth/use-user.ts +1 -2
  185. package/src/hooks/settings/use-account-info.ts +2 -1
  186. package/src/hooks/settings/use-change-email.ts +6 -6
  187. package/src/hooks/settings/use-change-password.ts +4 -6
  188. package/src/hooks/settings/use-delete-user.ts +4 -6
  189. package/src/hooks/settings/use-link-social.ts +4 -4
  190. package/src/hooks/settings/use-list-accounts.ts +3 -1
  191. package/src/hooks/settings/use-list-device-sessions.ts +3 -1
  192. package/src/hooks/settings/use-list-sessions.ts +3 -1
  193. package/src/hooks/settings/use-list-user-passkeys.ts +3 -1
  194. package/src/hooks/settings/use-revoke-multi-session.ts +6 -6
  195. package/src/hooks/settings/use-revoke-session.ts +4 -5
  196. package/src/hooks/settings/use-set-active-session.ts +9 -8
  197. package/src/hooks/settings/use-unlink-account.ts +4 -5
  198. package/src/hooks/settings/use-update-user.ts +8 -9
  199. package/src/index.ts +4 -0
  200. package/src/lib/auth-config.ts +1 -1
  201. package/dist/lib/auth-config.js +0 -1
@@ -1,10 +1,289 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function ThemePreviewSystem(props) {
3
- return (_jsxs("svg", { fill: "none", viewBox: "0 0 240 117", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": "System theme preview", ...props, children: [_jsxs("defs", { children: [_jsx("clipPath", { id: "systemDiagonalLight", children: _jsx("polygon", { points: "0,0 240,0 0,117" }) }), _jsx("clipPath", { id: "systemDiagonalDark", children: _jsx("polygon", { points: "240,0 240,117 0,117" }) })] }), _jsxs("g", { clipPath: "url(#systemDiagonalLight)", children: [_jsx("path", { d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z", fill: "white" }), _jsx("path", { d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z", stroke: "#E4E4E7" }), _jsx("path", { d: "M32 48.5C32 45.4624 34.4624 43 37.5 43H67.5C70.5376 43 73 45.4624 73 48.5C73 51.5376 70.5376 54 67.5 54H37.5C34.4624 54 32 51.5376 32 48.5Z", fill: "#F4F4F5" }), _jsx("path", { d: "M17 105C17 101.686 19.6863 99 23 99H67C70.3137 99 73 101.686 73 105C73 108.314 70.3137 111 67 111H23C19.6863 111 17 108.314 17 105Z", fill: "#F4F4F5" }), _jsx("path", { d: "M88 25.5C88 22.4624 90.4624 20 93.5 20H207.5C210.538 20 213 22.4624 213 25.5C213 28.5376 210.538 31 207.5 31H93.5C90.4624 31 88 28.5376 88 25.5Z", fill: "#E4E4E7" }), _jsx("path", { d: "M88 105C88 101.686 90.6863 99 94 99H189C192.314 99 195 101.686 195 105C195 108.314 192.314 111 189 111H94C90.6863 111 88 108.314 88 105Z", fill: "#F4F4F5" }), _jsx("path", { d: "M88 51C88 46.5817 91.5817 43 96 43H221C225.418 43 229 46.5817 229 51V85C229 89.4183 225.418 93 221 93H96C91.5817 93 88 89.4183 88 85V51Z", fill: "#F4F4F5" }), _jsx("path", { d: "M17 48.5C17 45.4624 19.4624 43 22.5 43C25.5376 43 28 45.4624 28 48.5C28 51.5376 25.5376 54 22.5 54C19.4624 54 17 51.5376 17 48.5Z", fill: "#F4F4F5" }), _jsx("path", { d: "M17 66.5C17 63.4624 19.4624 61 22.5 61C25.5376 61 28 63.4624 28 66.5C28 69.5376 25.5376 72 22.5 72C19.4624 72 17 69.5376 17 66.5Z", fill: "#F4F4F5" }), _jsx("path", { d: "M17 86.5C17 83.4624 19.4624 81 22.5 81C25.5376 81 28 83.4624 28 86.5V87.5C28 90.5376 25.5376 93 22.5 93C19.4624 93 17 90.5376 17 87.5V86.5Z", fill: "#F4F4F5" }), _jsx("path", { d: "M32 25.5C32 22.4624 34.4624 20 37.5 20H67.5C70.5376 20 73 22.4624 73 25.5C73 28.5376 70.5376 31 67.5 31H37.5C34.4624 31 32 28.5376 32 25.5Z", fill: "#E4E4E7" }), _jsx("path", { d: "M32 66.5C32 63.4624 34.4624 61 37.5 61H67.5C70.5376 61 73 63.4624 73 66.5C73 69.5376 70.5376 72 67.5 72H37.5C34.4624 72 32 69.5376 32 66.5Z", fill: "#F4F4F5" }), _jsx("path", { d: "M32 87C32 83.6863 34.6863 81 38 81H67C70.3137 81 73 83.6863 73 87C73 90.3137 70.3137 93 67 93H38C34.6863 93 32 90.3137 32 87Z", fill: "#F4F4F5" }), _jsx("circle", { cx: "22.5", cy: "25.5", fill: "#E4E4E7", r: "5.5" })] }), _jsxs("g", { clipPath: "url(#systemDiagonalDark)", children: [_jsx("path", { d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z", fill: "black" }), _jsx("path", { d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z", stroke: "#3F3F46" }), _jsx("path", { d: "M32 48.5C32 45.4624 34.4624 43 37.5 43H67.5C70.5376 43 73 45.4624 73 48.5C73 51.5376 70.5376 54 67.5 54H37.5C34.4624 54 32 51.5376 32 48.5Z", fill: "#27272A" }), _jsx("path", { d: "M17 105C17 101.686 19.6863 99 23 99H67C70.3137 99 73 101.686 73 105C73 108.314 70.3137 111 67 111H23C19.6863 111 17 108.314 17 105Z", fill: "#27272A" }), _jsx("path", { d: "M88 25.5C88 22.4624 90.4624 20 93.5 20H207.5C210.538 20 213 22.4624 213 25.5C213 28.5376 210.538 31 207.5 31H93.5C90.4624 31 88 28.5376 88 25.5Z", fill: "#3F3F46" }), _jsx("path", { d: "M88 105C88 101.686 90.6863 99 94 99H189C192.314 99 195 101.686 195 105C195 108.314 192.314 111 189 111H94C90.6863 111 88 108.314 88 105Z", fill: "#27272A" }), _jsx("path", { d: "M88 51C88 46.5817 91.5817 43 96 43H221C225.418 43 229 46.5817 229 51V85C229 89.4183 225.418 93 221 93H96C91.5817 93 88 89.4183 88 85V51Z", fill: "#27272A" }), _jsx("path", { d: "M17 48.5C17 45.4624 19.4624 43 22.5 43C25.5376 43 28 45.4624 28 48.5C28 51.5376 25.5376 54 22.5 54C19.4624 54 17 51.5376 17 48.5Z", fill: "#27272A" }), _jsx("path", { d: "M17 66.5C17 63.4624 19.4624 61 22.5 61C25.5376 61 28 63.4624 28 66.5C28 69.5376 25.5376 72 22.5 72C19.4624 72 17 69.5376 17 66.5Z", fill: "#27272A" }), _jsx("path", { d: "M17 86.5C17 83.4624 19.4624 81 22.5 81C25.5376 81 28 83.4624 28 86.5V87.5C28 90.5376 25.5376 93 22.5 93C19.4624 93 17 90.5376 17 87.5V86.5Z", fill: "#27272A" }), _jsx("path", { d: "M32 25.5C32 22.4624 34.4624 20 37.5 20H67.5C70.5376 20 73 22.4624 73 25.5C73 28.5376 70.5376 31 67.5 31H37.5C34.4624 31 32 28.5376 32 25.5Z", fill: "#3F3F46" }), _jsx("path", { d: "M32 66.5C32 63.4624 34.4624 61 37.5 61H67.5C70.5376 61 73 63.4624 73 66.5C73 69.5376 70.5376 72 67.5 72H37.5C34.4624 72 32 69.5376 32 66.5Z", fill: "#27272A" }), _jsx("path", { d: "M32 87C32 83.6863 34.6863 81 38 81H67C70.3137 81 73 83.6863 73 87C73 90.3137 70.3137 93 67 93H38C34.6863 93 32 90.3137 32 87Z", fill: "#27272A" }), _jsx("circle", { cx: "22.5", cy: "25.5", fill: "#3F3F46", r: "5.5" })] })] }));
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ //#region src/components/settings/account/theme-preview.tsx
3
+ function n(n) {
4
+ return /* @__PURE__ */ t("svg", {
5
+ fill: "none",
6
+ viewBox: "0 0 240 117",
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ role: "img",
9
+ "aria-label": "System theme preview",
10
+ ...n,
11
+ children: [
12
+ /* @__PURE__ */ t("defs", { children: [/* @__PURE__ */ e("clipPath", {
13
+ id: "systemDiagonalLight",
14
+ children: /* @__PURE__ */ e("polygon", { points: "0,0 240,0 0,117" })
15
+ }), /* @__PURE__ */ e("clipPath", {
16
+ id: "systemDiagonalDark",
17
+ children: /* @__PURE__ */ e("polygon", { points: "240,0 240,117 0,117" })
18
+ })] }),
19
+ /* @__PURE__ */ t("g", {
20
+ clipPath: "url(#systemDiagonalLight)",
21
+ children: [
22
+ /* @__PURE__ */ e("path", {
23
+ d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z",
24
+ fill: "white"
25
+ }),
26
+ /* @__PURE__ */ e("path", {
27
+ d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z",
28
+ stroke: "#E4E4E7"
29
+ }),
30
+ /* @__PURE__ */ e("path", {
31
+ d: "M32 48.5C32 45.4624 34.4624 43 37.5 43H67.5C70.5376 43 73 45.4624 73 48.5C73 51.5376 70.5376 54 67.5 54H37.5C34.4624 54 32 51.5376 32 48.5Z",
32
+ fill: "#F4F4F5"
33
+ }),
34
+ /* @__PURE__ */ e("path", {
35
+ d: "M17 105C17 101.686 19.6863 99 23 99H67C70.3137 99 73 101.686 73 105C73 108.314 70.3137 111 67 111H23C19.6863 111 17 108.314 17 105Z",
36
+ fill: "#F4F4F5"
37
+ }),
38
+ /* @__PURE__ */ e("path", {
39
+ d: "M88 25.5C88 22.4624 90.4624 20 93.5 20H207.5C210.538 20 213 22.4624 213 25.5C213 28.5376 210.538 31 207.5 31H93.5C90.4624 31 88 28.5376 88 25.5Z",
40
+ fill: "#E4E4E7"
41
+ }),
42
+ /* @__PURE__ */ e("path", {
43
+ d: "M88 105C88 101.686 90.6863 99 94 99H189C192.314 99 195 101.686 195 105C195 108.314 192.314 111 189 111H94C90.6863 111 88 108.314 88 105Z",
44
+ fill: "#F4F4F5"
45
+ }),
46
+ /* @__PURE__ */ e("path", {
47
+ d: "M88 51C88 46.5817 91.5817 43 96 43H221C225.418 43 229 46.5817 229 51V85C229 89.4183 225.418 93 221 93H96C91.5817 93 88 89.4183 88 85V51Z",
48
+ fill: "#F4F4F5"
49
+ }),
50
+ /* @__PURE__ */ e("path", {
51
+ d: "M17 48.5C17 45.4624 19.4624 43 22.5 43C25.5376 43 28 45.4624 28 48.5C28 51.5376 25.5376 54 22.5 54C19.4624 54 17 51.5376 17 48.5Z",
52
+ fill: "#F4F4F5"
53
+ }),
54
+ /* @__PURE__ */ e("path", {
55
+ d: "M17 66.5C17 63.4624 19.4624 61 22.5 61C25.5376 61 28 63.4624 28 66.5C28 69.5376 25.5376 72 22.5 72C19.4624 72 17 69.5376 17 66.5Z",
56
+ fill: "#F4F4F5"
57
+ }),
58
+ /* @__PURE__ */ e("path", {
59
+ d: "M17 86.5C17 83.4624 19.4624 81 22.5 81C25.5376 81 28 83.4624 28 86.5V87.5C28 90.5376 25.5376 93 22.5 93C19.4624 93 17 90.5376 17 87.5V86.5Z",
60
+ fill: "#F4F4F5"
61
+ }),
62
+ /* @__PURE__ */ e("path", {
63
+ d: "M32 25.5C32 22.4624 34.4624 20 37.5 20H67.5C70.5376 20 73 22.4624 73 25.5C73 28.5376 70.5376 31 67.5 31H37.5C34.4624 31 32 28.5376 32 25.5Z",
64
+ fill: "#E4E4E7"
65
+ }),
66
+ /* @__PURE__ */ e("path", {
67
+ d: "M32 66.5C32 63.4624 34.4624 61 37.5 61H67.5C70.5376 61 73 63.4624 73 66.5C73 69.5376 70.5376 72 67.5 72H37.5C34.4624 72 32 69.5376 32 66.5Z",
68
+ fill: "#F4F4F5"
69
+ }),
70
+ /* @__PURE__ */ e("path", {
71
+ d: "M32 87C32 83.6863 34.6863 81 38 81H67C70.3137 81 73 83.6863 73 87C73 90.3137 70.3137 93 67 93H38C34.6863 93 32 90.3137 32 87Z",
72
+ fill: "#F4F4F5"
73
+ }),
74
+ /* @__PURE__ */ e("circle", {
75
+ cx: "22.5",
76
+ cy: "25.5",
77
+ fill: "#E4E4E7",
78
+ r: "5.5"
79
+ })
80
+ ]
81
+ }),
82
+ /* @__PURE__ */ t("g", {
83
+ clipPath: "url(#systemDiagonalDark)",
84
+ children: [
85
+ /* @__PURE__ */ e("path", {
86
+ d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z",
87
+ fill: "black"
88
+ }),
89
+ /* @__PURE__ */ e("path", {
90
+ d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z",
91
+ stroke: "#3F3F46"
92
+ }),
93
+ /* @__PURE__ */ e("path", {
94
+ d: "M32 48.5C32 45.4624 34.4624 43 37.5 43H67.5C70.5376 43 73 45.4624 73 48.5C73 51.5376 70.5376 54 67.5 54H37.5C34.4624 54 32 51.5376 32 48.5Z",
95
+ fill: "#27272A"
96
+ }),
97
+ /* @__PURE__ */ e("path", {
98
+ d: "M17 105C17 101.686 19.6863 99 23 99H67C70.3137 99 73 101.686 73 105C73 108.314 70.3137 111 67 111H23C19.6863 111 17 108.314 17 105Z",
99
+ fill: "#27272A"
100
+ }),
101
+ /* @__PURE__ */ e("path", {
102
+ d: "M88 25.5C88 22.4624 90.4624 20 93.5 20H207.5C210.538 20 213 22.4624 213 25.5C213 28.5376 210.538 31 207.5 31H93.5C90.4624 31 88 28.5376 88 25.5Z",
103
+ fill: "#3F3F46"
104
+ }),
105
+ /* @__PURE__ */ e("path", {
106
+ d: "M88 105C88 101.686 90.6863 99 94 99H189C192.314 99 195 101.686 195 105C195 108.314 192.314 111 189 111H94C90.6863 111 88 108.314 88 105Z",
107
+ fill: "#27272A"
108
+ }),
109
+ /* @__PURE__ */ e("path", {
110
+ d: "M88 51C88 46.5817 91.5817 43 96 43H221C225.418 43 229 46.5817 229 51V85C229 89.4183 225.418 93 221 93H96C91.5817 93 88 89.4183 88 85V51Z",
111
+ fill: "#27272A"
112
+ }),
113
+ /* @__PURE__ */ e("path", {
114
+ d: "M17 48.5C17 45.4624 19.4624 43 22.5 43C25.5376 43 28 45.4624 28 48.5C28 51.5376 25.5376 54 22.5 54C19.4624 54 17 51.5376 17 48.5Z",
115
+ fill: "#27272A"
116
+ }),
117
+ /* @__PURE__ */ e("path", {
118
+ d: "M17 66.5C17 63.4624 19.4624 61 22.5 61C25.5376 61 28 63.4624 28 66.5C28 69.5376 25.5376 72 22.5 72C19.4624 72 17 69.5376 17 66.5Z",
119
+ fill: "#27272A"
120
+ }),
121
+ /* @__PURE__ */ e("path", {
122
+ d: "M17 86.5C17 83.4624 19.4624 81 22.5 81C25.5376 81 28 83.4624 28 86.5V87.5C28 90.5376 25.5376 93 22.5 93C19.4624 93 17 90.5376 17 87.5V86.5Z",
123
+ fill: "#27272A"
124
+ }),
125
+ /* @__PURE__ */ e("path", {
126
+ d: "M32 25.5C32 22.4624 34.4624 20 37.5 20H67.5C70.5376 20 73 22.4624 73 25.5C73 28.5376 70.5376 31 67.5 31H37.5C34.4624 31 32 28.5376 32 25.5Z",
127
+ fill: "#3F3F46"
128
+ }),
129
+ /* @__PURE__ */ e("path", {
130
+ d: "M32 66.5C32 63.4624 34.4624 61 37.5 61H67.5C70.5376 61 73 63.4624 73 66.5C73 69.5376 70.5376 72 67.5 72H37.5C34.4624 72 32 69.5376 32 66.5Z",
131
+ fill: "#27272A"
132
+ }),
133
+ /* @__PURE__ */ e("path", {
134
+ d: "M32 87C32 83.6863 34.6863 81 38 81H67C70.3137 81 73 83.6863 73 87C73 90.3137 70.3137 93 67 93H38C34.6863 93 32 90.3137 32 87Z",
135
+ fill: "#27272A"
136
+ }),
137
+ /* @__PURE__ */ e("circle", {
138
+ cx: "22.5",
139
+ cy: "25.5",
140
+ fill: "#3F3F46",
141
+ r: "5.5"
142
+ })
143
+ ]
144
+ })
145
+ ]
146
+ });
4
147
  }
5
- export function ThemePreviewLight(props) {
6
- return (_jsxs("svg", { fill: "none", viewBox: "0 0 240 117", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": "Light", ...props, children: [_jsx("path", { d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z", fill: "white" }), _jsx("path", { d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z", stroke: "#E4E4E7" }), _jsx("path", { d: "M32 48.5C32 45.4624 34.4624 43 37.5 43H67.5C70.5376 43 73 45.4624 73 48.5C73 51.5376 70.5376 54 67.5 54H37.5C34.4624 54 32 51.5376 32 48.5Z", fill: "#F4F4F5" }), _jsx("path", { d: "M17 105C17 101.686 19.6863 99 23 99H67C70.3137 99 73 101.686 73 105C73 108.314 70.3137 111 67 111H23C19.6863 111 17 108.314 17 105Z", fill: "#F4F4F5" }), _jsx("path", { d: "M88 25.5C88 22.4624 90.4624 20 93.5 20H207.5C210.538 20 213 22.4624 213 25.5C213 28.5376 210.538 31 207.5 31H93.5C90.4624 31 88 28.5376 88 25.5Z", fill: "#E4E4E7" }), _jsx("path", { d: "M88 105C88 101.686 90.6863 99 94 99H189C192.314 99 195 101.686 195 105C195 108.314 192.314 111 189 111H94C90.6863 111 88 108.314 88 105Z", fill: "#F4F4F5" }), _jsx("path", { d: "M88 51C88 46.5817 91.5817 43 96 43H221C225.418 43 229 46.5817 229 51V85C229 89.4183 225.418 93 221 93H96C91.5817 93 88 89.4183 88 85V51Z", fill: "#F4F4F5" }), _jsx("path", { d: "M17 48.5C17 45.4624 19.4624 43 22.5 43C25.5376 43 28 45.4624 28 48.5C28 51.5376 25.5376 54 22.5 54C19.4624 54 17 51.5376 17 48.5Z", fill: "#F4F4F5" }), _jsx("path", { d: "M17 66.5C17 63.4624 19.4624 61 22.5 61C25.5376 61 28 63.4624 28 66.5C28 69.5376 25.5376 72 22.5 72C19.4624 72 17 69.5376 17 66.5Z", fill: "#F4F4F5" }), _jsx("path", { d: "M17 86.5C17 83.4624 19.4624 81 22.5 81C25.5376 81 28 83.4624 28 86.5V87.5C28 90.5376 25.5376 93 22.5 93C19.4624 93 17 90.5376 17 87.5V86.5Z", fill: "#F4F4F5" }), _jsx("path", { d: "M32 25.5C32 22.4624 34.4624 20 37.5 20H67.5C70.5376 20 73 22.4624 73 25.5C73 28.5376 70.5376 31 67.5 31H37.5C34.4624 31 32 28.5376 32 25.5Z", fill: "#E4E4E7" }), _jsx("path", { d: "M32 66.5C32 63.4624 34.4624 61 37.5 61H67.5C70.5376 61 73 63.4624 73 66.5C73 69.5376 70.5376 72 67.5 72H37.5C34.4624 72 32 69.5376 32 66.5Z", fill: "#F4F4F5" }), _jsx("path", { d: "M32 87C32 83.6863 34.6863 81 38 81H67C70.3137 81 73 83.6863 73 87C73 90.3137 70.3137 93 67 93H38C34.6863 93 32 90.3137 32 87Z", fill: "#F4F4F5" }), _jsx("circle", { cx: "22.5", cy: "25.5", fill: "#E4E4E7", r: "5.5" })] }));
148
+ function r(n) {
149
+ return /* @__PURE__ */ t("svg", {
150
+ fill: "none",
151
+ viewBox: "0 0 240 117",
152
+ xmlns: "http://www.w3.org/2000/svg",
153
+ role: "img",
154
+ "aria-label": "Light",
155
+ ...n,
156
+ children: [
157
+ /* @__PURE__ */ e("path", {
158
+ d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z",
159
+ fill: "white"
160
+ }),
161
+ /* @__PURE__ */ e("path", {
162
+ d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z",
163
+ stroke: "#E4E4E7"
164
+ }),
165
+ /* @__PURE__ */ e("path", {
166
+ d: "M32 48.5C32 45.4624 34.4624 43 37.5 43H67.5C70.5376 43 73 45.4624 73 48.5C73 51.5376 70.5376 54 67.5 54H37.5C34.4624 54 32 51.5376 32 48.5Z",
167
+ fill: "#F4F4F5"
168
+ }),
169
+ /* @__PURE__ */ e("path", {
170
+ d: "M17 105C17 101.686 19.6863 99 23 99H67C70.3137 99 73 101.686 73 105C73 108.314 70.3137 111 67 111H23C19.6863 111 17 108.314 17 105Z",
171
+ fill: "#F4F4F5"
172
+ }),
173
+ /* @__PURE__ */ e("path", {
174
+ d: "M88 25.5C88 22.4624 90.4624 20 93.5 20H207.5C210.538 20 213 22.4624 213 25.5C213 28.5376 210.538 31 207.5 31H93.5C90.4624 31 88 28.5376 88 25.5Z",
175
+ fill: "#E4E4E7"
176
+ }),
177
+ /* @__PURE__ */ e("path", {
178
+ d: "M88 105C88 101.686 90.6863 99 94 99H189C192.314 99 195 101.686 195 105C195 108.314 192.314 111 189 111H94C90.6863 111 88 108.314 88 105Z",
179
+ fill: "#F4F4F5"
180
+ }),
181
+ /* @__PURE__ */ e("path", {
182
+ d: "M88 51C88 46.5817 91.5817 43 96 43H221C225.418 43 229 46.5817 229 51V85C229 89.4183 225.418 93 221 93H96C91.5817 93 88 89.4183 88 85V51Z",
183
+ fill: "#F4F4F5"
184
+ }),
185
+ /* @__PURE__ */ e("path", {
186
+ d: "M17 48.5C17 45.4624 19.4624 43 22.5 43C25.5376 43 28 45.4624 28 48.5C28 51.5376 25.5376 54 22.5 54C19.4624 54 17 51.5376 17 48.5Z",
187
+ fill: "#F4F4F5"
188
+ }),
189
+ /* @__PURE__ */ e("path", {
190
+ d: "M17 66.5C17 63.4624 19.4624 61 22.5 61C25.5376 61 28 63.4624 28 66.5C28 69.5376 25.5376 72 22.5 72C19.4624 72 17 69.5376 17 66.5Z",
191
+ fill: "#F4F4F5"
192
+ }),
193
+ /* @__PURE__ */ e("path", {
194
+ d: "M17 86.5C17 83.4624 19.4624 81 22.5 81C25.5376 81 28 83.4624 28 86.5V87.5C28 90.5376 25.5376 93 22.5 93C19.4624 93 17 90.5376 17 87.5V86.5Z",
195
+ fill: "#F4F4F5"
196
+ }),
197
+ /* @__PURE__ */ e("path", {
198
+ d: "M32 25.5C32 22.4624 34.4624 20 37.5 20H67.5C70.5376 20 73 22.4624 73 25.5C73 28.5376 70.5376 31 67.5 31H37.5C34.4624 31 32 28.5376 32 25.5Z",
199
+ fill: "#E4E4E7"
200
+ }),
201
+ /* @__PURE__ */ e("path", {
202
+ d: "M32 66.5C32 63.4624 34.4624 61 37.5 61H67.5C70.5376 61 73 63.4624 73 66.5C73 69.5376 70.5376 72 67.5 72H37.5C34.4624 72 32 69.5376 32 66.5Z",
203
+ fill: "#F4F4F5"
204
+ }),
205
+ /* @__PURE__ */ e("path", {
206
+ d: "M32 87C32 83.6863 34.6863 81 38 81H67C70.3137 81 73 83.6863 73 87C73 90.3137 70.3137 93 67 93H38C34.6863 93 32 90.3137 32 87Z",
207
+ fill: "#F4F4F5"
208
+ }),
209
+ /* @__PURE__ */ e("circle", {
210
+ cx: "22.5",
211
+ cy: "25.5",
212
+ fill: "#E4E4E7",
213
+ r: "5.5"
214
+ })
215
+ ]
216
+ });
7
217
  }
8
- export function ThemePreviewDark(props) {
9
- return (_jsxs("svg", { fill: "none", viewBox: "0 0 240 117", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": "Dark", ...props, children: [_jsx("path", { d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z", fill: "black" }), _jsx("path", { d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z", stroke: "#3F3F46" }), _jsx("path", { d: "M32 48.5C32 45.4624 34.4624 43 37.5 43H67.5C70.5376 43 73 45.4624 73 48.5C73 51.5376 70.5376 54 67.5 54H37.5C34.4624 54 32 51.5376 32 48.5Z", fill: "#27272A" }), _jsx("path", { d: "M17 105C17 101.686 19.6863 99 23 99H67C70.3137 99 73 101.686 73 105C73 108.314 70.3137 111 67 111H23C19.6863 111 17 108.314 17 105Z", fill: "#27272A" }), _jsx("path", { d: "M88 25.5C88 22.4624 90.4624 20 93.5 20H207.5C210.538 20 213 22.4624 213 25.5C213 28.5376 210.538 31 207.5 31H93.5C90.4624 31 88 28.5376 88 25.5Z", fill: "#3F3F46" }), _jsx("path", { d: "M88 105C88 101.686 90.6863 99 94 99H189C192.314 99 195 101.686 195 105C195 108.314 192.314 111 189 111H94C90.6863 111 88 108.314 88 105Z", fill: "#27272A" }), _jsx("path", { d: "M88 51C88 46.5817 91.5817 43 96 43H221C225.418 43 229 46.5817 229 51V85C229 89.4183 225.418 93 221 93H96C91.5817 93 88 89.4183 88 85V51Z", fill: "#27272A" }), _jsx("path", { d: "M17 48.5C17 45.4624 19.4624 43 22.5 43C25.5376 43 28 45.4624 28 48.5C28 51.5376 25.5376 54 22.5 54C19.4624 54 17 51.5376 17 48.5Z", fill: "#27272A" }), _jsx("path", { d: "M17 66.5C17 63.4624 19.4624 61 22.5 61C25.5376 61 28 63.4624 28 66.5C28 69.5376 25.5376 72 22.5 72C19.4624 72 17 69.5376 17 66.5Z", fill: "#27272A" }), _jsx("path", { d: "M17 86.5C17 83.4624 19.4624 81 22.5 81C25.5376 81 28 83.4624 28 86.5V87.5C28 90.5376 25.5376 93 22.5 93C19.4624 93 17 90.5376 17 87.5V86.5Z", fill: "#27272A" }), _jsx("path", { d: "M32 25.5C32 22.4624 34.4624 20 37.5 20H67.5C70.5376 20 73 22.4624 73 25.5C73 28.5376 70.5376 31 67.5 31H37.5C34.4624 31 32 28.5376 32 25.5Z", fill: "#3F3F46" }), _jsx("path", { d: "M32 66.5C32 63.4624 34.4624 61 37.5 61H67.5C70.5376 61 73 63.4624 73 66.5C73 69.5376 70.5376 72 67.5 72H37.5C34.4624 72 32 69.5376 32 66.5Z", fill: "#27272A" }), _jsx("path", { d: "M32 87C32 83.6863 34.6863 81 38 81H67C70.3137 81 73 83.6863 73 87C73 90.3137 70.3137 93 67 93H38C34.6863 93 32 90.3137 32 87Z", fill: "#27272A" }), _jsx("circle", { cx: "22.5", cy: "25.5", fill: "#3F3F46", r: "5.5" })] }));
218
+ function i(n) {
219
+ return /* @__PURE__ */ t("svg", {
220
+ fill: "none",
221
+ viewBox: "0 0 240 117",
222
+ xmlns: "http://www.w3.org/2000/svg",
223
+ role: "img",
224
+ "aria-label": "Dark",
225
+ ...n,
226
+ children: [
227
+ /* @__PURE__ */ e("path", {
228
+ d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z",
229
+ fill: "black"
230
+ }),
231
+ /* @__PURE__ */ e("path", {
232
+ d: "M12 0.5H228C234.351 0.5 239.5 5.64873 239.5 12V105C239.5 111.351 234.351 116.5 228 116.5H12C5.64873 116.5 0.5 111.351 0.5 105V12C0.5 5.64873 5.64873 0.5 12 0.5Z",
233
+ stroke: "#3F3F46"
234
+ }),
235
+ /* @__PURE__ */ e("path", {
236
+ d: "M32 48.5C32 45.4624 34.4624 43 37.5 43H67.5C70.5376 43 73 45.4624 73 48.5C73 51.5376 70.5376 54 67.5 54H37.5C34.4624 54 32 51.5376 32 48.5Z",
237
+ fill: "#27272A"
238
+ }),
239
+ /* @__PURE__ */ e("path", {
240
+ d: "M17 105C17 101.686 19.6863 99 23 99H67C70.3137 99 73 101.686 73 105C73 108.314 70.3137 111 67 111H23C19.6863 111 17 108.314 17 105Z",
241
+ fill: "#27272A"
242
+ }),
243
+ /* @__PURE__ */ e("path", {
244
+ d: "M88 25.5C88 22.4624 90.4624 20 93.5 20H207.5C210.538 20 213 22.4624 213 25.5C213 28.5376 210.538 31 207.5 31H93.5C90.4624 31 88 28.5376 88 25.5Z",
245
+ fill: "#3F3F46"
246
+ }),
247
+ /* @__PURE__ */ e("path", {
248
+ d: "M88 105C88 101.686 90.6863 99 94 99H189C192.314 99 195 101.686 195 105C195 108.314 192.314 111 189 111H94C90.6863 111 88 108.314 88 105Z",
249
+ fill: "#27272A"
250
+ }),
251
+ /* @__PURE__ */ e("path", {
252
+ d: "M88 51C88 46.5817 91.5817 43 96 43H221C225.418 43 229 46.5817 229 51V85C229 89.4183 225.418 93 221 93H96C91.5817 93 88 89.4183 88 85V51Z",
253
+ fill: "#27272A"
254
+ }),
255
+ /* @__PURE__ */ e("path", {
256
+ d: "M17 48.5C17 45.4624 19.4624 43 22.5 43C25.5376 43 28 45.4624 28 48.5C28 51.5376 25.5376 54 22.5 54C19.4624 54 17 51.5376 17 48.5Z",
257
+ fill: "#27272A"
258
+ }),
259
+ /* @__PURE__ */ e("path", {
260
+ d: "M17 66.5C17 63.4624 19.4624 61 22.5 61C25.5376 61 28 63.4624 28 66.5C28 69.5376 25.5376 72 22.5 72C19.4624 72 17 69.5376 17 66.5Z",
261
+ fill: "#27272A"
262
+ }),
263
+ /* @__PURE__ */ e("path", {
264
+ d: "M17 86.5C17 83.4624 19.4624 81 22.5 81C25.5376 81 28 83.4624 28 86.5V87.5C28 90.5376 25.5376 93 22.5 93C19.4624 93 17 90.5376 17 87.5V86.5Z",
265
+ fill: "#27272A"
266
+ }),
267
+ /* @__PURE__ */ e("path", {
268
+ d: "M32 25.5C32 22.4624 34.4624 20 37.5 20H67.5C70.5376 20 73 22.4624 73 25.5C73 28.5376 70.5376 31 67.5 31H37.5C34.4624 31 32 28.5376 32 25.5Z",
269
+ fill: "#3F3F46"
270
+ }),
271
+ /* @__PURE__ */ e("path", {
272
+ d: "M32 66.5C32 63.4624 34.4624 61 37.5 61H67.5C70.5376 61 73 63.4624 73 66.5C73 69.5376 70.5376 72 67.5 72H37.5C34.4624 72 32 69.5376 32 66.5Z",
273
+ fill: "#27272A"
274
+ }),
275
+ /* @__PURE__ */ e("path", {
276
+ d: "M32 87C32 83.6863 34.6863 81 38 81H67C70.3137 81 73 83.6863 73 87C73 90.3137 70.3137 93 67 93H38C34.6863 93 32 90.3137 32 87Z",
277
+ fill: "#27272A"
278
+ }),
279
+ /* @__PURE__ */ e("circle", {
280
+ cx: "22.5",
281
+ cy: "25.5",
282
+ fill: "#3F3F46",
283
+ r: "5.5"
284
+ })
285
+ ]
286
+ });
10
287
  }
288
+ //#endregion
289
+ export { i as ThemePreviewDark, r as ThemePreviewLight, n as ThemePreviewSystem };
package/dist/core.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "@better-auth-ui/core";
1
+ export * from '@better-auth-ui/core';
@@ -1,5 +1,5 @@
1
- import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query";
2
- import type { BetterFetchError } from "better-auth/react";
1
+ import { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
2
+ import { BetterFetchError } from 'better-auth/react';
3
3
  type AuthFn = (...args: any) => Promise<any>;
4
4
  type MutationParams<TFn extends AuthFn> = undefined extends Parameters<TFn>[0] ? // biome-ignore lint/suspicious/noConfusingVoidType: void is needed for mutations with optional params
5
5
  void | Omit<NonNullable<Parameters<TFn>[0]>, "fetchOptions"> : Omit<Parameters<TFn>[0], "fetchOptions">;
@@ -1,10 +1,13 @@
1
- import { useMutation } from "@tanstack/react-query";
2
- export function useAuthMutation({ authFn, options }) {
3
- return useMutation({
4
- mutationFn: (params) => authFn({
5
- ...params,
6
- fetchOptions: { throw: true }
7
- }),
8
- ...options
9
- });
1
+ import { useMutation as e } from "@tanstack/react-query";
2
+ //#region src/hooks/auth/use-auth-mutation.ts
3
+ function t({ authFn: t, options: n }) {
4
+ return e({
5
+ mutationFn: (e) => t({
6
+ ...e,
7
+ fetchOptions: { throw: !0 }
8
+ }),
9
+ ...n
10
+ });
10
11
  }
12
+ //#endregion
13
+ export { t as useAuthMutation };
@@ -1,5 +1,5 @@
1
- import { type UseQueryOptions, type UseQueryResult } from "@tanstack/react-query";
2
- import type { BetterFetchError, BetterFetchOption } from "better-auth/react";
1
+ import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
+ import { BetterFetchError, BetterFetchOption } from 'better-auth/react';
3
3
  type BetterFetchFn = (options: {
4
4
  fetchOptions?: BetterFetchOption;
5
5
  }) => Promise<{
@@ -20,5 +20,5 @@ type UseAuthQueryProps<TFn extends BetterFetchFn> = {
20
20
  params?: OmitFetchOptions<Parameters<TFn>[0]>;
21
21
  options: UseAuthQueryOptions<TFn>;
22
22
  };
23
- export declare function useAuthQuery<TFn extends BetterFetchFn>({ authFn, params, options }: UseAuthQueryProps<TFn>): UseQueryResult<import("@tanstack/react-query").NoInfer<InferData<TFn>>, BetterFetchError>;
23
+ export declare function useAuthQuery<TFn extends BetterFetchFn>({ authFn, params, options }: UseAuthQueryProps<TFn>): UseQueryResult<import('@tanstack/react-query').NoInfer<InferData<TFn>>, BetterFetchError>;
24
24
  export {};
@@ -1,10 +1,13 @@
1
- import { useQuery } from "@tanstack/react-query";
2
- export function useAuthQuery({ authFn, params, options }) {
3
- return useQuery({
4
- queryFn: async () => {
5
- const result = await authFn({ ...params, fetchOptions: { throw: true } });
6
- return result;
7
- },
8
- ...options
9
- });
1
+ import { useQuery as e } from "@tanstack/react-query";
2
+ //#region src/hooks/auth/use-auth-query.ts
3
+ function t({ authFn: t, params: n, options: r }) {
4
+ return e({
5
+ queryFn: async () => await t({
6
+ ...n,
7
+ fetchOptions: { throw: !0 }
8
+ }),
9
+ ...r
10
+ });
10
11
  }
12
+ //#endregion
13
+ export { t as useAuthQuery };
@@ -1,5 +1,5 @@
1
- import { type AuthClient } from "@better-auth-ui/react";
2
- import type { UseAuthQueryOptions, UseAuthQueryResult } from "./use-auth-query";
1
+ import { AuthClient } from '../../lib/auth-client';
2
+ import { UseAuthQueryOptions, UseAuthQueryResult } from './use-auth-query';
3
3
  /**
4
4
  * Redirects unauthenticated users to the sign-in page while preserving the current URL and exposes the active auth session state.
5
5
  *
@@ -1,28 +1,23 @@
1
- import { useAuth } from "@better-auth-ui/react";
2
- import { useEffect } from "react";
3
- import { useSession } from "./use-session";
4
- /**
5
- * Redirects unauthenticated users to the sign-in page while preserving the current URL and exposes the active auth session state.
6
- *
7
- * @param options - Query options forwarded to the session query hook
8
- * @returns An object containing `data` (the current session or `undefined`), `isPending` (whether the session query is in progress), and other session query state
9
- */
10
- export function useAuthenticate(options) {
11
- const { basePaths, viewPaths, navigate } = useAuth();
12
- const session = useSession(options);
13
- useEffect(() => {
14
- if (session.data || session.isPending)
15
- return;
16
- const currentURL = window.location.pathname + window.location.search;
17
- const redirectTo = encodeURIComponent(currentURL);
18
- const signInPath = `${basePaths.auth}/${viewPaths.auth.signIn}?redirectTo=${redirectTo}`;
19
- navigate({ to: signInPath, replace: true });
20
- }, [
21
- basePaths.auth,
22
- session.data,
23
- session.isPending,
24
- viewPaths.auth.signIn,
25
- navigate
26
- ]);
27
- return session;
1
+ import { useAuth as e } from "../../components/auth/auth-provider.js";
2
+ import { useSession as t } from "./use-session.js";
3
+ import { useEffect as n } from "react";
4
+ //#region src/hooks/auth/use-authenticate.ts
5
+ function r(r) {
6
+ let { basePaths: i, viewPaths: a, navigate: o } = e(), s = t(r);
7
+ return n(() => {
8
+ if (s.data || s.isPending) return;
9
+ let e = window.location.pathname + window.location.search, t = encodeURIComponent(e);
10
+ o({
11
+ to: `${i.auth}/${a.auth.signIn}?redirectTo=${t}`,
12
+ replace: !0
13
+ });
14
+ }, [
15
+ i.auth,
16
+ s.data,
17
+ s.isPending,
18
+ a.auth.signIn,
19
+ o
20
+ ]), s;
28
21
  }
22
+ //#endregion
23
+ export { r as useAuthenticate };
@@ -0,0 +1,19 @@
1
+ import { AuthClient } from '../../lib/auth-client';
2
+ import { UseAuthMutationOptions } from './use-auth-mutation';
3
+ /**
4
+ * Hook that creates a mutation to check if a username is available.
5
+ *
6
+ * @returns The `useMutation` result where data contains `{ available: boolean }`.
7
+ */
8
+ export declare function useIsUsernameAvailable(options?: UseAuthMutationOptions<AuthClient["isUsernameAvailable"]>): import('./use-auth-mutation').UseAuthMutationResult<(<FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
9
+ username: string;
10
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
11
+ username: string;
12
+ } & {
13
+ fetchOptions?: FetchOptions | undefined;
14
+ }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
15
+ available: boolean;
16
+ }, {
17
+ code?: string | undefined;
18
+ message?: string | undefined;
19
+ }, FetchOptions["throw"] extends true ? true : false>>)>;
@@ -0,0 +1,12 @@
1
+ import { useAuth as e } from "../../components/auth/auth-provider.js";
2
+ import { useAuthMutation as t } from "./use-auth-mutation.js";
3
+ //#region src/hooks/auth/use-is-username-available.ts
4
+ function n(n) {
5
+ let { authClient: r } = e();
6
+ return t({
7
+ authFn: r.isUsernameAvailable,
8
+ options: n
9
+ });
10
+ }
11
+ //#endregion
12
+ export { n as useIsUsernameAvailable };
@@ -1,6 +1,5 @@
1
- import { type AuthClient } from "@better-auth-ui/react";
2
- import type { UseAuthMutationOptions } from "./use-auth-mutation";
3
- export { useAuthMutation } from "./use-auth-mutation";
1
+ import { AuthClient } from '../../lib/auth-client';
2
+ import { UseAuthMutationOptions } from './use-auth-mutation';
4
3
  /**
5
4
  * Hook that creates a mutation for the forgot-password flow.
6
5
  *
@@ -9,15 +8,15 @@ export { useAuthMutation } from "./use-auth-mutation";
9
8
  *
10
9
  * @returns The `useMutation` result.
11
10
  */
12
- export declare function useRequestPasswordReset(options?: UseAuthMutationOptions<AuthClient["requestPasswordReset"]>): import("./use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
11
+ export declare function useRequestPasswordReset(options?: UseAuthMutationOptions<AuthClient["requestPasswordReset"]>): import('./use-auth-mutation').UseAuthMutationResult<(<FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
13
12
  email: string;
14
13
  redirectTo?: string | undefined;
15
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
14
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
16
15
  email: string;
17
16
  redirectTo?: string | undefined;
18
17
  } & {
19
18
  fetchOptions?: FetchOptions | undefined;
20
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
19
+ }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
21
20
  status: boolean;
22
21
  message: string;
23
22
  }, {
@@ -1,14 +1,12 @@
1
- import { useAuth, useAuthMutation } from "@better-auth-ui/react";
2
- export { useAuthMutation } from "./use-auth-mutation";
3
- /**
4
- * Hook that creates a mutation for the forgot-password flow.
5
- *
6
- * The mutation sends a password reset request for the submitted email,
7
- * and navigates to the sign-in view on success.
8
- *
9
- * @returns The `useMutation` result.
10
- */
11
- export function useRequestPasswordReset(options) {
12
- const { authClient } = useAuth();
13
- return useAuthMutation({ authFn: authClient.requestPasswordReset, options });
1
+ import { useAuth as e } from "../../components/auth/auth-provider.js";
2
+ import { useAuthMutation as t } from "./use-auth-mutation.js";
3
+ //#region src/hooks/auth/use-request-password-reset.ts
4
+ function n(n) {
5
+ let { authClient: r } = e();
6
+ return t({
7
+ authFn: r.requestPasswordReset,
8
+ options: n
9
+ });
14
10
  }
11
+ //#endregion
12
+ export { n as useRequestPasswordReset };
@@ -1,6 +1,5 @@
1
- import { type AuthClient } from "@better-auth-ui/react";
2
- import type { UseAuthMutationOptions } from "./use-auth-mutation";
3
- export { useAuthMutation } from "./use-auth-mutation";
1
+ import { AuthClient } from '../../lib/auth-client';
2
+ import { UseAuthMutationOptions } from './use-auth-mutation';
4
3
  /**
5
4
  * Hook that creates a mutation for the reset-password flow.
6
5
  *
@@ -8,32 +7,32 @@ export { useAuthMutation } from "./use-auth-mutation";
8
7
  *
9
8
  * @returns The `useMutation` result.
10
9
  */
11
- export declare function useResetPassword(options?: UseAuthMutationOptions<AuthClient["resetPassword"]>): import("./use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
10
+ export declare function useResetPassword(options?: UseAuthMutationOptions<AuthClient["resetPassword"]>): import('./use-auth-mutation').UseAuthMutationResult<(<FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
12
11
  newPassword: string;
13
12
  token?: string | undefined;
14
13
  }> & Record<string, any>, Partial<{
15
14
  token?: string | undefined;
16
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
15
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
17
16
  newPassword: string;
18
17
  token?: string | undefined;
19
18
  } & {
20
19
  fetchOptions?: FetchOptions | undefined;
21
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
20
+ }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
22
21
  status: boolean;
23
22
  }, {
24
23
  code?: string | undefined;
25
24
  message?: string | undefined;
26
25
  }, FetchOptions["throw"] extends true ? true : false>>) & {
27
- ":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
26
+ ":token": <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
28
27
  callbackURL: string;
29
28
  }> & Record<string, any>, {
30
29
  token: string;
31
- }>>(data_0: import("better-auth").Prettify<{
30
+ }>>(data_0: import('better-auth').Prettify<{
32
31
  query: {
33
32
  callbackURL: string;
34
33
  };
35
34
  fetchOptions?: FetchOptions | undefined;
36
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<never, {
35
+ }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<never, {
37
36
  code?: string | undefined;
38
37
  message?: string | undefined;
39
38
  }, FetchOptions["throw"] extends true ? true : false>>;
@@ -1,13 +1,12 @@
1
- import { useAuth, useAuthMutation } from "@better-auth-ui/react";
2
- export { useAuthMutation } from "./use-auth-mutation";
3
- /**
4
- * Hook that creates a mutation for the reset-password flow.
5
- *
6
- * The mutation resets the user's password using the provided token and new password.
7
- *
8
- * @returns The `useMutation` result.
9
- */
10
- export function useResetPassword(options) {
11
- const { authClient } = useAuth();
12
- return useAuthMutation({ authFn: authClient.resetPassword, options });
1
+ import { useAuth as e } from "../../components/auth/auth-provider.js";
2
+ import { useAuthMutation as t } from "./use-auth-mutation.js";
3
+ //#region src/hooks/auth/use-reset-password.ts
4
+ function n(n) {
5
+ let { authClient: r } = e();
6
+ return t({
7
+ authFn: r.resetPassword,
8
+ options: n
9
+ });
13
10
  }
11
+ //#endregion
12
+ export { n as useResetPassword };