@faststore/core 3.88.7 → 3.89.1

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 (160) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +55 -55
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/.next/cache/webpack/server-production/0.pack +0 -0
  8. package/.next/cache/webpack/server-production/index.pack +0 -0
  9. package/.next/prerender-manifest.js +1 -1
  10. package/.next/prerender-manifest.json +1 -1
  11. package/.next/react-loadable-manifest.json +27 -27
  12. package/.next/routes-manifest.json +1 -1
  13. package/.next/server/chunks/1607.js +1 -0
  14. package/.next/server/chunks/2570.js +1 -1
  15. package/.next/server/chunks/6886.js +1 -1
  16. package/.next/server/chunks/9563.js +2 -2
  17. package/.next/server/chunks/9630.js +1 -1
  18. package/.next/server/functions-config-manifest.json +1 -1
  19. package/.next/server/middleware-build-manifest.js +1 -1
  20. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  21. package/.next/server/pages/404.js.nft.json +1 -1
  22. package/.next/server/pages/500.js.nft.json +1 -1
  23. package/.next/server/pages/[...slug].js.nft.json +1 -1
  24. package/.next/server/pages/[slug]/p.js.nft.json +1 -1
  25. package/.next/server/pages/_app.js.nft.json +1 -1
  26. package/.next/server/pages/_document.js.nft.json +1 -1
  27. package/.next/server/pages/_error.js.nft.json +1 -1
  28. package/.next/server/pages/api/graphql.js +1 -1
  29. package/.next/server/pages/api/graphql.js.nft.json +1 -1
  30. package/.next/server/pages/api/health/live.js.nft.json +1 -1
  31. package/.next/server/pages/api/health/ready.js.nft.json +1 -1
  32. package/.next/server/pages/api/preview.js.nft.json +1 -1
  33. package/.next/server/pages/checkout.js.nft.json +1 -1
  34. package/.next/server/pages/en-US/404.html +1 -1
  35. package/.next/server/pages/en-US/500.html +1 -1
  36. package/.next/server/pages/en-US/checkout.html +1 -1
  37. package/.next/server/pages/en-US/login.html +1 -1
  38. package/.next/server/pages/en-US/s.html +1 -1
  39. package/.next/server/pages/en-US.html +1 -1
  40. package/.next/server/pages/index.js.nft.json +1 -1
  41. package/.next/server/pages/login.js.nft.json +1 -1
  42. package/.next/server/pages/pvt/account/403.js +1 -1
  43. package/.next/server/pages/pvt/account/403.js.nft.json +1 -1
  44. package/.next/server/pages/pvt/account/404.js +1 -1
  45. package/.next/server/pages/pvt/account/404.js.nft.json +1 -1
  46. package/.next/server/pages/pvt/account/[...unknown].js.nft.json +1 -1
  47. package/.next/server/pages/pvt/account/orders/[id].js +1 -1
  48. package/.next/server/pages/pvt/account/orders/[id].js.nft.json +1 -1
  49. package/.next/server/pages/pvt/account/orders.js +1 -1
  50. package/.next/server/pages/pvt/account/orders.js.nft.json +1 -1
  51. package/.next/server/pages/pvt/account/profile.js +1 -1
  52. package/.next/server/pages/pvt/account/profile.js.nft.json +1 -1
  53. package/.next/server/pages/pvt/account/security.js +1 -1
  54. package/.next/server/pages/pvt/account/security.js.nft.json +1 -1
  55. package/.next/server/pages/pvt/account/user-details.js +1 -1
  56. package/.next/server/pages/pvt/account/user-details.js.nft.json +1 -1
  57. package/.next/server/pages/pvt/account.js.nft.json +1 -1
  58. package/.next/server/pages/s.js.nft.json +1 -1
  59. package/.next/server/pages-manifest.json +1 -1
  60. package/.next/static/43JSGz9XxT2_nidd-70dX/_buildManifest.js +1 -0
  61. package/.next/static/chunks/pages/pvt/account/403-f2858569fde3873b.js +1 -0
  62. package/.next/static/chunks/pages/pvt/account/404-c68124bed7cb7c48.js +1 -0
  63. package/.next/static/chunks/pages/pvt/account/orders/[id]-459f6b9a86780410.js +1 -0
  64. package/.next/static/chunks/pages/pvt/account/orders-f376bbaf561ae429.js +1 -0
  65. package/.next/static/chunks/pages/pvt/account/profile-b6cdbf02d4682544.js +1 -0
  66. package/.next/static/chunks/pages/pvt/account/security-e6289a40e745d3c4.js +1 -0
  67. package/.next/static/chunks/pages/pvt/account/user-details-fba1822e52e7de26.js +1 -0
  68. package/.next/static/chunks/{webpack-747ebf1e0c896030.js → webpack-f16e329d9f50b79b.js} +1 -1
  69. package/.next/static/css/{5273202f7c5e5ec1.css → 02eaf202d3d11fd1.css} +1 -1
  70. package/.next/static/css/0f8f72ecdeb79402.css +1 -0
  71. package/.next/static/css/2c0f8724c01f2ab8.css +1 -0
  72. package/.next/static/css/32a4ddbf3999c2a5.css +1 -0
  73. package/.next/static/css/331f08e9d306e70b.css +1 -0
  74. package/.next/static/css/{865e30903caadb79.css → 4f0597b0bf0ef2e1.css} +1 -1
  75. package/.next/static/css/5177628438c28f74.css +1 -0
  76. package/.next/static/css/6bb0abee27fe0019.css +1 -0
  77. package/.next/static/css/84ebcfe7a63d709d.css +1 -0
  78. package/.next/static/css/8df9f9a136312210.css +1 -0
  79. package/.next/static/css/a8bcd71b15adb1ec.css +1 -0
  80. package/.next/static/css/a9328b56f3942b82.css +1 -0
  81. package/.next/static/css/{b7bba8fce075688b.css → b65e005fb943434c.css} +1 -1
  82. package/.next/static/css/{831a1f72fe4b2d80.css → bd121d85d6ceed46.css} +1 -1
  83. package/.next/static/css/{dbbb10bf2f162a58.css → be59e989720e6e50.css} +1 -1
  84. package/.next/static/css/{b1806cbafd0c1f81.css → c29fee5b9f9d48d9.css} +1 -1
  85. package/.next/static/css/{936c65069d608087.css → c34f6ea9953e2f63.css} +1 -1
  86. package/.next/static/css/{e46393a76c5d93a9.css → c53b17b6fa994508.css} +1 -1
  87. package/.next/static/css/{5347dbc8b71de47d.css → ceb410a7062740d1.css} +1 -1
  88. package/.next/static/css/da0f1f3329c5657a.css +1 -0
  89. package/.next/static/css/da5bfb1f39c54578.css +1 -0
  90. package/.next/static/css/f60366555f563deb.css +1 -0
  91. package/.next/static/css/f81198b7fe9f5f6f.css +1 -0
  92. package/.next/trace +138 -137
  93. package/.turbo/turbo-build.log +26 -26
  94. package/.turbo/turbo-test.log +6 -5
  95. package/@generated/gql.ts +12 -12
  96. package/@generated/graphql.ts +13 -14
  97. package/@generated/persisted-documents.json +6 -6
  98. package/@generated/schema.graphql +0 -2
  99. package/CHANGELOG.md +12 -0
  100. package/package.json +4 -4
  101. package/src/components/account/MyAccountLayout/MyAccountLayout.tsx +3 -3
  102. package/src/components/account/MyAccountLayout/styles.scss +10 -0
  103. package/src/components/account/MyAccountMenu/styles.scss +2 -1
  104. package/src/components/account/MyAccountUserDetails/MyAccountUserDetails.tsx +18 -39
  105. package/src/components/account/MyAccountUserDetails/styles.module.scss +1 -93
  106. package/src/components/account/components/MyAccountHeader/MyAccountHeader.tsx +13 -0
  107. package/src/components/account/components/MyAccountHeader/index.ts +1 -0
  108. package/src/components/account/components/MyAccountHeader/styles.scss +13 -0
  109. package/src/components/account/components/MyAccountStatusBadge/styles.scss +4 -4
  110. package/src/components/account/components/MyAccountTable/MyAccountTable.tsx +23 -0
  111. package/src/components/account/components/MyAccountTable/index.ts +1 -0
  112. package/src/components/account/components/MyAccountTable/styles.scss +67 -0
  113. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrders.tsx +131 -134
  114. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/MyAccountListOrdersTable.tsx +9 -24
  115. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/styles.scss +37 -42
  116. package/src/components/account/orders/MyAccountListOrders/styles.module.scss +4 -25
  117. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/MyAccountOrderActions.tsx +1 -6
  118. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx +1 -1
  119. package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/MyAccountStatusCard.tsx +9 -11
  120. package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/styles.scss +27 -11
  121. package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/useConnectorPositioning.ts +0 -8
  122. package/src/components/account/orders/MyAccountOrderDetails/section.module.scss +2 -3
  123. package/src/components/account/profile/profile.module.scss +1 -85
  124. package/src/components/account/profile/profile.tsx +24 -31
  125. package/src/components/account/security/SecurityDrawer.tsx +86 -88
  126. package/src/components/account/security/SecuritySection.tsx +23 -20
  127. package/src/components/account/security/styles.module.scss +26 -150
  128. package/src/experimental/myAccountSeverSideProps.ts +6 -4
  129. package/src/pages/pvt/account/403.tsx +5 -3
  130. package/src/pages/pvt/account/404.tsx +5 -3
  131. package/src/pages/pvt/account/orders/[id].tsx +4 -2
  132. package/src/pages/pvt/account/orders/index.tsx +4 -2
  133. package/src/pages/pvt/account/profile.tsx +2 -6
  134. package/src/pages/pvt/account/security.tsx +4 -5
  135. package/src/pages/pvt/account/user-details.tsx +4 -2
  136. package/src/utils/userOrderStatus.ts +5 -5
  137. package/test/server/index.test.ts +0 -1
  138. package/.next/static/chunks/pages/pvt/account/403-e4315ace8609a7ff.js +0 -1
  139. package/.next/static/chunks/pages/pvt/account/404-1e450ae9476bbcaa.js +0 -1
  140. package/.next/static/chunks/pages/pvt/account/orders/[id]-a3e46af1be9816a4.js +0 -1
  141. package/.next/static/chunks/pages/pvt/account/orders-db7a364869130660.js +0 -1
  142. package/.next/static/chunks/pages/pvt/account/profile-e8a7ad7a7d7c60fb.js +0 -1
  143. package/.next/static/chunks/pages/pvt/account/security-cad4e4260be8b0cd.js +0 -1
  144. package/.next/static/chunks/pages/pvt/account/user-details-401f6f6e4ce4b9ce.js +0 -1
  145. package/.next/static/css/04fb2d4b8924b0c6.css +0 -1
  146. package/.next/static/css/083dc2a5b0de2439.css +0 -1
  147. package/.next/static/css/175fa823349dc534.css +0 -1
  148. package/.next/static/css/297be4be3be36ff0.css +0 -1
  149. package/.next/static/css/2a4b7072e47636f1.css +0 -1
  150. package/.next/static/css/45fac71f6411cceb.css +0 -1
  151. package/.next/static/css/6cd282d958f613bc.css +0 -1
  152. package/.next/static/css/b52f8f6500d3439e.css +0 -1
  153. package/.next/static/css/b7fc24e8f1eb011f.css +0 -1
  154. package/.next/static/css/d26cb0a54378b3d9.css +0 -1
  155. package/.next/static/css/ec7fdad03808422d.css +0 -1
  156. package/.next/static/css/f93cf36b16950027.css +0 -1
  157. package/.next/static/css/fd0a7a134ddc3d90.css +0 -1
  158. package/.next/static/css/fe0bcc13a2b68605.css +0 -1
  159. package/.next/static/pe6z3Z3bQ07PowbWL75Ts/_buildManifest.js +0 -1
  160. /package/.next/static/{pe6z3Z3bQ07PowbWL75Ts → 43JSGz9XxT2_nidd-70dX}/_ssgManifest.js +0 -0
@@ -133,100 +133,98 @@ export const SecurityDrawer = ({
133
133
  </SlideOverHeader>
134
134
 
135
135
  <div data-fs-security-drawer-body>
136
- <div data-fs-security-drawer-body-form>
137
- <div data-fs-security-drawer-body-current-password>
138
- <Input
139
- data-fs-security-drawer-input
140
- id="security-drawer-input-current-password"
141
- type={showCurrentPassword ? 'text' : 'password'}
142
- placeholder="Current Password"
143
- inputMode="text"
144
- value={currentPassword}
145
- onChange={(e) => {
146
- setFormError(null)
147
- setCurrentPassword(e.target.value)
148
- }}
149
- />
150
- <IconButton
151
- data-fs-security-drawer-input-password-toggle
152
- size="small"
153
- aria-label="Show Password"
154
- onClick={() => setShowCurrentPassword((prev) => !prev)}
155
- icon={
156
- showCurrentPassword ? (
157
- <Icon name="EyeSlash" />
158
- ) : (
159
- <Icon name="Eye" />
160
- )
161
- }
162
- />
163
- </div>
136
+ <div data-fs-security-drawer-body-password>
137
+ <Input
138
+ data-fs-security-drawer-input
139
+ id="security-drawer-input-current-password"
140
+ type={showCurrentPassword ? 'text' : 'password'}
141
+ placeholder="Current Password"
142
+ inputMode="text"
143
+ value={currentPassword}
144
+ onChange={(e) => {
145
+ setFormError(null)
146
+ setCurrentPassword(e.target.value)
147
+ }}
148
+ />
149
+ <IconButton
150
+ data-fs-security-drawer-input-password-toggle
151
+ size="small"
152
+ aria-label="Show Password"
153
+ onClick={() => setShowCurrentPassword((prev) => !prev)}
154
+ icon={
155
+ showCurrentPassword ? (
156
+ <Icon name="EyeSlash" />
157
+ ) : (
158
+ <Icon name="Eye" />
159
+ )
160
+ }
161
+ />
162
+ </div>
164
163
 
165
- <div data-fs-security-drawer-body-new-password>
166
- <Input
167
- data-fs-security-drawer-input
168
- id="security-drawer-input-new-password"
169
- type={showNewPassword ? 'text' : 'password'}
170
- placeholder="New Password"
171
- inputMode="text"
172
- value={newPassword}
173
- onChange={(e) => {
174
- setFormError(null)
175
- setNewPassword(e.target.value)
176
- }}
177
- />
178
- <IconButton
179
- data-fs-security-drawer-input-password-toggle
180
- size="small"
181
- aria-label="Show Password"
182
- onClick={() => setShowNewPassword((prev) => !prev)}
183
- icon={
184
- showNewPassword ? <Icon name="EyeSlash" /> : <Icon name="Eye" />
185
- }
164
+ <div data-fs-security-drawer-body-password>
165
+ <Input
166
+ data-fs-security-drawer-input
167
+ id="security-drawer-input-new-password"
168
+ type={showNewPassword ? 'text' : 'password'}
169
+ placeholder="New Password"
170
+ inputMode="text"
171
+ value={newPassword}
172
+ onChange={(e) => {
173
+ setFormError(null)
174
+ setNewPassword(e.target.value)
175
+ }}
176
+ />
177
+ <IconButton
178
+ data-fs-security-drawer-input-password-toggle
179
+ size="small"
180
+ aria-label="Show Password"
181
+ onClick={() => setShowNewPassword((prev) => !prev)}
182
+ icon={
183
+ showNewPassword ? <Icon name="EyeSlash" /> : <Icon name="Eye" />
184
+ }
185
+ />
186
+ </div>
187
+
188
+ {formError && (
189
+ <div data-fs-security-drawer-error>
190
+ <Icon
191
+ width={20}
192
+ height={20}
193
+ name="CircleWavyWarning"
194
+ data-fs-security-drawer-error-icon
186
195
  />
196
+ <span>{formError}</span>
187
197
  </div>
188
-
189
- {formError && (
190
- <div data-fs-security-drawer-error>
191
- <Icon
192
- width={20}
193
- height={20}
194
- name="CircleWavyWarning"
195
- data-fs-security-drawer-error-icon
196
- />
197
- <span>{formError}</span>
198
- </div>
199
- )}
200
-
201
- {newPassword.length > 0 && (
202
- <div data-fs-security-drawer-input-password-rules-container>
203
- <p data-fs-security-drawer-input-password-rules-title>
204
- Your password must have at least:
205
- </p>
206
-
207
- <ul data-fs-security-drawer-input-password-rules-list>
208
- {newPasswordValidations.map((rule, index) => (
209
- <li
210
- key={index}
211
- data-fs-security-drawer-input-password-rule-item
212
- data-status={rule.isValid ? 'success' : 'error'}
213
- >
214
- <Icon
215
- name={rule.isValid ? 'CheckCircle' : 'XCircle'}
216
- width={20}
217
- height={20}
218
- />
219
- {rule.label}
220
- </li>
221
- ))}
222
- </ul>
223
- </div>
224
- )}
225
- </div>
198
+ )}
199
+
200
+ {newPassword.length > 0 && (
201
+ <div data-fs-security-drawer-password-rules-container>
202
+ <p data-fs-security-drawer-password-rules-title>
203
+ Your password must have at least:
204
+ </p>
205
+
206
+ <ul data-fs-security-drawer-password-rules-list>
207
+ {newPasswordValidations.map((rule, index) => (
208
+ <li
209
+ key={index}
210
+ data-fs-security-drawer-password-rule-item
211
+ data-status={rule.isValid ? 'success' : 'error'}
212
+ >
213
+ <Icon
214
+ name={rule.isValid ? 'CheckCircle' : 'XCircle'}
215
+ width={20}
216
+ height={20}
217
+ />
218
+ {rule.label}
219
+ </li>
220
+ ))}
221
+ </ul>
222
+ </div>
223
+ )}
226
224
  </div>
227
225
 
228
226
  <footer data-fs-security-drawer-footer>
229
- <Button variant="tertiary" onClick={handleClose}>
227
+ <Button variant="secondary" onClick={handleClose}>
230
228
  Cancel
231
229
  </Button>
232
230
 
@@ -1,6 +1,9 @@
1
1
  import { useState } from 'react'
2
2
  import { Button } from '@faststore/ui'
3
3
 
4
+ import AccountTable from '../components/MyAccountTable'
5
+ import AccountHeader from '../components/MyAccountHeader'
6
+
4
7
  import { SecurityDrawer } from './SecurityDrawer'
5
8
  import styles from './styles.module.scss'
6
9
 
@@ -23,28 +26,28 @@ export const SecuritySection = ({
23
26
  )}
24
27
 
25
28
  <section data-fs-securiry-section className={styles.section}>
26
- <header data-fs-security-header>
27
- <h1 data-fs-security-title>Security</h1>
28
- </header>
29
+ <AccountHeader pageTitle="Security" />
29
30
 
30
31
  <div data-fs-security-container>
31
- <table data-fs-security-table>
32
- <tbody data-fs-security-table-body>
33
- <tr data-fs-security-table-row>
34
- <th data-fs-security-table-heading>Password</th>
35
- <td data-fs-security-table-data>
36
- <span data-fs-security-table-data-text>••••••••••</span>
37
- <Button
38
- variant="tertiary"
39
- data-fs-security-table-action-button
40
- onClick={() => setIsDrawerOpen(true)}
41
- >
42
- Reset password
43
- </Button>
44
- </td>
45
- </tr>
46
- </tbody>
47
- </table>
32
+ <AccountTable
33
+ rows={[
34
+ {
35
+ heading: 'Password',
36
+ data: (
37
+ <>
38
+ <span data-fs-security-table-data-text>••••••••••</span>
39
+ <Button
40
+ variant="tertiary"
41
+ data-fs-security-table-action-button
42
+ onClick={() => setIsDrawerOpen(true)}
43
+ >
44
+ Reset password
45
+ </Button>
46
+ </>
47
+ ),
48
+ },
49
+ ]}
50
+ />
48
51
  </div>
49
52
  </section>
50
53
  </>
@@ -5,6 +5,7 @@
5
5
  @import "@faststore/ui/src/components/atoms/Input/styles.scss";
6
6
  @import "@faststore/ui/src/components/atoms/Icon/styles.scss";
7
7
  @import "@faststore/ui/src/components/organisms/SlideOver/styles.scss";
8
+ @import "../components/MyAccountTable/styles.scss";
8
9
 
9
10
  // --------------------------------------------------------
10
11
  // Design Tokens
@@ -24,40 +25,20 @@
24
25
  }
25
26
 
26
27
  [data-fs-security-drawer-header] {
27
- display: flex;
28
- align-items: center;
29
- justify-content: space-between;
30
- width: 100%;
31
28
  border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
32
29
  }
33
30
 
34
31
  [data-fs-security-drawer-header-title] {
35
32
  font-size: var(--fs-text-size-3);
36
33
  font-weight: var(--fs-text-weight-bold);
37
- color: var(--fs-color-text);
38
34
  }
39
35
 
40
36
  [data-fs-security-drawer-body] {
41
37
  display: flex;
42
38
  flex: 1;
43
39
  flex-direction: column;
44
- gap: var(--fs-spacing-6);
45
- padding: var(--fs-spacing-6);
46
- }
47
-
48
- [data-fs-security-drawer-body-form] {
49
- display: flex;
50
- flex-direction: column;
51
- gap: var(--fs-spacing-3);
52
- }
53
-
54
- [data-fs-security-drawer-footer] {
55
- display: flex;
56
40
  gap: var(--fs-spacing-2);
57
- align-items: center;
58
- justify-content: center;
59
- padding: var(--fs-spacing-3);
60
- border-top: var(--fs-border-width) solid var(--fs-border-color-light);
41
+ padding: var(--fs-spacing-4);
61
42
  }
62
43
 
63
44
  [data-fs-security-drawer-input] {
@@ -68,21 +49,18 @@
68
49
  font-weight: var(--fs-text-weight-regular);
69
50
  }
70
51
 
71
- [data-fs-security-drawer-input-password-rules-container] {
52
+ [data-fs-security-drawer-password-rules-container] {
72
53
  display: flex;
73
54
  flex-direction: column;
74
55
  gap: var(--fs-spacing-2);
75
- padding-block: var(--fs-spacing-2);
76
56
  }
77
57
 
78
- [data-fs-security-drawer-input-password-rules-title] {
79
- margin-bottom: var(--fs-spacing-2);
58
+ [data-fs-security-drawer-password-rules-title] {
80
59
  font-size: var(--fs-text-size-1);
81
- font-weight: var(--fs-text-weight-semibold);
82
60
  color: var(--fs-color-text-light);
83
61
  }
84
62
 
85
- [data-fs-security-drawer-input-password-rules-list] {
63
+ [data-fs-security-drawer-password-rules-list] {
86
64
  display: grid;
87
65
  grid-template-columns: 1fr 1fr;
88
66
  gap: var(--fs-spacing-1);
@@ -90,31 +68,21 @@
90
68
  list-style: none;
91
69
  }
92
70
 
93
- [data-fs-security-drawer-input-password-rule-item] {
71
+ [data-fs-security-drawer-password-rule-item] {
94
72
  display: flex;
95
73
  gap: var(--fs-spacing-1);
96
74
  align-items: center;
97
75
  font-size: var(--fs-text-size-1);
98
76
  font-weight: var(--fs-text-weight-regular);
99
77
  color: var(--fs-color-danger-text);
100
- }
101
-
102
- [data-fs-security-drawer-input-password-rule-item][data-status="success"] {
103
- color: var(--fs-security-drawer-color-success);
104
- }
105
78
 
106
- [data-fs-security-drawer-input-password-rule-item][data-status="error"] {
107
- color: var(--fs-security-drawer-color-error);
108
- }
79
+ &[data-status="success"] {
80
+ color: var(--fs-security-drawer-color-success);
81
+ }
109
82
 
110
- [data-fs-security-drawer-body-info] {
111
- display: flex;
112
- gap: var(--fs-spacing-1);
113
- align-items: center;
114
- padding-block: var(--fs-spacing-2);
115
- font-size: var(--fs-text-size-1);
116
- font-weight: var(--fs-text-weight-regular);
117
- color: var(--fs-color-text-light);
83
+ &[data-status="error"] {
84
+ color: var(--fs-security-drawer-color-error);
85
+ }
118
86
  }
119
87
 
120
88
  [data-fs-security-drawer-resend] {
@@ -123,20 +91,16 @@
123
91
  color: var(--fs-color-text-light);
124
92
  }
125
93
 
126
- [data-fs-security-drawer-body-new-password] {
94
+ [data-fs-security-drawer-body-password] {
127
95
  position: relative;
128
96
  display: flex;
129
97
  flex-direction: column;
130
98
  gap: var(--fs-spacing-1);
131
99
  width: 100%;
132
- }
133
100
 
134
- [data-fs-security-drawer-body-current-password] {
135
- position: relative;
136
- display: flex;
137
- flex-direction: column;
138
- gap: var(--fs-spacing-1);
139
- width: 100%;
101
+ &:first-child {
102
+ margin-bottom: var(--fs-spacing-3);
103
+ }
140
104
  }
141
105
 
142
106
  [data-fs-security-drawer-input-password-toggle] {
@@ -155,82 +119,6 @@
155
119
  transform: translateY(-50%);
156
120
  }
157
121
 
158
- display: flex;
159
- flex-direction: column;
160
- gap: var(--fs-spacing-6);
161
-
162
- [data-fs-security-header] {
163
- padding-block: var(--fs-spacing-6);
164
- padding-inline: var(--fs-spacing-11);
165
- }
166
-
167
- [data-fs-security-title] {
168
- font-family: var(--fs-text-face-title);
169
- font-size: var(--fs-text-size-3);
170
- font-weight: var(--fs-text-weight-semibold);
171
- }
172
-
173
- [data-fs-security-container] {
174
- display: flex;
175
- flex-direction: column;
176
- gap: var(--fs-spacing-6);
177
- }
178
-
179
- [data-fs-security-table] {
180
- display: grid;
181
- grid-template-columns: minmax(11.25rem, auto) 1fr;
182
- width: 100%;
183
- padding-inline: var(--fs-spacing-11);
184
- border-spacing: 0;
185
- border-collapse: collapse;
186
- }
187
-
188
- [data-fs-security-table-body] {
189
- display: contents;
190
- }
191
-
192
- [data-fs-security-table-row] {
193
- display: contents;
194
- border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
195
- }
196
-
197
- [data-fs-security-table-heading] {
198
- display: flex;
199
- align-items: center;
200
- padding-block: var(--fs-spacing-4);
201
- font-family: var(--fs-text-face-body);
202
- font-size: var(--fs-text-size-2);
203
- font-weight: var(--fs-text-weight-regular);
204
- color: var(--fs-color-text-light);
205
- text-align: left;
206
- border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
207
- }
208
-
209
- [data-fs-security-table-data] {
210
- display: flex;
211
- align-items: center;
212
- justify-content: space-between;
213
- padding-block: var(--fs-spacing-4);
214
- padding-inline: var(--fs-spacing-1);
215
- border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
216
-
217
- [data-fs-security-table-data-text] {
218
- padding-block: var(--fs-spacing-4);
219
- padding-inline: var(--fs-spacing-1);
220
- font-family: var(--fs-text-face-body);
221
- font-size: var(--fs-text-size-2);
222
- font-weight: var(--fs-text-weight-semibold);
223
- color: var(--fs-color-text);
224
- }
225
- }
226
-
227
- [data-fs-security-table-action] {
228
- display: flex;
229
- align-items: center;
230
- justify-content: flex-end;
231
- padding-inline: var(--fs-spacing-1);
232
- }
233
-
234
122
  [data-fs-security-drawer-error] {
235
123
  display: flex;
236
124
  gap: var(--fs-spacing-1);
@@ -246,29 +134,17 @@
246
134
  flex-shrink: 0;
247
135
  }
248
136
 
249
- @include media("<notebook") {
250
- [data-fs-security-header] {
251
- padding-inline: var(--fs-spacing-4);
252
- }
253
-
254
- [data-fs-security-body] {
255
- padding-inline: var(--fs-spacing-4);
256
- }
257
-
258
- [data-fs-security-table] {
259
- grid-template-columns: 1fr;
260
- }
261
-
262
- [data-fs-security-table-heading] {
263
- padding-block: var(--fs-spacing-4) 0;
264
- border-bottom: none;
265
- }
266
-
267
- [data-fs-security-table-data] {
268
- padding-block: var(--fs-spacing-1) var(--fs-spacing-4);
269
- padding-inline: 0;
270
- }
137
+ [data-fs-security-drawer-footer] {
138
+ display: flex;
139
+ gap: var(--fs-spacing-3);
140
+ align-items: center;
141
+ justify-content: center;
142
+ padding: var(--fs-spacing-3) var(--fs-spacing-4);
143
+ border-top: var(--fs-border-width) solid var(--fs-border-color-light);
144
+ [data-fs-button] { width: 100%; }
145
+ }
271
146
 
147
+ @include media("<notebook") {
272
148
  [data-fs-security-drawer-footer] {
273
149
  align-items: center;
274
150
  justify-content: flex-end;
@@ -10,12 +10,12 @@ import {
10
10
  type GlobalSectionsData,
11
11
  getGlobalSectionsData,
12
12
  } from 'src/components/cms/GlobalSections'
13
- import { execute } from 'src/server'
14
13
  import { getIsRepresentative } from 'src/sdk/account/getIsRepresentative'
14
+ import { execute } from 'src/server'
15
15
 
16
+ import { validateUser } from 'src/sdk/account/validateUser'
16
17
  import { injectGlobalSections } from 'src/server/cms/global'
17
18
  import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
18
- import { validateUser } from 'src/sdk/account/validateUser'
19
19
  import storeConfig from '../../discovery.config'
20
20
 
21
21
  export type MyAccountProps = {
@@ -26,7 +26,9 @@ export type MyAccountProps = {
26
26
 
27
27
  const query = gql(`
28
28
  query ServerAccountPageQuery {
29
- accountName
29
+ accountProfile {
30
+ name
31
+ }
30
32
  }
31
33
  `)
32
34
 
@@ -91,7 +93,7 @@ export const getServerSideProps: GetServerSideProps<
91
93
  return {
92
94
  props: {
93
95
  globalSections: globalSectionsResult,
94
- accountName: account.data.accountName,
96
+ accountName: account.data.accountProfile.name,
95
97
  isRepresentative,
96
98
  },
97
99
  }
@@ -35,7 +35,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
35
35
 
36
36
  type Props = {
37
37
  globalSections: GlobalSectionsData
38
- accountName: ServerAccountPageQueryQuery['accountName']
38
+ accountName: ServerAccountPageQueryQuery['accountProfile']['name']
39
39
  }
40
40
 
41
41
  function Page({ globalSections: globalSectionsProp, accountName }: Props) {
@@ -66,7 +66,9 @@ function Page({ globalSections: globalSectionsProp, accountName }: Props) {
66
66
 
67
67
  const query = gql(`
68
68
  query ServerAccountPageQuery {
69
- accountName
69
+ accountProfile {
70
+ name
71
+ }
70
72
  }
71
73
  `)
72
74
 
@@ -134,7 +136,7 @@ export const getServerSideProps: GetServerSideProps<
134
136
  // The sections from the CMS page are not utilized here for the My Account page.
135
137
  // page,
136
138
  globalSections: globalSectionsResult,
137
- accountName: account.data.accountName,
139
+ accountName: account.data.accountProfile.name,
138
140
  },
139
141
  }
140
142
  }
@@ -38,7 +38,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
38
38
  type Props = {
39
39
  page: PageContentType
40
40
  globalSections: GlobalSectionsData
41
- accountName: ServerAccountPageQueryQuery['accountName']
41
+ accountName: ServerAccountPageQueryQuery['accountProfile']['name']
42
42
  }
43
43
 
44
44
  function Page({
@@ -66,7 +66,9 @@ function Page({
66
66
 
67
67
  const query = gql(`
68
68
  query ServerAccountPageQuery {
69
- accountName
69
+ accountProfile {
70
+ name
71
+ }
70
72
  }
71
73
  `)
72
74
 
@@ -133,7 +135,7 @@ export const getServerSideProps: GetServerSideProps<
133
135
  props: {
134
136
  page,
135
137
  globalSections: globalSectionsResult,
136
- accountName: account.data.accountName,
138
+ accountName: account.data.accountProfile.name,
137
139
  },
138
140
  }
139
141
  }
@@ -257,7 +257,9 @@ const query = gql(`
257
257
  phone
258
258
  }
259
259
  }
260
- accountName
260
+ accountProfile {
261
+ name
262
+ }
261
263
  }
262
264
  `)
263
265
 
@@ -346,7 +348,7 @@ export const getServerSideProps: GetServerSideProps<
346
348
  props: {
347
349
  globalSections: globalSectionsResult,
348
350
  order: orderDetails.data.userOrder,
349
- accountName: orderDetails.data.accountName,
351
+ accountName: orderDetails.data.accountProfile.name,
350
352
  isRepresentative,
351
353
  },
352
354
  }
@@ -120,7 +120,9 @@ const query = gql(`
120
120
  perPage
121
121
  }
122
122
  }
123
- accountName
123
+ accountProfile {
124
+ name
125
+ }
124
126
  }
125
127
  `)
126
128
 
@@ -242,7 +244,7 @@ export const getServerSideProps: GetServerSideProps<
242
244
  return {
243
245
  props: {
244
246
  globalSections: globalSectionsResult,
245
- accountName: listOrders.data.accountName,
247
+ accountName: listOrders.data.accountProfile.name,
246
248
  listOrders: listOrders.data.listUserOrders,
247
249
  total: listOrders.data.listUserOrders.paging.total,
248
250
  perPage: listOrders.data.listUserOrders.paging.perPage,
@@ -1,6 +1,3 @@
1
- /* ######################################### */
2
- /* Mocked Page until development is finished, it will be removed after */
3
-
4
1
  import type { Locator } from '@vtex/client-cms'
5
2
  import type { GetServerSideProps } from 'next'
6
3
  import { NextSeo } from 'next-seo'
@@ -46,8 +43,8 @@ type ProfilePagePros = {
46
43
 
47
44
  export default function Profile({
48
45
  globalSections: globalSectionsProp,
49
- accountName,
50
46
  accountProfile,
47
+ accountName,
51
48
  isRepresentative,
52
49
  }: ProfilePagePros) {
53
50
  const { sections: globalSections, settings: globalSettings } =
@@ -73,7 +70,6 @@ export default function Profile({
73
70
 
74
71
  const query = gql(`
75
72
  query ServerProfileQuery {
76
- accountName
77
73
  accountProfile {
78
74
  name
79
75
  email
@@ -155,7 +151,7 @@ export const getServerSideProps: GetServerSideProps<
155
151
  return {
156
152
  props: {
157
153
  globalSections: globalSectionsResult,
158
- accountName: profile.data.accountName,
154
+ accountName: profile.data.accountProfile.name,
159
155
  accountProfile: profile.data.accountProfile,
160
156
  isRepresentative,
161
157
  },