@burdenoff/microfe-i18n 2026.624.1 → 2026.625.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/i18n/pages/ImportExportPage.js +359 -321
- package/dist/i18n/pages/LanguagesListPage.js +150 -86
- package/dist/i18n/pages/LocaleConfigPage.js +297 -243
- package/dist/i18n/pages/ProductsListPage.js +148 -84
- package/dist/i18n/pages/ProgressDashboardPage.js +365 -283
- package/dist/i18n/pages/ReviewQueuePage.js +187 -149
- package/dist/i18n/pages/TranslationEditorPage.js +205 -126
- package/dist/node_modules/lucide-react/dist/esm/icons/boxes.js +54 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js +11 -0
- package/package.json +2 -2
|
@@ -5,9 +5,10 @@ import { useI18n as r } from "../providers/I18nProvider.js";
|
|
|
5
5
|
import { useI18nStore as i } from "../store/i18nStore.js";
|
|
6
6
|
import { useState as a } from "react";
|
|
7
7
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import { CTAOverflowMenu as c, EmphasisPanel as l, GlassCard as u, GradientText as d, IllustratedEmptyState as f, PagePurpose as p } from "@burdenoff/fe-libs/ui";
|
|
8
9
|
//#region src/i18n/pages/LanguagesListPage.tsx
|
|
9
|
-
var
|
|
10
|
-
let { t:
|
|
10
|
+
var m = () => {
|
|
11
|
+
let { t: m } = r(), h = (e, t, n) => m(e, t, n), { languageFilter: g, updateLanguageFilter: _, setSelectedLanguage: v } = i(), [y, b] = a(g.search), x = [{
|
|
11
12
|
id: "1",
|
|
12
13
|
code: "en",
|
|
13
14
|
name: "English",
|
|
@@ -23,131 +24,194 @@ var c = () => {
|
|
|
23
24
|
direction: "ltr",
|
|
24
25
|
status: "active",
|
|
25
26
|
isDefault: !1
|
|
26
|
-
}],
|
|
27
|
-
|
|
28
|
-
};
|
|
27
|
+
}], S = (e) => {
|
|
28
|
+
b(e), _({ search: e });
|
|
29
|
+
}, C = "rounded-lg border border-border-seam bg-bg-elevated px-3 py-2.5 text-sm text-text-primary focus:border-action-primary-bg focus-visible:shadow-[var(--shadow-focus)] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]", w = (y ?? "").trim().length > 0 || g.status !== "all" || g.direction !== "all", T = x.filter((e) => e.status === "active").length, E = x.find((e) => e.isDefault);
|
|
29
30
|
return /* @__PURE__ */ s("div", {
|
|
30
|
-
className: "
|
|
31
|
-
children: [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
className: "min-h-full w-full bg-bg-surface",
|
|
32
|
+
children: [/* @__PURE__ */ o("div", {
|
|
33
|
+
className: "border-b border-border-seam bg-bg-surface px-6 py-6 sm:px-8 lg:px-10",
|
|
34
|
+
children: /* @__PURE__ */ s("div", {
|
|
35
|
+
className: "mx-auto flex max-w-screen-xl flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
36
|
+
children: [/* @__PURE__ */ s("div", {
|
|
37
|
+
className: "flex items-center gap-4",
|
|
38
|
+
children: [/* @__PURE__ */ o("div", {
|
|
39
|
+
className: "flex size-11 shrink-0 items-center justify-center rounded-xl bg-action-primary-bg/10 text-primary shadow-elevation-1",
|
|
40
|
+
children: /* @__PURE__ */ o(e, {
|
|
41
|
+
className: "size-5",
|
|
42
|
+
"aria-hidden": "true"
|
|
43
|
+
})
|
|
44
|
+
}), /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("h1", {
|
|
45
|
+
className: "text-2xl font-bold tracking-tight text-text-primary",
|
|
46
|
+
children: /* @__PURE__ */ o(d, { children: h("i18n.languages.title", "Languages") })
|
|
47
|
+
}), /* @__PURE__ */ o("p", {
|
|
48
|
+
className: "mt-0.5 text-sm text-text-secondary",
|
|
49
|
+
children: h("i18n.languages.subtitle", "Configure the locales your products ship in")
|
|
50
|
+
})] })]
|
|
51
|
+
}), /* @__PURE__ */ o(c, {
|
|
52
|
+
primary: {
|
|
53
|
+
label: h("i18n.languages.actions.add", "Add Language"),
|
|
54
|
+
onSelect: () => void 0,
|
|
55
|
+
icon: /* @__PURE__ */ o(t, {
|
|
56
|
+
className: "size-4",
|
|
57
|
+
"aria-hidden": "true"
|
|
58
|
+
})
|
|
59
|
+
},
|
|
60
|
+
actions: []
|
|
61
|
+
})]
|
|
62
|
+
})
|
|
63
|
+
}), /* @__PURE__ */ s("div", {
|
|
64
|
+
className: "mx-auto max-w-screen-xl space-y-6 px-6 py-8 sm:px-8 lg:px-10",
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ o(p, { children: h("i18n.languages.purpose", "This is the master list of every locale your products can ship in — the set of languages translators can work in and users can switch to. Add a language here before any of its translations can be entered, set which one is the default fallback, and configure its formatting and text direction.") }),
|
|
67
|
+
/* @__PURE__ */ s(l, {
|
|
68
|
+
className: "flex flex-col gap-4 sm:flex-row sm:items-center",
|
|
36
69
|
children: [/* @__PURE__ */ s("div", {
|
|
37
|
-
className: "flex items-center gap-
|
|
38
|
-
children: [/* @__PURE__ */ o(
|
|
39
|
-
className: "
|
|
40
|
-
children:
|
|
70
|
+
className: "flex flex-1 items-center gap-4",
|
|
71
|
+
children: [/* @__PURE__ */ o("div", {
|
|
72
|
+
className: "flex size-14 shrink-0 items-center justify-center rounded-2xl bg-action-primary-bg/10 text-primary shadow-elevation-1",
|
|
73
|
+
children: /* @__PURE__ */ o(e, {
|
|
74
|
+
className: "size-7",
|
|
75
|
+
"aria-hidden": "true"
|
|
76
|
+
})
|
|
77
|
+
}), /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("p", {
|
|
78
|
+
className: "text-sm font-medium text-text-secondary",
|
|
79
|
+
children: h("i18n.languages.summary.label", "Languages configured")
|
|
80
|
+
}), /* @__PURE__ */ o("p", {
|
|
81
|
+
className: "text-4xl font-bold tracking-tight text-text-primary tabular-nums",
|
|
82
|
+
children: x.length
|
|
83
|
+
})] })]
|
|
84
|
+
}), /* @__PURE__ */ s("div", {
|
|
85
|
+
className: "flex flex-wrap gap-3 sm:justify-end",
|
|
86
|
+
children: [/* @__PURE__ */ s("div", {
|
|
87
|
+
className: "flex items-center gap-1.5 rounded-lg border border-border-seam bg-bg-sunken/60 px-3 py-1.5 text-xs text-text-secondary",
|
|
88
|
+
children: [/* @__PURE__ */ o("span", {
|
|
89
|
+
className: "size-1.5 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse",
|
|
90
|
+
"aria-hidden": "true"
|
|
91
|
+
}), h("i18n.languages.summary.active", "{{count}} active", { count: T })]
|
|
92
|
+
}), E && /* @__PURE__ */ o("div", {
|
|
93
|
+
className: "rounded-lg border border-border-seam bg-bg-sunken/60 px-3 py-1.5 text-xs text-text-secondary",
|
|
94
|
+
children: h("i18n.languages.summary.default", "Default: {{name}}", { name: E.name })
|
|
41
95
|
})]
|
|
42
|
-
}), /* @__PURE__ */ s("button", {
|
|
43
|
-
type: "button",
|
|
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",
|
|
45
|
-
children: [/* @__PURE__ */ o(t, { className: "size-4" }), l("i18n.languages.actions.add", "Add Language")]
|
|
46
96
|
})]
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
className: "border-b border-border-subtle bg-surface p-4",
|
|
51
|
-
children: /* @__PURE__ */ s("div", {
|
|
52
|
-
className: "flex items-center gap-4",
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ s("div", {
|
|
99
|
+
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
53
100
|
children: [
|
|
54
101
|
/* @__PURE__ */ s("div", {
|
|
55
102
|
className: "relative flex-1",
|
|
56
|
-
children: [/* @__PURE__ */ o(n, {
|
|
103
|
+
children: [/* @__PURE__ */ o(n, {
|
|
104
|
+
className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-secondary",
|
|
105
|
+
"aria-hidden": "true"
|
|
106
|
+
}), /* @__PURE__ */ o("input", {
|
|
57
107
|
type: "text",
|
|
58
|
-
"aria-label":
|
|
59
|
-
placeholder:
|
|
60
|
-
value:
|
|
61
|
-
onChange: (e) =>
|
|
62
|
-
className: "w-full rounded-
|
|
108
|
+
"aria-label": h("i18n.languages.filters.searchAriaLabel", "Search languages"),
|
|
109
|
+
placeholder: h("i18n.languages.filters.searchPlaceholder", "Search languages..."),
|
|
110
|
+
value: y,
|
|
111
|
+
onChange: (e) => S(e.target.value),
|
|
112
|
+
className: "w-full rounded-lg border border-border-seam bg-bg-elevated py-2.5 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-tertiary focus:border-action-primary-bg focus-visible:shadow-[var(--shadow-focus)] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]"
|
|
63
113
|
})]
|
|
64
114
|
}),
|
|
65
115
|
/* @__PURE__ */ s("select", {
|
|
66
|
-
"aria-label":
|
|
67
|
-
value:
|
|
68
|
-
onChange: (e) =>
|
|
69
|
-
className:
|
|
116
|
+
"aria-label": h("i18n.languages.filters.status.label", "Filter by status"),
|
|
117
|
+
value: g.status,
|
|
118
|
+
onChange: (e) => _({ status: e.target.value }),
|
|
119
|
+
className: C,
|
|
70
120
|
children: [
|
|
71
121
|
/* @__PURE__ */ o("option", {
|
|
72
122
|
value: "all",
|
|
73
|
-
children:
|
|
123
|
+
children: h("i18n.languages.filters.status.all", "All Status")
|
|
74
124
|
}),
|
|
75
125
|
/* @__PURE__ */ o("option", {
|
|
76
126
|
value: "active",
|
|
77
|
-
children:
|
|
127
|
+
children: h("i18n.shared.status.active", "Active")
|
|
78
128
|
}),
|
|
79
129
|
/* @__PURE__ */ o("option", {
|
|
80
130
|
value: "inactive",
|
|
81
|
-
children:
|
|
131
|
+
children: h("i18n.shared.status.inactive", "Inactive")
|
|
82
132
|
})
|
|
83
133
|
]
|
|
84
134
|
}),
|
|
85
135
|
/* @__PURE__ */ s("select", {
|
|
86
|
-
"aria-label":
|
|
87
|
-
value:
|
|
88
|
-
onChange: (e) =>
|
|
89
|
-
className:
|
|
136
|
+
"aria-label": h("i18n.languages.filters.direction.label", "Filter by direction"),
|
|
137
|
+
value: g.direction,
|
|
138
|
+
onChange: (e) => _({ direction: e.target.value }),
|
|
139
|
+
className: C,
|
|
90
140
|
children: [
|
|
91
141
|
/* @__PURE__ */ o("option", {
|
|
92
142
|
value: "all",
|
|
93
|
-
children:
|
|
143
|
+
children: h("i18n.languages.filters.direction.all", "All Directions")
|
|
94
144
|
}),
|
|
95
145
|
/* @__PURE__ */ o("option", {
|
|
96
146
|
value: "ltr",
|
|
97
|
-
children:
|
|
147
|
+
children: h("i18n.shared.direction.ltr", "LTR")
|
|
98
148
|
}),
|
|
99
149
|
/* @__PURE__ */ o("option", {
|
|
100
150
|
value: "rtl",
|
|
101
|
-
children:
|
|
151
|
+
children: h("i18n.shared.direction.rtl", "RTL")
|
|
102
152
|
})
|
|
103
153
|
]
|
|
104
154
|
})
|
|
105
155
|
]
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
156
|
+
}),
|
|
157
|
+
x.length === 0 && /* @__PURE__ */ o(f, {
|
|
158
|
+
illustration: w ? "empty-search" : "empty-data",
|
|
159
|
+
title: w ? h("i18n.languages.empty.search.title", "No languages match") : h("i18n.languages.empty.title", "No languages yet"),
|
|
160
|
+
description: w ? h("i18n.languages.empty.search.description", "Adjust your filters to see more languages.") : h("i18n.languages.empty.description", "Add a language to begin localizing your products.")
|
|
161
|
+
}),
|
|
162
|
+
x.length > 0 && /* @__PURE__ */ o("div", {
|
|
111
163
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
112
|
-
children:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
className: "
|
|
116
|
-
children: /* @__PURE__ */
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
164
|
+
children: x.map((e, t) => /* @__PURE__ */ o(u, {
|
|
165
|
+
treatment: "metric",
|
|
166
|
+
glow: t === 0,
|
|
167
|
+
className: "border-border-seam",
|
|
168
|
+
children: /* @__PURE__ */ o("button", {
|
|
169
|
+
type: "button",
|
|
170
|
+
onClick: () => v(e),
|
|
171
|
+
className: "block w-full cursor-pointer rounded-[inherit] p-5 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]",
|
|
172
|
+
children: /* @__PURE__ */ s("div", {
|
|
173
|
+
className: "flex items-start justify-between gap-3",
|
|
174
|
+
children: [/* @__PURE__ */ s("div", {
|
|
175
|
+
className: "flex-1",
|
|
176
|
+
children: [
|
|
177
|
+
/* @__PURE__ */ s("div", {
|
|
178
|
+
className: "flex items-center gap-2",
|
|
179
|
+
children: [/* @__PURE__ */ o("h3", {
|
|
180
|
+
className: "font-semibold text-text-primary",
|
|
181
|
+
children: e.name
|
|
182
|
+
}), e.isDefault && /* @__PURE__ */ o("span", {
|
|
183
|
+
className: "rounded-full bg-action-primary-bg/10 px-2 py-0.5 text-xs font-medium text-primary",
|
|
184
|
+
children: h("i18n.languages.badges.default", "Default")
|
|
185
|
+
})]
|
|
186
|
+
}),
|
|
187
|
+
/* @__PURE__ */ o("p", {
|
|
188
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
189
|
+
children: e.nativeName
|
|
190
|
+
}),
|
|
191
|
+
/* @__PURE__ */ s("div", {
|
|
192
|
+
className: "mt-2 flex items-center gap-3 text-xs text-text-tertiary tabular-nums",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ o("span", { children: h("i18n.languages.card.code", "Code: {{code}}", { code: e.code }) }),
|
|
195
|
+
/* @__PURE__ */ o("span", {
|
|
196
|
+
"aria-hidden": "true",
|
|
197
|
+
children: "•"
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ o("span", { children: e.direction === "ltr" ? h("i18n.shared.direction.ltr", "LTR") : h("i18n.shared.direction.rtl", "RTL") })
|
|
200
|
+
]
|
|
201
|
+
})
|
|
202
|
+
]
|
|
203
|
+
}), /* @__PURE__ */ o("span", {
|
|
204
|
+
className: `mt-1 size-2 rounded-full ${e.status === "active" ? "bg-status-success-text motion-safe:animate-vc-glow-pulse" : "bg-text-tertiary"}`,
|
|
205
|
+
title: e.status === "active" ? h("i18n.shared.status.active", "Active") : h("i18n.shared.status.inactive", "Inactive"),
|
|
206
|
+
"aria-label": e.status === "active" ? h("i18n.shared.status.active", "Active") : h("i18n.shared.status.inactive", "Inactive")
|
|
207
|
+
})]
|
|
208
|
+
})
|
|
145
209
|
})
|
|
146
210
|
}, e.id))
|
|
147
211
|
})
|
|
148
|
-
|
|
149
|
-
]
|
|
212
|
+
]
|
|
213
|
+
})]
|
|
150
214
|
});
|
|
151
215
|
};
|
|
152
216
|
//#endregion
|
|
153
|
-
export {
|
|
217
|
+
export { m as LanguagesListPage };
|