@eldrajs/theme-cli 0.2.7 → 0.2.9

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 (169) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/package.json +3 -3
  3. package/template/.eldra/block-types.d.ts +28 -7
  4. package/template/.eldra/manifest.json +1152 -445
  5. package/template/.eldra/previews.json +35 -35
  6. package/template/README.md +32 -0
  7. package/template/app/assets/main.css +23 -0
  8. package/template/app/plugins/eldra-storefront.ts +3 -0
  9. package/template/app/storefront/demo.ts +75 -24
  10. package/template/app/storefront/gateway.ts +16 -2
  11. package/template/blocks/announcement-bar/preview.png +0 -0
  12. package/template/blocks/article/preview.json +4 -4
  13. package/template/blocks/article/preview.png +0 -0
  14. package/template/blocks/article-list/Block.vue +48 -19
  15. package/template/blocks/article-list/__tests__/Block.spec.ts +15 -0
  16. package/template/blocks/article-list/preview.json +43 -43
  17. package/template/blocks/article-list/preview.png +0 -0
  18. package/template/blocks/breadcrumbs/preview.png +0 -0
  19. package/template/blocks/cart/preview.png +0 -0
  20. package/template/blocks/collection-grid/Block.vue +260 -9
  21. package/template/blocks/collection-grid/__tests__/Block.spec.ts +202 -0
  22. package/template/blocks/collection-grid/block.json +3 -3
  23. package/template/blocks/collection-grid/preview.png +0 -0
  24. package/template/blocks/collection-header/Block.vue +65 -52
  25. package/template/blocks/collection-header/preview.json +4 -4
  26. package/template/blocks/collection-header/preview.png +0 -0
  27. package/template/blocks/contact/preview.png +0 -0
  28. package/template/blocks/cta/preview.json +4 -4
  29. package/template/blocks/cta/preview.png +0 -0
  30. package/template/blocks/faq/preview.png +0 -0
  31. package/template/blocks/feature-grid/Block.vue +73 -4
  32. package/template/blocks/feature-grid/__tests__/Block.spec.ts +43 -1
  33. package/template/blocks/feature-grid/block.json +2 -2
  34. package/template/blocks/feature-grid/preview.json +49 -24
  35. package/template/blocks/feature-grid/preview.png +0 -0
  36. package/template/blocks/footer/Block.vue +186 -71
  37. package/template/blocks/footer/__tests__/Block.spec.ts +127 -32
  38. package/template/blocks/footer/block.json +42 -4
  39. package/template/blocks/footer/mock.json +31 -34
  40. package/template/blocks/footer/preview.png +0 -0
  41. package/template/blocks/form/preview.png +0 -0
  42. package/template/blocks/gallery/preview.json +24 -24
  43. package/template/blocks/gallery/preview.png +0 -0
  44. package/template/blocks/hero/Block.vue +117 -19
  45. package/template/blocks/hero/__tests__/Block.spec.ts +46 -0
  46. package/template/blocks/hero/block.json +36 -1
  47. package/template/blocks/hero/preview.json +33 -25
  48. package/template/blocks/hero/preview.png +0 -0
  49. package/template/blocks/image/preview.json +4 -4
  50. package/template/blocks/image/preview.png +0 -0
  51. package/template/blocks/logo-cloud/preview.png +0 -0
  52. package/template/blocks/navigation/Block.vue +665 -184
  53. package/template/blocks/navigation/__tests__/Block.spec.ts +496 -75
  54. package/template/blocks/navigation/__tests__/fixtures/menu.json +182 -0
  55. package/template/blocks/navigation/block.json +110 -6
  56. package/template/blocks/navigation/mock.json +372 -140
  57. package/template/blocks/navigation/preview.json +311 -0
  58. package/template/blocks/navigation/preview.png +0 -0
  59. package/template/blocks/newsletter/Block.vue +248 -144
  60. package/template/blocks/newsletter/__tests__/Block.spec.ts +42 -0
  61. package/template/blocks/newsletter/block.json +61 -2
  62. package/template/blocks/newsletter/preview.json +35 -0
  63. package/template/blocks/newsletter/preview.png +0 -0
  64. package/template/blocks/order-status/preview.png +0 -0
  65. package/template/blocks/pricing-table/preview.png +0 -0
  66. package/template/blocks/product-carousel/Block.vue +272 -26
  67. package/template/blocks/product-carousel/__tests__/Block.spec.ts +90 -0
  68. package/template/blocks/product-carousel/block.json +61 -0
  69. package/template/blocks/product-carousel/preview.json +12 -0
  70. package/template/blocks/product-carousel/preview.png +0 -0
  71. package/template/blocks/product-detail/Block.vue +148 -96
  72. package/template/blocks/product-detail/__tests__/Block.spec.ts +98 -74
  73. package/template/blocks/product-detail/block.json +11 -4
  74. package/template/blocks/product-detail/mock.json +53 -22
  75. package/template/blocks/product-detail/parts/Gallery.vue +52 -103
  76. package/template/blocks/product-detail/preview.png +0 -0
  77. package/template/blocks/quote/preview.png +0 -0
  78. package/template/blocks/rich-text/preview.png +0 -0
  79. package/template/blocks/search/Block.vue +1 -0
  80. package/template/blocks/search/TypeSection.vue +1 -0
  81. package/template/blocks/search/__tests__/Block.spec.ts +23 -0
  82. package/template/blocks/search/preview.png +0 -0
  83. package/template/blocks/split-content/Block.vue +98 -20
  84. package/template/blocks/split-content/__tests__/Block.spec.ts +57 -18
  85. package/template/blocks/split-content/block.json +72 -6
  86. package/template/blocks/split-content/preview.json +34 -13
  87. package/template/blocks/split-content/preview.png +0 -0
  88. package/template/blocks/stats/preview.png +0 -0
  89. package/template/blocks/tabs/preview.json +16 -16
  90. package/template/blocks/tabs/preview.png +0 -0
  91. package/template/blocks/team/preview.png +0 -0
  92. package/template/blocks/testimonials/preview.png +0 -0
  93. package/template/blocks/timeline/preview.png +0 -0
  94. package/template/blocks/trust-strip/Block.vue +67 -1
  95. package/template/blocks/trust-strip/__tests__/Block.spec.ts +30 -1
  96. package/template/blocks/trust-strip/block.json +4 -4
  97. package/template/blocks/trust-strip/preview.json +21 -0
  98. package/template/blocks/trust-strip/preview.png +0 -0
  99. package/template/blocks/video-embed/preview.png +0 -0
  100. package/template/blocks/wishlist/preview.png +0 -0
  101. package/template/i18n/en-US.json +16 -9
  102. package/template/i18n/is-IS.json +16 -9
  103. package/template/package.json +1 -1
  104. package/template/pages/article.page.json +19 -18
  105. package/template/pages/cart.page.json +3 -13
  106. package/template/pages/category.page.json +15 -7
  107. package/template/pages/collection.page.json +15 -14
  108. package/template/pages/home.page.json +217 -182
  109. package/template/pages/product.page.json +46 -36
  110. package/template/pages/products.page.json +3 -13
  111. package/template/pages/search.page.json +3 -13
  112. package/template/pages/wishlist.page.json +3 -13
  113. package/template/public/images/CREDITS.md +28 -0
  114. package/template/public/images/bowl.webp +0 -0
  115. package/template/public/images/clay-hands.webp +0 -0
  116. package/template/public/images/coffee-table.webp +0 -0
  117. package/template/public/images/cup.webp +0 -0
  118. package/template/public/images/enamel-cups.webp +0 -0
  119. package/template/public/images/hero.webp +0 -0
  120. package/template/public/images/kitchen.webp +0 -0
  121. package/template/public/images/mug.webp +0 -0
  122. package/template/public/images/northwind-mark.svg +1 -0
  123. package/template/public/images/planters.webp +0 -0
  124. package/template/public/images/plates.webp +0 -0
  125. package/template/public/images/reading.webp +0 -0
  126. package/template/public/images/sweater.webp +0 -0
  127. package/template/public/images/terracotta.webp +0 -0
  128. package/template/public/images/throws.webp +0 -0
  129. package/template/public/images/vase.webp +0 -0
  130. package/template/public/images/wheel.webp +0 -0
  131. package/template/public/images/yarn-tools.webp +0 -0
  132. package/template/public/images/yarn.webp +0 -0
  133. package/template/stories/generated/collection-grid.stories.ts +6 -0
  134. package/template/stories/generated/feature-grid.stories.ts +6 -0
  135. package/template/stories/generated/footer.stories.ts +4 -4
  136. package/template/stories/generated/hero.stories.ts +6 -0
  137. package/template/stories/generated/navigation.stories.ts +14 -1
  138. package/template/stories/generated/newsletter.stories.ts +2 -1
  139. package/template/stories/generated/product-carousel.stories.ts +12 -0
  140. package/template/stories/generated/split-content.stories.ts +12 -0
  141. package/template/stories/generated/trust-strip.stories.ts +8 -1
  142. package/template/stories/pages/article.stories.ts +2 -1
  143. package/template/stories/pages/cart.stories.ts +2 -1
  144. package/template/stories/pages/category.stories.ts +2 -1
  145. package/template/stories/pages/collection.stories.ts +2 -1
  146. package/template/stories/pages/home.stories.ts +2 -1
  147. package/template/stories/pages/product.stories.ts +2 -1
  148. package/template/stories/pages/products.stories.ts +2 -1
  149. package/template/stories/pages/search.stories.ts +2 -1
  150. package/template/stories/pages/wishlist.stories.ts +2 -1
  151. package/template/stories/support/demoChrome.ts +32 -0
  152. package/template/stories/support/pageBlocks.ts +2 -4
  153. package/template/test/countPill.browser.spec.ts +21 -13
  154. package/template/test/localePrefix.spec.ts +11 -6
  155. package/template/test/pages/article.spec.ts +1 -1
  156. package/template/test/pages/category.spec.ts +34 -11
  157. package/template/test/pages/collection.spec.ts +182 -148
  158. package/template/test/pages/home.spec.ts +35 -40
  159. package/template/test/pages/hydration.spec.ts +4 -4
  160. package/template/test/pages/product.spec.ts +17 -14
  161. package/template/test/pages/seededPages.spec.ts +11 -6
  162. package/template/test/prerenderFailure.spec.ts +4 -3
  163. package/template/test/prerenderRefresh.browser.spec.ts +36 -15
  164. package/template/test/previewParity.browser.spec.ts +1152 -0
  165. package/template/test/starter.spec.ts +37 -16
  166. package/template/test/storefront/gatewayPrerender.spec.ts +26 -0
  167. package/template/test/support/previewParity.ts +302 -0
  168. package/template/test/support/previewParityContent.ts +726 -0
  169. package/template/tokens.json +13 -13
@@ -1,45 +1,70 @@
1
1
  {
2
+ "heading": "Shop by category",
3
+ "intro": "",
4
+ "headLinkLabel": "All categories",
5
+ "headLinkHref": "/products",
2
6
  "columns": "3",
3
7
  "mediaType": "image",
4
8
  "items": [
5
9
  {
6
10
  "image": {
7
11
  "assetId": "demo-feature-1",
8
- "url": "/demo/feature-1.svg",
9
- "altText": "Merino wool being spun at the mill",
10
- "width": 800,
11
- "height": 600
12
+ "url": "/images/terracotta.webp",
13
+ "altText": "Handmade terracotta bowls and jugs",
14
+ "width": 1400,
15
+ "height": 933
12
16
  },
13
- "title": "Merino from Yorkshire",
14
- "text": "Mulesing-free wool, spun and dyed within 40 miles of the farm.",
15
- "linkLabel": "About our wool",
16
- "href": "/pages/wool"
17
+ "title": "Ceramics",
18
+ "text": "Mugs, bowls, vases",
19
+ "href": "/categories/home/ceramics"
17
20
  },
18
21
  {
19
22
  "image": {
20
23
  "assetId": "demo-feature-2",
21
- "url": "/demo/feature-2.svg",
22
- "altText": "Oregon clay on the wheel",
23
- "width": 800,
24
- "height": 600
24
+ "url": "/images/yarn-tools.webp",
25
+ "altText": "Yarn and knitting needles on a table",
26
+ "width": 1400,
27
+ "height": 933
25
28
  },
26
- "title": "Clay from Oregon",
27
- "text": "Thrown and fired in our Portland studio, lead-free glazes only.",
28
- "linkLabel": "About our clay",
29
- "href": "/pages/clay"
29
+ "title": "Knitwear",
30
+ "text": "Sweaters, throws and yarn",
31
+ "href": "/categories/knitwear"
30
32
  },
31
33
  {
32
34
  "image": {
33
35
  "assetId": "demo-feature-3",
34
- "url": "/demo/feature-3.svg",
35
- "altText": "Oak offcuts on a bench",
36
- "width": 800,
37
- "height": 600
36
+ "url": "/images/enamel-cups.webp",
37
+ "altText": "Enamel cups on a table",
38
+ "width": 1400,
39
+ "height": 933
38
40
  },
39
- "title": "Oak from Vermont",
40
- "text": "Offcuts from a furniture maker become boards, spoons and trivets.",
41
- "linkLabel": "About our oak",
42
- "href": "/pages/oak"
41
+ "title": "Tableware",
42
+ "text": "Cups, plates and platters",
43
+ "href": "/collections/the-winter-edit"
44
+ },
45
+ {
46
+ "image": {
47
+ "assetId": "demo-feature-4",
48
+ "url": "/images/reading.webp",
49
+ "altText": "A reader under a knitted throw",
50
+ "width": 1400,
51
+ "height": 933
52
+ },
53
+ "title": "Home",
54
+ "text": "Throws and cushions",
55
+ "href": "/categories/home"
56
+ },
57
+ {
58
+ "image": {
59
+ "assetId": "demo-feature-5",
60
+ "url": "/images/kitchen.webp",
61
+ "altText": "A laid kitchen table",
62
+ "width": 1400,
63
+ "height": 840
64
+ },
65
+ "title": "Kitchen",
66
+ "text": "Boards, jars and linen",
67
+ "href": "/categories/home/kitchen"
43
68
  }
44
69
  ]
45
70
  }
@@ -1,9 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  /**
3
- * Site footer (spec `eldra-starter-spec/02-blocks.md` lines 440–597). `variant`:
4
- * - `default`: brand (wordmark, description, social), link groups, an optional newsletter
5
- * sign-up. Legal row below a hairline, with the locale/currency selectors.
6
- * - `minimal`: brand, a flat row of links, social. Then the same legal row.
3
+ * Site footer (spec `eldra-starter-spec/02-blocks.md` lines 440–597, restyled to the Northwind
4
+ * design: a dark `primary` ground by default). `variant`:
5
+ * - `default`: brand (wordmark, optional description, the store's address, phone · email and
6
+ * opening hours, social), link groups as columns, an optional newsletter sign-up on a light card.
7
+ * Bottom bar below a hairline: the legal line and links, and the locale/currency selectors.
8
+ * - `minimal`: brand, a flat row of links, social. Then the same bottom bar.
7
9
  *
8
10
  * Editor hints (`EditorPlaceholder`, gated by `useEditing()`) cover the spec's three Footer
9
11
  * "States" rows — description, link groups, newsletter — on the `default` variant; see `editing`
@@ -20,17 +22,17 @@
20
22
  * client-side raw-SVG source to resolve one synchronously from). Wiring one in would mean either
21
23
  * forking `@eldrajs/ui`'s `Select` or hand-rolling a second, parallel icon-loading path outside
22
24
  * `useEldraIcon` for a purely decorative detail with no acceptance criterion or test coverage —
23
- * left out rather than doing either. The currency slot below renders its own "credit-card" icon
24
- * directly as an `EldraIcon` (not through `Select.leadingIcon`), so that constraint does not apply
25
- * to it.
25
+ * left out rather than doing either. The single-currency slot is the design's "Currency USD $"
26
+ * line: a visible label and the store's currency, no icon.
26
27
  *
27
28
  * Every group/flat/legal destination is a `link` value — a collection, product, page or entry the
28
29
  * platform knows, or an external URL — resolved once through `useEldraLink()`. A row whose target
29
30
  * has been deleted, or that the site has no route for, keeps its label and renders as plain text
30
31
  * rather than a dead anchor; a row with no label renders nothing. A same-site path routes through
31
- * `EldraRouterLink` (see `app/utils/links.ts`). `tone="muted"` + `:underline="false"` is the
32
- * spec's tertiary link, turning `text` with an underline only on hover; legal links keep the
33
- * package's own underline-at-rest default (spec: "always underlined").
32
+ * `EldraRouterLink` (see `app/utils/links.ts`). Column and flat links are `:underline="false"`
33
+ * (a list of links, not links in running text), underlined on hover; the phone and email links sit
34
+ * in a line of text and the legal links keep the package's own underline-at-rest default (spec:
35
+ * "always underlined").
34
36
  *
35
37
  * The locale selector is **not** CMS content, and it is not a theme constant either: its options are
36
38
  * the organisation's own content locales (`useEldraLocale().supported`, read once at build onto the
@@ -128,12 +130,75 @@ const uiLocale = useEldraUiLocale();
128
130
  const headingId = `footer-heading-${useUiId()}`;
129
131
 
130
132
  const variant = computed(() => data.value.variant ?? 'default');
131
- const background = computed(() => data.value.background ?? 'surface-strong');
133
+ /**
134
+ * The Northwind design is a dark footer: the `primary` ground with light text. That is the look an
135
+ * unset field gets; `surface-strong` stays available for a theme that wants a light footer.
136
+ */
137
+ const background = computed(() => data.value.background ?? 'primary');
138
+
139
+ /**
140
+ * The colours this block writes itself, per ground. `@eldrajs/ui`'s `Link` and `Button` invert on a
141
+ * primary `Section` on their own (`section-primary:`); plain text, rules and the select trigger do
142
+ * not, so each one is picked here. Every pair clears WCAG AA: on primary, 85% of
143
+ * `primary-contrast` is about 8:1 and 75% about 6:1 against the ground; on `surface-strong` the
144
+ * `muted` role is about 5.6:1.
145
+ */
146
+ const TONES = {
147
+ primary: {
148
+ body: 'text-primary-contrast/85',
149
+ strong: 'text-primary-contrast',
150
+ heading: 'text-primary-contrast/75',
151
+ rule: 'border-primary-contrast/20',
152
+ ring: 'border-primary-contrast/40 hover:border-primary-contrast',
153
+ trigger:
154
+ 'bg-transparent text-primary-contrast border-primary-contrast/60 hover:border-primary-contrast',
155
+ chevron: 'text-primary-contrast/75',
156
+ pickerLabel: '[&>[data-part=label]]:text-primary-contrast/85',
157
+ },
158
+ 'surface-strong': {
159
+ body: 'text-muted',
160
+ strong: 'text-text',
161
+ heading: 'text-muted',
162
+ rule: 'border-border',
163
+ ring: 'border-border-strong hover:border-text',
164
+ trigger: undefined,
165
+ chevron: undefined,
166
+ pickerLabel: '[&>[data-part=label]]:text-muted',
167
+ },
168
+ } as const;
169
+ const tone = computed(() => TONES[background.value] ?? TONES.primary);
170
+ /** The bottom bar's selectors: an outlined, transparent trigger on the dark ground (the design's),
171
+ * the package's own light field on a light one. */
172
+ const selectClasses = computed(() =>
173
+ tone.value.trigger ? { trigger: tone.value.trigger, chevron: tone.value.chevron } : undefined
174
+ );
132
175
 
133
- /** Section spacing (spec "Footer" → Container/spacing): the shared `sm`/`md`/`lg` scale doesn't
176
+ /** Section spacing (the design's 4rem top, 2rem bottom): the shared `sm`/`md`/`lg` scale doesn't
134
177
  * carry these exact steps, so `spacing="none"` on `Section` and the padding is written here. */
135
- const paddingClass = computed(() =>
136
- variant.value === 'minimal' ? 'py-8' : 'pt-12 pb-6 @tablet:pt-16 @tablet:pb-8'
178
+ const paddingClass = computed(() => (variant.value === 'minimal' ? 'py-8' : 'pt-16 pb-8'));
179
+
180
+ /* ---------------------------------------------------------------------- */
181
+ /* Store details */
182
+ /* ---------------------------------------------------------------------- */
183
+
184
+ const address = computed(() => (data.value.address ?? '').trim());
185
+ const hours = computed(() => (data.value.hours ?? '').trim());
186
+ const phone = computed(() => (data.value.phone ?? '').trim());
187
+ const storeEmail = computed(() => (data.value.email ?? '').trim());
188
+ /**
189
+ * A `tel:` link only for a number with a digit in it — `safeHref` alone would let `tel:` with
190
+ * nothing after it through, an inert link. Same rule as the contact block's.
191
+ */
192
+ const telHref = computed(() => {
193
+ const digits = phone.value.replace(/[^\d+]/g, '');
194
+ return /\d/.test(digits) ? safeHref(`tel:${digits}`) : null;
195
+ });
196
+ const mailtoHref = computed(() =>
197
+ storeEmail.value === '' ? null : safeHref(`mailto:${storeEmail.value}`)
198
+ );
199
+ const hasContactLine = computed(() => phone.value !== '' || storeEmail.value !== '');
200
+ const hasStoreDetails = computed(
201
+ () => address.value !== '' || hasContactLine.value || hours.value !== ''
137
202
  );
138
203
 
139
204
  const resolveLink = useEldraLink();
@@ -211,7 +276,10 @@ const socialLinks = computed(() =>
211
276
 
212
277
  function socialLinkName(network: string): string {
213
278
  const key = SOCIAL_NAME_KEYS[network] ?? 'footer.social.instagram';
214
- return t('footer.socialLinkName', { brand: data.value.brandText, network: t(key) });
279
+ return t('footer.socialLinkName', {
280
+ brand: data.value.brandText,
281
+ network: t(key),
282
+ });
215
283
  }
216
284
 
217
285
  /**
@@ -234,7 +302,10 @@ const activeLocale = useEldraLocale();
234
302
  * of the site. The adapter resolves them once, on the server, and carries them to the browser.
235
303
  */
236
304
  const localeOptions = computed<SelectOption[]>(() =>
237
- activeLocale.supported.map((tag) => ({ value: tag, label: activeLocale.name(tag) }))
305
+ activeLocale.supported.map((tag) => ({
306
+ value: tag,
307
+ label: activeLocale.name(tag),
308
+ }))
238
309
  );
239
310
 
240
311
  /**
@@ -406,20 +477,22 @@ async function onNewsletterSubmit(payload: FormLayoutSubmitPayload): Promise<voi
406
477
  t('footer.title')
407
478
  }}</VisuallyHidden>
408
479
 
409
- <!-- Default variant: brand · link groups · newsletter -->
480
+ <!-- Default variant: brand and store details · link columns · optional newsletter.
481
+ Four columns from 1100px (brand 1.4fr), three below that with the brand on its own row,
482
+ two below 760px. -->
410
483
  <div
411
484
  v-if="variant === 'default'"
412
- class="@tablet:grid-cols-2 @content:grid-cols-[minmax(0,4fr)_minmax(0,5fr)_minmax(0,3.5fr)] @content:gap-12 grid gap-10"
485
+ class="grid grid-cols-2 gap-10 @min-[47.5rem]:grid-cols-3 @min-[68.75rem]:grid-cols-[minmax(0,1.4fr)_repeat(3,minmax(0,1fr))]"
413
486
  >
414
- <div class="max-w-[22rem]">
487
+ <div class="col-span-full min-w-0 @min-[68.75rem]:col-span-1">
415
488
  <Link
416
489
  href="/"
417
490
  :as="EldraRouterLink"
418
491
  variant="standalone"
419
492
  :underline="false"
420
- class="inline-flex items-center hover:no-underline active:no-underline"
493
+ class="mb-4 inline-flex max-w-full items-center hover:no-underline active:no-underline"
421
494
  :classes="{
422
- label: 'font-heading text-text text-xl leading-[1.2] font-bold tracking-[-0.015em]',
495
+ label: ['font-heading text-[2.5rem] leading-none font-medium', tone.strong].join(' '),
423
496
  }"
424
497
  >
425
498
  <img
@@ -432,27 +505,47 @@ async function onNewsletterSubmit(payload: FormLayoutSubmitPayload): Promise<voi
432
505
  />
433
506
  <template v-else>{{ data.brandText }}</template>
434
507
  </Link>
435
- <p v-if="data.description" class="text-muted mt-4 text-base leading-relaxed">
508
+ <p v-if="data.description" :class="['mb-3 text-base leading-relaxed', tone.body]">
436
509
  {{ data.description }}
437
510
  </p>
438
511
  <EditorPlaceholder
439
512
  v-else-if="editing"
440
513
  inline
441
- class="mt-4"
514
+ class="mb-3"
442
515
  :label="t('footer.descriptionHintLabel')"
443
516
  />
444
517
 
445
- <ul v-if="socialLinks.length > 0" class="mt-6 -ml-3 flex flex-wrap gap-1" role="list">
518
+ <div v-if="hasStoreDetails" :class="['space-y-1 text-base leading-relaxed', tone.body]">
519
+ <address v-if="address || hasContactLine" class="space-y-1 not-italic">
520
+ <p v-if="address">{{ address }}</p>
521
+ <p v-if="hasContactLine" class="flex flex-wrap items-baseline gap-x-2">
522
+ <template v-if="phone">
523
+ <Link v-if="telHref" :href="telHref">{{ phone }}</Link>
524
+ <span v-else>{{ phone }}</span>
525
+ </template>
526
+ <span v-if="phone && storeEmail" aria-hidden="true">·</span>
527
+ <template v-if="storeEmail">
528
+ <Link v-if="mailtoHref" :href="mailtoHref" class="break-all">{{
529
+ storeEmail
530
+ }}</Link>
531
+ <span v-else class="break-all">{{ storeEmail }}</span>
532
+ </template>
533
+ </p>
534
+ </address>
535
+ <p v-if="hours">{{ hours }}</p>
536
+ </div>
537
+
538
+ <ul v-if="socialLinks.length > 0" class="mt-5 flex flex-wrap gap-2" role="list">
446
539
  <li v-for="social in socialLinks" :key="social.network">
447
540
  <Button
448
541
  icon-only
449
- variant="ghost"
542
+ variant="outline"
450
543
  :href="social.href"
451
544
  :as="social.as"
452
545
  target="_blank"
453
546
  rel="noopener"
454
547
  :label="socialLinkName(social.network)"
455
- class="size-11"
548
+ :class="['size-11 rounded-full', tone.ring]"
456
549
  >
457
550
  <template #leadingIcon>
458
551
  <EldraIcon :name="social.icon" size="md" />
@@ -464,44 +557,56 @@ async function onNewsletterSubmit(payload: FormLayoutSubmitPayload): Promise<voi
464
557
 
465
558
  <EditorPlaceholder
466
559
  v-if="groups.length === 0 && editing"
467
- class="@tablet:col-span-2 @content:col-span-1"
560
+ class="col-span-full @min-[68.75rem]:col-span-3"
468
561
  :label="t('footer.groupsHintLabel')"
469
562
  :help="t('footer.groupsHintHelp')"
470
563
  />
564
+ <!-- One labelled `nav` over every column, laid on the parent grid's own tracks. -->
471
565
  <nav
472
566
  v-else-if="groups.length > 0"
473
567
  :aria-label="t('footer.nav')"
474
- class="@tablet:col-span-2 @content:col-span-1"
568
+ class="col-span-full grid grid-cols-subgrid gap-y-10 @min-[68.75rem]:col-span-3"
475
569
  >
476
- <div class="@content:grid-cols-3 grid grid-cols-2 gap-x-6 gap-y-8">
477
- <div v-for="(group, index) in groups" :key="index">
478
- <h3 class="text-text text-base font-semibold">{{ group.title }}</h3>
479
- <ul class="mt-2 space-y-1">
480
- <li v-for="(link, linkIndex) in group.links" :key="linkIndex">
481
- <Link
482
- v-if="link.href"
483
- :href="link.href"
484
- :as="link.as"
485
- tone="muted"
486
- :underline="false"
487
- class="inline-flex min-h-9 items-center text-base"
488
- >{{ link.label }}</Link
489
- >
490
- <span v-else class="text-muted inline-flex min-h-9 items-center text-base">{{
491
- link.label
492
- }}</span>
493
- </li>
494
- </ul>
495
- </div>
570
+ <div v-for="(group, index) in groups" :key="index" class="min-w-0">
571
+ <h3
572
+ :class="[
573
+ 'font-body mb-3.5 text-xs leading-normal font-bold tracking-[0.14em] uppercase',
574
+ tone.heading,
575
+ ]"
576
+ >
577
+ {{ group.title }}
578
+ </h3>
579
+ <ul class="grid gap-2" role="list">
580
+ <li v-for="(link, linkIndex) in group.links" :key="linkIndex">
581
+ <Link
582
+ v-if="link.href"
583
+ :href="link.href"
584
+ :as="link.as"
585
+ :underline="false"
586
+ class="text-base leading-relaxed"
587
+ >{{ link.label }}</Link
588
+ >
589
+ <span v-else :class="['text-base leading-relaxed', tone.body]">{{
590
+ link.label
591
+ }}</span>
592
+ </li>
593
+ </ul>
496
594
  </div>
497
595
  </nav>
498
596
 
499
597
  <EditorPlaceholder
500
598
  v-if="!showNewsletter && editing"
501
- class="@tablet:col-span-2 @content:col-span-1"
599
+ class="col-span-full"
502
600
  :label="t('footer.newsletterHintLabel')"
503
601
  />
504
- <div v-else-if="showNewsletter" class="@tablet:col-span-2 @content:col-span-1">
602
+ <!-- The sign-up sits on a light card of its own (`data-section="none"` stops the primary
603
+ ground's inversions inside it), so the form's own label, error and button colours are
604
+ the ones `@eldrajs/ui` draws on a light ground, whatever the footer's background. -->
605
+ <div
606
+ v-else-if="showNewsletter"
607
+ data-section="none"
608
+ class="bg-background text-text col-span-full rounded-xl p-6 @min-[47.5rem]:p-8"
609
+ >
505
610
  <template v-if="newsletterState !== 'success'">
506
611
  <FormLayout
507
612
  layout="inline"
@@ -572,9 +677,9 @@ async function onNewsletterSubmit(payload: FormLayoutSubmitPayload): Promise<voi
572
677
  :as="EldraRouterLink"
573
678
  variant="standalone"
574
679
  :underline="false"
575
- class="inline-flex items-center hover:no-underline active:no-underline"
680
+ class="inline-flex max-w-full items-center hover:no-underline active:no-underline"
576
681
  :classes="{
577
- label: 'font-heading text-text text-xl leading-[1.2] font-bold tracking-[-0.015em]',
682
+ label: ['font-heading text-[1.75rem] leading-none font-medium', tone.strong].join(' '),
578
683
  }"
579
684
  >
580
685
  <img
@@ -595,29 +700,28 @@ async function onNewsletterSubmit(payload: FormLayoutSubmitPayload): Promise<voi
595
700
  v-if="link.href"
596
701
  :href="link.href"
597
702
  :as="link.as"
598
- tone="muted"
599
703
  :underline="false"
600
704
  class="inline-flex min-h-9 items-center text-base"
601
705
  >{{ link.label }}</Link
602
706
  >
603
- <span v-else class="text-muted inline-flex min-h-9 items-center text-base">{{
707
+ <span v-else :class="['inline-flex min-h-9 items-center text-base', tone.body]">{{
604
708
  link.label
605
709
  }}</span>
606
710
  </li>
607
711
  </ul>
608
712
  </nav>
609
713
 
610
- <ul v-if="socialLinks.length > 0" class="flex flex-wrap gap-1" role="list">
714
+ <ul v-if="socialLinks.length > 0" class="flex flex-wrap gap-2" role="list">
611
715
  <li v-for="social in socialLinks" :key="social.network">
612
716
  <Button
613
717
  icon-only
614
- variant="ghost"
718
+ variant="outline"
615
719
  :href="social.href"
616
720
  :as="social.as"
617
721
  target="_blank"
618
722
  rel="noopener"
619
723
  :label="socialLinkName(social.network)"
620
- class="size-11"
724
+ :class="['size-11 rounded-full', tone.ring]"
621
725
  >
622
726
  <template #leadingIcon>
623
727
  <EldraIcon :name="social.icon" size="md" />
@@ -627,20 +731,23 @@ async function onNewsletterSubmit(payload: FormLayoutSubmitPayload): Promise<voi
627
731
  </ul>
628
732
  </div>
629
733
 
630
- <!-- Legal row -->
734
+ <!-- Bottom bar: legal line and links · selectors. Stacks below 760px. -->
631
735
  <div
632
736
  v-if="hasLegalRow"
633
- class="border-border text-muted @tablet:flex-row @tablet:items-center @tablet:justify-between mt-12 flex flex-col gap-4 border-t pt-6 text-[0.8125rem] leading-[1.4]"
737
+ :class="[
738
+ 'mt-12 flex flex-col items-start gap-4 border-t pt-6 text-sm leading-normal @min-[47.5rem]:flex-row @min-[47.5rem]:flex-wrap @min-[47.5rem]:items-center @min-[47.5rem]:justify-between',
739
+ tone.rule,
740
+ tone.body,
741
+ ]"
634
742
  >
635
- <div class="flex flex-wrap items-center gap-x-4 gap-y-2">
743
+ <div class="flex flex-wrap items-center gap-x-6 gap-y-2">
636
744
  <p v-if="data.legalText">{{ data.legalText }}</p>
637
- <ul v-if="legalLinks.length > 0" class="flex flex-wrap gap-x-4 gap-y-2" role="list">
745
+ <ul v-if="legalLinks.length > 0" class="flex flex-wrap gap-x-6 gap-y-2" role="list">
638
746
  <li v-for="(link, index) in legalLinks" :key="index">
639
747
  <Link
640
748
  v-if="link.href"
641
749
  :href="link.href"
642
750
  :as="link.as"
643
- tone="muted"
644
751
  class="inline-flex min-h-6 items-center"
645
752
  >{{ link.label }}</Link
646
753
  >
@@ -649,25 +756,31 @@ async function onNewsletterSubmit(payload: FormLayoutSubmitPayload): Promise<voi
649
756
  </ul>
650
757
  </div>
651
758
 
652
- <div v-if="hasSelectors" class="@tablet:flex-row @tablet:items-center flex flex-col gap-2">
759
+ <div v-if="hasSelectors" class="flex flex-wrap items-center gap-x-4 gap-y-2">
653
760
  <FieldWrapper
654
761
  v-if="showLocale"
655
762
  :label="t('footer.localeLabel')"
656
- class="@tablet:w-auto w-full"
763
+ class="w-auto"
657
764
  :classes="{ label: 'sr-only' }"
658
765
  >
659
766
  <!-- Not `searchable`: a store has a handful of content locales, and a search field
660
767
  over three options is one more thing between a visitor and their language. -->
661
- <Select v-model="locale" :options="localeOptions" placement="above" />
768
+ <Select
769
+ v-model="locale"
770
+ :options="localeOptions"
771
+ placement="above"
772
+ :classes="selectClasses"
773
+ />
662
774
  </FieldWrapper>
663
775
  <!-- One currency is plain text: there is nothing to pick. -->
664
776
  <p
665
777
  v-if="showCurrencySelector && currencyCodes.length === 1"
666
- class="text-text @tablet:w-auto flex w-full items-center gap-1.5 text-[0.8125rem] font-medium"
778
+ class="flex items-center gap-2"
667
779
  >
668
- <EldraIcon name="credit-card" size="sm" class="text-muted shrink-0" />
669
- <VisuallyHidden>{{ t('footer.currencyLabel') }}</VisuallyHidden>
670
- {{ currencyLabel(currencyCodes[0]!, uiLocale) }}
780
+ <span>{{ t('footer.currencyLabel') }}</span>
781
+ <span :class="['font-medium', tone.strong]">{{
782
+ currencyLabel(currencyCodes[0]!, uiLocale)
783
+ }}</span>
671
784
  </p>
672
785
  <CurrencyPicker
673
786
  v-else-if="showCurrencySelector"
@@ -675,9 +788,11 @@ async function onNewsletterSubmit(payload: FormLayoutSubmitPayload): Promise<voi
675
788
  :model-value="currencyStore.active.value"
676
789
  :busy="currencyStore.busy.value"
677
790
  :label="t('footer.currencyLabel')"
678
- size="md"
791
+ show-label
792
+ size="sm"
679
793
  placement="above"
680
- class="@tablet:w-auto w-full"
794
+ :class="['flex items-center gap-2', tone.pickerLabel]"
795
+ :classes="selectClasses"
681
796
  @update:model-value="currencyStore.choose"
682
797
  />
683
798
  </div>