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
|
@@ -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
|
+
};
|
package/dist/web/index.d.ts
CHANGED
|
@@ -24,7 +24,22 @@ export type { Crumb } from './BaseBreadcrumb.vue';
|
|
|
24
24
|
* scrolls in, interleaved with something else, or built from a source the
|
|
25
25
|
* accordion cannot know about.
|
|
26
26
|
*/
|
|
27
|
+
/**
|
|
28
|
+
* `BaseContextMenu`, the right-click menu — which is also Shift+F10 and the
|
|
29
|
+
* Menu key, or it is a set of actions a keyboard cannot reach at all.
|
|
30
|
+
*/
|
|
31
|
+
export { default as BaseContextMenu } from './BaseContextMenu.vue';
|
|
27
32
|
export { default as BaseDisclosure } from './BaseDisclosure.vue';
|
|
33
|
+
/**
|
|
34
|
+
* `BaseHoverCard`, for when the answer is a thing rather than a sentence —
|
|
35
|
+
* which is where `aria-describedby`, and so `BaseTooltip`, stops working.
|
|
36
|
+
*/
|
|
37
|
+
export { default as BaseHoverCard } from './BaseHoverCard.vue';
|
|
38
|
+
/**
|
|
39
|
+
* `BaseDrawer`, the wide screen's answer to `BaseSheet`: a panel from the
|
|
40
|
+
* edge, for what a site keeps beside the page rather than on top of it.
|
|
41
|
+
*/
|
|
42
|
+
export { default as BaseDrawer } from './BaseDrawer.vue';
|
|
28
43
|
/**
|
|
29
44
|
* `BaseModal`, beside `BaseSheet` rather than named `Modal` on its own.
|
|
30
45
|
*
|