rei-kit 2.18.1 → 2.20.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/ActivityGrid.vue.d.ts +52 -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 +10 -0
- package/dist/index.js +423 -217
- package/dist/index.js.map +1 -1
- package/dist/styles.css +349 -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;
|
|
@@ -1074,6 +1074,43 @@ to {
|
|
|
1074
1074
|
inherits: false
|
|
1075
1075
|
}
|
|
1076
1076
|
|
|
1077
|
+
.rk-activity[data-v-9f622328] {
|
|
1078
|
+
overflow-x: auto;
|
|
1079
|
+
}
|
|
1080
|
+
.rk-activity-table[data-v-9f622328] {
|
|
1081
|
+
border-collapse: separate;
|
|
1082
|
+
border-spacing: 2px;
|
|
1083
|
+
}
|
|
1084
|
+
.rk-activity-corner[data-v-9f622328],
|
|
1085
|
+
.rk-activity-weekday[data-v-9f622328] {
|
|
1086
|
+
width: 0;
|
|
1087
|
+
padding: 0;
|
|
1088
|
+
}
|
|
1089
|
+
.rk-activity-table th[data-v-9f622328] {
|
|
1090
|
+
color: var(--color-ink-soft);
|
|
1091
|
+
font-size: 0.5625rem;
|
|
1092
|
+
font-weight: 500;
|
|
1093
|
+
line-height: 1;
|
|
1094
|
+
text-align: start;
|
|
1095
|
+
}
|
|
1096
|
+
.rk-activity-cell[data-v-9f622328] {
|
|
1097
|
+
width: 0.625rem;
|
|
1098
|
+
height: 0.625rem;
|
|
1099
|
+
padding: 0;
|
|
1100
|
+
border-radius: var(--radius-cell);
|
|
1101
|
+
background: var(--color-muted);
|
|
1102
|
+
}
|
|
1103
|
+
.rk-activity-cell.is-blank[data-v-9f622328] {
|
|
1104
|
+
background: transparent;
|
|
1105
|
+
}
|
|
1106
|
+
.rk-activity-cell.is-pickable[data-v-9f622328] {
|
|
1107
|
+
cursor: pointer;
|
|
1108
|
+
}
|
|
1109
|
+
.rk-activity-cell[data-v-9f622328]:focus-visible {
|
|
1110
|
+
outline: 2px solid var(--color-primary);
|
|
1111
|
+
outline-offset: 1px;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1077
1114
|
.rk-stack[data-v-db629481] {
|
|
1078
1115
|
display: inline-flex;
|
|
1079
1116
|
align-items: center;
|
|
@@ -1582,6 +1619,53 @@ to {
|
|
|
1582
1619
|
padding: 0;
|
|
1583
1620
|
}
|
|
1584
1621
|
|
|
1622
|
+
.rk-code[data-v-b45043be] {
|
|
1623
|
+
position: relative;
|
|
1624
|
+
overflow: hidden;
|
|
1625
|
+
border: 1px solid var(--color-hair);
|
|
1626
|
+
border-radius: var(--radius-card);
|
|
1627
|
+
background: color-mix(in oklab, var(--color-muted) 50%, transparent);
|
|
1628
|
+
}
|
|
1629
|
+
.rk-code-bar[data-v-b45043be] {
|
|
1630
|
+
display: flex;
|
|
1631
|
+
align-items: center;
|
|
1632
|
+
justify-content: space-between;
|
|
1633
|
+
gap: 0.5rem;
|
|
1634
|
+
padding: 0.375rem 0.5rem 0.375rem 1rem;
|
|
1635
|
+
border-block-end: 1px solid var(--color-hair);
|
|
1636
|
+
color: var(--color-ink-soft);
|
|
1637
|
+
font-size: 0.75rem;
|
|
1638
|
+
}
|
|
1639
|
+
.rk-code-lang[data-v-b45043be] {
|
|
1640
|
+
font-family: ui-monospace, monospace;
|
|
1641
|
+
letter-spacing: 0.04em;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
/* Pushes the button to the end when there is no language beside it. */
|
|
1645
|
+
.rk-code-copy[data-v-b45043be] {
|
|
1646
|
+
margin-inline-start: auto;
|
|
1647
|
+
}
|
|
1648
|
+
.rk-code-pre[data-v-b45043be] {
|
|
1649
|
+
margin: 0;
|
|
1650
|
+
overflow-x: auto;
|
|
1651
|
+
padding: 1rem 1.25rem;
|
|
1652
|
+
color: var(--color-ink);
|
|
1653
|
+
font-size: 0.875rem;
|
|
1654
|
+
line-height: 1.75;
|
|
1655
|
+
}
|
|
1656
|
+
.rk-code-pre[data-v-b45043be]:focus-visible {
|
|
1657
|
+
outline: 2px solid var(--color-primary);
|
|
1658
|
+
outline-offset: -2px;
|
|
1659
|
+
}
|
|
1660
|
+
.is-wrapped .rk-code-pre[data-v-b45043be] {
|
|
1661
|
+
overflow-x: visible;
|
|
1662
|
+
white-space: pre-wrap;
|
|
1663
|
+
word-break: break-word;
|
|
1664
|
+
}
|
|
1665
|
+
.rk-code-pre code[data-v-b45043be] {
|
|
1666
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1585
1669
|
.rk-dl[data-v-831e205b] {
|
|
1586
1670
|
display: grid;
|
|
1587
1671
|
gap: 0.75rem;
|
|
@@ -2613,6 +2697,57 @@ to {
|
|
|
2613
2697
|
color: var(--color-hair);
|
|
2614
2698
|
}
|
|
2615
2699
|
|
|
2700
|
+
.rk-ctx-area[data-v-4888e5a2] {
|
|
2701
|
+
/*
|
|
2702
|
+
* A real box, not `display: contents`.
|
|
2703
|
+
*
|
|
2704
|
+
* `contents` would have kept the app's layout untouched, and it also
|
|
2705
|
+
* drops the element from the accessibility tree in some browsers --
|
|
2706
|
+
* taking `aria-haspopup` with it, silently. So this renders a plain
|
|
2707
|
+
* block, and the class is the app's to change.
|
|
2708
|
+
*/
|
|
2709
|
+
display: block;
|
|
2710
|
+
}
|
|
2711
|
+
.rk-ctx-panel[data-v-4888e5a2] {
|
|
2712
|
+
position: fixed;
|
|
2713
|
+
z-index: 60;
|
|
2714
|
+
min-width: 11rem;
|
|
2715
|
+
padding: 0.25rem;
|
|
2716
|
+
border-radius: var(--radius-card);
|
|
2717
|
+
box-shadow: var(--shadow-overlay);
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
/* Unscoped: the items come from the app's slot, so a scoped rule would not
|
|
2721
|
+
reach them. Named off the panel rather than on their own, so this cannot
|
|
2722
|
+
paint a menu item somewhere else on the page. */
|
|
2723
|
+
.rk-ctx-panel [role='menuitem'] {
|
|
2724
|
+
display: flex;
|
|
2725
|
+
width: 100%;
|
|
2726
|
+
align-items: center;
|
|
2727
|
+
gap: 0.5rem;
|
|
2728
|
+
border-radius: var(--radius-cell);
|
|
2729
|
+
padding: 0.5rem 0.625rem;
|
|
2730
|
+
text-align: start;
|
|
2731
|
+
font-size: 0.875rem;
|
|
2732
|
+
color: var(--color-ink);
|
|
2733
|
+
}
|
|
2734
|
+
.rk-ctx-panel [role='menuitem']:hover:not(:disabled),
|
|
2735
|
+
.rk-ctx-panel [role='menuitem']:focus-visible {
|
|
2736
|
+
background: var(--color-muted);
|
|
2737
|
+
}
|
|
2738
|
+
.rk-ctx-panel [role='menuitem']:focus-visible {
|
|
2739
|
+
outline: 2px solid var(--color-primary);
|
|
2740
|
+
outline-offset: -2px;
|
|
2741
|
+
}
|
|
2742
|
+
.rk-ctx-panel [role='menuitem']:disabled {
|
|
2743
|
+
opacity: 0.45;
|
|
2744
|
+
}
|
|
2745
|
+
.rk-ctx-panel hr {
|
|
2746
|
+
margin: 0.25rem 0;
|
|
2747
|
+
border: 0;
|
|
2748
|
+
border-block-start: 1px solid var(--color-hair);
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2616
2751
|
.rk-disclosure-control[data-v-ad5c09f5] {
|
|
2617
2752
|
display: flex;
|
|
2618
2753
|
width: 100%;
|
|
@@ -2690,7 +2825,188 @@ to {
|
|
|
2690
2825
|
}
|
|
2691
2826
|
}
|
|
2692
2827
|
|
|
2693
|
-
.rk-
|
|
2828
|
+
.rk-hovercard[data-v-70c09916] {
|
|
2829
|
+
position: relative;
|
|
2830
|
+
display: inline-flex;
|
|
2831
|
+
}
|
|
2832
|
+
.rk-hovercard-panel[data-v-70c09916] {
|
|
2833
|
+
position: absolute;
|
|
2834
|
+
z-index: 40;
|
|
2835
|
+
inset-inline-start: 0;
|
|
2836
|
+
width: max-content;
|
|
2837
|
+
max-width: 20rem;
|
|
2838
|
+
padding: 0.875rem 1rem;
|
|
2839
|
+
border-radius: var(--radius-card);
|
|
2840
|
+
box-shadow: var(--shadow-overlay);
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
/*
|
|
2844
|
+
* The card sits a little off the trigger, and the gap is bridged.
|
|
2845
|
+
*
|
|
2846
|
+
* Crossing that gap leaves the trigger without yet entering the card, which
|
|
2847
|
+
* starts the close. `closeDelay` already covers a pointer moving at any
|
|
2848
|
+
* normal speed, but the bridge means the pointer never actually leaves:
|
|
2849
|
+
* a transparent strip, part of the panel, fills the space. Belt and braces,
|
|
2850
|
+
* because the failure it prevents -- a card whose contents cannot be
|
|
2851
|
+
* reached -- is total rather than cosmetic.
|
|
2852
|
+
*/
|
|
2853
|
+
.rk-hovercard-panel[data-v-70c09916]::before {
|
|
2854
|
+
content: '';
|
|
2855
|
+
position: absolute;
|
|
2856
|
+
inset-inline: 0;
|
|
2857
|
+
height: 0.5rem;
|
|
2858
|
+
}
|
|
2859
|
+
.rk-hovercard-panel.is-bottom[data-v-70c09916]::before {
|
|
2860
|
+
top: -0.5rem;
|
|
2861
|
+
}
|
|
2862
|
+
.rk-hovercard-panel.is-top[data-v-70c09916]::before {
|
|
2863
|
+
bottom: -0.5rem;
|
|
2864
|
+
}
|
|
2865
|
+
.rk-hovercard-panel.is-bottom[data-v-70c09916] {
|
|
2866
|
+
top: 100%;
|
|
2867
|
+
margin-block-start: 0.5rem;
|
|
2868
|
+
}
|
|
2869
|
+
.rk-hovercard-panel.is-top[data-v-70c09916] {
|
|
2870
|
+
bottom: 100%;
|
|
2871
|
+
margin-block-end: 0.5rem;
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
.rk-drawer-scrim[data-v-de2cccb9] {
|
|
2875
|
+
position: fixed;
|
|
2876
|
+
inset: 0;
|
|
2877
|
+
z-index: 50;
|
|
2878
|
+
display: flex;
|
|
2879
|
+
}
|
|
2880
|
+
.rk-drawer-veil[data-v-de2cccb9] {
|
|
2881
|
+
position: absolute;
|
|
2882
|
+
inset: 0;
|
|
2883
|
+
background: color-mix(in oklab, var(--color-ink) 45%, transparent);
|
|
2884
|
+
backdrop-filter: blur(2px);
|
|
2885
|
+
}
|
|
2886
|
+
.rk-drawer-panel[data-v-de2cccb9] {
|
|
2887
|
+
position: relative;
|
|
2888
|
+
display: flex;
|
|
2889
|
+
flex-direction: column;
|
|
2890
|
+
max-width: 100%;
|
|
2891
|
+
max-height: 100%;
|
|
2892
|
+
outline: none;
|
|
2893
|
+
box-shadow: var(--shadow-overlay);
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
/* Logical, so the writing direction decides which edge this is. */
|
|
2897
|
+
.rk-drawer-panel.is-start[data-v-de2cccb9] {
|
|
2898
|
+
margin-inline-end: auto;
|
|
2899
|
+
height: 100%;
|
|
2900
|
+
border-start-end-radius: var(--radius-card);
|
|
2901
|
+
border-end-end-radius: var(--radius-card);
|
|
2902
|
+
}
|
|
2903
|
+
.rk-drawer-panel.is-end[data-v-de2cccb9] {
|
|
2904
|
+
margin-inline-start: auto;
|
|
2905
|
+
height: 100%;
|
|
2906
|
+
border-start-start-radius: var(--radius-card);
|
|
2907
|
+
border-end-start-radius: var(--radius-card);
|
|
2908
|
+
}
|
|
2909
|
+
.rk-drawer-panel.is-top[data-v-de2cccb9] {
|
|
2910
|
+
margin-block-end: auto;
|
|
2911
|
+
width: 100%;
|
|
2912
|
+
border-end-start-radius: var(--radius-card);
|
|
2913
|
+
border-end-end-radius: var(--radius-card);
|
|
2914
|
+
}
|
|
2915
|
+
.rk-drawer-panel.is-bottom[data-v-de2cccb9] {
|
|
2916
|
+
margin-block-start: auto;
|
|
2917
|
+
width: 100%;
|
|
2918
|
+
border-start-start-radius: var(--radius-card);
|
|
2919
|
+
border-start-end-radius: var(--radius-card);
|
|
2920
|
+
}
|
|
2921
|
+
.rk-drawer-head[data-v-de2cccb9] {
|
|
2922
|
+
display: flex;
|
|
2923
|
+
align-items: center;
|
|
2924
|
+
justify-content: space-between;
|
|
2925
|
+
gap: 1rem;
|
|
2926
|
+
padding: 1rem 1.25rem;
|
|
2927
|
+
border-block-end: 1px solid var(--color-hair);
|
|
2928
|
+
}
|
|
2929
|
+
.rk-drawer-title[data-v-de2cccb9] {
|
|
2930
|
+
font-size: 1rem;
|
|
2931
|
+
font-weight: 600;
|
|
2932
|
+
color: var(--color-ink);
|
|
2933
|
+
}
|
|
2934
|
+
.rk-drawer-body[data-v-de2cccb9] {
|
|
2935
|
+
flex: 1;
|
|
2936
|
+
overflow-y: auto;
|
|
2937
|
+
padding: 1.25rem;
|
|
2938
|
+
}
|
|
2939
|
+
.rk-drawer-actions[data-v-de2cccb9] {
|
|
2940
|
+
display: flex;
|
|
2941
|
+
justify-content: flex-end;
|
|
2942
|
+
gap: 0.5rem;
|
|
2943
|
+
padding: 1rem 1.25rem;
|
|
2944
|
+
border-block-start: 1px solid var(--color-hair);
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
/* One pair per edge: a drawer that slid in from the wrong side reads as a
|
|
2948
|
+
different component arriving. */
|
|
2949
|
+
.rk-drawer-start-enter-active[data-v-de2cccb9],
|
|
2950
|
+
.rk-drawer-start-leave-active[data-v-de2cccb9],
|
|
2951
|
+
.rk-drawer-end-enter-active[data-v-de2cccb9],
|
|
2952
|
+
.rk-drawer-end-leave-active[data-v-de2cccb9],
|
|
2953
|
+
.rk-drawer-top-enter-active[data-v-de2cccb9],
|
|
2954
|
+
.rk-drawer-top-leave-active[data-v-de2cccb9],
|
|
2955
|
+
.rk-drawer-bottom-enter-active[data-v-de2cccb9],
|
|
2956
|
+
.rk-drawer-bottom-leave-active[data-v-de2cccb9] {
|
|
2957
|
+
transition: opacity var(--duration-base) var(--ease-standard);
|
|
2958
|
+
}
|
|
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: transform var(--duration-base) var(--ease-sheet);
|
|
2968
|
+
}
|
|
2969
|
+
.rk-drawer-start-enter-from[data-v-de2cccb9],
|
|
2970
|
+
.rk-drawer-start-leave-to[data-v-de2cccb9],
|
|
2971
|
+
.rk-drawer-end-enter-from[data-v-de2cccb9],
|
|
2972
|
+
.rk-drawer-end-leave-to[data-v-de2cccb9],
|
|
2973
|
+
.rk-drawer-top-enter-from[data-v-de2cccb9],
|
|
2974
|
+
.rk-drawer-top-leave-to[data-v-de2cccb9],
|
|
2975
|
+
.rk-drawer-bottom-enter-from[data-v-de2cccb9],
|
|
2976
|
+
.rk-drawer-bottom-leave-to[data-v-de2cccb9] {
|
|
2977
|
+
opacity: 0;
|
|
2978
|
+
}
|
|
2979
|
+
.rk-drawer-start-enter-from .rk-drawer-panel[data-v-de2cccb9],
|
|
2980
|
+
.rk-drawer-start-leave-to .rk-drawer-panel[data-v-de2cccb9] {
|
|
2981
|
+
transform: translateX(-100%);
|
|
2982
|
+
}
|
|
2983
|
+
.rk-drawer-end-enter-from .rk-drawer-panel[data-v-de2cccb9],
|
|
2984
|
+
.rk-drawer-end-leave-to .rk-drawer-panel[data-v-de2cccb9] {
|
|
2985
|
+
transform: translateX(100%);
|
|
2986
|
+
}
|
|
2987
|
+
.rk-drawer-top-enter-from .rk-drawer-panel[data-v-de2cccb9],
|
|
2988
|
+
.rk-drawer-top-leave-to .rk-drawer-panel[data-v-de2cccb9] {
|
|
2989
|
+
transform: translateY(-100%);
|
|
2990
|
+
}
|
|
2991
|
+
.rk-drawer-bottom-enter-from .rk-drawer-panel[data-v-de2cccb9],
|
|
2992
|
+
.rk-drawer-bottom-leave-to .rk-drawer-panel[data-v-de2cccb9] {
|
|
2993
|
+
transform: translateY(100%);
|
|
2994
|
+
}
|
|
2995
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2996
|
+
.rk-drawer-start-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2997
|
+
.rk-drawer-start-leave-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2998
|
+
.rk-drawer-end-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
2999
|
+
.rk-drawer-end-leave-active .rk-drawer-panel[data-v-de2cccb9],
|
|
3000
|
+
.rk-drawer-top-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
3001
|
+
.rk-drawer-top-leave-active .rk-drawer-panel[data-v-de2cccb9],
|
|
3002
|
+
.rk-drawer-bottom-enter-active .rk-drawer-panel[data-v-de2cccb9],
|
|
3003
|
+
.rk-drawer-bottom-leave-active .rk-drawer-panel[data-v-de2cccb9] {
|
|
3004
|
+
transition: none;
|
|
3005
|
+
transform: none;
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
|
|
3009
|
+
.rk-modal-scrim[data-v-92ea084c] {
|
|
2694
3010
|
position: fixed;
|
|
2695
3011
|
inset: 0;
|
|
2696
3012
|
z-index: 50;
|
|
@@ -2700,7 +3016,7 @@ to {
|
|
|
2700
3016
|
background: color-mix(in srgb, var(--color-ink) 70%, transparent);
|
|
2701
3017
|
backdrop-filter: blur(4px);
|
|
2702
3018
|
}
|
|
2703
|
-
.rk-modal-panel[data-v-
|
|
3019
|
+
.rk-modal-panel[data-v-92ea084c] {
|
|
2704
3020
|
width: 100%;
|
|
2705
3021
|
max-width: 28rem;
|
|
2706
3022
|
max-height: 85vh;
|
|
@@ -2708,21 +3024,21 @@ to {
|
|
|
2708
3024
|
border-radius: var(--radius-card);
|
|
2709
3025
|
padding: 1.5rem;
|
|
2710
3026
|
}
|
|
2711
|
-
.rk-modal-panel[data-v-
|
|
3027
|
+
.rk-modal-panel[data-v-92ea084c]:focus {
|
|
2712
3028
|
outline: none;
|
|
2713
3029
|
}
|
|
2714
|
-
.rk-modal-head[data-v-
|
|
3030
|
+
.rk-modal-head[data-v-92ea084c] {
|
|
2715
3031
|
display: flex;
|
|
2716
3032
|
align-items: flex-start;
|
|
2717
3033
|
justify-content: space-between;
|
|
2718
3034
|
gap: 1rem;
|
|
2719
3035
|
}
|
|
2720
|
-
.rk-modal-title[data-v-
|
|
3036
|
+
.rk-modal-title[data-v-92ea084c] {
|
|
2721
3037
|
font-size: 1.0625rem;
|
|
2722
3038
|
font-weight: 600;
|
|
2723
3039
|
color: var(--color-ink);
|
|
2724
3040
|
}
|
|
2725
|
-
.rk-modal-close[data-v-
|
|
3041
|
+
.rk-modal-close[data-v-92ea084c] {
|
|
2726
3042
|
display: grid;
|
|
2727
3043
|
place-items: center;
|
|
2728
3044
|
flex-shrink: 0;
|
|
@@ -2732,58 +3048,58 @@ to {
|
|
|
2732
3048
|
color: var(--color-ink-soft);
|
|
2733
3049
|
transition: background-color var(--duration-fast);
|
|
2734
3050
|
}
|
|
2735
|
-
.rk-modal-close[data-v-
|
|
3051
|
+
.rk-modal-close[data-v-92ea084c]:hover {
|
|
2736
3052
|
background: var(--color-muted);
|
|
2737
3053
|
}
|
|
2738
|
-
.rk-modal-close[data-v-
|
|
3054
|
+
.rk-modal-close[data-v-92ea084c]:focus-visible {
|
|
2739
3055
|
outline: 2px solid var(--color-primary);
|
|
2740
3056
|
outline-offset: 2px;
|
|
2741
3057
|
}
|
|
2742
|
-
.rk-modal-close svg[data-v-
|
|
3058
|
+
.rk-modal-close svg[data-v-92ea084c] {
|
|
2743
3059
|
width: 1rem;
|
|
2744
3060
|
height: 1rem;
|
|
2745
3061
|
}
|
|
2746
|
-
.rk-modal-body[data-v-
|
|
3062
|
+
.rk-modal-body[data-v-92ea084c] {
|
|
2747
3063
|
margin-top: 0.75rem;
|
|
2748
3064
|
color: var(--color-ink-soft);
|
|
2749
3065
|
font-size: 0.875rem;
|
|
2750
3066
|
line-height: 1.625;
|
|
2751
3067
|
}
|
|
2752
|
-
.rk-modal-actions[data-v-
|
|
3068
|
+
.rk-modal-actions[data-v-92ea084c] {
|
|
2753
3069
|
margin-top: 1.5rem;
|
|
2754
3070
|
display: flex;
|
|
2755
3071
|
justify-content: flex-end;
|
|
2756
3072
|
gap: 0.5rem;
|
|
2757
3073
|
}
|
|
2758
|
-
.rk-modal-enter-active[data-v-
|
|
2759
|
-
.rk-modal-leave-active[data-v-
|
|
3074
|
+
.rk-modal-enter-active[data-v-92ea084c],
|
|
3075
|
+
.rk-modal-leave-active[data-v-92ea084c] {
|
|
2760
3076
|
transition: opacity var(--duration-base) ease;
|
|
2761
3077
|
}
|
|
2762
|
-
.rk-modal-enter-active .rk-modal-panel[data-v-
|
|
2763
|
-
.rk-modal-leave-active .rk-modal-panel[data-v-
|
|
3078
|
+
.rk-modal-enter-active .rk-modal-panel[data-v-92ea084c],
|
|
3079
|
+
.rk-modal-leave-active .rk-modal-panel[data-v-92ea084c] {
|
|
2764
3080
|
transition:
|
|
2765
3081
|
transform var(--duration-base) var(--ease-sheet),
|
|
2766
3082
|
opacity var(--duration-base) ease;
|
|
2767
3083
|
}
|
|
2768
|
-
.rk-modal-enter-from[data-v-
|
|
2769
|
-
.rk-modal-leave-to[data-v-
|
|
3084
|
+
.rk-modal-enter-from[data-v-92ea084c],
|
|
3085
|
+
.rk-modal-leave-to[data-v-92ea084c] {
|
|
2770
3086
|
opacity: 0;
|
|
2771
3087
|
}
|
|
2772
3088
|
|
|
2773
3089
|
/* 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-
|
|
3090
|
+
.rk-modal-enter-from .rk-modal-panel[data-v-92ea084c],
|
|
3091
|
+
.rk-modal-leave-to .rk-modal-panel[data-v-92ea084c] {
|
|
2776
3092
|
transform: scale(0.96);
|
|
2777
3093
|
opacity: 0;
|
|
2778
3094
|
}
|
|
2779
3095
|
@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-
|
|
3096
|
+
.rk-modal-enter-active .rk-modal-panel[data-v-92ea084c],
|
|
3097
|
+
.rk-modal-leave-active .rk-modal-panel[data-v-92ea084c] {
|
|
2782
3098
|
transition: opacity var(--duration-base) ease;
|
|
2783
3099
|
transform: none;
|
|
2784
3100
|
}
|
|
2785
|
-
.rk-modal-enter-from .rk-modal-panel[data-v-
|
|
2786
|
-
.rk-modal-leave-to .rk-modal-panel[data-v-
|
|
3101
|
+
.rk-modal-enter-from .rk-modal-panel[data-v-92ea084c],
|
|
3102
|
+
.rk-modal-leave-to .rk-modal-panel[data-v-92ea084c] {
|
|
2787
3103
|
transform: none;
|
|
2788
3104
|
}
|
|
2789
3105
|
}
|
|
@@ -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
|
+
};
|