@burdenoff/microfe-i18n 2026.608.1 → 2026.625.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.
@@ -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, GlassCard as l, GradientText as u, IllustratedEmptyState as d } from "@burdenoff/fe-libs/ui";
8
9
  //#region src/i18n/pages/LanguagesListPage.tsx
9
- var c = () => {
10
- let { t: c } = r(), l = (e, t, n) => c(e, t, n), { languageFilter: u, updateLanguageFilter: d, setSelectedLanguage: f } = i(), [p, m] = a(u.search), h = [{
10
+ var f = () => {
11
+ let { t: f } = r(), p = (e, t, n) => f(e, t, n), { languageFilter: m, updateLanguageFilter: h, setSelectedLanguage: g } = i(), [_, v] = a(m.search), y = [{
11
12
  id: "1",
12
13
  code: "en",
13
14
  name: "English",
@@ -23,131 +24,162 @@ var c = () => {
23
24
  direction: "ltr",
24
25
  status: "active",
25
26
  isDefault: !1
26
- }], g = (e) => {
27
- m(e), d({ search: e });
28
- };
27
+ }], b = (e) => {
28
+ v(e), h({ search: e });
29
+ }, x = "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)]", S = (_ ?? "").trim().length > 0 || m.status !== "all" || m.direction !== "all";
29
30
  return /* @__PURE__ */ s("div", {
30
- className: "flex h-full flex-col",
31
- children: [
32
- /* @__PURE__ */ o("div", {
33
- className: "border-b border-border bg-surface-elevated p-6",
34
- children: /* @__PURE__ */ s("div", {
35
- className: "flex items-center justify-between",
36
- children: [/* @__PURE__ */ s("div", {
37
- className: "flex items-center gap-3",
38
- children: [/* @__PURE__ */ o(e, { className: "size-6 text-accent-primary" }), /* @__PURE__ */ o("h1", {
39
- className: "text-2xl font-semibold text-content-primary",
40
- children: l("i18n.languages.title", "Languages")
41
- })]
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
- })]
47
- })
48
- }),
49
- /* @__PURE__ */ o("div", {
50
- className: "border-b border-border bg-surface p-4",
51
- children: /* @__PURE__ */ s("div", {
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", {
52
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(u, { children: p("i18n.languages.title", "Languages") })
47
+ }), /* @__PURE__ */ o("p", {
48
+ className: "mt-0.5 text-sm text-text-secondary",
49
+ children: p("i18n.languages.subtitle", "Configure the locales your products ship in")
50
+ })] })]
51
+ }), /* @__PURE__ */ o(c, {
52
+ primary: {
53
+ label: p("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__ */ s("div", {
67
+ className: "flex flex-col gap-3 sm:flex-row sm:items-center",
53
68
  children: [
54
69
  /* @__PURE__ */ s("div", {
55
70
  className: "relative flex-1",
56
- children: [/* @__PURE__ */ o(n, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-content-secondary" }), /* @__PURE__ */ o("input", {
71
+ children: [/* @__PURE__ */ o(n, {
72
+ className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-secondary",
73
+ "aria-hidden": "true"
74
+ }), /* @__PURE__ */ o("input", {
57
75
  type: "text",
58
- "aria-label": l("i18n.languages.filters.searchAriaLabel", "Search languages"),
59
- placeholder: l("i18n.languages.filters.searchPlaceholder", "Search languages..."),
60
- value: p,
61
- onChange: (e) => g(e.target.value),
62
- className: "w-full rounded-md border border-border bg-surface-elevated py-2 pl-10 pr-4 text-sm text-content-primary placeholder:text-content-tertiary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
76
+ "aria-label": p("i18n.languages.filters.searchAriaLabel", "Search languages"),
77
+ placeholder: p("i18n.languages.filters.searchPlaceholder", "Search languages..."),
78
+ value: _,
79
+ onChange: (e) => b(e.target.value),
80
+ 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
81
  })]
64
82
  }),
65
83
  /* @__PURE__ */ s("select", {
66
- "aria-label": l("i18n.languages.filters.status.label", "Filter by status"),
67
- value: u.status,
68
- onChange: (e) => d({ status: e.target.value }),
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",
84
+ "aria-label": p("i18n.languages.filters.status.label", "Filter by status"),
85
+ value: m.status,
86
+ onChange: (e) => h({ status: e.target.value }),
87
+ className: x,
70
88
  children: [
71
89
  /* @__PURE__ */ o("option", {
72
90
  value: "all",
73
- children: l("i18n.languages.filters.status.all", "All Status")
91
+ children: p("i18n.languages.filters.status.all", "All Status")
74
92
  }),
75
93
  /* @__PURE__ */ o("option", {
76
94
  value: "active",
77
- children: l("i18n.shared.status.active", "Active")
95
+ children: p("i18n.shared.status.active", "Active")
78
96
  }),
79
97
  /* @__PURE__ */ o("option", {
80
98
  value: "inactive",
81
- children: l("i18n.shared.status.inactive", "Inactive")
99
+ children: p("i18n.shared.status.inactive", "Inactive")
82
100
  })
83
101
  ]
84
102
  }),
85
103
  /* @__PURE__ */ s("select", {
86
- "aria-label": l("i18n.languages.filters.direction.label", "Filter by direction"),
87
- value: u.direction,
88
- onChange: (e) => d({ direction: e.target.value }),
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",
104
+ "aria-label": p("i18n.languages.filters.direction.label", "Filter by direction"),
105
+ value: m.direction,
106
+ onChange: (e) => h({ direction: e.target.value }),
107
+ className: x,
90
108
  children: [
91
109
  /* @__PURE__ */ o("option", {
92
110
  value: "all",
93
- children: l("i18n.languages.filters.direction.all", "All Directions")
111
+ children: p("i18n.languages.filters.direction.all", "All Directions")
94
112
  }),
95
113
  /* @__PURE__ */ o("option", {
96
114
  value: "ltr",
97
- children: l("i18n.shared.direction.ltr", "LTR")
115
+ children: p("i18n.shared.direction.ltr", "LTR")
98
116
  }),
99
117
  /* @__PURE__ */ o("option", {
100
118
  value: "rtl",
101
- children: l("i18n.shared.direction.rtl", "RTL")
119
+ children: p("i18n.shared.direction.rtl", "RTL")
102
120
  })
103
121
  ]
104
122
  })
105
123
  ]
106
- })
107
- }),
108
- /* @__PURE__ */ o("div", {
109
- className: "flex-1 overflow-auto p-6",
110
- children: /* @__PURE__ */ o("div", {
124
+ }),
125
+ y.length === 0 && /* @__PURE__ */ o(d, {
126
+ illustration: S ? "empty-search" : "empty-data",
127
+ title: S ? p("i18n.languages.empty.search.title", "No languages match") : p("i18n.languages.empty.title", "No languages yet"),
128
+ description: S ? p("i18n.languages.empty.search.description", "Adjust your filters to see more languages.") : p("i18n.languages.empty.description", "Add a language to begin localizing your products.")
129
+ }),
130
+ y.length > 0 && /* @__PURE__ */ o("div", {
111
131
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
112
- children: h.map((e) => /* @__PURE__ */ o("button", {
113
- type: "button",
114
- onClick: () => f(e),
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",
116
- children: /* @__PURE__ */ s("div", {
117
- className: "flex items-start justify-between",
118
- children: [/* @__PURE__ */ s("div", {
119
- className: "flex-1",
120
- children: [
121
- /* @__PURE__ */ s("div", {
122
- className: "flex items-center gap-2",
123
- children: [/* @__PURE__ */ o("h3", {
124
- className: "font-medium text-content-primary",
125
- children: e.name
126
- }), e.isDefault && /* @__PURE__ */ o("span", {
127
- className: "rounded bg-accent-primary/10 px-2 py-0.5 text-xs font-medium text-accent-primary",
128
- children: l("i18n.languages.badges.default", "Default")
129
- })]
130
- }),
131
- /* @__PURE__ */ o("p", {
132
- className: "mt-1 text-sm text-content-secondary",
133
- children: e.nativeName
134
- }),
135
- /* @__PURE__ */ s("div", {
136
- className: "mt-2 flex items-center gap-3 text-xs text-content-tertiary",
137
- children: [
138
- /* @__PURE__ */ o("span", { children: l("i18n.languages.card.code", "Code: {{code}}", { code: e.code }) }),
139
- /* @__PURE__ */ o("span", { children: "•" }),
140
- /* @__PURE__ */ o("span", { children: e.direction === "ltr" ? l("i18n.shared.direction.ltr", "LTR") : l("i18n.shared.direction.rtl", "RTL") })
141
- ]
142
- })
143
- ]
144
- }), /* @__PURE__ */ o("div", { className: `size-2 rounded-full ${e.status === "active" ? "bg-success" : "bg-content-tertiary"}` })]
132
+ children: y.map((e, t) => /* @__PURE__ */ o(l, {
133
+ treatment: "metric",
134
+ glow: t === 0,
135
+ className: "border-border-seam",
136
+ children: /* @__PURE__ */ o("button", {
137
+ type: "button",
138
+ onClick: () => g(e),
139
+ 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)]",
140
+ children: /* @__PURE__ */ s("div", {
141
+ className: "flex items-start justify-between gap-3",
142
+ children: [/* @__PURE__ */ s("div", {
143
+ className: "flex-1",
144
+ children: [
145
+ /* @__PURE__ */ s("div", {
146
+ className: "flex items-center gap-2",
147
+ children: [/* @__PURE__ */ o("h3", {
148
+ className: "font-semibold text-text-primary",
149
+ children: e.name
150
+ }), e.isDefault && /* @__PURE__ */ o("span", {
151
+ className: "rounded-full bg-action-primary-bg/10 px-2 py-0.5 text-xs font-medium text-primary",
152
+ children: p("i18n.languages.badges.default", "Default")
153
+ })]
154
+ }),
155
+ /* @__PURE__ */ o("p", {
156
+ className: "mt-1 text-sm text-text-secondary",
157
+ children: e.nativeName
158
+ }),
159
+ /* @__PURE__ */ s("div", {
160
+ className: "mt-2 flex items-center gap-3 text-xs text-text-tertiary tabular-nums",
161
+ children: [
162
+ /* @__PURE__ */ o("span", { children: p("i18n.languages.card.code", "Code: {{code}}", { code: e.code }) }),
163
+ /* @__PURE__ */ o("span", {
164
+ "aria-hidden": "true",
165
+ children: "•"
166
+ }),
167
+ /* @__PURE__ */ o("span", { children: e.direction === "ltr" ? p("i18n.shared.direction.ltr", "LTR") : p("i18n.shared.direction.rtl", "RTL") })
168
+ ]
169
+ })
170
+ ]
171
+ }), /* @__PURE__ */ o("span", {
172
+ className: `mt-1 size-2 rounded-full ${e.status === "active" ? "bg-status-success-text motion-safe:animate-vc-glow-pulse" : "bg-text-tertiary"}`,
173
+ title: e.status === "active" ? p("i18n.shared.status.active", "Active") : p("i18n.shared.status.inactive", "Inactive"),
174
+ "aria-label": e.status === "active" ? p("i18n.shared.status.active", "Active") : p("i18n.shared.status.inactive", "Inactive")
175
+ })]
176
+ })
145
177
  })
146
178
  }, e.id))
147
179
  })
148
- })
149
- ]
180
+ ]
181
+ })]
150
182
  });
151
183
  };
152
184
  //#endregion
153
- export { c as LanguagesListPage };
185
+ export { f as LanguagesListPage };