reke-ui 0.5.1 → 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.
- package/custom-elements.json +389 -4
- package/dist/components/reke-dialog/reke-dialog.d.ts +41 -1
- package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.js +93 -13
- package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.styles.js +110 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +52 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.js +181 -42
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +47 -0
- package/dist/react.d.ts +5 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +59 -53
- package/dist/shared/tailwind.js +1 -1
- package/dist/tokens/reke-tokens.css +1 -0
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -2117,6 +2117,64 @@
|
|
|
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
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
"kind": "field",
|
|
2151
|
+
"name": "_previouslyFocused",
|
|
2152
|
+
"type": {
|
|
2153
|
+
"text": "HTMLElement | null"
|
|
2154
|
+
},
|
|
2155
|
+
"privacy": "private",
|
|
2156
|
+
"default": "null",
|
|
2157
|
+
"description": "Element focused before the dialog opened, restored on close."
|
|
2158
|
+
},
|
|
2159
|
+
{
|
|
2160
|
+
"kind": "field",
|
|
2161
|
+
"name": "_previousBodyOverflow",
|
|
2162
|
+
"type": {
|
|
2163
|
+
"text": "string"
|
|
2164
|
+
},
|
|
2165
|
+
"privacy": "private",
|
|
2166
|
+
"default": "''",
|
|
2167
|
+
"description": "Body `overflow` value to put back when the scroll lock is released."
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
"kind": "field",
|
|
2171
|
+
"name": "_scrollLocked",
|
|
2172
|
+
"type": {
|
|
2173
|
+
"text": "boolean"
|
|
2174
|
+
},
|
|
2175
|
+
"privacy": "private",
|
|
2176
|
+
"default": "false"
|
|
2177
|
+
},
|
|
2120
2178
|
{
|
|
2121
2179
|
"kind": "field",
|
|
2122
2180
|
"name": "_handleKeydown",
|
|
@@ -2129,6 +2187,81 @@
|
|
|
2129
2187
|
{
|
|
2130
2188
|
"kind": "method",
|
|
2131
2189
|
"name": "close"
|
|
2190
|
+
},
|
|
2191
|
+
{
|
|
2192
|
+
"kind": "method",
|
|
2193
|
+
"name": "getPanel",
|
|
2194
|
+
"privacy": "private",
|
|
2195
|
+
"return": {
|
|
2196
|
+
"type": {
|
|
2197
|
+
"text": "HTMLElement | null"
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
"kind": "method",
|
|
2203
|
+
"name": "getFocusableElements",
|
|
2204
|
+
"privacy": "private",
|
|
2205
|
+
"return": {
|
|
2206
|
+
"type": {
|
|
2207
|
+
"text": "HTMLElement[]"
|
|
2208
|
+
}
|
|
2209
|
+
},
|
|
2210
|
+
"description": "Focusable descendants in tab order: the shadow close button first, then\nthe default slot, then the footer slot — matching how the panel reads."
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
"kind": "method",
|
|
2214
|
+
"name": "getSlottedFocusable",
|
|
2215
|
+
"privacy": "private",
|
|
2216
|
+
"return": {
|
|
2217
|
+
"type": {
|
|
2218
|
+
"text": "HTMLElement[]"
|
|
2219
|
+
}
|
|
2220
|
+
},
|
|
2221
|
+
"parameters": [
|
|
2222
|
+
{
|
|
2223
|
+
"name": "name",
|
|
2224
|
+
"optional": true,
|
|
2225
|
+
"type": {
|
|
2226
|
+
"text": "string"
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2229
|
+
]
|
|
2230
|
+
},
|
|
2231
|
+
{
|
|
2232
|
+
"kind": "method",
|
|
2233
|
+
"name": "handleOpened",
|
|
2234
|
+
"privacy": "private"
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
"kind": "method",
|
|
2238
|
+
"name": "handleClosed",
|
|
2239
|
+
"privacy": "private"
|
|
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
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
"kind": "method",
|
|
2258
|
+
"name": "lockScroll",
|
|
2259
|
+
"privacy": "private"
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
"kind": "method",
|
|
2263
|
+
"name": "releaseScrollLock",
|
|
2264
|
+
"privacy": "private"
|
|
2132
2265
|
}
|
|
2133
2266
|
],
|
|
2134
2267
|
"events": [
|
|
@@ -2178,7 +2311,7 @@
|
|
|
2178
2311
|
},
|
|
2179
2312
|
"tagName": "reke-dialog",
|
|
2180
2313
|
"customElement": true,
|
|
2181
|
-
"summary": "A dialog component with modal and drawer variants."
|
|
2314
|
+
"summary": "A dialog component with modal and drawer variants.\n\nImplements the ARIA dialog pattern: while open it takes focus, keeps Tab\ncycling inside the panel, restores focus to whatever opened it, and locks\nbody scroll."
|
|
2182
2315
|
}
|
|
2183
2316
|
],
|
|
2184
2317
|
"exports": [
|
|
@@ -3252,15 +3385,69 @@
|
|
|
3252
3385
|
"name": "RekePieChart",
|
|
3253
3386
|
"cssProperties": [
|
|
3254
3387
|
{
|
|
3255
|
-
"description": "
|
|
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.",
|
|
3256
3399
|
"name": "--reke-color-primary",
|
|
3257
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"
|
|
3258
3441
|
}
|
|
3259
3442
|
],
|
|
3260
3443
|
"cssParts": [
|
|
3261
3444
|
{
|
|
3262
3445
|
"description": "The chart canvas container.",
|
|
3263
3446
|
"name": "chart"
|
|
3447
|
+
},
|
|
3448
|
+
{
|
|
3449
|
+
"description": "The donut center overlay (total, or the hovered slice).",
|
|
3450
|
+
"name": "center"
|
|
3264
3451
|
}
|
|
3265
3452
|
],
|
|
3266
3453
|
"members": [
|
|
@@ -3333,6 +3520,37 @@
|
|
|
3333
3520
|
},
|
|
3334
3521
|
"description": "Explicit color palette. Overrides the `--reke-chart-*` tokens when set."
|
|
3335
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
|
+
},
|
|
3336
3554
|
{
|
|
3337
3555
|
"kind": "field",
|
|
3338
3556
|
"name": "chart",
|
|
@@ -3349,6 +3567,56 @@
|
|
|
3349
3567
|
},
|
|
3350
3568
|
"privacy": "private"
|
|
3351
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
|
+
},
|
|
3352
3620
|
{
|
|
3353
3621
|
"kind": "method",
|
|
3354
3622
|
"name": "readToken",
|
|
@@ -3374,6 +3642,17 @@
|
|
|
3374
3642
|
],
|
|
3375
3643
|
"description": "Read a CSS custom property off the host's computed style (canvas can't read var())."
|
|
3376
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
|
+
},
|
|
3377
3656
|
{
|
|
3378
3657
|
"kind": "method",
|
|
3379
3658
|
"name": "resolvePalette",
|
|
@@ -3384,6 +3663,54 @@
|
|
|
3384
3663
|
}
|
|
3385
3664
|
}
|
|
3386
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
|
+
},
|
|
3387
3714
|
{
|
|
3388
3715
|
"kind": "method",
|
|
3389
3716
|
"name": "applyLoading",
|
|
@@ -3403,6 +3730,24 @@
|
|
|
3403
3730
|
"privacy": "private",
|
|
3404
3731
|
"readonly": true
|
|
3405
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
|
+
},
|
|
3406
3751
|
{
|
|
3407
3752
|
"kind": "field",
|
|
3408
3753
|
"name": "chartAriaLabel",
|
|
@@ -3420,7 +3765,20 @@
|
|
|
3420
3765
|
"type": {
|
|
3421
3766
|
"text": "ChartOption"
|
|
3422
3767
|
}
|
|
3423
|
-
}
|
|
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"
|
|
3424
3782
|
}
|
|
3425
3783
|
],
|
|
3426
3784
|
"events": [
|
|
@@ -3473,6 +3831,33 @@
|
|
|
3473
3831
|
"default": "false",
|
|
3474
3832
|
"description": "Show ECharts' native loading spinner (skeleton) over the chart.",
|
|
3475
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"
|
|
3476
3861
|
}
|
|
3477
3862
|
],
|
|
3478
3863
|
"superclass": {
|
|
@@ -3481,7 +3866,7 @@
|
|
|
3481
3866
|
},
|
|
3482
3867
|
"tagName": "reke-pie-chart",
|
|
3483
3868
|
"customElement": true,
|
|
3484
|
-
"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."
|
|
3485
3870
|
}
|
|
3486
3871
|
],
|
|
3487
3872
|
"exports": [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nothing } from 'lit';
|
|
1
|
+
import { nothing, type PropertyValues } from 'lit';
|
|
2
2
|
import { RekeElement } from '../../shared/base-element.js';
|
|
3
3
|
export type DialogVariant = 'modal' | 'drawer';
|
|
4
4
|
export type DrawerPosition = 'right' | 'left';
|
|
@@ -6,6 +6,10 @@ export type DrawerPosition = 'right' | 'left';
|
|
|
6
6
|
* @tag reke-dialog
|
|
7
7
|
* @summary A dialog component with modal and drawer variants.
|
|
8
8
|
*
|
|
9
|
+
* Implements the ARIA dialog pattern: while open it takes focus, keeps Tab
|
|
10
|
+
* cycling inside the panel, restores focus to whatever opened it, and locks
|
|
11
|
+
* body scroll.
|
|
12
|
+
*
|
|
9
13
|
* @slot - Default slot for dialog body content.
|
|
10
14
|
* @slot footer - Slot for action buttons.
|
|
11
15
|
*
|
|
@@ -24,11 +28,47 @@ export declare class RekeDialog extends RekeElement {
|
|
|
24
28
|
variant: DialogVariant;
|
|
25
29
|
/** Drawer slide direction. Only applies when variant="drawer". */
|
|
26
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;
|
|
46
|
+
/** Element focused before the dialog opened, restored on close. */
|
|
47
|
+
private _previouslyFocused;
|
|
48
|
+
/** Body `overflow` value to put back when the scroll lock is released. */
|
|
49
|
+
private _previousBodyOverflow;
|
|
50
|
+
private _scrollLocked;
|
|
27
51
|
private _handleKeydown;
|
|
28
52
|
connectedCallback(): void;
|
|
29
53
|
disconnectedCallback(): void;
|
|
54
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
55
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
30
56
|
show(): void;
|
|
31
57
|
close(): void;
|
|
58
|
+
private getPanel;
|
|
59
|
+
/**
|
|
60
|
+
* Focusable descendants in tab order: the shadow close button first, then
|
|
61
|
+
* the default slot, then the footer slot — matching how the panel reads.
|
|
62
|
+
*/
|
|
63
|
+
private getFocusableElements;
|
|
64
|
+
private getSlottedFocusable;
|
|
65
|
+
private handleOpened;
|
|
66
|
+
private handleClosed;
|
|
67
|
+
private startExit;
|
|
68
|
+
private cancelExit;
|
|
69
|
+
private handleExitAnimationEnd;
|
|
70
|
+
private lockScroll;
|
|
71
|
+
private releaseScrollLock;
|
|
32
72
|
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
33
73
|
}
|
|
34
74
|
declare global {
|
|
@@ -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,MAAM,KAAK,CAAC;
|
|
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"}
|