reke-ui 0.5.2 → 0.5.3

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.
@@ -2117,6 +2117,35 @@
2117
2117
  "attribute": "position",
2118
2118
  "reflects": true
2119
2119
  },
2120
+ {
2121
+ "kind": "field",
2122
+ "name": "_closing",
2123
+ "type": {
2124
+ "text": "boolean"
2125
+ },
2126
+ "privacy": "private",
2127
+ "default": "false",
2128
+ "description": "Kept rendering after `open` flips to false so the panel can animate out.\nWithout it `render()` would return `nothing` and the exit would be instant."
2129
+ },
2130
+ {
2131
+ "kind": "field",
2132
+ "name": "_settled",
2133
+ "type": {
2134
+ "text": "boolean"
2135
+ },
2136
+ "privacy": "private",
2137
+ "default": "false",
2138
+ "description": "Set once the enter animation has finished so the resting panel can drop its\n`transform`. `animation-fill-mode: both` otherwise keeps the final keyframe\napplied forever, and a transformed element becomes the containing block for\nits `position: fixed` descendants — which silently relocates every floating\nlayer inside the dialog (combobox dropdowns, menus) because their\nviewport-based coordinates are suddenly resolved against the panel."
2139
+ },
2140
+ {
2141
+ "kind": "field",
2142
+ "name": "_exitTimer",
2143
+ "type": {
2144
+ "text": "ReturnType<typeof setTimeout> | null"
2145
+ },
2146
+ "privacy": "private",
2147
+ "default": "null"
2148
+ },
2120
2149
  {
2121
2150
  "kind": "field",
2122
2151
  "name": "_previouslyFocused",
@@ -2209,6 +2238,21 @@
2209
2238
  "name": "handleClosed",
2210
2239
  "privacy": "private"
2211
2240
  },
2241
+ {
2242
+ "kind": "method",
2243
+ "name": "startExit",
2244
+ "privacy": "private"
2245
+ },
2246
+ {
2247
+ "kind": "method",
2248
+ "name": "cancelExit",
2249
+ "privacy": "private"
2250
+ },
2251
+ {
2252
+ "kind": "field",
2253
+ "name": "handleExitAnimationEnd",
2254
+ "privacy": "private"
2255
+ },
2212
2256
  {
2213
2257
  "kind": "method",
2214
2258
  "name": "lockScroll",
@@ -3341,15 +3385,69 @@
3341
3385
  "name": "RekePieChart",
3342
3386
  "cssProperties": [
3343
3387
  {
3344
- "description": "First slice / accent color.",
3388
+ "description": "Slice colors 1–6 (`--reke-chart-1` … `--reke-chart-6`).",
3389
+ "name": "--reke-chart-1",
3390
+ "default": "#22C55E"
3391
+ },
3392
+ {
3393
+ "description": "Chart height when `size` is not set.",
3394
+ "name": "--reke-pie-chart-height",
3395
+ "default": "240px"
3396
+ },
3397
+ {
3398
+ "description": "Loading spinner color.",
3345
3399
  "name": "--reke-color-primary",
3346
3400
  "default": "#22C55E"
3401
+ },
3402
+ {
3403
+ "description": "Loading mask tint.",
3404
+ "name": "--reke-color-bg",
3405
+ "default": "#0A0A0B"
3406
+ },
3407
+ {
3408
+ "description": "Tooltip background.",
3409
+ "name": "--reke-color-surface",
3410
+ "default": "#1A1A1A"
3411
+ },
3412
+ {
3413
+ "description": "Tooltip border.",
3414
+ "name": "--reke-color-border",
3415
+ "default": "#252525"
3416
+ },
3417
+ {
3418
+ "description": "Center value, labels and tooltip text.",
3419
+ "name": "--reke-color-text",
3420
+ "default": "#E5E5E5"
3421
+ },
3422
+ {
3423
+ "description": "Legend and center caption text.",
3424
+ "name": "--reke-color-text-label",
3425
+ "default": "#8A8A8A"
3426
+ },
3427
+ {
3428
+ "description": "Legend items toggled off.",
3429
+ "name": "--reke-color-text-disabled",
3430
+ "default": "#3B3B3B"
3431
+ },
3432
+ {
3433
+ "description": "Pie label connector lines.",
3434
+ "name": "--reke-color-border-hover",
3435
+ "default": "#3A3A3A"
3436
+ },
3437
+ {
3438
+ "description": "Chart font family.",
3439
+ "name": "--reke-font-mono",
3440
+ "default": "JetBrains Mono"
3347
3441
  }
3348
3442
  ],
3349
3443
  "cssParts": [
3350
3444
  {
3351
3445
  "description": "The chart canvas container.",
3352
3446
  "name": "chart"
3447
+ },
3448
+ {
3449
+ "description": "The donut center overlay (total, or the hovered slice).",
3450
+ "name": "center"
3353
3451
  }
3354
3452
  ],
3355
3453
  "members": [
@@ -3422,6 +3520,37 @@
3422
3520
  },
3423
3521
  "description": "Explicit color palette. Overrides the `--reke-chart-*` tokens when set."
3424
3522
  },
3523
+ {
3524
+ "kind": "field",
3525
+ "name": "centerLabel",
3526
+ "type": {
3527
+ "text": "string"
3528
+ },
3529
+ "default": "'Total'",
3530
+ "description": "Caption under the total in the donut center.",
3531
+ "attribute": "center-label"
3532
+ },
3533
+ {
3534
+ "kind": "field",
3535
+ "name": "hideCenter",
3536
+ "type": {
3537
+ "text": "boolean"
3538
+ },
3539
+ "default": "false",
3540
+ "description": "Hide the donut center overlay (total / hovered slice).",
3541
+ "attribute": "hide-center",
3542
+ "reflects": true
3543
+ },
3544
+ {
3545
+ "kind": "field",
3546
+ "name": "animationDuration",
3547
+ "type": {
3548
+ "text": "number"
3549
+ },
3550
+ "default": "700",
3551
+ "description": "Entry/update animation length in ms. `0` disables animation.",
3552
+ "attribute": "animation-duration"
3553
+ },
3425
3554
  {
3426
3555
  "kind": "field",
3427
3556
  "name": "chart",
@@ -3438,6 +3567,56 @@
3438
3567
  },
3439
3568
  "privacy": "private"
3440
3569
  },
3570
+ {
3571
+ "kind": "field",
3572
+ "name": "visibility",
3573
+ "type": {
3574
+ "text": "IntersectionObserver | undefined"
3575
+ },
3576
+ "privacy": "private"
3577
+ },
3578
+ {
3579
+ "kind": "field",
3580
+ "name": "themeObserver",
3581
+ "type": {
3582
+ "text": "MutationObserver | undefined"
3583
+ },
3584
+ "privacy": "private"
3585
+ },
3586
+ {
3587
+ "kind": "field",
3588
+ "name": "colorScheme",
3589
+ "type": {
3590
+ "text": "MediaQueryList | undefined"
3591
+ },
3592
+ "privacy": "private"
3593
+ },
3594
+ {
3595
+ "kind": "field",
3596
+ "name": "hovered",
3597
+ "type": {
3598
+ "text": "HoveredSlice | undefined"
3599
+ },
3600
+ "privacy": "private",
3601
+ "description": "Slice under the pointer; the donut center shows it instead of the total."
3602
+ },
3603
+ {
3604
+ "kind": "field",
3605
+ "name": "hiddenNames",
3606
+ "privacy": "private",
3607
+ "default": "new Set<string>()",
3608
+ "description": "Slices toggled off from the legend, excluded from the center total."
3609
+ },
3610
+ {
3611
+ "kind": "field",
3612
+ "name": "revealed",
3613
+ "type": {
3614
+ "text": "boolean"
3615
+ },
3616
+ "privacy": "private",
3617
+ "default": "false",
3618
+ "description": "The entry animation is held back until the chart is actually on screen.\nECharts animates the moment `setOption` runs, so a chart mounted below the\nfold plays its reveal into a canvas nobody is looking at and is already\nstatic by the time it is scrolled to."
3619
+ },
3441
3620
  {
3442
3621
  "kind": "method",
3443
3622
  "name": "readToken",
@@ -3463,6 +3642,17 @@
3463
3642
  ],
3464
3643
  "description": "Read a CSS custom property off the host's computed style (canvas can't read var())."
3465
3644
  },
3645
+ {
3646
+ "kind": "method",
3647
+ "name": "motionDuration",
3648
+ "privacy": "private",
3649
+ "return": {
3650
+ "type": {
3651
+ "text": "number"
3652
+ }
3653
+ },
3654
+ "description": "Honours the OS \"reduce motion\" setting: 0ms means ECharts paints statically."
3655
+ },
3466
3656
  {
3467
3657
  "kind": "method",
3468
3658
  "name": "resolvePalette",
@@ -3473,6 +3663,54 @@
3473
3663
  }
3474
3664
  }
3475
3665
  },
3666
+ {
3667
+ "kind": "method",
3668
+ "name": "watchTheme",
3669
+ "privacy": "private",
3670
+ "return": {
3671
+ "type": {
3672
+ "text": "void"
3673
+ }
3674
+ },
3675
+ "description": "Repaints with freshly read tokens when the theme switches."
3676
+ },
3677
+ {
3678
+ "kind": "field",
3679
+ "name": "repaint",
3680
+ "privacy": "private",
3681
+ "description": "Static repaint: a theme switch should not replay the entry animation."
3682
+ },
3683
+ {
3684
+ "kind": "method",
3685
+ "name": "inViewport",
3686
+ "privacy": "private",
3687
+ "return": {
3688
+ "type": {
3689
+ "text": "boolean"
3690
+ }
3691
+ }
3692
+ },
3693
+ {
3694
+ "kind": "method",
3695
+ "name": "watchVisibility",
3696
+ "privacy": "private",
3697
+ "return": {
3698
+ "type": {
3699
+ "text": "void"
3700
+ }
3701
+ },
3702
+ "description": "Reveals on first intersection and then stops observing: the animation is an\nentrance, not something to replay on every scroll past."
3703
+ },
3704
+ {
3705
+ "kind": "method",
3706
+ "name": "reveal",
3707
+ "privacy": "private",
3708
+ "return": {
3709
+ "type": {
3710
+ "text": "void"
3711
+ }
3712
+ }
3713
+ },
3476
3714
  {
3477
3715
  "kind": "method",
3478
3716
  "name": "applyLoading",
@@ -3492,6 +3730,24 @@
3492
3730
  "privacy": "private",
3493
3731
  "readonly": true
3494
3732
  },
3733
+ {
3734
+ "kind": "field",
3735
+ "name": "showCenter",
3736
+ "type": {
3737
+ "text": "boolean"
3738
+ },
3739
+ "privacy": "private",
3740
+ "readonly": true
3741
+ },
3742
+ {
3743
+ "kind": "field",
3744
+ "name": "visibleTotal",
3745
+ "type": {
3746
+ "text": "number"
3747
+ },
3748
+ "privacy": "private",
3749
+ "readonly": true
3750
+ },
3495
3751
  {
3496
3752
  "kind": "field",
3497
3753
  "name": "chartAriaLabel",
@@ -3509,7 +3765,20 @@
3509
3765
  "type": {
3510
3766
  "text": "ChartOption"
3511
3767
  }
3512
- }
3768
+ },
3769
+ "parameters": [
3770
+ {
3771
+ "name": "animate",
3772
+ "type": {
3773
+ "text": "boolean"
3774
+ }
3775
+ }
3776
+ ]
3777
+ },
3778
+ {
3779
+ "kind": "method",
3780
+ "name": "renderCenter",
3781
+ "privacy": "private"
3513
3782
  }
3514
3783
  ],
3515
3784
  "events": [
@@ -3562,6 +3831,33 @@
3562
3831
  "default": "false",
3563
3832
  "description": "Show ECharts' native loading spinner (skeleton) over the chart.",
3564
3833
  "fieldName": "loading"
3834
+ },
3835
+ {
3836
+ "name": "center-label",
3837
+ "type": {
3838
+ "text": "string"
3839
+ },
3840
+ "default": "'Total'",
3841
+ "description": "Caption under the total in the donut center.",
3842
+ "fieldName": "centerLabel"
3843
+ },
3844
+ {
3845
+ "name": "hide-center",
3846
+ "type": {
3847
+ "text": "boolean"
3848
+ },
3849
+ "default": "false",
3850
+ "description": "Hide the donut center overlay (total / hovered slice).",
3851
+ "fieldName": "hideCenter"
3852
+ },
3853
+ {
3854
+ "name": "animation-duration",
3855
+ "type": {
3856
+ "text": "number"
3857
+ },
3858
+ "default": "700",
3859
+ "description": "Entry/update animation length in ms. `0` disables animation.",
3860
+ "fieldName": "animationDuration"
3565
3861
  }
3566
3862
  ],
3567
3863
  "superclass": {
@@ -3570,7 +3866,7 @@
3570
3866
  },
3571
3867
  "tagName": "reke-pie-chart",
3572
3868
  "customElement": true,
3573
- "summary": "A circular (pie / donut) chart rendered with ECharts, isolated in Shadow DOM."
3869
+ "summary": "A circular (pie / donut) chart rendered with ECharts, isolated in Shadow DOM.\n\nCanvas cannot resolve `var()`, so every token below is read off the host's\ncomputed style and re-read whenever `data-reke-theme` or the OS color scheme\nchanges on the document."
3574
3870
  }
3575
3871
  ],
3576
3872
  "exports": [
@@ -28,6 +28,21 @@ export declare class RekeDialog extends RekeElement {
28
28
  variant: DialogVariant;
29
29
  /** Drawer slide direction. Only applies when variant="drawer". */
30
30
  position: DrawerPosition;
31
+ /**
32
+ * Kept rendering after `open` flips to false so the panel can animate out.
33
+ * Without it `render()` would return `nothing` and the exit would be instant.
34
+ */
35
+ private _closing;
36
+ /**
37
+ * Set once the enter animation has finished so the resting panel can drop its
38
+ * `transform`. `animation-fill-mode: both` otherwise keeps the final keyframe
39
+ * applied forever, and a transformed element becomes the containing block for
40
+ * its `position: fixed` descendants — which silently relocates every floating
41
+ * layer inside the dialog (combobox dropdowns, menus) because their
42
+ * viewport-based coordinates are suddenly resolved against the panel.
43
+ */
44
+ private _settled;
45
+ private _exitTimer;
31
46
  /** Element focused before the dialog opened, restored on close. */
32
47
  private _previouslyFocused;
33
48
  /** Body `overflow` value to put back when the scroll lock is released. */
@@ -36,6 +51,7 @@ export declare class RekeDialog extends RekeElement {
36
51
  private _handleKeydown;
37
52
  connectedCallback(): void;
38
53
  disconnectedCallback(): void;
54
+ protected willUpdate(changed: PropertyValues<this>): void;
39
55
  protected updated(changed: PropertyValues<this>): void;
40
56
  show(): void;
41
57
  close(): void;
@@ -48,6 +64,9 @@ export declare class RekeDialog extends RekeElement {
48
64
  private getSlottedFocusable;
49
65
  private handleOpened;
50
66
  private handleClosed;
67
+ private startExit;
68
+ private cancelExit;
69
+ private handleExitAnimationEnd;
51
70
  private lockScroll;
52
71
  private releaseScrollLock;
53
72
  render(): import("lit-html").TemplateResult<1> | typeof nothing;
@@ -1 +1 @@
1
- {"version":3,"file":"reke-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/reke-dialog/reke-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC/C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAW9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,UAAW,SAAQ,WAAW;IACzC,OAAgB,MAAM,4BAAU;IAGhC,IAAI,UAAS;IAGb,OAAO,SAAM;IAGb,OAAO,EAAE,aAAa,CAAW;IAEjC,kEAAkE;IAElE,QAAQ,EAAE,cAAc,CAAW;IAEnC,mEAAmE;IACnE,OAAO,CAAC,kBAAkB,CAA4B;IAEtD,0EAA0E;IAC1E,OAAO,CAAC,qBAAqB,CAAM;IACnC,OAAO,CAAC,aAAa,CAAS;IAE9B,OAAO,CAAC,cAAc,CAiCpB;IAEO,iBAAiB;IAKjB,oBAAoB;cAOV,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC;IAUxD,IAAI;IAIJ,KAAK;IAKL,OAAO,CAAC,QAAQ;IAIhB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,iBAAiB;IAMhB,MAAM;CAqDhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
1
+ {"version":3,"file":"reke-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/reke-dialog/reke-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC/C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAsB9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,UAAW,SAAQ,WAAW;IACzC,OAAgB,MAAM,4BAAU;IAGhC,IAAI,UAAS;IAGb,OAAO,SAAM;IAGb,OAAO,EAAE,aAAa,CAAW;IAEjC,kEAAkE;IAElE,QAAQ,EAAE,cAAc,CAAW;IAEnC;;;OAGG;IAEH,OAAO,CAAC,QAAQ,CAAS;IAEzB;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO,CAAC,UAAU,CAA8C;IAEhE,mEAAmE;IACnE,OAAO,CAAC,kBAAkB,CAA4B;IAEtD,0EAA0E;IAC1E,OAAO,CAAC,qBAAqB,CAAM;IACnC,OAAO,CAAC,aAAa,CAAS;IAE9B,OAAO,CAAC,cAAc,CAiCpB;IAEO,iBAAiB;IAKjB,oBAAoB;cAQV,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC;cAQxC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC;IAcxD,IAAI;IAIJ,KAAK;IAKL,OAAO,CAAC,QAAQ;IAIhB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,sBAAsB,CAY5B;IAEF,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,iBAAiB;IAMhB,MAAM;CAyDhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
@@ -2,19 +2,23 @@ import { RekeElement as e } from "../../shared/base-element.js";
2
2
  import { __decorate as t } from "../../_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js";
3
3
  import { styles as n } from "./reke-dialog.styles.js";
4
4
  import { html as r, nothing as i } from "lit";
5
- import { customElement as a, property as o } from "lit/decorators.js";
6
- import { classMap as s } from "lit/directives/class-map.js";
5
+ import { customElement as a, property as o, state as s } from "lit/decorators.js";
6
+ import { classMap as c } from "lit/directives/class-map.js";
7
7
  //#region src/components/reke-dialog/reke-dialog.ts
8
- var c = [
8
+ var l = [
9
9
  "a[href]",
10
10
  "button:not([disabled])",
11
11
  "input:not([disabled])",
12
12
  "select:not([disabled])",
13
13
  "textarea:not([disabled])",
14
14
  "[tabindex]:not([tabindex=\"-1\"])"
15
- ].join(","), l = class extends e {
15
+ ].join(","), u = 400;
16
+ function d() {
17
+ return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
18
+ }
19
+ var f = class extends e {
16
20
  constructor(...e) {
17
- super(...e), this.open = !1, this.heading = "", this.variant = "modal", this.position = "right", this._previouslyFocused = null, this._previousBodyOverflow = "", this._scrollLocked = !1, this._handleKeydown = (e) => {
21
+ super(...e), this.open = !1, this.heading = "", this.variant = "modal", this.position = "right", this._closing = !1, this._settled = !1, this._exitTimer = null, this._previouslyFocused = null, this._previousBodyOverflow = "", this._scrollLocked = !1, this._handleKeydown = (e) => {
18
22
  if (!this.open) return;
19
23
  if (e.key === "Escape") {
20
24
  this.close();
@@ -28,6 +32,14 @@ var c = [
28
32
  }
29
33
  let n = this.shadowRoot?.activeElement ?? document.activeElement, r = n ? t.indexOf(n) : -1;
30
34
  e.shiftKey ? r <= 0 && (e.preventDefault(), t[t.length - 1].focus()) : (r === -1 || r === t.length - 1) && (e.preventDefault(), t[0].focus());
35
+ }, this.handleExitAnimationEnd = (e) => {
36
+ if (e.target === e.currentTarget) {
37
+ if (this._closing) {
38
+ this.cancelExit();
39
+ return;
40
+ }
41
+ this._settled || (this._settled = !0, this.requestUpdate());
42
+ }
31
43
  };
32
44
  }
33
45
  static {
@@ -37,10 +49,13 @@ var c = [
37
49
  super.connectedCallback(), document.addEventListener("keydown", this._handleKeydown);
38
50
  }
39
51
  disconnectedCallback() {
40
- super.disconnectedCallback(), document.removeEventListener("keydown", this._handleKeydown), this.releaseScrollLock();
52
+ super.disconnectedCallback(), document.removeEventListener("keydown", this._handleKeydown), this.releaseScrollLock(), this.cancelExit();
53
+ }
54
+ willUpdate(e) {
55
+ e.has("open") && this.open && (this._settled = !1);
41
56
  }
42
57
  updated(e) {
43
- e.has("open") && (this.open ? this.handleOpened() : e.get("open") === !0 && this.handleClosed());
58
+ e.has("open") && (this.open ? (this.cancelExit(), this.handleOpened()) : e.get("open") === !0 && (this.handleClosed(), this.startExit()));
44
59
  }
45
60
  show() {
46
61
  this.open = !0;
@@ -63,7 +78,7 @@ var c = [
63
78
  let t = e ? `slot[name="${e}"]` : "slot:not([name])", n = this.shadowRoot?.querySelector(t);
64
79
  if (!n) return [];
65
80
  let r = [];
66
- for (let e of n.assignedElements()) e instanceof HTMLElement && (e.matches(c) && r.push(e), r.push(...e.querySelectorAll(c)));
81
+ for (let e of n.assignedElements()) e instanceof HTMLElement && (e.matches(l) && r.push(e), r.push(...e.querySelectorAll(l)));
67
82
  return r;
68
83
  }
69
84
  handleOpened() {
@@ -74,6 +89,12 @@ var c = [
74
89
  let e = this._previouslyFocused;
75
90
  this._previouslyFocused = null, e?.focus();
76
91
  }
92
+ startExit() {
93
+ d() || (this._closing = !0, this._exitTimer = setTimeout(() => this.cancelExit(), u));
94
+ }
95
+ cancelExit() {
96
+ this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null), this._closing = !1;
97
+ }
77
98
  lockScroll() {
78
99
  this._scrollLocked ||= (this._previousBodyOverflow = document.body.style.overflow, document.body.style.overflow = "hidden", !0);
79
100
  }
@@ -81,25 +102,29 @@ var c = [
81
102
  this._scrollLocked &&= (document.body.style.overflow = this._previousBodyOverflow, !1);
82
103
  }
83
104
  render() {
84
- if (!this.open) return i;
105
+ if (!this.open && !this._closing) return i;
85
106
  let e = this.variant === "drawer", t = {
86
107
  backdrop: !0,
87
108
  "backdrop--drawer": e,
88
- [`backdrop--${this.position}`]: e
109
+ [`backdrop--${this.position}`]: e,
110
+ "is-closing": this._closing
89
111
  }, n = {
90
112
  dialog: !e,
91
113
  drawer: e,
92
- [`drawer--${this.position}`]: e
114
+ [`drawer--${this.position}`]: e,
115
+ "is-closing": this._closing,
116
+ "is-settled": this._settled && !this._closing
93
117
  };
94
118
  return r`
95
- <div class=${s(t)} @click=${this.close}>
119
+ <div class=${c(t)} @click=${this.close}>
96
120
  <div
97
- class=${s(n)}
121
+ class=${c(n)}
98
122
  role="dialog"
99
123
  aria-modal="true"
100
124
  aria-label=${this.heading}
101
125
  tabindex="-1"
102
126
  @click=${(e) => e.stopPropagation()}
127
+ @animationend=${this.handleExitAnimationEnd}
103
128
  >
104
129
  ${this.heading ? r`
105
130
  <div class="dialog-header">
@@ -127,6 +152,6 @@ var c = [
127
152
  t([o({
128
153
  type: Boolean,
129
154
  reflect: !0
130
- })], l.prototype, "open", void 0), t([o()], l.prototype, "heading", void 0), t([o({ reflect: !0 })], l.prototype, "variant", void 0), t([o({ reflect: !0 })], l.prototype, "position", void 0), l = t([a("reke-dialog")], l);
155
+ })], f.prototype, "open", void 0), t([o()], f.prototype, "heading", void 0), t([o({ reflect: !0 })], f.prototype, "variant", void 0), t([o({ reflect: !0 })], f.prototype, "position", void 0), t([s()], f.prototype, "_closing", void 0), f = t([a("reke-dialog")], f);
131
156
  //#endregion
132
- export { l as RekeDialog };
157
+ export { f as RekeDialog };
@@ -1 +1 @@
1
- {"version":3,"file":"reke-dialog.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-dialog/reke-dialog.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,2BAiIlB,CAAC"}
1
+ {"version":3,"file":"reke-dialog.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-dialog/reke-dialog.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,2BA+OlB,CAAC"}