@authdog/react-elements 0.0.30 → 0.0.32
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/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +12 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +55 -18
- package/package.json +1 -1
- package/src/components/core/user-profile.tsx +48 -45
- /package/src/stories/{Button.stories.tsx → Button._stories.tsx} +0 -0
- /package/src/stories/{Navbar.stories.tsx → Navbar._stories.tsx} +0 -0
- /package/src/stories/{PlaceholderAlert.stories.tsx → PlaceholderAlert._stories.tsx} +0 -0
package/dist/styles.css
CHANGED
|
@@ -641,12 +641,12 @@ video {
|
|
|
641
641
|
.mb-2 {
|
|
642
642
|
margin-bottom: 0.5rem;
|
|
643
643
|
}
|
|
644
|
+
.mb-3 {
|
|
645
|
+
margin-bottom: 0.75rem;
|
|
646
|
+
}
|
|
644
647
|
.mb-4 {
|
|
645
648
|
margin-bottom: 1rem;
|
|
646
649
|
}
|
|
647
|
-
.mb-6 {
|
|
648
|
-
margin-bottom: 1.5rem;
|
|
649
|
-
}
|
|
650
650
|
.ml-1 {
|
|
651
651
|
margin-left: 0.25rem;
|
|
652
652
|
}
|
|
@@ -748,9 +748,6 @@ video {
|
|
|
748
748
|
.h-px {
|
|
749
749
|
height: 1px;
|
|
750
750
|
}
|
|
751
|
-
.h-screen {
|
|
752
|
-
height: 100vh;
|
|
753
|
-
}
|
|
754
751
|
.min-h-4 {
|
|
755
752
|
min-height: 1rem;
|
|
756
753
|
}
|
|
@@ -838,8 +835,8 @@ video {
|
|
|
838
835
|
.grid-cols-\[0_1fr\] {
|
|
839
836
|
grid-template-columns: 0 1fr;
|
|
840
837
|
}
|
|
841
|
-
.grid-cols-\[
|
|
842
|
-
grid-template-columns:
|
|
838
|
+
.grid-cols-\[14rem\2c 1fr\] {
|
|
839
|
+
grid-template-columns: 14rem 1fr;
|
|
843
840
|
}
|
|
844
841
|
.grid-rows-\[auto_auto\] {
|
|
845
842
|
grid-template-rows: auto auto;
|
|
@@ -890,6 +887,11 @@ video {
|
|
|
890
887
|
margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
|
|
891
888
|
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
|
|
892
889
|
}
|
|
890
|
+
.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) {
|
|
891
|
+
--tw-space-y-reverse: 0;
|
|
892
|
+
margin-top: calc(0.625rem * calc(1 - var(--tw-space-y-reverse)));
|
|
893
|
+
margin-bottom: calc(0.625rem * var(--tw-space-y-reverse));
|
|
894
|
+
}
|
|
893
895
|
.space-y-3 > :not([hidden]) ~ :not([hidden]) {
|
|
894
896
|
--tw-space-y-reverse: 0;
|
|
895
897
|
margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
|
|
@@ -900,16 +902,16 @@ video {
|
|
|
900
902
|
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
|
|
901
903
|
margin-bottom: calc(1rem * var(--tw-space-y-reverse));
|
|
902
904
|
}
|
|
905
|
+
.space-y-5 > :not([hidden]) ~ :not([hidden]) {
|
|
906
|
+
--tw-space-y-reverse: 0;
|
|
907
|
+
margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));
|
|
908
|
+
margin-bottom: calc(1.25rem * var(--tw-space-y-reverse));
|
|
909
|
+
}
|
|
903
910
|
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
|
|
904
911
|
--tw-space-y-reverse: 0;
|
|
905
912
|
margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
|
|
906
913
|
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
|
|
907
914
|
}
|
|
908
|
-
.space-y-8 > :not([hidden]) ~ :not([hidden]) {
|
|
909
|
-
--tw-space-y-reverse: 0;
|
|
910
|
-
margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));
|
|
911
|
-
margin-bottom: calc(2rem * var(--tw-space-y-reverse));
|
|
912
|
-
}
|
|
913
915
|
.self-start {
|
|
914
916
|
align-self: flex-start;
|
|
915
917
|
}
|
|
@@ -1051,15 +1053,12 @@ video {
|
|
|
1051
1053
|
.p-1 {
|
|
1052
1054
|
padding: 0.25rem;
|
|
1053
1055
|
}
|
|
1054
|
-
.p-
|
|
1055
|
-
padding:
|
|
1056
|
+
.p-3 {
|
|
1057
|
+
padding: 0.75rem;
|
|
1056
1058
|
}
|
|
1057
1059
|
.p-4 {
|
|
1058
1060
|
padding: 1rem;
|
|
1059
1061
|
}
|
|
1060
|
-
.p-6 {
|
|
1061
|
-
padding: 1.5rem;
|
|
1062
|
-
}
|
|
1063
1062
|
.px-2 {
|
|
1064
1063
|
padding-left: 0.5rem;
|
|
1065
1064
|
padding-right: 0.5rem;
|
|
@@ -1592,9 +1591,29 @@ video {
|
|
|
1592
1591
|
.dark\:bg-destructive\/60:is(.dark *) {
|
|
1593
1592
|
background-color: hsl(var(--destructive) / 0.6);
|
|
1594
1593
|
}
|
|
1594
|
+
.dark\:bg-gray-800:is(.dark *) {
|
|
1595
|
+
--tw-bg-opacity: 1;
|
|
1596
|
+
background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
|
|
1597
|
+
}
|
|
1595
1598
|
.dark\:bg-input\/30:is(.dark *) {
|
|
1596
1599
|
background-color: hsl(var(--input) / 0.3);
|
|
1597
1600
|
}
|
|
1601
|
+
.dark\:text-gray-100:is(.dark *) {
|
|
1602
|
+
--tw-text-opacity: 1;
|
|
1603
|
+
color: rgb(243 244 246 / var(--tw-text-opacity, 1));
|
|
1604
|
+
}
|
|
1605
|
+
.dark\:text-gray-300:is(.dark *) {
|
|
1606
|
+
--tw-text-opacity: 1;
|
|
1607
|
+
color: rgb(209 213 219 / var(--tw-text-opacity, 1));
|
|
1608
|
+
}
|
|
1609
|
+
.dark\:text-gray-400:is(.dark *) {
|
|
1610
|
+
--tw-text-opacity: 1;
|
|
1611
|
+
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
|
|
1612
|
+
}
|
|
1613
|
+
.dark\:hover\:bg-gray-800:hover:is(.dark *) {
|
|
1614
|
+
--tw-bg-opacity: 1;
|
|
1615
|
+
background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
|
|
1616
|
+
}
|
|
1598
1617
|
.dark\:focus-visible\:ring-destructive\/40:focus-visible:is(.dark *) {
|
|
1599
1618
|
--tw-ring-color: hsl(var(--destructive) / 0.4);
|
|
1600
1619
|
}
|
|
@@ -1614,6 +1633,10 @@ video {
|
|
|
1614
1633
|
}
|
|
1615
1634
|
@media (min-width: 768px) {
|
|
1616
1635
|
|
|
1636
|
+
.md\:mb-4 {
|
|
1637
|
+
margin-bottom: 1rem;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1617
1640
|
.md\:flex {
|
|
1618
1641
|
display: flex;
|
|
1619
1642
|
}
|
|
@@ -1622,6 +1645,20 @@ video {
|
|
|
1622
1645
|
display: none;
|
|
1623
1646
|
}
|
|
1624
1647
|
|
|
1648
|
+
.md\:space-y-6 > :not([hidden]) ~ :not([hidden]) {
|
|
1649
|
+
--tw-space-y-reverse: 0;
|
|
1650
|
+
margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
|
|
1651
|
+
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
.md\:p-4 {
|
|
1655
|
+
padding: 1rem;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
.md\:p-5 {
|
|
1659
|
+
padding: 1.25rem;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1625
1662
|
.md\:px-6 {
|
|
1626
1663
|
padding-left: 1.5rem;
|
|
1627
1664
|
padding-right: 1.5rem;
|
package/package.json
CHANGED
|
@@ -50,18 +50,20 @@ export const UserProfile = ({
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
return (
|
|
53
|
-
<div className="grid grid-cols-[
|
|
54
|
-
<div className="h-full border-r p-
|
|
55
|
-
<div className="mb-
|
|
56
|
-
<h1 className="text-xl font-bold">Account</h1>
|
|
57
|
-
<p className="text-sm text-gray-500">Manage your account info.</p>
|
|
53
|
+
<div className="grid grid-cols-[14rem,1fr] w-full bg-transparent">
|
|
54
|
+
<div className="h-full border-r p-3 md:p-4 bg-transparent flex flex-col min-w-0">
|
|
55
|
+
<div className="mb-3 md:mb-4">
|
|
56
|
+
<h1 className="text-xl font-bold text-gray-900 dark:text-gray-100">Account</h1>
|
|
57
|
+
<p className="text-sm text-gray-500 dark:text-gray-400">Manage your account info.</p>
|
|
58
58
|
</div>
|
|
59
59
|
|
|
60
60
|
<nav className="space-y-1 flex-1">
|
|
61
61
|
<button
|
|
62
62
|
onClick={() => setActiveTab("profile")}
|
|
63
63
|
className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${
|
|
64
|
-
activeTab === "profile"
|
|
64
|
+
activeTab === "profile"
|
|
65
|
+
? "bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-gray-100"
|
|
66
|
+
: "text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-800"
|
|
65
67
|
}`}
|
|
66
68
|
>
|
|
67
69
|
{renderIcon(User)}
|
|
@@ -79,9 +81,9 @@ export const UserProfile = ({
|
|
|
79
81
|
</nav>
|
|
80
82
|
</div>
|
|
81
83
|
|
|
82
|
-
<div className="h-full p-
|
|
83
|
-
<div className="flex justify-between items-center mb-
|
|
84
|
-
<h2 className="text-xl font-semibold">
|
|
84
|
+
<div className="h-full p-3 md:p-5 min-w-0 bg-transparent">
|
|
85
|
+
<div className="flex justify-between items-center mb-3 md:mb-4">
|
|
86
|
+
<h2 className="text-xl font-semibold text-gray-900 dark:text-gray-100">
|
|
85
87
|
{activeTab === "profile" ? "Profile details" : "Security settings"}
|
|
86
88
|
</h2>
|
|
87
89
|
{/* <button className="text-gray-500 hover:text-gray-700">
|
|
@@ -90,17 +92,17 @@ export const UserProfile = ({
|
|
|
90
92
|
</div>
|
|
91
93
|
|
|
92
94
|
{activeTab === "profile" ? (
|
|
93
|
-
<div className="space-y-
|
|
95
|
+
<div className="space-y-5 md:space-y-6">
|
|
94
96
|
{/* Profile Section */}
|
|
95
97
|
<div>
|
|
96
|
-
<h3 className="text-sm font-medium mb-
|
|
98
|
+
<h3 className="text-sm font-medium mb-3 text-gray-900 dark:text-gray-100">Profile</h3>
|
|
97
99
|
<div className="flex items-center justify-between">
|
|
98
100
|
<div className="flex items-center">
|
|
99
101
|
<Avatar className="h-12 w-12 mr-4 border">
|
|
100
102
|
<AvatarImage src={user.photos?.[0]?.value} alt="Profile picture" />
|
|
101
103
|
<AvatarFallback>{user.displayName?.split(" ").map((n: string) => n[0]).join("")}</AvatarFallback>
|
|
102
104
|
</Avatar>
|
|
103
|
-
<span className="font-medium">{user.displayName}</span>
|
|
105
|
+
<span className="font-medium text-gray-900 dark:text-gray-100">{user.displayName}</span>
|
|
104
106
|
</div>
|
|
105
107
|
{/* <Button variant="outline" size="sm">
|
|
106
108
|
Edit profile
|
|
@@ -110,8 +112,8 @@ export const UserProfile = ({
|
|
|
110
112
|
|
|
111
113
|
{/* Email Addresses Section */}
|
|
112
114
|
<div>
|
|
113
|
-
<h3 className="text-sm font-medium mb-
|
|
114
|
-
<div className="space-y-
|
|
115
|
+
<h3 className="text-sm font-medium mb-3 text-gray-900 dark:text-gray-100">Email addresses</h3>
|
|
116
|
+
<div className="space-y-2.5">
|
|
115
117
|
|
|
116
118
|
{/* {JSON.stringify(user)} */}
|
|
117
119
|
|
|
@@ -126,18 +128,19 @@ export const UserProfile = ({
|
|
|
126
128
|
</div>
|
|
127
129
|
))} */}
|
|
128
130
|
|
|
129
|
-
{
|
|
130
|
-
|
|
131
|
-
<
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
131
|
+
{user.emails.map((email: any, idx: number) => (
|
|
132
|
+
<div className="flex items-center justify-between" key={email.value}>
|
|
133
|
+
<span className="text-gray-900 dark:text-gray-100">{email.value}</span>
|
|
134
|
+
{idx === 0 && (
|
|
135
|
+
<Badge
|
|
136
|
+
variant="outline"
|
|
137
|
+
className="text-xs bg-gray-100 text-gray-700 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-800"
|
|
138
|
+
>
|
|
139
|
+
Primary
|
|
140
|
+
</Badge>
|
|
141
|
+
)}
|
|
142
|
+
</div>
|
|
143
|
+
))}
|
|
141
144
|
{/* <Button variant="ghost" size="sm" className="flex items-center text-gray-700">
|
|
142
145
|
{renderIcon(PlusCircle)}
|
|
143
146
|
Add email address
|
|
@@ -147,8 +150,8 @@ export const UserProfile = ({
|
|
|
147
150
|
|
|
148
151
|
{/* Phone Number Section */}
|
|
149
152
|
{/* <div>
|
|
150
|
-
<h3 className="text-sm font-medium mb-
|
|
151
|
-
<div className="space-y-
|
|
153
|
+
<h3 className="text-sm font-medium mb-3">Phone number</h3>
|
|
154
|
+
<div className="space-y-2.5">
|
|
152
155
|
<div className="flex items-center justify-between">
|
|
153
156
|
<span>+1 (555) 123-4567</span>
|
|
154
157
|
<Badge variant="outline" className="text-xs bg-gray-100 text-gray-700 hover:bg-gray-100">
|
|
@@ -164,29 +167,29 @@ export const UserProfile = ({
|
|
|
164
167
|
|
|
165
168
|
{/* Connected Accounts Section */}
|
|
166
169
|
<div>
|
|
167
|
-
<h3 className="text-sm font-medium mb-
|
|
168
|
-
<div className="space-y-
|
|
170
|
+
<h3 className="text-sm font-medium mb-3 text-gray-900 dark:text-gray-100">Connected accounts</h3>
|
|
171
|
+
<div className="space-y-2.5">
|
|
169
172
|
<div className="flex items-center justify-between" key={user.provider}>
|
|
170
173
|
<div className="flex items-center">
|
|
171
174
|
<div className="mr-2">
|
|
172
|
-
<span>{user.provider}</span>
|
|
175
|
+
<span className="text-gray-900 dark:text-gray-100">{user.provider}</span>
|
|
173
176
|
</div>
|
|
174
177
|
</div>
|
|
175
|
-
<span className="text-sm text-gray-500">{user?.emails?.[0]?.value}</span>
|
|
178
|
+
<span className="text-sm text-gray-500 dark:text-gray-400">{user?.emails?.[0]?.value}</span>
|
|
176
179
|
</div>
|
|
177
180
|
</div>
|
|
178
181
|
</div>
|
|
179
182
|
</div>
|
|
180
183
|
) : (
|
|
181
|
-
<div className="space-y-
|
|
184
|
+
<div className="space-y-5 md:space-y-6">
|
|
182
185
|
{/* Security Settings */}
|
|
183
186
|
<div key="two-factor">
|
|
184
|
-
<h3 className="text-sm font-medium mb-
|
|
185
|
-
<div className="space-y-
|
|
187
|
+
<h3 className="text-sm font-medium mb-3 text-gray-900 dark:text-gray-100">Two-factor authentication</h3>
|
|
188
|
+
<div className="space-y-2.5">
|
|
186
189
|
<div className="flex items-center justify-between">
|
|
187
190
|
<div>
|
|
188
|
-
<p className="font-medium">Two-factor authentication</p>
|
|
189
|
-
<p className="text-sm text-gray-500">Add an extra layer of security to your account</p>
|
|
191
|
+
<p className="font-medium text-gray-900 dark:text-gray-100">Two-factor authentication</p>
|
|
192
|
+
<p className="text-sm text-gray-500 dark:text-gray-400">Add an extra layer of security to your account</p>
|
|
190
193
|
</div>
|
|
191
194
|
<Button variant="outline" size="sm">
|
|
192
195
|
Enable
|
|
@@ -196,12 +199,12 @@ export const UserProfile = ({
|
|
|
196
199
|
</div>
|
|
197
200
|
|
|
198
201
|
<div key="password">
|
|
199
|
-
<h3 className="text-sm font-medium mb-
|
|
200
|
-
<div className="space-y-
|
|
202
|
+
<h3 className="text-sm font-medium mb-3 text-gray-900 dark:text-gray-100">Password</h3>
|
|
203
|
+
<div className="space-y-2.5">
|
|
201
204
|
<div className="flex items-center justify-between">
|
|
202
205
|
<div>
|
|
203
|
-
<p className="font-medium">Change password</p>
|
|
204
|
-
<p className="text-sm text-gray-500">Last changed 3 months ago</p>
|
|
206
|
+
<p className="font-medium text-gray-900 dark:text-gray-100">Change password</p>
|
|
207
|
+
<p className="text-sm text-gray-500 dark:text-gray-400">Last changed 3 months ago</p>
|
|
205
208
|
</div>
|
|
206
209
|
<Button variant="outline" size="sm">
|
|
207
210
|
Change
|
|
@@ -211,12 +214,12 @@ export const UserProfile = ({
|
|
|
211
214
|
</div>
|
|
212
215
|
|
|
213
216
|
<div key="sessions">
|
|
214
|
-
<h3 className="text-sm font-medium mb-
|
|
215
|
-
<div className="space-y-
|
|
217
|
+
<h3 className="text-sm font-medium mb-3 text-gray-900 dark:text-gray-100">Active sessions</h3>
|
|
218
|
+
<div className="space-y-2.5">
|
|
216
219
|
<div className="flex items-center justify-between">
|
|
217
220
|
<div>
|
|
218
|
-
<p className="font-medium">Current session</p>
|
|
219
|
-
<p className="text-sm text-gray-500">Chrome on Windows • Active now</p>
|
|
221
|
+
<p className="font-medium text-gray-900 dark:text-gray-100">Current session</p>
|
|
222
|
+
<p className="text-sm text-gray-500 dark:text-gray-400">Chrome on Windows • Active now</p>
|
|
220
223
|
</div>
|
|
221
224
|
<Button variant="outline" size="sm">
|
|
222
225
|
Sign out
|
|
File without changes
|
|
File without changes
|
|
File without changes
|