rei-kit 2.18.1 → 2.19.0
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 +4 -4
- package/dist/{BaseListbox-BnaHlmMN.js → BaseListbox-Btibgnaf.js} +48 -2
- package/dist/BaseListbox-Btibgnaf.js.map +1 -0
- package/dist/components/CodeBlock.vue.d.ts +57 -0
- package/dist/composables/use-dialog-shell.d.ts +11 -0
- package/dist/composables/use-menu-keys.d.ts +26 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +206 -183
- package/dist/index.js.map +1 -1
- package/dist/styles.css +312 -33
- package/dist/web/BaseContextMenu.vue.d.ts +77 -0
- package/dist/web/BaseDrawer.vue.d.ts +68 -0
- package/dist/web/BaseHoverCard.vue.d.ts +67 -0
- package/dist/web/index.d.ts +15 -0
- package/dist/web.js +397 -106
- package/dist/web.js.map +1 -1
- package/package.json +2 -2
- package/dist/BaseListbox-BnaHlmMN.js.map +0 -1
package/dist/styles.css
CHANGED
|
@@ -345,19 +345,19 @@
|
|
|
345
345
|
height: 65%;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
.rk-menu[data-v-
|
|
348
|
+
.rk-menu[data-v-ee62de72] {
|
|
349
349
|
position: relative;
|
|
350
350
|
display: inline-flex;
|
|
351
351
|
}
|
|
352
|
-
.rk-menu-trigger[data-v-
|
|
352
|
+
.rk-menu-trigger[data-v-ee62de72] {
|
|
353
353
|
display: inline-flex;
|
|
354
354
|
border-radius: var(--radius-cell);
|
|
355
355
|
}
|
|
356
|
-
.rk-menu-trigger[data-v-
|
|
356
|
+
.rk-menu-trigger[data-v-ee62de72]:focus-visible {
|
|
357
357
|
outline: 2px solid var(--color-primary);
|
|
358
358
|
outline-offset: 2px;
|
|
359
359
|
}
|
|
360
|
-
.rk-menu-panel[data-v-
|
|
360
|
+
.rk-menu-panel[data-v-ee62de72] {
|
|
361
361
|
position: absolute;
|
|
362
362
|
top: calc(100% + 0.5rem);
|
|
363
363
|
z-index: 50;
|
|
@@ -366,16 +366,16 @@
|
|
|
366
366
|
border-radius: var(--radius-card);
|
|
367
367
|
padding: 0.375rem;
|
|
368
368
|
}
|
|
369
|
-
.rk-menu-panel.is-end[data-v-
|
|
369
|
+
.rk-menu-panel.is-end[data-v-ee62de72] {
|
|
370
370
|
right: 0;
|
|
371
371
|
}
|
|
372
|
-
.rk-menu-panel.is-start[data-v-
|
|
372
|
+
.rk-menu-panel.is-start[data-v-ee62de72] {
|
|
373
373
|
left: 0;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
/* The items belong to the caller, so this styles them by role rather than by
|
|
377
377
|
class: whatever they render, it lines up. */
|
|
378
|
-
.rk-menu-panel[data-v-
|
|
378
|
+
.rk-menu-panel[data-v-ee62de72] [role='menuitem'] {
|
|
379
379
|
display: block;
|
|
380
380
|
width: 100%;
|
|
381
381
|
border-radius: var(--radius-cell);
|
|
@@ -385,14 +385,14 @@
|
|
|
385
385
|
color: var(--color-ink);
|
|
386
386
|
transition: background-color var(--duration-fast);
|
|
387
387
|
}
|
|
388
|
-
.rk-menu-panel[data-v-
|
|
388
|
+
.rk-menu-panel[data-v-ee62de72] [role='menuitem']:hover {
|
|
389
389
|
background: var(--color-muted);
|
|
390
390
|
}
|
|
391
|
-
.rk-menu-panel[data-v-
|
|
391
|
+
.rk-menu-panel[data-v-ee62de72] [role='menuitem']:focus-visible {
|
|
392
392
|
outline: 2px solid var(--color-primary);
|
|
393
393
|
outline-offset: -2px;
|
|
394
394
|
}
|
|
395
|
-
.rk-menu-panel[data-v-
|
|
395
|
+
.rk-menu-panel[data-v-ee62de72] hr {
|
|
396
396
|
margin: 0.375rem 0;
|
|
397
397
|
height: 1px;
|
|
398
398
|
border: 0;
|
|
@@ -1582,6 +1582,53 @@ to {
|
|
|
1582
1582
|
padding: 0;
|
|
1583
1583
|
}
|
|
1584
1584
|
|
|
1585
|
+
.rk-code[data-v-b45043be] {
|
|
1586
|
+
position: relative;
|
|
1587
|
+
overflow: hidden;
|
|
1588
|
+
border: 1px solid var(--color-hair);
|
|
1589
|
+
border-radius: var(--radius-card);
|
|
1590
|
+
background: color-mix(in oklab, var(--color-muted) 50%, transparent);
|
|
1591
|
+
}
|
|
1592
|
+
.rk-code-bar[data-v-b45043be] {
|
|
1593
|
+
display: flex;
|
|
1594
|
+
align-items: center;
|
|
1595
|
+
justify-content: space-between;
|
|
1596
|
+
gap: 0.5rem;
|
|
1597
|
+
padding: 0.375rem 0.5rem 0.375rem 1rem;
|
|
1598
|
+
border-block-end: 1px solid var(--color-hair);
|
|
1599
|
+
color: var(--color-ink-soft);
|
|
1600
|
+
font-size: 0.75rem;
|
|
1601
|
+
}
|
|
1602
|
+
.rk-code-lang[data-v-b45043be] {
|
|
1603
|
+
font-family: ui-monospace, monospace;
|
|
1604
|
+
letter-spacing: 0.04em;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
/* Pushes the button to the end when there is no language beside it. */
|
|
1608
|
+
.rk-code-copy[data-v-b45043be] {
|
|
1609
|
+
margin-inline-start: auto;
|
|
1610
|
+
}
|
|
1611
|
+
.rk-code-pre[data-v-b45043be] {
|
|
1612
|
+
margin: 0;
|
|
1613
|
+
overflow-x: auto;
|
|
1614
|
+
padding: 1rem 1.25rem;
|
|
1615
|
+
color: var(--color-ink);
|
|
1616
|
+
font-size: 0.875rem;
|
|
1617
|
+
line-height: 1.75;
|
|
1618
|
+
}
|
|
1619
|
+
.rk-code-pre[data-v-b45043be]:focus-visible {
|
|
1620
|
+
outline: 2px solid var(--color-primary);
|
|
1621
|
+
outline-offset: -2px;
|
|
1622
|
+
}
|
|
1623
|
+
.is-wrapped .rk-code-pre[data-v-b45043be] {
|
|
1624
|
+
overflow-x: visible;
|
|
1625
|
+
white-space: pre-wrap;
|
|
1626
|
+
word-break: break-word;
|
|
1627
|
+
}
|
|
1628
|
+
.rk-code-pre code[data-v-b45043be] {
|
|
1629
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1585
1632
|
.rk-dl[data-v-831e205b] {
|
|
1586
1633
|
display: grid;
|
|
1587
1634
|
gap: 0.75rem;
|
|
@@ -2613,6 +2660,57 @@ to {
|
|
|
2613
2660
|
color: var(--color-hair);
|
|
2614
2661
|
}
|
|
2615
2662
|
|
|
2663
|
+
.rk-ctx-area[data-v-4888e5a2] {
|
|
2664
|
+
/*
|
|
2665
|
+
* A real box, not `display: contents`.
|
|
2666
|
+
*
|
|
2667
|
+
* `contents` would have kept the app's layout untouched, and it also
|
|
2668
|
+
* drops the element from the accessibility tree in some browsers --
|
|
2669
|
+
* taking `aria-haspopup` with it, silently. So this renders a plain
|
|
2670
|
+
* block, and the class is the app's to change.
|
|
2671
|
+
*/
|
|
2672
|
+
display: block;
|
|
2673
|
+
}
|
|
2674
|
+
.rk-ctx-panel[data-v-4888e5a2] {
|
|
2675
|
+
position: fixed;
|
|
2676
|
+
z-index: 60;
|
|
2677
|
+
min-width: 11rem;
|
|
2678
|
+
padding: 0.25rem;
|
|
2679
|
+
border-radius: var(--radius-card);
|
|
2680
|
+
box-shadow: var(--shadow-overlay);
|
|
2681
|
+
}
|
|
2682
|
+
|
|
2683
|
+
/* Unscoped: the items come from the app's slot, so a scoped rule would not
|
|
2684
|
+
reach them. Named off the panel rather than on their own, so this cannot
|
|
2685
|
+
paint a menu item somewhere else on the page. */
|
|
2686
|
+
.rk-ctx-panel [role='menuitem'] {
|
|
2687
|
+
display: flex;
|
|
2688
|
+
width: 100%;
|
|
2689
|
+
align-items: center;
|
|
2690
|
+
gap: 0.5rem;
|
|
2691
|
+
border-radius: var(--radius-cell);
|
|
2692
|
+
padding: 0.5rem 0.625rem;
|
|
2693
|
+
text-align: start;
|
|
2694
|
+
font-size: 0.875rem;
|
|
2695
|
+
color: var(--color-ink);
|
|
2696
|
+
}
|
|
2697
|
+
.rk-ctx-panel [role='menuitem']:hover:not(:disabled),
|
|
2698
|
+
.rk-ctx-panel [role='menuitem']:focus-visible {
|
|
2699
|
+
background: var(--color-muted);
|
|
2700
|
+
}
|
|
2701
|
+
.rk-ctx-panel [role='menuitem']:focus-visible {
|
|
2702
|
+
outline: 2px solid var(--color-primary);
|
|
2703
|
+
outline-offset: -2px;
|
|
2704
|
+
}
|
|
2705
|
+
.rk-ctx-panel [role='menuitem']:disabled {
|
|
2706
|
+
opacity: 0.45;
|
|
2707
|
+
}
|
|
2708
|
+
.rk-ctx-panel hr {
|
|
2709
|
+
margin: 0.25rem 0;
|
|
2710
|
+
border: 0;
|
|
2711
|
+
border-block-start: 1px solid var(--color-hair);
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2616
2714
|
.rk-disclosure-control[data-v-ad5c09f5] {
|
|
2617
2715
|
display: flex;
|
|
2618
2716
|
width: 100%;
|
|
@@ -2690,7 +2788,188 @@ to {
|
|
|
2690
2788
|
}
|
|
2691
2789
|
}
|
|
2692
2790
|
|
|
2693
|
-
.rk-
|
|
2791
|
+
.rk-hovercard[data-v-70c09916] {
|
|
2792
|
+
position: relative;
|
|
2793
|
+
display: inline-flex;
|
|
2794
|
+
}
|
|
2795
|
+
.rk-hovercard-panel[data-v-70c09916] {
|
|
2796
|
+
position: absolute;
|
|
2797
|
+
z-index: 40;
|
|
2798
|
+
inset-inline-start: 0;
|
|
2799
|
+
width: max-content;
|
|
2800
|
+
max-width: 20rem;
|
|
2801
|
+
padding: 0.875rem 1rem;
|
|
2802
|
+
border-radius: var(--radius-card);
|
|
2803
|
+
box-shadow: var(--shadow-overlay);
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2806
|
+
/*
|
|
2807
|
+
* The card sits a little off the trigger, and the gap is bridged.
|
|
2808
|
+
*
|
|
2809
|
+
* Crossing that gap leaves the trigger without yet entering the card, which
|
|
2810
|
+
* starts the close. `closeDelay` already covers a pointer moving at any
|
|
2811
|
+
* normal speed, but the bridge means the pointer never actually leaves:
|
|
2812
|
+
* a transparent strip, part of the panel, fills the space. Belt and braces,
|
|
2813
|
+
* because the failure it prevents -- a card whose contents cannot be
|
|
2814
|
+
* reached -- is total rather than cosmetic.
|
|
2815
|
+
*/
|
|
2816
|
+
.rk-hovercard-panel[data-v-70c09916]::before {
|
|
2817
|
+
content: '';
|
|
2818
|
+
position: absolute;
|
|
2819
|
+
inset-inline: 0;
|
|
2820
|
+
height: 0.5rem;
|
|
2821
|
+
}
|
|
2822
|
+
.rk-hovercard-panel.is-bottom[data-v-70c09916]::before {
|
|
2823
|
+
top: -0.5rem;
|
|
2824
|
+
}
|
|
2825
|
+
.rk-hovercard-panel.is-top[data-v-70c09916]::before {
|
|
2826
|
+
bottom: -0.5rem;
|
|
2827
|
+
}
|
|
2828
|
+
.rk-hovercard-panel.is-bottom[data-v-70c09916] {
|
|
2829
|
+
top: 100%;
|
|
2830
|
+
margin-block-start: 0.5rem;
|
|
2831
|
+
}
|
|
2832
|
+
.rk-hovercard-panel.is-top[data-v-70c09916] {
|
|
2833
|
+
bottom: 100%;
|
|
2834
|
+
margin-block-end: 0.5rem;
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
.rk-drawer-scrim[data-v-de2cccb9] {
|
|
2838
|
+
position: fixed;
|
|
2839
|
+
inset: 0;
|
|
2840
|
+
z-index: 50;
|
|
2841
|
+
display: flex;
|
|
2842
|
+
}
|
|
2843
|
+
.rk-drawer-veil[data-v-de2cccb9] {
|
|
2844
|
+
position: absolute;
|
|
2845
|
+
inset: 0;
|
|
2846
|
+
background: color-mix(in oklab, var(--color-ink) 45%, transparent);
|
|
2847
|
+
backdrop-filter: blur(2px);
|
|
2848
|
+
}
|
|
2849
|
+
.rk-drawer-panel[data-v-de2cccb9] {
|
|
2850
|
+
position: relative;
|
|
2851
|
+
display: flex;
|
|
2852
|
+
flex-direction: column;
|
|
2853
|
+
max-width: 100%;
|
|
2854
|
+
max-height: 100%;
|
|
2855
|
+
outline: none;
|
|
2856
|
+
box-shadow: var(--shadow-overlay);
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
/* Logical, so the writing direction decides which edge this is. */
|
|
2860
|
+
.rk-drawer-panel.is-start[data-v-de2cccb9] {
|
|
2861
|
+
margin-inline-end: auto;
|
|
2862
|
+
height: 100%;
|
|
2863
|
+
border-start-end-radius: var(--radius-card);
|
|
2864
|
+
border-end-end-radius: var(--radius-card);
|
|
2865
|
+
}
|
|
2866
|
+
.rk-drawer-panel.is-end[data-v-de2cccb9] {
|
|
2867
|
+
margin-inline-start: auto;
|
|
2868
|
+
height: 100%;
|
|
2869
|
+
border-start-start-radius: var(--radius-card);
|
|
2870
|
+
border-end-start-radius: var(--radius-card);
|
|
2871
|
+
}
|
|
2872
|
+
.rk-drawer-panel.is-top[data-v-de2cccb9] {
|
|
2873
|
+
margin-block-end: auto;
|
|
2874
|
+
width: 100%;
|
|
2875
|
+
border-end-start-radius: var(--radius-card);
|
|
2876
|
+
border-end-end-radius: var(--radius-card);
|
|
2877
|
+
}
|
|
2878
|
+
.rk-drawer-panel.is-bottom[data-v-de2cccb9] {
|
|
2879
|
+
margin-block-start: auto;
|
|
2880
|
+
width: 100%;
|
|
2881
|
+
border-start-start-radius: var(--radius-card);
|
|
2882
|
+
border-start-end-radius: var(--radius-card);
|
|
2883
|
+
}
|
|
2884
|
+
.rk-drawer-head[data-v-de2cccb9] {
|
|
2885
|
+
display: flex;
|
|
2886
|
+
align-items: center;
|
|
2887
|
+
justify-content: space-between;
|
|
2888
|
+
gap: 1rem;
|
|
2889
|
+
padding: 1rem 1.25rem;
|
|
2890
|
+
border-block-end: 1px solid var(--color-hair);
|
|
2891
|
+
}
|
|
2892
|
+
.rk-drawer-title[data-v-de2cccb9] {
|
|
2893
|
+
font-size: 1rem;
|
|
2894
|
+
font-weight: 600;
|
|
2895
|
+
color: var(--color-ink);
|
|
2896
|
+
}
|
|
2897
|
+
.rk-drawer-body[data-v-de2cccb9] {
|
|
2898
|
+
flex: 1;
|
|
2899
|
+
overflow-y: auto;
|
|
2900
|
+
padding: 1.25rem;
|
|
2901
|
+
}
|
|
2902
|
+
.rk-drawer-actions[data-v-de2cccb9] {
|
|
2903
|
+
display: flex;
|
|
2904
|
+
justify-content: flex-end;
|
|
2905
|
+
gap: 0.5rem;
|
|
2906
|
+
padding: 1rem 1.25rem;
|
|
2907
|
+
border-block-start: 1px solid var(--color-hair);
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
/* One pair per edge: a drawer that slid in from the wrong side reads as a
|
|
2911
|
+
different component arriving. */
|
|
2912
|
+
.rk-drawer-start-enter-active[data-v-de2cccb9],
|
|
2913
|
+
.rk-drawer-start-leave-active[data-v-de2cccb9],
|
|
2914
|
+
.rk-drawer-end-enter-active[data-v-de2cccb9],
|
|
2915
|
+
.rk-drawer-end-leave-active[data-v-de2cccb9],
|
|
2916
|
+
.rk-drawer-top-enter-active[data-v-de2cccb9],
|
|
2917
|
+
.rk-drawer-top-leave-active[data-v-de2cccb9],
|
|
2918
|
+
.rk-drawer-bottom-enter-active[data-v-de2cccb9],
|
|
2919
|
+
.rk-drawer-bottom-leave-active[data-v-de2cccb9] {
|
|
2920
|
+
transition: opacity var(--duration-base) var(--ease-standard);
|
|
2921
|
+
}
|
|
2922
|
+
.rk-drawer-start-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2923
|
+
.rk-drawer-start-leave-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2924
|
+
.rk-drawer-end-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2925
|
+
.rk-drawer-end-leave-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2926
|
+
.rk-drawer-top-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2927
|
+
.rk-drawer-top-leave-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2928
|
+
.rk-drawer-bottom-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2929
|
+
.rk-drawer-bottom-leave-active .rk-drawer-panel[data-v-de2cccb9] {
|
|
2930
|
+
transition: transform var(--duration-base) var(--ease-sheet);
|
|
2931
|
+
}
|
|
2932
|
+
.rk-drawer-start-enter-from[data-v-de2cccb9],
|
|
2933
|
+
.rk-drawer-start-leave-to[data-v-de2cccb9],
|
|
2934
|
+
.rk-drawer-end-enter-from[data-v-de2cccb9],
|
|
2935
|
+
.rk-drawer-end-leave-to[data-v-de2cccb9],
|
|
2936
|
+
.rk-drawer-top-enter-from[data-v-de2cccb9],
|
|
2937
|
+
.rk-drawer-top-leave-to[data-v-de2cccb9],
|
|
2938
|
+
.rk-drawer-bottom-enter-from[data-v-de2cccb9],
|
|
2939
|
+
.rk-drawer-bottom-leave-to[data-v-de2cccb9] {
|
|
2940
|
+
opacity: 0;
|
|
2941
|
+
}
|
|
2942
|
+
.rk-drawer-start-enter-from .rk-drawer-panel[data-v-de2cccb9],
|
|
2943
|
+
.rk-drawer-start-leave-to .rk-drawer-panel[data-v-de2cccb9] {
|
|
2944
|
+
transform: translateX(-100%);
|
|
2945
|
+
}
|
|
2946
|
+
.rk-drawer-end-enter-from .rk-drawer-panel[data-v-de2cccb9],
|
|
2947
|
+
.rk-drawer-end-leave-to .rk-drawer-panel[data-v-de2cccb9] {
|
|
2948
|
+
transform: translateX(100%);
|
|
2949
|
+
}
|
|
2950
|
+
.rk-drawer-top-enter-from .rk-drawer-panel[data-v-de2cccb9],
|
|
2951
|
+
.rk-drawer-top-leave-to .rk-drawer-panel[data-v-de2cccb9] {
|
|
2952
|
+
transform: translateY(-100%);
|
|
2953
|
+
}
|
|
2954
|
+
.rk-drawer-bottom-enter-from .rk-drawer-panel[data-v-de2cccb9],
|
|
2955
|
+
.rk-drawer-bottom-leave-to .rk-drawer-panel[data-v-de2cccb9] {
|
|
2956
|
+
transform: translateY(100%);
|
|
2957
|
+
}
|
|
2958
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2959
|
+
.rk-drawer-start-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2960
|
+
.rk-drawer-start-leave-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2961
|
+
.rk-drawer-end-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2962
|
+
.rk-drawer-end-leave-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2963
|
+
.rk-drawer-top-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2964
|
+
.rk-drawer-top-leave-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2965
|
+
.rk-drawer-bottom-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2966
|
+
.rk-drawer-bottom-leave-active .rk-drawer-panel[data-v-de2cccb9] {
|
|
2967
|
+
transition: none;
|
|
2968
|
+
transform: none;
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
.rk-modal-scrim[data-v-92ea084c] {
|
|
2694
2973
|
position: fixed;
|
|
2695
2974
|
inset: 0;
|
|
2696
2975
|
z-index: 50;
|
|
@@ -2700,7 +2979,7 @@ to {
|
|
|
2700
2979
|
background: color-mix(in srgb, var(--color-ink) 70%, transparent);
|
|
2701
2980
|
backdrop-filter: blur(4px);
|
|
2702
2981
|
}
|
|
2703
|
-
.rk-modal-panel[data-v-
|
|
2982
|
+
.rk-modal-panel[data-v-92ea084c] {
|
|
2704
2983
|
width: 100%;
|
|
2705
2984
|
max-width: 28rem;
|
|
2706
2985
|
max-height: 85vh;
|
|
@@ -2708,21 +2987,21 @@ to {
|
|
|
2708
2987
|
border-radius: var(--radius-card);
|
|
2709
2988
|
padding: 1.5rem;
|
|
2710
2989
|
}
|
|
2711
|
-
.rk-modal-panel[data-v-
|
|
2990
|
+
.rk-modal-panel[data-v-92ea084c]:focus {
|
|
2712
2991
|
outline: none;
|
|
2713
2992
|
}
|
|
2714
|
-
.rk-modal-head[data-v-
|
|
2993
|
+
.rk-modal-head[data-v-92ea084c] {
|
|
2715
2994
|
display: flex;
|
|
2716
2995
|
align-items: flex-start;
|
|
2717
2996
|
justify-content: space-between;
|
|
2718
2997
|
gap: 1rem;
|
|
2719
2998
|
}
|
|
2720
|
-
.rk-modal-title[data-v-
|
|
2999
|
+
.rk-modal-title[data-v-92ea084c] {
|
|
2721
3000
|
font-size: 1.0625rem;
|
|
2722
3001
|
font-weight: 600;
|
|
2723
3002
|
color: var(--color-ink);
|
|
2724
3003
|
}
|
|
2725
|
-
.rk-modal-close[data-v-
|
|
3004
|
+
.rk-modal-close[data-v-92ea084c] {
|
|
2726
3005
|
display: grid;
|
|
2727
3006
|
place-items: center;
|
|
2728
3007
|
flex-shrink: 0;
|
|
@@ -2732,58 +3011,58 @@ to {
|
|
|
2732
3011
|
color: var(--color-ink-soft);
|
|
2733
3012
|
transition: background-color var(--duration-fast);
|
|
2734
3013
|
}
|
|
2735
|
-
.rk-modal-close[data-v-
|
|
3014
|
+
.rk-modal-close[data-v-92ea084c]:hover {
|
|
2736
3015
|
background: var(--color-muted);
|
|
2737
3016
|
}
|
|
2738
|
-
.rk-modal-close[data-v-
|
|
3017
|
+
.rk-modal-close[data-v-92ea084c]:focus-visible {
|
|
2739
3018
|
outline: 2px solid var(--color-primary);
|
|
2740
3019
|
outline-offset: 2px;
|
|
2741
3020
|
}
|
|
2742
|
-
.rk-modal-close svg[data-v-
|
|
3021
|
+
.rk-modal-close svg[data-v-92ea084c] {
|
|
2743
3022
|
width: 1rem;
|
|
2744
3023
|
height: 1rem;
|
|
2745
3024
|
}
|
|
2746
|
-
.rk-modal-body[data-v-
|
|
3025
|
+
.rk-modal-body[data-v-92ea084c] {
|
|
2747
3026
|
margin-top: 0.75rem;
|
|
2748
3027
|
color: var(--color-ink-soft);
|
|
2749
3028
|
font-size: 0.875rem;
|
|
2750
3029
|
line-height: 1.625;
|
|
2751
3030
|
}
|
|
2752
|
-
.rk-modal-actions[data-v-
|
|
3031
|
+
.rk-modal-actions[data-v-92ea084c] {
|
|
2753
3032
|
margin-top: 1.5rem;
|
|
2754
3033
|
display: flex;
|
|
2755
3034
|
justify-content: flex-end;
|
|
2756
3035
|
gap: 0.5rem;
|
|
2757
3036
|
}
|
|
2758
|
-
.rk-modal-enter-active[data-v-
|
|
2759
|
-
.rk-modal-leave-active[data-v-
|
|
3037
|
+
.rk-modal-enter-active[data-v-92ea084c],
|
|
3038
|
+
.rk-modal-leave-active[data-v-92ea084c] {
|
|
2760
3039
|
transition: opacity var(--duration-base) ease;
|
|
2761
3040
|
}
|
|
2762
|
-
.rk-modal-enter-active .rk-modal-panel[data-v-
|
|
2763
|
-
.rk-modal-leave-active .rk-modal-panel[data-v-
|
|
3041
|
+
.rk-modal-enter-active .rk-modal-panel[data-v-92ea084c],
|
|
3042
|
+
.rk-modal-leave-active .rk-modal-panel[data-v-92ea084c] {
|
|
2764
3043
|
transition:
|
|
2765
3044
|
transform var(--duration-base) var(--ease-sheet),
|
|
2766
3045
|
opacity var(--duration-base) ease;
|
|
2767
3046
|
}
|
|
2768
|
-
.rk-modal-enter-from[data-v-
|
|
2769
|
-
.rk-modal-leave-to[data-v-
|
|
3047
|
+
.rk-modal-enter-from[data-v-92ea084c],
|
|
3048
|
+
.rk-modal-leave-to[data-v-92ea084c] {
|
|
2770
3049
|
opacity: 0;
|
|
2771
3050
|
}
|
|
2772
3051
|
|
|
2773
3052
|
/* From nowhere, not from an edge: a scale is what separates this from a sheet. */
|
|
2774
|
-
.rk-modal-enter-from .rk-modal-panel[data-v-
|
|
2775
|
-
.rk-modal-leave-to .rk-modal-panel[data-v-
|
|
3053
|
+
.rk-modal-enter-from .rk-modal-panel[data-v-92ea084c],
|
|
3054
|
+
.rk-modal-leave-to .rk-modal-panel[data-v-92ea084c] {
|
|
2776
3055
|
transform: scale(0.96);
|
|
2777
3056
|
opacity: 0;
|
|
2778
3057
|
}
|
|
2779
3058
|
@media (prefers-reduced-motion: reduce) {
|
|
2780
|
-
.rk-modal-enter-active .rk-modal-panel[data-v-
|
|
2781
|
-
.rk-modal-leave-active .rk-modal-panel[data-v-
|
|
3059
|
+
.rk-modal-enter-active .rk-modal-panel[data-v-92ea084c],
|
|
3060
|
+
.rk-modal-leave-active .rk-modal-panel[data-v-92ea084c] {
|
|
2782
3061
|
transition: opacity var(--duration-base) ease;
|
|
2783
3062
|
transform: none;
|
|
2784
3063
|
}
|
|
2785
|
-
.rk-modal-enter-from .rk-modal-panel[data-v-
|
|
2786
|
-
.rk-modal-leave-to .rk-modal-panel[data-v-
|
|
3064
|
+
.rk-modal-enter-from .rk-modal-panel[data-v-92ea084c],
|
|
3065
|
+
.rk-modal-leave-to .rk-modal-panel[data-v-92ea084c] {
|
|
2787
3066
|
transform: none;
|
|
2788
3067
|
}
|
|
2789
3068
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The menu a right-click opens, on whatever it was opened over.
|
|
3
|
+
*
|
|
4
|
+
* ## The keyboard is the whole difficulty
|
|
5
|
+
*
|
|
6
|
+
* A right-click menu is trivial to draw and easy to ship broken, because
|
|
7
|
+
* the thing that breaks is invisible to the person writing it: there is no
|
|
8
|
+
* mouse in it. The platform's own answer is **Shift+F10**, and on keyboards
|
|
9
|
+
* that have one, the **Menu** key — both of which this listens for, on the
|
|
10
|
+
* area itself. A context menu without them is a set of actions that simply
|
|
11
|
+
* do not exist for anyone not holding a mouse, and nothing on screen says
|
|
12
|
+
* so.
|
|
13
|
+
*
|
|
14
|
+
* Opened that way there is no pointer to anchor to, so it opens at the
|
|
15
|
+
* focused element instead of at coordinates nobody chose.
|
|
16
|
+
*
|
|
17
|
+
* ## It is a menu, with everything that promises
|
|
18
|
+
*
|
|
19
|
+
* `role="menu"` is a contract: the arrows move, Home and End go to the
|
|
20
|
+
* ends, Escape closes, and Tab *leaves*. That is `useMenuKeys`, the same
|
|
21
|
+
* one `BaseMenu` uses — a menu hung off a pointer and a menu hung off a
|
|
22
|
+
* button are the same keyboard and two different positions, and only the
|
|
23
|
+
* position is worth writing twice.
|
|
24
|
+
*
|
|
25
|
+
* ## The items are yours
|
|
26
|
+
*
|
|
27
|
+
* The kit draws no actions: they arrive in the slot as
|
|
28
|
+
* `<button role="menuitem">`, because their words, their order and what
|
|
29
|
+
* they do are the app's, and a kit that guessed them would be wrong in
|
|
30
|
+
* every app.
|
|
31
|
+
*/
|
|
32
|
+
type __VLS_Props = {
|
|
33
|
+
/** Names the menu for a screen reader. Already translated. */
|
|
34
|
+
label: string;
|
|
35
|
+
/** Leaves the browser's own menu alone — for a text field, or a link. */
|
|
36
|
+
disabled?: boolean | undefined;
|
|
37
|
+
};
|
|
38
|
+
type __VLS_Slots = {
|
|
39
|
+
/**
|
|
40
|
+
* What the menu belongs to: a row, a canvas, a card.
|
|
41
|
+
*
|
|
42
|
+
* `props` carries the ARIA that says a menu is here. Spread it onto the
|
|
43
|
+
* element a reader actually lands on, the same way `BasePopover` hands a
|
|
44
|
+
* trigger its props.
|
|
45
|
+
*
|
|
46
|
+
* That element has to be one whose role takes these attributes — a
|
|
47
|
+
* `button`, or a `row`, `gridcell`, `treeitem`, `tab`. It is not the
|
|
48
|
+
* wrapper, and `tabindex` on a `div` does not make it one: focusable and
|
|
49
|
+
* "has a role that supports `aria-expanded`" are different things, and
|
|
50
|
+
* the second is what a reader is told. Writing them anywhere else puts
|
|
51
|
+
* an attribute on the page that a browser is entitled to ignore, which
|
|
52
|
+
* is worse than leaving them off, because it looks done.
|
|
53
|
+
*/
|
|
54
|
+
default: (props: {
|
|
55
|
+
props: {
|
|
56
|
+
'aria-haspopup'?: 'menu';
|
|
57
|
+
'aria-expanded'?: boolean;
|
|
58
|
+
'aria-controls'?: string;
|
|
59
|
+
};
|
|
60
|
+
}) => unknown;
|
|
61
|
+
/** The actions, each a `[role="menuitem"]`. */
|
|
62
|
+
items: (props: {
|
|
63
|
+
close: () => void;
|
|
64
|
+
}) => unknown;
|
|
65
|
+
};
|
|
66
|
+
declare function close(): void;
|
|
67
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
68
|
+
close: typeof close;
|
|
69
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
70
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
71
|
+
declare const _default: typeof __VLS_export;
|
|
72
|
+
export default _default;
|
|
73
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
74
|
+
new (): {
|
|
75
|
+
$slots: S;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Names the dialog. Already translated. */
|
|
3
|
+
title: string;
|
|
4
|
+
/** Accessible name of the close button. Already translated. */
|
|
5
|
+
closeLabel: string;
|
|
6
|
+
/** Which edge it comes from. `start` and `end` follow the writing direction. */
|
|
7
|
+
side?: 'start' | 'end' | 'top' | 'bottom' | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* How far it reaches in from that edge — a width on the sides, a height on
|
|
10
|
+
* the top and bottom. Any CSS length.
|
|
11
|
+
*/
|
|
12
|
+
size?: string | undefined;
|
|
13
|
+
/** Escape and the scrim close it. Off for something half filled in. */
|
|
14
|
+
dismissible?: boolean | undefined;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_ModelProps = {
|
|
17
|
+
/**
|
|
18
|
+
* A panel that comes in from the edge of a wide screen.
|
|
19
|
+
*
|
|
20
|
+
* ## `BaseDrawer`, `BaseSheet` or `BaseModal`
|
|
21
|
+
*
|
|
22
|
+
* A sheet belongs to a thumb: it arrives from the bottom edge and is pinned
|
|
23
|
+
* to the 430px shell column, so on a desktop it is narrow, and that is
|
|
24
|
+
* correct. A drawer is the wide screen's version — it comes from the side,
|
|
25
|
+
* it is as tall as the window, and it is the shape for the things a site
|
|
26
|
+
* keeps beside the page rather than on top of it: filters, a cart, a
|
|
27
|
+
* navigation menu that outgrew its bar, a record's details.
|
|
28
|
+
*
|
|
29
|
+
* A modal interrupts and wants an answer. A drawer does not ask anything —
|
|
30
|
+
* it is somewhere to work, and the page is still behind it.
|
|
31
|
+
*
|
|
32
|
+
* ## It is still a dialog
|
|
33
|
+
*
|
|
34
|
+
* Coming from the side changes where it is, not what it owes. Focus moves
|
|
35
|
+
* in, Tab cannot leave, Escape closes, the page behind goes inert and stops
|
|
36
|
+
* scrolling, and focus goes back to whatever opened it. All of that is
|
|
37
|
+
* `useDialogShell`, shared with `BaseModal`, because a drawer that
|
|
38
|
+
* reimplemented it would be a second copy to keep correct.
|
|
39
|
+
*
|
|
40
|
+
* ## `side` is logical, not left and right
|
|
41
|
+
*
|
|
42
|
+
* `start` and `end` follow the writing direction, so a drawer that opens
|
|
43
|
+
* from the left in English opens from the right in Arabic without the app
|
|
44
|
+
* asking. `top` and `bottom` are there for a command bar or a filter strip,
|
|
45
|
+
* and they are the same component because the contract is identical.
|
|
46
|
+
*/
|
|
47
|
+
modelValue: boolean;
|
|
48
|
+
};
|
|
49
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
50
|
+
declare var __VLS_26: {}, __VLS_28: {};
|
|
51
|
+
type __VLS_Slots = {} & {
|
|
52
|
+
default?: (props: typeof __VLS_26) => any;
|
|
53
|
+
} & {
|
|
54
|
+
actions?: (props: typeof __VLS_28) => any;
|
|
55
|
+
};
|
|
56
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
57
|
+
"update:modelValue": (value: boolean) => any;
|
|
58
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
59
|
+
"onUpdate:modelValue"?: (value: boolean) => any;
|
|
60
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
61
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
62
|
+
declare const _default: typeof __VLS_export;
|
|
63
|
+
export default _default;
|
|
64
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
65
|
+
new (): {
|
|
66
|
+
$slots: S;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A card that appears beside something when you rest on it.
|
|
3
|
+
*
|
|
4
|
+
* ## `BaseHoverCard` or `BaseTooltip`
|
|
5
|
+
*
|
|
6
|
+
* A tooltip is a sentence naming what a control does, and it is wired with
|
|
7
|
+
* `aria-describedby` — which flattens whatever is inside it to text. That
|
|
8
|
+
* is right for a sentence and wrong for anything else: a card holding a
|
|
9
|
+
* name, an avatar and a link would be read as one run-on string, and the
|
|
10
|
+
* link inside it could not be reached at all.
|
|
11
|
+
*
|
|
12
|
+
* So this is not a described-by bubble. The trigger says a popup is there
|
|
13
|
+
* with `aria-expanded` and `aria-controls`; the card is an ordinary region
|
|
14
|
+
* of the page that happens to be revealed, and everything inside it stays
|
|
15
|
+
* reachable.
|
|
16
|
+
*
|
|
17
|
+
* Reach for the tooltip when the answer is a sentence. Reach for this when
|
|
18
|
+
* the answer is a *thing* — a profile, a preview of what a link leads to, a
|
|
19
|
+
* definition with a source.
|
|
20
|
+
*
|
|
21
|
+
* ## The pointer has to be able to get there
|
|
22
|
+
*
|
|
23
|
+
* A card that vanishes the moment the pointer leaves the trigger is a card
|
|
24
|
+
* whose contents can never be used: the gap between the two is enough to
|
|
25
|
+
* close it. So leaving starts a delay rather than closing, and entering the
|
|
26
|
+
* card cancels it. That delay is the whole reason this is a component
|
|
27
|
+
* instead of two CSS rules.
|
|
28
|
+
*
|
|
29
|
+
* ## It opens without a pointer too
|
|
30
|
+
*
|
|
31
|
+
* Focus opens it, with no delay — waiting makes sense for a pointer sweeping
|
|
32
|
+
* across a page, and no sense for somebody who deliberately tabbed onto it.
|
|
33
|
+
* Escape closes it while leaving focus where it is, so a keyboard is never
|
|
34
|
+
* stuck with a card in the way.
|
|
35
|
+
*
|
|
36
|
+
* A hover card is supplementary by definition: everything in it has to be
|
|
37
|
+
* reachable some other way, because a touch screen has no hover at all.
|
|
38
|
+
*/
|
|
39
|
+
type __VLS_Props = {
|
|
40
|
+
/** Names the card for a screen reader. Already translated. */
|
|
41
|
+
label: string;
|
|
42
|
+
/** How long a pointer has to rest before it opens, in ms. */
|
|
43
|
+
openDelay?: number | undefined;
|
|
44
|
+
/** How long it survives the pointer leaving, so the card can be reached. */
|
|
45
|
+
closeDelay?: number | undefined;
|
|
46
|
+
placement?: 'top' | 'bottom' | undefined;
|
|
47
|
+
};
|
|
48
|
+
type __VLS_Slots = {
|
|
49
|
+
/** The thing being rested on. `props` says a popup is here. */
|
|
50
|
+
default: (props: {
|
|
51
|
+
props: {
|
|
52
|
+
'aria-expanded': boolean;
|
|
53
|
+
'aria-controls': string | undefined;
|
|
54
|
+
};
|
|
55
|
+
}) => unknown;
|
|
56
|
+
/** What appears: a profile, a preview, a definition. */
|
|
57
|
+
card: () => unknown;
|
|
58
|
+
};
|
|
59
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
60
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
61
|
+
declare const _default: typeof __VLS_export;
|
|
62
|
+
export default _default;
|
|
63
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
64
|
+
new (): {
|
|
65
|
+
$slots: S;
|
|
66
|
+
};
|
|
67
|
+
};
|