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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { fetchCapabilities } from '@/lib/api'
|
|
2
|
+
import { HEADER } from '@/lib/chrome'
|
|
3
|
+
import { renderElement } from '@/lib/render'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The store's nymbal-site-header as the server renders it: its attributes, and the search bar (when the store searches)
|
|
7
|
+
* and the mini-cart as its light-DOM children, each with the slot it fills. React cannot give children beside the
|
|
8
|
+
* header's server HTML, so they go in that HTML. The mini-cart has a count only on a shopper's own page; a shared,
|
|
9
|
+
* cached header has none.
|
|
10
|
+
*/
|
|
11
|
+
export function siteHeader(
|
|
12
|
+
search: boolean,
|
|
13
|
+
cartCount?: number,
|
|
14
|
+
): { attributes: Record<string, string>; children: string } {
|
|
15
|
+
const miniCart: Record<string, string> = { slot: 'cart' }
|
|
16
|
+
if (cartCount !== undefined) miniCart['count'] = String(cartCount)
|
|
17
|
+
const children = [
|
|
18
|
+
search
|
|
19
|
+
? renderElement('nymbal-search-bar', {
|
|
20
|
+
attributes: { slot: 'search', placeholder: 'Search products...', 'debounce-ms': '300' },
|
|
21
|
+
})
|
|
22
|
+
: '',
|
|
23
|
+
renderElement('nymbal-mini-cart', { attributes: miniCart }),
|
|
24
|
+
].join('')
|
|
25
|
+
return {
|
|
26
|
+
attributes: {
|
|
27
|
+
links: JSON.stringify(HEADER.links),
|
|
28
|
+
logo: HEADER.logo,
|
|
29
|
+
'account-href': HEADER.accountHref,
|
|
30
|
+
},
|
|
31
|
+
children,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Whether the store searches, which puts the search bar in the header. */
|
|
36
|
+
export async function canSearch(): Promise<boolean> {
|
|
37
|
+
const capabilities = await fetchCapabilities()
|
|
38
|
+
return capabilities?.search.capabilities.includes('search') ?? false
|
|
39
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { renderNymbal } from '@nymbalhq/react/server'
|
|
2
|
+
import {
|
|
3
|
+
cardImageOf,
|
|
4
|
+
cardProductOf,
|
|
5
|
+
registerServerElements,
|
|
6
|
+
renderElement,
|
|
7
|
+
} from '@nymbalhq/web-components/ssr'
|
|
8
|
+
import { serverElements } from '@/elements'
|
|
9
|
+
|
|
10
|
+
// Server components only: this loads Lit SSR. The store's own elements render on the server under their tags, as the
|
|
11
|
+
// browser defines them there.
|
|
12
|
+
registerServerElements(serverElements)
|
|
13
|
+
|
|
14
|
+
export { cardImageOf, cardProductOf, renderElement, renderNymbal }
|
|
@@ -1,9 +1,41 @@
|
|
|
1
|
+
import { relative } from 'node:path'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
|
|
4
|
+
// NYMBAL_ELEMENTS_ENTRY (an absolute path) is the store's elements entry in place of elements/index.ts, on the server
|
|
5
|
+
// and in the browser (the E2E override fixture).
|
|
6
|
+
const elementsEntry = process.env.NYMBAL_ELEMENTS_ENTRY
|
|
7
|
+
const elementsAlias =
|
|
8
|
+
elementsEntry === undefined
|
|
9
|
+
? {}
|
|
10
|
+
: { '@/elements': `./${relative(fileURLToPath(new URL('.', import.meta.url)), elementsEntry)}` }
|
|
11
|
+
|
|
12
|
+
// NYMBAL_NEXT_DIST_DIR builds beside the usual `.next`, so a second build cannot overwrite one being served.
|
|
13
|
+
const distDir = process.env.NYMBAL_NEXT_DIST_DIR || '.next'
|
|
14
|
+
|
|
1
15
|
/** @type {import('next').NextConfig} */
|
|
2
16
|
const nextConfig = {
|
|
3
17
|
reactStrictMode: true,
|
|
18
|
+
distDir,
|
|
19
|
+
...(distDir !== '.next' && { typescript: { tsconfigPath: 'tsconfig.dist.json' } }),
|
|
20
|
+
// Cached pages live in memory, bounded by cacheMaxMemorySize: on disk, every distinct product URL a crawler asks for
|
|
21
|
+
// would keep an entry.
|
|
22
|
+
experimental: { isrFlushToDisk: false },
|
|
23
|
+
// `/` and the header and nav fragments are dynamic segments with no params, so the build prerenders none of them
|
|
24
|
+
// (the API may be down then) and Next caches each on its first request.
|
|
25
|
+
async rewrites() {
|
|
26
|
+
return {
|
|
27
|
+
beforeFiles: [
|
|
28
|
+
{ source: '/', destination: '/home/index' },
|
|
29
|
+
{ source: '/fragments/header', destination: '/fragments/header/index' },
|
|
30
|
+
{ source: '/fragments/nav', destination: '/fragments/nav/index' },
|
|
31
|
+
],
|
|
32
|
+
}
|
|
33
|
+
},
|
|
4
34
|
transpilePackages: ['@nymbalhq/sdk', '@nymbalhq/react', '@nymbalhq/web-components'],
|
|
5
35
|
images: {
|
|
6
36
|
remotePatterns: [{ protocol: 'https', hostname: '**' }],
|
|
7
37
|
},
|
|
38
|
+
turbopack: { resolveAlias: elementsAlias },
|
|
8
39
|
}
|
|
40
|
+
|
|
9
41
|
export default nextConfig
|
|
@@ -17,46 +17,47 @@
|
|
|
17
17
|
"seed": "nymbal seed"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"nymbal": "1.
|
|
21
|
-
"@nymbalhq/config": "1.
|
|
22
|
-
"@nymbalhq/platform": "1.
|
|
23
|
-
"@nymbalhq/stack": "1.
|
|
20
|
+
"nymbal": "1.2.0",
|
|
21
|
+
"@nymbalhq/config": "1.2.0",
|
|
22
|
+
"@nymbalhq/platform": "1.2.0",
|
|
23
|
+
"@nymbalhq/stack": "1.2.0",
|
|
24
24
|
"next": "^16.4.2",
|
|
25
25
|
"react": "^19.3.1",
|
|
26
26
|
"react-dom": "^19.3.1",
|
|
27
|
-
"@nymbalhq/sdk": "1.
|
|
28
|
-
"@nymbalhq/react": "1.
|
|
29
|
-
"@nymbalhq/web-components": "1.
|
|
30
|
-
"@nymbalhq/types": "1.
|
|
27
|
+
"@nymbalhq/sdk": "1.2.0",
|
|
28
|
+
"@nymbalhq/react": "1.2.0",
|
|
29
|
+
"@nymbalhq/web-components": "1.2.0",
|
|
30
|
+
"@nymbalhq/types": "1.2.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^22.9.0",
|
|
34
34
|
"@types/react": "^19.3.0",
|
|
35
35
|
"@types/react-dom": "^19.3.0",
|
|
36
|
-
"typescript": "
|
|
36
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
37
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
37
38
|
},
|
|
38
39
|
"pnpm": {
|
|
39
40
|
"overrides": {
|
|
40
|
-
"nymbal": "1.
|
|
41
|
-
"@nymbalhq/config": "1.
|
|
42
|
-
"@nymbalhq/http": "1.
|
|
43
|
-
"@nymbalhq/platform": "1.
|
|
44
|
-
"@nymbalhq/react": "1.
|
|
45
|
-
"@nymbalhq/sdk": "1.
|
|
46
|
-
"@nymbalhq/stack": "1.
|
|
47
|
-
"@nymbalhq/types": "1.
|
|
48
|
-
"@nymbalhq/web-components": "1.
|
|
41
|
+
"nymbal": "1.2.0",
|
|
42
|
+
"@nymbalhq/config": "1.2.0",
|
|
43
|
+
"@nymbalhq/http": "1.2.0",
|
|
44
|
+
"@nymbalhq/platform": "1.2.0",
|
|
45
|
+
"@nymbalhq/react": "1.2.0",
|
|
46
|
+
"@nymbalhq/sdk": "1.2.0",
|
|
47
|
+
"@nymbalhq/stack": "1.2.0",
|
|
48
|
+
"@nymbalhq/types": "1.2.0",
|
|
49
|
+
"@nymbalhq/web-components": "1.2.0"
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
52
|
"overrides": {
|
|
52
|
-
"nymbal": "1.
|
|
53
|
-
"@nymbalhq/config": "1.
|
|
54
|
-
"@nymbalhq/http": "1.
|
|
55
|
-
"@nymbalhq/platform": "1.
|
|
56
|
-
"@nymbalhq/react": "1.
|
|
57
|
-
"@nymbalhq/sdk": "1.
|
|
58
|
-
"@nymbalhq/stack": "1.
|
|
59
|
-
"@nymbalhq/types": "1.
|
|
60
|
-
"@nymbalhq/web-components": "1.
|
|
53
|
+
"nymbal": "1.2.0",
|
|
54
|
+
"@nymbalhq/config": "1.2.0",
|
|
55
|
+
"@nymbalhq/http": "1.2.0",
|
|
56
|
+
"@nymbalhq/platform": "1.2.0",
|
|
57
|
+
"@nymbalhq/react": "1.2.0",
|
|
58
|
+
"@nymbalhq/sdk": "1.2.0",
|
|
59
|
+
"@nymbalhq/stack": "1.2.0",
|
|
60
|
+
"@nymbalhq/types": "1.2.0",
|
|
61
|
+
"@nymbalhq/web-components": "1.2.0"
|
|
61
62
|
}
|
|
62
63
|
}
|
|
@@ -132,27 +132,6 @@
|
|
|
132
132
|
margin-top: var(--nymbal-spacing-lg);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
.saveButton {
|
|
136
|
-
padding: 0.625rem 1.5rem;
|
|
137
|
-
font-size: var(--nymbal-font-size-sm);
|
|
138
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
139
|
-
color: var(--nymbal-color-text-inverse);
|
|
140
|
-
background-color: var(--nymbal-color-primary);
|
|
141
|
-
border: none;
|
|
142
|
-
border-radius: var(--nymbal-radius-md);
|
|
143
|
-
cursor: pointer;
|
|
144
|
-
transition: background-color var(--nymbal-transition-fast);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.saveButton:hover {
|
|
148
|
-
background-color: var(--nymbal-color-primary-hover);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.saveButton:disabled {
|
|
152
|
-
opacity: 0.5;
|
|
153
|
-
cursor: not-allowed;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
135
|
.cancelButton {
|
|
157
136
|
padding: 0.625rem 1.5rem;
|
|
158
137
|
font-size: var(--nymbal-font-size-sm);
|
|
@@ -169,27 +148,6 @@
|
|
|
169
148
|
border-color: var(--nymbal-color-primary);
|
|
170
149
|
}
|
|
171
150
|
|
|
172
|
-
/* ── Alert / Success Message ──────────────────────────────────────── */
|
|
173
|
-
|
|
174
|
-
.alert {
|
|
175
|
-
padding: var(--nymbal-spacing-md);
|
|
176
|
-
border-radius: var(--nymbal-radius-md);
|
|
177
|
-
font-size: var(--nymbal-font-size-sm);
|
|
178
|
-
margin-bottom: var(--nymbal-spacing-md);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.alertSuccess {
|
|
182
|
-
background-color: #dcfce7;
|
|
183
|
-
color: var(--nymbal-color-success);
|
|
184
|
-
border: 1px solid #bbf7d0;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.alertError {
|
|
188
|
-
background-color: #fef2f2;
|
|
189
|
-
color: var(--nymbal-color-error);
|
|
190
|
-
border: 1px solid #fecaca;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
151
|
/* ── Order List ───────────────────────────────────────────────────── */
|
|
194
152
|
|
|
195
153
|
.orderList {
|
|
@@ -331,34 +289,6 @@
|
|
|
331
289
|
margin-bottom: var(--nymbal-spacing-lg);
|
|
332
290
|
}
|
|
333
291
|
|
|
334
|
-
.authForm {
|
|
335
|
-
display: flex;
|
|
336
|
-
flex-direction: column;
|
|
337
|
-
gap: var(--nymbal-spacing-md);
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.authSubmit {
|
|
341
|
-
width: 100%;
|
|
342
|
-
padding: 0.75rem;
|
|
343
|
-
font-size: var(--nymbal-font-size-sm);
|
|
344
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
345
|
-
color: var(--nymbal-color-text-inverse);
|
|
346
|
-
background-color: var(--nymbal-color-primary);
|
|
347
|
-
border: none;
|
|
348
|
-
border-radius: var(--nymbal-radius-md);
|
|
349
|
-
cursor: pointer;
|
|
350
|
-
transition: background-color var(--nymbal-transition-fast);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.authSubmit:hover {
|
|
354
|
-
background-color: var(--nymbal-color-primary-hover);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.authSubmit:disabled {
|
|
358
|
-
opacity: 0.5;
|
|
359
|
-
cursor: not-allowed;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
292
|
.authFooter {
|
|
363
293
|
text-align: center;
|
|
364
294
|
margin-top: var(--nymbal-spacing-md);
|
|
@@ -65,91 +65,11 @@
|
|
|
65
65
|
margin-bottom: var(--nymbal-spacing-md);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
/* ──
|
|
68
|
+
/* ── Order Summary ──────────────────────────────────────────────── */
|
|
69
69
|
|
|
70
|
-
.
|
|
71
|
-
display:
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.lineItem {
|
|
76
|
-
display: flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
gap: var(--nymbal-spacing-md);
|
|
79
|
-
padding: var(--nymbal-spacing-sm) 0;
|
|
80
|
-
border-bottom: 1px solid var(--nymbal-color-border);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.lineItem:last-child {
|
|
84
|
-
border-bottom: none;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.lineItemImage {
|
|
88
|
-
width: 3.5rem;
|
|
89
|
-
height: 3.5rem;
|
|
90
|
-
flex-shrink: 0;
|
|
91
|
-
border-radius: var(--nymbal-radius-md);
|
|
92
|
-
background-color: #f4f4f5;
|
|
93
|
-
overflow: hidden;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.lineItemImage img {
|
|
97
|
-
width: 100%;
|
|
98
|
-
height: 100%;
|
|
99
|
-
object-fit: cover;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.lineItemInfo {
|
|
103
|
-
flex: 1;
|
|
104
|
-
min-width: 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.lineItemName {
|
|
108
|
-
font-size: var(--nymbal-font-size-sm);
|
|
109
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.lineItemVariant {
|
|
113
|
-
font-size: var(--nymbal-font-size-xs);
|
|
114
|
-
color: var(--nymbal-color-text-muted);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.lineItemQty {
|
|
118
|
-
font-size: var(--nymbal-font-size-xs);
|
|
119
|
-
color: var(--nymbal-color-text-muted);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.lineItemPrice {
|
|
123
|
-
font-size: var(--nymbal-font-size-sm);
|
|
124
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
125
|
-
flex-shrink: 0;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/* ── Totals ───────────────────────────────────────────────────────── */
|
|
129
|
-
|
|
130
|
-
.totals {
|
|
131
|
-
margin-top: var(--nymbal-spacing-md);
|
|
132
|
-
padding-top: var(--nymbal-spacing-md);
|
|
133
|
-
border-top: 1px solid var(--nymbal-color-border);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.totalRow {
|
|
137
|
-
display: flex;
|
|
138
|
-
justify-content: space-between;
|
|
139
|
-
padding: var(--nymbal-spacing-xs) 0;
|
|
140
|
-
font-size: var(--nymbal-font-size-sm);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.totalLabel {
|
|
144
|
-
color: var(--nymbal-color-text-muted);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.totalGrand {
|
|
148
|
-
font-weight: var(--nymbal-font-weight-bold);
|
|
149
|
-
font-size: var(--nymbal-font-size-base);
|
|
150
|
-
padding-top: var(--nymbal-spacing-sm);
|
|
151
|
-
border-top: 1px solid var(--nymbal-color-border);
|
|
152
|
-
margin-top: var(--nymbal-spacing-xs);
|
|
70
|
+
.summary {
|
|
71
|
+
display: block;
|
|
72
|
+
margin-bottom: var(--nymbal-spacing-lg);
|
|
153
73
|
}
|
|
154
74
|
|
|
155
75
|
/* ── Address Cards ────────────────────────────────────────────────── */
|
|
@@ -225,7 +145,8 @@
|
|
|
225
145
|
border: 1px solid var(--nymbal-color-border);
|
|
226
146
|
border-radius: var(--nymbal-radius-md);
|
|
227
147
|
text-decoration: none;
|
|
228
|
-
transition:
|
|
148
|
+
transition:
|
|
149
|
+
border-color var(--nymbal-transition-fast),
|
|
229
150
|
background-color var(--nymbal-transition-fast);
|
|
230
151
|
}
|
|
231
152
|
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
border-radius: var(--nymbal-radius-md);
|
|
47
47
|
cursor: pointer;
|
|
48
48
|
text-decoration: none;
|
|
49
|
-
transition:
|
|
49
|
+
transition:
|
|
50
|
+
background-color var(--nymbal-transition-fast),
|
|
50
51
|
transform var(--nymbal-transition-fast);
|
|
51
52
|
}
|
|
52
53
|
|
|
@@ -87,52 +88,6 @@
|
|
|
87
88
|
padding-block: var(--nymbal-spacing-xl);
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
.categoriesGrid {
|
|
91
|
-
display: grid;
|
|
92
|
-
grid-template-columns: 1fr;
|
|
93
|
-
gap: var(--nymbal-spacing-md);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
@media (min-width: 640px) {
|
|
97
|
-
.categoriesGrid {
|
|
98
|
-
grid-template-columns: repeat(2, 1fr);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@media (min-width: 1024px) {
|
|
103
|
-
.categoriesGrid {
|
|
104
|
-
grid-template-columns: repeat(3, 1fr);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.categoryCard {
|
|
109
|
-
display: flex;
|
|
110
|
-
align-items: center;
|
|
111
|
-
justify-content: center;
|
|
112
|
-
min-height: 10rem;
|
|
113
|
-
padding: var(--nymbal-spacing-lg);
|
|
114
|
-
background-color: #f9fafb;
|
|
115
|
-
border: 1px solid var(--nymbal-color-border);
|
|
116
|
-
border-radius: var(--nymbal-radius-lg);
|
|
117
|
-
text-decoration: none;
|
|
118
|
-
color: var(--nymbal-color-text);
|
|
119
|
-
font-size: var(--nymbal-font-size-lg);
|
|
120
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
121
|
-
transition: border-color var(--nymbal-transition-fast),
|
|
122
|
-
box-shadow var(--nymbal-transition-fast),
|
|
123
|
-
transform var(--nymbal-transition-fast);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.categoryCard:hover {
|
|
127
|
-
border-color: var(--nymbal-color-accent);
|
|
128
|
-
box-shadow: var(--nymbal-shadow-md);
|
|
129
|
-
transform: translateY(-2px);
|
|
130
|
-
text-decoration: none;
|
|
131
|
-
color: var(--nymbal-color-text);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/* ── Featured Products ────────────────────────────────────────────── */
|
|
135
|
-
|
|
136
91
|
.featuredSection {
|
|
137
92
|
padding-block: var(--nymbal-spacing-xl);
|
|
138
93
|
background-color: #fafafa;
|
|
@@ -163,62 +118,6 @@
|
|
|
163
118
|
text-decoration: underline;
|
|
164
119
|
}
|
|
165
120
|
|
|
166
|
-
.productCard {
|
|
167
|
-
display: flex;
|
|
168
|
-
flex-direction: column;
|
|
169
|
-
background: var(--nymbal-color-surface);
|
|
170
|
-
border: 1px solid var(--nymbal-color-border);
|
|
171
|
-
border-radius: var(--nymbal-radius-lg);
|
|
172
|
-
overflow: hidden;
|
|
173
|
-
text-decoration: none;
|
|
174
|
-
color: var(--nymbal-color-text);
|
|
175
|
-
transition: box-shadow var(--nymbal-transition-fast),
|
|
176
|
-
transform var(--nymbal-transition-fast);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.productCard:hover {
|
|
180
|
-
box-shadow: var(--nymbal-shadow-md);
|
|
181
|
-
transform: translateY(-2px);
|
|
182
|
-
text-decoration: none;
|
|
183
|
-
color: var(--nymbal-color-text);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.productImage {
|
|
187
|
-
aspect-ratio: 1;
|
|
188
|
-
background-color: #f4f4f5;
|
|
189
|
-
display: flex;
|
|
190
|
-
align-items: center;
|
|
191
|
-
justify-content: center;
|
|
192
|
-
overflow: hidden;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.productImage img {
|
|
196
|
-
width: 100%;
|
|
197
|
-
height: 100%;
|
|
198
|
-
object-fit: cover;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.productInfo {
|
|
202
|
-
padding: var(--nymbal-spacing-md);
|
|
203
|
-
display: flex;
|
|
204
|
-
flex-direction: column;
|
|
205
|
-
gap: var(--nymbal-spacing-xs);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.productName {
|
|
209
|
-
font-size: var(--nymbal-font-size-sm);
|
|
210
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
211
|
-
line-height: 1.3;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.productPrice {
|
|
215
|
-
font-size: var(--nymbal-font-size-sm);
|
|
216
|
-
font-weight: var(--nymbal-font-weight-bold);
|
|
217
|
-
color: var(--nymbal-color-text);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/* ── Newsletter ───────────────────────────────────────────────────── */
|
|
221
|
-
|
|
222
121
|
.newsletter {
|
|
223
122
|
padding-block: var(--nymbal-spacing-xl);
|
|
224
123
|
text-align: center;
|
|
@@ -20,63 +20,11 @@
|
|
|
20
20
|
/* ── Gallery ──────────────────────────────────────────────────────── */
|
|
21
21
|
|
|
22
22
|
.gallery {
|
|
23
|
+
display: block;
|
|
23
24
|
flex: 1;
|
|
24
25
|
min-width: 0;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
.mainImage {
|
|
28
|
-
aspect-ratio: 1;
|
|
29
|
-
background-color: #f4f4f5;
|
|
30
|
-
border-radius: var(--nymbal-radius-lg);
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
margin-bottom: var(--nymbal-spacing-md);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.mainImage img {
|
|
36
|
-
width: 100%;
|
|
37
|
-
height: 100%;
|
|
38
|
-
object-fit: cover;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.thumbnails {
|
|
42
|
-
display: flex;
|
|
43
|
-
gap: var(--nymbal-spacing-sm);
|
|
44
|
-
overflow-x: auto;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.thumbnail {
|
|
48
|
-
width: 4rem;
|
|
49
|
-
height: 4rem;
|
|
50
|
-
flex-shrink: 0;
|
|
51
|
-
border-radius: var(--nymbal-radius-md);
|
|
52
|
-
overflow: hidden;
|
|
53
|
-
border: 2px solid transparent;
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
background-color: #f4f4f5;
|
|
56
|
-
transition: border-color var(--nymbal-transition-fast);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.thumbnail:hover {
|
|
60
|
-
border-color: var(--nymbal-color-text-muted);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.thumbnailActive {
|
|
64
|
-
border-color: var(--nymbal-color-primary);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.thumbnail img {
|
|
68
|
-
width: 100%;
|
|
69
|
-
height: 100%;
|
|
70
|
-
object-fit: cover;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@media (min-width: 1024px) {
|
|
74
|
-
.thumbnail {
|
|
75
|
-
width: 5rem;
|
|
76
|
-
height: 5rem;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
28
|
/* ── Product Info ─────────────────────────────────────────────────── */
|
|
81
29
|
|
|
82
30
|
.info {
|
|
@@ -93,30 +41,6 @@
|
|
|
93
41
|
}
|
|
94
42
|
}
|
|
95
43
|
|
|
96
|
-
.breadcrumb {
|
|
97
|
-
display: flex;
|
|
98
|
-
align-items: center;
|
|
99
|
-
gap: var(--nymbal-spacing-xs);
|
|
100
|
-
font-size: var(--nymbal-font-size-xs);
|
|
101
|
-
color: var(--nymbal-color-text-muted);
|
|
102
|
-
margin-bottom: var(--nymbal-spacing-md);
|
|
103
|
-
flex-wrap: wrap;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.breadcrumbLink {
|
|
107
|
-
color: var(--nymbal-color-text-muted);
|
|
108
|
-
text-decoration: none;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.breadcrumbLink:hover {
|
|
112
|
-
color: var(--nymbal-color-accent);
|
|
113
|
-
text-decoration: underline;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.breadcrumbSeparator {
|
|
117
|
-
color: var(--nymbal-color-border);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
44
|
.productTitle {
|
|
121
45
|
font-size: 1.75rem;
|
|
122
46
|
font-weight: var(--nymbal-font-weight-bold);
|
|
@@ -124,51 +48,6 @@
|
|
|
124
48
|
margin-bottom: var(--nymbal-spacing-sm);
|
|
125
49
|
}
|
|
126
50
|
|
|
127
|
-
.price {
|
|
128
|
-
font-size: 1.5rem;
|
|
129
|
-
font-weight: var(--nymbal-font-weight-bold);
|
|
130
|
-
margin-bottom: var(--nymbal-spacing-md);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.priceRange {
|
|
134
|
-
font-size: var(--nymbal-font-size-sm);
|
|
135
|
-
color: var(--nymbal-color-text-muted);
|
|
136
|
-
font-weight: var(--nymbal-font-weight-normal);
|
|
137
|
-
margin-left: var(--nymbal-spacing-xs);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.stockBadge {
|
|
141
|
-
display: inline-flex;
|
|
142
|
-
align-items: center;
|
|
143
|
-
gap: var(--nymbal-spacing-xs);
|
|
144
|
-
padding: 0.125rem 0.5rem;
|
|
145
|
-
font-size: var(--nymbal-font-size-xs);
|
|
146
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
147
|
-
border-radius: var(--nymbal-radius-full);
|
|
148
|
-
margin-bottom: var(--nymbal-spacing-md);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.stockBadge[data-level='in'] {
|
|
152
|
-
background-color: #dcfce7;
|
|
153
|
-
color: var(--nymbal-color-success);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.stockBadge[data-level='low'] {
|
|
157
|
-
color: var(--nymbal-color-warning);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.stockBadge[data-level='out'] {
|
|
161
|
-
background-color: #fef2f2;
|
|
162
|
-
color: var(--nymbal-color-error);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.stockDot {
|
|
166
|
-
width: 6px;
|
|
167
|
-
height: 6px;
|
|
168
|
-
border-radius: 50%;
|
|
169
|
-
background-color: currentColor;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
51
|
.description {
|
|
173
52
|
font-size: var(--nymbal-font-size-sm);
|
|
174
53
|
color: var(--nymbal-color-text-muted);
|
|
@@ -259,65 +138,6 @@
|
|
|
259
138
|
margin-bottom: var(--nymbal-spacing-lg);
|
|
260
139
|
}
|
|
261
140
|
|
|
262
|
-
.
|
|
263
|
-
|
|
264
|
-
flex-direction: column;
|
|
265
|
-
gap: var(--nymbal-spacing-lg);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.reviewCard {
|
|
269
|
-
padding-bottom: var(--nymbal-spacing-lg);
|
|
270
|
-
border-bottom: 1px solid var(--nymbal-color-border);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.reviewCard:last-child {
|
|
274
|
-
border-bottom: none;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.reviewHeader {
|
|
278
|
-
display: flex;
|
|
279
|
-
align-items: center;
|
|
280
|
-
justify-content: space-between;
|
|
281
|
-
margin-bottom: var(--nymbal-spacing-sm);
|
|
282
|
-
gap: var(--nymbal-spacing-sm);
|
|
283
|
-
flex-wrap: wrap;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.reviewStars {
|
|
287
|
-
display: flex;
|
|
288
|
-
gap: 2px;
|
|
289
|
-
color: #f59e0b;
|
|
290
|
-
font-size: var(--nymbal-font-size-sm);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.starFilled {
|
|
294
|
-
color: #f59e0b;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.starEmpty {
|
|
298
|
-
color: var(--nymbal-color-border);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.reviewDate {
|
|
302
|
-
font-size: var(--nymbal-font-size-xs);
|
|
303
|
-
color: var(--nymbal-color-text-muted);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.reviewTitle {
|
|
307
|
-
font-size: var(--nymbal-font-size-sm);
|
|
308
|
-
font-weight: var(--nymbal-font-weight-medium);
|
|
309
|
-
margin-bottom: var(--nymbal-spacing-xs);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.reviewBody {
|
|
313
|
-
font-size: var(--nymbal-font-size-sm);
|
|
314
|
-
color: var(--nymbal-color-text-muted);
|
|
315
|
-
line-height: 1.6;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.noReviews {
|
|
319
|
-
text-align: center;
|
|
320
|
-
padding: var(--nymbal-spacing-xl);
|
|
321
|
-
color: var(--nymbal-color-text-muted);
|
|
322
|
-
font-size: var(--nymbal-font-size-sm);
|
|
141
|
+
.reviewForm {
|
|
142
|
+
margin-top: var(--nymbal-spacing-xl);
|
|
323
143
|
}
|