@gerege-systems/eid-mongolia-sdk 0.39.0 → 0.40.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.
package/README.md CHANGED
@@ -156,7 +156,7 @@ app.use("/auth/eid", express.json(), async (req, res) => {
156
156
  | `theme` | `auto` \| `light` \| `dark` | `auto` |
157
157
  | `success-url` (`successUrl`) | backend redirect өгөөгүй үед шилжих URL | — |
158
158
  | `label` | товчны текст; `""` → зөвхөн лого | i18n: «e-ID-ээр нэвтрэх» / «Log in with e-ID» |
159
- | `icon` | `eid` (eID emblem, inline SVG дөрвөлжин — товчинд 20px, зөвхөн-лого үед 24px, цонхны толгойд 24px; light / dark хувилбар theme-ийг дагана) \| `none` (логогүй) | `eid` |
159
+ | `icon` | `eid` («e-ID» wordmark, inline SVG `fill: currentColor` — товч / гарчгийн текстийн өнгөөр light / dark-ийг дагана; өндөр товчинд 16px, зөвхөн-лого үед 12px, цонхны толгойд 20px; анхдагч текстэй үед лого «e-ID»-г орлоно: [e-ID] нэвтрэх, бүтэн нэр `aria-label`-д) \| `none` (логогүй, бүтэн текст) | `eid` |
160
160
  | `variant` | `default` (лого + текст) \| `icon` (зөвхөн лого, 44×44) | `default` |
161
161
  | `aria-label` | товчны хүртээмжийн нэр (дэлгэц уншигч) | зөвхөн-лого үед `label` эсвэл i18n текст |
162
162
 
@@ -203,13 +203,13 @@ Dark-ийн дараалал: `--eid-<нэр>-dark` → `--eid-<нэр>` → dar
203
203
  }
204
204
  eid-login-button::part(button) { width: 100%; } /* part: button, icon, label, dialog (backdrop — зөвхөн fallback-д) */
205
205
  eid-login-button::part(label) { font-weight: 600; }
206
- eid-login-button::part(icon) { width: 24px; height: 24px; }
206
+ eid-login-button::part(icon) { height: 18px; }
207
207
  ```
208
208
 
209
209
  | Хувьсагч (`-dark` хувилбартай) | Юунд | Light анхдагч | Dark анхдагч |
210
210
  |---|---|---|---|
211
211
  | `--eid-accent` | үндсэн товч | `oklch(0.534 0.2 259)` | `oklch(0.64 0.15 259)` |
212
- | `--eid-logo` | **deprecated (0.38.0)** — emblem-ийн өнгө брэндээр тогтмол (light / dark хувилбар); утга өгсөн ч үл хэрэгжинэ | — | — |
212
+ | `--eid-logo` | **deprecated (0.38.0)** — үл хэрэгжинэ; 0.40.0-оос wordmark `currentColor` (товч / гарчгийн текстийн өнгө) | — | — |
213
213
  | `--eid-accent-fg` | үндсэн товчны текст | `#fff` | `hsl(229 50% 6%)` |
214
214
  | `--eid-accent-subtle` | алхмын дугаарын дэвсгэр | `oklch(0.97 0.03 259)` | `oklch(0.24 0.06 259)` |
215
215
  | `--eid-accent-subtle-fg` | алхмын дугаар | `oklch(0.474 0.19 259)` | `oklch(0.82 0.1 259)` |
@@ -221,7 +221,7 @@ eid-login-button::part(icon) { width: 24px; height: 24px; }
221
221
  | `--eid-fg-muted` | хоёрдогч текст | `hsl(215 19% 35%)` | `hsl(213 27% 84%)` |
222
222
  | `--eid-fg-subtle` | тайлбар, placeholder | `hsl(215 16% 45%)` | `hsl(215 20% 65%)` |
223
223
  | `--eid-border` | цонх, QR, тусгаарлагч | `hsl(214 32% 91%)` | `hsl(217 33% 17%)` |
224
- | `--eid-border-strong` | outline товч, input | `hsl(213 27% 84%)` | `hsl(215 25% 27%)` |
224
+ | `--eid-border-strong` | outline товч, input | `hsl(213 27% 84%)` | `hsl(215 20% 45%)` |
225
225
  | `--eid-warning-bg` / `-border` / `-fg` | сүлжээний анхааруулга | `hsl(48 100% 96%)` / `hsl(45 95% 78%)` / `hsl(23 75% 33%)` | `hsl(20 60% 10%)` / `hsl(22 70% 26%)` / `hsl(40 92% 65%)` |
226
226
  | `--eid-danger-fg` | алдаа | `hsl(0 74% 42%)` | `hsl(0 91% 71%)` |
227
227
  | `--eid-radius` / `--eid-radius-lg` (theme-гүй) | булан | `6px` / `8px` | — |
package/dist/button.cjs CHANGED
@@ -40,16 +40,9 @@ function isMobileUserAgent(nav) {
40
40
  }
41
41
 
42
42
  // src/logo.ts
43
- var EID_LOGO_VIEWBOX = "0 0 64 64";
44
- var EID_LOGO_SHAPES = [
45
- ["path", { class: "m-a", d: "M18 4H30V60H18A14 14 0 0 1 4 46V18A14 14 0 0 1 18 4Z" }],
46
- ["path", { d: "M34 4H46A14 14 0 0 1 60 18V46A14 14 0 0 1 46 60H34Z", fill: "#2457E6" }],
47
- ["path", { class: "m-l", d: "M14 32H50A18 18 0 0 0 14 32A18 18 0 0 0 50 32", fill: "none", "stroke-width": "4.8", "stroke-linejoin": "round" }],
48
- ["circle", { class: "m-l", cx: "32", cy: "32", r: "12", fill: "#1564E1", "stroke-width": "1.4" }],
49
- ["path", { d: "M23.5 23.5L40.5 40.5M40.5 23.5L23.5 40.5", stroke: "#FFFFFF", "stroke-width": "1.8" }],
50
- ["circle", { cx: "32", cy: "32", r: "4.4", fill: "#FFFFFF" }],
51
- ["circle", { cx: "32", cy: "32", r: "3", fill: "#1564E1" }]
52
- ];
43
+ var EID_LOGO_VIEWBOX = "0 0 3840 1372";
44
+ var EID_LOGO_TRANSFORM = "translate(0.016725,1765.695476) scale(1,-1)";
45
+ var EID_LOGO_PATH = "M331 1765 c-26 -5 -46 -23 -54 -49 l-2 -7 0 -81 0 -80 2 -9 c9 -25 28 -42 54 -47 6 -1 41 -1 219 -1 237 0 219 1 235 -7 17 -9 32 -28 36 -46 3 -11 2 -160 0 -169 -7 -25 -25 -43 -50 -50 -6 -1 -16 -1 -222 -1 -207 0 -217 0 -223 1 -20 6 -35 19 -44 37 -7 12 -6 8 -7 96 -1 81 -1 82 -3 89 -7 24 -26 42 -50 49 -6 1 -13 2 -85 2 l-78 0 -8 -3 c-25 -7 -43 -25 -49 -50 -2 -7 -2 -11 -2 -276 0 -303 -1 -275 8 -292 3 -7 7 -12 232 -237 225 -225 230 -229 237 -232 16 -8 -12 -7 292 -7 257 0 271 0 277 1 24 7 44 27 49 51 3 10 3 159 0 169 -5 23 -23 42 -47 50 l-7 3 -356 0 -356 1 -8 2 c-21 8 -38 25 -44 46 l-2 8 0 79 c0 88 0 86 6 99 10 18 24 31 45 37 5 1 22 1 361 2 l356 1 7 2 c21 8 36 23 44 44 l3 8 0 134 c0 148 0 141 -6 155 -2 3 -6 9 -8 13 -3 3 -106 106 -229 229 -240 240 -227 227 -244 233 l-8 4 -133 0 c-74 0 -135 -1 -138 -1z M2251 1765 c-26 -5 -46 -23 -54 -49 l-2 -7 0 -629 0 -628 2 -8 c7 -24 23 -40 47 -47 l8 -2 80 0 81 0 8 2 c25 9 42 28 47 54 2 11 2 1247 0 1258 -5 26 -22 45 -47 54 l-8 3 -79 0 c-43 0 -80 -1 -83 -1z M2798 1765 c-26 -6 -48 -27 -53 -52 -2 -6 -2 -58 -2 -499 l1 -491 2 -8 c8 -22 27 -39 49 -45 10 -2 160 -2 170 0 22 6 41 23 49 45 l3 8 0 355 c0 286 1 356 2 361 5 18 19 36 36 45 16 8 -2 7 240 7 l217 0 7 -3 c21 -8 38 -25 44 -46 l2 -8 0 -354 0 -354 -2 -8 c-6 -21 -23 -38 -44 -46 l-7 -2 -219 -1 -219 0 -8 -3 c-19 -7 -33 -19 -41 -35 -8 -16 -8 -14 -8 -103 l1 -78 3 -9 c6 -18 18 -32 34 -40 17 -7 9 -7 157 -7 147 1 135 0 151 8 7 3 12 7 237 232 225 225 229 230 232 237 9 17 8 0 8 209 0 209 1 192 -8 209 -3 7 -7 12 -232 237 -225 225 -230 229 -237 232 -16 8 13 7 -289 8 -218 0 -271 0 -276 -1z M1424 1215 c-24 -5 -43 -24 -50 -48 l-2 -7 0 -80 0 -79 2 -8 c6 -19 19 -35 35 -43 16 -8 -3 -7 237 -7 209 0 215 0 222 2 25 6 45 27 50 52 3 10 3 156 0 166 -5 25 -25 46 -50 52 -7 2 -13 2 -223 2 -185 0 -216 0 -221 -2z";
53
46
 
54
47
  // src/qr.ts
55
48
  var ECC_PER_BLOCK_M = [
@@ -408,10 +401,12 @@ function resolveEidLang(lang) {
408
401
  var MN = {
409
402
  button: "e-ID-\u044D\u044D\u0440 \u043D\u044D\u0432\u0442\u0440\u044D\u0445",
410
403
  title: "e-ID-\u044D\u044D\u0440 \u043D\u044D\u0432\u0442\u0440\u044D\u0445",
404
+ // Лого «e-ID» гэж бичигддэг тул логотой үед «e-ID»-г давтахгүй: [лого] нэвтрэх.
405
+ withLogo: ["", "\u043D\u044D\u0432\u0442\u0440\u044D\u0445"],
411
406
  close: "\u0425\u0430\u0430\u0445",
412
407
  loading: "\u0410\u0447\u0430\u0430\u043B\u0436 \u0431\u0430\u0439\u043D\u0430",
413
- qrAlt: "\u041D\u044D\u0432\u0442\u0440\u044D\u0445 QR \u043A\u043E\u0434 \u2014 \u0443\u0442\u0441\u0430\u043D \u0434\u044D\u044D\u0440\u0445 eID Mongolia \u0430\u043F\u043F\u0430\u0430\u0440 \u0443\u043D\u0448\u0443\u0443\u043B\u043D\u0430",
414
- steps: ["\u0423\u0442\u0441\u0430\u043D \u0434\u044D\u044D\u0440\u0445 eID Mongolia \u0430\u043F\u043F\u044B\u0433 \u043D\u044D\u044D\u043D\u044D", "QR \u043A\u043E\u0434\u044B\u0433 \u0443\u043D\u0448\u0443\u0443\u043B\u043D\u0430", "PIN1 \u043A\u043E\u0434\u043E\u043E \u043E\u0440\u0443\u0443\u043B\u043D\u0430"],
408
+ qrAlt: "\u041D\u044D\u0432\u0442\u0440\u044D\u0445 QR \u043A\u043E\u0434 \u2014 \u0443\u0442\u0441\u0430\u043D \u0434\u044D\u044D\u0440\u0445 e-ID Mongolia \u0430\u043F\u043F\u0430\u0430\u0440 \u0443\u043D\u0448\u0443\u0443\u043B\u043D\u0430",
409
+ steps: ["\u0423\u0442\u0441\u0430\u043D \u0434\u044D\u044D\u0440\u0445 e-ID Mongolia \u0430\u043F\u043F\u044B\u0433 \u043D\u044D\u044D\u043D\u044D", "QR \u043A\u043E\u0434\u044B\u0433 \u0443\u043D\u0448\u0443\u0443\u043B\u043D\u0430", "PIN1 \u043A\u043E\u0434\u043E\u043E \u043E\u0440\u0443\u0443\u043B\u043D\u0430"],
415
410
  vcLabel: "\u0411\u0430\u0442\u0430\u043B\u0433\u0430\u0430\u0436\u0443\u0443\u043B\u0430\u0445 \u043A\u043E\u0434",
416
411
  or: "\u044D\u0441\u0432\u044D\u043B",
417
412
  usePush: "\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0439\u043D \u0434\u0443\u0433\u0430\u0430\u0440\u0430\u0430\u0440 \u043D\u044D\u0432\u0442\u0440\u044D\u0445",
@@ -449,10 +444,11 @@ var T = {
449
444
  en: {
450
445
  button: "Log in with e-ID",
451
446
  title: "Log in with e-ID",
447
+ withLogo: ["Log in with ", ""],
452
448
  close: "Close",
453
449
  loading: "Loading",
454
- qrAlt: "Login QR code \u2014 scan it with the eID Mongolia app on your phone",
455
- steps: ["Open the eID Mongolia app on your phone", "Scan the QR code", "Enter your PIN1"],
450
+ qrAlt: "Login QR code \u2014 scan it with the e-ID Mongolia app on your phone",
451
+ steps: ["Open the e-ID Mongolia app on your phone", "Scan the QR code", "Enter your PIN1"],
456
452
  vcLabel: "Verification code",
457
453
  or: "or",
458
454
  usePush: "Log in with registration number",
@@ -488,10 +484,11 @@ var T = {
488
484
  ru: {
489
485
  button: "\u0412\u043E\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 e-ID",
490
486
  title: "\u0412\u043E\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 e-ID",
487
+ withLogo: ["\u0412\u043E\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 ", ""],
491
488
  close: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C",
492
489
  loading: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",
493
- qrAlt: "QR-\u043A\u043E\u0434 \u0434\u043B\u044F \u0432\u0445\u043E\u0434\u0430 \u2014 \u043E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C eID Mongolia \u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0435",
494
- steps: ["\u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 eID Mongolia \u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0435", "\u041E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043A\u043E\u0434", "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 PIN1"],
490
+ qrAlt: "QR-\u043A\u043E\u0434 \u0434\u043B\u044F \u0432\u0445\u043E\u0434\u0430 \u2014 \u043E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C e-ID Mongolia \u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0435",
491
+ steps: ["\u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 e-ID Mongolia \u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0435", "\u041E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043A\u043E\u0434", "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 PIN1"],
495
492
  vcLabel: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F",
496
493
  or: "\u0438\u043B\u0438",
497
494
  usePush: "\u0412\u043E\u0439\u0442\u0438 \u043F\u043E \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u043C\u0443 \u043D\u043E\u043C\u0435\u0440\u0443",
@@ -527,10 +524,11 @@ var T = {
527
524
  zh: {
528
525
  button: "\u4F7F\u7528 e-ID \u767B\u5F55",
529
526
  title: "\u4F7F\u7528 e-ID \u767B\u5F55",
527
+ withLogo: ["\u4F7F\u7528", "\u767B\u5F55"],
530
528
  close: "\u5173\u95ED",
531
529
  loading: "\u52A0\u8F7D\u4E2D",
532
- qrAlt: "\u767B\u5F55\u4E8C\u7EF4\u7801 \u2014 \u8BF7\u7528\u624B\u673A\u4E0A\u7684 eID Mongolia \u5E94\u7528\u626B\u63CF",
533
- steps: ["\u5728\u624B\u673A\u4E0A\u6253\u5F00 eID Mongolia \u5E94\u7528", "\u626B\u63CF\u4E8C\u7EF4\u7801", "\u8F93\u5165 PIN1"],
530
+ qrAlt: "\u767B\u5F55\u4E8C\u7EF4\u7801 \u2014 \u8BF7\u7528\u624B\u673A\u4E0A\u7684 e-ID Mongolia \u5E94\u7528\u626B\u63CF",
531
+ steps: ["\u5728\u624B\u673A\u4E0A\u6253\u5F00 e-ID Mongolia \u5E94\u7528", "\u626B\u63CF\u4E8C\u7EF4\u7801", "\u8F93\u5165 PIN1"],
534
532
  vcLabel: "\u9A8C\u8BC1\u7801",
535
533
  or: "\u6216",
536
534
  usePush: "\u4F7F\u7528\u767B\u8BB0\u53F7\u767B\u5F55",
@@ -566,10 +564,11 @@ var T = {
566
564
  fr: {
567
565
  button: "Se connecter avec e-ID",
568
566
  title: "Se connecter avec e-ID",
567
+ withLogo: ["Se connecter avec ", ""],
569
568
  close: "Fermer",
570
569
  loading: "Chargement",
571
- qrAlt: "Code QR de connexion \u2014 scannez-le avec l'application eID Mongolia sur votre t\xE9l\xE9phone",
572
- steps: ["Ouvrez l'application eID Mongolia sur votre t\xE9l\xE9phone", "Scannez le code QR", "Saisissez votre PIN1"],
570
+ qrAlt: "Code QR de connexion \u2014 scannez-le avec l'application e-ID Mongolia sur votre t\xE9l\xE9phone",
571
+ steps: ["Ouvrez l'application e-ID Mongolia sur votre t\xE9l\xE9phone", "Scannez le code QR", "Saisissez votre PIN1"],
573
572
  vcLabel: "Code de v\xE9rification",
574
573
  or: "ou",
575
574
  usePush: "Se connecter avec le num\xE9ro national d'identit\xE9",
@@ -605,10 +604,11 @@ var T = {
605
604
  es: {
606
605
  button: "Iniciar sesi\xF3n con e-ID",
607
606
  title: "Iniciar sesi\xF3n con e-ID",
607
+ withLogo: ["Iniciar sesi\xF3n con ", ""],
608
608
  close: "Cerrar",
609
609
  loading: "Cargando",
610
- qrAlt: "C\xF3digo QR de inicio de sesi\xF3n: escan\xE9elo con la aplicaci\xF3n eID Mongolia de su tel\xE9fono",
611
- steps: ["Abra la aplicaci\xF3n eID Mongolia en su tel\xE9fono", "Escanee el c\xF3digo QR", "Introduzca su PIN1"],
610
+ qrAlt: "C\xF3digo QR de inicio de sesi\xF3n: escan\xE9elo con la aplicaci\xF3n e-ID Mongolia de su tel\xE9fono",
611
+ steps: ["Abra la aplicaci\xF3n e-ID Mongolia en su tel\xE9fono", "Escanee el c\xF3digo QR", "Introduzca su PIN1"],
612
612
  vcLabel: "C\xF3digo de verificaci\xF3n",
613
613
  or: "o",
614
614
  usePush: "Iniciar sesi\xF3n con el documento nacional de identidad",
@@ -644,10 +644,11 @@ var T = {
644
644
  ar: {
645
645
  button: "\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0639\u0628\u0631 e-ID",
646
646
  title: "\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0639\u0628\u0631 e-ID",
647
+ withLogo: ["\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0639\u0628\u0631 ", ""],
647
648
  close: "\u0625\u063A\u0644\u0627\u0642",
648
649
  loading: "\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644",
649
- qrAlt: "\u0631\u0645\u0632 QR \u0644\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u2014 \u0627\u0645\u0633\u062D\u0647 \u0628\u062A\u0637\u0628\u064A\u0642 eID Mongolia \u0639\u0644\u0649 \u0647\u0627\u062A\u0641\u0643",
650
- steps: ["\u0627\u0641\u062A\u062D \u062A\u0637\u0628\u064A\u0642 eID Mongolia \u0639\u0644\u0649 \u0647\u0627\u062A\u0641\u0643", "\u0627\u0645\u0633\u062D \u0631\u0645\u0632 QR", "\u0623\u062F\u062E\u0644 PIN1"],
650
+ qrAlt: "\u0631\u0645\u0632 QR \u0644\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u2014 \u0627\u0645\u0633\u062D\u0647 \u0628\u062A\u0637\u0628\u064A\u0642 e-ID Mongolia \u0639\u0644\u0649 \u0647\u0627\u062A\u0641\u0643",
651
+ steps: ["\u0627\u0641\u062A\u062D \u062A\u0637\u0628\u064A\u0642 e-ID Mongolia \u0639\u0644\u0649 \u0647\u0627\u062A\u0641\u0643", "\u0627\u0645\u0633\u062D \u0631\u0645\u0632 QR", "\u0623\u062F\u062E\u0644 PIN1"],
651
652
  vcLabel: "\u0631\u0645\u0632 \u0627\u0644\u062A\u062D\u0642\u0642",
652
653
  or: "\u0623\u0648",
653
654
  usePush: "\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0628\u0631\u0642\u0645 \u0627\u0644\u0647\u0648\u064A\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629",
@@ -704,7 +705,7 @@ var EID_COLOR_TOKENS = [
704
705
  ["fg-muted", "hsl(215 19% 35%)", "hsl(213 27% 84%)"],
705
706
  ["fg-subtle", "hsl(215 16% 45%)", "hsl(215 20% 65%)"],
706
707
  ["border", "hsl(214 32% 91%)", "hsl(217 33% 17%)"],
707
- ["border-strong", "hsl(213 27% 84%)", "hsl(215 25% 27%)"],
708
+ ["border-strong", "hsl(213 27% 84%)", "hsl(215 20% 45%)"],
708
709
  ["accent", "oklch(0.534 0.2 259)", "oklch(0.64 0.15 259)"],
709
710
  ["accent-fg", "#fff", "hsl(229 50% 6%)"],
710
711
  ["accent-subtle", "oklch(0.97 0.03 259)", "oklch(0.24 0.06 259)"],
@@ -725,8 +726,7 @@ button, input { font-family: inherit; }
725
726
  `;
726
727
  var DARK_CSS = `:host { color-scheme: dark;
727
728
  ${darkVars} }
728
- .logo .m-a { fill: #fff; }
729
- .logo .m-l { stroke: #0A1631; }
729
+ .btn:disabled { opacity: 1; background: var(--_eid-bg-muted); color: var(--_eid-fg-subtle); border-color: var(--_eid-border-strong); }
730
730
  `;
731
731
  var CSS_REST = `
732
732
  *, *::before, *::after { box-sizing: border-box; }
@@ -744,10 +744,9 @@ h2, p, ol { margin: 0; }
744
744
  .btn-outline:hover { background: var(--_eid-bg-muted); }
745
745
  .btn-sm { width: auto; min-height: 36px; padding: 0 14px; font-size: 0.8125rem; }
746
746
  .trigger { width: auto; }
747
- .logo { display: block; flex: none; width: 20px; height: 20px; }
748
- .logo .m-a { fill: #0A1631; }
749
- .logo .m-l { stroke: #fff; }
750
- .trigger.icon-only .logo { width: 24px; height: 24px; }
747
+ .brand { display: inline-flex; align-items: center; gap: 6px; }
748
+ .logo { display: block; flex: none; height: 16px; width: auto; aspect-ratio: 3840 / 1372; fill: currentColor; }
749
+ .trigger.icon-only .logo { height: 12px; }
751
750
  .trigger.icon-only { width: 44px; height: 44px; padding: 0; }
752
751
  .backdrop { position: fixed; inset: 0; z-index: 2147483000; background: hsl(222 47% 11% / 0.5); display: flex; align-items: center;
753
752
  justify-content: center; padding: 16px; overflow-y: auto; }
@@ -757,7 +756,7 @@ dialog.dialog::backdrop { background: hsl(222 47% 11% / 0.5); }
757
756
  color: var(--_eid-fg); border: 1px solid var(--_eid-border); border-radius: var(--_eid-radius-lg); padding: 24px; font-size: 0.875rem; line-height: 1.5rem; }
758
757
  @media (max-width: 639px) { .dialog { padding: 16px; } }
759
758
  .head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
760
- .head .logo { width: 24px; height: 24px; }
759
+ .head .logo { height: 20px; }
761
760
  .head h2 { flex: 1; font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; }
762
761
  .x { width: 36px; height: 36px; border: 0; border-radius: var(--_eid-radius); background: transparent; color: var(--_eid-fg-muted); cursor: pointer; font-size: 1.25rem; line-height: 1; }
763
762
  .x:hover { background: var(--_eid-bg-muted); color: var(--_eid-fg); }
@@ -833,11 +832,10 @@ function logo(attrs = {}) {
833
832
  for (const [k, v] of Object.entries({ class: "logo", viewBox: EID_LOGO_VIEWBOX, "aria-hidden": "true", focusable: "false", ...attrs })) {
834
833
  svg.setAttribute(k, v);
835
834
  }
836
- for (const [tag, a] of EID_LOGO_SHAPES) {
837
- const node = document.createElementNS(NS, tag);
838
- for (const [k, v] of Object.entries(a)) node.setAttribute(k, v);
839
- svg.append(node);
840
- }
835
+ const path = document.createElementNS(NS, "path");
836
+ path.setAttribute("transform", EID_LOGO_TRANSFORM);
837
+ path.setAttribute("d", EID_LOGO_PATH);
838
+ svg.append(path);
841
839
  return svg;
842
840
  }
843
841
  function chevron() {
@@ -931,16 +929,29 @@ var EidLoginButton = class extends Base {
931
929
  console.warn('<eid-login-button>: icon="none" \u0431\u0430 \u0442\u0435\u043A\u0441\u0442\u0433\u04AF\u0439 (variant="icon" \u044D\u0441\u0432\u044D\u043B label="") \u2014 \u0430\u043D\u0445\u0434\u0430\u0433\u0447 \u0442\u0435\u043A\u0441\u0442\u0438\u0439\u0433 \u0445\u0430\u0440\u0443\u0443\u043B\u0430\u0432.');
932
930
  }
933
931
  }
932
+ const brand = hasIcon && !iconOnly && !label;
934
933
  const nodes = [];
935
- if (hasIcon) nodes.push(logo({ part: "icon" }));
936
- if (!iconOnly) nodes.push(el("span", { part: "label" }, text));
934
+ if (brand) nodes.push(this.brand({ part: "icon" }, { part: "label" }));
935
+ else {
936
+ if (hasIcon) nodes.push(logo({ part: "icon" }));
937
+ if (!iconOnly) nodes.push(el("span", { part: "label" }, text));
938
+ }
937
939
  this.trigger.replaceChildren(...nodes);
938
940
  this.trigger.classList.toggle("icon-only", iconOnly);
939
941
  this.trigger.setAttribute("dir", this.uiDir);
940
- const aria = this.getAttribute("aria-label") || (iconOnly ? text : null);
942
+ const aria = this.getAttribute("aria-label") || (iconOnly || brand ? text : null);
941
943
  if (aria) this.trigger.setAttribute("aria-label", aria);
942
944
  else this.trigger.removeAttribute("aria-label");
943
945
  }
946
+ /** Лого + i18n-ийн өмнөх/дараах текст. Лого aria-hidden — дуудагч бүтэн нэрийг aria-label-аар өгнө. */
947
+ brand(logoAttrs = {}, textAttrs = {}) {
948
+ const [pre, post] = this.t.withLogo;
949
+ const box = el("span", { class: "brand" });
950
+ if (pre) box.append(el("span", textAttrs, pre));
951
+ box.append(logo(logoAttrs));
952
+ if (post) box.append(el("span", textAttrs, post));
953
+ return box;
954
+ }
944
955
  disconnectedCallback() {
945
956
  this.close();
946
957
  this.themeObs?.disconnect();
@@ -989,8 +1000,9 @@ var EidLoginButton = class extends Base {
989
1000
  const head = el("div", { class: "head" });
990
1001
  const x = el("button", { type: "button", class: "x", "aria-label": this.t.close }, "\xD7");
991
1002
  x.addEventListener("click", () => this.close());
992
- const h2 = el("h2", { id: "eid-title" }, this.t.title);
993
- head.append(logo(), h2, x);
1003
+ const h2 = el("h2", { id: "eid-title", "aria-label": this.t.title });
1004
+ h2.append(this.brand());
1005
+ head.append(h2, x);
994
1006
  this.body = el("div");
995
1007
  this.live = el("p", { class: "sr-only", "aria-live": "polite" });
996
1008
  dlg.append(head, this.body, this.live);
package/dist/button.d.cts CHANGED
@@ -82,6 +82,8 @@ declare class EidLoginButton extends Base {
82
82
  attributeChangedCallback(name: string): void;
83
83
  /** Trigger-ийн агуулга: label / icon / variant / aria-label-аас. Хоосон товч хэзээ ч үүсгэхгүй. */
84
84
  private renderTrigger;
85
+ /** Лого + i18n-ийн өмнөх/дараах текст. Лого aria-hidden — дуудагч бүтэн нэрийг aria-label-аар өгнө. */
86
+ private brand;
85
87
  disconnectedCallback(): void;
86
88
  /** Одоогийн бодит схем (`theme` + auto үед хуудас/OS). */
87
89
  get scheme(): Scheme;
package/dist/button.d.ts CHANGED
@@ -82,6 +82,8 @@ declare class EidLoginButton extends Base {
82
82
  attributeChangedCallback(name: string): void;
83
83
  /** Trigger-ийн агуулга: label / icon / variant / aria-label-аас. Хоосон товч хэзээ ч үүсгэхгүй. */
84
84
  private renderTrigger;
85
+ /** Лого + i18n-ийн өмнөх/дараах текст. Лого aria-hidden — дуудагч бүтэн нэрийг aria-label-аар өгнө. */
86
+ private brand;
85
87
  disconnectedCallback(): void;
86
88
  /** Одоогийн бодит схем (`theme` + auto үед хуудас/OS). */
87
89
  get scheme(): Scheme;
package/dist/button.js CHANGED
@@ -9,16 +9,9 @@ function isMobileUserAgent(nav) {
9
9
  }
10
10
 
11
11
  // src/logo.ts
12
- var EID_LOGO_VIEWBOX = "0 0 64 64";
13
- var EID_LOGO_SHAPES = [
14
- ["path", { class: "m-a", d: "M18 4H30V60H18A14 14 0 0 1 4 46V18A14 14 0 0 1 18 4Z" }],
15
- ["path", { d: "M34 4H46A14 14 0 0 1 60 18V46A14 14 0 0 1 46 60H34Z", fill: "#2457E6" }],
16
- ["path", { class: "m-l", d: "M14 32H50A18 18 0 0 0 14 32A18 18 0 0 0 50 32", fill: "none", "stroke-width": "4.8", "stroke-linejoin": "round" }],
17
- ["circle", { class: "m-l", cx: "32", cy: "32", r: "12", fill: "#1564E1", "stroke-width": "1.4" }],
18
- ["path", { d: "M23.5 23.5L40.5 40.5M40.5 23.5L23.5 40.5", stroke: "#FFFFFF", "stroke-width": "1.8" }],
19
- ["circle", { cx: "32", cy: "32", r: "4.4", fill: "#FFFFFF" }],
20
- ["circle", { cx: "32", cy: "32", r: "3", fill: "#1564E1" }]
21
- ];
12
+ var EID_LOGO_VIEWBOX = "0 0 3840 1372";
13
+ var EID_LOGO_TRANSFORM = "translate(0.016725,1765.695476) scale(1,-1)";
14
+ var EID_LOGO_PATH = "M331 1765 c-26 -5 -46 -23 -54 -49 l-2 -7 0 -81 0 -80 2 -9 c9 -25 28 -42 54 -47 6 -1 41 -1 219 -1 237 0 219 1 235 -7 17 -9 32 -28 36 -46 3 -11 2 -160 0 -169 -7 -25 -25 -43 -50 -50 -6 -1 -16 -1 -222 -1 -207 0 -217 0 -223 1 -20 6 -35 19 -44 37 -7 12 -6 8 -7 96 -1 81 -1 82 -3 89 -7 24 -26 42 -50 49 -6 1 -13 2 -85 2 l-78 0 -8 -3 c-25 -7 -43 -25 -49 -50 -2 -7 -2 -11 -2 -276 0 -303 -1 -275 8 -292 3 -7 7 -12 232 -237 225 -225 230 -229 237 -232 16 -8 -12 -7 292 -7 257 0 271 0 277 1 24 7 44 27 49 51 3 10 3 159 0 169 -5 23 -23 42 -47 50 l-7 3 -356 0 -356 1 -8 2 c-21 8 -38 25 -44 46 l-2 8 0 79 c0 88 0 86 6 99 10 18 24 31 45 37 5 1 22 1 361 2 l356 1 7 2 c21 8 36 23 44 44 l3 8 0 134 c0 148 0 141 -6 155 -2 3 -6 9 -8 13 -3 3 -106 106 -229 229 -240 240 -227 227 -244 233 l-8 4 -133 0 c-74 0 -135 -1 -138 -1z M2251 1765 c-26 -5 -46 -23 -54 -49 l-2 -7 0 -629 0 -628 2 -8 c7 -24 23 -40 47 -47 l8 -2 80 0 81 0 8 2 c25 9 42 28 47 54 2 11 2 1247 0 1258 -5 26 -22 45 -47 54 l-8 3 -79 0 c-43 0 -80 -1 -83 -1z M2798 1765 c-26 -6 -48 -27 -53 -52 -2 -6 -2 -58 -2 -499 l1 -491 2 -8 c8 -22 27 -39 49 -45 10 -2 160 -2 170 0 22 6 41 23 49 45 l3 8 0 355 c0 286 1 356 2 361 5 18 19 36 36 45 16 8 -2 7 240 7 l217 0 7 -3 c21 -8 38 -25 44 -46 l2 -8 0 -354 0 -354 -2 -8 c-6 -21 -23 -38 -44 -46 l-7 -2 -219 -1 -219 0 -8 -3 c-19 -7 -33 -19 -41 -35 -8 -16 -8 -14 -8 -103 l1 -78 3 -9 c6 -18 18 -32 34 -40 17 -7 9 -7 157 -7 147 1 135 0 151 8 7 3 12 7 237 232 225 225 229 230 232 237 9 17 8 0 8 209 0 209 1 192 -8 209 -3 7 -7 12 -232 237 -225 225 -230 229 -237 232 -16 8 13 7 -289 8 -218 0 -271 0 -276 -1z M1424 1215 c-24 -5 -43 -24 -50 -48 l-2 -7 0 -80 0 -79 2 -8 c6 -19 19 -35 35 -43 16 -8 -3 -7 237 -7 209 0 215 0 222 2 25 6 45 27 50 52 3 10 3 156 0 166 -5 25 -25 46 -50 52 -7 2 -13 2 -223 2 -185 0 -216 0 -221 -2z";
22
15
 
23
16
  // src/qr.ts
24
17
  var ECC_PER_BLOCK_M = [
@@ -377,10 +370,12 @@ function resolveEidLang(lang) {
377
370
  var MN = {
378
371
  button: "e-ID-\u044D\u044D\u0440 \u043D\u044D\u0432\u0442\u0440\u044D\u0445",
379
372
  title: "e-ID-\u044D\u044D\u0440 \u043D\u044D\u0432\u0442\u0440\u044D\u0445",
373
+ // Лого «e-ID» гэж бичигддэг тул логотой үед «e-ID»-г давтахгүй: [лого] нэвтрэх.
374
+ withLogo: ["", "\u043D\u044D\u0432\u0442\u0440\u044D\u0445"],
380
375
  close: "\u0425\u0430\u0430\u0445",
381
376
  loading: "\u0410\u0447\u0430\u0430\u043B\u0436 \u0431\u0430\u0439\u043D\u0430",
382
- qrAlt: "\u041D\u044D\u0432\u0442\u0440\u044D\u0445 QR \u043A\u043E\u0434 \u2014 \u0443\u0442\u0441\u0430\u043D \u0434\u044D\u044D\u0440\u0445 eID Mongolia \u0430\u043F\u043F\u0430\u0430\u0440 \u0443\u043D\u0448\u0443\u0443\u043B\u043D\u0430",
383
- steps: ["\u0423\u0442\u0441\u0430\u043D \u0434\u044D\u044D\u0440\u0445 eID Mongolia \u0430\u043F\u043F\u044B\u0433 \u043D\u044D\u044D\u043D\u044D", "QR \u043A\u043E\u0434\u044B\u0433 \u0443\u043D\u0448\u0443\u0443\u043B\u043D\u0430", "PIN1 \u043A\u043E\u0434\u043E\u043E \u043E\u0440\u0443\u0443\u043B\u043D\u0430"],
377
+ qrAlt: "\u041D\u044D\u0432\u0442\u0440\u044D\u0445 QR \u043A\u043E\u0434 \u2014 \u0443\u0442\u0441\u0430\u043D \u0434\u044D\u044D\u0440\u0445 e-ID Mongolia \u0430\u043F\u043F\u0430\u0430\u0440 \u0443\u043D\u0448\u0443\u0443\u043B\u043D\u0430",
378
+ steps: ["\u0423\u0442\u0441\u0430\u043D \u0434\u044D\u044D\u0440\u0445 e-ID Mongolia \u0430\u043F\u043F\u044B\u0433 \u043D\u044D\u044D\u043D\u044D", "QR \u043A\u043E\u0434\u044B\u0433 \u0443\u043D\u0448\u0443\u0443\u043B\u043D\u0430", "PIN1 \u043A\u043E\u0434\u043E\u043E \u043E\u0440\u0443\u0443\u043B\u043D\u0430"],
384
379
  vcLabel: "\u0411\u0430\u0442\u0430\u043B\u0433\u0430\u0430\u0436\u0443\u0443\u043B\u0430\u0445 \u043A\u043E\u0434",
385
380
  or: "\u044D\u0441\u0432\u044D\u043B",
386
381
  usePush: "\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0439\u043D \u0434\u0443\u0433\u0430\u0430\u0440\u0430\u0430\u0440 \u043D\u044D\u0432\u0442\u0440\u044D\u0445",
@@ -418,10 +413,11 @@ var T = {
418
413
  en: {
419
414
  button: "Log in with e-ID",
420
415
  title: "Log in with e-ID",
416
+ withLogo: ["Log in with ", ""],
421
417
  close: "Close",
422
418
  loading: "Loading",
423
- qrAlt: "Login QR code \u2014 scan it with the eID Mongolia app on your phone",
424
- steps: ["Open the eID Mongolia app on your phone", "Scan the QR code", "Enter your PIN1"],
419
+ qrAlt: "Login QR code \u2014 scan it with the e-ID Mongolia app on your phone",
420
+ steps: ["Open the e-ID Mongolia app on your phone", "Scan the QR code", "Enter your PIN1"],
425
421
  vcLabel: "Verification code",
426
422
  or: "or",
427
423
  usePush: "Log in with registration number",
@@ -457,10 +453,11 @@ var T = {
457
453
  ru: {
458
454
  button: "\u0412\u043E\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 e-ID",
459
455
  title: "\u0412\u043E\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 e-ID",
456
+ withLogo: ["\u0412\u043E\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 ", ""],
460
457
  close: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C",
461
458
  loading: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",
462
- qrAlt: "QR-\u043A\u043E\u0434 \u0434\u043B\u044F \u0432\u0445\u043E\u0434\u0430 \u2014 \u043E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C eID Mongolia \u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0435",
463
- steps: ["\u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 eID Mongolia \u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0435", "\u041E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043A\u043E\u0434", "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 PIN1"],
459
+ qrAlt: "QR-\u043A\u043E\u0434 \u0434\u043B\u044F \u0432\u0445\u043E\u0434\u0430 \u2014 \u043E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C e-ID Mongolia \u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0435",
460
+ steps: ["\u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 e-ID Mongolia \u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0435", "\u041E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043A\u043E\u0434", "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 PIN1"],
464
461
  vcLabel: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F",
465
462
  or: "\u0438\u043B\u0438",
466
463
  usePush: "\u0412\u043E\u0439\u0442\u0438 \u043F\u043E \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u043C\u0443 \u043D\u043E\u043C\u0435\u0440\u0443",
@@ -496,10 +493,11 @@ var T = {
496
493
  zh: {
497
494
  button: "\u4F7F\u7528 e-ID \u767B\u5F55",
498
495
  title: "\u4F7F\u7528 e-ID \u767B\u5F55",
496
+ withLogo: ["\u4F7F\u7528", "\u767B\u5F55"],
499
497
  close: "\u5173\u95ED",
500
498
  loading: "\u52A0\u8F7D\u4E2D",
501
- qrAlt: "\u767B\u5F55\u4E8C\u7EF4\u7801 \u2014 \u8BF7\u7528\u624B\u673A\u4E0A\u7684 eID Mongolia \u5E94\u7528\u626B\u63CF",
502
- steps: ["\u5728\u624B\u673A\u4E0A\u6253\u5F00 eID Mongolia \u5E94\u7528", "\u626B\u63CF\u4E8C\u7EF4\u7801", "\u8F93\u5165 PIN1"],
499
+ qrAlt: "\u767B\u5F55\u4E8C\u7EF4\u7801 \u2014 \u8BF7\u7528\u624B\u673A\u4E0A\u7684 e-ID Mongolia \u5E94\u7528\u626B\u63CF",
500
+ steps: ["\u5728\u624B\u673A\u4E0A\u6253\u5F00 e-ID Mongolia \u5E94\u7528", "\u626B\u63CF\u4E8C\u7EF4\u7801", "\u8F93\u5165 PIN1"],
503
501
  vcLabel: "\u9A8C\u8BC1\u7801",
504
502
  or: "\u6216",
505
503
  usePush: "\u4F7F\u7528\u767B\u8BB0\u53F7\u767B\u5F55",
@@ -535,10 +533,11 @@ var T = {
535
533
  fr: {
536
534
  button: "Se connecter avec e-ID",
537
535
  title: "Se connecter avec e-ID",
536
+ withLogo: ["Se connecter avec ", ""],
538
537
  close: "Fermer",
539
538
  loading: "Chargement",
540
- qrAlt: "Code QR de connexion \u2014 scannez-le avec l'application eID Mongolia sur votre t\xE9l\xE9phone",
541
- steps: ["Ouvrez l'application eID Mongolia sur votre t\xE9l\xE9phone", "Scannez le code QR", "Saisissez votre PIN1"],
539
+ qrAlt: "Code QR de connexion \u2014 scannez-le avec l'application e-ID Mongolia sur votre t\xE9l\xE9phone",
540
+ steps: ["Ouvrez l'application e-ID Mongolia sur votre t\xE9l\xE9phone", "Scannez le code QR", "Saisissez votre PIN1"],
542
541
  vcLabel: "Code de v\xE9rification",
543
542
  or: "ou",
544
543
  usePush: "Se connecter avec le num\xE9ro national d'identit\xE9",
@@ -574,10 +573,11 @@ var T = {
574
573
  es: {
575
574
  button: "Iniciar sesi\xF3n con e-ID",
576
575
  title: "Iniciar sesi\xF3n con e-ID",
576
+ withLogo: ["Iniciar sesi\xF3n con ", ""],
577
577
  close: "Cerrar",
578
578
  loading: "Cargando",
579
- qrAlt: "C\xF3digo QR de inicio de sesi\xF3n: escan\xE9elo con la aplicaci\xF3n eID Mongolia de su tel\xE9fono",
580
- steps: ["Abra la aplicaci\xF3n eID Mongolia en su tel\xE9fono", "Escanee el c\xF3digo QR", "Introduzca su PIN1"],
579
+ qrAlt: "C\xF3digo QR de inicio de sesi\xF3n: escan\xE9elo con la aplicaci\xF3n e-ID Mongolia de su tel\xE9fono",
580
+ steps: ["Abra la aplicaci\xF3n e-ID Mongolia en su tel\xE9fono", "Escanee el c\xF3digo QR", "Introduzca su PIN1"],
581
581
  vcLabel: "C\xF3digo de verificaci\xF3n",
582
582
  or: "o",
583
583
  usePush: "Iniciar sesi\xF3n con el documento nacional de identidad",
@@ -613,10 +613,11 @@ var T = {
613
613
  ar: {
614
614
  button: "\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0639\u0628\u0631 e-ID",
615
615
  title: "\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0639\u0628\u0631 e-ID",
616
+ withLogo: ["\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0639\u0628\u0631 ", ""],
616
617
  close: "\u0625\u063A\u0644\u0627\u0642",
617
618
  loading: "\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644",
618
- qrAlt: "\u0631\u0645\u0632 QR \u0644\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u2014 \u0627\u0645\u0633\u062D\u0647 \u0628\u062A\u0637\u0628\u064A\u0642 eID Mongolia \u0639\u0644\u0649 \u0647\u0627\u062A\u0641\u0643",
619
- steps: ["\u0627\u0641\u062A\u062D \u062A\u0637\u0628\u064A\u0642 eID Mongolia \u0639\u0644\u0649 \u0647\u0627\u062A\u0641\u0643", "\u0627\u0645\u0633\u062D \u0631\u0645\u0632 QR", "\u0623\u062F\u062E\u0644 PIN1"],
619
+ qrAlt: "\u0631\u0645\u0632 QR \u0644\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u2014 \u0627\u0645\u0633\u062D\u0647 \u0628\u062A\u0637\u0628\u064A\u0642 e-ID Mongolia \u0639\u0644\u0649 \u0647\u0627\u062A\u0641\u0643",
620
+ steps: ["\u0627\u0641\u062A\u062D \u062A\u0637\u0628\u064A\u0642 e-ID Mongolia \u0639\u0644\u0649 \u0647\u0627\u062A\u0641\u0643", "\u0627\u0645\u0633\u062D \u0631\u0645\u0632 QR", "\u0623\u062F\u062E\u0644 PIN1"],
620
621
  vcLabel: "\u0631\u0645\u0632 \u0627\u0644\u062A\u062D\u0642\u0642",
621
622
  or: "\u0623\u0648",
622
623
  usePush: "\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0628\u0631\u0642\u0645 \u0627\u0644\u0647\u0648\u064A\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629",
@@ -673,7 +674,7 @@ var EID_COLOR_TOKENS = [
673
674
  ["fg-muted", "hsl(215 19% 35%)", "hsl(213 27% 84%)"],
674
675
  ["fg-subtle", "hsl(215 16% 45%)", "hsl(215 20% 65%)"],
675
676
  ["border", "hsl(214 32% 91%)", "hsl(217 33% 17%)"],
676
- ["border-strong", "hsl(213 27% 84%)", "hsl(215 25% 27%)"],
677
+ ["border-strong", "hsl(213 27% 84%)", "hsl(215 20% 45%)"],
677
678
  ["accent", "oklch(0.534 0.2 259)", "oklch(0.64 0.15 259)"],
678
679
  ["accent-fg", "#fff", "hsl(229 50% 6%)"],
679
680
  ["accent-subtle", "oklch(0.97 0.03 259)", "oklch(0.24 0.06 259)"],
@@ -694,8 +695,7 @@ button, input { font-family: inherit; }
694
695
  `;
695
696
  var DARK_CSS = `:host { color-scheme: dark;
696
697
  ${darkVars} }
697
- .logo .m-a { fill: #fff; }
698
- .logo .m-l { stroke: #0A1631; }
698
+ .btn:disabled { opacity: 1; background: var(--_eid-bg-muted); color: var(--_eid-fg-subtle); border-color: var(--_eid-border-strong); }
699
699
  `;
700
700
  var CSS_REST = `
701
701
  *, *::before, *::after { box-sizing: border-box; }
@@ -713,10 +713,9 @@ h2, p, ol { margin: 0; }
713
713
  .btn-outline:hover { background: var(--_eid-bg-muted); }
714
714
  .btn-sm { width: auto; min-height: 36px; padding: 0 14px; font-size: 0.8125rem; }
715
715
  .trigger { width: auto; }
716
- .logo { display: block; flex: none; width: 20px; height: 20px; }
717
- .logo .m-a { fill: #0A1631; }
718
- .logo .m-l { stroke: #fff; }
719
- .trigger.icon-only .logo { width: 24px; height: 24px; }
716
+ .brand { display: inline-flex; align-items: center; gap: 6px; }
717
+ .logo { display: block; flex: none; height: 16px; width: auto; aspect-ratio: 3840 / 1372; fill: currentColor; }
718
+ .trigger.icon-only .logo { height: 12px; }
720
719
  .trigger.icon-only { width: 44px; height: 44px; padding: 0; }
721
720
  .backdrop { position: fixed; inset: 0; z-index: 2147483000; background: hsl(222 47% 11% / 0.5); display: flex; align-items: center;
722
721
  justify-content: center; padding: 16px; overflow-y: auto; }
@@ -726,7 +725,7 @@ dialog.dialog::backdrop { background: hsl(222 47% 11% / 0.5); }
726
725
  color: var(--_eid-fg); border: 1px solid var(--_eid-border); border-radius: var(--_eid-radius-lg); padding: 24px; font-size: 0.875rem; line-height: 1.5rem; }
727
726
  @media (max-width: 639px) { .dialog { padding: 16px; } }
728
727
  .head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
729
- .head .logo { width: 24px; height: 24px; }
728
+ .head .logo { height: 20px; }
730
729
  .head h2 { flex: 1; font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; }
731
730
  .x { width: 36px; height: 36px; border: 0; border-radius: var(--_eid-radius); background: transparent; color: var(--_eid-fg-muted); cursor: pointer; font-size: 1.25rem; line-height: 1; }
732
731
  .x:hover { background: var(--_eid-bg-muted); color: var(--_eid-fg); }
@@ -802,11 +801,10 @@ function logo(attrs = {}) {
802
801
  for (const [k, v] of Object.entries({ class: "logo", viewBox: EID_LOGO_VIEWBOX, "aria-hidden": "true", focusable: "false", ...attrs })) {
803
802
  svg.setAttribute(k, v);
804
803
  }
805
- for (const [tag, a] of EID_LOGO_SHAPES) {
806
- const node = document.createElementNS(NS, tag);
807
- for (const [k, v] of Object.entries(a)) node.setAttribute(k, v);
808
- svg.append(node);
809
- }
804
+ const path = document.createElementNS(NS, "path");
805
+ path.setAttribute("transform", EID_LOGO_TRANSFORM);
806
+ path.setAttribute("d", EID_LOGO_PATH);
807
+ svg.append(path);
810
808
  return svg;
811
809
  }
812
810
  function chevron() {
@@ -900,16 +898,29 @@ var EidLoginButton = class extends Base {
900
898
  console.warn('<eid-login-button>: icon="none" \u0431\u0430 \u0442\u0435\u043A\u0441\u0442\u0433\u04AF\u0439 (variant="icon" \u044D\u0441\u0432\u044D\u043B label="") \u2014 \u0430\u043D\u0445\u0434\u0430\u0433\u0447 \u0442\u0435\u043A\u0441\u0442\u0438\u0439\u0433 \u0445\u0430\u0440\u0443\u0443\u043B\u0430\u0432.');
901
899
  }
902
900
  }
901
+ const brand = hasIcon && !iconOnly && !label;
903
902
  const nodes = [];
904
- if (hasIcon) nodes.push(logo({ part: "icon" }));
905
- if (!iconOnly) nodes.push(el("span", { part: "label" }, text));
903
+ if (brand) nodes.push(this.brand({ part: "icon" }, { part: "label" }));
904
+ else {
905
+ if (hasIcon) nodes.push(logo({ part: "icon" }));
906
+ if (!iconOnly) nodes.push(el("span", { part: "label" }, text));
907
+ }
906
908
  this.trigger.replaceChildren(...nodes);
907
909
  this.trigger.classList.toggle("icon-only", iconOnly);
908
910
  this.trigger.setAttribute("dir", this.uiDir);
909
- const aria = this.getAttribute("aria-label") || (iconOnly ? text : null);
911
+ const aria = this.getAttribute("aria-label") || (iconOnly || brand ? text : null);
910
912
  if (aria) this.trigger.setAttribute("aria-label", aria);
911
913
  else this.trigger.removeAttribute("aria-label");
912
914
  }
915
+ /** Лого + i18n-ийн өмнөх/дараах текст. Лого aria-hidden — дуудагч бүтэн нэрийг aria-label-аар өгнө. */
916
+ brand(logoAttrs = {}, textAttrs = {}) {
917
+ const [pre, post] = this.t.withLogo;
918
+ const box = el("span", { class: "brand" });
919
+ if (pre) box.append(el("span", textAttrs, pre));
920
+ box.append(logo(logoAttrs));
921
+ if (post) box.append(el("span", textAttrs, post));
922
+ return box;
923
+ }
913
924
  disconnectedCallback() {
914
925
  this.close();
915
926
  this.themeObs?.disconnect();
@@ -958,8 +969,9 @@ var EidLoginButton = class extends Base {
958
969
  const head = el("div", { class: "head" });
959
970
  const x = el("button", { type: "button", class: "x", "aria-label": this.t.close }, "\xD7");
960
971
  x.addEventListener("click", () => this.close());
961
- const h2 = el("h2", { id: "eid-title" }, this.t.title);
962
- head.append(logo(), h2, x);
972
+ const h2 = el("h2", { id: "eid-title", "aria-label": this.t.title });
973
+ h2.append(this.brand());
974
+ head.append(h2, x);
963
975
  this.body = el("div");
964
976
  this.live = el("p", { class: "sr-only", "aria-live": "polite" });
965
977
  dlg.append(head, this.body, this.live);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gerege-systems/eid-mongolia-sdk",
3
- "version": "0.39.0",
3
+ "version": "0.40.1",
4
4
  "description": "e-ID Mongolia Relying Party SDK — иргэнээр утсаар нь нэвтрэлт ба хууль ёсны цахим гарын үсэг (RP-API v3, Smart-ID нийцтэй).",
5
5
  "license": "MIT",
6
6
  "type": "module",