@illinois-grad/grad-vue 2.4.0 → 2.4.2
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/dist/components/GModal.vue.d.ts +4 -0
- package/dist/components/GPopover.vue.d.ts +2 -2
- package/dist/components/GTreeMenu.vue.d.ts +72 -0
- package/dist/components/tree-menu/GTreeMenuList.vue.d.ts +23 -0
- package/dist/compose/useOverlayStack.d.ts +1 -11
- package/dist/grad-vue.css +1 -1
- package/dist/grad-vue.d.ts +3 -1
- package/dist/grad-vue.js +19 -18
- package/dist/main-D8BC78tE.js +3394 -0
- package/dist/main-D8BC78tE.js.map +1 -0
- package/dist/plugin.d.ts +2 -1
- package/dist/plugin.js +4 -4
- package/dist/plugin.js.map +1 -1
- package/package.json +1 -1
- package/dist/main-BtQAK04Y.js +0 -3171
- package/dist/main-BtQAK04Y.js.map +0 -1
|
@@ -48,6 +48,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
48
48
|
describedby?: string;
|
|
49
49
|
/**
|
|
50
50
|
* Hide label
|
|
51
|
+
*
|
|
52
|
+
* The label is still used as the `aria-label` for accessibility, but it will not be visible in the UI.
|
|
51
53
|
* @demo
|
|
52
54
|
*/
|
|
53
55
|
hiddenLabel?: boolean;
|
|
@@ -76,6 +78,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
76
78
|
describedby?: string;
|
|
77
79
|
/**
|
|
78
80
|
* Hide label
|
|
81
|
+
*
|
|
82
|
+
* The label is still used as the `aria-label` for accessibility, but it will not be visible in the UI.
|
|
79
83
|
* @demo
|
|
80
84
|
*/
|
|
81
85
|
hiddenLabel?: boolean;
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
* <GPopover>
|
|
16
16
|
* <template #trigger="{ toggle }">
|
|
17
17
|
* <GButton @click="toggle">
|
|
18
|
-
* Can Popovers
|
|
18
|
+
* Can Popovers have Popovers?
|
|
19
19
|
* </GButton>
|
|
20
20
|
* </template>
|
|
21
|
-
* <div>
|
|
21
|
+
* <div>In theory, but I wouldn't recommend it.</div>
|
|
22
22
|
* </GPopover>
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { TreeMenuItem } from "./tree-menu/GTreeMenuList.vue";
|
|
2
|
+
/**
|
|
3
|
+
* A hierarchical sidebar menu component suitable for book-like or nested-section
|
|
4
|
+
* navigation. Items with children start collapsed and can be expanded/collapsed
|
|
5
|
+
* individually.
|
|
6
|
+
*
|
|
7
|
+
* **Props**:
|
|
8
|
+
*
|
|
9
|
+
* - `title` — optional heading and accessible name for the nav landmark.
|
|
10
|
+
* - `items` — array of `TreeMenuItem` objects. Each item may have:
|
|
11
|
+
* - `label` — display text (required).
|
|
12
|
+
* - `href` or `to` — link destination. When `to` is provided and `vue-router`
|
|
13
|
+
* is present the link is rendered as a `<router-link>`.
|
|
14
|
+
* - `children` — nested `TreeMenuItem[]` for sub-levels (unlimited depth).
|
|
15
|
+
* - `listType` — `ul` (default) or `ol`. Use `ol` for numbered
|
|
16
|
+
* hierarchies such as book chapters.
|
|
17
|
+
* - `theme` — `light` (default) or `dark`.
|
|
18
|
+
*
|
|
19
|
+
* **Keyboard navigation** (tree-view style):
|
|
20
|
+
*
|
|
21
|
+
* - `↑` / `↓` — move between visible menu items.
|
|
22
|
+
* - `→` — expand a collapsed item; if already expanded, move to its first child.
|
|
23
|
+
* - `←` — collapse an expanded item; if already collapsed, move focus to its
|
|
24
|
+
* parent.
|
|
25
|
+
* - `Home` / `End` — jump to the first or last visible item.
|
|
26
|
+
*/
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
30
|
+
/**
|
|
31
|
+
* Title and accessible name for the nav landmark
|
|
32
|
+
* @demo Tree Menu
|
|
33
|
+
*/
|
|
34
|
+
title?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Items for the menu
|
|
37
|
+
*/
|
|
38
|
+
items: TreeMenuItem[];
|
|
39
|
+
/**
|
|
40
|
+
* List element type — use `ol` for numbered hierarchies like book chapters
|
|
41
|
+
* @demo
|
|
42
|
+
*/
|
|
43
|
+
listType?: "ul" | "ol";
|
|
44
|
+
/**
|
|
45
|
+
* Theme
|
|
46
|
+
* @demo
|
|
47
|
+
*/
|
|
48
|
+
theme?: "light" | "dark";
|
|
49
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
50
|
+
/**
|
|
51
|
+
* Title and accessible name for the nav landmark
|
|
52
|
+
* @demo Tree Menu
|
|
53
|
+
*/
|
|
54
|
+
title?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Items for the menu
|
|
57
|
+
*/
|
|
58
|
+
items: TreeMenuItem[];
|
|
59
|
+
/**
|
|
60
|
+
* List element type — use `ol` for numbered hierarchies like book chapters
|
|
61
|
+
* @demo
|
|
62
|
+
*/
|
|
63
|
+
listType?: "ul" | "ol";
|
|
64
|
+
/**
|
|
65
|
+
* Theme
|
|
66
|
+
* @demo
|
|
67
|
+
*/
|
|
68
|
+
theme?: "light" | "dark";
|
|
69
|
+
}> & Readonly<{}>, {
|
|
70
|
+
theme: "light" | "dark";
|
|
71
|
+
listType: "ul" | "ol";
|
|
72
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type TreeMenuItem = {
|
|
2
|
+
label: string;
|
|
3
|
+
href?: string;
|
|
4
|
+
to?: string;
|
|
5
|
+
children?: TreeMenuItem[];
|
|
6
|
+
};
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
10
|
+
items: TreeMenuItem[];
|
|
11
|
+
listType: "ul" | "ol";
|
|
12
|
+
expandedItems: Set<string>;
|
|
13
|
+
keyPrefix: string;
|
|
14
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
toggle: (key: string) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
17
|
+
items: TreeMenuItem[];
|
|
18
|
+
listType: "ul" | "ol";
|
|
19
|
+
expandedItems: Set<string>;
|
|
20
|
+
keyPrefix: string;
|
|
21
|
+
}> & Readonly<{
|
|
22
|
+
onToggle?: ((key: string) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -5,22 +5,12 @@ export type OverlayStack = {
|
|
|
5
5
|
isTop: Ref<boolean>;
|
|
6
6
|
zIndex: Ref<number>;
|
|
7
7
|
};
|
|
8
|
-
declare global {
|
|
9
|
-
interface Window {
|
|
10
|
-
_g_overlay_stack_state: {
|
|
11
|
-
stack: Ref<string[]>;
|
|
12
|
-
modalStack: Ref<string[]>;
|
|
13
|
-
scrollLockStack: Ref<string[]>;
|
|
14
|
-
updateBodyScrollLock: () => void;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export declare function useOverlayStack(id: string, modal?: boolean, lockScroll?: boolean): OverlayStack;
|
|
19
8
|
export type OverlayStackState = {
|
|
20
9
|
hasModal: Ref<boolean>;
|
|
21
10
|
hasOverlay: Ref<boolean>;
|
|
22
11
|
hasScrollLock: Ref<boolean>;
|
|
23
12
|
};
|
|
13
|
+
export declare function useOverlayStack(id: string, modal?: boolean, lockScroll?: boolean): OverlayStack;
|
|
24
14
|
export declare function useOverlayStackState(): OverlayStackState;
|
|
25
15
|
/**
|
|
26
16
|
* Returns a z-index value that is above all currently open overlays.
|