create-nymbal-app 0.4.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.
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/scaffold/project/astro/src/pages/index.astro +13 -15
- package/scaffold/templates/astro/_dot.node-version +1 -1
- package/scaffold/templates/astro/astro.config.mjs +23 -0
- package/scaffold/templates/astro/package.json +26 -26
- package/scaffold/templates/astro/src/components/SkipNav.astro +3 -1
- package/scaffold/templates/astro/src/elements/index.ts +11 -0
- package/scaffold/templates/astro/src/layouts/BaseLayout.astro +15 -4
- package/scaffold/templates/astro/src/lib/api.ts +113 -21
- package/scaffold/templates/astro/src/lib/chrome.ts +59 -0
- package/scaffold/templates/astro/src/lib/client.ts +4 -4
- package/scaffold/templates/astro/src/lib/fragments.ts +48 -0
- package/scaffold/templates/astro/src/lib/server-elements.ts +5 -0
- package/scaffold/templates/astro/src/middleware.ts +37 -0
- package/scaffold/templates/astro/src/pages/account/addresses.astro +5 -97
- package/scaffold/templates/astro/src/pages/account/login.astro +7 -34
- package/scaffold/templates/astro/src/pages/account/profile.astro +6 -56
- package/scaffold/templates/astro/src/pages/account/register.astro +7 -73
- package/scaffold/templates/astro/src/pages/cart.astro +14 -7
- package/scaffold/templates/astro/src/pages/category/[slug].astro +17 -21
- package/scaffold/templates/astro/src/pages/checkout.astro +30 -94
- package/scaffold/templates/astro/src/pages/fragments/footer.astro +5 -2
- package/scaffold/templates/astro/src/pages/fragments/header.astro +12 -2
- package/scaffold/templates/astro/src/pages/fragments/nav.astro +8 -5
- package/scaffold/templates/astro/src/pages/fragments/product/[slug].astro +9 -10
- package/scaffold/templates/astro/src/pages/index.astro +18 -15
- package/scaffold/templates/astro/src/pages/order/[orderNumber].astro +22 -44
- package/scaffold/templates/astro/src/pages/product/[slug].astro +44 -30
- package/scaffold/templates/astro/src/pages/products/index.astro +16 -21
- package/scaffold/templates/astro/src/pages/search.astro +10 -11
- package/scaffold/templates/astro/src/scripts/init-client.ts +14 -0
- package/scaffold/templates/astro/src/scripts/pdp.ts +24 -21
- package/scaffold/templates/astro/src/scripts/plp.ts +15 -93
- package/scaffold/templates/astro/src/scripts/search.ts +7 -132
- package/scaffold/templates/astro/src/scripts/signed-in-redirect.ts +4 -0
- package/scaffold/templates/astro/src/styles/global.css +49 -45
- package/scaffold/templates/astro/src/styles/pages/account.css +0 -90
- package/scaffold/templates/astro/src/styles/pages/confirmation.css +6 -0
- package/scaffold/templates/astro/src/styles/pages/home.css +9 -100
- package/scaffold/templates/astro/src/styles/pages/pdp.css +5 -171
- package/scaffold/templates/astro/src/styles/pages/plp.css +3 -42
- package/scaffold/templates/astro/src/styles/pages/search.css +4 -110
- package/scaffold/templates/astro/src/styles/tokens.css +56 -0
- package/scaffold/templates/nextjs/_dot.node-version +1 -1
- package/scaffold/templates/nextjs/app/(catalog)/category/[slug]/page.tsx +74 -0
- package/scaffold/templates/nextjs/app/(catalog)/home/[key]/page.tsx +80 -0
- package/scaffold/templates/nextjs/app/(catalog)/layout.tsx +13 -0
- package/scaffold/templates/nextjs/app/(catalog)/not-found.tsx +7 -0
- package/scaffold/templates/nextjs/app/(catalog)/product/[slug]/page.tsx +182 -0
- package/scaffold/templates/nextjs/app/(catalog)/products/page.tsx +62 -0
- package/scaffold/templates/nextjs/app/(catalog)/search/SearchView.tsx +90 -0
- package/scaffold/templates/nextjs/app/(catalog)/search/page.tsx +46 -0
- package/scaffold/templates/nextjs/app/(shopper)/account/addresses/AddressesView.tsx +5 -0
- package/scaffold/templates/nextjs/app/(shopper)/account/addresses/page.tsx +17 -0
- package/scaffold/templates/nextjs/app/(shopper)/account/login/LoginView.tsx +28 -0
- package/scaffold/templates/nextjs/app/(shopper)/account/login/page.tsx +23 -0
- package/scaffold/templates/nextjs/app/(shopper)/account/profile/ProfileView.tsx +5 -0
- package/scaffold/templates/nextjs/app/(shopper)/account/profile/page.tsx +20 -0
- package/scaffold/templates/nextjs/app/(shopper)/account/register/RegisterView.tsx +26 -0
- package/scaffold/templates/nextjs/app/(shopper)/account/register/page.tsx +11 -0
- package/scaffold/templates/nextjs/app/(shopper)/cart/CartView.tsx +5 -0
- package/scaffold/templates/nextjs/app/(shopper)/cart/page.tsx +22 -0
- package/scaffold/templates/nextjs/app/(shopper)/checkout/CheckoutView.tsx +27 -0
- package/scaffold/templates/nextjs/app/(shopper)/checkout/page.tsx +39 -0
- package/scaffold/templates/nextjs/app/(shopper)/layout.tsx +12 -0
- package/scaffold/templates/nextjs/app/{order → (shopper)/order}/[orderNumber]/page.tsx +24 -5
- package/scaffold/templates/nextjs/app/error.tsx +3 -7
- package/scaffold/templates/nextjs/app/fragments/footer/route.ts +13 -0
- package/scaffold/templates/nextjs/app/fragments/header/[key]/route.ts +18 -0
- package/scaffold/templates/nextjs/app/fragments/nav/[key]/route.ts +23 -0
- package/scaffold/templates/nextjs/app/fragments/product/[slug]/route.ts +22 -0
- package/scaffold/templates/nextjs/app/globals.css +5 -23
- package/scaffold/templates/nextjs/app/layout.tsx +8 -5
- package/scaffold/templates/nextjs/app/not-found.tsx +9 -33
- package/scaffold/templates/nextjs/app/tokens.css +56 -0
- package/scaffold/templates/nextjs/components/client/ListingControls.tsx +87 -0
- package/scaffold/templates/nextjs/components/client/NymbalSetup.tsx +48 -6
- package/scaffold/templates/nextjs/components/client/ProductInteractive.tsx +30 -15
- package/scaffold/templates/nextjs/components/client/elements.tsx +15 -0
- package/scaffold/templates/nextjs/components/server/Header.tsx +33 -102
- package/scaffold/templates/nextjs/components/server/NotFoundView.tsx +39 -0
- package/scaffold/templates/nextjs/components/server/SkipNav.tsx +7 -3
- package/scaffold/templates/nextjs/elements/index.ts +12 -0
- package/scaffold/templates/nextjs/lib/api.ts +151 -55
- package/scaffold/templates/nextjs/lib/chrome.ts +40 -0
- package/scaffold/templates/nextjs/lib/fragments.ts +16 -0
- package/scaffold/templates/nextjs/lib/header.ts +39 -0
- package/scaffold/templates/nextjs/lib/render.ts +14 -0
- package/scaffold/templates/nextjs/next.config.mjs +32 -0
- package/scaffold/templates/nextjs/package.json +28 -27
- package/scaffold/templates/nextjs/styles/pages/account.module.css +0 -70
- package/scaffold/templates/nextjs/styles/pages/confirmation.module.css +6 -85
- package/scaffold/templates/nextjs/styles/pages/home.module.css +2 -103
- package/scaffold/templates/nextjs/styles/pages/pdp.module.css +3 -183
- package/scaffold/templates/nextjs/styles/pages/plp.module.css +9 -143
- package/scaffold/templates/nextjs/styles/pages/search.module.css +1 -145
- package/scaffold/templates/nextjs/tsconfig.dist.json +5 -0
- package/scaffold/templates/astro/src/components/AddressForm.astro +0 -107
- package/scaffold/templates/astro/src/components/Breadcrumb.astro +0 -20
- package/scaffold/templates/astro/src/components/CategoryNav.astro +0 -27
- package/scaffold/templates/astro/src/components/CheckoutSteps.astro +0 -29
- package/scaffold/templates/astro/src/components/Footer.astro +0 -108
- package/scaffold/templates/astro/src/components/Header.astro +0 -198
- package/scaffold/templates/astro/src/components/ImageGallery.astro +0 -42
- package/scaffold/templates/astro/src/components/OrderSummary.astro +0 -53
- package/scaffold/templates/astro/src/components/Pagination.astro +0 -13
- package/scaffold/templates/astro/src/components/PriceDisplay.astro +0 -25
- package/scaffold/templates/astro/src/components/ProductCard.astro +0 -44
- package/scaffold/templates/astro/src/components/RelatedProducts.astro +0 -28
- package/scaffold/templates/astro/src/components/ReviewForm.astro +0 -74
- package/scaffold/templates/astro/src/components/ReviewList.astro +0 -41
- package/scaffold/templates/astro/src/components/StockBadge.astro +0 -15
- package/scaffold/templates/astro/src/scripts/auth-forms.ts +0 -82
- package/scaffold/templates/astro/src/scripts/cart-page.ts +0 -118
- package/scaffold/templates/astro/src/scripts/checkout.ts +0 -271
- package/scaffold/templates/astro/src/scripts/image-gallery.ts +0 -22
- package/scaffold/templates/astro/src/scripts/profile-form.ts +0 -57
- package/scaffold/templates/astro/src/scripts/review-form.ts +0 -27
- package/scaffold/templates/astro/src/styles/pages/cart.css +0 -215
- package/scaffold/templates/astro/src/styles/pages/checkout.css +0 -270
- package/scaffold/templates/nextjs/app/account/addresses/page.tsx +0 -10
- package/scaffold/templates/nextjs/app/account/login/page.tsx +0 -23
- package/scaffold/templates/nextjs/app/account/profile/page.tsx +0 -10
- package/scaffold/templates/nextjs/app/account/register/page.tsx +0 -10
- package/scaffold/templates/nextjs/app/cart/page.tsx +0 -10
- package/scaffold/templates/nextjs/app/category/[slug]/page.tsx +0 -61
- package/scaffold/templates/nextjs/app/checkout/page.tsx +0 -17
- package/scaffold/templates/nextjs/app/page.tsx +0 -63
- package/scaffold/templates/nextjs/app/product/[slug]/page.tsx +0 -111
- package/scaffold/templates/nextjs/app/products/page.tsx +0 -40
- package/scaffold/templates/nextjs/app/search/page.tsx +0 -24
- package/scaffold/templates/nextjs/components/client/AddressManager.tsx +0 -181
- package/scaffold/templates/nextjs/components/client/CartPage.tsx +0 -121
- package/scaffold/templates/nextjs/components/client/CheckoutForm.tsx +0 -482
- package/scaffold/templates/nextjs/components/client/ImageGallery.tsx +0 -68
- package/scaffold/templates/nextjs/components/client/LoginForm.tsx +0 -89
- package/scaffold/templates/nextjs/components/client/MiniCartWrapper.tsx +0 -12
- package/scaffold/templates/nextjs/components/client/ProductGrid.tsx +0 -137
- package/scaffold/templates/nextjs/components/client/ProfileForm.tsx +0 -112
- package/scaffold/templates/nextjs/components/client/RegisterForm.tsx +0 -131
- package/scaffold/templates/nextjs/components/client/ReviewForm.tsx +0 -116
- package/scaffold/templates/nextjs/components/client/SearchBarWrapper.tsx +0 -27
- package/scaffold/templates/nextjs/components/client/SearchResults.tsx +0 -181
- package/scaffold/templates/nextjs/components/server/Breadcrumb.tsx +0 -36
- package/scaffold/templates/nextjs/components/server/CategoryNav.tsx +0 -29
- package/scaffold/templates/nextjs/components/server/CheckoutSteps.tsx +0 -60
- package/scaffold/templates/nextjs/components/server/Footer.module.css +0 -64
- package/scaffold/templates/nextjs/components/server/Footer.tsx +0 -79
- package/scaffold/templates/nextjs/components/server/Header.module.css +0 -147
- package/scaffold/templates/nextjs/components/server/OrderSummary.tsx +0 -79
- package/scaffold/templates/nextjs/components/server/PriceDisplay.tsx +0 -31
- package/scaffold/templates/nextjs/components/server/ProductCard.tsx +0 -59
- package/scaffold/templates/nextjs/components/server/RelatedProducts.tsx +0 -31
- package/scaffold/templates/nextjs/components/server/ReviewList.tsx +0 -62
- package/scaffold/templates/nextjs/styles/pages/cart.module.css +0 -240
- package/scaffold/templates/nextjs/styles/pages/checkout.module.css +0 -404
- /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/layout.tsx +0 -0
- /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/orders/[orderNumber]/page.tsx +0 -0
- /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/orders/page.tsx +0 -0
- /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/page.tsx +0 -0
|
@@ -45,6 +45,14 @@
|
|
|
45
45
|
border-radius: var(--nymbal-radius-lg);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/* Below the sidebar's breakpoint the filters wait behind the toggle: open by default, they sat above the grid and
|
|
49
|
+
pushed it down when the filter element rendered its facets after hydration. */
|
|
50
|
+
@media (max-width: 1023px) {
|
|
51
|
+
.filterSection {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
48
56
|
.filterTitle {
|
|
49
57
|
font-size: var(--nymbal-font-size-sm);
|
|
50
58
|
font-weight: var(--nymbal-font-weight-bold);
|
|
@@ -113,152 +121,10 @@
|
|
|
113
121
|
flex-wrap: wrap;
|
|
114
122
|
}
|
|
115
123
|
|
|
116
|
-
.
|
|
117
|
-
font-size: var(--nymbal-font-size-sm);
|
|
118
|
-
color: var(--nymbal-color-text-muted);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/* The sort element renders the select. */
|
|
122
|
-
.sortSelect select {
|
|
123
|
-
padding: 0.5rem 0.75rem;
|
|
124
|
-
font-size: var(--nymbal-font-size-sm);
|
|
125
|
-
border: 1px solid var(--nymbal-color-border);
|
|
126
|
-
border-radius: var(--nymbal-radius-md);
|
|
127
|
-
background: var(--nymbal-color-surface);
|
|
128
|
-
color: var(--nymbal-color-text);
|
|
129
|
-
cursor: pointer;
|
|
130
|
-
min-width: 10rem;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.sortSelect select:focus {
|
|
134
|
-
outline: none;
|
|
135
|
-
border-color: var(--nymbal-color-accent);
|
|
136
|
-
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/* ── Product Grid ─────────────────────────────────────────────────── */
|
|
140
|
-
|
|
141
|
-
.grid {
|
|
142
|
-
display: grid;
|
|
143
|
-
grid-template-columns: 1fr;
|
|
144
|
-
gap: var(--nymbal-spacing-md);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@media (min-width: 640px) {
|
|
148
|
-
.grid {
|
|
149
|
-
grid-template-columns: repeat(2, 1fr);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
@media (min-width: 1024px) {
|
|
154
|
-
.grid {
|
|
155
|
-
grid-template-columns: repeat(3, 1fr);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.productCard {
|
|
160
|
-
display: flex;
|
|
161
|
-
flex-direction: column;
|
|
162
|
-
background: var(--nymbal-color-surface);
|
|
163
|
-
border: 1px solid var(--nymbal-color-border);
|
|
164
|
-
border-radius: var(--nymbal-radius-lg);
|
|
165
|
-
overflow: hidden;
|
|
166
|
-
text-decoration: none;
|
|
167
|
-
color: var(--nymbal-color-text);
|
|
168
|
-
transition: box-shadow var(--nymbal-transition-fast),
|
|
169
|
-
transform var(--nymbal-transition-fast);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.productCard:hover {
|
|
173
|
-
box-shadow: var(--nymbal-shadow-md);
|
|
174
|
-
transform: translateY(-2px);
|
|
175
|
-
text-decoration: none;
|
|
176
|
-
color: var(--nymbal-color-text);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.productImage {
|
|
180
|
-
aspect-ratio: 1;
|
|
181
|
-
background-color: #f4f4f5;
|
|
182
|
-
overflow: hidden;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.productImage img {
|
|
124
|
+
.sortSelect {
|
|
186
125
|
width: 100%;
|
|
187
|
-
height: 100%;
|
|
188
|
-
object-fit: cover;
|
|
189
126
|
}
|
|
190
127
|
|
|
191
|
-
.productInfo {
|
|
192
|
-
padding: var(--nymbal-spacing-md);
|
|
193
|
-
display: flex;
|
|
194
|
-
flex-direction: column;
|
|
195
|
-
gap: var(--nymbal-spacing-xs);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.productName {
|
|
199
|
-
font-size: var(--nymbal-font-size-sm);
|
|
200
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.productPrice {
|
|
204
|
-
font-size: var(--nymbal-font-size-sm);
|
|
205
|
-
font-weight: var(--nymbal-font-weight-bold);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/* ── Pagination ───────────────────────────────────────────────────── */
|
|
209
|
-
|
|
210
|
-
.pagination {
|
|
211
|
-
display: flex;
|
|
212
|
-
align-items: center;
|
|
213
|
-
justify-content: center;
|
|
214
|
-
gap: var(--nymbal-spacing-sm);
|
|
215
|
-
margin-top: var(--nymbal-spacing-xl);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.loadMore {
|
|
219
|
-
padding: 0.625rem 2rem;
|
|
220
|
-
font-size: var(--nymbal-font-size-sm);
|
|
221
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
222
|
-
color: var(--nymbal-color-primary);
|
|
223
|
-
background: var(--nymbal-color-surface);
|
|
224
|
-
border: 1px solid var(--nymbal-color-border);
|
|
225
|
-
border-radius: var(--nymbal-radius-md);
|
|
226
|
-
cursor: pointer;
|
|
227
|
-
transition: background-color var(--nymbal-transition-fast),
|
|
228
|
-
border-color var(--nymbal-transition-fast);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.loadMore:hover {
|
|
232
|
-
background-color: #f4f4f5;
|
|
233
|
-
border-color: var(--nymbal-color-primary);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.loadMore:disabled {
|
|
237
|
-
opacity: 0.5;
|
|
238
|
-
cursor: not-allowed;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/* ── Empty State ──────────────────────────────────────────────────── */
|
|
242
|
-
|
|
243
|
-
.empty {
|
|
244
|
-
text-align: center;
|
|
245
|
-
padding: var(--nymbal-spacing-xl);
|
|
246
|
-
color: var(--nymbal-color-text-muted);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.emptyTitle {
|
|
250
|
-
font-size: var(--nymbal-font-size-lg);
|
|
251
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
252
|
-
margin-bottom: var(--nymbal-spacing-sm);
|
|
253
|
-
color: var(--nymbal-color-text);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.emptyText {
|
|
257
|
-
font-size: var(--nymbal-font-size-sm);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/* ── Mobile filter toggle ─────────────────────────────────────────── */
|
|
261
|
-
|
|
262
128
|
.mobileFilterToggle {
|
|
263
129
|
display: block;
|
|
264
130
|
width: 100%;
|
|
@@ -14,136 +14,7 @@
|
|
|
14
14
|
margin-bottom: var(--nymbal-spacing-sm);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
font-size: var(--nymbal-font-size-sm);
|
|
19
|
-
color: var(--nymbal-color-text-muted);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.queryTerm {
|
|
23
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
24
|
-
color: var(--nymbal-color-text);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.resultCount {
|
|
28
|
-
font-size: var(--nymbal-font-size-sm);
|
|
29
|
-
color: var(--nymbal-color-text-muted);
|
|
30
|
-
margin-bottom: var(--nymbal-spacing-md);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* ── Search Input ─────────────────────────────────────────────────── */
|
|
34
|
-
|
|
35
|
-
.searchInputWrapper {
|
|
36
|
-
max-width: 32rem;
|
|
37
|
-
margin-bottom: var(--nymbal-spacing-xl);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* ── Results Grid ─────────────────────────────────────────────────── */
|
|
41
|
-
|
|
42
|
-
.grid {
|
|
43
|
-
display: grid;
|
|
44
|
-
grid-template-columns: 1fr;
|
|
45
|
-
gap: var(--nymbal-spacing-md);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@media (min-width: 640px) {
|
|
49
|
-
.grid {
|
|
50
|
-
grid-template-columns: repeat(2, 1fr);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@media (min-width: 1024px) {
|
|
55
|
-
.grid {
|
|
56
|
-
grid-template-columns: repeat(4, 1fr);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.productCard {
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
background: var(--nymbal-color-surface);
|
|
64
|
-
border: 1px solid var(--nymbal-color-border);
|
|
65
|
-
border-radius: var(--nymbal-radius-lg);
|
|
66
|
-
overflow: hidden;
|
|
67
|
-
text-decoration: none;
|
|
68
|
-
color: var(--nymbal-color-text);
|
|
69
|
-
transition: box-shadow var(--nymbal-transition-fast),
|
|
70
|
-
transform var(--nymbal-transition-fast);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.productCard:hover {
|
|
74
|
-
box-shadow: var(--nymbal-shadow-md);
|
|
75
|
-
transform: translateY(-2px);
|
|
76
|
-
text-decoration: none;
|
|
77
|
-
color: var(--nymbal-color-text);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.productImage {
|
|
81
|
-
aspect-ratio: 1;
|
|
82
|
-
background-color: #f4f4f5;
|
|
83
|
-
overflow: hidden;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.productImage img {
|
|
87
|
-
width: 100%;
|
|
88
|
-
height: 100%;
|
|
89
|
-
object-fit: cover;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.productInfo {
|
|
93
|
-
padding: var(--nymbal-spacing-md);
|
|
94
|
-
display: flex;
|
|
95
|
-
flex-direction: column;
|
|
96
|
-
gap: var(--nymbal-spacing-xs);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.productName {
|
|
100
|
-
font-size: var(--nymbal-font-size-sm);
|
|
101
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.productPrice {
|
|
105
|
-
font-size: var(--nymbal-font-size-sm);
|
|
106
|
-
font-weight: var(--nymbal-font-weight-bold);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* ── Empty State ──────────────────────────────────────────────────── */
|
|
110
|
-
|
|
111
|
-
.empty {
|
|
112
|
-
text-align: center;
|
|
113
|
-
padding: 4rem var(--nymbal-spacing-lg);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.emptyIcon {
|
|
117
|
-
display: inline-flex;
|
|
118
|
-
align-items: center;
|
|
119
|
-
justify-content: center;
|
|
120
|
-
width: 4rem;
|
|
121
|
-
height: 4rem;
|
|
122
|
-
border-radius: 50%;
|
|
123
|
-
background-color: #f4f4f5;
|
|
124
|
-
color: var(--nymbal-color-text-muted);
|
|
125
|
-
margin-bottom: var(--nymbal-spacing-md);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.emptyIcon svg {
|
|
129
|
-
width: 2rem;
|
|
130
|
-
height: 2rem;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.emptyTitle {
|
|
134
|
-
font-size: var(--nymbal-font-size-lg);
|
|
135
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
136
|
-
margin-bottom: var(--nymbal-spacing-sm);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.emptyText {
|
|
140
|
-
font-size: var(--nymbal-font-size-sm);
|
|
141
|
-
color: var(--nymbal-color-text-muted);
|
|
142
|
-
max-width: 24rem;
|
|
143
|
-
margin-inline: auto;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/* ── Category filter and load more ───────────────────────────────── */
|
|
17
|
+
/* ── Category filter beside the results ──────────────────────────── */
|
|
147
18
|
|
|
148
19
|
.layout {
|
|
149
20
|
display: grid;
|
|
@@ -161,21 +32,6 @@
|
|
|
161
32
|
align-self: start;
|
|
162
33
|
}
|
|
163
34
|
|
|
164
|
-
.pagination {
|
|
165
|
-
display: flex;
|
|
166
|
-
justify-content: center;
|
|
167
|
-
margin-top: var(--nymbal-spacing-xl);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/* ── Loading ──────────────────────────────────────────────────────── */
|
|
171
|
-
|
|
172
|
-
.loading {
|
|
173
|
-
display: flex;
|
|
174
|
-
align-items: center;
|
|
175
|
-
justify-content: center;
|
|
176
|
-
min-height: 16rem;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
35
|
/* ── Suggestions ──────────────────────────────────────────────────── */
|
|
180
36
|
|
|
181
37
|
.suggestions {
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import '../styles/pages/checkout.css'
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
id: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const { id } = Astro.props
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<div class="address-grid" data-testid={`${id}-form`}>
|
|
12
|
-
<div class="form-group">
|
|
13
|
-
<label for={`${id}-firstName`}>First Name</label>
|
|
14
|
-
<input
|
|
15
|
-
type="text"
|
|
16
|
-
id={`${id}-firstName`}
|
|
17
|
-
name="firstName"
|
|
18
|
-
required
|
|
19
|
-
autocomplete="given-name"
|
|
20
|
-
data-testid={`${id}-firstName`}
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<div class="form-group">
|
|
25
|
-
<label for={`${id}-lastName`}>Last Name</label>
|
|
26
|
-
<input
|
|
27
|
-
type="text"
|
|
28
|
-
id={`${id}-lastName`}
|
|
29
|
-
name="lastName"
|
|
30
|
-
required
|
|
31
|
-
autocomplete="family-name"
|
|
32
|
-
data-testid={`${id}-lastName`}
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<div class="form-group full-width">
|
|
37
|
-
<label for={`${id}-addressLine1`}>Address Line 1</label>
|
|
38
|
-
<input
|
|
39
|
-
type="text"
|
|
40
|
-
id={`${id}-addressLine1`}
|
|
41
|
-
name="addressLine1"
|
|
42
|
-
required
|
|
43
|
-
autocomplete="address-line1"
|
|
44
|
-
data-testid={`${id}-addressLine1`}
|
|
45
|
-
/>
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<div class="form-group full-width">
|
|
49
|
-
<label for={`${id}-addressLine2`}>Address Line 2 (optional)</label>
|
|
50
|
-
<input
|
|
51
|
-
type="text"
|
|
52
|
-
id={`${id}-addressLine2`}
|
|
53
|
-
name="addressLine2"
|
|
54
|
-
autocomplete="address-line2"
|
|
55
|
-
data-testid={`${id}-addressLine2`}
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<div class="form-group">
|
|
60
|
-
<label for={`${id}-city`}>City</label>
|
|
61
|
-
<input
|
|
62
|
-
type="text"
|
|
63
|
-
id={`${id}-city`}
|
|
64
|
-
name="city"
|
|
65
|
-
required
|
|
66
|
-
autocomplete="address-level2"
|
|
67
|
-
data-testid={`${id}-city`}
|
|
68
|
-
/>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<div class="form-group">
|
|
72
|
-
<label for={`${id}-region`}>State / County</label>
|
|
73
|
-
<input
|
|
74
|
-
type="text"
|
|
75
|
-
id={`${id}-region`}
|
|
76
|
-
name="region"
|
|
77
|
-
required
|
|
78
|
-
autocomplete="address-level1"
|
|
79
|
-
data-testid={`${id}-region`}
|
|
80
|
-
/>
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
<div class="form-group">
|
|
84
|
-
<label for={`${id}-postalCode`}>Postcode</label>
|
|
85
|
-
<input
|
|
86
|
-
type="text"
|
|
87
|
-
id={`${id}-postalCode`}
|
|
88
|
-
name="postalCode"
|
|
89
|
-
required
|
|
90
|
-
autocomplete="postal-code"
|
|
91
|
-
data-testid={`${id}-postalCode`}
|
|
92
|
-
/>
|
|
93
|
-
</div>
|
|
94
|
-
|
|
95
|
-
<div class="form-group">
|
|
96
|
-
<label for={`${id}-country`}>Country (2-letter code)</label>
|
|
97
|
-
<input
|
|
98
|
-
type="text"
|
|
99
|
-
id={`${id}-country`}
|
|
100
|
-
name="country"
|
|
101
|
-
required
|
|
102
|
-
autocomplete="country"
|
|
103
|
-
placeholder="GB"
|
|
104
|
-
data-testid={`${id}-country`}
|
|
105
|
-
/>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
items: Array<{ label: string; href?: string }>
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
const { items } = Astro.props
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
<nav class="pdp-breadcrumbs" aria-label="Breadcrumb" data-testid="breadcrumb">
|
|
10
|
-
{items.map((item, index) => (
|
|
11
|
-
<>
|
|
12
|
-
{index > 0 && <span class="separator" aria-hidden="true">/</span>}
|
|
13
|
-
{item.href && index < items.length - 1 ? (
|
|
14
|
-
<a href={item.href}>{item.label}</a>
|
|
15
|
-
) : (
|
|
16
|
-
<span class="current" aria-current="page">{item.label}</span>
|
|
17
|
-
)}
|
|
18
|
-
</>
|
|
19
|
-
))}
|
|
20
|
-
</nav>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import '../styles/pages/home.css'
|
|
3
|
-
import type { Category } from '@nymbalhq/types'
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
categories: Category[]
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const { categories } = Astro.props
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
<div class="category-grid">
|
|
13
|
-
{categories.map((cat) => (
|
|
14
|
-
<a
|
|
15
|
-
href={`/category/${cat.slug}`}
|
|
16
|
-
class="category-card"
|
|
17
|
-
data-testid={`category-${cat.slug}`}
|
|
18
|
-
>
|
|
19
|
-
<span class="category-card-name">{cat.name}</span>
|
|
20
|
-
{cat.description && (
|
|
21
|
-
<span class="category-card-description" style="font-size: var(--nymbal-font-size-xs, 0.75rem); color: var(--nymbal-color-text-muted, #71717a); margin-top: var(--nymbal-spacing-xs, 0.25rem);">
|
|
22
|
-
{cat.description}
|
|
23
|
-
</span>
|
|
24
|
-
)}
|
|
25
|
-
</a>
|
|
26
|
-
))}
|
|
27
|
-
</div>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import '../styles/pages/checkout.css'
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
currentStep: 'contact' | 'shipping' | 'payment'
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const { currentStep } = Astro.props
|
|
9
|
-
const steps = ['contact', 'shipping', 'payment'] as const
|
|
10
|
-
const stepLabels = { contact: 'Contact', shipping: 'Shipping', payment: 'Payment' }
|
|
11
|
-
const currentIndex = steps.indexOf(currentStep)
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<div class="checkout-steps" data-testid="checkout-steps">
|
|
15
|
-
{steps.map((step, index) => {
|
|
16
|
-
const isCompleted = index < currentIndex
|
|
17
|
-
const isActive = step === currentStep
|
|
18
|
-
const stepClass = isCompleted ? 'checkout-step completed' : isActive ? 'checkout-step active' : 'checkout-step'
|
|
19
|
-
const dividerClass = index < currentIndex ? 'checkout-step-divider completed' : 'checkout-step-divider'
|
|
20
|
-
return (
|
|
21
|
-
<>
|
|
22
|
-
{index > 0 && <div class={dividerClass} aria-hidden="true"></div>}
|
|
23
|
-
<div class={stepClass} data-testid={`checkout-step-${step}`}>
|
|
24
|
-
<span>{stepLabels[step]}</span>
|
|
25
|
-
</div>
|
|
26
|
-
</>
|
|
27
|
-
)
|
|
28
|
-
})}
|
|
29
|
-
</div>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
const currentYear = new Date().getFullYear()
|
|
3
|
-
---
|
|
4
|
-
<footer class="site-footer" data-testid="site-footer">
|
|
5
|
-
<div class="footer-container container">
|
|
6
|
-
<div class="footer-grid">
|
|
7
|
-
<div class="footer-column">
|
|
8
|
-
<h2 class="footer-heading">Shop</h2>
|
|
9
|
-
<ul class="footer-links">
|
|
10
|
-
<li><a href="/products">All Products</a></li>
|
|
11
|
-
<li><a href="/category/apparel">Apparel</a></li>
|
|
12
|
-
<li><a href="/category/home">Home</a></li>
|
|
13
|
-
<li><a href="/category/electronics">Electronics</a></li>
|
|
14
|
-
<li><a href="/category/books">Books</a></li>
|
|
15
|
-
</ul>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<div class="footer-column">
|
|
19
|
-
<h2 class="footer-heading">Account</h2>
|
|
20
|
-
<ul class="footer-links">
|
|
21
|
-
<li><a href="/account/login">Login</a></li>
|
|
22
|
-
<li><a href="/account/register">Register</a></li>
|
|
23
|
-
<li><a href="/account/orders">Orders</a></li>
|
|
24
|
-
</ul>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<div class="footer-column">
|
|
28
|
-
<h2 class="footer-heading">About</h2>
|
|
29
|
-
<p class="footer-about">
|
|
30
|
-
Nymbal is a modern headless commerce platform built for developers.
|
|
31
|
-
Fast, flexible, and fully customisable.
|
|
32
|
-
</p>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<div class="footer-bottom">
|
|
37
|
-
<p>© {currentYear} Nymbal. All rights reserved.</p>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</footer>
|
|
41
|
-
|
|
42
|
-
<style>
|
|
43
|
-
.site-footer {
|
|
44
|
-
background-color: var(--nymbal-color-primary, #18181b);
|
|
45
|
-
color: var(--nymbal-color-text-inverse, #fff);
|
|
46
|
-
margin-top: auto;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.footer-container {
|
|
50
|
-
padding-block: 3rem var(--nymbal-spacing-lg, 1.5rem);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.footer-grid {
|
|
54
|
-
display: grid;
|
|
55
|
-
grid-template-columns: 1fr;
|
|
56
|
-
gap: var(--nymbal-spacing-xl, 2rem);
|
|
57
|
-
margin-bottom: var(--nymbal-spacing-xl, 2rem);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@media (min-width: 641px) {
|
|
61
|
-
.footer-grid {
|
|
62
|
-
grid-template-columns: repeat(3, 1fr);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.footer-heading {
|
|
67
|
-
font-size: var(--nymbal-font-size-sm, 0.875rem);
|
|
68
|
-
font-weight: var(--nymbal-font-weight-bold, 700);
|
|
69
|
-
text-transform: uppercase;
|
|
70
|
-
letter-spacing: 0.05em;
|
|
71
|
-
margin-bottom: var(--nymbal-spacing-md, 1rem);
|
|
72
|
-
color: var(--nymbal-color-text-inverse, #fff);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.footer-links {
|
|
76
|
-
display: flex;
|
|
77
|
-
flex-direction: column;
|
|
78
|
-
gap: var(--nymbal-spacing-sm, 0.5rem);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.footer-links a {
|
|
82
|
-
font-size: var(--nymbal-font-size-sm, 0.875rem);
|
|
83
|
-
color: rgba(255, 255, 255, 0.7);
|
|
84
|
-
text-decoration: none;
|
|
85
|
-
transition: color var(--nymbal-transition-fast, 150ms) ease;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.footer-links a:hover {
|
|
89
|
-
color: var(--nymbal-color-text-inverse, #fff);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.footer-about {
|
|
93
|
-
font-size: var(--nymbal-font-size-sm, 0.875rem);
|
|
94
|
-
color: rgba(255, 255, 255, 0.7);
|
|
95
|
-
line-height: 1.6;
|
|
96
|
-
max-width: 28ch;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.footer-bottom {
|
|
100
|
-
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
101
|
-
padding-top: var(--nymbal-spacing-lg, 1.5rem);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.footer-bottom p {
|
|
105
|
-
font-size: var(--nymbal-font-size-xs, 0.75rem);
|
|
106
|
-
color: rgba(255, 255, 255, 0.5);
|
|
107
|
-
}
|
|
108
|
-
</style>
|