create-magic-storefront 0.4.0 → 0.6.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/package.json +3 -3
- package/template/.claude/skills/storefront-design/SKILL.md +14 -10
- package/template/.env.example +5 -0
- package/template/AGENTS.md +36 -17
- package/template/DESIGN.md +117 -0
- package/template/PAGES.md +116 -29
- package/template/README.md +15 -3
- package/template/app/account/addresses/page.tsx +16 -0
- package/template/app/account/layout.tsx +14 -0
- package/template/app/account/loading.tsx +15 -0
- package/template/app/account/orders/[id]/page.tsx +15 -0
- package/template/app/account/page.tsx +12 -244
- package/template/app/account/profile/page.tsx +16 -0
- package/template/app/blog/(index)/loading.tsx +22 -0
- package/template/app/blog/{page.tsx → (index)/page.tsx} +42 -25
- package/template/app/blog/[handle]/page.tsx +92 -56
- package/template/app/blog/author/[handle]/page.tsx +1 -1
- package/template/app/cart/layout.tsx +14 -0
- package/template/app/cart/page.tsx +49 -101
- package/template/app/checkout/layout.tsx +14 -0
- package/template/app/checkout/page.tsx +98 -281
- package/template/app/collections/[handle]/layout.tsx +20 -0
- package/template/app/collections/[handle]/loading.tsx +23 -0
- package/template/app/collections/[handle]/page.tsx +131 -15
- package/template/app/collections/page.tsx +49 -0
- package/template/app/contacts/page.tsx +196 -0
- package/template/app/error.tsx +19 -8
- package/template/app/fonts/OFL.txt +93 -0
- package/template/app/fonts/index.ts +14 -0
- package/template/app/fonts/onest-variable.woff2 +0 -0
- package/template/app/globals.css +14 -518
- package/template/app/layout.tsx +74 -50
- package/template/app/not-found.tsx +34 -4
- package/template/app/page.tsx +1 -1
- package/template/app/pages/[handle]/page.tsx +1 -1
- package/template/app/products/[handle]/layout.tsx +20 -0
- package/template/app/products/[handle]/loading.tsx +25 -0
- package/template/app/products/[handle]/page.tsx +112 -15
- package/template/app/providers.tsx +20 -7
- package/template/app/search/loading.tsx +12 -0
- package/template/app/search/page.tsx +138 -25
- package/template/app/sitemap.ts +5 -1
- package/template/app/storefront-api/[...path]/route.ts +11 -66
- package/template/app/styles/base.css +138 -0
- package/template/app/styles/components.css +1108 -0
- package/template/app/styles/layout.css +455 -0
- package/template/app/styles/pages.css +1839 -0
- package/template/app/styles/reset.css +55 -0
- package/template/app/styles/sections.css +415 -0
- package/template/app/styles/tokens.css +167 -0
- package/template/app/styles/utilities.css +37 -0
- package/template/app/wishlist/page.tsx +26 -0
- package/template/components/account/account-shell.tsx +100 -0
- package/template/components/account/addresses.tsx +247 -0
- package/template/components/account/order-detail.tsx +281 -0
- package/template/components/account/order-list.tsx +94 -0
- package/template/components/account/order-status.tsx +19 -0
- package/template/components/account/profile.tsx +129 -0
- package/template/components/account/sign-in.tsx +164 -0
- package/template/components/article-body.tsx +3 -2
- package/template/components/article-card.tsx +37 -12
- package/template/components/cart/cart-drawer.tsx +149 -0
- package/template/components/cart/cart-lines.tsx +89 -0
- package/template/components/cart/cart-summary.tsx +191 -0
- package/template/components/catalog/catalog-form.tsx +107 -0
- package/template/components/catalog/catalog-layout.tsx +82 -0
- package/template/components/catalog/facets-shell.tsx +60 -0
- package/template/components/catalog/facets.tsx +216 -0
- package/template/components/checkout/order-summary.tsx +84 -0
- package/template/components/checkout/radio-card.tsx +34 -0
- package/template/components/checkout/step-indicator.tsx +56 -0
- package/template/components/checkout/steps.tsx +264 -0
- package/template/components/checkout/thank-you.tsx +48 -0
- package/template/components/checkout/use-checkout.ts +90 -0
- package/template/components/footer/site-footer.tsx +132 -0
- package/template/components/header/cart-button.tsx +43 -0
- package/template/components/header/desktop-nav.tsx +133 -0
- package/template/components/header/mobile-menu.tsx +102 -0
- package/template/components/header/site-header.tsx +78 -0
- package/template/components/page-loading.tsx +20 -0
- package/template/components/pager.tsx +3 -1
- package/template/components/product/buy-box.tsx +148 -0
- package/template/components/product/gallery.tsx +179 -0
- package/template/components/product/pre-order-form.tsx +93 -0
- package/template/components/product/product-selection.tsx +31 -0
- package/template/components/product/recommendations.tsx +26 -0
- package/template/components/product/review-list.tsx +159 -0
- package/template/components/product/reviews.tsx +80 -0
- package/template/components/product/variant-picker.tsx +75 -0
- package/template/components/product-card.tsx +103 -0
- package/template/components/product-grid.tsx +27 -57
- package/template/components/quick-add.tsx +62 -0
- package/template/components/search/predictive-search.tsx +282 -0
- package/template/components/sections/announcement-bar.tsx +1 -1
- package/template/components/sections/banner.tsx +1 -1
- package/template/components/sections/collections.tsx +50 -13
- package/template/components/sections/deal-of-day.tsx +2 -2
- package/template/components/sections/product-shelves.tsx +13 -5
- package/template/components/sections/shoppable-stories.tsx +2 -2
- package/template/components/sections/store-reviews.tsx +10 -4
- package/template/components/share-button.tsx +42 -0
- package/template/components/ui/accordion.tsx +35 -0
- package/template/components/ui/badge.tsx +20 -0
- package/template/components/ui/breadcrumbs.tsx +31 -0
- package/template/components/ui/button.tsx +90 -0
- package/template/components/ui/drawer.tsx +84 -0
- package/template/components/ui/empty-state.tsx +27 -0
- package/template/components/ui/field.tsx +33 -0
- package/template/components/ui/icon.tsx +112 -0
- package/template/components/ui/price.tsx +35 -0
- package/template/components/ui/quantity-stepper.tsx +91 -0
- package/template/components/ui/rating.tsx +48 -0
- package/template/components/ui/skeleton.tsx +46 -0
- package/template/components/wishlist/wishlist-view.tsx +134 -0
- package/template/lib/article-outline.ts +35 -0
- package/template/lib/catalog-params.ts +170 -0
- package/template/lib/contacts.ts +34 -0
- package/template/lib/errors.ts +29 -0
- package/template/lib/i18n.ts +484 -0
- package/template/lib/menu.ts +70 -0
- package/template/lib/theme-settings.ts +36 -0
- package/template/lib/upstream.ts +21 -0
- package/template/llms.txt +13 -0
- package/template/theme/index.ts +7 -1
- package/template/theme/sections/collapsible-content.tsx +75 -0
- package/template/theme/sections/collection-list.tsx +32 -4
- package/template/theme/sections/featured-collection.tsx +22 -2
- package/template/theme/sections/hero.tsx +94 -7
- package/template/theme/sections/image-with-text.tsx +19 -3
- package/template/theme/sections/multicolumn.tsx +113 -0
- package/template/theme/sections/page-content.tsx +10 -4
- package/template/theme/sections/product-shelf.tsx +26 -4
- package/template/theme/sections/rich-text.tsx +13 -1
- package/template/theme/sections/testimonials.tsx +14 -9
- package/template/theme/settings.ts +85 -1
- package/template/theme/templates/index.json +4 -2
- package/template/.screenshots/home-1280.png +0 -0
- package/template/.screenshots/home-390.png +0 -0
- package/template/.screenshots/home-filled-1280.png +0 -0
- package/template/.screenshots/home-filled-390.png +0 -0
- package/template/.screenshots/page-1280.png +0 -0
- package/template/components/buy-box.tsx +0 -89
- package/template/components/cart-link.tsx +0 -15
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* Elements without classes: type, links, form controls, focus. */
|
|
2
|
+
@layer base {
|
|
3
|
+
html {
|
|
4
|
+
scroll-padding-top: calc(var(--header-h) + var(--space-4));
|
|
5
|
+
}
|
|
6
|
+
body {
|
|
7
|
+
min-height: 100dvh;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
font-size: var(--text-base);
|
|
11
|
+
line-height: var(--leading-normal);
|
|
12
|
+
background: var(--bg);
|
|
13
|
+
color: var(--fg);
|
|
14
|
+
-webkit-font-smoothing: antialiased;
|
|
15
|
+
}
|
|
16
|
+
html[data-telegram] body {
|
|
17
|
+
/* Telegram's stable viewport (the sheet can be dragged), the dynamic viewport outside it. */
|
|
18
|
+
min-height: var(--tg-viewport-stable-height, 100dvh);
|
|
19
|
+
padding-left: max(env(safe-area-inset-left), var(--tg-safe-area-inset-left, 0px));
|
|
20
|
+
padding-right: max(env(safe-area-inset-right), var(--tg-safe-area-inset-right, 0px));
|
|
21
|
+
padding-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
h1,
|
|
25
|
+
h2,
|
|
26
|
+
h3,
|
|
27
|
+
h4 {
|
|
28
|
+
font-family: var(--font-heading);
|
|
29
|
+
font-weight: var(--weight-heading);
|
|
30
|
+
line-height: var(--leading-tight);
|
|
31
|
+
letter-spacing: -0.01em;
|
|
32
|
+
text-wrap: balance;
|
|
33
|
+
}
|
|
34
|
+
h1 {
|
|
35
|
+
font-size: var(--text-3xl);
|
|
36
|
+
}
|
|
37
|
+
h2 {
|
|
38
|
+
font-size: var(--text-2xl);
|
|
39
|
+
}
|
|
40
|
+
h3 {
|
|
41
|
+
font-size: var(--text-lg);
|
|
42
|
+
line-height: var(--leading-snug);
|
|
43
|
+
}
|
|
44
|
+
p {
|
|
45
|
+
text-wrap: pretty;
|
|
46
|
+
}
|
|
47
|
+
a {
|
|
48
|
+
color: inherit;
|
|
49
|
+
text-underline-offset: 0.2em;
|
|
50
|
+
text-decoration-thickness: 1px;
|
|
51
|
+
}
|
|
52
|
+
s {
|
|
53
|
+
text-decoration-thickness: 1px;
|
|
54
|
+
}
|
|
55
|
+
hr {
|
|
56
|
+
border: 0;
|
|
57
|
+
border-top: 1px solid var(--line);
|
|
58
|
+
margin: var(--space-5) 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:focus-visible {
|
|
62
|
+
outline: 2px solid var(--fg);
|
|
63
|
+
outline-offset: 2px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Bare controls get a calm default; .button and the form components refine them. */
|
|
67
|
+
button {
|
|
68
|
+
min-height: 44px;
|
|
69
|
+
padding: 0 var(--space-4);
|
|
70
|
+
border: 1px solid var(--line-strong);
|
|
71
|
+
border-radius: var(--radius-sm);
|
|
72
|
+
background: var(--surface);
|
|
73
|
+
color: var(--fg);
|
|
74
|
+
transition:
|
|
75
|
+
background-color var(--duration-fast) var(--ease),
|
|
76
|
+
border-color var(--duration-fast) var(--ease);
|
|
77
|
+
}
|
|
78
|
+
button:disabled {
|
|
79
|
+
opacity: 0.5;
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
}
|
|
82
|
+
button[aria-pressed='true'] {
|
|
83
|
+
border-color: var(--fg);
|
|
84
|
+
box-shadow: inset 0 0 0 1px var(--fg);
|
|
85
|
+
}
|
|
86
|
+
input:not([type='checkbox'], [type='radio'], [type='range']),
|
|
87
|
+
select,
|
|
88
|
+
textarea {
|
|
89
|
+
width: 100%;
|
|
90
|
+
min-height: 44px;
|
|
91
|
+
padding: var(--space-2) var(--space-3);
|
|
92
|
+
/* 16px at least: smaller makes iOS zoom into the field. */
|
|
93
|
+
font-size: max(var(--text-base), 16px);
|
|
94
|
+
background: var(--surface);
|
|
95
|
+
color: var(--fg);
|
|
96
|
+
border: 1px solid var(--line-strong);
|
|
97
|
+
border-radius: var(--radius-sm);
|
|
98
|
+
}
|
|
99
|
+
input:focus-visible,
|
|
100
|
+
select:focus-visible,
|
|
101
|
+
textarea:focus-visible {
|
|
102
|
+
outline: 2px solid var(--fg);
|
|
103
|
+
outline-offset: 0;
|
|
104
|
+
border-color: var(--fg);
|
|
105
|
+
}
|
|
106
|
+
input::placeholder,
|
|
107
|
+
textarea::placeholder {
|
|
108
|
+
color: var(--muted);
|
|
109
|
+
}
|
|
110
|
+
input[type='checkbox'],
|
|
111
|
+
input[type='radio'] {
|
|
112
|
+
width: 1.125rem;
|
|
113
|
+
height: 1.125rem;
|
|
114
|
+
margin: 0;
|
|
115
|
+
accent-color: var(--fg);
|
|
116
|
+
}
|
|
117
|
+
label {
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
}
|
|
120
|
+
table {
|
|
121
|
+
width: 100%;
|
|
122
|
+
border-collapse: collapse;
|
|
123
|
+
}
|
|
124
|
+
td,
|
|
125
|
+
th {
|
|
126
|
+
padding: var(--space-3) var(--space-2);
|
|
127
|
+
border-bottom: 1px solid var(--line);
|
|
128
|
+
text-align: start;
|
|
129
|
+
vertical-align: middle;
|
|
130
|
+
}
|
|
131
|
+
blockquote {
|
|
132
|
+
margin: 0;
|
|
133
|
+
}
|
|
134
|
+
progress {
|
|
135
|
+
width: 100%;
|
|
136
|
+
accent-color: var(--accent);
|
|
137
|
+
}
|
|
138
|
+
}
|