@burdenoff/microfe-i18n 2026.526.1 → 2026.528.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.
@@ -31,9 +31,11 @@ var u = ({ mode: u }) => {
31
31
  className: "space-y-6",
32
32
  children: [
33
33
  /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
34
+ htmlFor: "import-format",
34
35
  className: "mb-2 block text-sm font-medium text-content-primary",
35
36
  children: f("i18n.import.fields.format", "Select Format")
36
37
  }), /* @__PURE__ */ l("select", {
38
+ id: "import-format",
37
39
  value: g,
38
40
  onChange: (e) => _(e.target.value),
39
41
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
@@ -61,13 +63,16 @@ var u = ({ mode: u }) => {
61
63
  ]
62
64
  })] }),
63
65
  /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
66
+ htmlFor: "import-upload-file",
64
67
  className: "mb-2 block text-sm font-medium text-content-primary",
65
68
  children: f("i18n.import.fields.uploadFile", "Upload File")
66
69
  }), /* @__PURE__ */ l("div", {
67
70
  className: "relative rounded-lg border-2 border-dashed border-border bg-surface p-8 text-center transition-colors hover:border-accent-primary",
68
71
  children: [
69
72
  /* @__PURE__ */ c("input", {
73
+ id: "import-upload-file",
70
74
  type: "file",
75
+ "aria-label": f("i18n.import.fields.uploadFile", "Upload File"),
71
76
  onChange: (e) => {
72
77
  let t = e.target.files?.[0];
73
78
  t && y(t);
@@ -89,9 +94,11 @@ var u = ({ mode: u }) => {
89
94
  /* @__PURE__ */ l("div", {
90
95
  className: "grid grid-cols-2 gap-4",
91
96
  children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
97
+ htmlFor: "import-product",
92
98
  className: "mb-2 block text-sm font-medium text-content-primary",
93
99
  children: f("i18n.import.fields.product", "Product")
94
100
  }), /* @__PURE__ */ l("select", {
101
+ id: "import-product",
95
102
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
96
103
  children: [
97
104
  /* @__PURE__ */ c("option", {
@@ -108,9 +115,11 @@ var u = ({ mode: u }) => {
108
115
  })
109
116
  ]
110
117
  })] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
118
+ htmlFor: "import-module",
111
119
  className: "mb-2 block text-sm font-medium text-content-primary",
112
120
  children: f("i18n.import.fields.module", "Module")
113
121
  }), /* @__PURE__ */ l("select", {
122
+ id: "import-module",
114
123
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
115
124
  children: [
116
125
  /* @__PURE__ */ c("option", {
@@ -129,9 +138,11 @@ var u = ({ mode: u }) => {
129
138
  })] })]
130
139
  }),
131
140
  /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
141
+ htmlFor: "import-target-language",
132
142
  className: "mb-2 block text-sm font-medium text-content-primary",
133
143
  children: f("i18n.import.fields.targetLanguage", "Target Language")
134
144
  }), /* @__PURE__ */ l("select", {
145
+ id: "import-target-language",
135
146
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
136
147
  children: [
137
148
  /* @__PURE__ */ c("option", {
@@ -156,6 +167,7 @@ var u = ({ mode: u }) => {
156
167
  children: [/* @__PURE__ */ c("input", {
157
168
  type: "checkbox",
158
169
  id: "create-namespaces",
170
+ "aria-label": f("i18n.import.options.createNamespaces", "Create missing namespaces automatically"),
159
171
  defaultChecked: !0,
160
172
  className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
161
173
  }), /* @__PURE__ */ c("label", {
@@ -169,6 +181,7 @@ var u = ({ mode: u }) => {
169
181
  children: [/* @__PURE__ */ c("input", {
170
182
  type: "checkbox",
171
183
  id: "update-existing",
184
+ "aria-label": f("i18n.import.options.updateExisting", "Update existing translations"),
172
185
  defaultChecked: !0,
173
186
  className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
174
187
  }), /* @__PURE__ */ c("label", {
@@ -182,6 +195,7 @@ var u = ({ mode: u }) => {
182
195
  children: [/* @__PURE__ */ c("input", {
183
196
  type: "checkbox",
184
197
  id: "skip-errors",
198
+ "aria-label": f("i18n.import.options.skipErrors", "Skip validation errors (import valid only)"),
185
199
  className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
186
200
  }), /* @__PURE__ */ c("label", {
187
201
  htmlFor: "skip-errors",
@@ -213,16 +227,17 @@ var u = ({ mode: u }) => {
213
227
  }),
214
228
  p.errors.length > 0 && /* @__PURE__ */ c("div", {
215
229
  className: "mt-3 space-y-1",
216
- children: p.errors.map((t, n) => /* @__PURE__ */ l("div", {
230
+ children: p.errors.map((t) => /* @__PURE__ */ l("div", {
217
231
  className: "flex items-start gap-2 text-xs text-error",
218
232
  children: [/* @__PURE__ */ c(e, { className: "mt-0.5 size-3 flex-shrink-0" }), /* @__PURE__ */ c("span", { children: t.message })]
219
- }, n))
233
+ }, `${t.row ?? "x"}:${t.key ?? "x"}:${t.field ?? "x"}:${t.message}`))
220
234
  })
221
235
  ]
222
236
  }),
223
237
  /* @__PURE__ */ l("div", {
224
238
  className: "flex items-center gap-3",
225
239
  children: [/* @__PURE__ */ l("button", {
240
+ type: "button",
226
241
  onClick: () => {
227
242
  v && (m(g, "job-123"), console.log("Starting import:", v.name, g));
228
243
  },
@@ -230,6 +245,7 @@ var u = ({ mode: u }) => {
230
245
  className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover disabled:opacity-50",
231
246
  children: [/* @__PURE__ */ c(r, { className: "size-4" }), f("i18n.import.actions.start", "Start Import")]
232
247
  }), p.jobId && /* @__PURE__ */ c("button", {
248
+ type: "button",
233
249
  onClick: h,
234
250
  className: "rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-content-primary hover:bg-surface-elevated",
235
251
  children: f("i18n.import.actions.reset", "Reset")
@@ -240,9 +256,11 @@ var u = ({ mode: u }) => {
240
256
  className: "space-y-6",
241
257
  children: [
242
258
  /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
259
+ htmlFor: "export-format",
243
260
  className: "mb-2 block text-sm font-medium text-content-primary",
244
261
  children: f("i18n.export.fields.format", "Export Format")
245
262
  }), /* @__PURE__ */ l("select", {
263
+ id: "export-format",
246
264
  value: g,
247
265
  onChange: (e) => _(e.target.value),
248
266
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
@@ -272,9 +290,11 @@ var u = ({ mode: u }) => {
272
290
  /* @__PURE__ */ l("div", {
273
291
  className: "grid grid-cols-2 gap-4",
274
292
  children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
293
+ htmlFor: "export-product",
275
294
  className: "mb-2 block text-sm font-medium text-content-primary",
276
295
  children: f("i18n.export.fields.product", "Product")
277
296
  }), /* @__PURE__ */ l("select", {
297
+ id: "export-product",
278
298
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
279
299
  children: [
280
300
  /* @__PURE__ */ c("option", {
@@ -291,9 +311,11 @@ var u = ({ mode: u }) => {
291
311
  })
292
312
  ]
293
313
  })] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
314
+ htmlFor: "export-language",
294
315
  className: "mb-2 block text-sm font-medium text-content-primary",
295
316
  children: f("i18n.export.fields.language", "Language")
296
317
  }), /* @__PURE__ */ l("select", {
318
+ id: "export-language",
297
319
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
298
320
  children: [
299
321
  /* @__PURE__ */ c("option", {
@@ -318,6 +340,7 @@ var u = ({ mode: u }) => {
318
340
  children: [/* @__PURE__ */ c("input", {
319
341
  type: "checkbox",
320
342
  id: "include-metadata",
343
+ "aria-label": f("i18n.export.options.includeMetadata", "Include metadata"),
321
344
  className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
322
345
  }), /* @__PURE__ */ c("label", {
323
346
  htmlFor: "include-metadata",
@@ -329,6 +352,7 @@ var u = ({ mode: u }) => {
329
352
  children: [/* @__PURE__ */ c("input", {
330
353
  type: "checkbox",
331
354
  id: "published-only",
355
+ "aria-label": f("i18n.export.options.publishedOnly", "Published translations only"),
332
356
  defaultChecked: !0,
333
357
  className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
334
358
  }), /* @__PURE__ */ c("label", {
@@ -352,6 +376,7 @@ var u = ({ mode: u }) => {
352
376
  })]
353
377
  }),
354
378
  /* @__PURE__ */ l("button", {
379
+ type: "button",
355
380
  onClick: () => {
356
381
  console.log("Starting export:", g);
357
382
  },
@@ -40,6 +40,7 @@ var c = () => {
40
40
  children: l("i18n.languages.title", "Languages")
41
41
  })]
42
42
  }), /* @__PURE__ */ s("button", {
43
+ type: "button",
43
44
  className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover",
44
45
  children: [/* @__PURE__ */ o(t, { className: "size-4" }), l("i18n.languages.actions.add", "Add Language")]
45
46
  })]
@@ -54,6 +55,7 @@ var c = () => {
54
55
  className: "relative flex-1",
55
56
  children: [/* @__PURE__ */ o(n, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-content-secondary" }), /* @__PURE__ */ o("input", {
56
57
  type: "text",
58
+ "aria-label": l("i18n.languages.filters.searchAriaLabel", "Search languages"),
57
59
  placeholder: l("i18n.languages.filters.searchPlaceholder", "Search languages..."),
58
60
  value: p,
59
61
  onChange: (e) => g(e.target.value),
@@ -61,6 +63,7 @@ var c = () => {
61
63
  })]
62
64
  }),
63
65
  /* @__PURE__ */ s("select", {
66
+ "aria-label": l("i18n.languages.filters.status.label", "Filter by status"),
64
67
  value: u.status,
65
68
  onChange: (e) => d({ status: e.target.value }),
66
69
  className: "rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
@@ -80,6 +83,7 @@ var c = () => {
80
83
  ]
81
84
  }),
82
85
  /* @__PURE__ */ s("select", {
86
+ "aria-label": l("i18n.languages.filters.direction.label", "Filter by direction"),
83
87
  value: u.direction,
84
88
  onChange: (e) => d({ direction: e.target.value }),
85
89
  className: "rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
@@ -105,9 +109,10 @@ var c = () => {
105
109
  className: "flex-1 overflow-auto p-6",
106
110
  children: /* @__PURE__ */ o("div", {
107
111
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
108
- children: h.map((e) => /* @__PURE__ */ o("div", {
112
+ children: h.map((e) => /* @__PURE__ */ o("button", {
113
+ type: "button",
109
114
  onClick: () => f(e),
110
- className: "cursor-pointer rounded-lg border border-border bg-surface-elevated p-4 transition-all hover:border-accent-primary hover:shadow-md",
115
+ className: "cursor-pointer rounded-lg border border-border bg-surface-elevated p-4 text-left transition-all hover:border-accent-primary hover:shadow-md",
111
116
  children: /* @__PURE__ */ s("div", {
112
117
  className: "flex items-start justify-between",
113
118
  children: [/* @__PURE__ */ s("div", {
@@ -3,9 +3,10 @@ import { Settings as t } from "../../node_modules/lucide-react/dist/esm/icons/se
3
3
  import { Trash2 as n } from "../../node_modules/lucide-react/dist/esm/icons/trash-2.js";
4
4
  import { useState as r } from "react";
5
5
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { OptionalFields as o } from "@burdenoff/fe-libs/ui";
6
7
  //#region src/i18n/pages/LocaleConfigPage.tsx
7
- var o = () => {
8
- let [o, s] = r({
8
+ var s = () => {
9
+ let [s, c] = r({
9
10
  code: "es-ES",
10
11
  name: "Spanish",
11
12
  nativeName: "Español",
@@ -25,13 +26,13 @@ var o = () => {
25
26
  few: !1,
26
27
  many: !1
27
28
  }
28
- }), c = (e, t) => {
29
- s((n) => ({
29
+ }), l = (e, t) => {
30
+ c((n) => ({
30
31
  ...n,
31
32
  [e]: t
32
33
  }));
33
- }, l = (e, t) => {
34
- s((n) => ({
34
+ }, u = (e, t) => {
35
+ c((n) => ({
35
36
  ...n,
36
37
  pluralRules: {
37
38
  ...n.pluralRules,
@@ -53,20 +54,22 @@ var o = () => {
53
54
  }), /* @__PURE__ */ a("p", {
54
55
  className: "mt-1 text-sm text-content-secondary",
55
56
  children: [
56
- o.name,
57
+ s.name,
57
58
  " (",
58
- o.nativeName,
59
+ s.nativeName,
59
60
  ")"
60
61
  ]
61
62
  })] })]
62
63
  }), /* @__PURE__ */ a("div", {
63
64
  className: "flex items-center gap-2",
64
65
  children: [/* @__PURE__ */ a("button", {
66
+ type: "button",
65
67
  className: "flex items-center gap-2 rounded-md border border-error bg-surface px-4 py-2 text-sm font-medium text-error hover:bg-error/10",
66
68
  children: [/* @__PURE__ */ i(n, { className: "size-4" }), "Delete Language"]
67
69
  }), /* @__PURE__ */ a("button", {
70
+ type: "button",
68
71
  onClick: () => {
69
- console.log("Saving locale config:", o);
72
+ console.log("Saving locale config:", s);
70
73
  },
71
74
  className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover",
72
75
  children: [/* @__PURE__ */ i(e, { className: "size-4" }), "Save Changes"]
@@ -87,39 +90,51 @@ var o = () => {
87
90
  className: "grid grid-cols-2 gap-4",
88
91
  children: [
89
92
  /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
93
+ htmlFor: "locale-language-code",
90
94
  className: "mb-2 block text-sm font-medium text-content-primary",
91
95
  children: "Language Code"
92
96
  }), /* @__PURE__ */ i("input", {
97
+ id: "locale-language-code",
93
98
  type: "text",
94
- value: o.code,
95
- onChange: (e) => c("code", e.target.value),
99
+ "aria-label": "Language Code",
100
+ value: s.code,
101
+ onChange: (e) => l("code", e.target.value),
96
102
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
97
103
  })] }),
98
104
  /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
105
+ htmlFor: "locale-name",
99
106
  className: "mb-2 block text-sm font-medium text-content-primary",
100
107
  children: "Name"
101
108
  }), /* @__PURE__ */ i("input", {
109
+ id: "locale-name",
102
110
  type: "text",
103
- value: o.name,
104
- onChange: (e) => c("name", e.target.value),
111
+ "aria-label": "Name",
112
+ value: s.name,
113
+ onChange: (e) => l("name", e.target.value),
105
114
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
106
115
  })] }),
107
116
  /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
117
+ htmlFor: "locale-native-name",
108
118
  className: "mb-2 block text-sm font-medium text-content-primary",
109
119
  children: "Native Name"
110
120
  }), /* @__PURE__ */ i("input", {
121
+ id: "locale-native-name",
111
122
  type: "text",
112
- value: o.nativeName,
113
- onChange: (e) => c("nativeName", e.target.value),
123
+ "aria-label": "Native Name",
124
+ value: s.nativeName,
125
+ onChange: (e) => l("nativeName", e.target.value),
114
126
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
115
127
  })] }),
116
128
  /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
129
+ htmlFor: "locale-region",
117
130
  className: "mb-2 block text-sm font-medium text-content-primary",
118
131
  children: "Region"
119
132
  }), /* @__PURE__ */ i("input", {
133
+ id: "locale-region",
120
134
  type: "text",
121
- value: o.region,
122
- onChange: (e) => c("region", e.target.value),
135
+ "aria-label": "Region",
136
+ value: s.region,
137
+ onChange: (e) => l("region", e.target.value),
123
138
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
124
139
  })] })
125
140
  ]
@@ -129,8 +144,9 @@ var o = () => {
129
144
  children: [/* @__PURE__ */ i("input", {
130
145
  type: "checkbox",
131
146
  id: "is-default",
132
- checked: o.isDefault,
133
- onChange: (e) => c("isDefault", e.target.checked),
147
+ "aria-label": "Set as default language",
148
+ checked: s.isDefault,
149
+ onChange: (e) => l("isDefault", e.target.checked),
134
150
  className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
135
151
  }), /* @__PURE__ */ i("label", {
136
152
  htmlFor: "is-default",
@@ -150,8 +166,9 @@ var o = () => {
150
166
  type: "radio",
151
167
  id: "ltr",
152
168
  name: "direction",
153
- checked: o.direction === "ltr",
154
- onChange: () => c("direction", "ltr"),
169
+ "aria-label": "LTR (Left to Right)",
170
+ checked: s.direction === "ltr",
171
+ onChange: () => l("direction", "ltr"),
155
172
  className: "size-4 border-border text-accent-primary focus:ring-accent-primary"
156
173
  }), /* @__PURE__ */ i("label", {
157
174
  htmlFor: "ltr",
@@ -164,8 +181,9 @@ var o = () => {
164
181
  type: "radio",
165
182
  id: "rtl",
166
183
  name: "direction",
167
- checked: o.direction === "rtl",
168
- onChange: () => c("direction", "rtl"),
184
+ "aria-label": "RTL (Right to Left)",
185
+ checked: s.direction === "rtl",
186
+ onChange: () => l("direction", "rtl"),
169
187
  className: "size-4 border-border text-accent-primary focus:ring-accent-primary"
170
188
  }), /* @__PURE__ */ i("label", {
171
189
  htmlFor: "rtl",
@@ -174,69 +192,78 @@ var o = () => {
174
192
  })]
175
193
  })]
176
194
  })] }),
177
- /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("h2", {
178
- className: "mb-4 text-lg font-semibold text-content-primary",
179
- children: "Fallback Chain"
180
- }), /* @__PURE__ */ a("div", {
181
- className: "space-y-2",
182
- children: [
183
- /* @__PURE__ */ i("div", {
184
- className: "rounded-lg border border-border bg-surface-elevated p-3",
185
- children: /* @__PURE__ */ a("div", {
186
- className: "flex items-center justify-between",
187
- children: [/* @__PURE__ */ i("span", {
188
- className: "text-sm text-content-primary",
189
- children: "1. Spanish (es-ES)"
190
- }), /* @__PURE__ */ i("span", {
191
- className: "text-xs text-content-tertiary",
192
- children: "Current"
193
- })]
195
+ /* @__PURE__ */ a(o, {
196
+ title: "Advanced settings",
197
+ description: "ICU plural-form overrides and fallback locale rules.",
198
+ children: [/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("h2", {
199
+ className: "mb-4 text-lg font-semibold text-content-primary",
200
+ children: "Fallback Chain"
201
+ }), /* @__PURE__ */ a("div", {
202
+ className: "space-y-2",
203
+ children: [
204
+ /* @__PURE__ */ i("div", {
205
+ className: "rounded-lg border border-border bg-surface-elevated p-3",
206
+ children: /* @__PURE__ */ a("div", {
207
+ className: "flex items-center justify-between",
208
+ children: [/* @__PURE__ */ i("span", {
209
+ className: "text-sm text-content-primary",
210
+ children: "1. Spanish (es-ES)"
211
+ }), /* @__PURE__ */ i("span", {
212
+ className: "text-xs text-content-tertiary",
213
+ children: "Current"
214
+ })]
215
+ })
216
+ }),
217
+ s.fallbackLanguages.map((e, t) => /* @__PURE__ */ i("div", {
218
+ className: "rounded-lg border border-border bg-surface p-3",
219
+ children: /* @__PURE__ */ a("div", {
220
+ className: "flex items-center justify-between",
221
+ children: [/* @__PURE__ */ a("span", {
222
+ className: "text-sm text-content-primary",
223
+ children: [
224
+ t + 2,
225
+ ".",
226
+ " ",
227
+ e === "es" ? "Spanish (es)" : "English (en)"
228
+ ]
229
+ }), /* @__PURE__ */ i("button", {
230
+ type: "button",
231
+ className: "text-xs text-error hover:underline",
232
+ children: "Remove"
233
+ })]
234
+ })
235
+ }, e)),
236
+ /* @__PURE__ */ i("button", {
237
+ type: "button",
238
+ className: "w-full rounded-lg border-2 border-dashed border-border bg-surface p-3 text-sm text-content-secondary transition-colors hover:border-accent-primary hover:text-accent-primary",
239
+ children: "+ Add Fallback Language"
194
240
  })
195
- }),
196
- o.fallbackLanguages.map((e, t) => /* @__PURE__ */ i("div", {
197
- className: "rounded-lg border border-border bg-surface p-3",
198
- children: /* @__PURE__ */ a("div", {
199
- className: "flex items-center justify-between",
200
- children: [/* @__PURE__ */ a("span", {
241
+ ]
242
+ })] }), /* @__PURE__ */ a("div", {
243
+ className: "mt-6",
244
+ children: [/* @__PURE__ */ i("h2", {
245
+ className: "mb-4 text-lg font-semibold text-content-primary",
246
+ children: "Plural Rules (CLDR-based)"
247
+ }), /* @__PURE__ */ i("div", {
248
+ className: "grid grid-cols-3 gap-3",
249
+ children: Object.entries(s.pluralRules).map(([e, t]) => /* @__PURE__ */ a("div", {
250
+ className: "flex items-center gap-2 rounded-lg border border-border bg-surface-elevated p-3",
251
+ children: [/* @__PURE__ */ i("input", {
252
+ type: "checkbox",
253
+ id: `plural-${e}`,
254
+ "aria-label": `Plural form: ${e}`,
255
+ checked: t,
256
+ onChange: (t) => u(e, t.target.checked),
257
+ className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
258
+ }), /* @__PURE__ */ i("label", {
259
+ htmlFor: `plural-${e}`,
201
260
  className: "text-sm text-content-primary",
202
- children: [
203
- t + 2,
204
- ".",
205
- " ",
206
- e === "es" ? "Spanish (es)" : "English (en)"
207
- ]
208
- }), /* @__PURE__ */ i("button", {
209
- className: "text-xs text-error hover:underline",
210
- children: "Remove"
261
+ children: e
211
262
  })]
212
- })
213
- }, e)),
214
- /* @__PURE__ */ i("button", {
215
- className: "w-full rounded-lg border-2 border-dashed border-border bg-surface p-3 text-sm text-content-secondary transition-colors hover:border-accent-primary hover:text-accent-primary",
216
- children: "+ Add Fallback Language"
217
- })
218
- ]
219
- })] }),
220
- /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("h2", {
221
- className: "mb-4 text-lg font-semibold text-content-primary",
222
- children: "Plural Rules (CLDR-based)"
223
- }), /* @__PURE__ */ i("div", {
224
- className: "grid grid-cols-3 gap-3",
225
- children: Object.entries(o.pluralRules).map(([e, t]) => /* @__PURE__ */ a("div", {
226
- className: "flex items-center gap-2 rounded-lg border border-border bg-surface-elevated p-3",
227
- children: [/* @__PURE__ */ i("input", {
228
- type: "checkbox",
229
- id: `plural-${e}`,
230
- checked: t,
231
- onChange: (t) => l(e, t.target.checked),
232
- className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
233
- }), /* @__PURE__ */ i("label", {
234
- htmlFor: `plural-${e}`,
235
- className: "text-sm text-content-primary",
236
- children: e
263
+ }, e))
237
264
  })]
238
- }, e))
239
- })] }),
265
+ })]
266
+ }),
240
267
  /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("h2", {
241
268
  className: "mb-4 text-lg font-semibold text-content-primary",
242
269
  children: "Formatting"
@@ -245,13 +272,16 @@ var o = () => {
245
272
  children: [
246
273
  /* @__PURE__ */ a("div", { children: [
247
274
  /* @__PURE__ */ i("label", {
275
+ htmlFor: "locale-date-format",
248
276
  className: "mb-2 block text-sm font-medium text-content-primary",
249
277
  children: "Date Format"
250
278
  }),
251
279
  /* @__PURE__ */ i("input", {
280
+ id: "locale-date-format",
252
281
  type: "text",
253
- value: o.dateFormat,
254
- onChange: (e) => c("dateFormat", e.target.value),
282
+ "aria-label": "Date Format",
283
+ value: s.dateFormat,
284
+ onChange: (e) => l("dateFormat", e.target.value),
255
285
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
256
286
  }),
257
287
  /* @__PURE__ */ i("p", {
@@ -261,13 +291,16 @@ var o = () => {
261
291
  ] }),
262
292
  /* @__PURE__ */ a("div", { children: [
263
293
  /* @__PURE__ */ i("label", {
294
+ htmlFor: "locale-time-format",
264
295
  className: "mb-2 block text-sm font-medium text-content-primary",
265
296
  children: "Time Format"
266
297
  }),
267
298
  /* @__PURE__ */ i("input", {
299
+ id: "locale-time-format",
268
300
  type: "text",
269
- value: o.timeFormat,
270
- onChange: (e) => c("timeFormat", e.target.value),
301
+ "aria-label": "Time Format",
302
+ value: s.timeFormat,
303
+ onChange: (e) => l("timeFormat", e.target.value),
271
304
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
272
305
  }),
273
306
  /* @__PURE__ */ i("p", {
@@ -277,13 +310,16 @@ var o = () => {
277
310
  ] }),
278
311
  /* @__PURE__ */ a("div", { children: [
279
312
  /* @__PURE__ */ i("label", {
313
+ htmlFor: "locale-number-format",
280
314
  className: "mb-2 block text-sm font-medium text-content-primary",
281
315
  children: "Number Format"
282
316
  }),
283
317
  /* @__PURE__ */ i("input", {
318
+ id: "locale-number-format",
284
319
  type: "text",
285
- value: o.numberFormat,
286
- onChange: (e) => c("numberFormat", e.target.value),
320
+ "aria-label": "Number Format",
321
+ value: s.numberFormat,
322
+ onChange: (e) => l("numberFormat", e.target.value),
287
323
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
288
324
  }),
289
325
  /* @__PURE__ */ i("p", {
@@ -293,13 +329,16 @@ var o = () => {
293
329
  ] }),
294
330
  /* @__PURE__ */ a("div", { children: [
295
331
  /* @__PURE__ */ i("label", {
332
+ htmlFor: "locale-currency-code",
296
333
  className: "mb-2 block text-sm font-medium text-content-primary",
297
334
  children: "Currency Code"
298
335
  }),
299
336
  /* @__PURE__ */ i("input", {
337
+ id: "locale-currency-code",
300
338
  type: "text",
301
- value: o.currencyCode,
302
- onChange: (e) => c("currencyCode", e.target.value),
339
+ "aria-label": "Currency Code",
340
+ value: s.currencyCode,
341
+ onChange: (e) => l("currencyCode", e.target.value),
303
342
  className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
304
343
  }),
305
344
  /* @__PURE__ */ i("p", {
@@ -315,4 +354,4 @@ var o = () => {
315
354
  });
316
355
  };
317
356
  //#endregion
318
- export { o as LocaleConfigPage };
357
+ export { s as LocaleConfigPage };
@@ -61,6 +61,7 @@ var l = () => {
61
61
  children: u("i18n.products.title", "Products")
62
62
  })]
63
63
  }), /* @__PURE__ */ c("button", {
64
+ type: "button",
64
65
  className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover",
65
66
  children: [/* @__PURE__ */ s(n, { className: "size-4" }), u("i18n.products.actions.add", "Add Product")]
66
67
  })]
@@ -72,6 +73,7 @@ var l = () => {
72
73
  className: "relative",
73
74
  children: [/* @__PURE__ */ s(r, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-content-secondary" }), /* @__PURE__ */ s("input", {
74
75
  type: "text",
76
+ "aria-label": u("i18n.products.search.ariaLabel", "Search products"),
75
77
  placeholder: u("i18n.products.search.placeholder", "Search products..."),
76
78
  value: f,
77
79
  onChange: (e) => p(e.target.value),
@@ -83,9 +85,10 @@ var l = () => {
83
85
  className: "flex-1 overflow-auto p-6",
84
86
  children: /* @__PURE__ */ s("div", {
85
87
  className: "space-y-4",
86
- children: m.map((t) => /* @__PURE__ */ s("div", {
88
+ children: m.map((t) => /* @__PURE__ */ s("button", {
89
+ type: "button",
87
90
  onClick: () => d(t),
88
- className: "cursor-pointer rounded-lg border border-border bg-surface-elevated p-6 transition-all hover:border-accent-primary hover:shadow-md",
91
+ className: "block w-full cursor-pointer rounded-lg border border-border bg-surface-elevated p-6 text-left transition-all hover:border-accent-primary hover:shadow-md",
89
92
  children: /* @__PURE__ */ s("div", {
90
93
  className: "flex items-start justify-between",
91
94
  children: /* @__PURE__ */ c("div", {
@@ -23,9 +23,11 @@ var s = () => {
23
23
  }), /* @__PURE__ */ o("div", {
24
24
  className: "flex items-center gap-2",
25
25
  children: [/* @__PURE__ */ o("button", {
26
+ type: "button",
26
27
  className: "flex items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-content-primary hover:bg-surface-elevated",
27
28
  children: [/* @__PURE__ */ a(t, { className: "size-4" }), c("i18n.progress.actions.generateReport", "Generate Report")]
28
29
  }), /* @__PURE__ */ o("button", {
30
+ type: "button",
29
31
  className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover",
30
32
  children: [/* @__PURE__ */ a(e, { className: "size-4" }), c("i18n.progress.actions.export", "Export")]
31
33
  })]
@@ -86,6 +88,7 @@ var s = () => {
86
88
  children: [/* @__PURE__ */ a("input", {
87
89
  type: "checkbox",
88
90
  id: "show-percentages",
91
+ "aria-label": c("i18n.progress.filters.showPercentages", "Show Percentages"),
89
92
  checked: l.showPercentages,
90
93
  onChange: (e) => u({ showPercentages: e.target.checked }),
91
94
  className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
@@ -1,11 +1,11 @@
1
1
  import { CircleCheckBig as e } from "../../node_modules/lucide-react/dist/esm/icons/circle-check-big.js";
2
2
  import { CircleX as t } from "../../node_modules/lucide-react/dist/esm/icons/circle-x.js";
3
3
  import { MessageSquare as n } from "../../node_modules/lucide-react/dist/esm/icons/message-square.js";
4
- import { useState as r } from "react";
5
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
4
+ import { useRef as r, useState as i } from "react";
5
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
6
6
  //#region src/i18n/pages/ReviewQueuePage.tsx
7
- var s = () => {
8
- let [s, c] = r([]), [l, u] = r(""), [d, f] = r(!1), p = [
7
+ var c = () => {
8
+ let [c, l] = i([]), u = r(!1), d = [
9
9
  {
10
10
  id: "1",
11
11
  key: "auth.signIn.emailLabel",
@@ -33,84 +33,88 @@ var s = () => {
33
33
  submittedBy: "hans@example.com",
34
34
  submittedAt: "1 day ago"
35
35
  }
36
- ], m = (e) => {
37
- c((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
38
- }, h = (e) => {
39
- console.log(`${e} translations:`, s), c([]);
36
+ ], f = (e) => {
37
+ l((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
38
+ }, p = (e) => {
39
+ console.log(`${e} translations:`, c), l([]);
40
40
  };
41
- return /* @__PURE__ */ o("div", {
41
+ return /* @__PURE__ */ s("div", {
42
42
  className: "flex h-full flex-col",
43
43
  children: [
44
- /* @__PURE__ */ a("div", {
44
+ /* @__PURE__ */ o("div", {
45
45
  className: "border-b border-border bg-surface-elevated p-6",
46
- children: /* @__PURE__ */ o("div", {
46
+ children: /* @__PURE__ */ s("div", {
47
47
  className: "flex items-center justify-between",
48
- children: [/* @__PURE__ */ o("div", {
48
+ children: [/* @__PURE__ */ s("div", {
49
49
  className: "flex items-center gap-3",
50
- children: [/* @__PURE__ */ a(e, { className: "size-6 text-accent-primary" }), /* @__PURE__ */ a("h1", {
50
+ children: [/* @__PURE__ */ o(e, { className: "size-6 text-accent-primary" }), /* @__PURE__ */ o("h1", {
51
51
  className: "text-2xl font-semibold text-content-primary",
52
52
  children: "Review Queue"
53
53
  })]
54
- }), /* @__PURE__ */ a("div", {
54
+ }), /* @__PURE__ */ o("div", {
55
55
  className: "flex items-center gap-2",
56
- children: s.length > 0 && /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("button", {
57
- onClick: () => h("approve"),
56
+ children: c.length > 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ s("button", {
57
+ type: "button",
58
+ onClick: () => p("approve"),
58
59
  className: "flex items-center gap-2 rounded-md bg-success px-4 py-2 text-sm font-medium text-white hover:bg-success/90",
59
60
  children: [
60
- /* @__PURE__ */ a(e, { className: "size-4" }),
61
+ /* @__PURE__ */ o(e, { className: "size-4" }),
61
62
  "Approve Selected (",
62
- s.length,
63
+ c.length,
63
64
  ")"
64
65
  ]
65
- }), /* @__PURE__ */ o("button", {
66
- onClick: () => h("reject"),
66
+ }), /* @__PURE__ */ s("button", {
67
+ type: "button",
68
+ onClick: () => p("reject"),
67
69
  className: "flex items-center gap-2 rounded-md bg-error px-4 py-2 text-sm font-medium text-white hover:bg-error/90",
68
70
  children: [
69
- /* @__PURE__ */ a(t, { className: "size-4" }),
71
+ /* @__PURE__ */ o(t, { className: "size-4" }),
70
72
  "Reject Selected (",
71
- s.length,
73
+ c.length,
72
74
  ")"
73
75
  ]
74
76
  })] })
75
77
  })]
76
78
  })
77
79
  }),
78
- /* @__PURE__ */ a("div", {
80
+ /* @__PURE__ */ o("div", {
79
81
  className: "border-b border-border bg-surface p-4",
80
- children: /* @__PURE__ */ o("div", {
82
+ children: /* @__PURE__ */ s("div", {
81
83
  className: "flex items-center gap-4",
82
- children: [/* @__PURE__ */ o("select", {
84
+ children: [/* @__PURE__ */ s("select", {
85
+ "aria-label": "Filter by review status",
83
86
  className: "rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
84
87
  children: [
85
- /* @__PURE__ */ a("option", {
88
+ /* @__PURE__ */ o("option", {
86
89
  value: "pending",
87
90
  children: "Pending Review"
88
91
  }),
89
- /* @__PURE__ */ a("option", {
92
+ /* @__PURE__ */ o("option", {
90
93
  value: "my-assignments",
91
94
  children: "My Assignments"
92
95
  }),
93
- /* @__PURE__ */ a("option", {
96
+ /* @__PURE__ */ o("option", {
94
97
  value: "all",
95
98
  children: "All"
96
99
  })
97
100
  ]
98
- }), /* @__PURE__ */ o("select", {
101
+ }), /* @__PURE__ */ s("select", {
102
+ "aria-label": "Filter by language",
99
103
  className: "rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
100
104
  children: [
101
- /* @__PURE__ */ a("option", {
105
+ /* @__PURE__ */ o("option", {
102
106
  value: "all",
103
107
  children: "All Languages"
104
108
  }),
105
- /* @__PURE__ */ a("option", {
109
+ /* @__PURE__ */ o("option", {
106
110
  value: "es-ES",
107
111
  children: "Spanish"
108
112
  }),
109
- /* @__PURE__ */ a("option", {
113
+ /* @__PURE__ */ o("option", {
110
114
  value: "fr-FR",
111
115
  children: "French"
112
116
  }),
113
- /* @__PURE__ */ a("option", {
117
+ /* @__PURE__ */ o("option", {
114
118
  value: "de-DE",
115
119
  children: "German"
116
120
  })
@@ -118,51 +122,52 @@ var s = () => {
118
122
  })]
119
123
  })
120
124
  }),
121
- /* @__PURE__ */ o("div", {
125
+ /* @__PURE__ */ s("div", {
122
126
  className: "flex-1 overflow-auto p-6",
123
- children: [/* @__PURE__ */ a("div", {
127
+ children: [/* @__PURE__ */ o("div", {
124
128
  className: "space-y-4",
125
- children: p.map((r) => /* @__PURE__ */ a("div", {
129
+ children: d.map((r) => /* @__PURE__ */ o("div", {
126
130
  className: "rounded-lg border border-border bg-surface-elevated p-6 transition-all hover:border-accent-primary",
127
- children: /* @__PURE__ */ o("div", {
131
+ children: /* @__PURE__ */ s("div", {
128
132
  className: "flex items-start gap-4",
129
- children: [/* @__PURE__ */ a("input", {
133
+ children: [/* @__PURE__ */ o("input", {
130
134
  type: "checkbox",
131
- checked: s.includes(r.id),
132
- onChange: () => m(r.id),
135
+ "aria-label": `Select translation ${r.key}`,
136
+ checked: c.includes(r.id),
137
+ onChange: () => f(r.id),
133
138
  className: "mt-1 size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
134
- }), /* @__PURE__ */ o("div", {
139
+ }), /* @__PURE__ */ s("div", {
135
140
  className: "flex-1",
136
141
  children: [
137
- /* @__PURE__ */ a("div", {
142
+ /* @__PURE__ */ o("div", {
138
143
  className: "mb-3 flex items-start justify-between",
139
- children: /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("h3", {
144
+ children: /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("h3", {
140
145
  className: "font-medium text-content-primary",
141
146
  children: r.key
142
- }), /* @__PURE__ */ a("span", {
147
+ }), /* @__PURE__ */ o("span", {
143
148
  className: "mt-1 inline-block rounded bg-accent-primary/10 px-2 py-0.5 text-xs font-medium text-accent-primary",
144
149
  children: r.languageCode
145
150
  })] })
146
151
  }),
147
- /* @__PURE__ */ o("div", {
152
+ /* @__PURE__ */ s("div", {
148
153
  className: "space-y-3",
149
- children: [/* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("p", {
154
+ children: [/* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("p", {
150
155
  className: "mb-1 text-xs font-medium text-content-tertiary",
151
156
  children: "Source"
152
- }), /* @__PURE__ */ a("p", {
157
+ }), /* @__PURE__ */ o("p", {
153
158
  className: "text-sm text-content-secondary",
154
159
  children: r.sourceValue
155
- })] }), /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("p", {
160
+ })] }), /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("p", {
156
161
  className: "mb-1 text-xs font-medium text-content-tertiary",
157
162
  children: "Target"
158
- }), /* @__PURE__ */ a("p", {
163
+ }), /* @__PURE__ */ o("p", {
159
164
  className: "text-sm text-content-primary",
160
165
  children: r.targetValue
161
166
  })] })]
162
167
  }),
163
- /* @__PURE__ */ o("div", {
168
+ /* @__PURE__ */ s("div", {
164
169
  className: "mt-4 flex items-center justify-between",
165
- children: [/* @__PURE__ */ o("p", {
170
+ children: [/* @__PURE__ */ s("p", {
166
171
  className: "text-xs text-content-tertiary",
167
172
  children: [
168
173
  "Submitted by ",
@@ -170,21 +175,26 @@ var s = () => {
170
175
  " • ",
171
176
  r.submittedAt
172
177
  ]
173
- }), /* @__PURE__ */ o("div", {
178
+ }), /* @__PURE__ */ s("div", {
174
179
  className: "flex items-center gap-2",
175
180
  children: [
176
- /* @__PURE__ */ o("button", {
177
- onClick: () => f(!0),
181
+ /* @__PURE__ */ s("button", {
182
+ type: "button",
183
+ onClick: () => {
184
+ u.current = !0;
185
+ },
178
186
  className: "flex items-center gap-1 rounded-md border border-border bg-surface px-3 py-1.5 text-xs font-medium text-content-primary hover:bg-surface-elevated",
179
- children: [/* @__PURE__ */ a(n, { className: "size-3" }), "Add Notes"]
187
+ children: [/* @__PURE__ */ o(n, { className: "size-3" }), "Add Notes"]
180
188
  }),
181
- /* @__PURE__ */ o("button", {
189
+ /* @__PURE__ */ s("button", {
190
+ type: "button",
182
191
  className: "flex items-center gap-1 rounded-md bg-success px-3 py-1.5 text-xs font-medium text-white hover:bg-success/90",
183
- children: [/* @__PURE__ */ a(e, { className: "size-3" }), "Approve"]
192
+ children: [/* @__PURE__ */ o(e, { className: "size-3" }), "Approve"]
184
193
  }),
185
- /* @__PURE__ */ o("button", {
194
+ /* @__PURE__ */ s("button", {
195
+ type: "button",
186
196
  className: "flex items-center gap-1 rounded-md bg-error px-3 py-1.5 text-xs font-medium text-white hover:bg-error/90",
187
- children: [/* @__PURE__ */ a(t, { className: "size-3" }), "Reject"]
197
+ children: [/* @__PURE__ */ o(t, { className: "size-3" }), "Reject"]
188
198
  })
189
199
  ]
190
200
  })]
@@ -193,11 +203,11 @@ var s = () => {
193
203
  })]
194
204
  })
195
205
  }, r.id))
196
- }), /* @__PURE__ */ o("div", {
206
+ }), /* @__PURE__ */ s("div", {
197
207
  className: "mt-6 text-center text-sm text-content-tertiary",
198
208
  children: [
199
209
  "Showing ",
200
- p.length,
210
+ d.length,
201
211
  " of 47 pending reviews"
202
212
  ]
203
213
  })]
@@ -206,4 +216,4 @@ var s = () => {
206
216
  });
207
217
  };
208
218
  //#endregion
209
- export { s as ReviewQueuePage };
219
+ export { c as ReviewQueuePage };
@@ -37,11 +37,13 @@ var u = () => {
37
37
  className: "flex items-center gap-2",
38
38
  children: [
39
39
  /* @__PURE__ */ c("button", {
40
+ type: "button",
40
41
  onClick: _,
41
42
  className: `rounded-md border px-3 py-2 text-sm font-medium transition-colors ${p ? "border-accent-primary bg-accent-primary/10 text-accent-primary" : "border-border bg-surface text-content-secondary hover:bg-surface-elevated"}`,
42
43
  children: d("i18n.editor.actions.pluralForms", "Plural Forms")
43
44
  }),
44
45
  /* @__PURE__ */ c("button", {
46
+ type: "button",
45
47
  onClick: v,
46
48
  className: `rounded-md border px-3 py-2 text-sm font-medium transition-colors ${m ? "border-accent-primary bg-accent-primary/10 text-accent-primary" : "border-border bg-surface text-content-secondary hover:bg-surface-elevated"}`,
47
49
  children: d("i18n.editor.actions.suggestions", "Suggestions")
@@ -166,6 +168,7 @@ var u = () => {
166
168
  children: [/* @__PURE__ */ l("div", {
167
169
  className: "mb-2 flex items-center justify-between",
168
170
  children: [/* @__PURE__ */ c("label", {
171
+ htmlFor: "editor-translation-value",
169
172
  className: "text-sm font-medium text-content-primary",
170
173
  children: d("i18n.editor.fields.translationValue", "Translation Value")
171
174
  }), /* @__PURE__ */ c("span", {
@@ -176,6 +179,8 @@ var u = () => {
176
179
  })
177
180
  })]
178
181
  }), /* @__PURE__ */ c("textarea", {
182
+ id: "editor-translation-value",
183
+ "aria-label": d("i18n.editor.fields.translationValue", "Translation Value"),
179
184
  value: b,
180
185
  onChange: (e) => x(e.target.value),
181
186
  placeholder: d("i18n.editor.fields.translationPlaceholder", "Enter translation..."),
@@ -187,9 +192,12 @@ var u = () => {
187
192
  /* @__PURE__ */ l("div", {
188
193
  className: "mb-6",
189
194
  children: [/* @__PURE__ */ c("label", {
195
+ htmlFor: "editor-notes",
190
196
  className: "mb-2 block text-sm font-medium text-content-primary",
191
197
  children: d("i18n.editor.fields.notes", "Translation Notes")
192
198
  }), /* @__PURE__ */ c("textarea", {
199
+ id: "editor-notes",
200
+ "aria-label": d("i18n.editor.fields.notes", "Translation Notes"),
193
201
  value: S,
194
202
  onChange: (e) => C(e.target.value),
195
203
  placeholder: d("i18n.editor.fields.notesPlaceholder", "Add notes for reviewers..."),
@@ -200,9 +208,11 @@ var u = () => {
200
208
  /* @__PURE__ */ l("div", {
201
209
  className: "flex items-center gap-3",
202
210
  children: [/* @__PURE__ */ l("button", {
211
+ type: "button",
203
212
  className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover",
204
213
  children: [/* @__PURE__ */ c(r, { className: "size-4" }), d("i18n.editor.actions.saveDraft", "Save Draft")]
205
214
  }), /* @__PURE__ */ l("button", {
215
+ type: "button",
206
216
  className: "flex items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-content-primary hover:bg-surface-elevated",
207
217
  children: [/* @__PURE__ */ c(i, { className: "size-4" }), d("i18n.editor.actions.submitForReview", "Submit for Review")]
208
218
  })]
@@ -222,8 +232,9 @@ var u = () => {
222
232
  }, {
223
233
  value: "Accede a tu cuenta",
224
234
  similarity: 87
225
- }].map((e, t) => /* @__PURE__ */ l("div", {
226
- className: "cursor-pointer rounded-md border border-border bg-surface p-3 transition-all hover:border-accent-primary",
235
+ }].map((e) => /* @__PURE__ */ l("button", {
236
+ type: "button",
237
+ className: "block w-full cursor-pointer rounded-md border border-border bg-surface p-3 text-left transition-all hover:border-accent-primary",
227
238
  onClick: () => x(e.value),
228
239
  children: [/* @__PURE__ */ c("p", {
229
240
  className: "text-sm text-content-primary",
@@ -232,7 +243,7 @@ var u = () => {
232
243
  className: "mt-1 text-xs text-content-tertiary",
233
244
  children: d("i18n.editor.suggestions.match", "{{similarity}}% match", { similarity: e.similarity })
234
245
  })]
235
- }, t))
246
+ }, e.value))
236
247
  })]
237
248
  })]
238
249
  })
@@ -1,15 +1,15 @@
1
1
  import { interpolateFallback as e } from "../utils/i18n.js";
2
- import { createContext as t, useCallback as n, useContext as r, useMemo as i } from "react";
2
+ import { createContext as t, use as n, useCallback as r, useMemo as i } from "react";
3
3
  import { MemoryRouter as a } from "react-router-dom";
4
4
  import { jsx as o } from "react/jsx-runtime";
5
5
  //#region src/i18n/providers/I18nProvider.tsx
6
6
  var s = t(null), c = () => {
7
- let e = r(s);
7
+ let e = n(s);
8
8
  if (!e) throw Error("useI18n must be used within I18nProvider");
9
9
  return e;
10
- }, l = ({ children: t, basePath: r, navigate: c, currentUser: l, tenantId: u, apiGatewayUrl: d, authToken: f, translations: p, onLanguageChange: m, onTranslationPublish: h, defaultView: g }) => {
11
- let _ = n((t, n, r) => e(p?.[t] ?? n ?? t, r), [p]), v = i(() => ({
12
- basePath: r,
10
+ }, l = ({ children: t, basePath: n, navigate: c, currentUser: l, tenantId: u, apiGatewayUrl: d, authToken: f, translations: p, onLanguageChange: m, onTranslationPublish: h, defaultView: g }) => {
11
+ let _ = r((t, n, r) => e(p?.[t] ?? n ?? t, r), [p]), v = i(() => ({
12
+ basePath: n,
13
13
  navigate: c,
14
14
  currentUser: l,
15
15
  tenantId: u,
@@ -23,7 +23,7 @@ var s = t(null), c = () => {
23
23
  }), [
24
24
  d,
25
25
  f,
26
- r,
26
+ n,
27
27
  l,
28
28
  g,
29
29
  c,
@@ -33,7 +33,7 @@ var s = t(null), c = () => {
33
33
  u,
34
34
  p
35
35
  ]);
36
- return r ? /* @__PURE__ */ o(s.Provider, {
36
+ return n ? /* @__PURE__ */ o(s.Provider, {
37
37
  value: v,
38
38
  children: t
39
39
  }) : /* @__PURE__ */ o(s.Provider, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-i18n",
3
- "version": "2026.526.1",
3
+ "version": "2026.528.1",
4
4
  "description": "Internationalization (i18n) micro-frontend module",
5
5
  "type": "module",
6
6
  "exports": {