bank20baht-ui 0.5.3 → 0.5.5

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,4 +1,4 @@
1
- import { svg as s, html as p, nothing as h } from "lit";
1
+ import { svg as s, html as p, nothing as r } from "lit";
2
2
  import { property as n, query as q, customElement as v, state as C } from "lit/decorators.js";
3
3
  import { B as y, b as w, h as M } from "./base-D1pT3J5T.js";
4
4
  import { t as A } from "./i18n-CWv5lrun.js";
@@ -71,6 +71,10 @@ const x = {
71
71
  viewBox: "0 0 146 150",
72
72
  body: s`<path d="M56 10A69 69 0 0 0 9.5 58.5c-2.2 8.6-2 24.4.5 33.9a61 61 0 0 0 17.5 30.2A62 62 0 0 0 73 142c38.1-.1 65.6-28.3 65.3-67A67 67 0 0 0 94 10.9a80 80 0 0 0-38-.9m35.1 5a63 63 0 0 1 41.5 46.6c2.5 11.3.7 34.4-2.7 34.4q-1 .2-.5 1.7 1 3.3-2.8 4.6c-1.4.6-1.6 1-.7 2.1 1.8 2.1.2 4.8-2.4 4.2-2.7-.7-4.2 1.9-2.3 4.1.9 1.1.7 1.8-1 3.5-1.8 1.8-2.3 1.9-3.7.8-1.4-1.2-1.8-1.2-2.5 0q-.8 1.5.2 2.7 1.2 1.3-.7 3.3c-2 2.2-4.1 2.6-4.7.8q-.5-1-1.6-.4c-.7.4-1 1.6-.7 2.6q.6 1.7-1.9 3.4c-2.3 1.5-2.6 1.5-3.4 0-1.2-2.2-3.5-.8-2.7 1.6s-3.5 3.6-5.2 1.4c-1.4-1.8-3.7-.9-2.9 1.2.8 2.2-3.6 2.9-17.4 2.9-10.5 0-13.6-.4-19.2-2.3A63 63 0 0 1 13.4 86a63 63 0 0 1 52.1-73.4c5.7-.8 19.3.4 25.6 2.4"/><path d="M63.5 21C38.7 26 20.1 49 20 74.6c0 7.6 3.1 20 6.7 26.7 4 7.4 14.2 17.9 21 21.5a54 54 0 0 0 49.3.4 68 68 0 0 0 22.7-22.8 59 59 0 0 0 5.3-37.5 58 58 0 0 0-25.2-35.6A57 57 0 0 0 63.5 21M86 26.2c6.7 2 14.8 6.7 20.4 11.9a53 53 0 0 1 15 41.4 51.5 51.5 0 0 1-41.5 44.6A50 50 0 0 1 42 113.3a52 52 0 0 1-16.5-47.4c6-29.1 34.3-47.6 60.5-39.7"/>`
73
73
  },
74
+ banknote: {
75
+ viewBox: "0 0 210 122",
76
+ body: s`<path d="M98 7.2c-57.4.6-84.8 1.2-85.7 2S11 20.9 11 62c0 44.2.2 51.9 1.5 53 1.1.9 22.3 1.1 93 .8 80.1-.3 91.7-.5 92.5-1.8 1.5-2.4 1.3-105.3-.2-106.8-.7-.7-3.9-1.1-8.2-1zM194 61v50H15V13l16.8-.1c46.4-.4 147.7-1.5 154.5-1.7l7.7-.2z"/><path d="m103.5 20-63 .5L40 24c-1.2 7.2-5.8 11.6-12.6 12.2l-3.9.3v50l4.1.5c7.5 1 10.9 4.5 12.2 12.3l.8 4.2 15.4.2c8.5.2 37.3 0 64-.5l48.5-.7.5-4.1c1-7.3 6-12.2 12.7-12.6 5.3-.3 5.3-.3 5.3-25.4 0-24.3-.2-25.2-4.3-24.6-3 .5-8.6-1.8-10.7-4.5a27 27 0 0 1-3.2-7c-.6-2.4-1.3-4.4-1.7-4.6s-28.9 0-63.6.3m61.9 8.5c2.2 5.6 7.5 10.3 12.6 11.1l4 .7v40.6l-4.2 1.2A21 21 0 0 0 165 95l-1.1 4h-18.7c-10.3 0-37.2.3-59.8.6l-41.1.6-.7-4c-1-6.7-8-13.2-14.1-13.2H27V41.3l4-1.2c2.2-.6 5.5-2.5 7.4-4.1 3-2.7 4.2-4.7 6-10.3.5-1.6 4.2-1.7 59.9-1.7h59.4z"/><path d="M97.1 29a35 35 0 0 0-22.5 18.9c-3.1 6.8-3 22.7.2 29.2a34 34 0 0 0 15.4 15.8c15.5 7.8 32.8 1.1 40.7-15.9 2.2-4.6 2.6-6.9 2.6-14.5 0-7.7-.4-9.9-2.9-15.1A30.5 30.5 0 0 0 97.1 29m18.7 7.7a31 31 0 0 1 12.3 16.6 38 38 0 0 1-2.4 23.3 31 31 0 0 1-16.1 14.5C93.4 95.5 76.8 81.3 76.7 63A28 28 0 0 1 85 41.1a23 23 0 0 1 19.8-7.7c4.8.3 7.5 1.1 11 3.3"/>`
77
+ },
74
78
  "bank-building": {
75
79
  viewBox: "0 0 196 201",
76
80
  body: s`<path d="M76.4 21.9c-12.1 7-30.4 17.9-40.9 24.2l-19 11.4-.3 5.8c-.4 7.1.7 8.7 5.9 8.7 3.6 0 3.9.2 3.9 2.9 0 4.2 1 6.1 3.6 7.2l2.4.9v66.2l-3 2.8c-2.3 2.1-3 3.7-3 6.4 0 3.3-.2 3.6-2.9 3.6-3.9 0-6.1 3.2-6.1 8.7 0 3.9-.2 4.3-2.4 4.3-3.7 0-4.7 2.1-4.4 9.7l.3 6.8h176v-7.3c0-7.7-.8-9.2-5.2-9.2-2.1 0-2.3-.5-2.3-4.9q0-8.1-6.7-8.1c-1.9 0-2.3-.5-2.3-3.3 0-3.7-2.4-7.7-4.6-7.7-1.2 0-1.4-5-1.4-33.9V83.2l2.5-1.6q2.5-1.6 3.1-5.6c.6-3.7.9-4 3.9-4 6.1 0 6.5-.6 6.5-8v-6.7l-14.2-8.6C150 39.3 102.6 11.4 99.9 10c-1.2-.7-6.9 2.2-23.5 11.9m46.2 5.8 35.3 20.9 13.4 7.9-6.8.3c-6.3.3-7.1.1-12.9-3.6l-14.6-9-23-13.6c-7.9-4.7-15-8.6-15.7-8.6-.8 0-14.5 7.9-30.6 17.5L38.5 57.1l-6.5-.3-6.5-.3 36-21.3a430 430 0 0 1 37.6-20.9c.9.3 11.4 6.3 23.5 13.4M124 41c13.9 8.2 25.5 15.2 25.8 15.5s-22.5.5-50.6.5-51.2-.3-51.2-.8c.1-.7 48.8-30 50.1-30.1.4-.1 12 6.6 25.9 14.9m52 23v4H20v-8h156zM58 74.2c0 4.6-.9 4.9-14.6 4.6l-12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1.8 29.5s1.5-4 1.5-30.4c0-23.5-.3-30.5-1.2-30.8q-1.2-.4-1.8.9m53.7 29.5c.2 19.7.7 30.8 1.3 30.8s1.1-11.1 1.3-30.8c.2-27 0-30.7-1.3-30.7s-1.5 3.7-1.3 30.7m54.5-30.1c-.4.4-.7 14.2-.7 30.6 0 29.2 0 29.8 2 29.8s2-.5 1.8-30.2c-.3-28.7-.7-32.6-3.1-30.2"/>`
@@ -108,8 +112,8 @@ function L(c) {
108
112
  return Object.prototype.hasOwnProperty.call(x, c);
109
113
  }
110
114
  var H = Object.defineProperty, O = Object.getOwnPropertyDescriptor, m = (c, t, o, a) => {
111
- for (var e = a > 1 ? void 0 : a ? O(t, o) : t, i = c.length - 1, r; i >= 0; i--)
112
- (r = c[i]) && (e = (a ? r(t, o, e) : r(e)) || e);
115
+ for (var e = a > 1 ? void 0 : a ? O(t, o) : t, l = c.length - 1, h; l >= 0; l--)
116
+ (h = c[l]) && (e = (a ? h(t, o, e) : h(e)) || e);
113
117
  return a && e && H(t, o, e), e;
114
118
  };
115
119
  let d = class extends y {
@@ -120,13 +124,13 @@ let d = class extends y {
120
124
  this.iconOnly || w(this, this.buttonEl);
121
125
  }
122
126
  render() {
123
- const c = this.variant === "primary" ? "" : ` baht-button--${this.variant}`, t = this.size === "md" ? "" : ` baht-button--${this.size}`, o = this.iconOnly ? " baht-button--icon" : "", a = this.icon && L(this.icon) ? $(this.icon) : h;
127
+ const c = this.variant === "primary" ? "" : ` baht-button--${this.variant}`, t = this.size === "md" ? "" : ` baht-button--${this.size}`, o = this.iconOnly ? " baht-button--icon" : "", a = this.icon && L(this.icon) ? $(this.icon) : r;
124
128
  return p`<button
125
129
  class="baht-button${c}${t}${o}"
126
130
  type=${this.type}
127
- aria-label=${this.iconOnly && this.label ? this.label : h}
131
+ aria-label=${this.iconOnly && this.label ? this.label : r}
128
132
  ?disabled=${this.disabled}
129
- >${a}${this.iconOnly ? h : this.label}</button>`;
133
+ >${a}${this.iconOnly ? r : this.label}</button>`;
130
134
  }
131
135
  };
132
136
  m([
@@ -167,7 +171,7 @@ function B(c, t) {
167
171
  const e = () => {
168
172
  a || (a = !0, t());
169
173
  };
170
- Promise.all(o.map((i) => i.finished.catch(() => {
174
+ Promise.all(o.map((l) => l.finished.catch(() => {
171
175
  }))).then(e, e), setTimeout(e, S);
172
176
  }
173
177
  const g = {
@@ -244,14 +248,14 @@ function z(c) {
244
248
  return p`<svg class="baht-illustration" viewBox=${t} fill="currentColor" aria-hidden="true">${o}</svg>`;
245
249
  }
246
250
  var V = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, u = (c, t, o, a) => {
247
- for (var e = a > 1 ? void 0 : a ? _(t, o) : t, i = c.length - 1, r; i >= 0; i--)
248
- (r = c[i]) && (e = (a ? r(t, o, e) : r(e)) || e);
251
+ for (var e = a > 1 ? void 0 : a ? _(t, o) : t, l = c.length - 1, h; l >= 0; l--)
252
+ (h = c[l]) && (e = (a ? h(t, o, e) : h(e)) || e);
249
253
  return a && e && V(t, o, e), e;
250
254
  };
251
- let l = class extends y {
255
+ let i = class extends y {
252
256
  constructor() {
253
257
  super(...arguments), this.open = !1, this.heading = "", this.description = "", this.showClose = !0, this.closeOnScrim = !0, this.closing = !1, this.closeToken = 0, this.previousFocus = null, this.onKeydown = (c) => {
254
- !this.open || l.openStack.at(-1) !== this || (c.key === "Escape" ? this.requestClose("escape") : c.key === "Tab" && this.trapFocus(c));
258
+ !this.open || i.openStack.at(-1) !== this || (c.key === "Escape" ? this.requestClose("escape") : c.key === "Tab" && this.trapFocus(c));
255
259
  };
256
260
  }
257
261
  get titleId() {
@@ -275,18 +279,18 @@ let l = class extends y {
275
279
  o == null || o.focus(), c.preventDefault();
276
280
  return;
277
281
  }
278
- const a = t[0], e = t[t.length - 1], i = document.activeElement;
279
- if (!this.contains(i)) {
282
+ const a = t[0], e = t[t.length - 1], l = document.activeElement;
283
+ if (!this.contains(l)) {
280
284
  a.focus(), c.preventDefault();
281
285
  return;
282
286
  }
283
- c.shiftKey && (i === a || i === o) ? (e.focus(), c.preventDefault()) : !c.shiftKey && i === e && (a.focus(), c.preventDefault());
287
+ c.shiftKey && (l === a || l === o) ? (e.focus(), c.preventDefault()) : !c.shiftKey && l === e && (a.focus(), c.preventDefault());
284
288
  }
285
289
  connectedCallback() {
286
290
  super.connectedCallback(), M() && document.addEventListener("keydown", this.onKeydown);
287
291
  }
288
292
  disconnectedCallback() {
289
- M() && document.removeEventListener("keydown", this.onKeydown), l.openStack = l.openStack.filter((c) => c !== this), super.disconnectedCallback();
293
+ M() && document.removeEventListener("keydown", this.onKeydown), i.openStack = i.openStack.filter((c) => c !== this), super.disconnectedCallback();
290
294
  }
291
295
  firstUpdated() {
292
296
  w(this, this.bodyEl);
@@ -296,11 +300,11 @@ let l = class extends y {
296
300
  }
297
301
  updated(c) {
298
302
  var t, o;
299
- if (c.has("open") && (l.openStack = l.openStack.filter((a) => a !== this), this.open && l.openStack.push(this)), c.has("open") && !this.open && this.closing) {
300
- const a = ++this.closeToken, e = this.querySelector(".baht-modal-scrim"), i = () => {
303
+ if (c.has("open") && (i.openStack = i.openStack.filter((a) => a !== this), this.open && i.openStack.push(this)), c.has("open") && !this.open && this.closing) {
304
+ const a = ++this.closeToken, e = this.querySelector(".baht-modal-scrim"), l = () => {
301
305
  a === this.closeToken && !this.open && (this.closing = !1);
302
306
  };
303
- e ? B(e, i) : i();
307
+ e ? B(e, l) : l();
304
308
  }
305
309
  if (c.has("open") && this.open && (this.previousFocus = document.activeElement, (t = this.querySelector(".baht-modal")) == null || t.focus()), c.has("open") && !this.open && c.get("open") === !0) {
306
310
  const a = this.previousFocus;
@@ -314,58 +318,58 @@ let l = class extends y {
314
318
  render() {
315
319
  return p`<div
316
320
  class="baht-modal-scrim${this.closing ? " baht-modal-scrim--closing" : ""}"
317
- style=${this.open || this.closing ? h : "display:none"}
321
+ style=${this.open || this.closing ? r : "display:none"}
318
322
  @click=${(c) => this.closeOnScrim && c.target === c.currentTarget && this.requestClose("scrim")}
319
323
  >
320
324
  <div
321
325
  class="baht-modal"
322
326
  role="dialog"
323
327
  aria-modal="true"
324
- aria-labelledby=${this.heading ? this.titleId : h}
325
- aria-label=${this.heading ? h : "Dialog"}
326
- aria-describedby=${this.description ? this.descriptionId : h}
328
+ aria-labelledby=${this.heading ? this.titleId : r}
329
+ aria-label=${this.heading ? r : "Dialog"}
330
+ aria-describedby=${this.description ? this.descriptionId : r}
327
331
  tabindex="-1"
328
332
  >
329
333
  ${this.heading || this.description || this.showClose ? p`<header class="baht-modal-header">
330
334
  <div class="baht-modal-heading">
331
335
  <div class="baht-modal-title" id=${this.titleId}>${this.heading}</div>
332
- ${this.description ? p`<p class="baht-modal-description" id=${this.descriptionId}>${this.description}</p>` : h}
336
+ ${this.description ? p`<p class="baht-modal-description" id=${this.descriptionId}>${this.description}</p>` : r}
333
337
  </div>
334
- ${this.showClose ? p`<button type="button" class="baht-modal-close" aria-label=${A("close")} @click=${() => this.requestClose("button")}>${z("cross-box")}</button>` : h}
335
- </header>` : h}
338
+ ${this.showClose ? p`<button type="button" class="baht-modal-close" aria-label=${A("close")} @click=${() => this.requestClose("button")}>${z("cross-box")}</button>` : r}
339
+ </header>` : r}
336
340
  <div class="baht-modal-body"></div>
337
341
  </div>
338
342
  </div>`;
339
343
  }
340
344
  };
341
- l.openStack = [];
345
+ i.openStack = [];
342
346
  u([
343
347
  n({ type: Boolean, reflect: !0 })
344
- ], l.prototype, "open", 2);
348
+ ], i.prototype, "open", 2);
345
349
  u([
346
350
  n()
347
- ], l.prototype, "heading", 2);
351
+ ], i.prototype, "heading", 2);
348
352
  u([
349
353
  n()
350
- ], l.prototype, "description", 2);
354
+ ], i.prototype, "description", 2);
351
355
  u([
352
356
  n({ type: Boolean, attribute: "show-close" })
353
- ], l.prototype, "showClose", 2);
357
+ ], i.prototype, "showClose", 2);
354
358
  u([
355
359
  n({ type: Boolean, attribute: "close-on-scrim" })
356
- ], l.prototype, "closeOnScrim", 2);
360
+ ], i.prototype, "closeOnScrim", 2);
357
361
  u([
358
362
  q(".baht-modal-body")
359
- ], l.prototype, "bodyEl", 2);
363
+ ], i.prototype, "bodyEl", 2);
360
364
  u([
361
365
  C()
362
- ], l.prototype, "closing", 2);
363
- l = u([
366
+ ], i.prototype, "closing", 2);
367
+ i = u([
364
368
  v("baht-modal")
365
- ], l);
366
- var E = Object.defineProperty, P = Object.getOwnPropertyDescriptor, f = (c, t, o, a) => {
367
- for (var e = a > 1 ? void 0 : a ? P(t, o) : t, i = c.length - 1, r; i >= 0; i--)
368
- (r = c[i]) && (e = (a ? r(t, o, e) : r(e)) || e);
369
+ ], i);
370
+ var E = Object.defineProperty, k = Object.getOwnPropertyDescriptor, f = (c, t, o, a) => {
371
+ for (var e = a > 1 ? void 0 : a ? k(t, o) : t, l = c.length - 1, h; l >= 0; l--)
372
+ (h = c[l]) && (e = (a ? h(t, o, e) : h(e)) || e);
369
373
  return a && e && E(t, o, e), e;
370
374
  };
371
375
  let b = class extends y {
@@ -407,7 +411,7 @@ let b = class extends y {
407
411
  (c) => p`<div
408
412
  class="baht-toast ${c.tone === "neutral" ? "" : `baht-toast--${c.tone}`}${c.leaving ? " baht-toast--leaving" : ""}"
409
413
  data-toast=${c.id}
410
- role=${c.tone === "danger" || c.tone === "warning" ? "alert" : h}
414
+ role=${c.tone === "danger" || c.tone === "warning" ? "alert" : r}
411
415
  >
412
416
  <span class="baht-toast-message">${c.message}</span>
413
417
  <button type="button" class="baht-toast-dismiss" aria-label=${A("dismiss")} @click=${() => this.dismiss(c.id)}>×</button>
@@ -428,7 +432,7 @@ b = f([
428
432
  ], b);
429
433
  export {
430
434
  d as B,
431
- l as a,
435
+ i as a,
432
436
  b,
433
437
  j as c,
434
438
  z as d,