bank20baht-ui 0.2.7 → 0.2.8

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.
@@ -0,0 +1,16 @@
1
+ function a(e, i) {
2
+ const n = typeof e.getAnimations == "function" ? e.getAnimations({ subtree: !0 }) : [];
3
+ if (n.length === 0) {
4
+ i();
5
+ return;
6
+ }
7
+ let s = !1;
8
+ const t = () => {
9
+ s || (s = !0, i());
10
+ };
11
+ Promise.all(n.map((o) => o.finished.catch(() => {
12
+ }))).then(t, t), setTimeout(t, 600);
13
+ }
14
+ export {
15
+ a
16
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Call `done` once the CSS animations currently running on `el` (or inside
3
+ * it) have finished — or right away when none play: `prefers-reduced-motion`
4
+ * (the stylesheet sets `animation: none`), a host without the tokens
5
+ * stylesheet, or a DOM without the Web Animations API (happy-dom). Add the
6
+ * `--leaving` class BEFORE calling this so the exit keyframes are the ones
7
+ * being waited on.
8
+ */
9
+ export declare function afterExit(el: Element, done: () => void): void;
@@ -12,6 +12,7 @@ export declare class BahtAlert extends BahtElement {
12
12
  message: string;
13
13
  dismissible: boolean;
14
14
  private dismissed;
15
+ private generation;
15
16
  protected willUpdate(changed: Map<PropertyKey, unknown>): void;
16
17
  private dismiss;
17
18
  protected render(): TemplateResult | typeof nothing;
@@ -16,6 +16,8 @@ export declare class BahtModal extends BahtElement {
16
16
  showClose: boolean;
17
17
  closeOnScrim: boolean;
18
18
  private bodyEl;
19
+ private closing;
20
+ private closeToken;
19
21
  private static openStack;
20
22
  private previousFocus;
21
23
  private onKeydown;
@@ -25,6 +27,7 @@ export declare class BahtModal extends BahtElement {
25
27
  connectedCallback(): void;
26
28
  disconnectedCallback(): void;
27
29
  protected firstUpdated(): void;
30
+ protected willUpdate(changed: Map<PropertyKey, unknown>): void;
28
31
  protected updated(changed: Map<PropertyKey, unknown>): void;
29
32
  /** Ask the host to close (the host owns `open`). */
30
33
  requestClose(reason?: 'escape' | 'scrim' | 'button'): void;
@@ -1305,6 +1305,46 @@
1305
1305
  }
1306
1306
  ]
1307
1307
  },
1308
+ {
1309
+ "kind": "javascript-module",
1310
+ "path": "src/components/motion.ts",
1311
+ "declarations": [
1312
+ {
1313
+ "kind": "function",
1314
+ "name": "afterExit",
1315
+ "return": {
1316
+ "type": {
1317
+ "text": "void"
1318
+ }
1319
+ },
1320
+ "parameters": [
1321
+ {
1322
+ "name": "el",
1323
+ "type": {
1324
+ "text": "Element"
1325
+ }
1326
+ },
1327
+ {
1328
+ "name": "done",
1329
+ "type": {
1330
+ "text": "() => void"
1331
+ }
1332
+ }
1333
+ ],
1334
+ "description": "Call `done` once the CSS animations currently running on `el` (or inside\nit) have finished — or right away when none play: `prefers-reduced-motion`\n(the stylesheet sets `animation: none`), a host without the tokens\nstylesheet, or a DOM without the Web Animations API (happy-dom). Add the\n`--leaving` class BEFORE calling this so the exit keyframes are the ones\nbeing waited on."
1335
+ }
1336
+ ],
1337
+ "exports": [
1338
+ {
1339
+ "kind": "js",
1340
+ "name": "afterExit",
1341
+ "declaration": {
1342
+ "name": "afterExit",
1343
+ "module": "src/components/motion.ts"
1344
+ }
1345
+ }
1346
+ ]
1347
+ },
1308
1348
  {
1309
1349
  "kind": "javascript-module",
1310
1350
  "path": "src/components/primitives/baht-accordion.ts",
@@ -1502,6 +1542,15 @@
1502
1542
  "privacy": "private",
1503
1543
  "default": "false"
1504
1544
  },
1545
+ {
1546
+ "kind": "field",
1547
+ "name": "generation",
1548
+ "type": {
1549
+ "text": "number"
1550
+ },
1551
+ "privacy": "private",
1552
+ "default": "0"
1553
+ },
1505
1554
  {
1506
1555
  "kind": "method",
1507
1556
  "name": "dismiss",
@@ -4770,6 +4819,24 @@
4770
4819
  },
4771
4820
  "privacy": "private"
4772
4821
  },
4822
+ {
4823
+ "kind": "field",
4824
+ "name": "closing",
4825
+ "type": {
4826
+ "text": "boolean"
4827
+ },
4828
+ "privacy": "private",
4829
+ "default": "false"
4830
+ },
4831
+ {
4832
+ "kind": "field",
4833
+ "name": "closeToken",
4834
+ "type": {
4835
+ "text": "number"
4836
+ },
4837
+ "privacy": "private",
4838
+ "default": "0"
4839
+ },
4773
4840
  {
4774
4841
  "kind": "field",
4775
4842
  "name": "openStack",