@open-mercato/core 0.6.6-develop.6290.1.4bb5a8ba3f → 0.6.6-develop.6296.1.5e8bdfee17

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.
@@ -19,9 +19,15 @@ import {
19
19
  CATALOG_HAZMAT_PACKING_GROUPS
20
20
  } from "../../data/types.js";
21
21
  const NONE_OPTION = "none";
22
- function FieldError({ message }) {
22
+ function fieldErrorId(inputId) {
23
+ return `${inputId}-error`;
24
+ }
25
+ function describedByError(inputId, message) {
26
+ return message ? { "aria-invalid": true, "aria-describedby": fieldErrorId(inputId) } : {};
27
+ }
28
+ function FieldError({ id, message }) {
23
29
  if (!message) return null;
24
- return /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: message });
30
+ return /* @__PURE__ */ jsx("p", { id, className: "text-xs text-destructive", children: message });
25
31
  }
26
32
  function ProductComplianceSection({
27
33
  values,
@@ -62,10 +68,17 @@ function ProductComplianceSection({
62
68
  value: values.countryOfOriginCode ?? "",
63
69
  maxLength: 2,
64
70
  placeholder: t("catalog.products.compliance.placeholders.countryOfOrigin", "PL"),
65
- onChange: (event) => setValue("countryOfOriginCode", event.target.value.toUpperCase())
71
+ onChange: (event) => setValue("countryOfOriginCode", event.target.value.toUpperCase()),
72
+ ...describedByError("catalog-product-compliance-country", errors.countryOfOriginCode)
66
73
  }
67
74
  ),
68
- /* @__PURE__ */ jsx(FieldError, { message: errors.countryOfOriginCode })
75
+ /* @__PURE__ */ jsx(
76
+ FieldError,
77
+ {
78
+ id: fieldErrorId("catalog-product-compliance-country"),
79
+ message: errors.countryOfOriginCode
80
+ }
81
+ )
69
82
  ] }),
70
83
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
71
84
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-tax-classification", children: t("catalog.products.compliance.fields.taxClassification", "Tax classification code") }),
@@ -74,10 +87,17 @@ function ProductComplianceSection({
74
87
  {
75
88
  id: "catalog-product-compliance-tax-classification",
76
89
  value: values.taxClassificationCode ?? "",
77
- onChange: (event) => setValue("taxClassificationCode", event.target.value)
90
+ onChange: (event) => setValue("taxClassificationCode", event.target.value),
91
+ ...describedByError("catalog-product-compliance-tax-classification", errors.taxClassificationCode)
78
92
  }
79
93
  ),
80
- /* @__PURE__ */ jsx(FieldError, { message: errors.taxClassificationCode })
94
+ /* @__PURE__ */ jsx(
95
+ FieldError,
96
+ {
97
+ id: fieldErrorId("catalog-product-compliance-tax-classification"),
98
+ message: errors.taxClassificationCode
99
+ }
100
+ )
81
101
  ] }),
82
102
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
83
103
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-pkwiu", children: t("catalog.products.compliance.fields.pkwiu", "PKWiU code") }),
@@ -86,10 +106,17 @@ function ProductComplianceSection({
86
106
  {
87
107
  id: "catalog-product-compliance-pkwiu",
88
108
  value: values.pkwiuCode ?? "",
89
- onChange: (event) => setValue("pkwiuCode", event.target.value)
109
+ onChange: (event) => setValue("pkwiuCode", event.target.value),
110
+ ...describedByError("catalog-product-compliance-pkwiu", errors.pkwiuCode)
90
111
  }
91
112
  ),
92
- /* @__PURE__ */ jsx(FieldError, { message: errors.pkwiuCode })
113
+ /* @__PURE__ */ jsx(
114
+ FieldError,
115
+ {
116
+ id: fieldErrorId("catalog-product-compliance-pkwiu"),
117
+ message: errors.pkwiuCode
118
+ }
119
+ )
93
120
  ] }),
94
121
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
95
122
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-cn", children: t("catalog.products.compliance.fields.cn", "CN code (Combined Nomenclature)") }),
@@ -98,10 +125,17 @@ function ProductComplianceSection({
98
125
  {
99
126
  id: "catalog-product-compliance-cn",
100
127
  value: values.cnCode ?? "",
101
- onChange: (event) => setValue("cnCode", event.target.value)
128
+ onChange: (event) => setValue("cnCode", event.target.value),
129
+ ...describedByError("catalog-product-compliance-cn", errors.cnCode)
102
130
  }
103
131
  ),
104
- /* @__PURE__ */ jsx(FieldError, { message: errors.cnCode })
132
+ /* @__PURE__ */ jsx(
133
+ FieldError,
134
+ {
135
+ id: fieldErrorId("catalog-product-compliance-cn"),
136
+ message: errors.cnCode
137
+ }
138
+ )
105
139
  ] }),
106
140
  /* @__PURE__ */ jsxs("div", { className: "space-y-2 md:col-span-2", children: [
107
141
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-hs", children: t("catalog.products.compliance.fields.hs", "HS code (customs tariff)") }),
@@ -110,34 +144,56 @@ function ProductComplianceSection({
110
144
  {
111
145
  id: "catalog-product-compliance-hs",
112
146
  value: values.hsCode ?? "",
113
- onChange: (event) => setValue("hsCode", event.target.value)
147
+ onChange: (event) => setValue("hsCode", event.target.value),
148
+ ...describedByError("catalog-product-compliance-hs", errors.hsCode)
114
149
  }
115
150
  ),
116
- /* @__PURE__ */ jsx(FieldError, { message: errors.hsCode })
151
+ /* @__PURE__ */ jsx(
152
+ FieldError,
153
+ {
154
+ id: fieldErrorId("catalog-product-compliance-hs"),
155
+ message: errors.hsCode
156
+ }
157
+ )
117
158
  ] })
118
159
  ] }),
119
160
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
120
- /* @__PURE__ */ jsx(Label, { children: t("catalog.products.compliance.fields.gtuCodes", "GTU codes (JPK_V7)") }),
121
- /* @__PURE__ */ jsx("div", { className: "grid gap-2 sm:grid-cols-3 md:grid-cols-4", children: CATALOG_GTU_CODES.map((code) => /* @__PURE__ */ jsxs(
122
- "label",
161
+ /* @__PURE__ */ jsx(Label, { id: "catalog-product-compliance-gtu-label", children: t("catalog.products.compliance.fields.gtuCodes", "GTU codes (JPK_V7)") }),
162
+ /* @__PURE__ */ jsx(
163
+ "div",
123
164
  {
124
- className: "flex items-center gap-2 text-sm",
125
- htmlFor: `catalog-product-compliance-gtu-${code}`,
126
- children: [
127
- /* @__PURE__ */ jsx(
128
- Checkbox,
129
- {
130
- id: `catalog-product-compliance-gtu-${code}`,
131
- checked: gtuCodes.includes(code),
132
- onCheckedChange: (checked) => toggleGtuCode(code, checked === true)
133
- }
134
- ),
135
- code.replace("_", " ")
136
- ]
137
- },
138
- code
139
- )) }),
140
- /* @__PURE__ */ jsx(FieldError, { message: errors.gtuCodes })
165
+ role: "group",
166
+ "aria-labelledby": "catalog-product-compliance-gtu-label",
167
+ className: "grid gap-2 sm:grid-cols-3 md:grid-cols-4",
168
+ ...describedByError("catalog-product-compliance-gtu", errors.gtuCodes),
169
+ children: CATALOG_GTU_CODES.map((code) => /* @__PURE__ */ jsxs(
170
+ "label",
171
+ {
172
+ className: "flex items-center gap-2 text-sm",
173
+ htmlFor: `catalog-product-compliance-gtu-${code}`,
174
+ children: [
175
+ /* @__PURE__ */ jsx(
176
+ Checkbox,
177
+ {
178
+ id: `catalog-product-compliance-gtu-${code}`,
179
+ checked: gtuCodes.includes(code),
180
+ onCheckedChange: (checked) => toggleGtuCode(code, checked === true)
181
+ }
182
+ ),
183
+ code.replace("_", " ")
184
+ ]
185
+ },
186
+ code
187
+ ))
188
+ }
189
+ ),
190
+ /* @__PURE__ */ jsx(
191
+ FieldError,
192
+ {
193
+ id: fieldErrorId("catalog-product-compliance-gtu"),
194
+ message: errors.gtuCodes
195
+ }
196
+ )
141
197
  ] })
142
198
  ] }),
143
199
  /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
@@ -159,10 +215,17 @@ function ProductComplianceSection({
159
215
  min: 0,
160
216
  max: 120,
161
217
  value: values.ageMin ?? "",
162
- onChange: (event) => setValue("ageMin", event.target.value)
218
+ onChange: (event) => setValue("ageMin", event.target.value),
219
+ ...describedByError("catalog-product-compliance-age-min", errors.ageMin)
163
220
  }
164
221
  ),
165
- /* @__PURE__ */ jsx(FieldError, { message: errors.ageMin })
222
+ /* @__PURE__ */ jsx(
223
+ FieldError,
224
+ {
225
+ id: fieldErrorId("catalog-product-compliance-age-min"),
226
+ message: errors.ageMin
227
+ }
228
+ )
166
229
  ] }),
167
230
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
168
231
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-excise-category", children: t("catalog.products.compliance.fields.exciseCategory", "Excise category") }),
@@ -172,7 +235,14 @@ function ProductComplianceSection({
172
235
  value: values.exciseCategory ?? NONE_OPTION,
173
236
  onValueChange: (value) => setValue("exciseCategory", value === NONE_OPTION ? null : value),
174
237
  children: [
175
- /* @__PURE__ */ jsx(SelectTrigger, { id: "catalog-product-compliance-excise-category", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
238
+ /* @__PURE__ */ jsx(
239
+ SelectTrigger,
240
+ {
241
+ id: "catalog-product-compliance-excise-category",
242
+ ...describedByError("catalog-product-compliance-excise-category", errors.exciseCategory),
243
+ children: /* @__PURE__ */ jsx(SelectValue, {})
244
+ }
245
+ ),
176
246
  /* @__PURE__ */ jsxs(SelectContent, { children: [
177
247
  /* @__PURE__ */ jsx(SelectItem, { value: NONE_OPTION, children: t("catalog.products.compliance.options.none", "None") }),
178
248
  CATALOG_EXCISE_CATEGORIES.map((category) => /* @__PURE__ */ jsx(SelectItem, { value: category, children: t(`catalog.products.compliance.exciseCategories.${category}`, category) }, category))
@@ -180,7 +250,13 @@ function ProductComplianceSection({
180
250
  ]
181
251
  }
182
252
  ),
183
- /* @__PURE__ */ jsx(FieldError, { message: errors.exciseCategory })
253
+ /* @__PURE__ */ jsx(
254
+ FieldError,
255
+ {
256
+ id: fieldErrorId("catalog-product-compliance-excise-category"),
257
+ message: errors.exciseCategory
258
+ }
259
+ )
184
260
  ] })
185
261
  ] }),
186
262
  /* @__PURE__ */ jsxs("div", { className: "grid gap-2 sm:grid-cols-2", children: [
@@ -247,10 +323,17 @@ function ProductComplianceSection({
247
323
  {
248
324
  id: "catalog-product-compliance-hazmat-class",
249
325
  value: values.hazmatClass ?? "",
250
- onChange: (event) => setValue("hazmatClass", event.target.value)
326
+ onChange: (event) => setValue("hazmatClass", event.target.value),
327
+ ...describedByError("catalog-product-compliance-hazmat-class", errors.hazmatClass)
251
328
  }
252
329
  ),
253
- /* @__PURE__ */ jsx(FieldError, { message: errors.hazmatClass })
330
+ /* @__PURE__ */ jsx(
331
+ FieldError,
332
+ {
333
+ id: fieldErrorId("catalog-product-compliance-hazmat-class"),
334
+ message: errors.hazmatClass
335
+ }
336
+ )
254
337
  ] }),
255
338
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
256
339
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-un-number", children: t("catalog.products.compliance.fields.unNumber", "UN number") }),
@@ -260,10 +343,17 @@ function ProductComplianceSection({
260
343
  id: "catalog-product-compliance-un-number",
261
344
  placeholder: t("catalog.products.compliance.placeholders.unNumber", "UN1234"),
262
345
  value: values.unNumber ?? "",
263
- onChange: (event) => setValue("unNumber", event.target.value)
346
+ onChange: (event) => setValue("unNumber", event.target.value),
347
+ ...describedByError("catalog-product-compliance-un-number", errors.unNumber)
264
348
  }
265
349
  ),
266
- /* @__PURE__ */ jsx(FieldError, { message: errors.unNumber })
350
+ /* @__PURE__ */ jsx(
351
+ FieldError,
352
+ {
353
+ id: fieldErrorId("catalog-product-compliance-un-number"),
354
+ message: errors.unNumber
355
+ }
356
+ )
267
357
  ] }),
268
358
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
269
359
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-packing-group", children: t("catalog.products.compliance.fields.hazmatPackingGroup", "Packing group") }),
@@ -273,7 +363,14 @@ function ProductComplianceSection({
273
363
  value: values.hazmatPackingGroup ?? NONE_OPTION,
274
364
  onValueChange: (value) => setValue("hazmatPackingGroup", value === NONE_OPTION ? null : value),
275
365
  children: [
276
- /* @__PURE__ */ jsx(SelectTrigger, { id: "catalog-product-compliance-packing-group", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
366
+ /* @__PURE__ */ jsx(
367
+ SelectTrigger,
368
+ {
369
+ id: "catalog-product-compliance-packing-group",
370
+ ...describedByError("catalog-product-compliance-packing-group", errors.hazmatPackingGroup),
371
+ children: /* @__PURE__ */ jsx(SelectValue, {})
372
+ }
373
+ ),
277
374
  /* @__PURE__ */ jsxs(SelectContent, { children: [
278
375
  /* @__PURE__ */ jsx(SelectItem, { value: NONE_OPTION, children: t("catalog.products.compliance.options.none", "None") }),
279
376
  CATALOG_HAZMAT_PACKING_GROUPS.map((group) => /* @__PURE__ */ jsx(SelectItem, { value: group, children: group }, group))
@@ -281,7 +378,13 @@ function ProductComplianceSection({
281
378
  ]
282
379
  }
283
380
  ),
284
- /* @__PURE__ */ jsx(FieldError, { message: errors.hazmatPackingGroup })
381
+ /* @__PURE__ */ jsx(
382
+ FieldError,
383
+ {
384
+ id: fieldErrorId("catalog-product-compliance-packing-group"),
385
+ message: errors.hazmatPackingGroup
386
+ }
387
+ )
285
388
  ] })
286
389
  ] })
287
390
  ] }),
@@ -302,10 +405,17 @@ function ProductComplianceSection({
302
405
  id: "catalog-product-compliance-launch-at",
303
406
  type: "date",
304
407
  value: values.launchAt ?? "",
305
- onChange: (event) => setValue("launchAt", event.target.value)
408
+ onChange: (event) => setValue("launchAt", event.target.value),
409
+ ...describedByError("catalog-product-compliance-launch-at", errors.launchAt)
306
410
  }
307
411
  ),
308
- /* @__PURE__ */ jsx(FieldError, { message: errors.launchAt })
412
+ /* @__PURE__ */ jsx(
413
+ FieldError,
414
+ {
415
+ id: fieldErrorId("catalog-product-compliance-launch-at"),
416
+ message: errors.launchAt
417
+ }
418
+ )
309
419
  ] }),
310
420
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
311
421
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-eol-at", children: t("catalog.products.compliance.fields.endOfLifeAt", "End of life") }),
@@ -315,10 +425,17 @@ function ProductComplianceSection({
315
425
  id: "catalog-product-compliance-eol-at",
316
426
  type: "date",
317
427
  value: values.endOfLifeAt ?? "",
318
- onChange: (event) => setValue("endOfLifeAt", event.target.value)
428
+ onChange: (event) => setValue("endOfLifeAt", event.target.value),
429
+ ...describedByError("catalog-product-compliance-eol-at", errors.endOfLifeAt)
319
430
  }
320
431
  ),
321
- /* @__PURE__ */ jsx(FieldError, { message: errors.endOfLifeAt })
432
+ /* @__PURE__ */ jsx(
433
+ FieldError,
434
+ {
435
+ id: fieldErrorId("catalog-product-compliance-eol-at"),
436
+ message: errors.endOfLifeAt
437
+ }
438
+ )
322
439
  ] }),
323
440
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
324
441
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-available-from", children: t("catalog.products.compliance.fields.availableFrom", "Available from") }),
@@ -328,10 +445,17 @@ function ProductComplianceSection({
328
445
  id: "catalog-product-compliance-available-from",
329
446
  type: "date",
330
447
  value: values.availableFrom ?? "",
331
- onChange: (event) => setValue("availableFrom", event.target.value)
448
+ onChange: (event) => setValue("availableFrom", event.target.value),
449
+ ...describedByError("catalog-product-compliance-available-from", errors.availableFrom)
332
450
  }
333
451
  ),
334
- /* @__PURE__ */ jsx(FieldError, { message: errors.availableFrom })
452
+ /* @__PURE__ */ jsx(
453
+ FieldError,
454
+ {
455
+ id: fieldErrorId("catalog-product-compliance-available-from"),
456
+ message: errors.availableFrom
457
+ }
458
+ )
335
459
  ] }),
336
460
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
337
461
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-available-until", children: t("catalog.products.compliance.fields.availableUntil", "Available until") }),
@@ -341,10 +465,17 @@ function ProductComplianceSection({
341
465
  id: "catalog-product-compliance-available-until",
342
466
  type: "date",
343
467
  value: values.availableUntil ?? "",
344
- onChange: (event) => setValue("availableUntil", event.target.value)
468
+ onChange: (event) => setValue("availableUntil", event.target.value),
469
+ ...describedByError("catalog-product-compliance-available-until", errors.availableUntil)
345
470
  }
346
471
  ),
347
- /* @__PURE__ */ jsx(FieldError, { message: errors.availableUntil })
472
+ /* @__PURE__ */ jsx(
473
+ FieldError,
474
+ {
475
+ id: fieldErrorId("catalog-product-compliance-available-until"),
476
+ message: errors.availableUntil
477
+ }
478
+ )
348
479
  ] })
349
480
  ] }),
350
481
  /* @__PURE__ */ jsxs(
@@ -384,10 +515,17 @@ function ProductComplianceSection({
384
515
  type: "number",
385
516
  min: 1,
386
517
  value: values.minOrderQty ?? "",
387
- onChange: (event) => setValue("minOrderQty", event.target.value)
518
+ onChange: (event) => setValue("minOrderQty", event.target.value),
519
+ ...describedByError("catalog-product-compliance-min-qty", errors.minOrderQty)
388
520
  }
389
521
  ),
390
- /* @__PURE__ */ jsx(FieldError, { message: errors.minOrderQty })
522
+ /* @__PURE__ */ jsx(
523
+ FieldError,
524
+ {
525
+ id: fieldErrorId("catalog-product-compliance-min-qty"),
526
+ message: errors.minOrderQty
527
+ }
528
+ )
391
529
  ] }),
392
530
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
393
531
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-max-qty", children: t("catalog.products.compliance.fields.maxOrderQty", "Maximum order quantity") }),
@@ -398,10 +536,17 @@ function ProductComplianceSection({
398
536
  type: "number",
399
537
  min: 1,
400
538
  value: values.maxOrderQty ?? "",
401
- onChange: (event) => setValue("maxOrderQty", event.target.value)
539
+ onChange: (event) => setValue("maxOrderQty", event.target.value),
540
+ ...describedByError("catalog-product-compliance-max-qty", errors.maxOrderQty)
402
541
  }
403
542
  ),
404
- /* @__PURE__ */ jsx(FieldError, { message: errors.maxOrderQty })
543
+ /* @__PURE__ */ jsx(
544
+ FieldError,
545
+ {
546
+ id: fieldErrorId("catalog-product-compliance-max-qty"),
547
+ message: errors.maxOrderQty
548
+ }
549
+ )
405
550
  ] }),
406
551
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
407
552
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-qty-increment", children: t("catalog.products.compliance.fields.orderQtyIncrement", "Quantity increment") }),
@@ -412,10 +557,17 @@ function ProductComplianceSection({
412
557
  type: "number",
413
558
  min: 1,
414
559
  value: values.orderQtyIncrement ?? "",
415
- onChange: (event) => setValue("orderQtyIncrement", event.target.value)
560
+ onChange: (event) => setValue("orderQtyIncrement", event.target.value),
561
+ ...describedByError("catalog-product-compliance-qty-increment", errors.orderQtyIncrement)
416
562
  }
417
563
  ),
418
- /* @__PURE__ */ jsx(FieldError, { message: errors.orderQtyIncrement })
564
+ /* @__PURE__ */ jsx(
565
+ FieldError,
566
+ {
567
+ id: fieldErrorId("catalog-product-compliance-qty-increment"),
568
+ message: errors.orderQtyIncrement
569
+ }
570
+ )
419
571
  ] })
420
572
  ] }),
421
573
  /* @__PURE__ */ jsxs(
@@ -454,10 +606,17 @@ function ProductComplianceSection({
454
606
  id: "catalog-product-compliance-seo-title",
455
607
  maxLength: 255,
456
608
  value: values.seoTitle ?? "",
457
- onChange: (event) => setValue("seoTitle", event.target.value)
609
+ onChange: (event) => setValue("seoTitle", event.target.value),
610
+ ...describedByError("catalog-product-compliance-seo-title", errors.seoTitle)
458
611
  }
459
612
  ),
460
- /* @__PURE__ */ jsx(FieldError, { message: errors.seoTitle })
613
+ /* @__PURE__ */ jsx(
614
+ FieldError,
615
+ {
616
+ id: fieldErrorId("catalog-product-compliance-seo-title"),
617
+ message: errors.seoTitle
618
+ }
619
+ )
461
620
  ] }),
462
621
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
463
622
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-seo-description", children: t("catalog.products.compliance.fields.seoDescription", "SEO description") }),
@@ -468,10 +627,17 @@ function ProductComplianceSection({
468
627
  rows: 3,
469
628
  maxLength: 1e3,
470
629
  value: values.seoDescription ?? "",
471
- onChange: (event) => setValue("seoDescription", event.target.value)
630
+ onChange: (event) => setValue("seoDescription", event.target.value),
631
+ ...describedByError("catalog-product-compliance-seo-description", errors.seoDescription)
472
632
  }
473
633
  ),
474
- /* @__PURE__ */ jsx(FieldError, { message: errors.seoDescription })
634
+ /* @__PURE__ */ jsx(
635
+ FieldError,
636
+ {
637
+ id: fieldErrorId("catalog-product-compliance-seo-description"),
638
+ message: errors.seoDescription
639
+ }
640
+ )
475
641
  ] }),
476
642
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
477
643
  /* @__PURE__ */ jsx(Label, { htmlFor: "catalog-product-compliance-canonical-url", children: t("catalog.products.compliance.fields.canonicalUrl", "Canonical URL") }),
@@ -483,10 +649,17 @@ function ProductComplianceSection({
483
649
  maxLength: 500,
484
650
  placeholder: "https://",
485
651
  value: values.canonicalUrl ?? "",
486
- onChange: (event) => setValue("canonicalUrl", event.target.value)
652
+ onChange: (event) => setValue("canonicalUrl", event.target.value),
653
+ ...describedByError("catalog-product-compliance-canonical-url", errors.canonicalUrl)
487
654
  }
488
655
  ),
489
- /* @__PURE__ */ jsx(FieldError, { message: errors.canonicalUrl })
656
+ /* @__PURE__ */ jsx(
657
+ FieldError,
658
+ {
659
+ id: fieldErrorId("catalog-product-compliance-canonical-url"),
660
+ message: errors.canonicalUrl
661
+ }
662
+ )
490
663
  ] })
491
664
  ] })
492
665
  ] })