@riligar/auth-react 1.28.3 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +151 -141
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +150 -140
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useMemo, useEffect, createContext, useState, useRef } from 'react';
|
|
|
3
3
|
import { useShallow } from 'zustand/react/shallow';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { Navigate, Outlet, useNavigate } from 'react-router-dom';
|
|
6
|
-
import { Modal, Stack, Text, Image, Title, Paper, TextInput, PasswordInput, Anchor, Button, Divider, Group, Center, Loader, Box, Avatar, Collapse,
|
|
6
|
+
import { Modal, Stack, Text, Image, Title, Paper, TextInput, PasswordInput, Anchor, Button, Divider, Group, Center, Loader, Box, Avatar, Collapse, FileButton, Tooltip, ThemeIcon, Badge } from '@mantine/core';
|
|
7
7
|
import { useForm } from '@mantine/form';
|
|
8
8
|
import { IconMail, IconLock, IconArrowRight, IconBrandGoogle, IconBrandGithub, IconUser, IconSend, IconCheck, IconX, IconRefresh, IconPhoto, IconTrash, IconPencil, IconShield, IconKey, IconDevices, IconDeviceMobile, IconLogout, IconUserCircle } from '@tabler/icons-react';
|
|
9
9
|
|
|
@@ -2381,14 +2381,17 @@ function UserProfile({
|
|
|
2381
2381
|
mb: "lg",
|
|
2382
2382
|
children: [/*#__PURE__*/jsx(ThemeIcon, {
|
|
2383
2383
|
size: 36,
|
|
2384
|
-
variant: "
|
|
2384
|
+
variant: "subtle",
|
|
2385
|
+
color: "gray",
|
|
2385
2386
|
children: /*#__PURE__*/jsx(Icon, {
|
|
2386
|
-
size:
|
|
2387
|
+
size: 28,
|
|
2388
|
+
stroke: 1.5
|
|
2387
2389
|
})
|
|
2388
|
-
}), /*#__PURE__*/jsxs(
|
|
2390
|
+
}), /*#__PURE__*/jsxs(Stack, {
|
|
2391
|
+
gap: 0,
|
|
2389
2392
|
children: [/*#__PURE__*/jsx(Text, {
|
|
2390
2393
|
fw: 600,
|
|
2391
|
-
size: "
|
|
2394
|
+
size: "sm",
|
|
2392
2395
|
children: sectionTitle
|
|
2393
2396
|
}), description && /*#__PURE__*/jsx(Text, {
|
|
2394
2397
|
size: "xs",
|
|
@@ -2406,11 +2409,12 @@ function UserProfile({
|
|
|
2406
2409
|
actionLabel,
|
|
2407
2410
|
onClick,
|
|
2408
2411
|
expanded
|
|
2409
|
-
}) => /*#__PURE__*/jsx(
|
|
2410
|
-
|
|
2412
|
+
}) => /*#__PURE__*/jsx(Box, {
|
|
2413
|
+
py: "xs",
|
|
2411
2414
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2412
2415
|
justify: "space-between",
|
|
2413
2416
|
wrap: "nowrap",
|
|
2417
|
+
align: "center",
|
|
2414
2418
|
children: [/*#__PURE__*/jsxs(Group, {
|
|
2415
2419
|
gap: "xl",
|
|
2416
2420
|
wrap: "nowrap",
|
|
@@ -2419,9 +2423,6 @@ function UserProfile({
|
|
|
2419
2423
|
size: "sm",
|
|
2420
2424
|
c: "dimmed",
|
|
2421
2425
|
w: 100,
|
|
2422
|
-
style: {
|
|
2423
|
-
flexShrink: 0
|
|
2424
|
-
},
|
|
2425
2426
|
children: label
|
|
2426
2427
|
}), /*#__PURE__*/jsx(Box, {
|
|
2427
2428
|
flex: 1,
|
|
@@ -2431,10 +2432,11 @@ function UserProfile({
|
|
|
2431
2432
|
label: actionLabel || action,
|
|
2432
2433
|
position: "left",
|
|
2433
2434
|
children: /*#__PURE__*/jsx(Anchor, {
|
|
2434
|
-
size: "
|
|
2435
|
-
fw:
|
|
2435
|
+
size: "xs",
|
|
2436
|
+
fw: 300,
|
|
2436
2437
|
onClick: onClick,
|
|
2437
|
-
c:
|
|
2438
|
+
c: "gray",
|
|
2439
|
+
underline: "none",
|
|
2438
2440
|
children: expanded ? labels.cancel || 'Cancel' : action
|
|
2439
2441
|
})
|
|
2440
2442
|
})]
|
|
@@ -2444,7 +2446,7 @@ function UserProfile({
|
|
|
2444
2446
|
// Conteúdo interno compartilhado
|
|
2445
2447
|
const profileContent = /*#__PURE__*/jsxs(Fragment, {
|
|
2446
2448
|
children: [(showAvatar || showName || showEmail) && /*#__PURE__*/jsxs(Box, {
|
|
2447
|
-
mb: "
|
|
2449
|
+
mb: "lg",
|
|
2448
2450
|
children: [/*#__PURE__*/jsx(SectionHeader, {
|
|
2449
2451
|
icon: IconUser,
|
|
2450
2452
|
sectionTitle: labels.profileSection || 'Profile',
|
|
@@ -2464,56 +2466,51 @@ function UserProfile({
|
|
|
2464
2466
|
src: user?.image,
|
|
2465
2467
|
name: user?.name || user?.email,
|
|
2466
2468
|
size: 48,
|
|
2467
|
-
radius: "xl"
|
|
2468
|
-
color
|
|
2469
|
+
radius: "xl"
|
|
2470
|
+
// color="initials"
|
|
2469
2471
|
})
|
|
2470
2472
|
})
|
|
2471
2473
|
}), /*#__PURE__*/jsx(Collapse, {
|
|
2472
2474
|
in: editingSection === 'avatar',
|
|
2473
|
-
children: /*#__PURE__*/jsx(
|
|
2474
|
-
p: "
|
|
2475
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
2476
|
+
p: "sm",
|
|
2475
2477
|
withBorder: true,
|
|
2478
|
+
radius: "sm",
|
|
2476
2479
|
children: /*#__PURE__*/jsxs(Stack, {
|
|
2477
2480
|
gap: "md",
|
|
2478
2481
|
align: "center",
|
|
2479
|
-
children: [/*#__PURE__*/jsx(
|
|
2480
|
-
|
|
2481
|
-
id: "avatar-upload",
|
|
2482
|
+
children: [/*#__PURE__*/jsx(FileButton, {
|
|
2483
|
+
onChange: handleAvatarFileChange,
|
|
2482
2484
|
accept: "image/*",
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
position: "bottom",
|
|
2490
|
-
children: /*#__PURE__*/jsxs(Box, {
|
|
2491
|
-
onClick: () => document.getElementById('avatar-upload')?.click(),
|
|
2492
|
-
style: {
|
|
2493
|
-
position: 'relative',
|
|
2494
|
-
cursor: 'pointer',
|
|
2495
|
-
borderRadius: '50%'
|
|
2496
|
-
},
|
|
2497
|
-
children: [/*#__PURE__*/jsx(Avatar, {
|
|
2498
|
-
src: avatarPreview || user?.image,
|
|
2499
|
-
name: user?.name || user?.email,
|
|
2500
|
-
size: 100,
|
|
2501
|
-
radius: 100,
|
|
2502
|
-
color: "initials"
|
|
2503
|
-
}), /*#__PURE__*/jsx(ThemeIcon, {
|
|
2504
|
-
size: 32,
|
|
2505
|
-
radius: "xl",
|
|
2506
|
-
color: "blue",
|
|
2485
|
+
children: props => /*#__PURE__*/jsx(Tooltip, {
|
|
2486
|
+
label: labels.clickToChange || 'Clique para alterar',
|
|
2487
|
+
position: "bottom",
|
|
2488
|
+
children: /*#__PURE__*/jsxs(Box, {
|
|
2489
|
+
...props,
|
|
2490
|
+
pos: "relative",
|
|
2507
2491
|
style: {
|
|
2508
|
-
|
|
2492
|
+
cursor: 'pointer'
|
|
2493
|
+
},
|
|
2494
|
+
children: [/*#__PURE__*/jsx(Avatar, {
|
|
2495
|
+
src: avatarPreview || user?.image,
|
|
2496
|
+
name: user?.name || user?.email,
|
|
2497
|
+
size: 80,
|
|
2498
|
+
radius: 80,
|
|
2499
|
+
color: "gray"
|
|
2500
|
+
}), /*#__PURE__*/jsx(ThemeIcon, {
|
|
2501
|
+
size: 26,
|
|
2502
|
+
radius: "xl",
|
|
2503
|
+
color: "gray",
|
|
2504
|
+
pos: "absolute",
|
|
2509
2505
|
bottom: 0,
|
|
2510
2506
|
right: 0,
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2507
|
+
bd: "2px solid body",
|
|
2508
|
+
children: /*#__PURE__*/jsx(IconPhoto, {
|
|
2509
|
+
size: 14,
|
|
2510
|
+
stroke: 1.5
|
|
2511
|
+
})
|
|
2512
|
+
})]
|
|
2513
|
+
})
|
|
2517
2514
|
})
|
|
2518
2515
|
}), /*#__PURE__*/jsx(Text, {
|
|
2519
2516
|
size: "xs",
|
|
@@ -2522,20 +2519,18 @@ function UserProfile({
|
|
|
2522
2519
|
children: labels.avatarHint || `Máximo ${Math.round(maxAvatarSize / 1024)}KB • JPG, PNG, GIF, WebP`
|
|
2523
2520
|
}), /*#__PURE__*/jsxs(Group, {
|
|
2524
2521
|
justify: "center",
|
|
2525
|
-
gap: "
|
|
2526
|
-
children: [user?.image && /*#__PURE__*/jsx(
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
children: labels.remove || 'Remover'
|
|
2538
|
-
})
|
|
2522
|
+
gap: "xs",
|
|
2523
|
+
children: [user?.image && /*#__PURE__*/jsx(Button, {
|
|
2524
|
+
variant: "subtle",
|
|
2525
|
+
color: "gray",
|
|
2526
|
+
size: "xs",
|
|
2527
|
+
onClick: handleRemoveAvatar,
|
|
2528
|
+
loading: loadingUpdateProfile,
|
|
2529
|
+
leftSection: /*#__PURE__*/jsx(IconTrash, {
|
|
2530
|
+
size: 14,
|
|
2531
|
+
stroke: 1.5
|
|
2532
|
+
}),
|
|
2533
|
+
children: labels.remove || 'Remover'
|
|
2539
2534
|
}), /*#__PURE__*/jsx(Button, {
|
|
2540
2535
|
variant: "default",
|
|
2541
2536
|
size: "xs",
|
|
@@ -2545,7 +2540,8 @@ function UserProfile({
|
|
|
2545
2540
|
size: "xs",
|
|
2546
2541
|
loading: loadingUpdateProfile,
|
|
2547
2542
|
leftSection: /*#__PURE__*/jsx(IconCheck, {
|
|
2548
|
-
size: 14
|
|
2543
|
+
size: 14,
|
|
2544
|
+
stroke: 1.5
|
|
2549
2545
|
}),
|
|
2550
2546
|
onClick: handleChangeAvatar,
|
|
2551
2547
|
disabled: !avatarPreview || avatarPreview === user?.image,
|
|
@@ -2565,7 +2561,8 @@ function UserProfile({
|
|
|
2565
2561
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2566
2562
|
gap: "xs",
|
|
2567
2563
|
children: [/*#__PURE__*/jsx(IconPencil, {
|
|
2568
|
-
size:
|
|
2564
|
+
size: 18,
|
|
2565
|
+
stroke: 1.5,
|
|
2569
2566
|
color: "var(--mantine-color-dimmed)"
|
|
2570
2567
|
}), /*#__PURE__*/jsx(Text, {
|
|
2571
2568
|
size: "sm",
|
|
@@ -2574,9 +2571,10 @@ function UserProfile({
|
|
|
2574
2571
|
})
|
|
2575
2572
|
}), /*#__PURE__*/jsx(Collapse, {
|
|
2576
2573
|
in: editingSection === 'name',
|
|
2577
|
-
children: /*#__PURE__*/jsx(
|
|
2578
|
-
p: "
|
|
2574
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
2575
|
+
p: "sm",
|
|
2579
2576
|
withBorder: true,
|
|
2577
|
+
radius: "sm",
|
|
2580
2578
|
children: /*#__PURE__*/jsx("form", {
|
|
2581
2579
|
onSubmit: nameForm.onSubmit(handleChangeName),
|
|
2582
2580
|
children: /*#__PURE__*/jsxs(Stack, {
|
|
@@ -2585,26 +2583,25 @@ function UserProfile({
|
|
|
2585
2583
|
label: labels.name || 'Nome',
|
|
2586
2584
|
placeholder: labels.namePlaceholder || 'Digite seu nome',
|
|
2587
2585
|
leftSection: /*#__PURE__*/jsx(IconUser, {
|
|
2588
|
-
size: 16
|
|
2586
|
+
size: 16,
|
|
2587
|
+
stroke: 1.5
|
|
2589
2588
|
}),
|
|
2590
2589
|
...nameForm.getInputProps('name')
|
|
2591
2590
|
}), /*#__PURE__*/jsxs(Group, {
|
|
2592
2591
|
justify: "flex-end",
|
|
2593
|
-
gap: "
|
|
2592
|
+
gap: "xs",
|
|
2594
2593
|
children: [/*#__PURE__*/jsx(Button, {
|
|
2595
2594
|
variant: "default",
|
|
2596
2595
|
size: "xs",
|
|
2597
2596
|
onClick: () => handleToggleSection('name'),
|
|
2598
|
-
leftSection: /*#__PURE__*/jsx(IconX, {
|
|
2599
|
-
size: 14
|
|
2600
|
-
}),
|
|
2601
2597
|
children: labels.cancel || 'Cancelar'
|
|
2602
2598
|
}), /*#__PURE__*/jsx(Button, {
|
|
2603
2599
|
type: "submit",
|
|
2604
2600
|
size: "xs",
|
|
2605
2601
|
loading: loadingUpdateProfile,
|
|
2606
2602
|
leftSection: /*#__PURE__*/jsx(IconCheck, {
|
|
2607
|
-
size: 14
|
|
2603
|
+
size: 14,
|
|
2604
|
+
stroke: 1.5
|
|
2608
2605
|
}),
|
|
2609
2606
|
children: labels.save || 'Salvar'
|
|
2610
2607
|
})]
|
|
@@ -2623,7 +2620,8 @@ function UserProfile({
|
|
|
2623
2620
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2624
2621
|
gap: "xs",
|
|
2625
2622
|
children: [/*#__PURE__*/jsx(IconMail, {
|
|
2626
|
-
size:
|
|
2623
|
+
size: 18,
|
|
2624
|
+
stroke: 1.5,
|
|
2627
2625
|
color: "var(--mantine-color-dimmed)"
|
|
2628
2626
|
}), /*#__PURE__*/jsx(Text, {
|
|
2629
2627
|
size: "sm",
|
|
@@ -2632,9 +2630,10 @@ function UserProfile({
|
|
|
2632
2630
|
})
|
|
2633
2631
|
}), /*#__PURE__*/jsx(Collapse, {
|
|
2634
2632
|
in: editingSection === 'email',
|
|
2635
|
-
children: /*#__PURE__*/jsx(
|
|
2636
|
-
p: "
|
|
2633
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
2634
|
+
p: "sm",
|
|
2637
2635
|
withBorder: true,
|
|
2636
|
+
radius: "sm",
|
|
2638
2637
|
children: /*#__PURE__*/jsx("form", {
|
|
2639
2638
|
onSubmit: emailForm.onSubmit(handleChangeEmail),
|
|
2640
2639
|
children: /*#__PURE__*/jsxs(Stack, {
|
|
@@ -2643,26 +2642,25 @@ function UserProfile({
|
|
|
2643
2642
|
label: labels.newEmail || 'Novo Email',
|
|
2644
2643
|
placeholder: labels.newEmailPlaceholder || 'Digite o novo email',
|
|
2645
2644
|
leftSection: /*#__PURE__*/jsx(IconMail, {
|
|
2646
|
-
size: 16
|
|
2645
|
+
size: 16,
|
|
2646
|
+
stroke: 1.5
|
|
2647
2647
|
}),
|
|
2648
2648
|
...emailForm.getInputProps('newEmail')
|
|
2649
2649
|
}), /*#__PURE__*/jsxs(Group, {
|
|
2650
2650
|
justify: "flex-end",
|
|
2651
|
-
gap: "
|
|
2651
|
+
gap: "xs",
|
|
2652
2652
|
children: [/*#__PURE__*/jsx(Button, {
|
|
2653
2653
|
variant: "default",
|
|
2654
2654
|
size: "xs",
|
|
2655
2655
|
onClick: () => handleToggleSection('email'),
|
|
2656
|
-
leftSection: /*#__PURE__*/jsx(IconX, {
|
|
2657
|
-
size: 14
|
|
2658
|
-
}),
|
|
2659
2656
|
children: labels.cancel || 'Cancelar'
|
|
2660
2657
|
}), /*#__PURE__*/jsx(Button, {
|
|
2661
2658
|
type: "submit",
|
|
2662
2659
|
size: "xs",
|
|
2663
2660
|
loading: loadingChangeEmail,
|
|
2664
2661
|
leftSection: /*#__PURE__*/jsx(IconCheck, {
|
|
2665
|
-
size: 14
|
|
2662
|
+
size: 14,
|
|
2663
|
+
stroke: 1.5
|
|
2666
2664
|
}),
|
|
2667
2665
|
children: labels.save || 'Salvar'
|
|
2668
2666
|
})]
|
|
@@ -2691,7 +2689,8 @@ function UserProfile({
|
|
|
2691
2689
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2692
2690
|
gap: "xs",
|
|
2693
2691
|
children: [/*#__PURE__*/jsx(IconKey, {
|
|
2694
|
-
size:
|
|
2692
|
+
size: 18,
|
|
2693
|
+
stroke: 1.5,
|
|
2695
2694
|
color: "var(--mantine-color-dimmed)"
|
|
2696
2695
|
}), /*#__PURE__*/jsx(Text, {
|
|
2697
2696
|
size: "sm",
|
|
@@ -2701,9 +2700,10 @@ function UserProfile({
|
|
|
2701
2700
|
})
|
|
2702
2701
|
}), /*#__PURE__*/jsx(Collapse, {
|
|
2703
2702
|
in: editingSection === 'password',
|
|
2704
|
-
children: /*#__PURE__*/jsx(
|
|
2705
|
-
p: "
|
|
2703
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
2704
|
+
p: "sm",
|
|
2706
2705
|
withBorder: true,
|
|
2706
|
+
radius: "sm",
|
|
2707
2707
|
children: /*#__PURE__*/jsx("form", {
|
|
2708
2708
|
onSubmit: passwordForm.onSubmit(handleChangePassword),
|
|
2709
2709
|
children: /*#__PURE__*/jsxs(Stack, {
|
|
@@ -2728,16 +2728,14 @@ function UserProfile({
|
|
|
2728
2728
|
variant: "default",
|
|
2729
2729
|
size: "xs",
|
|
2730
2730
|
onClick: () => handleToggleSection('password'),
|
|
2731
|
-
leftSection: /*#__PURE__*/jsx(IconX, {
|
|
2732
|
-
size: 14
|
|
2733
|
-
}),
|
|
2734
2731
|
children: labels.cancel || 'Cancelar'
|
|
2735
2732
|
}), /*#__PURE__*/jsx(Button, {
|
|
2736
2733
|
type: "submit",
|
|
2737
2734
|
size: "xs",
|
|
2738
2735
|
loading: loadingChangePassword,
|
|
2739
2736
|
leftSection: /*#__PURE__*/jsx(IconCheck, {
|
|
2740
|
-
size: 14
|
|
2737
|
+
size: 14,
|
|
2738
|
+
stroke: 1.5
|
|
2741
2739
|
}),
|
|
2742
2740
|
children: labels.save || 'Salvar'
|
|
2743
2741
|
})]
|
|
@@ -2756,7 +2754,8 @@ function UserProfile({
|
|
|
2756
2754
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2757
2755
|
gap: "xs",
|
|
2758
2756
|
children: [/*#__PURE__*/jsx(IconDevices, {
|
|
2759
|
-
size:
|
|
2757
|
+
size: 18,
|
|
2758
|
+
stroke: 1.5,
|
|
2760
2759
|
color: "var(--mantine-color-dimmed)"
|
|
2761
2760
|
}), /*#__PURE__*/jsx(Text, {
|
|
2762
2761
|
size: "sm",
|
|
@@ -2766,62 +2765,62 @@ function UserProfile({
|
|
|
2766
2765
|
})
|
|
2767
2766
|
}), /*#__PURE__*/jsx(Collapse, {
|
|
2768
2767
|
in: editingSection === 'sessions',
|
|
2769
|
-
children: /*#__PURE__*/jsx(
|
|
2770
|
-
p: "
|
|
2768
|
+
children: /*#__PURE__*/jsx(Paper, {
|
|
2769
|
+
p: "sm",
|
|
2771
2770
|
withBorder: true,
|
|
2771
|
+
radius: "sm",
|
|
2772
2772
|
children: /*#__PURE__*/jsx(Stack, {
|
|
2773
|
-
gap: "
|
|
2773
|
+
gap: "xs",
|
|
2774
2774
|
children: loadingListSessions ? /*#__PURE__*/jsx(Text, {
|
|
2775
|
-
size: "
|
|
2775
|
+
size: "xs",
|
|
2776
2776
|
c: "dimmed",
|
|
2777
2777
|
ta: "center",
|
|
2778
|
+
py: "md",
|
|
2778
2779
|
children: labels.loadingSessions || 'Carregando sessões...'
|
|
2779
2780
|
}) : sessions.length === 0 ? /*#__PURE__*/jsx(Text, {
|
|
2780
|
-
size: "
|
|
2781
|
+
size: "xs",
|
|
2781
2782
|
c: "dimmed",
|
|
2782
2783
|
ta: "center",
|
|
2784
|
+
py: "md",
|
|
2783
2785
|
children: labels.noSessionsFound || 'Nenhuma sessão encontrada'
|
|
2784
2786
|
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
2785
2787
|
children: [sessions.map(sessionItem => {
|
|
2786
2788
|
const isCurrentSession = sessionItem.id === currentSession?.id;
|
|
2787
2789
|
const deviceInfo = parseUserAgent(sessionItem.userAgent);
|
|
2788
2790
|
const createdDate = new Date(sessionItem.createdAt);
|
|
2789
|
-
return /*#__PURE__*/jsx(
|
|
2790
|
-
p: "
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
},
|
|
2791
|
+
return /*#__PURE__*/jsx(Paper, {
|
|
2792
|
+
p: "xs",
|
|
2793
|
+
withBorder: isCurrentSession,
|
|
2794
|
+
bd: isCurrentSession ? '1px solid gray' : undefined,
|
|
2795
|
+
radius: "sm",
|
|
2795
2796
|
children: /*#__PURE__*/jsxs(Group, {
|
|
2796
2797
|
justify: "space-between",
|
|
2797
2798
|
wrap: "nowrap",
|
|
2799
|
+
align: "center",
|
|
2798
2800
|
children: [/*#__PURE__*/jsxs(Group, {
|
|
2799
2801
|
gap: "sm",
|
|
2800
2802
|
wrap: "nowrap",
|
|
2801
|
-
|
|
2802
|
-
flex: 1
|
|
2803
|
-
},
|
|
2803
|
+
flex: 1,
|
|
2804
2804
|
children: [/*#__PURE__*/jsx(ThemeIcon, {
|
|
2805
|
-
size:
|
|
2806
|
-
variant: "
|
|
2807
|
-
color:
|
|
2805
|
+
size: 32,
|
|
2806
|
+
variant: "subtle",
|
|
2807
|
+
color: "gray",
|
|
2808
2808
|
children: /*#__PURE__*/jsx(IconDeviceMobile, {
|
|
2809
|
-
size: 18
|
|
2809
|
+
size: 18,
|
|
2810
|
+
stroke: 1.5
|
|
2810
2811
|
})
|
|
2811
2812
|
}), /*#__PURE__*/jsxs(Box, {
|
|
2812
|
-
|
|
2813
|
-
flex: 1
|
|
2814
|
-
},
|
|
2813
|
+
flex: 1,
|
|
2815
2814
|
children: [/*#__PURE__*/jsxs(Group, {
|
|
2816
2815
|
gap: "xs",
|
|
2817
2816
|
children: [/*#__PURE__*/jsx(Text, {
|
|
2818
|
-
size: "
|
|
2819
|
-
fw:
|
|
2817
|
+
size: "xs",
|
|
2818
|
+
fw: 600,
|
|
2820
2819
|
children: deviceInfo.browser
|
|
2821
2820
|
}), isCurrentSession && /*#__PURE__*/jsx(Badge, {
|
|
2822
2821
|
size: "xs",
|
|
2823
|
-
variant: "
|
|
2824
|
-
color: "
|
|
2822
|
+
variant: "light",
|
|
2823
|
+
color: "gray",
|
|
2825
2824
|
children: labels.thisDevice || 'Este dispositivo'
|
|
2826
2825
|
})]
|
|
2827
2826
|
}), /*#__PURE__*/jsxs(Text, {
|
|
@@ -2840,13 +2839,14 @@ function UserProfile({
|
|
|
2840
2839
|
}), /*#__PURE__*/jsx(Tooltip, {
|
|
2841
2840
|
label: isCurrentSession ? labels.signOutAndEnd || 'Encerrar e sair' : labels.endSession || 'Encerrar sessão',
|
|
2842
2841
|
children: /*#__PURE__*/jsx(Button, {
|
|
2843
|
-
variant: "
|
|
2844
|
-
color: "
|
|
2842
|
+
variant: "subtle",
|
|
2843
|
+
color: "gray",
|
|
2845
2844
|
size: "xs",
|
|
2846
2845
|
onClick: () => handleRevokeSession(sessionItem.id),
|
|
2847
2846
|
loading: loadingRevokeSession === sessionItem.id,
|
|
2848
2847
|
leftSection: /*#__PURE__*/jsx(IconLogout, {
|
|
2849
|
-
size: 14
|
|
2848
|
+
size: 14,
|
|
2849
|
+
stroke: 1.5
|
|
2850
2850
|
}),
|
|
2851
2851
|
children: labels.end || 'Encerrar'
|
|
2852
2852
|
})
|
|
@@ -2855,14 +2855,16 @@ function UserProfile({
|
|
|
2855
2855
|
}, sessionItem.id);
|
|
2856
2856
|
}), sessions.length > 1 && /*#__PURE__*/jsx(Group, {
|
|
2857
2857
|
justify: "flex-end",
|
|
2858
|
+
mt: "xs",
|
|
2858
2859
|
children: /*#__PURE__*/jsx(Button, {
|
|
2859
|
-
variant: "
|
|
2860
|
-
color: "
|
|
2860
|
+
variant: "subtle",
|
|
2861
|
+
color: "gray",
|
|
2861
2862
|
size: "xs",
|
|
2862
2863
|
onClick: handleRevokeOtherSessions,
|
|
2863
2864
|
loading: loadingRevokeSession === 'all',
|
|
2864
2865
|
leftSection: /*#__PURE__*/jsx(IconLogout, {
|
|
2865
|
-
size: 14
|
|
2866
|
+
size: 14,
|
|
2867
|
+
stroke: 1.5
|
|
2866
2868
|
}),
|
|
2867
2869
|
children: labels.endOtherSessions || 'Encerrar todas as outras sessões'
|
|
2868
2870
|
})
|
|
@@ -2881,27 +2883,31 @@ function UserProfile({
|
|
|
2881
2883
|
return /*#__PURE__*/jsxs(Modal, {
|
|
2882
2884
|
opened: opened,
|
|
2883
2885
|
onClose: onClose,
|
|
2884
|
-
size: width
|
|
2886
|
+
size: width,
|
|
2885
2887
|
withCloseButton: true,
|
|
2886
2888
|
radius: "md",
|
|
2887
2889
|
overlayProps: {
|
|
2888
|
-
backgroundOpacity: 0.
|
|
2889
|
-
blur:
|
|
2890
|
+
backgroundOpacity: 0.5,
|
|
2891
|
+
blur: 4
|
|
2890
2892
|
},
|
|
2891
2893
|
title: /*#__PURE__*/jsxs(Group, {
|
|
2892
|
-
gap: "
|
|
2894
|
+
gap: "sm",
|
|
2893
2895
|
children: [/*#__PURE__*/jsx(ThemeIcon, {
|
|
2894
|
-
size:
|
|
2895
|
-
variant: "
|
|
2896
|
+
size: 32,
|
|
2897
|
+
variant: "subtle",
|
|
2898
|
+
color: "gray",
|
|
2896
2899
|
children: /*#__PURE__*/jsx(IconUserCircle, {
|
|
2897
|
-
size: 24
|
|
2900
|
+
size: 24,
|
|
2901
|
+
stroke: 1.5
|
|
2898
2902
|
})
|
|
2899
|
-
}), /*#__PURE__*/jsxs(
|
|
2903
|
+
}), /*#__PURE__*/jsxs(Stack, {
|
|
2904
|
+
gap: 0,
|
|
2900
2905
|
children: [/*#__PURE__*/jsx(Title, {
|
|
2901
|
-
order:
|
|
2906
|
+
order: 5,
|
|
2907
|
+
fw: 600,
|
|
2902
2908
|
children: title
|
|
2903
2909
|
}), /*#__PURE__*/jsx(Text, {
|
|
2904
|
-
size: "
|
|
2910
|
+
size: "xs",
|
|
2905
2911
|
c: "dimmed",
|
|
2906
2912
|
children: subtitle
|
|
2907
2913
|
})]
|
|
@@ -2926,24 +2932,28 @@ function UserProfile({
|
|
|
2926
2932
|
children: /*#__PURE__*/jsxs(Stack, {
|
|
2927
2933
|
gap: "sm",
|
|
2928
2934
|
children: [/*#__PURE__*/jsxs(Group, {
|
|
2929
|
-
gap: "
|
|
2935
|
+
gap: "sm",
|
|
2930
2936
|
children: [logo ? /*#__PURE__*/jsx(Image, {
|
|
2931
2937
|
src: logo,
|
|
2932
2938
|
alt: "Auth",
|
|
2933
2939
|
h: logoHeight,
|
|
2934
2940
|
fit: "contain"
|
|
2935
2941
|
}) : /*#__PURE__*/jsx(ThemeIcon, {
|
|
2936
|
-
size:
|
|
2937
|
-
variant: "
|
|
2942
|
+
size: 32,
|
|
2943
|
+
variant: "subtle",
|
|
2944
|
+
color: "gray",
|
|
2938
2945
|
children: /*#__PURE__*/jsx(IconUserCircle, {
|
|
2939
|
-
size: 24
|
|
2946
|
+
size: 24,
|
|
2947
|
+
stroke: 1.5
|
|
2940
2948
|
})
|
|
2941
|
-
}), /*#__PURE__*/jsxs(
|
|
2949
|
+
}), /*#__PURE__*/jsxs(Stack, {
|
|
2950
|
+
gap: 0,
|
|
2942
2951
|
children: [/*#__PURE__*/jsx(Title, {
|
|
2943
|
-
order:
|
|
2952
|
+
order: 5,
|
|
2953
|
+
fw: 600,
|
|
2944
2954
|
children: title
|
|
2945
2955
|
}), /*#__PURE__*/jsx(Text, {
|
|
2946
|
-
size: "
|
|
2956
|
+
size: "xs",
|
|
2947
2957
|
c: "dimmed",
|
|
2948
2958
|
children: subtitle
|
|
2949
2959
|
})]
|