@revenexx/cover 0.22.0 → 0.22.1

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 (91) hide show
  1. package/app/api/categories.ts +1 -0
  2. package/app/api/offers.ts +1 -0
  3. package/app/app.config.ts +13 -0
  4. package/app/components/OgImage/CoverPage.takumi.vue +37 -0
  5. package/app/components/RevenexxForm.vue +21 -6
  6. package/app/components/account/approvals/AccountPendingApprovals.vue +19 -1
  7. package/app/components/account/approvals/AccountPendingOrderDetail.vue +3 -0
  8. package/app/components/account/carts/AccountCartsTable.vue +11 -1
  9. package/app/components/account/orderlists/AccountOrderListDetail.vue +32 -3
  10. package/app/components/account/organization/AccountOrganization.vue +1 -1
  11. package/app/components/auth/AuthForgotPasswordPanel.vue +7 -2
  12. package/app/components/auth/AuthLoginPanel.vue +23 -8
  13. package/app/components/auth/AuthRegisterTeaser.vue +1 -1
  14. package/app/components/cart/position/CartPosition.vue +11 -4
  15. package/app/components/cart/quickadd/CartQuickAdd.vue +4 -2
  16. package/app/components/cart/recommend/CartRecommendCard.vue +1 -0
  17. package/app/components/cart/switcher/CartSwitcher.vue +1 -0
  18. package/app/components/cart/view/CartListHeader.vue +5 -0
  19. package/app/components/cart/view/CartSummaryPanel.vue +7 -2
  20. package/app/components/cart/view/CartView.vue +4 -2
  21. package/app/components/checkout/onepage/CheckoutGate.vue +4 -2
  22. package/app/components/checkout/onepage/CheckoutGuestDetailsSection.vue +2 -1
  23. package/app/components/checkout/onepage/CheckoutPaymentSection.vue +1 -1
  24. package/app/components/layout/header/LocaleSwitcher.vue +7 -9
  25. package/app/components/product/detail/ProductDetailAddToCart.vue +17 -11
  26. package/app/components/product/detail/ProductDetailImageGallery.vue +101 -8
  27. package/app/components/product/detail/ProductDetailVariantRow.vue +84 -4
  28. package/app/components/product/detail/ProductDetailVariants.vue +75 -11
  29. package/app/components/product/detail/ProductDetailView.vue +64 -69
  30. package/app/composables/useAuthStore.ts +21 -4
  31. package/app/composables/useCategories.ts +24 -0
  32. package/app/composables/useCategoryAnswer.ts +30 -0
  33. package/app/composables/useCategorySeo.ts +62 -0
  34. package/app/composables/useDefaultUiLanguage.ts +14 -0
  35. package/app/composables/useOgImageReady.ts +16 -0
  36. package/app/composables/useProductAnswer.ts +121 -0
  37. package/app/composables/useProductLocales.ts +21 -10
  38. package/app/composables/useProductSeo.ts +145 -0
  39. package/app/composables/useRouteSubject.ts +23 -3
  40. package/app/composables/useSeoContext.ts +164 -0
  41. package/app/composables/useSeoHead.ts +189 -0
  42. package/app/composables/useSeoRules.ts +23 -0
  43. package/app/interfaces/seo.ts +48 -0
  44. package/app/layouts/default.vue +2 -8
  45. package/app/layouts/focus.vue +3 -1
  46. package/app/payments/psp/novalnet.ts +25 -3
  47. package/app/payments/psp/novalnetStyle.ts +186 -0
  48. package/app/shared/categoryTree.ts +7 -0
  49. package/app/shared/locale.ts +8 -0
  50. package/app/shared/productLocales.ts +62 -1
  51. package/app/shared/seoRules.ts +297 -0
  52. package/app/shared/structuredData.ts +104 -0
  53. package/i18n/locales/de/account.json +4 -0
  54. package/i18n/locales/de/common.json +6 -0
  55. package/i18n/locales/de/pages.json +109 -0
  56. package/i18n/locales/en/account.json +4 -0
  57. package/i18n/locales/en/common.json +6 -0
  58. package/i18n/locales/en/pages.json +109 -0
  59. package/nuxt.config.ts +140 -1
  60. package/package.json +10 -3
  61. package/server/api/auth/otp.post.ts +4 -8
  62. package/server/api/auth/otp.put.ts +20 -11
  63. package/server/api/categories/[slug]/exists.get.ts +28 -0
  64. package/server/api/offers/guest.get.ts +53 -0
  65. package/server/api/orders/index.post.ts +1 -11
  66. package/server/api/payment/methods.post.ts +2 -33
  67. package/server/api/product/[id]/locales.get.ts +9 -3
  68. package/server/data/product-detail.json +0 -20
  69. package/server/dev/errorHandler.ts +9 -5
  70. package/server/dev/typesense/autoSeed.ts +63 -0
  71. package/server/dev/typesense/seed.ts +4 -43
  72. package/server/dev/typesense/seedProducts.ts +87 -0
  73. package/server/interfaces/category.ts +5 -0
  74. package/server/interfaces/product.ts +13 -6
  75. package/server/middleware/missing-media.ts +2 -2
  76. package/server/plugins/previewHostNoindex.ts +21 -0
  77. package/server/plugins/seoSiteConfig.ts +62 -0
  78. package/server/routes/robots.txt.ts +21 -0
  79. package/server/services/ApiCategoryService.ts +6 -0
  80. package/server/services/ApiProductService.ts +2 -2
  81. package/server/services/LocalFileCategoryService.ts +6 -0
  82. package/server/utils/liveCatalog.ts +83 -18
  83. package/server/utils/livePrices.ts +12 -3
  84. package/server/utils/locale.ts +3 -8
  85. package/server/utils/offerService.ts +8 -3
  86. package/server/utils/paymentOptions.ts +49 -0
  87. package/server/utils/promotionsService.ts +25 -0
  88. package/server/utils/revenexxSdk.ts +7 -1
  89. package/server/utils/seoRequestHost.ts +21 -0
  90. package/server/utils/storefrontMessages.ts +5 -5
  91. package/server/utils/storefrontSeoRules.ts +298 -0
@@ -1,4 +1,5 @@
1
1
  export const categoriesApi = {
2
2
  list: () => "/api/categories",
3
3
  subcategories: (slug: string) => `/api/categories/${slug}/subcategories`,
4
+ exists: (slug: string) => `/api/categories/${encodeURIComponent(slug)}/exists`,
4
5
  };
package/app/api/offers.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export const offersApi = {
2
2
  resolve: () => "/api/offers",
3
+ guest: () => "/api/offers/guest",
3
4
  };
package/app/app.config.ts CHANGED
@@ -50,6 +50,10 @@ export default defineAppConfig({
50
50
  // through transpose and merged over the theme's locale files. Mock reads
51
51
  // nothing, so the demo shows the theme's texts; a theme switches it to "api".
52
52
  translationsService: "mock",
53
+ // The domain's SEO rules from the seo service (PE-1235): canonical, robots,
54
+ // hreflang, title patterns. Mock reads nothing and applies the service's
55
+ // defaults for the host; a theme switches it to "api".
56
+ seoService: "mock",
53
57
  // The marketing apps (RAD-293): the newsletter confirmation and preference
54
58
  // centre (marketing-consents), the review form (reviews), the loyalty page
55
59
  // and perk hint (loyalty), audiences for personalised content and campaign
@@ -171,5 +175,14 @@ export default defineAppConfig({
171
175
  // the write itself; the shop reads it and offers accordingly.
172
176
  ui: {
173
177
  icons: nuxtUiIcons(DEFAULT_ICON_WEIGHT),
178
+ // Breadcrumb links are 20 px tall text. Below lg each gets an invisible
179
+ // 44 px tap area (PO-23 touch-target rule); the row itself keeps its
180
+ // height, so nothing moves. Desktop is pointer-driven and stays as is.
181
+ breadcrumb: {
182
+ slots: {
183
+ link: "relative max-lg:after:absolute max-lg:after:inset-x-0 "
184
+ + "max-lg:after:top-[calc((100%_-_2.75rem)/2)] max-lg:after:bottom-[calc((100%_-_2.75rem)/2)]",
185
+ },
186
+ },
174
187
  },
175
188
  });
@@ -0,0 +1,37 @@
1
+ <script setup lang="ts">
2
+ /**
3
+ * The link preview card of a page without a picture of its own (PE-1237):
4
+ * the site's name and what kind of page it is. nuxt-og-image renders it to a
5
+ * PNG with Takumi; `components/OgImage/` and the `.takumi` suffix are the
6
+ * module's convention. Every value comes in through the props, which are part
7
+ * of the image URL — so a cached image can never be another tenant's.
8
+ */
9
+ const { site = "Cover", label = "" } = defineProps<{ site?: string; label?: string }>();
10
+ </script>
11
+
12
+ <template>
13
+ <div
14
+ class="w-full h-full flex flex-col justify-between bg-white"
15
+ style="padding: 80px; color: #0f172a;"
16
+ >
17
+ <div
18
+ class="flex"
19
+ style="width: 120px; height: 8px; background: #0f172a;"
20
+ />
21
+ <div class="flex flex-col">
22
+ <div
23
+ class="flex font-bold"
24
+ style="font-size: 76px; line-height: 1.1;"
25
+ >
26
+ {{ site }}
27
+ </div>
28
+ <div
29
+ v-if="label"
30
+ class="flex"
31
+ style="font-size: 40px; margin-top: 24px; color: #475569;"
32
+ >
33
+ {{ label }}
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </template>
@@ -4,6 +4,7 @@ import type { FormKitSchemaDefinition } from "@formkit/core";
4
4
  import { getNode } from "@formkit/core";
5
5
 
6
6
  import { formsApi } from "../api/forms";
7
+ import { REQUIRED_MARK, REQUIRED_MARK_LEADING } from "../config/forms";
7
8
 
8
9
  /**
9
10
  * Renders a form built in the Cockpit (the `forms` app) by its slug, using the
@@ -148,12 +149,6 @@ function validationRules(node: Record<string, unknown>): string[] {
148
149
  return typeof rules === "string" ? rules.split("|").map(rule => rule.trim()) : [];
149
150
  }
150
151
 
151
- // A red asterisk after the label (or a radio group's legend) of a field the
152
- // visitor cannot leave out — before it on a checkbox, whose label is a whole
153
- // sentence. Pseudo-content, so the label text stays the authored one.
154
- const REQUIRED_MARK = "after:content-['*'] after:ml-0.5 after:text-error";
155
- const REQUIRED_MARK_LEADING = "before:content-['*'] before:mr-0.5 before:text-error";
156
-
157
152
  /**
158
153
  * The value a field holds right now — the live form once it exists, before that
159
154
  * (and during SSR) the pre-fill or the schema's own default.
@@ -267,6 +262,21 @@ const activeStepValid = computed(() => {
267
262
  });
268
263
  });
269
264
 
265
+ /**
266
+ * The top of the form. A new step or the thank-you card replaces the one the
267
+ * visitor scrolled through, so after "Weiter", "Zurück" or submit the page would
268
+ * otherwise stay where the old card's buttons were — on a phone often below the
269
+ * start of the new card. Scrolls only when the top is out of view above.
270
+ */
271
+ const top = ref<HTMLElement | null>(null);
272
+ watch([stepIndex, submitted], async () => {
273
+ await nextTick();
274
+ const el = top.value;
275
+ if (!el || el.getBoundingClientRect().top >= 0) return;
276
+ const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
277
+ el.scrollIntoView({ block: "start", behavior: reduce ? "auto" : "smooth" });
278
+ });
279
+
270
280
  function next() {
271
281
  if (activeStepValid.value && !isLastStep.value) stepIndex.value += 1;
272
282
  }
@@ -315,6 +325,11 @@ async function onSubmit(values: Record<string, unknown>) {
315
325
  </script>
316
326
 
317
327
  <template>
328
+ <div
329
+ ref="top"
330
+ class="scroll-mt-[calc(var(--ui-header-height,0px)+1rem)]"
331
+ aria-hidden="true"
332
+ />
318
333
  <div
319
334
  v-if="pending"
320
335
  class="flex justify-center py-8"
@@ -109,7 +109,7 @@ async function submitDecline(): Promise<void> {
109
109
  <p class="text-sm font-medium text-highlighted">
110
110
  <NuxtLink
111
111
  :to="localePath(`/account/approvals/orders/${approval.id}`)"
112
- class="hover:underline"
112
+ class="hover:underline max-lg:inline-flex max-lg:min-h-11 max-lg:items-center max-lg:-my-3"
113
113
  >
114
114
  {{ t('approvals.queue.order', { number: approval.id }) }}
115
115
  </NuxtLink>
@@ -150,13 +150,27 @@ async function submitDecline(): Promise<void> {
150
150
  size="sm"
151
151
  color="neutral"
152
152
  variant="ghost"
153
+ class="max-lg:min-h-11"
153
154
  :to="localePath(`/account/approvals/orders/${approval.id}`)"
154
155
  :label="t('approvals.queue.review')"
155
156
  />
157
+ <!-- Requests have no page of their own. The invisible twin keeps
158
+ their figure in line with the orders' from md up, where the row
159
+ is one line; below md the buttons wrap onto their own line. -->
160
+ <UButton
161
+ v-else
162
+ size="sm"
163
+ variant="ghost"
164
+ class="invisible hidden md:inline-flex"
165
+ aria-hidden="true"
166
+ tabindex="-1"
167
+ :label="t('approvals.queue.review')"
168
+ />
156
169
  <UButton
157
170
  size="sm"
158
171
  color="neutral"
159
172
  variant="outline"
173
+ class="max-lg:min-h-11"
160
174
  :disabled="deciding === approval.id"
161
175
  :label="t('approvals.queue.decline')"
162
176
  @click="declineFor = approval"
@@ -164,6 +178,7 @@ async function submitDecline(): Promise<void> {
164
178
  <UButton
165
179
  size="sm"
166
180
  color="primary"
181
+ class="max-lg:min-h-11"
167
182
  :loading="deciding === approval.id"
168
183
  :label="t('approvals.queue.approve')"
169
184
  @click="approve(approval)"
@@ -177,6 +192,7 @@ async function submitDecline(): Promise<void> {
177
192
  <UModal
178
193
  :open="declineFor !== null"
179
194
  :title="declineFor?.kind === 'order' ? t('approvals.queue.declineOrderTitle') : t('approvals.queue.declineTitle')"
195
+ :close="{ class: 'max-lg:size-11 max-lg:justify-center' }"
180
196
  @update:open="(open: boolean) => { if (!open) declineFor = null; }"
181
197
  >
182
198
  <template #body>
@@ -203,11 +219,13 @@ async function submitDecline(): Promise<void> {
203
219
  <UButton
204
220
  color="neutral"
205
221
  variant="ghost"
222
+ class="max-lg:min-h-11"
206
223
  :label="t('cart.item.cancel')"
207
224
  @click="declineFor = null"
208
225
  />
209
226
  <UButton
210
227
  color="error"
228
+ class="max-lg:min-h-11"
211
229
  :disabled="reasonMissing"
212
230
  :label="t('approvals.queue.decline')"
213
231
  @click="submitDecline"
@@ -115,6 +115,7 @@ async function settle(decision: "approve" | "decline"): Promise<void> {
115
115
  <UModal
116
116
  v-model:open="rejectOpen"
117
117
  :title="t('approvals.queue.declineOrderTitle')"
118
+ :close="{ class: 'max-lg:size-11 max-lg:justify-center' }"
118
119
  >
119
120
  <template #body>
120
121
  <div class="space-y-4">
@@ -139,11 +140,13 @@ async function settle(decision: "approve" | "decline"): Promise<void> {
139
140
  <UButton
140
141
  color="neutral"
141
142
  variant="ghost"
143
+ class="max-lg:min-h-11"
142
144
  :label="t('cart.item.cancel')"
143
145
  @click="rejectOpen = false"
144
146
  />
145
147
  <UButton
146
148
  color="error"
149
+ class="max-lg:min-h-11"
147
150
  :disabled="!rejectReason.trim()"
148
151
  :loading="deciding === orderNumber"
149
152
  :label="t('approvals.queue.decline')"
@@ -17,7 +17,17 @@ const cart = useCartStore();
17
17
  const { settings } = useB2BContext();
18
18
  const { isPunchout } = usePunchoutVisit();
19
19
  const { formatCurrency } = useCartSummaryFormatting();
20
- const { tableUi } = useDataTable();
20
+ const { tableUi: baseTableUi } = useDataTable();
21
+ /**
22
+ * At the narrowest desktop width (1024 px, beside the account nav) six columns
23
+ * with 16 px cell padding were 20 px wider than the room and "Zuletzt
24
+ * geändert" broke onto two lines. Tighter padding up to xl, headers on one line.
25
+ */
26
+ const tableUi = {
27
+ ...baseTableUi,
28
+ th: `${baseTableUi.th} whitespace-nowrap lg:max-xl:px-3`,
29
+ td: `${baseTableUi.td} lg:max-xl:px-3`,
30
+ };
21
31
 
22
32
  // A punchout visit has exactly one cart, the one handed back (RAD-109).
23
33
  const enabled = computed(() => settings.value?.cart.multipleCarts === true && !isPunchout.value);
@@ -227,8 +227,19 @@ async function addToCart(): Promise<void> {
227
227
  {{ formatCurrency(listValue) }}
228
228
  </p>
229
229
  </div>
230
+ <!-- Who owns the list is known only once the user is resolved in the
231
+ browser; until then a placeholder, not the read-only view that
232
+ would then switch to the owner's. -->
230
233
  <div
231
- v-if="isOwner"
234
+ v-if="!authStore.resolved"
235
+ class="flex items-center gap-2 ms-auto"
236
+ aria-hidden="true"
237
+ >
238
+ <USkeleton class="h-8 w-28 max-lg:h-11" />
239
+ <USkeleton class="h-8 w-24 max-lg:h-11" />
240
+ </div>
241
+ <div
242
+ v-else-if="isOwner"
232
243
  class="flex items-center gap-2 ms-auto"
233
244
  >
234
245
  <UButton
@@ -269,7 +280,18 @@ async function addToCart(): Promise<void> {
269
280
  <h2 class="px-4 sm:px-5 py-3 text-sm font-semibold text-highlighted bg-elevated/60 border-b border-(--ui-border)">
270
281
  {{ t('orderLists.columns.positions') }} ({{ list.positions.length }})
271
282
  </h2>
272
- <ul class="divide-y divide-(--ui-border) px-4 sm:px-5">
283
+ <!-- A new list starts empty; say where its articles come from. -->
284
+ <UiFeedbackEmptyState
285
+ v-if="!list.positions.length"
286
+ class="px-4 sm:px-5"
287
+ :icon="icon('empty')"
288
+ :title="t('orderLists.noPositions.title')"
289
+ :description="t('orderLists.noPositions.description')"
290
+ />
291
+ <ul
292
+ v-else
293
+ class="divide-y divide-(--ui-border) px-4 sm:px-5"
294
+ >
273
295
  <li
274
296
  v-for="(position, index) in list.positions"
275
297
  :key="`${list.id}-${index}`"
@@ -309,7 +331,14 @@ async function addToCart(): Promise<void> {
309
331
  </p>
310
332
  </div>
311
333
  <div
312
- v-if="mayEditPositions"
334
+ v-if="!authStore.resolved"
335
+ class="flex items-center shrink-0 max-md:basis-full max-md:justify-end"
336
+ aria-hidden="true"
337
+ >
338
+ <USkeleton class="h-6 w-28 max-lg:h-11 max-lg:w-36" />
339
+ </div>
340
+ <div
341
+ v-else-if="mayEditPositions"
313
342
  class="flex items-center gap-1 shrink-0 max-lg:gap-0 max-md:basis-full max-md:justify-end"
314
343
  >
315
344
  <UButton
@@ -91,7 +91,7 @@ async function save(): Promise<void> {
91
91
  </div>
92
92
  <UAlert
93
93
  v-if="!editable"
94
- class="m-4 sm:m-5 mb-0 sm:mb-0"
94
+ class="w-auto m-4 sm:m-5 mb-0 sm:mb-0"
95
95
  color="info"
96
96
  variant="soft"
97
97
  :icon="icon('info')"
@@ -32,7 +32,11 @@ async function onSubmit(): Promise<void> {
32
32
  </script>
33
33
 
34
34
  <template>
35
- <div class="w-full bg-(--ui-bg) border border-(--ui-border) rounded-xl p-6 space-y-6">
35
+ <!-- Sized like AuthLoginPanel: 44 px fields and buttons below lg. -->
36
+ <div
37
+ class="w-full bg-(--ui-bg) border border-(--ui-border) rounded-xl p-6 space-y-6
38
+ max-lg:[&_input:not([type=checkbox]):not([type=radio])]:min-h-11"
39
+ >
36
40
  <h2 class="text-xl font-semibold text-highlighted">
37
41
  {{ t('auth.forgotPassword.title') }}
38
42
  </h2>
@@ -70,6 +74,7 @@ async function onSubmit(): Promise<void> {
70
74
  color="primary"
71
75
  variant="solid"
72
76
  block
77
+ class="max-lg:min-h-11"
73
78
  :loading="loading"
74
79
  :label="t('auth.forgotPassword.submit')"
75
80
  />
@@ -77,7 +82,7 @@ async function onSubmit(): Promise<void> {
77
82
  <div class="text-center">
78
83
  <NuxtLink
79
84
  :to="localePath('/login')"
80
- class="text-sm text-primary hover:underline"
85
+ class="text-sm text-primary hover:underline max-lg:inline-flex max-lg:min-h-11 max-lg:items-center"
81
86
  >
82
87
  {{ t('auth.forgotPassword.backToLogin') }}
83
88
  </NuxtLink>
@@ -47,8 +47,12 @@ const identifierIsEmail = computed(() => identifierField.value.type === "email")
47
47
  /** Which mailed way the buyer is in the middle of, and how far. */
48
48
  const mailedKind = ref<"magic-link" | "otp" | null>(null);
49
49
  const mailSent = ref(false);
50
- /** The id the code's confirmation needs; absent for an address nobody holds. */
50
+ /**
51
+ * What the code's confirmation names: the address the code was asked for, and
52
+ * the id an older customers app still answers. The address alone is enough.
53
+ */
51
54
  const otpUserId = ref<string | null>(null);
55
+ const otpEmail = ref<string>("");
52
56
  const otpCode = ref("");
53
57
 
54
58
  /**
@@ -65,6 +69,7 @@ async function requestMail(kind: "magic-link" | "otp"): Promise<void> {
65
69
  }
66
70
  mailedKind.value = kind;
67
71
  try {
72
+ otpEmail.value = mailAddress.value;
68
73
  otpUserId.value = await auth.requestSignInMail(kind, mailAddress.value);
69
74
  mailSent.value = true;
70
75
  }
@@ -74,15 +79,14 @@ async function requestMail(kind: "magic-link" | "otp"): Promise<void> {
74
79
  }
75
80
 
76
81
  async function confirmCode(): Promise<void> {
77
- // Without an id there is nothing to confirm against — which is what an address
78
- // nobody holds looks like. The message is the same one a wrong code gets, so
79
- // the form never reveals which of the two happened.
80
- if (!otpCode.value.trim() || !otpUserId.value) {
82
+ // An address nobody holds is refused by the customers app in the words a
83
+ // wrong code gets, so the form never reveals which of the two happened.
84
+ if (!otpCode.value.trim() || !otpEmail.value) {
81
85
  auth.error = "auth.login.mailed.codeRejected";
82
86
  return;
83
87
  }
84
88
  try {
85
- await auth.confirmSignInMail("otp", { userId: otpUserId.value, secret: otpCode.value.trim() });
89
+ await auth.confirmSignInMail("otp", { email: otpEmail.value, userId: otpUserId.value, secret: otpCode.value.trim() });
86
90
  emit("success");
87
91
  }
88
92
  catch {
@@ -94,6 +98,7 @@ function startOver(): void {
94
98
  mailedKind.value = null;
95
99
  mailSent.value = false;
96
100
  otpUserId.value = null;
101
+ otpEmail.value = "";
97
102
  otpCode.value = "";
98
103
  }
99
104
 
@@ -144,7 +149,12 @@ async function onSubmit(): Promise<void> {
144
149
  </script>
145
150
 
146
151
  <template>
147
- <div class="bg-(--ui-bg) border border-(--ui-border) rounded-xl p-6 space-y-6">
152
+ <!-- Fields and buttons grow to 44 px below lg: this panel is also the
153
+ checkout login gate, where the touch-target rule applies (PO-23). -->
154
+ <div
155
+ class="bg-(--ui-bg) border border-(--ui-border) rounded-xl p-6 space-y-6
156
+ max-lg:[&_input:not([type=checkbox]):not([type=radio])]:min-h-11"
157
+ >
148
158
  <h2 class="text-xl font-semibold text-highlighted">
149
159
  {{ t('auth.login.existingCustomer') }}
150
160
  </h2>
@@ -183,6 +193,7 @@ async function onSubmit(): Promise<void> {
183
193
  v-if="magicLinkOffered"
184
194
  color="neutral"
185
195
  :variant="passwordOffered ? 'outline' : 'solid'"
196
+ class="max-lg:min-h-11"
186
197
  :disabled="!mailAddress || loading"
187
198
  :label="t('auth.login.mailed.requestLink')"
188
199
  @click="requestMail('magic-link')"
@@ -191,6 +202,7 @@ async function onSubmit(): Promise<void> {
191
202
  v-if="otpOffered"
192
203
  color="neutral"
193
204
  :variant="passwordOffered ? 'outline' : 'solid'"
205
+ class="max-lg:min-h-11"
194
206
  :disabled="!mailAddress || loading"
195
207
  :label="t('auth.login.mailed.requestCode')"
196
208
  @click="requestMail('otp')"
@@ -219,6 +231,7 @@ async function onSubmit(): Promise<void> {
219
231
  />
220
232
  <UButton
221
233
  color="primary"
234
+ class="max-lg:min-h-11"
222
235
  :disabled="!otpCode.trim() || loading"
223
236
  :label="t('auth.login.mailed.confirmCode')"
224
237
  @click="confirmCode"
@@ -228,6 +241,7 @@ async function onSubmit(): Promise<void> {
228
241
  color="neutral"
229
242
  variant="ghost"
230
243
  size="xs"
244
+ class="max-lg:min-h-11"
231
245
  :label="t('auth.login.mailed.startOver')"
232
246
  @click="startOver"
233
247
  />
@@ -282,6 +296,7 @@ async function onSubmit(): Promise<void> {
282
296
  color="primary"
283
297
  variant="solid"
284
298
  block
299
+ class="max-lg:min-h-11"
285
300
  :loading="loading"
286
301
  :label="t('auth.login.submit')"
287
302
  />
@@ -289,7 +304,7 @@ async function onSubmit(): Promise<void> {
289
304
  <div class="text-center">
290
305
  <NuxtLink
291
306
  :to="localePath('/forgot-password')"
292
- class="text-sm text-primary hover:underline"
307
+ class="text-sm text-primary hover:underline max-lg:inline-flex max-lg:min-h-11 max-lg:items-center"
293
308
  >
294
309
  {{ t('auth.login.forgotPassword') }}
295
310
  </NuxtLink>
@@ -23,7 +23,7 @@ const enabled = computed(() => registration.value?.b2b !== false);
23
23
  color="neutral"
24
24
  variant="outline"
25
25
  block
26
- class="mt-6"
26
+ class="mt-6 max-lg:min-h-11"
27
27
  :label="t('auth.login.registerCta')"
28
28
  />
29
29
  </div>
@@ -116,6 +116,7 @@ const hintColor = (type: string) =>
116
116
  :model-value="selection.isSelected(lineKey)"
117
117
  :aria-label="t('cart.selection.selectPosition', { name: item.name })"
118
118
  tabindex="0"
119
+ :ui="{ base: 'relative max-lg:after:absolute max-lg:after:left-[calc((100%_-_2.75rem)/2)] max-lg:after:right-[calc((100%_-_2.75rem)/2)] max-lg:after:top-[calc((100%_-_2.75rem)/2)] max-lg:after:bottom-[calc((100%_-_2.75rem)/2)]' }"
119
120
  @update:model-value="selection.toggle(lineKey)"
120
121
  />
121
122
  <span
@@ -187,7 +188,8 @@ const hintColor = (type: string) =>
187
188
  tabindex="0"
188
189
  class="group/cc mt-1.5 w-fit text-xs text-muted hover:text-highlighted cursor-pointer
189
190
  inline-flex items-center gap-1.5 rounded-md border border-(--ui-border)
190
- hover:border-(--ui-border-accented) px-2 py-1 transition-colors"
191
+ hover:border-(--ui-border-accented) px-2 py-1 transition-colors
192
+ relative max-lg:after:absolute max-lg:after:inset-x-0 max-lg:after:top-[calc((100%_-_2.75rem)/2)] max-lg:after:bottom-[calc((100%_-_2.75rem)/2)]"
191
193
  :aria-label="t('cart.position.editCostCenter')"
192
194
  @click="actions.open('cost-center', [lineKey])"
193
195
  >
@@ -217,7 +219,7 @@ const hintColor = (type: string) =>
217
219
  v-if="!readonly && item.positionTexts?.length"
218
220
  type="button"
219
221
  tabindex="0"
220
- class="group/texts mt-1 w-fit text-left cursor-pointer"
222
+ class="group/texts mt-1 w-fit text-left cursor-pointer relative max-lg:after:absolute max-lg:after:inset-x-0 max-lg:after:top-[calc((100%_-_2.75rem)/2)] max-lg:after:bottom-[calc((100%_-_2.75rem)/2)]"
221
223
  :aria-label="t('cart.position.editTexts')"
222
224
  @click="actions.open('texts', [lineKey])"
223
225
  >
@@ -251,7 +253,8 @@ const hintColor = (type: string) =>
251
253
  type="button"
252
254
  tabindex="0"
253
255
  class="mt-1 w-fit text-xs text-dimmed hover:text-muted cursor-pointer
254
- inline-flex items-center gap-1 transition-colors"
256
+ inline-flex items-center gap-1 transition-colors
257
+ relative max-lg:after:absolute max-lg:after:inset-x-0 max-lg:after:top-[calc((100%_-_2.75rem)/2)] max-lg:after:bottom-[calc((100%_-_2.75rem)/2)]"
255
258
  @click="actions.open('texts', [lineKey])"
256
259
  >
257
260
  <UIcon
@@ -280,6 +283,7 @@ const hintColor = (type: string) =>
280
283
  variant="soft"
281
284
  size="xs"
282
285
  tabindex="0"
286
+ class="max-lg:min-h-11 max-lg:min-w-11 max-lg:justify-center"
283
287
  :disabled="!canDecrease"
284
288
  :aria-label="t('cart.item.ariaDecreaseQuantity', { name: item.name })"
285
289
  @click="decrease"
@@ -289,7 +293,7 @@ const hintColor = (type: string) =>
289
293
  type="text"
290
294
  inputmode="numeric"
291
295
  :aria-label="t('cart.item.ariaInputQuantity', { name: item.name })"
292
- class="w-14 text-center text-sm border border-(--ui-border) rounded px-1 py-0.5
296
+ class="w-14 text-center text-sm border border-(--ui-border) rounded px-1 py-0.5 max-lg:min-h-11
293
297
  bg-transparent focus:outline-none focus:ring-1 focus:ring-(--ui-primary)"
294
298
  @input="onQuantityInput"
295
299
  @keydown.enter.prevent="commitQuantity"
@@ -301,6 +305,7 @@ const hintColor = (type: string) =>
301
305
  variant="soft"
302
306
  size="xs"
303
307
  tabindex="0"
308
+ class="max-lg:min-h-11 max-lg:min-w-11 max-lg:justify-center"
304
309
  :aria-label="t('cart.item.ariaIncreaseQuantity', { name: item.name })"
305
310
  @click="increase"
306
311
  />
@@ -354,6 +359,7 @@ const hintColor = (type: string) =>
354
359
  variant="ghost"
355
360
  size="xs"
356
361
  tabindex="0"
362
+ class="max-lg:min-h-11 max-lg:min-w-11 max-lg:justify-center"
357
363
  :aria-label="t('cart.bulk.saveToList')"
358
364
  @click="actions.open('save', [lineKey])"
359
365
  />
@@ -365,6 +371,7 @@ const hintColor = (type: string) =>
365
371
  variant="ghost"
366
372
  size="xs"
367
373
  tabindex="0"
374
+ class="max-lg:min-h-11 max-lg:min-w-11 max-lg:justify-center"
368
375
  :aria-label="t('cart.item.ariaRemoveFromCart', { name: item.name })"
369
376
  @click="cart.removeByKeys([lineKey])"
370
377
  />
@@ -156,10 +156,12 @@ function onSubmit(): void {
156
156
 
157
157
  <template>
158
158
  <div class="space-y-2">
159
- <div class="flex items-end gap-2">
159
+ <!-- Wraps by the room it gets, not by breakpoint: the cart's empty state
160
+ puts it in a half-width column from sm up, as narrow as a phone. -->
161
+ <div class="flex flex-wrap items-end gap-2">
160
162
  <UFormField
161
163
  :label="t('cart.quickAdd.skuLabel')"
162
- class="flex-1"
164
+ class="flex-[1_1_12rem]"
163
165
  >
164
166
  <UInput
165
167
  v-model="sku"
@@ -45,6 +45,7 @@ const { formatCurrency } = useCartSummaryFormatting();
45
45
  variant="soft"
46
46
  size="xs"
47
47
  tabindex="0"
48
+ class="relative max-lg:after:absolute max-lg:after:left-[calc((100%_-_2.75rem)/2)] max-lg:after:right-[calc((100%_-_2.75rem)/2)] max-lg:after:top-[calc((100%_-_2.75rem)/2)] max-lg:after:bottom-[calc((100%_-_2.75rem)/2)]"
48
49
  :icon="icon('plus')"
49
50
  :aria-label="t('cart.boost.add')"
50
51
  @click="emit('add')"
@@ -99,6 +99,7 @@ function onDelete(): void {
99
99
  variant="outline"
100
100
  size="sm"
101
101
  tabindex="0"
102
+ class="max-lg:min-h-11"
102
103
  :icon="icon('cart')"
103
104
  :trailing-icon="icon('chevron-down')"
104
105
  :label="cart.activeCartName"
@@ -36,6 +36,7 @@ function bulkDelete(): void {
36
36
  :model-value="selection.someSelected.value ? 'indeterminate' : selection.allSelected.value"
37
37
  :aria-label="t('cart.selection.selectAll')"
38
38
  tabindex="0"
39
+ :ui="{ base: 'relative max-lg:after:absolute max-lg:after:left-[calc((100%_-_2.75rem)/2)] max-lg:after:right-[calc((100%_-_2.75rem)/2)] max-lg:after:top-[calc((100%_-_2.75rem)/2)] max-lg:after:bottom-[calc((100%_-_2.75rem)/2)]' }"
39
40
  @update:model-value="selection.toggleAll()"
40
41
  />
41
42
  <span class="text-xs text-muted">
@@ -55,6 +56,7 @@ function bulkDelete(): void {
55
56
  variant="ghost"
56
57
  size="xs"
57
58
  tabindex="0"
59
+ class="max-lg:min-h-11"
58
60
  :label="t('cart.bulk.editCostCenter')"
59
61
  @click="actions.open('cost-center', selection.selected.value)"
60
62
  />
@@ -64,6 +66,7 @@ function bulkDelete(): void {
64
66
  variant="ghost"
65
67
  size="xs"
66
68
  tabindex="0"
69
+ class="max-lg:min-h-11"
67
70
  :label="t('cart.bulk.editTexts')"
68
71
  @click="actions.open('texts', selection.selected.value)"
69
72
  />
@@ -74,6 +77,7 @@ function bulkDelete(): void {
74
77
  variant="ghost"
75
78
  size="xs"
76
79
  tabindex="0"
80
+ class="max-lg:min-h-11"
77
81
  :label="t('cart.bulk.saveToList')"
78
82
  @click="actions.open('save', selection.selected.value)"
79
83
  />
@@ -83,6 +87,7 @@ function bulkDelete(): void {
83
87
  variant="ghost"
84
88
  size="xs"
85
89
  tabindex="0"
90
+ class="max-lg:min-h-11"
86
91
  :label="t('cart.bulk.deletePositions')"
87
92
  @click="bulkDelete"
88
93
  />
@@ -264,12 +264,14 @@ const trustItems = computed(() => {
264
264
  :placeholder="t('cart.summary.voucherPlaceholder')"
265
265
  size="sm"
266
266
  class="flex-1"
267
+ :ui="{ base: 'max-lg:min-h-11' }"
267
268
  :disabled="codesFull"
268
269
  @keyup.enter="applyCode"
269
270
  />
270
271
  <UButton
271
272
  size="sm"
272
273
  variant="subtle"
274
+ class="max-lg:min-h-11"
273
275
  :disabled="!codeInput.trim() || codesFull"
274
276
  @click="applyCode"
275
277
  >
@@ -335,7 +337,7 @@ const trustItems = computed(() => {
335
337
  color="primary"
336
338
  variant="solid"
337
339
  size="lg"
338
- class="w-full justify-center mt-2"
340
+ class="w-full justify-center mt-2 max-lg:min-h-11"
339
341
  :icon="icon('file')"
340
342
  :loading="pending"
341
343
  :label="t('cart.quote.action')"
@@ -355,7 +357,7 @@ const trustItems = computed(() => {
355
357
  color="primary"
356
358
  variant="solid"
357
359
  size="lg"
358
- class="w-full justify-center mt-2"
360
+ class="w-full justify-center mt-2 max-lg:min-h-11"
359
361
  :disabled="!orderable"
360
362
  :loading="pending"
361
363
  :label="isRequester ? t('cart.cta.requisition') : t('cart.cta.checkout')"
@@ -399,6 +401,7 @@ const trustItems = computed(() => {
399
401
  variant="ghost"
400
402
  size="xs"
401
403
  tabindex="0"
404
+ class="max-lg:min-h-11"
402
405
  :label="t('cart.export.action')"
403
406
  @click="actions.open('export', [])"
404
407
  />
@@ -409,6 +412,7 @@ const trustItems = computed(() => {
409
412
  variant="ghost"
410
413
  size="xs"
411
414
  tabindex="0"
415
+ class="max-lg:min-h-11"
412
416
  :label="t('cart.actions.print')"
413
417
  @click="printCart"
414
418
  />
@@ -419,6 +423,7 @@ const trustItems = computed(() => {
419
423
  variant="ghost"
420
424
  size="xs"
421
425
  tabindex="0"
426
+ class="max-lg:min-h-11"
422
427
  :label="t('cart.actions.clear')"
423
428
  @click="cart.clearCart()"
424
429
  />