better-auth-ui 3.2.21 → 3.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "better-auth-ui",
3
3
  "homepage": "https://stackproviders.github.io/better-auth-ui/",
4
- "version": "3.2.21",
4
+ "version": "3.2.23",
5
5
  "description": "Plug & play shadcn/ui components for better-auth",
6
6
  "type": "module",
7
7
  "main": "./dist/index.cjs",
@@ -91,8 +91,8 @@ export function AuthView({
91
91
  socialLayout = !credentials
92
92
  ? "vertical"
93
93
  : social?.providers && social.providers.length > 2
94
- ? "horizontal"
95
- : "vertical"
94
+ ? "horizontal"
95
+ : "vertical"
96
96
  }
97
97
 
98
98
  const path = pathProp ?? pathname?.split("/").pop()
@@ -227,16 +227,16 @@ export function AuthView({
227
227
  >
228
228
  <Separator
229
229
  className={cn(
230
- "!w-auto grow",
230
+ "w-auto! grow",
231
231
  classNames?.separator
232
232
  )}
233
233
  />
234
- <span className="flex-shrink-0 text-muted-foreground text-sm">
234
+ <span className="shrink-0 text-muted-foreground text-sm">
235
235
  {localization.OR_CONTINUE_WITH}
236
236
  </span>
237
237
  <Separator
238
238
  className={cn(
239
- "!w-auto grow",
239
+ "w-auto! grow",
240
240
  classNames?.separator
241
241
  )}
242
242
  />
@@ -246,61 +246,61 @@ export function AuthView({
246
246
  <div className="grid gap-4">
247
247
  {(social?.providers?.length ||
248
248
  genericOAuth?.providers?.length) && (
249
- <div
250
- className={cn(
251
- "flex w-full items-center justify-between gap-4",
252
- socialLayout === "horizontal" &&
249
+ <div
250
+ className={cn(
251
+ "flex w-full items-center justify-between gap-4",
252
+ socialLayout === "horizontal" &&
253
253
  "flex-wrap",
254
- socialLayout === "vertical" &&
254
+ socialLayout === "vertical" &&
255
255
  "flex-col",
256
- socialLayout === "grid" &&
256
+ socialLayout === "grid" &&
257
257
  "grid grid-cols-2"
258
- )}
259
- >
260
- {social?.providers?.map((provider) => {
261
- const socialProvider =
262
- socialProviders.find(
263
- (socialProvider) =>
264
- socialProvider.provider ===
265
- provider
258
+ )}
259
+ >
260
+ {social?.providers?.map((provider) => {
261
+ const socialProvider =
262
+ socialProviders.find(
263
+ (socialProvider) =>
264
+ socialProvider.provider ===
265
+ provider
266
+ )
267
+ if (!socialProvider) return null
268
+ return (
269
+ <ProviderButton
270
+ key={provider}
271
+ classNames={classNames}
272
+ callbackURL={callbackURL}
273
+ isSubmitting={isSubmitting}
274
+ localization={localization}
275
+ provider={socialProvider}
276
+ redirectTo={redirectTo}
277
+ setIsSubmitting={
278
+ setIsSubmitting
279
+ }
280
+ socialLayout={socialLayout}
281
+ />
266
282
  )
267
- if (!socialProvider) return null
268
- return (
269
- <ProviderButton
270
- key={provider}
271
- classNames={classNames}
272
- callbackURL={callbackURL}
273
- isSubmitting={isSubmitting}
274
- localization={localization}
275
- provider={socialProvider}
276
- redirectTo={redirectTo}
277
- setIsSubmitting={
278
- setIsSubmitting
279
- }
280
- socialLayout={socialLayout}
281
- />
282
- )
283
- })}
284
- {genericOAuth?.providers?.map(
285
- (provider) => (
286
- <ProviderButton
287
- key={provider.provider}
288
- classNames={classNames}
289
- callbackURL={callbackURL}
290
- isSubmitting={isSubmitting}
291
- localization={localization}
292
- provider={provider}
293
- redirectTo={redirectTo}
294
- setIsSubmitting={
295
- setIsSubmitting
296
- }
297
- socialLayout={socialLayout}
298
- other
299
- />
300
- )
301
- )}
302
- </div>
303
- )}
283
+ })}
284
+ {genericOAuth?.providers?.map(
285
+ (provider) => (
286
+ <ProviderButton
287
+ key={provider.provider}
288
+ classNames={classNames}
289
+ callbackURL={callbackURL}
290
+ isSubmitting={isSubmitting}
291
+ localization={localization}
292
+ provider={provider}
293
+ redirectTo={redirectTo}
294
+ setIsSubmitting={
295
+ setIsSubmitting
296
+ }
297
+ socialLayout={socialLayout}
298
+ other
299
+ />
300
+ )
301
+ )}
302
+ </div>
303
+ )}
304
304
 
305
305
  {passkey &&
306
306
  [
@@ -332,8 +332,8 @@ export function AuthView({
332
332
  )}
333
333
  >
334
334
  {view === "SIGN_IN" ||
335
- view === "MAGIC_LINK" ||
336
- view === "EMAIL_OTP" ? (
335
+ view === "MAGIC_LINK" ||
336
+ view === "EMAIL_OTP" ? (
337
337
  localization.DONT_HAVE_AN_ACCOUNT
338
338
  ) : view === "SIGN_UP" ? (
339
339
  localization.ALREADY_HAVE_AN_ACCOUNT
@@ -342,17 +342,16 @@ export function AuthView({
342
342
  )}
343
343
 
344
344
  {view === "SIGN_IN" ||
345
- view === "MAGIC_LINK" ||
346
- view === "EMAIL_OTP" ||
347
- view === "SIGN_UP" ? (
345
+ view === "MAGIC_LINK" ||
346
+ view === "EMAIL_OTP" ||
347
+ view === "SIGN_UP" ? (
348
348
  <Link
349
349
  className={cn(
350
350
  "text-foreground underline",
351
351
  classNames?.footerLink
352
352
  )}
353
- href={`${basePath}/${viewPaths[(view === "SIGN_IN" || view === "MAGIC_LINK" || view === "EMAIL_OTP") ? "SIGN_UP" : "SIGN_IN"]}${
354
- isHydrated ? window.location.search : ""
355
- }`}
353
+ href={`${basePath}/${viewPaths[(view === "SIGN_IN" || view === "MAGIC_LINK" || view === "EMAIL_OTP") ? "SIGN_UP" : "SIGN_IN"]}${isHydrated ? window.location.search : ""
354
+ }`}
356
355
  >
357
356
  <Button
358
357
  variant="link"
@@ -363,8 +362,8 @@ export function AuthView({
363
362
  )}
364
363
  >
365
364
  {view === "SIGN_IN" ||
366
- view === "MAGIC_LINK" ||
367
- view === "EMAIL_OTP"
365
+ view === "MAGIC_LINK" ||
366
+ view === "EMAIL_OTP"
368
367
  ? localization.SIGN_UP
369
368
  : localization.SIGN_IN}
370
369
  </Button>
@@ -87,7 +87,7 @@ export function OrganizationLogoCard({
87
87
  </div>
88
88
 
89
89
  <SettingsCardFooter
90
- className="!py-5"
90
+ className="py-5!"
91
91
  instructions={localization.LOGO_INSTRUCTIONS}
92
92
  classNames={classNames}
93
93
  isPending
@@ -297,7 +297,7 @@ function OrganizationLogoForm({
297
297
  </div>
298
298
 
299
299
  <SettingsCardFooter
300
- className="!py-5"
300
+ className="py-5!"
301
301
  instructions={localization.LOGO_INSTRUCTIONS}
302
302
  classNames={classNames}
303
303
  isPending={isPending}
@@ -262,10 +262,10 @@ export function OrganizationSwitcher({
262
262
  {...props}
263
263
  >
264
264
  {isPending ||
265
- activeOrganization ||
266
- !sessionData ||
267
- (user as User)?.isAnonymous ||
268
- hidePersonal ? (
265
+ activeOrganization ||
266
+ !sessionData ||
267
+ (user as User)?.isAnonymous ||
268
+ hidePersonal ? (
269
269
  <OrganizationLogo
270
270
  key={activeOrganization?.logo}
271
271
  className={cn(
@@ -295,7 +295,7 @@ export function OrganizationSwitcher({
295
295
  ) : (
296
296
  <Button
297
297
  className={cn(
298
- "!p-2 h-fit",
298
+ "p-2! h-fit",
299
299
  className,
300
300
  classNames?.trigger?.base
301
301
  )}
@@ -303,10 +303,10 @@ export function OrganizationSwitcher({
303
303
  {...props}
304
304
  >
305
305
  {isPending ||
306
- activeOrganization ||
307
- !sessionData ||
308
- (user as User)?.isAnonymous ||
309
- hidePersonal ? (
306
+ activeOrganization ||
307
+ !sessionData ||
308
+ (user as User)?.isAnonymous ||
309
+ hidePersonal ? (
310
310
  <OrganizationCellView
311
311
  classNames={
312
312
  classNames?.trigger?.organization
@@ -350,8 +350,8 @@ export function OrganizationSwitcher({
350
350
  {(user && !(user as User).isAnonymous) || isPending ? (
351
351
  <>
352
352
  {activeOrganizationPending ||
353
- activeOrganization ||
354
- hidePersonal ? (
353
+ activeOrganization ||
354
+ hidePersonal ? (
355
355
  <OrganizationCellView
356
356
  classNames={
357
357
  classNames?.content?.organization
@@ -385,7 +385,7 @@ export function OrganizationSwitcher({
385
385
  <Button
386
386
  size="icon"
387
387
  variant="outline"
388
- className="!size-8 ml-auto"
388
+ className="size-8! ml-auto"
389
389
  onClick={() =>
390
390
  setDropdownOpen(false)
391
391
  }
@@ -480,8 +480,8 @@ export function OrganizationSwitcher({
480
480
  )}
481
481
 
482
482
  {!isPending &&
483
- sessionData &&
484
- !(user as User).isAnonymous ? (
483
+ sessionData &&
484
+ !(user as User).isAnonymous ? (
485
485
  <DropdownMenuItem
486
486
  className={cn(classNames?.content?.menuItem)}
487
487
  onClick={() => setIsCreateOrgDialogOpen(true)}
@@ -31,7 +31,7 @@ export function PasswordInput({
31
31
  {enableToggle && (
32
32
  <>
33
33
  <Button
34
- className="!bg-transparent absolute top-0 right-0"
34
+ className="bg-transparent! absolute top-0 right-0"
35
35
  disabled={disabled}
36
36
  size="icon"
37
37
  type="button"
@@ -187,7 +187,7 @@ export function UpdateAvatarCard({
187
187
  </div>
188
188
 
189
189
  <SettingsCardFooter
190
- className="!py-5"
190
+ className="py-5!"
191
191
  instructions={localization.AVATAR_INSTRUCTIONS}
192
192
  classNames={classNames}
193
193
  isPending={isPending}
@@ -61,7 +61,7 @@ export function ApiKeyCell({
61
61
  )}
62
62
  >
63
63
  <KeyRoundIcon
64
- className={cn("size-4 flex-shrink-0", classNames?.icon)}
64
+ className={cn("size-4 shrink-0", classNames?.icon)}
65
65
  />
66
66
 
67
67
  <div className="flex flex-col truncate">
@@ -206,7 +206,7 @@ export function UserButton({
206
206
  ) : (
207
207
  <Button
208
208
  className={cn(
209
- "!p-2 h-fit",
209
+ "p-2! h-fit",
210
210
  className,
211
211
  classNames?.trigger?.base
212
212
  )}