@faststore/core 3.88.6 → 3.89.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.
Files changed (147) 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 +28 -28
  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/8071.js +1 -1
  17. package/.next/server/chunks/9563.js +1 -1
  18. package/.next/server/middleware-build-manifest.js +1 -1
  19. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  20. package/.next/server/pages/404.js.nft.json +1 -1
  21. package/.next/server/pages/500.js.nft.json +1 -1
  22. package/.next/server/pages/[...slug].js.nft.json +1 -1
  23. package/.next/server/pages/[slug]/p.js.nft.json +1 -1
  24. package/.next/server/pages/_app.js.nft.json +1 -1
  25. package/.next/server/pages/_document.js.nft.json +1 -1
  26. package/.next/server/pages/_error.js.nft.json +1 -1
  27. package/.next/server/pages/api/graphql.js +1 -1
  28. package/.next/server/pages/api/graphql.js.nft.json +1 -1
  29. package/.next/server/pages/api/health/live.js.nft.json +1 -1
  30. package/.next/server/pages/api/health/ready.js.nft.json +1 -1
  31. package/.next/server/pages/api/preview.js.nft.json +1 -1
  32. package/.next/server/pages/checkout.js.nft.json +1 -1
  33. package/.next/server/pages/en-US/404.html +1 -1
  34. package/.next/server/pages/en-US/500.html +1 -1
  35. package/.next/server/pages/en-US/checkout.html +1 -1
  36. package/.next/server/pages/en-US/login.html +1 -1
  37. package/.next/server/pages/en-US/s.html +1 -1
  38. package/.next/server/pages/en-US.html +1 -1
  39. package/.next/server/pages/index.js.nft.json +1 -1
  40. package/.next/server/pages/login.js.nft.json +1 -1
  41. package/.next/server/pages/pvt/account/403.js.nft.json +1 -1
  42. package/.next/server/pages/pvt/account/404.js.nft.json +1 -1
  43. package/.next/server/pages/pvt/account/[...unknown].js.nft.json +1 -1
  44. package/.next/server/pages/pvt/account/orders/[id].js +1 -1
  45. package/.next/server/pages/pvt/account/orders/[id].js.nft.json +1 -1
  46. package/.next/server/pages/pvt/account/orders.js +1 -1
  47. package/.next/server/pages/pvt/account/orders.js.nft.json +1 -1
  48. package/.next/server/pages/pvt/account/profile.js +1 -1
  49. package/.next/server/pages/pvt/account/profile.js.nft.json +1 -1
  50. package/.next/server/pages/pvt/account/security.js +1 -1
  51. package/.next/server/pages/pvt/account/security.js.nft.json +1 -1
  52. package/.next/server/pages/pvt/account/user-details.js +1 -1
  53. package/.next/server/pages/pvt/account/user-details.js.nft.json +1 -1
  54. package/.next/server/pages/pvt/account.js.nft.json +1 -1
  55. package/.next/server/pages/s.js.nft.json +1 -1
  56. package/.next/server/pages-manifest.json +1 -1
  57. package/.next/static/chunks/2284.be64169724492654.js +1 -0
  58. package/.next/static/chunks/pages/pvt/account/403-f2858569fde3873b.js +1 -0
  59. package/.next/static/chunks/pages/pvt/account/404-c68124bed7cb7c48.js +1 -0
  60. package/.next/static/chunks/pages/pvt/account/orders/[id]-459f6b9a86780410.js +1 -0
  61. package/.next/static/chunks/pages/pvt/account/orders-f376bbaf561ae429.js +1 -0
  62. package/.next/static/chunks/pages/pvt/account/profile-e13024f80e939a5f.js +1 -0
  63. package/.next/static/chunks/pages/pvt/account/security-e6289a40e745d3c4.js +1 -0
  64. package/.next/static/chunks/pages/pvt/account/user-details-fba1822e52e7de26.js +1 -0
  65. package/.next/static/chunks/{webpack-3230a260fda8541e.js → webpack-f16e329d9f50b79b.js} +1 -1
  66. package/.next/static/css/{5273202f7c5e5ec1.css → 02eaf202d3d11fd1.css} +1 -1
  67. package/.next/static/css/0f8f72ecdeb79402.css +1 -0
  68. package/.next/static/css/2c0f8724c01f2ab8.css +1 -0
  69. package/.next/static/css/32a4ddbf3999c2a5.css +1 -0
  70. package/.next/static/css/331f08e9d306e70b.css +1 -0
  71. package/.next/static/css/{865e30903caadb79.css → 4f0597b0bf0ef2e1.css} +1 -1
  72. package/.next/static/css/5177628438c28f74.css +1 -0
  73. package/.next/static/css/6bb0abee27fe0019.css +1 -0
  74. package/.next/static/css/84ebcfe7a63d709d.css +1 -0
  75. package/.next/static/css/8df9f9a136312210.css +1 -0
  76. package/.next/static/css/a8bcd71b15adb1ec.css +1 -0
  77. package/.next/static/css/a9328b56f3942b82.css +1 -0
  78. package/.next/static/css/{b7bba8fce075688b.css → b65e005fb943434c.css} +1 -1
  79. package/.next/static/css/{831a1f72fe4b2d80.css → bd121d85d6ceed46.css} +1 -1
  80. package/.next/static/css/{dbbb10bf2f162a58.css → be59e989720e6e50.css} +1 -1
  81. package/.next/static/css/{b1806cbafd0c1f81.css → c29fee5b9f9d48d9.css} +1 -1
  82. package/.next/static/css/{936c65069d608087.css → c34f6ea9953e2f63.css} +1 -1
  83. package/.next/static/css/{e46393a76c5d93a9.css → c53b17b6fa994508.css} +1 -1
  84. package/.next/static/css/{5347dbc8b71de47d.css → ceb410a7062740d1.css} +1 -1
  85. package/.next/static/css/da0f1f3329c5657a.css +1 -0
  86. package/.next/static/css/da5bfb1f39c54578.css +1 -0
  87. package/.next/static/css/f60366555f563deb.css +1 -0
  88. package/.next/static/css/f81198b7fe9f5f6f.css +1 -0
  89. package/.next/static/zzqNGaHXIghWiPWB3TKER/_buildManifest.js +1 -0
  90. package/.next/trace +138 -137
  91. package/.turbo/turbo-build.log +26 -26
  92. package/.turbo/turbo-test.log +6 -5
  93. package/CHANGELOG.md +12 -0
  94. package/package.json +3 -3
  95. package/src/components/account/MyAccountLayout/MyAccountLayout.tsx +3 -3
  96. package/src/components/account/MyAccountLayout/styles.scss +10 -0
  97. package/src/components/account/MyAccountMenu/styles.scss +2 -1
  98. package/src/components/account/MyAccountUserDetails/MyAccountUserDetails.tsx +18 -39
  99. package/src/components/account/MyAccountUserDetails/styles.module.scss +1 -93
  100. package/src/components/account/components/MyAccountHeader/MyAccountHeader.tsx +13 -0
  101. package/src/components/account/components/MyAccountHeader/index.ts +1 -0
  102. package/src/components/account/components/MyAccountHeader/styles.scss +13 -0
  103. package/src/components/account/components/MyAccountStatusBadge/styles.scss +4 -4
  104. package/src/components/account/components/MyAccountTable/MyAccountTable.tsx +23 -0
  105. package/src/components/account/components/MyAccountTable/index.ts +1 -0
  106. package/src/components/account/components/MyAccountTable/styles.scss +67 -0
  107. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrders.tsx +131 -134
  108. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/MyAccountListOrdersTable.tsx +9 -24
  109. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/styles.scss +37 -42
  110. package/src/components/account/orders/MyAccountListOrders/styles.module.scss +4 -25
  111. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/MyAccountOrderActions.tsx +1 -6
  112. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx +1 -1
  113. package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/MyAccountStatusCard.tsx +9 -11
  114. package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/styles.scss +27 -11
  115. package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/useConnectorPositioning.ts +0 -8
  116. package/src/components/account/orders/MyAccountOrderDetails/section.module.scss +2 -3
  117. package/src/components/account/profile/profile.module.scss +1 -85
  118. package/src/components/account/profile/profile.tsx +24 -31
  119. package/src/components/account/security/SecurityDrawer.tsx +86 -88
  120. package/src/components/account/security/SecuritySection.tsx +23 -20
  121. package/src/components/account/security/styles.module.scss +26 -150
  122. package/src/components/search/SearchDropdown/SearchDropdown.tsx +20 -8
  123. package/src/utils/userOrderStatus.ts +5 -5
  124. package/.next/static/chunks/2284.17a3e4c3af092981.js +0 -1
  125. package/.next/static/chunks/pages/pvt/account/403-e4315ace8609a7ff.js +0 -1
  126. package/.next/static/chunks/pages/pvt/account/404-1e450ae9476bbcaa.js +0 -1
  127. package/.next/static/chunks/pages/pvt/account/orders/[id]-a3e46af1be9816a4.js +0 -1
  128. package/.next/static/chunks/pages/pvt/account/orders-db7a364869130660.js +0 -1
  129. package/.next/static/chunks/pages/pvt/account/profile-e8a7ad7a7d7c60fb.js +0 -1
  130. package/.next/static/chunks/pages/pvt/account/security-cad4e4260be8b0cd.js +0 -1
  131. package/.next/static/chunks/pages/pvt/account/user-details-401f6f6e4ce4b9ce.js +0 -1
  132. package/.next/static/css/04fb2d4b8924b0c6.css +0 -1
  133. package/.next/static/css/083dc2a5b0de2439.css +0 -1
  134. package/.next/static/css/175fa823349dc534.css +0 -1
  135. package/.next/static/css/297be4be3be36ff0.css +0 -1
  136. package/.next/static/css/2a4b7072e47636f1.css +0 -1
  137. package/.next/static/css/45fac71f6411cceb.css +0 -1
  138. package/.next/static/css/6cd282d958f613bc.css +0 -1
  139. package/.next/static/css/b52f8f6500d3439e.css +0 -1
  140. package/.next/static/css/b7fc24e8f1eb011f.css +0 -1
  141. package/.next/static/css/d26cb0a54378b3d9.css +0 -1
  142. package/.next/static/css/ec7fdad03808422d.css +0 -1
  143. package/.next/static/css/f93cf36b16950027.css +0 -1
  144. package/.next/static/css/fd0a7a134ddc3d90.css +0 -1
  145. package/.next/static/css/fe0bcc13a2b68605.css +0 -1
  146. package/.next/static/gr1zvFciaZoSP1gK1c2vT/_buildManifest.js +0 -1
  147. /package/.next/static/{gr1zvFciaZoSP1gK1c2vT → zzqNGaHXIghWiPWB3TKER}/_ssgManifest.js +0 -0
@@ -1,23 +1,23 @@
1
1
 
2
- > @faststore/core@3.88.5 prebuild /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.88.7 prebuild /home/runner/work/faststore/faststore/packages/core
3
3
  > na run partytown && na run generate
4
4
 
5
5
 
6
- > @faststore/core@3.88.5 partytown /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@3.88.7 partytown /home/runner/work/faststore/faststore/packages/core
7
7
  > partytown copylib ./public/~partytown
8
8
 
9
9
  Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
10
10
 
11
- > @faststore/core@3.88.5 generate /home/runner/work/faststore/faststore/packages/core
11
+ > @faststore/core@3.88.7 generate /home/runner/work/faststore/faststore/packages/core
12
12
  > na run generate:schema && na run generate:codegen && na run format:generated
13
13
 
14
14
 
15
- > @faststore/core@3.88.5 generate:schema /home/runner/work/faststore/faststore/packages/core
15
+ > @faststore/core@3.88.7 generate:schema /home/runner/work/faststore/faststore/packages/core
16
16
  > tsx src/server/generator/generateGraphQLSchemaFile.ts
17
17
 
18
18
  Schema GraphQL file generated successfully
19
19
 
20
- > @faststore/core@3.88.5 generate:codegen /home/runner/work/faststore/faststore/packages/core
20
+ > @faststore/core@3.88.7 generate:codegen /home/runner/work/faststore/faststore/packages/core
21
21
  > graphql-codegen
22
22
 
23
23
  [STARTED] Parse Configuration
@@ -37,11 +37,11 @@ Running lifecycle hook "afterStart" scripts...
37
37
  [CLI] Loading Documents
38
38
  [CLI] Generating output
39
39
 
40
- > @faststore/core@3.88.5 format:generated /home/runner/work/faststore/faststore/packages/core
40
+ > @faststore/core@3.88.7 format:generated /home/runner/work/faststore/faststore/packages/core
41
41
  > prettier --write "@generated/**/*.{ts,js,tsx,jsx,json}" --loglevel error
42
42
 
43
43
 
44
- > @faststore/core@3.88.5 build /home/runner/work/faststore/faststore/packages/core
44
+ > @faststore/core@3.88.7 build /home/runner/work/faststore/faststore/packages/core
45
45
  > next build
46
46
 
47
47
  ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
@@ -58,7 +58,7 @@ Browserslist: caniuse-lite is outdated. Please run:
58
58
  Creating an optimized production build ...
59
59
  Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc.js" https://nextjs.org/docs/messages/swc-disabled
60
60
  Using external babel configuration from /home/runner/work/faststore/faststore/packages/core/.babelrc.js
61
- Browserslist: browsers data (caniuse-lite) is 8 months old. Please run:
61
+ Browserslist: browsers data (caniuse-lite) is 9 months old. Please run:
62
62
  npx update-browserslist-db@latest
63
63
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
64
64
  ✓ Compiled successfully
@@ -74,12 +74,12 @@ Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Cont
74
74
 
75
75
  Route (pages) Size First Load JS
76
76
  ┌ ● / 3.69 kB 142 kB
77
- ├ └ css/b1806cbafd0c1f81.css 3.06 kB
77
+ ├ └ css/c29fee5b9f9d48d9.css 3.07 kB
78
78
  ├ /_app 0 B 107 kB
79
79
  ├ ● /[...slug] 2.49 kB 156 kB
80
80
  ├ ● /[slug]/p 97.4 kB 236 kB
81
- ├ ├ css/6cd282d958f613bc.css 5.9 kB
82
- ├ └ css/175fa823349dc534.css 22 kB
81
+ ├ ├ css/331f08e9d306e70b.css 5.92 kB
82
+ ├ └ css/a9328b56f3942b82.css 22 kB
83
83
  ├ ○ /404 1.57 kB 140 kB
84
84
  ├ ● /500 1.57 kB 140 kB
85
85
  ├ λ /api/graphql 0 B 107 kB
@@ -90,26 +90,26 @@ Route (pages) Size First Load JS
90
90
  ├ ● /login 1.7 kB 140 kB
91
91
  ├ λ /pvt/account 247 B 108 kB
92
92
  ├ ● /pvt/account/[...unknown] 287 B 108 kB
93
- ├ λ /pvt/account/403 2.47 kB 141 kB
94
- ├ └ css/b7bba8fce075688b.css 4.2 kB
95
- ├ λ /pvt/account/404 2.16 kB 140 kB
96
- ├ └ css/5347dbc8b71de47d.css 4.25 kB
97
- ├ λ /pvt/account/orders 10.5 kB 149 kB
98
- ├ └ css/b7fc24e8f1eb011f.css 12.8 kB
99
- ├ λ /pvt/account/orders/[id] 12.2 kB 150 kB
100
- ├ └ css/297be4be3be36ff0.css 12.6 kB
101
- ├ λ /pvt/account/profile 1.81 kB 140 kB
102
- ├ └ css/831a1f72fe4b2d80.css 3.97 kB
103
- ├ λ /pvt/account/security 3.79 kB 142 kB
104
- ├ └ css/ec7fdad03808422d.css 5.22 kB
105
- ├ λ /pvt/account/user-details 1.76 kB 140 kB
106
- ├ └ css/e46393a76c5d93a9.css 4.17 kB
93
+ ├ λ /pvt/account/403 2.49 kB 141 kB
94
+ ├ └ css/c53b17b6fa994508.css 4.66 kB
95
+ ├ λ /pvt/account/404 2.18 kB 140 kB
96
+ ├ └ css/ceb410a7062740d1.css 4.72 kB
97
+ ├ λ /pvt/account/orders 10.6 kB 149 kB
98
+ ├ └ css/f81198b7fe9f5f6f.css 13.9 kB
99
+ ├ λ /pvt/account/orders/[id] 12.1 kB 150 kB
100
+ ├ └ css/da5bfb1f39c54578.css 13.3 kB
101
+ ├ λ /pvt/account/profile 1.98 kB 140 kB
102
+ ├ └ css/b65e005fb943434c.css 4.4 kB
103
+ ├ λ /pvt/account/security 3.96 kB 142 kB
104
+ ├ └ css/6bb0abee27fe0019.css 5.65 kB
105
+ ├ λ /pvt/account/user-details 1.91 kB 140 kB
106
+ ├ └ css/bd121d85d6ceed46.css 4.52 kB
107
107
  └ ● /s 3.28 kB 157 kB
108
108
  + First Load JS shared by all 111 kB
109
109
  ├ chunks/framework-d514426edf885c68.js 45.4 kB
110
110
  ├ chunks/main-595f5e3b626b9fff.js 33.2 kB
111
111
  ├ chunks/pages/_app-78bc68991096280c.js 25 kB
112
- ├ chunks/webpack-3230a260fda8541e.js 3.85 kB
112
+ ├ chunks/webpack-f16e329d9f50b79b.js 3.86 kB
113
113
  └ css/24a5e8f6808266fe.css 3.53 kB
114
114
 
115
115
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
@@ -1,14 +1,15 @@
1
1
 
2
- > @faststore/core@3.88.5 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.88.7 test /home/runner/work/faststore/faststore/packages/core
3
3
  > jest
4
4
 
5
- PASS test/server/cms/global.test.ts (27.829 s)
6
- PASS test/utils/multipleTemplates.test.ts (28.007 s)
5
+ PASS test/utils/multipleTemplates.test.ts (27.104 s)
6
+ PASS test/server/cms/global.test.ts (27.492 s)
7
7
  PASS test/server/cms/index.test.ts
8
- PASS test/server/index.test.ts (31.794 s)
8
+ PASS test/server/index.test.ts (31.571 s)
9
+ A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
9
10
 
10
11
  Test Suites: 4 passed, 4 total
11
12
  Tests: 22 passed, 22 total
12
13
  Snapshots: 0 total
13
- Time: 32.913 s
14
+ Time: 32.998 s
14
15
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.89.0](https://github.com/vtex/faststore/compare/v3.88.7...v3.89.0) (2025-10-02)
7
+
8
+ ### Features
9
+
10
+ - My Account QA SFS-2859 ([#3040](https://github.com/vtex/faststore/issues/3040)) ([5e36a5f](https://github.com/vtex/faststore/commit/5e36a5f31acb1523024ad6e7063ca51aabe2f303)), closes [/github.com/vtex/faststore/blob/af6d2acbbc2fb72778c7223897ec7846736b4c87/packages/core/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx#L1](https://github.com//github.com/vtex/faststore/blob/af6d2acbbc2fb72778c7223897ec7846736b4c87/packages/core/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx/issues/L1)
11
+
12
+ ## [3.88.7](https://github.com/vtex/faststore/compare/v3.88.6...v3.88.7) (2025-09-25)
13
+
14
+ ### Bug Fixes
15
+
16
+ - refactor search dropdown to handle analytics events asynchronously ([#3057](https://github.com/vtex/faststore/issues/3057)) ([ebd0ead](https://github.com/vtex/faststore/commit/ebd0eadfaf80f493e4defd88e47517f346720810))
17
+
6
18
  ## [3.88.6](https://github.com/vtex/faststore/compare/v3.88.5...v3.88.6) (2025-09-23)
7
19
 
8
20
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.88.6",
3
+ "version": "3.89.0",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -48,7 +48,7 @@
48
48
  "@faststore/graphql-utils": "^3.81.0",
49
49
  "@faststore/lighthouse": "^3.81.0",
50
50
  "@faststore/sdk": "^3.88.6",
51
- "@faststore/ui": "^3.88.0",
51
+ "@faststore/ui": "^3.89.0",
52
52
  "@graphql-codegen/cli": "5.0.2",
53
53
  "@graphql-codegen/client-preset": "4.2.6",
54
54
  "@graphql-codegen/typescript": "4.0.7",
@@ -116,5 +116,5 @@
116
116
  "ts-jest": "29.1.1",
117
117
  "typescript": "5.3.2"
118
118
  },
119
- "gitHead": "34769c038ba85fdb91feade652abbe350b6578d6"
119
+ "gitHead": "77bd257d8f854dba233d1962aad06f34a1b12230"
120
120
  }
@@ -23,10 +23,10 @@ const MyAccountLayout = ({
23
23
  )
24
24
 
25
25
  return (
26
- <div className={styles.layout}>
26
+ <section className={styles.layout}>
27
27
  <MyAccountMenu accountName={accountName} items={routes} />
28
- <section>{children}</section>
29
- </div>
28
+ <div data-fs-account-layout-content>{children}</div>
29
+ </section>
30
30
  )
31
31
  }
32
32
  export default MyAccountLayout
@@ -1,11 +1,13 @@
1
1
  .layout {
2
2
  @import "@faststore/ui/src/components/atoms/Badge/styles.scss";
3
3
  @import "@faststore/ui/src/components/atoms/Button/styles.scss";
4
+ @import "@faststore/ui/src/components/atoms/Link/styles.scss";
4
5
  @import "@faststore/ui/src/components/atoms/Icon/styles.scss";
5
6
  @import "@faststore/ui/src/components/atoms/Input/styles.scss";
6
7
  @import "@faststore/ui/src/components/molecules/LinkButton/styles.scss";
7
8
  @import "@faststore/ui/src/components/molecules/SearchInputField/styles.scss";
8
9
  @import "../MyAccountMenu/styles.scss";
10
+ @import "../components/MyAccountHeader/styles.scss";
9
11
 
10
12
  display: grid;
11
13
  grid-template-rows: auto 1fr;
@@ -18,4 +20,12 @@
18
20
  max-width: var(--fs-grid-breakpoint-desktop);
19
21
  margin: 0 auto;
20
22
  }
23
+
24
+ [data-fs-account-layout-content] {
25
+ padding: 0 var(--fs-spacing-4);
26
+
27
+ @include media(">=notebook") {
28
+ padding: 0 var(--fs-spacing-8);
29
+ }
30
+ }
21
31
  }
@@ -46,6 +46,7 @@
46
46
  height: var(--fs-spacing-6);
47
47
  font-size: var(--fs-text-size-1);
48
48
  font-weight: var(--fs-text-weight-medium);
49
+ white-space: nowrap;
49
50
  background-color: var(--fs-color-tertiary-bkg);
50
51
  border-radius: var(--fs-border-radius-pill);
51
52
 
@@ -101,7 +102,7 @@
101
102
 
102
103
  .nav {
103
104
  flex-direction: column;
104
- gap: 0;
105
+ gap: var(--fs-spacing-0);
105
106
  }
106
107
 
107
108
  .navItem {
@@ -1,4 +1,6 @@
1
1
  import Tag from '../components/MyAccountTag'
2
+ import AccountTable from '../components/MyAccountTable'
3
+ import AccountHeader from '../components/MyAccountHeader'
2
4
  import styles from './styles.module.scss'
3
5
 
4
6
  type MyAccountUserDetailsProps = {
@@ -15,46 +17,23 @@ export default function MyAccountUserDetails({
15
17
  }: MyAccountUserDetailsProps) {
16
18
  return (
17
19
  <section className={styles.section}>
18
- <h1 data-fs-user-details-title>User details</h1>
20
+ <AccountHeader pageTitle="User details" />
19
21
  <div data-fs-user-details-container>
20
- <table data-fs-user-details-table>
21
- <tbody>
22
- <tr data-fs-user-details-row>
23
- <th data-fs-user-details-row-label>Name</th>
24
- <td data-fs-user-details-row-value>{name}</td>
25
- </tr>
26
- <tr data-fs-user-details-divider-row>
27
- <td data-fs-user-details-divider></td>
28
- <td data-fs-user-details-divider></td>
29
- </tr>
30
- <tr data-fs-user-details-row>
31
- <th data-fs-user-details-row-label>Email</th>
32
- <td data-fs-user-details-row-value>{email}</td>
33
- </tr>
34
- <tr data-fs-user-details-divider-row>
35
- <td data-fs-user-details-divider></td>
36
- <td data-fs-user-details-divider></td>
37
- </tr>
38
- <tr data-fs-user-details-row>
39
- <th data-fs-user-details-row-label>Role</th>
40
- <td data-fs-user-details-row-tags>
41
- {role.map((r) => (
42
- <span key={r} data-fs-user-details-row-value>
43
- <Tag>{r}</Tag>
44
- </span>
45
- ))}
46
- </td>
47
- </tr>
48
- <tr data-fs-user-details-divider-row>
49
- <td data-fs-user-details-divider></td>
50
- <td data-fs-user-details-divider></td>
51
- </tr>
52
- <tr data-fs-user-details-row>
53
- <th data-fs-user-details-row-label>Organizational unit</th>
54
- <td data-fs-user-details-row-value>{orgUnit}</td>
55
- </tr>
56
- </tbody>
57
- </table>
22
+ <AccountTable
23
+ rows={[
24
+ { heading: 'Name', data: name ? name : '–' },
25
+ { heading: 'Email', data: email },
26
+ {
27
+ heading: 'Role',
28
+ data: role.map((r) => (
29
+ <span key={r} data-fs-user-details-row-value>
30
+ <Tag>{r}</Tag>
31
+ </span>
32
+ )),
33
+ },
34
+ { heading: 'Organizational unit', data: orgUnit },
35
+ ]}
36
+ />
58
37
  </div>
59
38
  </section>
60
39
  )
@@ -1,108 +1,16 @@
1
1
  @layer components {
2
2
  .section {
3
3
  @import "../components/MyAccountTag/styles.scss";
4
+ @import "../components/MyAccountTable/styles.scss";
4
5
 
5
6
  // --------------------------------------------------------
6
7
  // Design Tokens
7
8
  // --------------------------------------------------------
8
9
 
9
- --fs-user-details-padding : var(--fs-spacing-4) var(--fs-spacing-9);
10
-
11
- // Title
12
- --fs-user-details-title-padding : var(--fs-spacing-4) 0;
13
- --fs-user-details-title-size : var(--fs-text-size-4);
14
- --fs-user-details-title-weight : var(--fs-text-weight-semibold);
15
- --fs-user-details-title-line-height : var(--fs-spacing-4);
16
-
17
- // Divider
18
- --fs-user-details-divider-border : calc(var(--fs-border-width) / 2) solid #e0e0e0;
19
-
20
- // Row
21
- --fs-user-details-row-padding : var(--fs-spacing-4) 0;
22
- --fs-user-details-row-weight : var(--fs-text-weight-medium);
23
- --fs-user-details-row-label-width : 12.5rem;
24
- --fs-user-details-row-label-size : var(--fs-text-size-1);
25
- --fs-user-details-row-label-weight : var(--fs-text-weight-medium);
26
- --fs-user-details-row-label-color : var(--fs-color-neutral-5);
27
-
28
- // Row Value
29
- --fs-user-details-row-value-size : var(--fs-text-size-1);
30
- --fs-user-details-row-value-weight : var(--fs-text-weight-medium);
31
- --fs-user-details-row-value-color : black;
32
-
33
- width: 100%;
34
- padding: var(--fs-user-details-padding);
35
-
36
- @include media("<notebook") {
37
- padding: var(--fs-spacing-0) var(--fs-spacing-5);
38
- }
39
-
40
- [data-fs-user-details-table] {
41
- width: 100%;
42
- border-spacing: 0;
43
- border-collapse: collapse;
44
- }
45
-
46
- [data-fs-user-details-row] {
47
- display: flex;
48
- padding: var(--fs-user-details-row-padding);
49
- font-weight: var(--fs-user-details-row-weight);
50
- line-height: var(--fs-user-details-row-line-height);
51
- border-bottom: var(--fs-user-details-divider-border);
52
-
53
- @include media("<tablet") {
54
- flex-direction: column;
55
- gap: .5rem;
56
- }
57
- }
58
-
59
- [data-fs-user-details-row]:last-of-type {
60
- border-bottom: none;
61
- }
62
-
63
- [data-fs-user-details-divider-row] {
64
- height: 0;
65
- }
66
-
67
- [data-fs-user-details-divider] {
68
- height: 0;
69
- padding: 0;
70
- border: none;
71
- border: var(--fs-user-details-divider-border);
72
- }
73
-
74
- [data-fs-user-details-title] {
75
- display: flex;
76
- align-items: center;
77
- justify-content: space-between;
78
- padding: var(--fs-user-details-title-padding);
79
- font-size: var(--fs-user-details-title-size);
80
- font-weight: var(--fs-user-details-title-weight);
81
- line-height: var(--fs-user-details-title-line-height);
82
- }
83
-
84
- [data-fs-user-details-row-label] {
85
- width: var(--fs-user-details-row-label-width);
86
- font-size: var(--fs-user-details-row-label-size);
87
- font-weight: var(--fs-user-details-row-label-weight);
88
- color: var(--fs-user-details-row-label-color);
89
- text-align: left;
90
- }
91
-
92
- [data-fs-user-details-row-value] {
93
- font-size: var(--fs-user-details-row-value-size);
94
- font-weight: var(--fs-user-details-row-value-weight);
95
- color: var(--fs-user-details-row-value-color);
96
- }
97
-
98
10
  [data-fs-user-details-row-tags] {
99
11
  display: flex;
100
12
  flex-wrap: wrap;
101
13
  gap: var(--fs-spacing-0);
102
-
103
- [data-fs-user-details-row-value] {
104
- margin-top: var(--fs-spacing-0);
105
- }
106
14
  }
107
15
  }
108
16
  }
@@ -0,0 +1,13 @@
1
+ interface MyAccountHeaderProps {
2
+ pageTitle: string
3
+ }
4
+
5
+ function MyAccountHeader({ pageTitle }: MyAccountHeaderProps) {
6
+ return (
7
+ <header data-fs-account-header>
8
+ <h1 data-fs-account-header-title>{pageTitle}</h1>
9
+ </header>
10
+ )
11
+ }
12
+
13
+ export default MyAccountHeader
@@ -0,0 +1 @@
1
+ export { default } from './MyAccountHeader'
@@ -0,0 +1,13 @@
1
+ [data-fs-account-header] {
2
+ padding: var(--fs-spacing-3) 0;
3
+
4
+ @include media(">=notebook") {
5
+ padding: var(--fs-spacing-6) 0;
6
+ }
7
+
8
+ [data-fs-account-header-title] {
9
+ font-family: var(--fs-text-face-title);
10
+ font-size: var(--fs-text-size-4);
11
+ font-weight: var(--fs-text-weight-semibold);
12
+ }
13
+ }
@@ -11,14 +11,14 @@
11
11
  --fs-my-account-badge-padding : var(--fs-spacing-0) var(--fs-spacing-2);
12
12
  --fs-my-account-badge-line-height : 1;
13
13
  --fs-my-account-badge-color : var(--fs-color-text);
14
- --fs-my-account-badge-border : 1px none transparent;
14
+ --fs-my-account-badge-border : 2px solid var(--fs-color-neutral-0);
15
15
  --fs-my-account-badge-border-radius : var(--fs-border-radius-pill);
16
16
  --fs-my-account-badge-success-bkg : var(--fs-color-success-bkg);
17
- --fs-my-account-badge-success-border : var(--fs-color-success-bkg);
17
+ --fs-my-account-badge-success-border : var(--fs-color-neutral-0);
18
18
  --fs-my-account-badge-warning-bkg : var(--fs-color-warning-bkg);
19
- --fs-my-account-badge-warning-border : var(--fs-color-warning-bkg);
19
+ --fs-my-account-badge-warning-border : var(--fs-color-neutral-0);
20
20
  --fs-my-account-badge-neutral-bkg : var(--fs-color-neutral-bkg);
21
- --fs-my-account-badge-neutral-border : var(--fs-color-neutral-bkg);
21
+ --fs-my-account-badge-neutral-border : var(--fs-color-neutral-0);
22
22
 
23
23
  // --------------------------------------------------------
24
24
  // Structural Styles
@@ -0,0 +1,23 @@
1
+ interface MyAccountTableProps {
2
+ rows?: Array<{
3
+ heading: string
4
+ data: React.ReactNode | string
5
+ }>
6
+ }
7
+
8
+ function MyAccountTable({ rows, ...props }: MyAccountTableProps) {
9
+ return (
10
+ <table data-fs-account-table {...props}>
11
+ <tbody data-fs-account-table-body>
12
+ {rows?.map((row, idx) => (
13
+ <tr data-fs-account-table-row key={idx}>
14
+ <th data-fs-account-table-heading>{row.heading}</th>
15
+ <td data-fs-account-table-data>{row.data}</td>
16
+ </tr>
17
+ ))}
18
+ </tbody>
19
+ </table>
20
+ )
21
+ }
22
+
23
+ export default MyAccountTable
@@ -0,0 +1 @@
1
+ export { default } from './MyAccountTable'
@@ -0,0 +1,67 @@
1
+ [data-fs-account-table] {
2
+ display: grid;
3
+ grid-template-columns: 1fr;
4
+ width: 100%;
5
+ border-spacing: 0;
6
+ border-collapse: collapse;
7
+
8
+ @include media(">=notebook") {
9
+ grid-template-columns: minmax(11.25rem, auto) 1fr;
10
+ }
11
+
12
+ [data-fs-account-table-body] {
13
+ display: contents;
14
+ gap: var(--fs-spacing-1);
15
+ }
16
+
17
+ [data-fs-account-table-row] {
18
+ display: flex;
19
+ flex-direction: column;
20
+ padding: var(--fs-spacing-4) 0;
21
+ border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
22
+
23
+ &:last-child:not(:only-child) {
24
+ > [data-fs-account-table-heading],
25
+ > [data-fs-account-table-data] { border-bottom: none; }
26
+ }
27
+
28
+ @include media(">=notebook") {
29
+ display: contents;
30
+ }
31
+ }
32
+
33
+ [data-fs-account-table-heading] {
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: space-between;
37
+ padding-bottom: var(--fs-spacing-1);
38
+ font-family: var(--fs-text-face-body);
39
+ font-size: var(--fs-text-size-2);
40
+ font-weight: var(--fs-text-weight-regular);
41
+ color: var(--fs-color-text-light);
42
+ text-align: left;
43
+
44
+ @include media(">=notebook") {
45
+ min-height: var(--fs-spacing-10);
46
+ padding-bottom: 0;
47
+ border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
48
+ }
49
+ }
50
+
51
+ [data-fs-account-table-data] {
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: space-between;
55
+ font-family: var(--fs-text-face-body);
56
+ font-size: var(--fs-text-size-2);
57
+ font-weight: var(--fs-text-weight-regular);
58
+ color: var(--fs-color-text);
59
+
60
+ [data-fs-link] { padding: 0; }
61
+
62
+ @include media(">=notebook") {
63
+ min-height: var(--fs-spacing-10);
64
+ border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
65
+ }
66
+ }
67
+ }