@burdenoff/microfe-i18n 2026.828.1 → 2026.830.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.
@@ -1,14 +1,14 @@
1
1
  import { Globe as e } from "../../node_modules/lucide-react/dist/esm/icons/globe.js";
2
2
  import { Plus as t } from "../../node_modules/lucide-react/dist/esm/icons/plus.js";
3
3
  import { Search as n } from "../../node_modules/lucide-react/dist/esm/icons/search.js";
4
- import { useI18n as r } from "../providers/I18nProvider.js";
4
+ import { useTr as r } from "../hooks/useTr.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
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";
9
9
  //#region src/i18n/pages/LanguagesListPage.tsx
10
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
+ let m = r(), { languageFilter: h, updateLanguageFilter: g, setSelectedLanguage: _ } = i(), [v, y] = a(h.search), b = [{
12
12
  id: "1",
13
13
  code: "en",
14
14
  name: "English",
@@ -24,9 +24,9 @@ var m = () => {
24
24
  direction: "ltr",
25
25
  status: "active",
26
26
  isDefault: !1
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);
27
+ }], x = (e) => {
28
+ y(e), g({ search: e });
29
+ }, S = "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)]", C = (v ?? "").trim().length > 0 || h.status !== "all" || h.direction !== "all", w = b.filter((e) => e.status === "active").length, T = b.find((e) => e.isDefault);
30
30
  return /* @__PURE__ */ s("div", {
31
31
  className: "min-h-full w-full bg-bg-surface",
32
32
  children: [/* @__PURE__ */ o("div", {
@@ -43,14 +43,14 @@ var m = () => {
43
43
  })
44
44
  }), /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("h1", {
45
45
  className: "text-2xl font-bold tracking-tight text-text-primary",
46
- children: /* @__PURE__ */ o(d, { children: h("i18n.languages.title", "Languages") })
46
+ children: /* @__PURE__ */ o(d, { children: m("i18n.languages.title", "Languages") })
47
47
  }), /* @__PURE__ */ o("p", {
48
48
  className: "mt-0.5 text-sm text-text-secondary",
49
- children: h("i18n.languages.subtitle", "Configure the locales your products ship in")
49
+ children: m("i18n.languages.subtitle", "Configure the locales your products ship in")
50
50
  })] })]
51
51
  }), /* @__PURE__ */ o(c, {
52
52
  primary: {
53
- label: h("i18n.languages.actions.add", "Add Language"),
53
+ label: m("i18n.languages.actions.add", "Add Language"),
54
54
  onSelect: () => void 0,
55
55
  icon: /* @__PURE__ */ o(t, {
56
56
  className: "size-4",
@@ -63,7 +63,7 @@ var m = () => {
63
63
  }), /* @__PURE__ */ s("div", {
64
64
  className: "mx-auto max-w-screen-xl space-y-6 px-6 py-8 sm:px-8 lg:px-10",
65
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.") }),
66
+ /* @__PURE__ */ o(p, { children: m("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
67
  /* @__PURE__ */ s(l, {
68
68
  className: "flex flex-col gap-4 sm:flex-row sm:items-center",
69
69
  children: [/* @__PURE__ */ s("div", {
@@ -76,10 +76,10 @@ var m = () => {
76
76
  })
77
77
  }), /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("p", {
78
78
  className: "text-sm font-medium text-text-secondary",
79
- children: h("i18n.languages.summary.label", "Languages configured")
79
+ children: m("i18n.languages.summary.label", "Languages configured")
80
80
  }), /* @__PURE__ */ o("p", {
81
81
  className: "text-4xl font-bold tracking-tight text-text-primary tabular-nums",
82
- children: x.length
82
+ children: b.length
83
83
  })] })]
84
84
  }), /* @__PURE__ */ s("div", {
85
85
  className: "flex flex-wrap gap-3 sm:justify-end",
@@ -88,10 +88,10 @@ var m = () => {
88
88
  children: [/* @__PURE__ */ o("span", {
89
89
  className: "size-1.5 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse",
90
90
  "aria-hidden": "true"
91
- }), h("i18n.languages.summary.active", "{{count}} active", { count: T })]
92
- }), E && /* @__PURE__ */ o("div", {
91
+ }), m("i18n.languages.summary.active", "{{count}} active", { count: w })]
92
+ }), T && /* @__PURE__ */ o("div", {
93
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 })
94
+ children: m("i18n.languages.summary.default", "Default: {{name}}", { name: T.name })
95
95
  })]
96
96
  })]
97
97
  }),
@@ -105,69 +105,69 @@ var m = () => {
105
105
  "aria-hidden": "true"
106
106
  }), /* @__PURE__ */ o("input", {
107
107
  type: "text",
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),
108
+ "aria-label": m("i18n.languages.filters.searchAriaLabel", "Search languages"),
109
+ placeholder: m("i18n.languages.filters.searchPlaceholder", "Search languages..."),
110
+ value: v,
111
+ onChange: (e) => x(e.target.value),
112
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)]"
113
113
  })]
114
114
  }),
115
115
  /* @__PURE__ */ s("select", {
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,
116
+ "aria-label": m("i18n.languages.filters.status.label", "Filter by status"),
117
+ value: h.status,
118
+ onChange: (e) => g({ status: e.target.value }),
119
+ className: S,
120
120
  children: [
121
121
  /* @__PURE__ */ o("option", {
122
122
  value: "all",
123
- children: h("i18n.languages.filters.status.all", "All Status")
123
+ children: m("i18n.languages.filters.status.all", "All Status")
124
124
  }),
125
125
  /* @__PURE__ */ o("option", {
126
126
  value: "active",
127
- children: h("i18n.shared.status.active", "Active")
127
+ children: m("i18n.shared.status.active", "Active")
128
128
  }),
129
129
  /* @__PURE__ */ o("option", {
130
130
  value: "inactive",
131
- children: h("i18n.shared.status.inactive", "Inactive")
131
+ children: m("i18n.shared.status.inactive", "Inactive")
132
132
  })
133
133
  ]
134
134
  }),
135
135
  /* @__PURE__ */ s("select", {
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,
136
+ "aria-label": m("i18n.languages.filters.direction.label", "Filter by direction"),
137
+ value: h.direction,
138
+ onChange: (e) => g({ direction: e.target.value }),
139
+ className: S,
140
140
  children: [
141
141
  /* @__PURE__ */ o("option", {
142
142
  value: "all",
143
- children: h("i18n.languages.filters.direction.all", "All Directions")
143
+ children: m("i18n.languages.filters.direction.all", "All Directions")
144
144
  }),
145
145
  /* @__PURE__ */ o("option", {
146
146
  value: "ltr",
147
- children: h("i18n.shared.direction.ltr", "LTR")
147
+ children: m("i18n.shared.direction.ltr", "LTR")
148
148
  }),
149
149
  /* @__PURE__ */ o("option", {
150
150
  value: "rtl",
151
- children: h("i18n.shared.direction.rtl", "RTL")
151
+ children: m("i18n.shared.direction.rtl", "RTL")
152
152
  })
153
153
  ]
154
154
  })
155
155
  ]
156
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.")
157
+ b.length === 0 && /* @__PURE__ */ o(f, {
158
+ illustration: C ? "empty-search" : "empty-data",
159
+ title: C ? m("i18n.languages.empty.search.title", "No languages match") : m("i18n.languages.empty.title", "No languages yet"),
160
+ description: C ? m("i18n.languages.empty.search.description", "Adjust your filters to see more languages.") : m("i18n.languages.empty.description", "Add a language to begin localizing your products.")
161
161
  }),
162
- x.length > 0 && /* @__PURE__ */ o("div", {
162
+ b.length > 0 && /* @__PURE__ */ o("div", {
163
163
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
164
- children: x.map((e, t) => /* @__PURE__ */ o(u, {
164
+ children: b.map((e, t) => /* @__PURE__ */ o(u, {
165
165
  treatment: "metric",
166
166
  glow: t === 0,
167
167
  className: "border-border-seam",
168
168
  children: /* @__PURE__ */ o("button", {
169
169
  type: "button",
170
- onClick: () => v(e),
170
+ onClick: () => _(e),
171
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
172
  children: /* @__PURE__ */ s("div", {
173
173
  className: "flex items-start justify-between gap-3",
@@ -181,7 +181,7 @@ var m = () => {
181
181
  children: e.name
182
182
  }), e.isDefault && /* @__PURE__ */ o("span", {
183
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")
184
+ children: m("i18n.languages.badges.default", "Default")
185
185
  })]
186
186
  }),
187
187
  /* @__PURE__ */ o("p", {
@@ -191,19 +191,19 @@ var m = () => {
191
191
  /* @__PURE__ */ s("div", {
192
192
  className: "mt-2 flex items-center gap-3 text-xs text-text-tertiary tabular-nums",
193
193
  children: [
194
- /* @__PURE__ */ o("span", { children: h("i18n.languages.card.code", "Code: {{code}}", { code: e.code }) }),
194
+ /* @__PURE__ */ o("span", { children: m("i18n.languages.card.code", "Code: {{code}}", { code: e.code }) }),
195
195
  /* @__PURE__ */ o("span", {
196
196
  "aria-hidden": "true",
197
197
  children: "•"
198
198
  }),
199
- /* @__PURE__ */ o("span", { children: e.direction === "ltr" ? h("i18n.shared.direction.ltr", "LTR") : h("i18n.shared.direction.rtl", "RTL") })
199
+ /* @__PURE__ */ o("span", { children: e.direction === "ltr" ? m("i18n.shared.direction.ltr", "LTR") : m("i18n.shared.direction.rtl", "RTL") })
200
200
  ]
201
201
  })
202
202
  ]
203
203
  }), /* @__PURE__ */ o("span", {
204
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")
205
+ title: e.status === "active" ? m("i18n.shared.status.active", "Active") : m("i18n.shared.status.inactive", "Inactive"),
206
+ "aria-label": e.status === "active" ? m("i18n.shared.status.active", "Active") : m("i18n.shared.status.inactive", "Inactive")
207
207
  })]
208
208
  })
209
209
  })