bank20baht-ui 0.5.0 → 0.5.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/README.md +6 -4
- package/dist/chunks/baht-toast-BvxVf_Iq.js +406 -0
- package/dist/chunks/{baht-workflow-D3eARiaK.js → baht-workflow-D2Th_1dF.js} +892 -941
- package/dist/chunks/base-D1pT3J5T.js +199 -0
- package/dist/chunks/{display-SzukVy1T.js → display-CX-bz0Da.js} +1 -1
- package/dist/chunks/{i18n-Cnr3OLiz.js → i18n-CWv5lrun.js} +4 -2
- package/dist/components/baht-form.d.ts +2 -0
- package/dist/components/baht-workflow.d.ts +0 -1
- package/dist/components/base.d.ts +6 -0
- package/dist/components/primitives/baht-empty-state.d.ts +1 -1
- package/dist/components/primitives/baht-error-state.d.ts +1 -1
- package/dist/components/primitives/baht-fieldset.d.ts +3 -1
- package/dist/components/primitives/baht-modal.d.ts +3 -0
- package/dist/components/primitives/baht-radio.d.ts +2 -0
- package/dist/components/primitives/baht-table.d.ts +0 -1
- package/dist/components/primitives/icons.d.ts +15 -7
- package/dist/components/primitives/illustrations.d.ts +21 -0
- package/dist/core/i18n.d.ts +1 -0
- package/dist/core/types.d.ts +2 -0
- package/dist/custom-elements.json +2948 -333
- package/dist/engine.js +2 -2
- package/dist/hydrate.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +87 -85
- package/dist/overlay.js +1 -1
- package/dist/ssr.js +3 -3
- package/dist/tokens.css +476 -279
- package/dist/vscode.html-custom-data.json +125 -55
- package/dist/web-types.json +308 -202
- package/package.json +3 -2
- package/dist/chunks/baht-toast-DkN6tiDw.js +0 -292
- package/dist/chunks/base-CajA2aCO.js +0 -193
package/README.md
CHANGED
|
@@ -255,10 +255,12 @@ re-runs `submit` scripts on the server; `load`/`change` are UI-only. See
|
|
|
255
255
|
|
|
256
256
|
## Design system — 20baht
|
|
257
257
|
|
|
258
|
-
Ships themed as the **20baht design system
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
258
|
+
Ships themed as the **20baht design system**, "ledger" retone: minimal and flat —
|
|
259
|
+
near-black ink (`#171717`) on white, hairline neutral borders, 44px controls, one indigo accent
|
|
260
|
+
(`#444FBF`), status as tint pills, hand-drawn koboyo spot illustrations for empty /
|
|
261
|
+
error / upload states, IBM Plex Sans Thai / IBM Plex Mono (load the
|
|
262
|
+
fonts yourself), borders-over-shadows, "paper" easing — plus an opt-in dark theme
|
|
263
|
+
(`<html data-baht-theme="dark">`). 35+ components:
|
|
262
264
|
|
|
263
265
|
```html
|
|
264
266
|
<baht-button variant="secondary" size="sm">Cancel</baht-button>
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import { svg as a, html as p, nothing as h } from "lit";
|
|
2
|
+
import { property as n, query as C, customElement as v, state as w } from "lit/decorators.js";
|
|
3
|
+
import { B as y, b as q, h as M } from "./base-D1pT3J5T.js";
|
|
4
|
+
import { t as A } from "./i18n-CWv5lrun.js";
|
|
5
|
+
const g = {
|
|
6
|
+
copy: {
|
|
7
|
+
viewBox: "0 0 144 174",
|
|
8
|
+
body: a`<path d="M17.5 9.9c-2.2 1-4.8 2.8-5.8 3.9C7.3 18.7 7.1 21.3 7 67c0 25.7.4 44.9 1 46.9 1.3 4.6 6.5 9.9 11 11.1 1.9.5 8.6 1 14.8 1H45v14.2c0 16 .9 19 7.2 22.8 3.1 1.9 5.1 2 38.3 2s35.2-.1 38.3-2c1.8-1.1 4.1-3.4 5.2-5.2 2-3.2 2-4.8 1.8-53.5l-.3-50.2-3-3.2c-4.7-5-8-5.9-21.5-5.9H99V32.1c0-11.6-.2-13.1-2.3-16.2a20 20 0 0 0-6.7-5.7C85.7 8.1 84.8 8 53.5 8c-28.9 0-32.4.2-36 1.9m73.7 6.9 3.3 3.2.3 12.5.4 12.4-20 .3c-22.3.3-23 .5-27.9 7.8C45 56.2 45 56.7 45 88.6V121H33c-9 0-12.9-.4-15.1-1.6-5.8-2.9-5.9-4-5.9-52.7V22.3l2.3-3.4c4-5.9 4-5.9 40.4-5.7l33.3.3zM126.7 52a9 9 0 0 1 4.3 5.7c.8 2.6 1 18.3.8 50l-.3 46.3-3.3 3.2-3.2 3.3H56.2l-2.6-2.4a16 16 0 0 1-3.7-6 517 517 0 0 1-.7-49.1c.3-41.3.5-45.7 2-48 3.5-4.8 4.2-4.9 39.3-5 31 0 33.2.1 36.2 2"/>`
|
|
9
|
+
},
|
|
10
|
+
check: {
|
|
11
|
+
viewBox: "0 0 119 91",
|
|
12
|
+
body: a`<path d="M104 11.7 81.1 36 51.7 67.3A199 199 0 0 1 38.1 81c-.4 0-7.2-7-15.1-15.5C9.4 50.9 5.5 47.9 5.5 52.2A293 293 0 0 0 38.4 87c.7 0 12.3-11.8 25.8-26.3l37.2-39.6a94 94 0 0 0 12.3-14.5c-.9-2.7-3.8-1.2-9.7 5.1"/>`
|
|
13
|
+
},
|
|
14
|
+
calendar: {
|
|
15
|
+
viewBox: "0 0 140 141",
|
|
16
|
+
body: a`<path d="M34.1 8.9c-2.4 2.4-3.6 9.5-2.7 15.9.6 4.8 4.1 9.2 7.2 9.2 2.5 0 7.4-5.6 7.4-8.4V23h46.8l.6 3.4c1.2 6.5 7.6 9 11.9 4.7 1.9-1.9 2.2-3.3 2.2-11.2 0-8.3-.2-9.2-2.4-11-4.8-3.9-10.7-1.3-11.7 5.2l-.7 3.9H46.3l-.7-3.9c-1-6.5-7.4-9.3-11.5-5.2m68.9 11c0 7.3-1 9.7-3.4 8.8-1.3-.5-1.6-2.2-1.6-8q0-11.6 3.7-8.6 1.3 1.3 1.3 7.8m-62.5.6c0 7.3-.2 8-2 8s-2-.8-2.3-6.9c-.3-8.1.1-9.9 2.5-9.4 1.5.3 1.8 1.5 1.8 8.3"/><path d="M13.1 19.7q-3.4 1.7-5.3 6c-1.8 4-1.9 6.9-1.6 51.5.3 52.7.2 51.9 7.2 55.2 3 1.4 9.4 1.6 56.8 1.6 51.1 0 53.4-.1 56.5-2 6.4-3.9 6.3-2.9 6.3-56s.1-52.1-6.3-56c-3.9-2.4-15.2-2.8-16-.6q-1.3 3.6 7 3.6c4.4 0 5.9.5 7.8 2.5 2.2 2.1 2.5 3.3 2.5 9.5v7H11v-6q0-9.8 3.9-11.6c.9-.4 4.1-1 7.1-1.3 4.6-.5 5.5-.9 5.5-2.6s-.8-2-5.5-2.3q-5.5-.2-8.9 1.5M128 85.5v38.6l-2.5 2.4-2.4 2.5H70a700 700 0 0 1-55-1c-3.6-1.9-4-6.2-4-44.1V47h117z"/><path d="M27.5 63.3c-.4 1.4-.5 3.7-.3 5.3.4 3.5 4.4 5.3 8.6 3.8 2.5-.9 2.7-1.4 2.7-5.9v-5l-5.2-.3c-4.8-.3-5.3-.1-5.8 2.1m24.1-.7c-.3.9-.6 2.6-.6 3.9 0 4.8.9 5.5 6.6 5.5H63V61h-5.4c-4 0-5.5.4-6 1.6m24-.1c-.8 2.2-.7 6.7.2 8.2.8 1.3 2.3 1.6 7.5 1.4l3.8-.1-.3-5.3-.3-5.2-5.1-.3c-4-.2-5.3.1-5.8 1.3m23.9.8c-.4 1.4-.5 3.8-.3 5.3.3 2.8.5 2.9 6.1 3.2l5.8.3-.3-5.3-.3-5.3-5.2-.3c-4.8-.3-5.3-.1-5.8 2.1M27.6 83.5c-1 2.8-.7 8.2.7 9.3.6.6 3.3.8 6 .5l4.8-.6-.3-5.1-.3-5.1-5.1-.3c-4-.2-5.3.1-5.8 1.3m24 .1c-1 2.6-.7 7.9.6 9.2s6.6 1.6 9.2.6c1.2-.5 1.6-2 1.6-6V82h-5.4c-4 0-5.5.4-6 1.6m24 0c-.3.9-.6 2.6-.6 3.9 0 4.8.9 5.5 6.6 5.5H87V82h-5.4c-4 0-5.5.4-6 1.6m24.1-.9c-1.2 1.1-.8 8.8.5 10.1s6.6 1.6 9.2.6c1.2-.5 1.6-2 1.6-6V82h-5.3c-3 0-5.7.3-6 .7m-72.1 21.8c-1 2.7-.7 8 .6 9.3 1.4 1.4 7.6 1.6 9.6.3q1.3-.8 1-5.7l-.3-4.9-5.1-.3c-4-.2-5.3.1-5.8 1.3m24 0c-1 2.7-.7 8 .6 9.3.7.7 3.1 1.2 5.5 1.2q7.8.2 5.6-8.1c-.9-3.3-1.1-3.4-6-3.7-3.9-.2-5.2.1-5.7 1.3m24 0c-1.1 3-.6 7.3 1 8.9s7 2.1 9.2.7q1.3-.8 1-5.7l-.3-4.9-5.1-.3c-4-.2-5.3.1-5.8 1.3"/>`
|
|
17
|
+
},
|
|
18
|
+
download: {
|
|
19
|
+
viewBox: "0 0 151 151",
|
|
20
|
+
body: a`<path d="M73.5 8.2c-.3.7-.6 23.1-.7 49.8l-.3 48.5-11.9-13.3c-11.5-12.8-14.6-15-15.4-11-.2 1 5 7.6 13.1 16.5 15.9 17.7 16.2 17.9 18.6 16.7 1.8-.9 27.7-29.1 29.4-32.1 1.1-1.9.2-4.3-1.7-4.3-.8 0-6.8 6-13.3 13.4a174 174 0 0 1-12.5 13.5c-.4.1-.9-22.1-1-49.1-.3-46-.4-49.3-2.1-49.6q-1.6-.2-2.2 1"/><path d="M8.7 107.7c-.4.3-.7 5.4-.7 11.2.1 14.7 2.5 19.9 11.3 23.6 3.1 1.3 11.1 1.5 56 1.5 36.4 0 53.4-.3 55.8-1.1 4.6-1.6 9.7-6.6 11-10.9.6-1.9.9-8.2.7-14-.3-9.7-.4-10.5-2.3-10.5s-2 .8-2.5 11.5c-.7 12.7-1.6 15.1-6.6 17.5-4.7 2.2-108 2.2-112.3 0-3.9-2-5-5.4-5.5-18l-.5-11.3c-.2-.5-3.8-.2-4.4.5"/>`
|
|
21
|
+
},
|
|
22
|
+
upload: {
|
|
23
|
+
viewBox: "0 0 140 133",
|
|
24
|
+
body: a`<path d="M56 19.4a202 202 0 0 0-12.8 13.4q-.1 1 1.3 2.2c1.4 1.2 2.5.5 8.3-5.1l10.4-10.2 3.8-3.9v35c0 19.3.3 35.7.6 36.6.8 2.1 4 2.1 4.8 0 .3-.9.6-17.3.6-36.5v-35l10.1 9.8a79 79 0 0 0 11.1 9.8c.6 0 1.6-.8 2.2-1.8.9-1.5-.7-3.5-11.9-14.2A99 99 0 0 0 70 7.1c-.8-.1-7.1 5.5-14 12.3"/><path d="M12.5 77.9c-1.1.5-2.9 1.9-4 3.1-1.8 2-2 3.9-2.3 19-.3 13.3 0 17.5 1.2 20.4 2.8 6.7 2 6.6 63.3 6.6 52.6 0 54.9-.1 58-2 4.7-2.8 5.5-6.9 5.1-25.7-.3-15.3-.4-16.3-2.6-18.6-4.1-4.3-12.6-4.5-12-.3.2 1.6 1.2 2.2 4.3 2.6l4 .5.3 17.4c.2 11.9-.1 17.8-.9 18.7-1.7 2.1-112.1 2.1-113.8 0-.8-.9-1.1-6.8-.9-18.7l.3-17.4 3.8-.6c5.2-.8 6.8-2.6 4.3-4.5q-3.4-2.3-8.1-.5"/>`
|
|
25
|
+
},
|
|
26
|
+
plus: {
|
|
27
|
+
viewBox: "0 0 125 124",
|
|
28
|
+
body: a`<path d="M59.2 7.6C57 9.1 57 9.4 57 33.6V58H33.1c-20.4 0-24.2.2-25.5 1.6q-3 3 .1 5.5c1.3 1.1 6.8 1.4 25.7 1.4h24.1l.3 24.8.2 24.8 2.5 1.1c1.9.8 2.8.8 4-.2 1.3-1.1 1.5-5 1.5-26.1V66h24.8c13.6 0 25.3-.4 26-.9.8-.5 1.2-2.1 1-3.7l-.3-2.9-25.7-.3L66 58V33.6c0-22.3-.2-24.4-1.8-25.9-2.3-2.1-2.2-2.1-5-.1"/>`
|
|
29
|
+
},
|
|
30
|
+
external: {
|
|
31
|
+
viewBox: "0 0 145 147",
|
|
32
|
+
body: a`<path d="M100.3 9.6c-1 2.8 1.8 3.4 15.7 3.4h13.5L102 40.5c-26 26-27.3 27.6-25.7 29.2 1.6 1.7 3.2.3 29.2-25.7l27.4-27.4.3 13.9c.3 13.2.4 14 2.3 14s2-.7 2-18v-18l-18.3-.3c-16.1-.2-18.3-.1-18.9 1.4"/><path d="M13.2 27C7 30.8 7 31.1 7 82s0 51.2 6.2 55c3.2 1.9 4.9 2 50.6 2 41.8 0 47.8-.2 50.8-1.6 6.3-3 6.5-3.9 6.2-38.1-.3-30-.3-30.8-2.3-30.8s-2 .8-2.5 31.3c-.5 29.6-.6 31.4-2.4 32.8-1.7 1.2-10.1 1.4-49.7 1.4H16.1l-2-2.6C12 128.8 12 127.8 12 82c0-44.6.1-46.9 1.9-49.1l1.9-2.4 31.9-.5c31-.5 31.8-.6 31.8-2.5 0-2-.8-2-31.5-2.3-30.1-.2-31.6-.1-34.8 1.8"/>`
|
|
33
|
+
},
|
|
34
|
+
close: {
|
|
35
|
+
viewBox: "0 0 102 103",
|
|
36
|
+
body: a`<path d="M7.2 7.2Q6.1 8.4 6 10c-.1 1.6 8.8 10.3 19.5 21A286 286 0 0 1 45 51.5c0 .6-8.8 9.8-19.5 20.5C9.3 88.1 6 91.9 6.2 94q.2 2.6 2.8 2.8c2.2.2 5.8-2.9 22.4-19.8l19.9-20.2L70.8 77c16.7 17.2 19.8 20.1 22.1 19.8q2.7-.1 2.9-2.8c.2-2.1-3.1-5.9-19.3-22A286 286 0 0 1 57 51.5c0-.6 8.8-9.8 19.5-20.5A212 212 0 0 0 96 10c0-2-2-4-4-4-.8 0-10.4 9.1-21.3 20.2L51 46.5 31.2 26.2A199 199 0 0 0 9.9 6c-.8 0-2 .5-2.7 1.2"/>`
|
|
37
|
+
},
|
|
38
|
+
play: {
|
|
39
|
+
viewBox: "0 0 126 149",
|
|
40
|
+
body: a`<path d="M12.3 8.6C5.9 11.8 6 10.7 6 74.5c0 51.3.2 58.1 1.6 61.1 1.9 3.9 5.9 6.4 10.1 6.4 3.1 0 4-.5 26.8-14.4l32-19.6C119.4 82 120 81.5 120 74.5c0-5.9-2.8-8.3-25.5-22.2q-71.7-44-76-44.8c-1.8-.3-4.3.1-6.2 1.1M44 28.5c50.5 30.5 69 42.1 69.6 43.8 1.5 4.6-.2 6-26.8 22.3C25.6 132.1 19.1 136 17.2 136c-1.2 0-2.8-1-3.6-2.2-1.4-2-1.6-9.3-1.6-59.5 0-56.4 0-57.3 2.1-59.4q2-2 4.2-1.3C19.4 14 31 20.7 44 28.5"/>`
|
|
41
|
+
},
|
|
42
|
+
search: {
|
|
43
|
+
viewBox: "0 0 135 131",
|
|
44
|
+
body: a`<path d="M39.8 8.9A47.5 47.5 0 0 0 7 54c0 13.1 4.3 23.5 13.4 32.5A46 46 0 0 0 54.1 100c11.4 0 21.4-3.6 31.3-11.4.8-.5 7.4 5.5 18.6 16.9 9.6 9.7 18.3 18 19.3 18.6 2.4 1.4 5.9-.7 5.5-3.2-.2-1.1-8.6-10.2-18.8-20.4L91.6 82l1.7-3a58 58 0 0 0 6.4-21.6 46.5 46.5 0 0 0-34.1-49 55 55 0 0 0-25.8.5m29.7 8.9a39 39 0 0 1 22.1 44.1c-6.4 30.8-42.2 41.4-65.7 19.4-18.2-17-13.6-48.8 9-62.1a37 37 0 0 1 34.6-1.4"/>`
|
|
45
|
+
},
|
|
46
|
+
sort: {
|
|
47
|
+
viewBox: "0 0 145 183",
|
|
48
|
+
body: a`<path d="M25.1 9.8A14 14 0 0 0 18.8 29c2.1 3.9 9 8 13.5 8 8 0 15.7-9.1 14.2-16.7A14.7 14.7 0 0 0 25.1 9.8m11.3 3.4A10 10 0 0 1 39.5 29q-5.4 5.7-11.8 2.5C20.4 28 19.6 18.1 26.3 14c3.7-2.3 6.5-2.5 10.1-.8m24-2.9c-.2.7-.3 6.7-.2 13.3l.3 11.9h27v-26l-13.3-.3c-10.3-.2-13.4 0-13.8 1.1M84 22.5V32H64V13h20zm24-2.3a64 64 0 0 0-6.4 13.3c-.1 1.9.5 2 14.2 2.3 12 .2 14.3 0 14.8-1.3.9-2.3-11.9-24.9-14.3-25.3-1.5-.2-3.3 2.1-8.3 11m9.8-3 4.6 8.5L126 32h-19.8l4.4-7.7c2.4-4.3 4.4-8.1 4.4-8.5 0-1.6 1.7-.7 2.8 1.4M12.7 49.7c-1.1 1-.8 8.2.4 10.6a426 426 0 0 0 24 25.2L60 108.6v9.7c0 9.7 0 9.8 2.7 10.8 1.5.5 3.8.9 5.2.7 2.4-.3 2.5-.1 2.2 4.9q-.5 9.2 2.4 9.3c1.8 0 2.5-2.3 2.5-9v-5.9l4.8-.3 4.7-.3.7-10.4.7-10.4 23-23.1a234 234 0 0 0 23.6-25.7c.4-1.5.5-4.1.3-6l-.3-3.4-59.6-.3c-32.7-.1-59.9.1-60.2.5M129 54.6c0 3.3-2.9 6.5-24.9 28.7L81.5 106l-.3 9.5-.4 9.5H64.2l-.4-9.5-.3-9.5-22.1-22.2C18.7 60.9 16 57.8 16 54.8c0-1.7 3-1.8 56.5-1.8 50.6 0 56.5.2 56.5 1.6m-37.3 68.1c-1.7 1.6 0 3.6 10.4 12.2 10.7 8.8 13.1 10.2 14.4 8.1.6-1 0-1.6-14-13.4-9.2-7.8-9.7-8.1-10.8-6.9m-51.5 9.8c-10.4 8.9-12.9 12.2-9 11.9 2.2-.2 23.9-18.5 23.5-19.8-.9-2.7-4.1-1-14.5 7.9m77.7 20.7c-7.7 13.4-9.6 17.3-9.2 18.5.7 2 28.2 1.8 28.9-.1a75 75 0 0 0-14.3-24.4c-1.3-.2-2.8 1.4-5.4 6m10.4 8 4.6 7.8h-19.1l3.8-6.8c3.8-6.9 5.5-9.5 5.9-9zM15.4 149.4a13.3 13.3 0 0 0-7.5 15.9c4.8 14.5 26.1 11.4 26.1-3.8a13 13 0 0 0-18.6-12.1m11.3 5.2c4.9 3.1 3.6 12.5-2 15.2-8.1 3.9-16.3-6.2-11.1-13.6 3-4.3 8-4.9 13.1-1.6m33.3-4.7a61 61 0 0 0 .2 22.9 60 60 0 0 0 24.6 0c1.6-1.6 1.6-22 0-23.6q-1.2-1.2-12.5-1.2c-10.1 0-11.3.2-12.3 1.9m21.8 11.3.3 8.8H64v-18.1l8.8.3 8.7.3z"/>`
|
|
49
|
+
},
|
|
50
|
+
"chevron-up": {
|
|
51
|
+
viewBox: "0 0 134 74",
|
|
52
|
+
body: a`<path d="M55.2 9.6c-5.3 5.6-34.3 38-46.1 51.6-2.5 3-3.2 4.4-2.7 6.3S7.7 70 9.8 70c2.2 0 5.3-3 18.2-17.7l25.9-29.1 10.4-11.4 28.6 28.6C116.4 63.9 122 69 124.2 69s2.9-.6 3.4-2.6c.6-2.4-1.1-4.4-17.7-21.1Q67.9 3 63.8 3q-2.3 0-8.6 6.6"/>`
|
|
53
|
+
},
|
|
54
|
+
"chevron-down": {
|
|
55
|
+
viewBox: "0 0 137 73",
|
|
56
|
+
body: a`<path d="M8 5.5c-.7.8-1 2.5-.6 3.7.3 1.3 13.5 15.2 29.4 31C63.4 66.9 65.8 69 69 69s5.5-2 32-29.1c15.7-16 28.9-30 29.4-31 1.1-2.3-.8-4.9-3.8-4.9-1.5-.1-10.3 8.3-29.8 28.2L69.1 60.5 40.8 32.2A402 402 0 0 0 10.9 4C10 4 8.7 4.7 8 5.5"/>`
|
|
57
|
+
},
|
|
58
|
+
"chevron-right": {
|
|
59
|
+
viewBox: "0 0 63 122",
|
|
60
|
+
body: a`<path d="M4.2 8.2Q3.1 9.4 3 10.8c0 .7 10.8 11.9 24 24.9s24 24 24 24.6-10.8 12-24 25.2a426 426 0 0 0-24 25.2c0 1.6 2.8 4.3 4.5 4.3.7 0 12.5-11.3 26.1-25 23.7-23.9 24.9-25.3 25.2-29.2l.3-4.2-24.8-24.8C9.8 7.2 7.2 5.2 4.2 8.2"/>`
|
|
61
|
+
},
|
|
62
|
+
more: {
|
|
63
|
+
viewBox: "0 0 131 24",
|
|
64
|
+
body: a`<path d="M11.1 3.4C6.2 6.1 4.7 12 7.7 17c3.3 5.7 10.4 6.6 15.5 2.1 8.9-7.9-1.6-21.5-12.1-15.7m46.8 1.5c-5.1 5.2-3.6 13.3 3 16.1C68 23.9 75 19.3 75 11.8c0-8.9-10.7-13.2-17.1-6.9m49 0c-2.3 2.3-2.9 3.8-2.9 7.1 0 8 7.6 12.3 15.1 8.5C128 15.9 124.2 2 114 2c-3.3 0-4.8.6-7.1 2.9"/>`
|
|
65
|
+
},
|
|
66
|
+
columns: {
|
|
67
|
+
viewBox: "0 0 136 123",
|
|
68
|
+
body: a`<path d="M9.5 8.4a14 14 0 0 0-3 5.7C6.2 16 6 38.6 6.2 64.3l.3 46.9 3.3 2.9c3.1 2.8 3.6 2.9 13.3 2.9 11.3 0 14.9-1.2 16.8-5.7.8-2.1 1.1-16.1.9-51.7l-.3-48.8-2.8-2.4C35.1 6.2 34.1 6 23.4 6s-11.6.1-13.9 2.4m24.3 3.8c.9.9 1.2 13 1.2 48.4 0 26-.3 47.9-.6 48.8-.5 1.3-2.4 1.6-10.3 1.6-6.2 0-10.1-.4-10.9-1.2-1.7-1.7-1.7-95.9 0-97.6.8-.8 4.6-1.2 10.3-1.2s9.5.4 10.3 1.2m19.7-3.8a14 14 0 0 0-3 5.7c-.3 1.9-.5 24.4-.3 50.1l.3 46.8 2.8 2.7c2.7 2.7 3 2.8 14.7 2.8s12-.1 14.7-2.8l2.8-2.7.3-45.8c.2-25.1 0-47.7-.3-50.1a13 13 0 0 0-3-6.7C80.2 6.1 79.4 6 68 6s-12.2.1-14.5 2.4m24.9 4.2C79.8 14 80 19.8 80 61.4c0 35.4-.3 47.5-1.2 48.4-1.6 1.6-20 1.6-21.6 0s-1.7-95.9 0-97.6c1.9-1.9 19.3-1.6 21.2.4m20.1-4.2a14 14 0 0 0-3 5.7c-.3 1.9-.5 24.5-.3 50.2l.3 46.9 3.3 2.9c3.1 2.8 3.6 2.9 13.3 2.9 11.3 0 14.9-1.2 16.8-5.7.8-2.1 1.1-16.1.9-51.7l-.3-48.8-2.8-2.4c-2.6-2.2-3.6-2.4-14.3-2.4s-11.6.1-13.9 2.4m24.4 4c.8.9 1 14.8.9 49.7l-.3 48.4-9.9.3q-9.7.3-11.2-.9c-1.2-.9-1.4-9.2-1.4-49 0-44.5.1-47.9 1.8-48.8 2.7-1.6 18.7-1.4 20.1.3"/>`
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
function $(t) {
|
|
72
|
+
const { viewBox: c, body: o } = g[t];
|
|
73
|
+
return p`<svg class="baht-icon" viewBox=${c} fill="currentColor" aria-hidden="true">${o}</svg>`;
|
|
74
|
+
}
|
|
75
|
+
function O(t) {
|
|
76
|
+
return Object.prototype.hasOwnProperty.call(g, t);
|
|
77
|
+
}
|
|
78
|
+
var L = Object.defineProperty, S = Object.getOwnPropertyDescriptor, m = (t, c, o, s) => {
|
|
79
|
+
for (var e = s > 1 ? void 0 : s ? S(c, o) : c, i = t.length - 1, r; i >= 0; i--)
|
|
80
|
+
(r = t[i]) && (e = (s ? r(c, o, e) : r(e)) || e);
|
|
81
|
+
return s && e && L(c, o, e), e;
|
|
82
|
+
};
|
|
83
|
+
let d = class extends y {
|
|
84
|
+
constructor() {
|
|
85
|
+
super(...arguments), this.variant = "primary", this.size = "md", this.disabled = !1, this.type = "button", this.label = "", this.icon = "", this.iconOnly = !1;
|
|
86
|
+
}
|
|
87
|
+
firstUpdated() {
|
|
88
|
+
this.iconOnly || q(this, this.buttonEl);
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
const t = this.variant === "primary" ? "" : ` baht-button--${this.variant}`, c = this.size === "md" ? "" : ` baht-button--${this.size}`, o = this.iconOnly ? " baht-button--icon" : "", s = this.icon && O(this.icon) ? $(this.icon) : h;
|
|
92
|
+
return p`<button
|
|
93
|
+
class="baht-button${t}${c}${o}"
|
|
94
|
+
type=${this.type}
|
|
95
|
+
aria-label=${this.iconOnly && this.label ? this.label : h}
|
|
96
|
+
?disabled=${this.disabled}
|
|
97
|
+
>${s}${this.iconOnly ? h : this.label}</button>`;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
m([
|
|
101
|
+
n()
|
|
102
|
+
], d.prototype, "variant", 2);
|
|
103
|
+
m([
|
|
104
|
+
n()
|
|
105
|
+
], d.prototype, "size", 2);
|
|
106
|
+
m([
|
|
107
|
+
n({ type: Boolean })
|
|
108
|
+
], d.prototype, "disabled", 2);
|
|
109
|
+
m([
|
|
110
|
+
n()
|
|
111
|
+
], d.prototype, "type", 2);
|
|
112
|
+
m([
|
|
113
|
+
n()
|
|
114
|
+
], d.prototype, "label", 2);
|
|
115
|
+
m([
|
|
116
|
+
n()
|
|
117
|
+
], d.prototype, "icon", 2);
|
|
118
|
+
m([
|
|
119
|
+
n({ type: Boolean, attribute: "icon-only" })
|
|
120
|
+
], d.prototype, "iconOnly", 2);
|
|
121
|
+
m([
|
|
122
|
+
C("button")
|
|
123
|
+
], d.prototype, "buttonEl", 2);
|
|
124
|
+
d = m([
|
|
125
|
+
v("baht-button")
|
|
126
|
+
], d);
|
|
127
|
+
const H = 600;
|
|
128
|
+
function x(t, c) {
|
|
129
|
+
const o = typeof t.getAnimations == "function" ? t.getAnimations({ subtree: !0 }) : [];
|
|
130
|
+
if (o.length === 0) {
|
|
131
|
+
c();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
let s = !1;
|
|
135
|
+
const e = () => {
|
|
136
|
+
s || (s = !0, c());
|
|
137
|
+
};
|
|
138
|
+
Promise.all(o.map((i) => i.finished.catch(() => {
|
|
139
|
+
}))).then(e, e), setTimeout(e, H);
|
|
140
|
+
}
|
|
141
|
+
const B = {
|
|
142
|
+
"bell-slash": {
|
|
143
|
+
viewBox: "0 0 162 162",
|
|
144
|
+
body: a`<path d="M75.9 9.7A13 13 0 0 0 70 20.4c0 3.2-.4 3.7-4.6 5.5a38 38 0 0 0-15.5 12.8l-3.1 4.5 2.2 2.2 2.2 2.1 2.1-3c9.6-13.3 24.3-19.1 38.1-15.1 11 3.2 17.9 9.1 22.8 19.3 3 6.3 3.1 6.8 5.7 34.9a42 42 0 0 0 10.8 27.2c4.3 5.3 5.3 7.2 5.1 9.6-.3 3-.5 3.1-6.8 3.9l-6.4.8-52.2-52.2c-38.3-38.3-52.6-52-53.8-51.6-4.3 1.7-2.9 3.8 11.6 18.5C41.6 53.3 42.7 54.7 42 57.2c-.4 1.5-1.1 8.4-1.4 15.5-1.1 20-3.1 26.5-10.9 35.3-7.6 8.6-8.6 14.3-3.3 19.6l3.4 3.4h33.1l1.9 4.4a20.4 20.4 0 0 0 23 10.7c5.3-1.5 11.7-7.1 13.2-11.7 1.1-3.3 1.4-3.4 6.1-3.4 5.5 0 5.9-.7 2.6-3.8-2.3-2.2-2.7-2.2-39.8-2.2-20.6 0-38-.4-38.8-.9-2.2-1.4-1.5-5.8 1.5-9.7 7.9-9.8 9.5-12.4 11.3-18a83 83 0 0 0 2.6-18c.3-6.5.8-13.4 1.1-15.3l.6-3.4 47.1 47.1c47.2 47.2 50.4 50 52.1 45.5.5-1.2-1.9-4.3-8.9-11.3a47 47 0 0 1-8.9-10.3c.4-.4 1.8-.7 3.1-.7 3.9 0 8-2.7 9.2-6.1 1.6-4.7-.1-9.6-5.5-15.9-8.3-9.7-11.3-19.5-11.4-37-.1-20.8-9.1-37.5-24-44.6-5.6-2.6-6-3.1-6-6.2 0-9.4-11.1-15.5-19.1-10.5M87 16c1.1 1.1 2 2.9 2 3.9 0 1.7-.9 2-6.5 2.3-6.2.3-6.5.2-6.5-2 0-2.9 3.4-6.2 6.5-6.2 1.4 0 3.4.9 4.5 2m8 116c0 2.5-3.5 6-7.4 7.5-3.5 1.3-5.1 1.5-8.4.6-3.7-1.1-9.2-5.9-9.2-8.2 0-.5 5.5-.9 12.5-.9 7.9 0 12.5.4 12.5 1"/>`
|
|
145
|
+
},
|
|
146
|
+
check: {
|
|
147
|
+
viewBox: "0 0 119 91",
|
|
148
|
+
body: a`<path d="M104 11.7 81.1 36 51.7 67.3A199 199 0 0 1 38.1 81c-.4 0-7.2-7-15.1-15.5C9.4 50.9 5.5 47.9 5.5 52.2A293 293 0 0 0 38.4 87c.7 0 12.3-11.8 25.8-26.3l37.2-39.6a94 94 0 0 0 12.3-14.5c-.9-2.7-3.8-1.2-9.7 5.1"/>`
|
|
149
|
+
},
|
|
150
|
+
"cloud-upload-arrow": {
|
|
151
|
+
viewBox: "0 0 207 162",
|
|
152
|
+
body: a`<path d="M96 8a54 54 0 0 0-42 39.4c0 .9-2.2 1.5-7.5 1.9-31.8 2.4-49.6 47.6-27.4 69.8 2.1 2.1 6.1 5 8.9 6.4 9 4.6 16.1 5.6 37.2 5.3 19.1-.3 19.3-.3 19.6-2.5.4-3-.6-3.2-24.3-3.5-20-.3-20-.3-26.5-3.4-8.8-4.1-12.4-7.4-15.7-14.2-2.4-4.9-2.8-6.9-2.8-14.3 0-7.8.3-9.1 3.7-16a42 42 0 0 1 17.4-19c3.9-1.9 6.5-2.4 12.4-2.4 4.1 0 8-.3 8.6-.7s1.4-2.5 1.8-4.6a48.7 48.7 0 0 1 79.3-24.8 53 53 0 0 1 14.5 28.1c1.5 10 1.4 9.9 9.9 10.6s14 3 19.4 8.4c4.2 4.2 5.8 7.2 8 14.8a21 21 0 0 1 .6 11.9 29 29 0 0 1-15.6 22.6c-4.9 2.6-5.5 2.7-28 3.2l-23 .5v5h47l5.9-2.9a35 35 0 0 0 19.6-25.9c4.2-20.3-10.7-41.4-30.7-43.6l-5.7-.6-1.8-7.5c-6.3-26-24.2-41.4-49.3-42.5A76 76 0 0 0 96 8"/><path d="M90.7 85.8c-11.5 11.5-13.3 14.4-10.1 15.6 1.9.7 2.2.5 12.3-9.2 4.1-3.9 7.6-7.2 7.8-7.2s.3 15.5.3 34.5c0 29.9.2 34.6 1.5 35.1.8.4 2.2.1 3-.6 1.3-1.1 1.5-6.4 1.5-35.4V84.5l9 9c7.6 7.6 9.3 8.8 10.8 7.9.9-.6 1.8-1.8 2-2.5.3-1.7-22.9-24.9-24.9-24.9-.8 0-6.7 5.3-13.2 11.8"/>`
|
|
153
|
+
},
|
|
154
|
+
"cross-box": {
|
|
155
|
+
viewBox: "0 0 144 133",
|
|
156
|
+
body: a`<path d="m33.7 6.9-19.9.6-2.9 3.3-3 3.3.3 52.7c.3 49.5.4 52.9 2.2 55.4 1 1.6 3.4 3.3 5.5 3.9q3.5 1 58.9.7l55.4-.3 2.8-3.1c2.7-3.1 2.8-3.7 3.5-17.5.4-7.9.5-31.7.3-52.9-.3-41.9-.3-42-6-45.2-2.5-1.4-59.9-1.9-97.1-.9m95.2 7q2 1.9 2.7 8.8a1193 1193 0 0 1-1.5 95.2c-2.2 4-6.2 4.2-60.3 3.9-50.2-.3-51.8-.4-53.7-2.3s-2-4-2.7-52.1l-.7-50.2 2.6-2.6 2.6-2.6h54.6c52.3 0 54.6.1 56.4 1.9"/><path d="M85.8 48.7 71.1 63.4 57 49.7C43.1 36.2 39.7 34 38.3 37.7c-.5 1.3 3 5.2 14 15.9L67 67.7 52.4 82c-8 7.8-14.3 14.7-14.1 15.3q.5 1 2 2.1c1.4.9 4-1.3 16.2-13.4l14.4-14.4 14.6 14.3c8 7.8 15.1 14.1 15.7 13.9s1.6-1.2 2.2-2.2c.9-1.5-.9-3.8-13.1-15.5A168 168 0 0 1 76 67.4c0-.5 6.6-7.5 14.7-15.6 12.6-12.7 14.5-14.9 13.4-16.2-.8-.9-1.9-1.6-2.5-1.6s-7.7 6.6-15.8 14.7"/>`
|
|
157
|
+
},
|
|
158
|
+
document: {
|
|
159
|
+
viewBox: "0 0 134 177",
|
|
160
|
+
body: a`<path d="M40.5 8.9c-31.4.7-32.9 1-33.9 7.3-.3 1.8-.3 35.9.2 75.6l.7 72.4 2.8 2.4 2.8 2.4H67c30.7 0 54.9-.4 56.3-.9a8 8 0 0 0 3.6-4.2c1.3-3.7 1.4-28.4.5-85.9l-.7-38.5L111.4 24 96.1 8.5l-13.8-.1c-7.6 0-26.4.2-41.8.5m51.7 19.3.3 15.3 15 .5 15 .5.3 58.4c.1 42.3-.1 58.8-.9 59.7-1.6 2-107.1 2.1-108.7.1A2757 2757 0 0 1 11.9 16c1.1-1.6 16.8-2.3 61.3-2.8l18.7-.2zm16.4-.5 11.2 11.8-10.6.3c-5.8.1-11.2 0-11.9-.2-1-.4-1.3-3.5-1.3-12.1 0-6.3.3-11.5.7-11.5s5.7 5.3 11.9 11.7"/><path d="M31.4 58.2c-.4.6.1 1.7 1.2 2.5 1.5 1.1 5.9 1.2 23.9.7 20.7-.7 24.3-1.2 22.9-3.6a285 285 0 0 0-48 .4m10.1 19.7c-8 .5-10 .9-10 2.1s4.7 1.5 36 1.5c35.3 0 36 0 36-2 0-1.9-.7-2-26-2.1-14.3 0-30.5.2-36 .5m9.8 21.8c-15.3.3-19.2.6-19.6 1.7-.3.8 0 1.9.6 2.4.8.7 13.8.8 36 .5 29.2-.5 35-.8 35.4-2.1 1.3-3.3 2.4-3.3-52.4-2.5m-18.9 24.8c-1.3 3.2.6 3.5 24.5 3.5 26.7 0 30.1-.3 30.1-3.1 0-1.8-1.3-1.9-27-1.9-22.7 0-27.2.2-27.6 1.5"/>`
|
|
161
|
+
},
|
|
162
|
+
"empty-box": {
|
|
163
|
+
viewBox: "0 0 224 190",
|
|
164
|
+
body: a`<path d="M94 10 53.5 21.5A534 534 0 0 0 14 33.6c-1.3 1.2 0 2.9 9.9 12.8l11.3 11.3L22.6 69A163 163 0 0 0 10 80.9c.1 1.8 2.5 3.4 13.3 8.5 6.5 3.1 12 6.2 12.2 6.9s.8 12 1.2 25.2l.8 23.9 9 4.9 32.3 17.8A246 246 0 0 0 104 181c1.8 0 13.1-4.4 64-25.2l20.5-8.4.7-22 1-28.2.3-6.4 11.8-4.5c8.4-3.3 11.7-5.1 11.7-6.2a66 66 0 0 0-11.5-12A146 146 0 0 1 191 57.2c0-.4 5-4.9 11-10.1A122 122 0 0 0 213 37c0-1.8-4.3-3.4-35.8-13.5-38.3-12.4-32.2-12.3-47.6-.2l-8.9 7.1-10.1-10.7C100.4 8.9 99.3 8.2 94 10m14.2 12.1c4.9 5.1 8.7 9.4 8.4 9.6s-17.8 5.8-39.2 12.4l-38.8 12-10.4-10.4-10.3-10.3 13.3-3.9C72 19.7 95.7 13.1 97.5 13.1c1.2-.1 5.3 3.4 10.7 9m69.7 5.2c16.2 5.3 29.5 9.8 29.7 10 .4.3-19.2 17-20.5 17.5A563 563 0 0 1 156.7 44c-16.3-6-30.1-11-30.7-11-2.6 0-.3-2.5 8.3-9 6.9-5.3 9.8-7 11.7-6.7 1.4.2 15.7 4.7 31.9 10M119 57.2v22.3l-7.6 2.6-7.7 2.7-23.1-10.2-29.8-13.1c-4-1.7-6.3-3.2-5.5-3.6.6-.4 8.9-3 18.2-5.9l35-11c9.9-3.2 18.6-5.9 19.3-5.9.9-.1 1.2 5 1.2 22.1m21-15.7 27.7 10.2a82 82 0 0 1 13.3 5.4c0 .4-57 20.9-58.4 20.9-.3 0-.6-9.7-.6-21.6 0-20.2.1-21.6 1.8-20.9zm57.7 27.2a207 207 0 0 1 11.1 10.4c.3.6-13.4 6.2-58.8 23.8l-20.5 8-11.1-11.7c-10.2-10.7-11-11.8-9-12.5l26.1-9.4a3518 3518 0 0 0 51.2-18.2c.1-.1 5.1 4.3 11 9.6M71.2 74.2l29.7 13.1-11.6 12.3c-6.4 6.8-12 12.4-12.5 12.4-1.5 0-61.8-30.5-61.6-31.1.2-.4 5.4-5.3 11.6-10.9 8-7.1 11.9-10 13-9.5 1 .3 15.1 6.5 31.4 13.7m58 39.8q2.1 0 44.1-16.4l12.2-4.6c.7 0 .4 32.9-.4 43.3l-.6 8.8-38.9 15.9a1616 1616 0 0 1-39.2 15.7c-.2-.1-.4-19.5-.6-43l-.3-42.8 11 11.6a65 65 0 0 0 12.7 11.5m-27.4 41.2-.3 21.4L82 165.8l-30.1-16.5-10.7-5.7-.6-5c-.3-2.8-.6-13.1-.6-22.8V98l18.1 9c9.9 5 18.7 9 19.4 9s6.4-5.5 12.6-12.1l11.4-12.2.3 21.1z"/>`
|
|
165
|
+
},
|
|
166
|
+
error: {
|
|
167
|
+
viewBox: "0 0 171 181",
|
|
168
|
+
body: a`<path d="M122.2 9.8a65 65 0 0 0-8.6 20.6c-.1 2.6.6 3.4 5.9 6.4 9.9 5.5 9.8 5.4 6.8 12.2q-2.5 5.7-1.6 7.2a111 111 0 0 0 16 14.7c.4 0 3.7-1.4 7.3-3.2 6.4-3.2 6.5-3.2 6.4-7.2a35 35 0 0 0-.9-6.5c-.5-2.1.2-3.7 3.9-8.5 2.9-3.7 4.6-6.9 4.6-8.6 0-6.2-13.6-18.9-27.2-25.4-8.3-4-10.1-4.2-12.6-1.7m14.3 8.1c7.2 3.7 20.5 15.6 20.5 18.3 0 .8-2.1 4.3-4.6 7.7-4.8 6.6-4.8 6.5-2.8 15.2.5 2.3.1 2.7-4.1 4.3l-4.7 1.8-5.5-5.5-5.5-5.5 1.7-4.5c2.7-7.3 1.9-9.6-5.2-14.3a79 79 0 0 0-7.3-4.6q-1-.5 2.6-9.1c4.3-10 3.4-9.8 14.9-3.8m-69 14.6-6.7 2c-7.5 2-9 4.2-7.9 11.3.8 5.2.8 5.3-2.3 6.9-1.7.8-3.9 2.3-4.9 3.1-1.7 1.5-2.2 1.4-6.7-1.1-6.5-3.7-9.1-3.5-12.9.9a42 42 0 0 0-8.7 13.8c-.5 2.2.1 3.4 3.9 7.1l4.5 4.6-1.6 5.2c-1.9 6-2.6 6.7-6.8 6.7-1.7 0-4.3.9-5.8 2.1-2.3 1.8-2.6 2.7-2.6 8.2.1 8.6 1.5 14.8 3.6 16.4a16 16 0 0 0 7 1.3h5.1l2.2 5.1 2.1 5.1-3.1 4.3c-4.8 6.6-4.3 8.8 3.5 16.2 9.3 8.8 10.3 8.9 18.8 2.1l2.8-2.2 5 2.4 5 2.3v5.2c0 2.8.6 5.9 1.3 6.9 1.5 2 8.1 3.4 16.3 3.5 6.9.1 9.3-1.9 10.2-8.3l.7-5 5.3-1.3c5.3-1.4 5.4-1.4 7.5 1.4 4 5 5.7 6.3 8.5 6.3 3.3 0 15.4-7.9 17.9-11.6 1.6-2.6 1.6-2.8-1.2-8l-2.9-5.3 2.8-4.1c2-3 3.2-4 4.4-3.5.9.3 3.4.8 5.7 1.1 4.9.7 7.5-1.6 9.8-9.1 3.9-12.3 3.2-14.8-4.9-17.5l-4.9-1.7-1.1-6.4c-.6-3.6-1.4-7.1-1.8-7.8-1.1-1.6-10.1-.5-13.6 1.7-1.4.9-4.6 1.7-7.1 1.8-7.1.3-8.9 1.7-8.9 6.7 0 18.4-18.9 31-35.1 23.5-12.4-5.8-18-17.1-14.4-29.5 2.2-7.6 9-14.5 16.6-16.7 6.6-2 7.9-2 15.2.1 6 1.6 6 1.6 7.8-.6 1.1-1.3 2.4-4.2 3.1-6.4a18 18 0 0 1 2.9-6.2c1-1.1 2.5-3.7 3.3-5.7 1.4-3.3 1.4-3.8-.2-5.8s-16.8-8-20.4-8q-1.6.2-2.8-5.2c-1.4-6.9-3.3-8.8-8.4-8.7-2.3 0-4.5.2-5.1.4m8.1 7.2c2.1 9.6 2.5 10.3 5.2 10.9q19.3 4.3 19.2 7c0 .7-1.3 2.9-3 4.7s-3 4.6-3 5.9a8 8 0 0 1-1.3 4.1c-1.1 1.6-1.8 1.6-6.5.6-23.9-5.1-44.1 19.4-34 41.2A29 29 0 0 0 78 131.7c15.8 1.2 29.4-10.3 31.8-27l.7-5.2 5.6-.5c3.1-.3 6.2-1 7-1.6s2.8-1.4 4.5-1.7c2.9-.6 3.2-.4 3.8 2.5.3 1.7.6 4.5.6 6.3 0 4 1.2 5 7.3 6.6 2.7.6 5.1 1.7 5.3 2.4s-.5 4.3-1.8 8.1c-2.5 7.5-2.4 7.4-10.4 6q-4.3-.8-5.3.6c-3.4 4-8.1 10.8-8.1 11.8a18 18 0 0 0 2.5 5c1.4 2.2 2.5 4.6 2.5 5.4 0 1.5-10.9 9.6-12.9 9.6-.5 0-2.8-2.1-5-4.7l-4-4.7-8.3 2-8.3 2-.8 3.9-1.3 6.2c-.4 2.1-1 2.3-6.2 2.2-10.1-.2-10.6-.5-11.2-7.8l-.5-6.3-7.7-3.5-7.7-3.5L45 150c-5.7 4.7-5.1 4.8-12.7-2.4-2.4-2.2-4.3-4.5-4.3-5.2 0-.6 1.6-3.2 3.6-5.9l3.7-4.7-2.1-3.7a37 37 0 0 1-2.7-6.1c-1.4-4.8-3.4-6-9.5-6-5.6 0-5.8-.1-6.4-3.1-.3-1.7-.6-5.6-.6-8.5 0-5 .2-5.4 2.8-6 10.3-2.3 9.5-1.6 12.1-10.4l2.4-8.1-4.8-4.9-4.7-4.8 3.6-5.5c5.2-7.8 6.1-8.5 9.4-6.3 8.2 5.3 8.1 5.3 16 .1 4-2.5 7.2-5.1 7.3-5.8l-.1-6.8-.1-5.6 4.3-1.1c11.1-2.9 12.6-2.8 13.4.5"/>`
|
|
169
|
+
},
|
|
170
|
+
"failed-payment-cross": {
|
|
171
|
+
viewBox: "0 0 145 148",
|
|
172
|
+
body: a`<path d="M61.5 8.5C17.7 16.6-5.1 65.4 16 105.9a65 65 0 0 0 48 34.2 65.4 65.4 0 0 0 71.5-48 68 68 0 0 0-5-48.6 60 60 0 0 0-20-24A60 60 0 0 0 85.2 8.4a57 57 0 0 0-23.7.1m24.8 5A63 63 0 0 1 130.1 54c1.9 5.4 2.3 8.6 2.3 19.5.1 11.7-.2 13.8-2.7 20.8A59.3 59.3 0 0 1 31 118a59 59 0 0 1-18-44.6 60.5 60.5 0 0 1 73.3-59.9"/><path d="M45.4 47.1c-.3.6 2.4 4.2 6.2 8.3L64 68.3l5.5 5.7-11.8 11.8A77 77 0 0 0 46 99.2c0 4.2 2.9 2.4 14.7-9.3l12.4-12.4 11.8 12.4c8.6 9.1 12.2 12.3 13.4 11.8 3.4-1.3 1.4-4.5-9.8-15.7A149 149 0 0 1 77 73.8c0-.5 5.2-6.2 11.5-12.7A79 79 0 0 0 100 47.6c0-3.7-4.2-.9-15.3 10.2L72.9 69.7 61.3 57.8C50.4 46.7 47.1 44.5 45.4 47.1"/>`
|
|
173
|
+
},
|
|
174
|
+
folder: {
|
|
175
|
+
viewBox: "0 0 206 169",
|
|
176
|
+
body: a`<path d="M12.9 10.9 10 13.8v141.3l2.5 2.4c2.4 2.4 2.8 2.5 18.2 2.5 14.3 0 38.8-.6 119.8-2.6l26.9-.7 2.6-2.6c2.2-2.2 2.9-4.1 3.9-12.1l3.1-23c8.8-61.8 9.9-71.1 9-73.4-1-2.8-4.7-5.6-7.2-5.6-1.4 0-1.8-.8-1.8-4 0-5.2-2.1-9.3-5.5-10.8-1.9-.9-14.7-1.2-46.9-1.2H90.4l-2.5-6.3C84.1 7.9 84.6 8 47.2 8H15.8zm67 2.4q2.4 1.3 4.6 7c1.2 3.2 2.8 6.3 3.6 6.8s21.3.9 46 .9c34.1 0 44.9.3 46.1 1.2 1 .8 1.8 3.1 2 5.8l.3 4.5-34 .7C26.9 42.8 31.2 42.6 28.6 44.3c-1.3.9-2.9 3.1-3.5 4.9-.5 1.8-3.1 22-5.6 44.8s-4.7 41.9-4.9 42.5c-.3.5-.5-26.5-.5-60.2L14 15.1l2.2-1.5C18.1 12.2 22.8 12 48 12c21.4 0 30.2.4 31.9 1.3M191 45.5c1.6 1.9 1.4 3.6-5.5 53.5-7 50-7.2 51.3-9 52.6-.9.7-14 1.3-37.2 1.7l-78.6 1.8c-23.5.6-43 .9-43.2.7s2.1-24.3 5.4-53.3c4.8-43.1 6.2-53.1 7.5-54.1 1.8-1.3 19.4-1.9 86.1-3.3 65.8-1.3 73.1-1.3 74.5.4"/>`
|
|
177
|
+
},
|
|
178
|
+
"lock-closed": {
|
|
179
|
+
viewBox: "0 0 119 166",
|
|
180
|
+
body: a`<path d="M47.9 9.5a37 37 0 0 0-23 22.2 63 63 0 0 0-2.8 20.7l-.6 14.9-4.7 1.4A15 15 0 0 0 6 80.2a240 240 0 0 0-.8 34.2c.3 32.4.4 33.1 6 38.3s6.9 5.3 48.3 5.3 42.8-.2 48.3-5.3 5.6-6.4 6-33.2c.4-27.8-.6-40.4-3.5-44.3a18 18 0 0 0-10.4-7.1l-3.4-.7-.6-15.4c-.3-8.5-1.1-17-1.7-18.8A39 39 0 0 0 75 11.4a43 43 0 0 0-27.1-1.9m24.9 6.9a36 36 0 0 1 14 14c2.5 4.8 2.7 6.1 3 20.8l.4 15.8H27.8l.4-14.8c.3-12.6.7-15.4 2.6-19.8 3-6.5 10.5-13.9 16.8-16.4a41 41 0 0 1 25.2.4m27.7 58c6.3 2.7 6.5 4 6.5 38.1 0 34-.2 34.9-6.4 37.9-3 1.4-8.3 1.6-41.6 1.6-41.5 0-41.8 0-45.6-5.7-1.7-2.6-1.9-5.3-2.2-33-.3-33.5-.2-34.5 6.1-38.3 3-1.9 5.3-2 41.5-2 30.8 0 38.9.3 41.7 1.4"/><path d="M56 94c-1.9.5-4.7 2.2-6.2 3.9-2.3 2.5-2.8 4.1-2.8 8.1s.5 5.5 3 8.3c2.7 3.1 3 4.1 3 10.4 0 8 .9 9.3 6.1 9.3 5.7 0 6.9-1.9 6.9-10.6 0-5.8.3-7.6 1.5-8.1 2.2-.8 4.5-5.6 4.5-9.3 0-8.3-7.4-13.9-16-12"/>`
|
|
181
|
+
},
|
|
182
|
+
"permanent-delete": {
|
|
183
|
+
viewBox: "0 0 138 150",
|
|
184
|
+
body: a`<path d="M42.8 8.1c-2.5 1.4-2.4 6.5.1 7.9a325 325 0 0 0 52.2 0c2.6-1.4 2.6-6.6 0-8-2.6-1.3-50-1.3-52.3.1m-31.7 15c-3.5 1.4-5 3.9-5.1 8.4 0 4.7 2.1 8.2 5.3 8.7 1.7.2 2.3 1.1 2.5 3.8l3.7 46.3c3.7 47 3.8 47.5 10.5 50.9 3.1 1.6 7.3 1.8 40.8 1.8 40.4 0 41.8-.2 46-5.4 2.5-3.2 2.3-2 6.2-54.1 1.7-22.6 3.3-41.6 3.5-42.3s1.3-1.2 2.4-1.2c2.8 0 5.1-3.8 5.1-8.5-.1-4.3-1.3-6.5-4.7-8.3-2.8-1.5-112.5-1.6-116.2-.1m71.6 33.5A28.5 28.5 0 0 1 98.8 85c-.3 5.7-.9 7.7-3.4 11.2a27 27 0 0 1-6.7 6.7c-3.5 2.3-3.7 2.7-3.7 7.8q0 9.4-3.9 9.3c-2.7 0-3.9-2-4.3-7-.4-6.3-3.1-6.2-3.8 0-.7 5.5-1.5 7-4 7-2.4 0-4-2.9-4-7.3 0-3.8-.6-4.8-2.6-4-.8.3-1.4 1.9-1.4 4 0 4.3-1.6 7.3-3.8 7.3-3.1 0-4.2-2.2-4.2-8.7 0-5.8-.2-6.4-2.7-7.7-13.6-7.1-15.8-26.9-4.4-39.9a31 31 0 0 1 36.8-7.1"/><path d="M51.6 78.2c-2.2 3-2 8.1.2 10.1a7 7 0 0 0 10.1-.9A9 9 0 0 0 64 83c0-1-.9-2.9-2.1-4.4-2.7-3.4-8.1-3.6-10.3-.4m24.5.4q-4 5-.1 9.2A7 7 0 0 0 88 83c0-6.5-7.9-9.4-11.9-4.4M66 96.5c-1.6 2.9-1.4 3.2 2 3.5 5.5.5 6.7-1.2 3.2-4.3-2.5-2.3-3.6-2.1-5.2.8"/>`
|
|
185
|
+
},
|
|
186
|
+
"search-slash": {
|
|
187
|
+
viewBox: "0 0 150 149",
|
|
188
|
+
body: a`<path d="M56.5 8a61 61 0 0 0-41.2 27.8 58 58 0 0 0 .1 57.6 66 66 0 0 0 19.7 19.9c10 5.9 17.6 7.9 29.9 7.9 11.7 0 19.7-2 28.5-7.1l5-2.9 15.6 15.4c14.5 14.3 15.8 15.4 19.3 15.4 4.9 0 8.6-3.8 8.6-8.8 0-3.2-1.4-5-15.4-19.1l-15.4-15.6 3.8-6.9A56.9 56.9 0 0 0 56.5 8m22.4 6.5a51 51 0 0 1 36.6 37.7 53 53 0 0 1-36.4 62.2 64 64 0 0 1-28.2 0 52 52 0 0 1-28.4-79.9c1.5-1.9 2.8-.7 33.1 29.8 20.1 20.4 32 31.7 33.1 31.5 4.2-.8 5.7.9-54.5-60l-6.6-6.7 2.4-2.6c4.7-5 15.9-10.8 24.5-12.8 4.5-1 19.4-.6 24.4.8m44 102.9c11.6 11.6 14.2 14.8 13.9 16.7q-.2 2.5-2.8 2.7c-2 .2-5.1-2.4-17-14.2l-14.4-14.5 2.4-2.6c1.3-1.4 2.6-2.5 2.9-2.5.4 0 7.1 6.5 15 14.4"/>`
|
|
189
|
+
},
|
|
190
|
+
"server-crash": {
|
|
191
|
+
viewBox: "0 0 158 132",
|
|
192
|
+
body: a`<path d="M15 8.8A13 13 0 0 0 9.3 15C7.2 19 7 20.8 7 35.7c0 17.8.8 21.4 5.4 25l2.6 2.1-2.4 1.5C7.9 67.4 7 71.4 7 89.1c0 14.3.2 16.8 2 20.3 4.2 8.4 2 8.1 50.4 8.4 43.9.3 47.3 0 44.5-3.4-.9-1.1-8.8-1.4-42.6-1.4-44.9 0-45.7-.1-48.1-5.5-1.5-3.2-1.6-32.2-.2-35.9.5-1.4 2.4-3.5 4.2-4.6 3.2-1.9 5.1-2 46.9-2 36.2 0 43.8-.2 44.2-1.4 1.3-3.4-1.1-3.6-45.5-3.6H19l-3.2-2.9-3.3-2.9-.3-16.7a74 74 0 0 1 .9-19.7C15.5 12 15.5 12 66.9 12h46.9l3.1 2.6 3.1 2.6v15.3c0 8.4.3 16 .6 16.9s1.5 1.6 2.5 1.6c1.8 0 1.9-1 1.9-17.4 0-17.4 0-17.5-2.6-20.6-5.2-6.2-3.7-6-56.1-6-43.5 0-48.1.2-51.3 1.8"/><path d="M31.3 27c-2.6 1.1-6.3 6.6-6.3 9.3 0 3.2 3.2 7.6 6.7 9.2 9.8 4.7 18.7-8.5 11-16.2A12 12 0 0 0 31.3 27m8.1 5.6c4.1 4-.7 10.9-5.9 8.6a6 6 0 0 1-3.1-3.7c-1.3-5 5.3-8.6 9-4.9m97.7 27.5c-12.1 4.7-37.9 32.7-35 38 .8 1.6 2.2 1.9 9 1.9 7.3 0 8 .2 7.4 1.7-3.8 9.5-7.5 20.9-7.1 22q.7 1.2 2.2 1.3c4.1 0 24.5-18.6 32.7-29.8 3.8-5.2 4.5-6.7 3.7-8.3-.9-1.6-2.2-1.9-8.5-1.9-4.1 0-7.5-.3-7.5-.6 0-.4 1.9-5.6 4.1-11.6 3.5-9.3 3.9-11.2 2.8-12.3q-1.4-1.3-3.8-.4m-5.7 17.4c-2 5.3-3.2 10.1-2.8 10.5s4.2 1 8.2 1.1c5.3.1 7.2.6 7.2 1.6 0 1.6-24.8 26.9-25.6 26-.3-.3.8-4.2 2.5-8.6 4.9-12.6 4.6-13.1-7.1-13.1h-7l3.1-4.3a93 93 0 0 1 18.4-19.3 27 27 0 0 1 6.4-4.1c.2.3-1.3 4.8-3.3 10.2M30.3 81a10 10 0 0 0-3.9 12.9c2 3.8 7.4 6.6 10.8 5.8 9.4-2.4 11.6-13.8 3.6-18.7-4.1-2.5-6.5-2.5-10.5 0m8.9 4.7c3.5 3.2 1.3 9.3-3.4 9.3a5.5 5.5 0 0 1-4.1-9.2c2-2.2 5.1-2.3 7.5-.1"/>`
|
|
193
|
+
},
|
|
194
|
+
"timeout-clock": {
|
|
195
|
+
viewBox: "0 0 192 163",
|
|
196
|
+
body: a`<path d="M73.5 8.6A76 76 0 0 0 13 60a74 74 0 0 0-1.6 34 75 75 0 0 0 34.2 48.6c7.2 4.2 20 8.3 29.2 9.3 13.9 1.6 26.7-.8 23.1-4.4-.5-.5-6.2-.8-13.2-.7a57 57 0 0 1-32.7-7 51 51 0 0 1-17-12.7 62 62 0 0 1-19.4-46.6 61 61 0 0 1 18.9-46.1 67 67 0 0 1 40-20.5 71 71 0 0 1 46.9 10.5 66 66 0 0 1 28.5 49.1c.5 6.1.8 7 2.6 7s2-.6 1.9-8c-.1-18.1-12-40-27.3-50.4A70 70 0 0 0 87 8.5a134 134 0 0 0-13.5.1"/><path d="M79.7 33.6c-.4.4-.7 11.4-.7 24.5v23.8l13.6 10.3c7.4 5.7 14.1 10.4 14.8 10.6 1.7.4 4.6-2.4 4.6-4.4a69 69 0 0 0-13-11l-13-9.6-.2-22.1-.3-22.2-2.5-.3c-1.4-.2-2.9 0-3.3.4m59 55.6a258 258 0 0 0-14.1 22.8 834 834 0 0 1-15 25.4q-6.1 10-.3 15.2l2.8 2.4h31.5c37.5 0 38.4-.2 38.4-9.1 0-3.6-29-55.1-32.3-57.4s-8.4-1.9-11 .7m23.6 29.3c10.3 18.1 14.7 26.7 14.5 28.5l-.3 2.5h-31.9c-28.7 0-32-.2-32.9-1.7-.9-1.3 1.6-6.3 12.3-25 18.5-32.3 17.6-31 20.8-30.6 2.4.3 4.4 3.2 17.5 26.3"/><path d="M142.3 106.7c-1.9.7-1.8 20.3.1 22.8 3.3 4.6 5.6-1.4 5.6-14.9 0-7.5-1.6-9.6-5.7-7.9m-.7 29.9q-2.8 2.8-.4 5.2c3.6 3.6 9.6-1.1 6.2-4.9-2.1-2.3-3.7-2.4-5.8-.3"/>`
|
|
197
|
+
},
|
|
198
|
+
"trend-flat": {
|
|
199
|
+
viewBox: "0 0 192 167",
|
|
200
|
+
body: a`<path d="M10.7 8.6c-.4.4-.7 33.7-.7 73.9 0 63.7.2 73.4 1.5 74.5 1.2 1 20.1 1.2 85.7 1.1 46.4-.1 84.7-.6 85.2-1.1 2.8-2.8-1.9-3-84-3H15l-.1-23.8-.8-72.6c-.6-46.9-.9-51.5-3.4-49"/><path d="M164.4 71.2c-.5.7 1.2 2.8 4.2 5.5l4.9 4.3-70 .2c-61.4.3-70 .5-70 1.8s8.6 1.5 70 1.8l70 .2-4.9 4.3c-4.6 4-5.5 6.7-2.3 6.7 1.4 0 15.7-11.8 15.7-12.9S167.4 70 166.1 70q-1 0-1.7 1.2"/>`
|
|
201
|
+
},
|
|
202
|
+
"wifi-off": {
|
|
203
|
+
viewBox: "0 0 162 134",
|
|
204
|
+
body: a`<path d="M64.1 8.5a91 91 0 0 0-26 9.7l-9.4 4.9-4.6-4.5a20 20 0 0 0-6.2-4.6c-1.8 0-3.9 1.9-3.9 3.5a540 540 0 0 0 28.5 28.9c28.1 27.3 28.4 27.7 25.7 28.7-9.4 3.6-20.5 12.6-20 16.3.6 3.9 4.6 3.2 9.7-1.7 4.9-4.7 10.5-8 15.8-9.1 3.1-.7 3.9 0 24.8 20.3 11.9 11.6 22 21.1 22.5 21.1 1 0 4-2.9 4-3.9S89.3 81.6 88 81.2c-1.5-.5-1.2-2.2.3-2.2 3.6 0 12.1 3.4 17.3 6.9 4.5 3 6.3 3.7 7.6 3q3.8-2-.9-6.3A46 46 0 0 0 84 72h-5.5L68 61.5a74 74 0 0 1-9.9-10.9c.2-.2 3.3-1.4 6.9-2.7 8-2.7 23.4-3.7 32.3-1.9a73 73 0 0 1 26.5 11.4c7.9 5.8 8.1 5.9 9.7 4.6 2.9-2.4 1.6-4.8-4.7-9.3A71 71 0 0 0 57 43.9l-4.2 2-8.9-8.2a59 59 0 0 1-8.9-9.2c0-1.4 10.1-6.8 18.5-9.8a87 87 0 0 1 35.2-4.4c20.9.8 38.6 6.6 54.7 17.7 7.1 4.9 9.8 5.5 10.9 2.5.9-2.1-1.7-4.8-9.3-9.9-9-6.1-20.4-11-32.8-14.3a141 141 0 0 0-48.1-1.8"/><path d="M13.6 36.1c-6.8 7.4-7.5 8.6-5.4 10.7s3.4 1.4 10.6-6l7.1-7.3-2.1-2.2C22.6 30 21.3 29 20.9 29a53 53 0 0 0-7.3 7.1m24.5 19.6c-5.5 4.6-10.2 11-9.4 12.9q1.4 4.6 12.2-5.7c7.2-6.8 7.3-7 5.6-8.9-2.5-2.7-3.3-2.5-8.4 1.7M73.5 102a14 14 0 0 0-4.5 18.7c5.4 8.9 19.9 8.3 24.3-1C98 110 91.7 100 81 100c-2.8 0-5.6.8-7.5 2m12.5 7c4.1 4.1 1 11-5 11-5.8 0-8.8-6-5.4-10.8 2-2.9 7.6-3 10.4-.2"/>`
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
function j(t) {
|
|
208
|
+
return Object.prototype.hasOwnProperty.call(B, t);
|
|
209
|
+
}
|
|
210
|
+
function _(t) {
|
|
211
|
+
const { viewBox: c, body: o } = B[t];
|
|
212
|
+
return p`<svg class="baht-illustration" viewBox=${c} fill="currentColor" aria-hidden="true">${o}</svg>`;
|
|
213
|
+
}
|
|
214
|
+
var E = Object.defineProperty, P = Object.getOwnPropertyDescriptor, u = (t, c, o, s) => {
|
|
215
|
+
for (var e = s > 1 ? void 0 : s ? P(c, o) : c, i = t.length - 1, r; i >= 0; i--)
|
|
216
|
+
(r = t[i]) && (e = (s ? r(c, o, e) : r(e)) || e);
|
|
217
|
+
return s && e && E(c, o, e), e;
|
|
218
|
+
};
|
|
219
|
+
let l = class extends y {
|
|
220
|
+
constructor() {
|
|
221
|
+
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 = (t) => {
|
|
222
|
+
!this.open || l.openStack.at(-1) !== this || (t.key === "Escape" ? this.requestClose("escape") : t.key === "Tab" && this.trapFocus(t));
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
get titleId() {
|
|
226
|
+
return `baht-modal-title-${this.uid}`;
|
|
227
|
+
}
|
|
228
|
+
get descriptionId() {
|
|
229
|
+
return `baht-modal-desc-${this.uid}`;
|
|
230
|
+
}
|
|
231
|
+
focusables() {
|
|
232
|
+
const t = this.querySelector(".baht-modal");
|
|
233
|
+
return t ? Array.from(
|
|
234
|
+
t.querySelectorAll(
|
|
235
|
+
'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
236
|
+
)
|
|
237
|
+
) : [];
|
|
238
|
+
}
|
|
239
|
+
/** Keep Tab cycling inside the dialog (no keyboard escape to the page behind). */
|
|
240
|
+
trapFocus(t) {
|
|
241
|
+
const c = this.focusables(), o = this.querySelector(".baht-modal");
|
|
242
|
+
if (c.length === 0) {
|
|
243
|
+
o == null || o.focus(), t.preventDefault();
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const s = c[0], e = c[c.length - 1], i = document.activeElement;
|
|
247
|
+
if (!this.contains(i)) {
|
|
248
|
+
s.focus(), t.preventDefault();
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
t.shiftKey && (i === s || i === o) ? (e.focus(), t.preventDefault()) : !t.shiftKey && i === e && (s.focus(), t.preventDefault());
|
|
252
|
+
}
|
|
253
|
+
connectedCallback() {
|
|
254
|
+
super.connectedCallback(), M() && document.addEventListener("keydown", this.onKeydown);
|
|
255
|
+
}
|
|
256
|
+
disconnectedCallback() {
|
|
257
|
+
M() && document.removeEventListener("keydown", this.onKeydown), l.openStack = l.openStack.filter((t) => t !== this), super.disconnectedCallback();
|
|
258
|
+
}
|
|
259
|
+
firstUpdated() {
|
|
260
|
+
q(this, this.bodyEl);
|
|
261
|
+
}
|
|
262
|
+
willUpdate(t) {
|
|
263
|
+
t.has("open") && (this.open ? this.closing = !1 : t.get("open") === !0 && (this.closing = !0));
|
|
264
|
+
}
|
|
265
|
+
updated(t) {
|
|
266
|
+
var c, o;
|
|
267
|
+
if (t.has("open") && (l.openStack = l.openStack.filter((s) => s !== this), this.open && l.openStack.push(this)), t.has("open") && !this.open && this.closing) {
|
|
268
|
+
const s = ++this.closeToken, e = this.querySelector(".baht-modal-scrim"), i = () => {
|
|
269
|
+
s === this.closeToken && !this.open && (this.closing = !1);
|
|
270
|
+
};
|
|
271
|
+
e ? x(e, i) : i();
|
|
272
|
+
}
|
|
273
|
+
if (t.has("open") && this.open && (this.previousFocus = document.activeElement, (c = this.querySelector(".baht-modal")) == null || c.focus()), t.has("open") && !this.open && t.get("open") === !0) {
|
|
274
|
+
const s = this.previousFocus;
|
|
275
|
+
this.previousFocus = null, s != null && s.isConnected && (!document.activeElement || document.activeElement === document.body || this.contains(document.activeElement)) && ((o = s.focus) == null || o.call(s));
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
/** Ask the host to close (the host owns `open`). */
|
|
279
|
+
requestClose(t = "button") {
|
|
280
|
+
this.emit("baht-close", { reason: t });
|
|
281
|
+
}
|
|
282
|
+
render() {
|
|
283
|
+
return p`<div
|
|
284
|
+
class="baht-modal-scrim${this.closing ? " baht-modal-scrim--closing" : ""}"
|
|
285
|
+
style=${this.open || this.closing ? h : "display:none"}
|
|
286
|
+
@click=${(t) => this.closeOnScrim && t.target === t.currentTarget && this.requestClose("scrim")}
|
|
287
|
+
>
|
|
288
|
+
<div
|
|
289
|
+
class="baht-modal"
|
|
290
|
+
role="dialog"
|
|
291
|
+
aria-modal="true"
|
|
292
|
+
aria-labelledby=${this.heading ? this.titleId : h}
|
|
293
|
+
aria-label=${this.heading ? h : "Dialog"}
|
|
294
|
+
aria-describedby=${this.description ? this.descriptionId : h}
|
|
295
|
+
tabindex="-1"
|
|
296
|
+
>
|
|
297
|
+
${this.heading || this.description || this.showClose ? p`<header class="baht-modal-header">
|
|
298
|
+
<div class="baht-modal-heading">
|
|
299
|
+
<div class="baht-modal-title" id=${this.titleId}>${this.heading}</div>
|
|
300
|
+
${this.description ? p`<p class="baht-modal-description" id=${this.descriptionId}>${this.description}</p>` : h}
|
|
301
|
+
</div>
|
|
302
|
+
${this.showClose ? p`<button type="button" class="baht-modal-close" aria-label=${A("close")} @click=${() => this.requestClose("button")}>${_("cross-box")}</button>` : h}
|
|
303
|
+
</header>` : h}
|
|
304
|
+
<div class="baht-modal-body"></div>
|
|
305
|
+
</div>
|
|
306
|
+
</div>`;
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
l.openStack = [];
|
|
310
|
+
u([
|
|
311
|
+
n({ type: Boolean, reflect: !0 })
|
|
312
|
+
], l.prototype, "open", 2);
|
|
313
|
+
u([
|
|
314
|
+
n()
|
|
315
|
+
], l.prototype, "heading", 2);
|
|
316
|
+
u([
|
|
317
|
+
n()
|
|
318
|
+
], l.prototype, "description", 2);
|
|
319
|
+
u([
|
|
320
|
+
n({ type: Boolean, attribute: "show-close" })
|
|
321
|
+
], l.prototype, "showClose", 2);
|
|
322
|
+
u([
|
|
323
|
+
n({ type: Boolean, attribute: "close-on-scrim" })
|
|
324
|
+
], l.prototype, "closeOnScrim", 2);
|
|
325
|
+
u([
|
|
326
|
+
C(".baht-modal-body")
|
|
327
|
+
], l.prototype, "bodyEl", 2);
|
|
328
|
+
u([
|
|
329
|
+
w()
|
|
330
|
+
], l.prototype, "closing", 2);
|
|
331
|
+
l = u([
|
|
332
|
+
v("baht-modal")
|
|
333
|
+
], l);
|
|
334
|
+
var V = Object.defineProperty, T = Object.getOwnPropertyDescriptor, f = (t, c, o, s) => {
|
|
335
|
+
for (var e = s > 1 ? void 0 : s ? T(c, o) : c, i = t.length - 1, r; i >= 0; i--)
|
|
336
|
+
(r = t[i]) && (e = (s ? r(c, o, e) : r(e)) || e);
|
|
337
|
+
return s && e && V(c, o, e), e;
|
|
338
|
+
};
|
|
339
|
+
let b = class extends y {
|
|
340
|
+
constructor() {
|
|
341
|
+
super(...arguments), this.duration = 4e3, this.entries = [], this.timers = /* @__PURE__ */ new Map();
|
|
342
|
+
}
|
|
343
|
+
show(t) {
|
|
344
|
+
const c = {
|
|
345
|
+
id: ++b.counter,
|
|
346
|
+
message: t.message,
|
|
347
|
+
tone: t.tone ?? "neutral",
|
|
348
|
+
duration: t.duration ?? this.duration
|
|
349
|
+
};
|
|
350
|
+
return this.entries = [...this.entries, c], c.duration > 0 && this.timers.set(
|
|
351
|
+
c.id,
|
|
352
|
+
setTimeout(() => this.dismiss(c.id), c.duration)
|
|
353
|
+
), c.id;
|
|
354
|
+
}
|
|
355
|
+
dismiss(t) {
|
|
356
|
+
const c = this.entries.find((e) => e.id === t);
|
|
357
|
+
if (!c || c.leaving) return;
|
|
358
|
+
clearTimeout(this.timers.get(t)), this.timers.delete(t), this.entries = this.entries.map((e) => e.id === t ? { ...e, leaving: !0 } : e), this.emit("baht-dismiss", { id: t, message: c.message });
|
|
359
|
+
const o = () => {
|
|
360
|
+
this.entries = this.entries.filter((e) => e.id !== t);
|
|
361
|
+
}, s = this.querySelector(`.baht-toast[data-toast="${t}"]`);
|
|
362
|
+
if (!s) {
|
|
363
|
+
o();
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
s.classList.add("baht-toast--leaving"), x(s, o);
|
|
367
|
+
}
|
|
368
|
+
disconnectedCallback() {
|
|
369
|
+
this.timers.forEach((t) => clearTimeout(t)), this.timers.clear(), super.disconnectedCallback();
|
|
370
|
+
}
|
|
371
|
+
render() {
|
|
372
|
+
return p`<div class="baht-toaster" role="status" aria-live="polite">
|
|
373
|
+
${this.entries.map(
|
|
374
|
+
// Danger/warning interrupt (role=alert); the rest ride the polite container.
|
|
375
|
+
(t) => p`<div
|
|
376
|
+
class="baht-toast ${t.tone === "neutral" ? "" : `baht-toast--${t.tone}`}${t.leaving ? " baht-toast--leaving" : ""}"
|
|
377
|
+
data-toast=${t.id}
|
|
378
|
+
role=${t.tone === "danger" || t.tone === "warning" ? "alert" : h}
|
|
379
|
+
>
|
|
380
|
+
<span class="baht-toast-message">${t.message}</span>
|
|
381
|
+
<button type="button" class="baht-toast-dismiss" aria-label=${A("dismiss")} @click=${() => this.dismiss(t.id)}>×</button>
|
|
382
|
+
</div>`
|
|
383
|
+
)}
|
|
384
|
+
</div>`;
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
b.counter = 0;
|
|
388
|
+
f([
|
|
389
|
+
n({ type: Number })
|
|
390
|
+
], b.prototype, "duration", 2);
|
|
391
|
+
f([
|
|
392
|
+
w()
|
|
393
|
+
], b.prototype, "entries", 2);
|
|
394
|
+
b = f([
|
|
395
|
+
v("baht-toast")
|
|
396
|
+
], b);
|
|
397
|
+
export {
|
|
398
|
+
d as B,
|
|
399
|
+
l as a,
|
|
400
|
+
b,
|
|
401
|
+
j as c,
|
|
402
|
+
_ as d,
|
|
403
|
+
x as e,
|
|
404
|
+
O as i,
|
|
405
|
+
$ as r
|
|
406
|
+
};
|