create-nymbal-app 0.3.0 → 0.5.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 (167) hide show
  1. package/dist/index.d.ts +2 -1
  2. package/dist/index.js +14 -12
  3. package/dist/index.js.map +1 -1
  4. package/package.json +5 -4
  5. package/scaffold/project/astro/src/pages/index.astro +13 -15
  6. package/scaffold/templates/astro/_dot.node-version +1 -1
  7. package/scaffold/templates/astro/astro.config.mjs +23 -0
  8. package/scaffold/templates/astro/package.json +26 -27
  9. package/scaffold/templates/astro/src/components/SkipNav.astro +3 -1
  10. package/scaffold/templates/astro/src/elements/index.ts +11 -0
  11. package/scaffold/templates/astro/src/layouts/BaseLayout.astro +15 -4
  12. package/scaffold/templates/astro/src/lib/api.ts +126 -20
  13. package/scaffold/templates/astro/src/lib/chrome.ts +59 -0
  14. package/scaffold/templates/astro/src/lib/client.ts +4 -2
  15. package/scaffold/templates/astro/src/lib/fragments.ts +48 -0
  16. package/scaffold/templates/astro/src/lib/server-elements.ts +5 -0
  17. package/scaffold/templates/astro/src/middleware.ts +37 -0
  18. package/scaffold/templates/astro/src/pages/account/addresses.astro +5 -97
  19. package/scaffold/templates/astro/src/pages/account/login.astro +7 -34
  20. package/scaffold/templates/astro/src/pages/account/profile.astro +6 -56
  21. package/scaffold/templates/astro/src/pages/account/register.astro +7 -73
  22. package/scaffold/templates/astro/src/pages/cart.astro +14 -7
  23. package/scaffold/templates/astro/src/pages/category/[slug].astro +41 -26
  24. package/scaffold/templates/astro/src/pages/checkout.astro +34 -90
  25. package/scaffold/templates/astro/src/pages/fragments/footer.astro +5 -2
  26. package/scaffold/templates/astro/src/pages/fragments/header.astro +12 -2
  27. package/scaffold/templates/astro/src/pages/fragments/nav.astro +8 -5
  28. package/scaffold/templates/astro/src/pages/fragments/product/[slug].astro +9 -10
  29. package/scaffold/templates/astro/src/pages/index.astro +18 -15
  30. package/scaffold/templates/astro/src/pages/order/[orderNumber].astro +22 -44
  31. package/scaffold/templates/astro/src/pages/product/[slug].astro +46 -29
  32. package/scaffold/templates/astro/src/pages/products/index.astro +40 -26
  33. package/scaffold/templates/astro/src/pages/search.astro +13 -8
  34. package/scaffold/templates/astro/src/scripts/init-client.ts +14 -0
  35. package/scaffold/templates/astro/src/scripts/pdp.ts +47 -53
  36. package/scaffold/templates/astro/src/scripts/plp.ts +21 -98
  37. package/scaffold/templates/astro/src/scripts/search.ts +19 -120
  38. package/scaffold/templates/astro/src/scripts/signed-in-redirect.ts +4 -0
  39. package/scaffold/templates/astro/src/styles/global.css +49 -45
  40. package/scaffold/templates/astro/src/styles/pages/account.css +0 -90
  41. package/scaffold/templates/astro/src/styles/pages/confirmation.css +6 -0
  42. package/scaffold/templates/astro/src/styles/pages/home.css +9 -100
  43. package/scaffold/templates/astro/src/styles/pages/pdp.css +5 -167
  44. package/scaffold/templates/astro/src/styles/pages/plp.css +3 -42
  45. package/scaffold/templates/astro/src/styles/pages/search.css +13 -100
  46. package/scaffold/templates/astro/src/styles/tokens.css +56 -0
  47. package/scaffold/templates/nextjs/_dot.node-version +1 -1
  48. package/scaffold/templates/nextjs/app/(catalog)/category/[slug]/page.tsx +74 -0
  49. package/scaffold/templates/nextjs/app/(catalog)/home/[key]/page.tsx +80 -0
  50. package/scaffold/templates/nextjs/app/(catalog)/layout.tsx +13 -0
  51. package/scaffold/templates/nextjs/app/(catalog)/not-found.tsx +7 -0
  52. package/scaffold/templates/nextjs/app/(catalog)/product/[slug]/page.tsx +182 -0
  53. package/scaffold/templates/nextjs/app/(catalog)/products/page.tsx +62 -0
  54. package/scaffold/templates/nextjs/app/(catalog)/search/SearchView.tsx +90 -0
  55. package/scaffold/templates/nextjs/app/(catalog)/search/page.tsx +46 -0
  56. package/scaffold/templates/nextjs/app/(shopper)/account/addresses/AddressesView.tsx +5 -0
  57. package/scaffold/templates/nextjs/app/(shopper)/account/addresses/page.tsx +17 -0
  58. package/scaffold/templates/nextjs/app/(shopper)/account/login/LoginView.tsx +28 -0
  59. package/scaffold/templates/nextjs/app/(shopper)/account/login/page.tsx +23 -0
  60. package/scaffold/templates/nextjs/app/(shopper)/account/profile/ProfileView.tsx +5 -0
  61. package/scaffold/templates/nextjs/app/(shopper)/account/profile/page.tsx +20 -0
  62. package/scaffold/templates/nextjs/app/(shopper)/account/register/RegisterView.tsx +26 -0
  63. package/scaffold/templates/nextjs/app/(shopper)/account/register/page.tsx +11 -0
  64. package/scaffold/templates/nextjs/app/(shopper)/cart/CartView.tsx +5 -0
  65. package/scaffold/templates/nextjs/app/(shopper)/cart/page.tsx +22 -0
  66. package/scaffold/templates/nextjs/app/(shopper)/checkout/CheckoutView.tsx +27 -0
  67. package/scaffold/templates/nextjs/app/(shopper)/checkout/page.tsx +39 -0
  68. package/scaffold/templates/nextjs/app/(shopper)/layout.tsx +12 -0
  69. package/scaffold/templates/nextjs/app/{order → (shopper)/order}/[orderNumber]/page.tsx +24 -5
  70. package/scaffold/templates/nextjs/app/error.tsx +3 -7
  71. package/scaffold/templates/nextjs/app/fragments/footer/route.ts +13 -0
  72. package/scaffold/templates/nextjs/app/fragments/header/[key]/route.ts +18 -0
  73. package/scaffold/templates/nextjs/app/fragments/nav/[key]/route.ts +23 -0
  74. package/scaffold/templates/nextjs/app/fragments/product/[slug]/route.ts +22 -0
  75. package/scaffold/templates/nextjs/app/globals.css +5 -23
  76. package/scaffold/templates/nextjs/app/layout.tsx +8 -5
  77. package/scaffold/templates/nextjs/app/not-found.tsx +9 -33
  78. package/scaffold/templates/nextjs/app/tokens.css +56 -0
  79. package/scaffold/templates/nextjs/components/client/ListingControls.tsx +87 -0
  80. package/scaffold/templates/nextjs/components/client/NymbalSetup.tsx +48 -6
  81. package/scaffold/templates/nextjs/components/client/ProductInteractive.tsx +64 -28
  82. package/scaffold/templates/nextjs/components/client/elements.tsx +15 -0
  83. package/scaffold/templates/nextjs/components/server/Header.tsx +33 -97
  84. package/scaffold/templates/nextjs/components/server/NotFoundView.tsx +39 -0
  85. package/scaffold/templates/nextjs/components/server/SkipNav.tsx +7 -3
  86. package/scaffold/templates/nextjs/elements/index.ts +12 -0
  87. package/scaffold/templates/nextjs/lib/api.ts +162 -46
  88. package/scaffold/templates/nextjs/lib/chrome.ts +40 -0
  89. package/scaffold/templates/nextjs/lib/client.ts +3 -0
  90. package/scaffold/templates/nextjs/lib/fragments.ts +16 -0
  91. package/scaffold/templates/nextjs/lib/header.ts +39 -0
  92. package/scaffold/templates/nextjs/lib/render.ts +14 -0
  93. package/scaffold/templates/nextjs/next.config.mjs +32 -0
  94. package/scaffold/templates/nextjs/package.json +28 -29
  95. package/scaffold/templates/nextjs/styles/pages/account.module.css +0 -70
  96. package/scaffold/templates/nextjs/styles/pages/confirmation.module.css +6 -85
  97. package/scaffold/templates/nextjs/styles/pages/home.module.css +2 -103
  98. package/scaffold/templates/nextjs/styles/pages/pdp.module.css +3 -179
  99. package/scaffold/templates/nextjs/styles/pages/plp.module.css +8 -141
  100. package/scaffold/templates/nextjs/styles/pages/search.module.css +8 -128
  101. package/scaffold/templates/nextjs/tsconfig.dist.json +5 -0
  102. package/scaffold/templates/astro/src/components/AddressForm.astro +0 -107
  103. package/scaffold/templates/astro/src/components/Breadcrumb.astro +0 -20
  104. package/scaffold/templates/astro/src/components/CategoryNav.astro +0 -27
  105. package/scaffold/templates/astro/src/components/CheckoutSteps.astro +0 -29
  106. package/scaffold/templates/astro/src/components/Footer.astro +0 -108
  107. package/scaffold/templates/astro/src/components/Header.astro +0 -192
  108. package/scaffold/templates/astro/src/components/ImageGallery.astro +0 -42
  109. package/scaffold/templates/astro/src/components/OrderSummary.astro +0 -53
  110. package/scaffold/templates/astro/src/components/Pagination.astro +0 -13
  111. package/scaffold/templates/astro/src/components/PriceDisplay.astro +0 -25
  112. package/scaffold/templates/astro/src/components/ProductCard.astro +0 -44
  113. package/scaffold/templates/astro/src/components/RelatedProducts.astro +0 -28
  114. package/scaffold/templates/astro/src/components/ReviewForm.astro +0 -74
  115. package/scaffold/templates/astro/src/components/ReviewList.astro +0 -41
  116. package/scaffold/templates/astro/src/components/SortDropdown.astro +0 -26
  117. package/scaffold/templates/astro/src/components/StockBadge.astro +0 -32
  118. package/scaffold/templates/astro/src/scripts/auth-forms.ts +0 -82
  119. package/scaffold/templates/astro/src/scripts/cart-page.ts +0 -143
  120. package/scaffold/templates/astro/src/scripts/checkout.ts +0 -272
  121. package/scaffold/templates/astro/src/scripts/image-gallery.ts +0 -22
  122. package/scaffold/templates/astro/src/scripts/profile-form.ts +0 -57
  123. package/scaffold/templates/astro/src/scripts/review-form.ts +0 -27
  124. package/scaffold/templates/astro/src/styles/pages/cart.css +0 -243
  125. package/scaffold/templates/astro/src/styles/pages/checkout.css +0 -270
  126. package/scaffold/templates/nextjs/app/account/addresses/page.tsx +0 -10
  127. package/scaffold/templates/nextjs/app/account/login/page.tsx +0 -23
  128. package/scaffold/templates/nextjs/app/account/profile/page.tsx +0 -10
  129. package/scaffold/templates/nextjs/app/account/register/page.tsx +0 -10
  130. package/scaffold/templates/nextjs/app/cart/page.tsx +0 -10
  131. package/scaffold/templates/nextjs/app/category/[slug]/page.tsx +0 -58
  132. package/scaffold/templates/nextjs/app/checkout/page.tsx +0 -10
  133. package/scaffold/templates/nextjs/app/page.tsx +0 -63
  134. package/scaffold/templates/nextjs/app/product/[slug]/page.tsx +0 -111
  135. package/scaffold/templates/nextjs/app/products/page.tsx +0 -40
  136. package/scaffold/templates/nextjs/app/search/page.tsx +0 -24
  137. package/scaffold/templates/nextjs/components/client/AddressManager.tsx +0 -181
  138. package/scaffold/templates/nextjs/components/client/CartPage.tsx +0 -120
  139. package/scaffold/templates/nextjs/components/client/CheckoutForm.tsx +0 -523
  140. package/scaffold/templates/nextjs/components/client/ImageGallery.tsx +0 -68
  141. package/scaffold/templates/nextjs/components/client/LoginForm.tsx +0 -89
  142. package/scaffold/templates/nextjs/components/client/MiniCartWrapper.tsx +0 -12
  143. package/scaffold/templates/nextjs/components/client/ProductGrid.tsx +0 -148
  144. package/scaffold/templates/nextjs/components/client/ProfileForm.tsx +0 -112
  145. package/scaffold/templates/nextjs/components/client/RegisterForm.tsx +0 -131
  146. package/scaffold/templates/nextjs/components/client/ReviewForm.tsx +0 -116
  147. package/scaffold/templates/nextjs/components/client/SearchBarWrapper.tsx +0 -27
  148. package/scaffold/templates/nextjs/components/client/SearchResults.tsx +0 -141
  149. package/scaffold/templates/nextjs/components/client/SortDropdown.tsx +0 -35
  150. package/scaffold/templates/nextjs/components/server/Breadcrumb.tsx +0 -36
  151. package/scaffold/templates/nextjs/components/server/CategoryNav.tsx +0 -29
  152. package/scaffold/templates/nextjs/components/server/CheckoutSteps.tsx +0 -60
  153. package/scaffold/templates/nextjs/components/server/Footer.module.css +0 -64
  154. package/scaffold/templates/nextjs/components/server/Footer.tsx +0 -79
  155. package/scaffold/templates/nextjs/components/server/Header.module.css +0 -147
  156. package/scaffold/templates/nextjs/components/server/OrderSummary.tsx +0 -79
  157. package/scaffold/templates/nextjs/components/server/PriceDisplay.tsx +0 -31
  158. package/scaffold/templates/nextjs/components/server/ProductCard.tsx +0 -59
  159. package/scaffold/templates/nextjs/components/server/RelatedProducts.tsx +0 -31
  160. package/scaffold/templates/nextjs/components/server/ReviewList.tsx +0 -62
  161. package/scaffold/templates/nextjs/components/server/StockBadge.tsx +0 -19
  162. package/scaffold/templates/nextjs/styles/pages/cart.module.css +0 -240
  163. package/scaffold/templates/nextjs/styles/pages/checkout.module.css +0 -404
  164. /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/layout.tsx +0 -0
  165. /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/orders/[orderNumber]/page.tsx +0 -0
  166. /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/orders/page.tsx +0 -0
  167. /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/page.tsx +0 -0
@@ -1,243 +0,0 @@
1
- /* ----------------------------------------------------------------
2
- Cart page styles
3
- ---------------------------------------------------------------- */
4
-
5
- /* ---- Layout ---- */
6
-
7
- .cart-layout {
8
- display: grid;
9
- grid-template-columns: 1fr;
10
- gap: var(--nymbal-spacing-xl, 2rem);
11
- }
12
-
13
- @media (min-width: 769px) {
14
- .cart-layout {
15
- grid-template-columns: 1fr 360px;
16
- align-items: start;
17
- }
18
- }
19
-
20
- /* ---- Cart header ---- */
21
-
22
- .cart-header {
23
- display: flex;
24
- align-items: center;
25
- justify-content: space-between;
26
- margin-bottom: var(--nymbal-spacing-lg, 1.5rem);
27
- }
28
-
29
- .cart-title {
30
- font-size: 1.5rem;
31
- font-weight: var(--nymbal-font-weight-bold, 700);
32
- color: var(--nymbal-color-primary, #18181b);
33
- }
34
-
35
- .cart-item-count {
36
- font-size: var(--nymbal-font-size-sm, 0.875rem);
37
- color: var(--nymbal-color-text-muted, #71717a);
38
- font-weight: var(--nymbal-font-weight-normal, 400);
39
- }
40
-
41
- /* ---- Cart items list ---- */
42
-
43
- .cart-items {
44
- display: flex;
45
- flex-direction: column;
46
- }
47
-
48
- /* ---- Line item ---- */
49
-
50
- .cart-line-item {
51
- display: grid;
52
- grid-template-columns: 80px 1fr auto;
53
- gap: var(--nymbal-spacing-md, 1rem);
54
- padding: var(--nymbal-spacing-md, 1rem) 0;
55
- border-bottom: 1px solid var(--nymbal-color-border, #e4e4e7);
56
- align-items: start;
57
- }
58
-
59
- @media (min-width: 641px) {
60
- .cart-line-item {
61
- grid-template-columns: 100px 1fr auto auto;
62
- gap: var(--nymbal-spacing-lg, 1.5rem);
63
- align-items: center;
64
- }
65
- }
66
-
67
- .cart-line-item:first-child {
68
- border-top: 1px solid var(--nymbal-color-border, #e4e4e7);
69
- }
70
-
71
- .cart-line-image {
72
- width: 100%;
73
- aspect-ratio: 1 / 1;
74
- object-fit: cover;
75
- border-radius: var(--nymbal-radius-md, 0.5rem);
76
- background-color: #f4f4f5;
77
- }
78
-
79
- .cart-line-info {
80
- display: flex;
81
- flex-direction: column;
82
- gap: var(--nymbal-spacing-xs, 0.25rem);
83
- min-width: 0;
84
- }
85
-
86
- .cart-line-name {
87
- font-size: var(--nymbal-font-size-sm, 0.875rem);
88
- font-weight: var(--nymbal-font-weight-medium, 500);
89
- color: var(--nymbal-color-text, #18181b);
90
- text-decoration: none;
91
- }
92
-
93
- .cart-line-name:hover {
94
- color: var(--nymbal-color-accent, #2563eb);
95
- }
96
-
97
- .cart-line-variant {
98
- font-size: var(--nymbal-font-size-xs, 0.75rem);
99
- color: var(--nymbal-color-text-muted, #71717a);
100
- }
101
-
102
- .cart-line-price-each {
103
- font-size: var(--nymbal-font-size-xs, 0.75rem);
104
- color: var(--nymbal-color-text-muted, #71717a);
105
- }
106
-
107
- .cart-line-quantity {
108
- display: flex;
109
- align-items: center;
110
- gap: var(--nymbal-spacing-sm, 0.5rem);
111
- }
112
-
113
- .cart-line-quantity-btn {
114
- display: flex;
115
- align-items: center;
116
- justify-content: center;
117
- width: 32px;
118
- height: 32px;
119
- border: 1px solid var(--nymbal-color-border, #e4e4e7);
120
- border-radius: var(--nymbal-radius-md, 0.5rem);
121
- background: var(--nymbal-color-surface, #fff);
122
- color: var(--nymbal-color-text, #18181b);
123
- font-size: var(--nymbal-font-size-base, 1rem);
124
- cursor: pointer;
125
- transition: border-color var(--nymbal-transition-fast, 150ms) ease,
126
- background-color var(--nymbal-transition-fast, 150ms) ease;
127
- }
128
-
129
- .cart-line-quantity-btn:hover {
130
- border-color: var(--nymbal-color-primary, #18181b);
131
- background-color: #f4f4f5;
132
- }
133
-
134
- .cart-line-quantity-value {
135
- font-size: var(--nymbal-font-size-sm, 0.875rem);
136
- font-weight: var(--nymbal-font-weight-medium, 500);
137
- min-width: 24px;
138
- text-align: center;
139
- }
140
-
141
- .cart-line-total {
142
- font-size: var(--nymbal-font-size-sm, 0.875rem);
143
- font-weight: var(--nymbal-font-weight-bold, 700);
144
- color: var(--nymbal-color-primary, #18181b);
145
- text-align: right;
146
- white-space: nowrap;
147
- }
148
-
149
- .cart-line-remove {
150
- font-size: var(--nymbal-font-size-xs, 0.75rem);
151
- color: var(--nymbal-color-text-muted, #71717a);
152
- background: none;
153
- border: none;
154
- cursor: pointer;
155
- text-decoration: underline;
156
- padding: 0;
157
- transition: color var(--nymbal-transition-fast, 150ms) ease;
158
- }
159
-
160
- .cart-line-remove:hover {
161
- color: var(--nymbal-color-error, #dc2626);
162
- }
163
-
164
- /* ---- Order summary sidebar ---- */
165
-
166
- .cart-summary {
167
- background-color: #fafafa;
168
- border: 1px solid var(--nymbal-color-border, #e4e4e7);
169
- border-radius: var(--nymbal-radius-lg, 0.75rem);
170
- padding: var(--nymbal-spacing-lg, 1.5rem);
171
- position: sticky;
172
- top: 80px;
173
- }
174
-
175
- .cart-summary-title {
176
- font-size: var(--nymbal-font-size-lg, 1.125rem);
177
- font-weight: var(--nymbal-font-weight-bold, 700);
178
- color: var(--nymbal-color-primary, #18181b);
179
- margin-bottom: var(--nymbal-spacing-md, 1rem);
180
- padding-bottom: var(--nymbal-spacing-md, 1rem);
181
- border-bottom: 1px solid var(--nymbal-color-border, #e4e4e7);
182
- }
183
-
184
- .cart-summary-row {
185
- display: flex;
186
- justify-content: space-between;
187
- align-items: center;
188
- padding: var(--nymbal-spacing-xs, 0.25rem) 0;
189
- font-size: var(--nymbal-font-size-sm, 0.875rem);
190
- }
191
-
192
- .cart-summary-row dt {
193
- color: var(--nymbal-color-text-muted, #71717a);
194
- }
195
-
196
- .cart-summary-row dd {
197
- font-weight: var(--nymbal-font-weight-medium, 500);
198
- color: var(--nymbal-color-text, #18181b);
199
- }
200
-
201
- .cart-summary-total {
202
- display: flex;
203
- justify-content: space-between;
204
- align-items: center;
205
- padding-top: var(--nymbal-spacing-md, 1rem);
206
- margin-top: var(--nymbal-spacing-md, 1rem);
207
- border-top: 1px solid var(--nymbal-color-border, #e4e4e7);
208
- font-size: var(--nymbal-font-size-lg, 1.125rem);
209
- font-weight: var(--nymbal-font-weight-bold, 700);
210
- color: var(--nymbal-color-primary, #18181b);
211
- }
212
-
213
- .cart-summary-actions {
214
- margin-top: var(--nymbal-spacing-lg, 1.5rem);
215
- display: flex;
216
- flex-direction: column;
217
- gap: var(--nymbal-spacing-sm, 0.5rem);
218
- }
219
-
220
- .cart-summary-actions .btn {
221
- width: 100%;
222
- justify-content: center;
223
- }
224
-
225
- /* ---- Empty cart ---- */
226
-
227
- .cart-empty {
228
- text-align: center;
229
- padding: 4rem var(--nymbal-spacing-md, 1rem);
230
- }
231
-
232
- .cart-empty-title {
233
- font-size: var(--nymbal-font-size-lg, 1.125rem);
234
- font-weight: var(--nymbal-font-weight-medium, 500);
235
- color: var(--nymbal-color-text, #18181b);
236
- margin-bottom: var(--nymbal-spacing-xs, 0.25rem);
237
- }
238
-
239
- .cart-empty-text {
240
- font-size: var(--nymbal-font-size-sm, 0.875rem);
241
- color: var(--nymbal-color-text-muted, #71717a);
242
- margin-bottom: var(--nymbal-spacing-lg, 1.5rem);
243
- }
@@ -1,270 +0,0 @@
1
- /* ----------------------------------------------------------------
2
- Checkout page styles
3
- ---------------------------------------------------------------- */
4
-
5
- /* ---- Layout ---- */
6
-
7
- .checkout-layout {
8
- display: grid;
9
- grid-template-columns: 1fr;
10
- gap: var(--nymbal-spacing-xl, 2rem);
11
- }
12
-
13
- @media (min-width: 769px) {
14
- .checkout-layout {
15
- grid-template-columns: 1fr 380px;
16
- align-items: start;
17
- }
18
- }
19
-
20
- /* ---- Step indicator ---- */
21
-
22
- .checkout-steps {
23
- display: flex;
24
- align-items: center;
25
- justify-content: center;
26
- gap: 0;
27
- margin-bottom: var(--nymbal-spacing-xl, 2rem);
28
- padding: var(--nymbal-spacing-md, 1rem) 0;
29
- counter-reset: step;
30
- }
31
-
32
- .checkout-step {
33
- display: flex;
34
- align-items: center;
35
- gap: var(--nymbal-spacing-sm, 0.5rem);
36
- font-size: var(--nymbal-font-size-sm, 0.875rem);
37
- color: var(--nymbal-color-text-muted, #71717a);
38
- white-space: nowrap;
39
- }
40
-
41
- .checkout-step::before {
42
- counter-increment: step;
43
- content: counter(step);
44
- display: flex;
45
- align-items: center;
46
- justify-content: center;
47
- width: 28px;
48
- height: 28px;
49
- border-radius: var(--nymbal-radius-full, 9999px);
50
- border: 2px solid var(--nymbal-color-border, #e4e4e7);
51
- font-size: var(--nymbal-font-size-xs, 0.75rem);
52
- font-weight: var(--nymbal-font-weight-bold, 700);
53
- flex-shrink: 0;
54
- }
55
-
56
- .checkout-step.active {
57
- color: var(--nymbal-color-primary, #18181b);
58
- font-weight: var(--nymbal-font-weight-medium, 500);
59
- }
60
-
61
- .checkout-step.active::before {
62
- background-color: var(--nymbal-color-primary, #18181b);
63
- color: var(--nymbal-color-text-inverse, #fff);
64
- border-color: var(--nymbal-color-primary, #18181b);
65
- }
66
-
67
- .checkout-step.completed::before {
68
- background-color: var(--nymbal-color-success, #16a34a);
69
- color: var(--nymbal-color-text-inverse, #fff);
70
- border-color: var(--nymbal-color-success, #16a34a);
71
- content: '\2713';
72
- }
73
-
74
- .checkout-step-divider {
75
- width: 40px;
76
- height: 2px;
77
- background-color: var(--nymbal-color-border, #e4e4e7);
78
- margin: 0 var(--nymbal-spacing-sm, 0.5rem);
79
- flex-shrink: 0;
80
- }
81
-
82
- .checkout-step-divider.completed {
83
- background-color: var(--nymbal-color-success, #16a34a);
84
- }
85
-
86
- @media (max-width: 640px) {
87
- .checkout-step span {
88
- display: none;
89
- }
90
-
91
- .checkout-step-divider {
92
- width: 24px;
93
- }
94
- }
95
-
96
- /* ---- Form sections ---- */
97
-
98
- .checkout-form {
99
- display: flex;
100
- flex-direction: column;
101
- gap: var(--nymbal-spacing-xl, 2rem);
102
- }
103
-
104
- .checkout-section {
105
- padding-bottom: var(--nymbal-spacing-xl, 2rem);
106
- border-bottom: 1px solid var(--nymbal-color-border, #e4e4e7);
107
- }
108
-
109
- .checkout-section:last-child {
110
- border-bottom: none;
111
- padding-bottom: 0;
112
- }
113
-
114
- .checkout-section-title {
115
- font-size: var(--nymbal-font-size-lg, 1.125rem);
116
- font-weight: var(--nymbal-font-weight-bold, 700);
117
- color: var(--nymbal-color-primary, #18181b);
118
- margin-bottom: var(--nymbal-spacing-md, 1rem);
119
- }
120
-
121
- /* ---- Address form grid ---- */
122
-
123
- .address-grid {
124
- display: grid;
125
- grid-template-columns: 1fr;
126
- gap: var(--nymbal-spacing-md, 1rem);
127
- }
128
-
129
- @media (min-width: 641px) {
130
- .address-grid {
131
- grid-template-columns: 1fr 1fr;
132
- }
133
- }
134
-
135
- .address-grid .full-width {
136
- grid-column: 1 / -1;
137
- }
138
-
139
- /* ---- Payment section ---- */
140
-
141
- .payment-section {
142
- background-color: #fafafa;
143
- border: 1px solid var(--nymbal-color-border, #e4e4e7);
144
- border-radius: var(--nymbal-radius-lg, 0.75rem);
145
- padding: var(--nymbal-spacing-lg, 1.5rem);
146
- }
147
-
148
- .payment-grid {
149
- display: grid;
150
- grid-template-columns: 1fr;
151
- gap: var(--nymbal-spacing-md, 1rem);
152
- }
153
-
154
- @media (min-width: 641px) {
155
- .payment-grid {
156
- grid-template-columns: 1fr 1fr;
157
- }
158
- }
159
-
160
- .payment-grid .card-number {
161
- grid-column: 1 / -1;
162
- }
163
-
164
- /* ---- Order summary sidebar (checkout variant) ---- */
165
-
166
- .checkout-summary {
167
- background-color: #fafafa;
168
- border: 1px solid var(--nymbal-color-border, #e4e4e7);
169
- border-radius: var(--nymbal-radius-lg, 0.75rem);
170
- padding: var(--nymbal-spacing-lg, 1.5rem);
171
- position: sticky;
172
- top: 80px;
173
- }
174
-
175
- .checkout-summary-title {
176
- font-size: var(--nymbal-font-size-lg, 1.125rem);
177
- font-weight: var(--nymbal-font-weight-bold, 700);
178
- color: var(--nymbal-color-primary, #18181b);
179
- margin-bottom: var(--nymbal-spacing-md, 1rem);
180
- padding-bottom: var(--nymbal-spacing-md, 1rem);
181
- border-bottom: 1px solid var(--nymbal-color-border, #e4e4e7);
182
- }
183
-
184
- .checkout-summary-items {
185
- display: flex;
186
- flex-direction: column;
187
- gap: var(--nymbal-spacing-sm, 0.5rem);
188
- margin-bottom: var(--nymbal-spacing-md, 1rem);
189
- }
190
-
191
- .checkout-summary-item {
192
- display: flex;
193
- justify-content: space-between;
194
- align-items: start;
195
- gap: var(--nymbal-spacing-sm, 0.5rem);
196
- font-size: var(--nymbal-font-size-sm, 0.875rem);
197
- }
198
-
199
- .checkout-summary-item-name {
200
- color: var(--nymbal-color-text, #18181b);
201
- flex: 1;
202
- min-width: 0;
203
- }
204
-
205
- .checkout-summary-item-qty {
206
- color: var(--nymbal-color-text-muted, #71717a);
207
- flex-shrink: 0;
208
- }
209
-
210
- .checkout-summary-item-price {
211
- font-weight: var(--nymbal-font-weight-medium, 500);
212
- flex-shrink: 0;
213
- }
214
-
215
- .checkout-summary-row {
216
- display: flex;
217
- justify-content: space-between;
218
- padding: var(--nymbal-spacing-xs, 0.25rem) 0;
219
- font-size: var(--nymbal-font-size-sm, 0.875rem);
220
- }
221
-
222
- .checkout-summary-row dt {
223
- color: var(--nymbal-color-text-muted, #71717a);
224
- }
225
-
226
- .checkout-summary-row dd {
227
- font-weight: var(--nymbal-font-weight-medium, 500);
228
- }
229
-
230
- .checkout-summary-total {
231
- display: flex;
232
- justify-content: space-between;
233
- padding-top: var(--nymbal-spacing-md, 1rem);
234
- margin-top: var(--nymbal-spacing-sm, 0.5rem);
235
- border-top: 1px solid var(--nymbal-color-border, #e4e4e7);
236
- font-size: var(--nymbal-font-size-lg, 1.125rem);
237
- font-weight: var(--nymbal-font-weight-bold, 700);
238
- color: var(--nymbal-color-primary, #18181b);
239
- }
240
-
241
- /* ---- Submit area ---- */
242
-
243
- .checkout-submit {
244
- margin-top: var(--nymbal-spacing-lg, 1.5rem);
245
- }
246
-
247
- .checkout-submit .btn {
248
- width: 100%;
249
- justify-content: center;
250
- padding: var(--nymbal-spacing-md, 1rem);
251
- font-size: var(--nymbal-font-size-base, 1rem);
252
- }
253
-
254
- .checkout-terms {
255
- font-size: var(--nymbal-font-size-xs, 0.75rem);
256
- color: var(--nymbal-color-text-muted, #71717a);
257
- text-align: center;
258
- margin-top: var(--nymbal-spacing-sm, 0.5rem);
259
- }
260
-
261
- /* ---- Error message ---- */
262
-
263
- .checkout-error {
264
- padding: var(--nymbal-spacing-sm, 0.5rem) var(--nymbal-spacing-md, 1rem);
265
- background-color: rgba(220, 38, 38, 0.06);
266
- border: 1px solid rgba(220, 38, 38, 0.2);
267
- border-radius: var(--nymbal-radius-md, 0.5rem);
268
- color: var(--nymbal-color-error, #dc2626);
269
- font-size: var(--nymbal-font-size-sm, 0.875rem);
270
- }
@@ -1,10 +0,0 @@
1
- import type { Metadata } from 'next'
2
- import { AddressManager } from '@/components/client/AddressManager'
3
-
4
- export const metadata: Metadata = {
5
- title: 'Addresses',
6
- }
7
-
8
- export default function AddressesPage() {
9
- return <AddressManager />
10
- }
@@ -1,23 +0,0 @@
1
- import type { Metadata } from 'next'
2
- import { Suspense } from 'react'
3
- import { LoginForm } from '@/components/client/LoginForm'
4
-
5
- export const metadata: Metadata = {
6
- title: 'Sign In',
7
- }
8
-
9
- export default function LoginPage() {
10
- return (
11
- <Suspense
12
- fallback={
13
- <div className="loading-center">
14
- <div className="spinner spinner-lg" role="status">
15
- <span className="visually-hidden">Loading...</span>
16
- </div>
17
- </div>
18
- }
19
- >
20
- <LoginForm />
21
- </Suspense>
22
- )
23
- }
@@ -1,10 +0,0 @@
1
- import type { Metadata } from 'next'
2
- import { ProfileForm } from '@/components/client/ProfileForm'
3
-
4
- export const metadata: Metadata = {
5
- title: 'Profile',
6
- }
7
-
8
- export default function ProfilePage() {
9
- return <ProfileForm />
10
- }
@@ -1,10 +0,0 @@
1
- import type { Metadata } from 'next'
2
- import { RegisterForm } from '@/components/client/RegisterForm'
3
-
4
- export const metadata: Metadata = {
5
- title: 'Create Account',
6
- }
7
-
8
- export default function RegisterPage() {
9
- return <RegisterForm />
10
- }
@@ -1,10 +0,0 @@
1
- import type { Metadata } from 'next'
2
- import { CartPage } from '@/components/client/CartPage'
3
-
4
- export const metadata: Metadata = {
5
- title: 'Shopping Cart',
6
- }
7
-
8
- export default function CartRoute() {
9
- return <CartPage />
10
- }
@@ -1,58 +0,0 @@
1
- import type { Metadata } from 'next'
2
- import { notFound } from 'next/navigation'
3
- import { fetchProducts, fetchCategories, sortFromSearchParams } from '@/lib/api'
4
- import { Breadcrumb } from '@/components/server/Breadcrumb'
5
- import { ProductGrid } from '@/components/client/ProductGrid'
6
- import styles from '@/styles/pages/plp.module.css'
7
-
8
- interface CategoryPageProps {
9
- params: Promise<{ slug: string }>
10
- searchParams: Promise<{ sort?: string | string[] }>
11
- }
12
-
13
- export async function generateMetadata({
14
- params,
15
- }: CategoryPageProps): Promise<Metadata> {
16
- const { slug } = await params
17
- const categories = await fetchCategories()
18
- const category = categories.find((c) => c.slug === slug)
19
-
20
- return {
21
- title: category?.name ?? slug,
22
- description: category?.description ?? `Browse products in ${slug}.`,
23
- }
24
- }
25
-
26
- export default async function CategoryPage({ params, searchParams }: CategoryPageProps) {
27
- const { slug } = await params
28
- const sort = sortFromSearchParams(await searchParams)
29
- const [{ items, nextCursor }, categories] = await Promise.all([
30
- fetchProducts({ limit: 24, category: slug, sort }),
31
- fetchCategories(),
32
- ])
33
-
34
- const category = categories.find((c) => c.slug === slug)
35
- if (!category) notFound()
36
-
37
- return (
38
- <div className={`container ${styles.page}`}>
39
- <Breadcrumb
40
- items={[
41
- { label: 'Home', href: '/' },
42
- { label: category.name },
43
- ]}
44
- />
45
- <h1 className={styles.pageTitle}>{category.name}</h1>
46
- {category.description && (
47
- <p className="text-muted mb-lg">{category.description}</p>
48
- )}
49
- <ProductGrid
50
- initialProducts={items}
51
- initialCursor={nextCursor}
52
- initialSort={sort}
53
- categorySlug={slug}
54
- categories={categories}
55
- />
56
- </div>
57
- )
58
- }
@@ -1,10 +0,0 @@
1
- import type { Metadata } from 'next'
2
- import { CheckoutForm } from '@/components/client/CheckoutForm'
3
-
4
- export const metadata: Metadata = {
5
- title: 'Checkout',
6
- }
7
-
8
- export default function CheckoutRoute() {
9
- return <CheckoutForm />
10
- }