@illinois-grad/grad-vue 2.5.4 → 3.0.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/custom-elements.json +129 -10
- package/dist/components/GCurrencyInput.vue.d.ts +11 -0
- package/dist/components/GDateInput.vue.d.ts +11 -0
- package/dist/components/GDateRangeInput.vue.d.ts +11 -0
- package/dist/components/GEmailInput.vue.d.ts +11 -0
- package/dist/components/GMultiSelect.vue.d.ts +11 -0
- package/dist/components/GSelect.vue.d.ts +11 -0
- package/dist/components/GSelectButton.vue.d.ts +11 -0
- package/dist/components/GTextInput.vue.d.ts +11 -0
- package/dist/components/GTreeMenu.vue.d.ts +47 -19
- package/dist/components/tree-menu/GTreeMenuItem.vue.d.ts +52 -0
- package/dist/components/tree-menu/GTreeMenuList.vue.d.ts +25 -20
- package/dist/{grad-vue-CpBeCe-d.js → grad-vue-DCHrrEXb.js} +801 -769
- package/dist/grad-vue-DCHrrEXb.js.map +1 -0
- package/dist/grad-vue-elements.d.ts +6 -0
- package/dist/grad-vue-elements.js +2249 -2037
- package/dist/grad-vue-elements.js.map +1 -1
- package/dist/grad-vue.css +1 -1
- package/dist/grad-vue.d.ts +3 -2
- package/dist/grad-vue.js +2 -2
- package/dist/plugin.d.ts +3 -1
- package/dist/plugin.js +4 -4
- package/dist/plugin.js.map +1 -1
- package/package.json +1 -1
- package/dist/grad-vue-CpBeCe-d.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -429,6 +429,16 @@
|
|
|
429
429
|
"description": "Disabled",
|
|
430
430
|
"default": "false"
|
|
431
431
|
},
|
|
432
|
+
{
|
|
433
|
+
"kind": "field",
|
|
434
|
+
"name": "required",
|
|
435
|
+
"type": {
|
|
436
|
+
"text": "boolean"
|
|
437
|
+
},
|
|
438
|
+
"optional": true,
|
|
439
|
+
"description": "Required",
|
|
440
|
+
"default": "false"
|
|
441
|
+
},
|
|
432
442
|
{
|
|
433
443
|
"kind": "field",
|
|
434
444
|
"name": "errors",
|
|
@@ -521,6 +531,16 @@
|
|
|
521
531
|
"description": "Disabled",
|
|
522
532
|
"default": "false"
|
|
523
533
|
},
|
|
534
|
+
{
|
|
535
|
+
"kind": "field",
|
|
536
|
+
"name": "required",
|
|
537
|
+
"type": {
|
|
538
|
+
"text": "boolean"
|
|
539
|
+
},
|
|
540
|
+
"optional": true,
|
|
541
|
+
"description": "Required",
|
|
542
|
+
"default": "false"
|
|
543
|
+
},
|
|
524
544
|
{
|
|
525
545
|
"kind": "field",
|
|
526
546
|
"name": "errors",
|
|
@@ -623,6 +643,16 @@
|
|
|
623
643
|
"description": "Disabled",
|
|
624
644
|
"default": "false"
|
|
625
645
|
},
|
|
646
|
+
{
|
|
647
|
+
"kind": "field",
|
|
648
|
+
"name": "required",
|
|
649
|
+
"type": {
|
|
650
|
+
"text": "boolean"
|
|
651
|
+
},
|
|
652
|
+
"optional": true,
|
|
653
|
+
"description": "Required",
|
|
654
|
+
"default": "false"
|
|
655
|
+
},
|
|
626
656
|
{
|
|
627
657
|
"kind": "field",
|
|
628
658
|
"name": "errors",
|
|
@@ -762,6 +792,16 @@
|
|
|
762
792
|
"description": "Disabled",
|
|
763
793
|
"default": "false"
|
|
764
794
|
},
|
|
795
|
+
{
|
|
796
|
+
"kind": "field",
|
|
797
|
+
"name": "required",
|
|
798
|
+
"type": {
|
|
799
|
+
"text": "boolean"
|
|
800
|
+
},
|
|
801
|
+
"optional": true,
|
|
802
|
+
"description": "Required",
|
|
803
|
+
"default": "false"
|
|
804
|
+
},
|
|
765
805
|
{
|
|
766
806
|
"kind": "field",
|
|
767
807
|
"name": "errors",
|
|
@@ -1196,6 +1236,16 @@
|
|
|
1196
1236
|
"description": "Disabled",
|
|
1197
1237
|
"default": "false"
|
|
1198
1238
|
},
|
|
1239
|
+
{
|
|
1240
|
+
"kind": "field",
|
|
1241
|
+
"name": "required",
|
|
1242
|
+
"type": {
|
|
1243
|
+
"text": "boolean"
|
|
1244
|
+
},
|
|
1245
|
+
"optional": true,
|
|
1246
|
+
"description": "Required",
|
|
1247
|
+
"default": "false"
|
|
1248
|
+
},
|
|
1199
1249
|
{
|
|
1200
1250
|
"kind": "field",
|
|
1201
1251
|
"name": "name",
|
|
@@ -1530,6 +1580,16 @@
|
|
|
1530
1580
|
"description": "Disabled",
|
|
1531
1581
|
"default": "false"
|
|
1532
1582
|
},
|
|
1583
|
+
{
|
|
1584
|
+
"kind": "field",
|
|
1585
|
+
"name": "required",
|
|
1586
|
+
"type": {
|
|
1587
|
+
"text": "boolean"
|
|
1588
|
+
},
|
|
1589
|
+
"optional": true,
|
|
1590
|
+
"description": "Required",
|
|
1591
|
+
"default": "false"
|
|
1592
|
+
},
|
|
1533
1593
|
{
|
|
1534
1594
|
"kind": "field",
|
|
1535
1595
|
"name": "name",
|
|
@@ -1664,6 +1724,16 @@
|
|
|
1664
1724
|
"description": "Disabled",
|
|
1665
1725
|
"default": "false"
|
|
1666
1726
|
},
|
|
1727
|
+
{
|
|
1728
|
+
"kind": "field",
|
|
1729
|
+
"name": "required",
|
|
1730
|
+
"type": {
|
|
1731
|
+
"text": "boolean"
|
|
1732
|
+
},
|
|
1733
|
+
"optional": true,
|
|
1734
|
+
"description": "Required",
|
|
1735
|
+
"default": "false"
|
|
1736
|
+
},
|
|
1667
1737
|
{
|
|
1668
1738
|
"kind": "field",
|
|
1669
1739
|
"name": "errors",
|
|
@@ -2438,6 +2508,16 @@
|
|
|
2438
2508
|
"description": "Disabled",
|
|
2439
2509
|
"default": "false"
|
|
2440
2510
|
},
|
|
2511
|
+
{
|
|
2512
|
+
"kind": "field",
|
|
2513
|
+
"name": "required",
|
|
2514
|
+
"type": {
|
|
2515
|
+
"text": "boolean"
|
|
2516
|
+
},
|
|
2517
|
+
"optional": true,
|
|
2518
|
+
"description": "Required",
|
|
2519
|
+
"default": "false"
|
|
2520
|
+
},
|
|
2441
2521
|
{
|
|
2442
2522
|
"kind": "field",
|
|
2443
2523
|
"name": "errors",
|
|
@@ -2760,15 +2840,6 @@
|
|
|
2760
2840
|
"optional": true,
|
|
2761
2841
|
"description": "Title and accessible name for the nav landmark"
|
|
2762
2842
|
},
|
|
2763
|
-
{
|
|
2764
|
-
"kind": "field",
|
|
2765
|
-
"name": "items",
|
|
2766
|
-
"type": {
|
|
2767
|
-
"text": "TreeMenuItem[]"
|
|
2768
|
-
},
|
|
2769
|
-
"optional": false,
|
|
2770
|
-
"description": "Items for the menu"
|
|
2771
|
-
},
|
|
2772
2843
|
{
|
|
2773
2844
|
"kind": "field",
|
|
2774
2845
|
"name": "listType",
|
|
@@ -2776,7 +2847,7 @@
|
|
|
2776
2847
|
"text": "\"ul\" | \"ol\""
|
|
2777
2848
|
},
|
|
2778
2849
|
"optional": true,
|
|
2779
|
-
"description": "List element type
|
|
2850
|
+
"description": "List element type",
|
|
2780
2851
|
"default": "\"ul\""
|
|
2781
2852
|
},
|
|
2782
2853
|
{
|
|
@@ -2788,12 +2859,60 @@
|
|
|
2788
2859
|
"optional": true,
|
|
2789
2860
|
"description": "Theme",
|
|
2790
2861
|
"default": "\"light\""
|
|
2862
|
+
},
|
|
2863
|
+
{
|
|
2864
|
+
"kind": "field",
|
|
2865
|
+
"name": "storageKey",
|
|
2866
|
+
"type": {
|
|
2867
|
+
"text": "string"
|
|
2868
|
+
},
|
|
2869
|
+
"optional": true,
|
|
2870
|
+
"description": "When provided, expanded/collapsed states are saved to `sessionStorage` under this key and restored on page load. Item states are keyed by each the `label` prop."
|
|
2791
2871
|
}
|
|
2792
2872
|
],
|
|
2793
2873
|
"events": []
|
|
2794
2874
|
}
|
|
2795
2875
|
]
|
|
2796
2876
|
},
|
|
2877
|
+
{
|
|
2878
|
+
"kind": "javascript-module",
|
|
2879
|
+
"path": "dist/web-components.js",
|
|
2880
|
+
"declarations": [
|
|
2881
|
+
{
|
|
2882
|
+
"kind": "custom-element",
|
|
2883
|
+
"name": "GTreeMenuListElement",
|
|
2884
|
+
"tagName": "g-tree-menu-list",
|
|
2885
|
+
"members": [],
|
|
2886
|
+
"events": []
|
|
2887
|
+
}
|
|
2888
|
+
]
|
|
2889
|
+
},
|
|
2890
|
+
{
|
|
2891
|
+
"kind": "javascript-module",
|
|
2892
|
+
"path": "dist/web-components.js",
|
|
2893
|
+
"declarations": [
|
|
2894
|
+
{
|
|
2895
|
+
"kind": "custom-element",
|
|
2896
|
+
"name": "GTreeMenuItemElement",
|
|
2897
|
+
"tagName": "g-tree-menu-item",
|
|
2898
|
+
"members": [],
|
|
2899
|
+
"events": [
|
|
2900
|
+
{
|
|
2901
|
+
"name": "expand",
|
|
2902
|
+
"type": {
|
|
2903
|
+
"text": "CustomEvent"
|
|
2904
|
+
}
|
|
2905
|
+
},
|
|
2906
|
+
{
|
|
2907
|
+
"name": "collapse",
|
|
2908
|
+
"type": {
|
|
2909
|
+
"text": "CustomEvent"
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
]
|
|
2913
|
+
}
|
|
2914
|
+
]
|
|
2915
|
+
},
|
|
2797
2916
|
{
|
|
2798
2917
|
"kind": "javascript-module",
|
|
2799
2918
|
"path": "dist/web-components.js",
|
|
@@ -26,6 +26,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
26
26
|
* @demo
|
|
27
27
|
*/
|
|
28
28
|
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Required
|
|
31
|
+
* @demo
|
|
32
|
+
*/
|
|
33
|
+
required?: boolean;
|
|
29
34
|
/**
|
|
30
35
|
* Error messages array (supports multiple validation errors)
|
|
31
36
|
*/
|
|
@@ -63,6 +68,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
63
68
|
* @demo
|
|
64
69
|
*/
|
|
65
70
|
disabled?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Required
|
|
73
|
+
* @demo
|
|
74
|
+
*/
|
|
75
|
+
required?: boolean;
|
|
66
76
|
/**
|
|
67
77
|
* Error messages array (supports multiple validation errors)
|
|
68
78
|
*/
|
|
@@ -90,6 +100,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
90
100
|
name: string;
|
|
91
101
|
instructions: string;
|
|
92
102
|
errors: string[];
|
|
103
|
+
required: boolean;
|
|
93
104
|
formKey: string;
|
|
94
105
|
disabled: boolean;
|
|
95
106
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -26,6 +26,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
26
26
|
* @demo
|
|
27
27
|
*/
|
|
28
28
|
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Required
|
|
31
|
+
* @demo
|
|
32
|
+
*/
|
|
33
|
+
required?: boolean;
|
|
29
34
|
/**
|
|
30
35
|
* Error messages array (supports multiple validation errors)
|
|
31
36
|
*/
|
|
@@ -63,6 +68,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
63
68
|
* @demo
|
|
64
69
|
*/
|
|
65
70
|
disabled?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Required
|
|
73
|
+
* @demo
|
|
74
|
+
*/
|
|
75
|
+
required?: boolean;
|
|
66
76
|
/**
|
|
67
77
|
* Error messages array (supports multiple validation errors)
|
|
68
78
|
*/
|
|
@@ -90,6 +100,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
90
100
|
name: string;
|
|
91
101
|
instructions: string;
|
|
92
102
|
errors: string[];
|
|
103
|
+
required: boolean;
|
|
93
104
|
formKey: string;
|
|
94
105
|
disabled: boolean;
|
|
95
106
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -31,6 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
31
31
|
* @demo
|
|
32
32
|
*/
|
|
33
33
|
disabled?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Required
|
|
36
|
+
* @demo
|
|
37
|
+
*/
|
|
38
|
+
required?: boolean;
|
|
34
39
|
/**
|
|
35
40
|
* Error messages array (supports multiple validation errors)
|
|
36
41
|
*/
|
|
@@ -79,6 +84,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
79
84
|
* @demo
|
|
80
85
|
*/
|
|
81
86
|
disabled?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Required
|
|
89
|
+
* @demo
|
|
90
|
+
*/
|
|
91
|
+
required?: boolean;
|
|
82
92
|
/**
|
|
83
93
|
* Error messages array (supports multiple validation errors)
|
|
84
94
|
*/
|
|
@@ -111,6 +121,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
111
121
|
name: string;
|
|
112
122
|
instructions: string;
|
|
113
123
|
errors: string[];
|
|
124
|
+
required: boolean;
|
|
114
125
|
formKey: string;
|
|
115
126
|
disabled: boolean;
|
|
116
127
|
startLabel: string;
|
|
@@ -22,6 +22,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
22
22
|
* @demo
|
|
23
23
|
*/
|
|
24
24
|
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Required
|
|
27
|
+
* @demo
|
|
28
|
+
*/
|
|
29
|
+
required?: boolean;
|
|
25
30
|
/**
|
|
26
31
|
* Error messages array (supports multiple validation errors)
|
|
27
32
|
*/
|
|
@@ -55,6 +60,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
55
60
|
* @demo
|
|
56
61
|
*/
|
|
57
62
|
disabled?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Required
|
|
65
|
+
* @demo
|
|
66
|
+
*/
|
|
67
|
+
required?: boolean;
|
|
58
68
|
/**
|
|
59
69
|
* Error messages array (supports multiple validation errors)
|
|
60
70
|
*/
|
|
@@ -78,5 +88,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
78
88
|
name: string;
|
|
79
89
|
instructions: string;
|
|
80
90
|
errors: string[];
|
|
91
|
+
required: boolean;
|
|
81
92
|
disabled: boolean;
|
|
82
93
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -49,6 +49,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
49
49
|
* @demo
|
|
50
50
|
*/
|
|
51
51
|
disabled?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Required
|
|
54
|
+
* @demo
|
|
55
|
+
*/
|
|
56
|
+
required?: boolean;
|
|
52
57
|
/**
|
|
53
58
|
* Name for form registration
|
|
54
59
|
*/
|
|
@@ -96,6 +101,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
96
101
|
* @demo
|
|
97
102
|
*/
|
|
98
103
|
disabled?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Required
|
|
106
|
+
* @demo
|
|
107
|
+
*/
|
|
108
|
+
required?: boolean;
|
|
99
109
|
/**
|
|
100
110
|
* Name for form registration
|
|
101
111
|
*/
|
|
@@ -120,6 +130,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
120
130
|
onChange?: ((value: (string | number)[]) => any) | undefined;
|
|
121
131
|
}>, {
|
|
122
132
|
errors: string[];
|
|
133
|
+
required: boolean;
|
|
123
134
|
disabled: boolean;
|
|
124
135
|
hiddenLabel: boolean;
|
|
125
136
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -43,6 +43,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
43
43
|
* @demo
|
|
44
44
|
*/
|
|
45
45
|
disabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Required
|
|
48
|
+
* @demo
|
|
49
|
+
*/
|
|
50
|
+
required?: boolean;
|
|
46
51
|
/**
|
|
47
52
|
* Name for form registration
|
|
48
53
|
*/
|
|
@@ -102,6 +107,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
102
107
|
* @demo
|
|
103
108
|
*/
|
|
104
109
|
disabled?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Required
|
|
112
|
+
* @demo
|
|
113
|
+
*/
|
|
114
|
+
required?: boolean;
|
|
105
115
|
/**
|
|
106
116
|
* Name for form registration
|
|
107
117
|
*/
|
|
@@ -136,6 +146,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
136
146
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
137
147
|
}>, {
|
|
138
148
|
errors: string[];
|
|
149
|
+
required: boolean;
|
|
139
150
|
disabled: boolean;
|
|
140
151
|
searchable: boolean;
|
|
141
152
|
compact: boolean;
|
|
@@ -40,6 +40,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
40
40
|
* @demo
|
|
41
41
|
*/
|
|
42
42
|
disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Required
|
|
45
|
+
* @demo
|
|
46
|
+
*/
|
|
47
|
+
required?: boolean;
|
|
43
48
|
/**
|
|
44
49
|
* Error messages array (supports multiple validation errors)
|
|
45
50
|
*/
|
|
@@ -80,6 +85,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
80
85
|
* @demo
|
|
81
86
|
*/
|
|
82
87
|
disabled?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Required
|
|
90
|
+
* @demo
|
|
91
|
+
*/
|
|
92
|
+
required?: boolean;
|
|
83
93
|
/**
|
|
84
94
|
* Error messages array (supports multiple validation errors)
|
|
85
95
|
*/
|
|
@@ -97,6 +107,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
97
107
|
size: "small" | "medium" | "large";
|
|
98
108
|
name: string;
|
|
99
109
|
errors: string[];
|
|
110
|
+
required: boolean;
|
|
100
111
|
formKey: string;
|
|
101
112
|
disabled: boolean;
|
|
102
113
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -30,6 +30,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
30
30
|
* @demo
|
|
31
31
|
*/
|
|
32
32
|
disabled?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Required
|
|
35
|
+
* @demo
|
|
36
|
+
*/
|
|
37
|
+
required?: boolean;
|
|
33
38
|
/**
|
|
34
39
|
* Error messages array (supports multiple validation errors)
|
|
35
40
|
*/
|
|
@@ -86,6 +91,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
86
91
|
* @demo
|
|
87
92
|
*/
|
|
88
93
|
disabled?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Required
|
|
96
|
+
* @demo
|
|
97
|
+
*/
|
|
98
|
+
required?: boolean;
|
|
89
99
|
/**
|
|
90
100
|
* Error messages array (supports multiple validation errors)
|
|
91
101
|
*/
|
|
@@ -132,6 +142,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
132
142
|
name: string;
|
|
133
143
|
instructions: string;
|
|
134
144
|
errors: string[];
|
|
145
|
+
required: boolean;
|
|
135
146
|
formKey: string;
|
|
136
147
|
disabled: boolean;
|
|
137
148
|
prefix: string;
|
|
@@ -1,20 +1,37 @@
|
|
|
1
|
-
import type { TreeMenuItem } from "./tree-menu/GTreeMenuList.vue";
|
|
2
1
|
/**
|
|
3
2
|
* A hierarchical sidebar menu component suitable for book-like or nested-section
|
|
4
3
|
* navigation. Items with children start collapsed and can be expanded/collapsed
|
|
5
4
|
* individually.
|
|
6
5
|
*
|
|
6
|
+
* Links are authored directly in HTML for progressive enhancement — the page
|
|
7
|
+
* works as a basic list of links even without JavaScript.
|
|
8
|
+
*
|
|
9
|
+
* Use `GTreeMenuList` and `GTreeMenuItem` sub-components to build the menu:
|
|
10
|
+
*
|
|
11
|
+
* ```vue-html
|
|
12
|
+
* <GTreeMenu title="Contents">
|
|
13
|
+
* <GTreeMenuList>
|
|
14
|
+
* <GTreeMenuItem label="Chapter 1">
|
|
15
|
+
* <a href="#ch1">Chapter 1</a>
|
|
16
|
+
* <template #children>
|
|
17
|
+
* <GTreeMenuItem><a href="#s1">Section 1.1</a></GTreeMenuItem>
|
|
18
|
+
* </template>
|
|
19
|
+
* </GTreeMenuItem>
|
|
20
|
+
* </GTreeMenuList>
|
|
21
|
+
* </GTreeMenu>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
7
24
|
* **Props**:
|
|
8
25
|
*
|
|
9
26
|
* - `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
27
|
* - `listType` - `ul` (default) or `ol`. Use `ol` for numbered
|
|
16
|
-
* hierarchies such as book chapters.
|
|
28
|
+
* hierarchies such as book chapters. Inherited by nested `GTreeMenuList`
|
|
29
|
+
* components via provide/inject.
|
|
17
30
|
* - `theme` - `light` (default) or `dark`.
|
|
31
|
+
* - `storageKey` - when provided, expanded/collapsed states are persisted to
|
|
32
|
+
* `sessionStorage` under this key and restored on page load. This is useful
|
|
33
|
+
* in Web Component / Drupal contexts where every page navigation is a full
|
|
34
|
+
* refresh. Item states are keyed by the item's `label` prop.
|
|
18
35
|
*
|
|
19
36
|
* **Keyboard navigation** (tree-view style):
|
|
20
37
|
*
|
|
@@ -26,18 +43,14 @@ import type { TreeMenuItem } from "./tree-menu/GTreeMenuList.vue";
|
|
|
26
43
|
*/
|
|
27
44
|
declare const _default: typeof __VLS_export;
|
|
28
45
|
export default _default;
|
|
29
|
-
declare const __VLS_export: import("vue").DefineComponent<{
|
|
46
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
30
47
|
/**
|
|
31
48
|
* Title and accessible name for the nav landmark
|
|
32
49
|
* @demo Tree Menu
|
|
33
50
|
*/
|
|
34
51
|
title?: string;
|
|
35
52
|
/**
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
items: TreeMenuItem[];
|
|
39
|
-
/**
|
|
40
|
-
* List element type - use `ol` for numbered hierarchies like book chapters
|
|
53
|
+
* List element type
|
|
41
54
|
* @demo
|
|
42
55
|
*/
|
|
43
56
|
listType?: "ul" | "ol";
|
|
@@ -46,6 +59,12 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
46
59
|
* @demo
|
|
47
60
|
*/
|
|
48
61
|
theme?: "light" | "dark";
|
|
62
|
+
/**
|
|
63
|
+
* When provided, expanded/collapsed states are saved to `sessionStorage`
|
|
64
|
+
* under this key and restored on page load. Item states are keyed by each
|
|
65
|
+
* the `label` prop.
|
|
66
|
+
*/
|
|
67
|
+
storageKey?: string;
|
|
49
68
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
50
69
|
/**
|
|
51
70
|
* Title and accessible name for the nav landmark
|
|
@@ -53,11 +72,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
53
72
|
*/
|
|
54
73
|
title?: string;
|
|
55
74
|
/**
|
|
56
|
-
*
|
|
57
|
-
*/
|
|
58
|
-
items: TreeMenuItem[];
|
|
59
|
-
/**
|
|
60
|
-
* List element type - use `ol` for numbered hierarchies like book chapters
|
|
75
|
+
* List element type
|
|
61
76
|
* @demo
|
|
62
77
|
*/
|
|
63
78
|
listType?: "ul" | "ol";
|
|
@@ -66,7 +81,20 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
66
81
|
* @demo
|
|
67
82
|
*/
|
|
68
83
|
theme?: "light" | "dark";
|
|
84
|
+
/**
|
|
85
|
+
* When provided, expanded/collapsed states are saved to `sessionStorage`
|
|
86
|
+
* under this key and restored on page load. Item states are keyed by each
|
|
87
|
+
* the `label` prop.
|
|
88
|
+
*/
|
|
89
|
+
storageKey?: string;
|
|
69
90
|
}> & Readonly<{}>, {
|
|
70
91
|
theme: "light" | "dark";
|
|
71
92
|
listType: "ul" | "ol";
|
|
72
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any
|
|
93
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
94
|
+
default?: (props: {}) => any;
|
|
95
|
+
}>;
|
|
96
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
97
|
+
new (): {
|
|
98
|
+
$slots: S;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
4
|
+
/**
|
|
5
|
+
* Accessible label used for the toggle button's aria-label when the
|
|
6
|
+
* item has children (e.g. "Chapter 1" → "Chapter 1 sub-menu").
|
|
7
|
+
*/
|
|
8
|
+
label?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the item starts expanded. Only meaningful for items that
|
|
11
|
+
* have a `#children` slot. When a `storageKey` is active on the parent
|
|
12
|
+
* `GTreeMenu` and a stored value exists for this item's `label`, the
|
|
13
|
+
* stored value takes precedence over this prop and subsequent prop
|
|
14
|
+
* updates are ignored for that item.
|
|
15
|
+
* @demo
|
|
16
|
+
*/
|
|
17
|
+
expanded?: boolean;
|
|
18
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
expand: () => any;
|
|
20
|
+
collapse: () => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
22
|
+
/**
|
|
23
|
+
* Accessible label used for the toggle button's aria-label when the
|
|
24
|
+
* item has children (e.g. "Chapter 1" → "Chapter 1 sub-menu").
|
|
25
|
+
*/
|
|
26
|
+
label?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the item starts expanded. Only meaningful for items that
|
|
29
|
+
* have a `#children` slot. When a `storageKey` is active on the parent
|
|
30
|
+
* `GTreeMenu` and a stored value exists for this item's `label`, the
|
|
31
|
+
* stored value takes precedence over this prop and subsequent prop
|
|
32
|
+
* updates are ignored for that item.
|
|
33
|
+
* @demo
|
|
34
|
+
*/
|
|
35
|
+
expanded?: boolean;
|
|
36
|
+
}> & Readonly<{
|
|
37
|
+
onExpand?: (() => any) | undefined;
|
|
38
|
+
onCollapse?: (() => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
expanded: boolean;
|
|
41
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
42
|
+
default?: (props: {}) => any;
|
|
43
|
+
} & {
|
|
44
|
+
default?: (props: {}) => any;
|
|
45
|
+
} & {
|
|
46
|
+
children?: (props: {}) => any;
|
|
47
|
+
}>;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* List wrapper for `GTreeMenuItem` items inside a `GTreeMenu`.
|
|
3
|
+
* Renders as `<ul>` or `<ol>` depending on the `listType` prop.
|
|
4
|
+
* When no `listType` is specified the value provided by the parent
|
|
5
|
+
* `GTreeMenu` (via provide/inject) is used, falling back to `ul`.
|
|
6
|
+
*/
|
|
7
7
|
declare const _default: typeof __VLS_export;
|
|
8
8
|
export default _default;
|
|
9
|
-
declare const __VLS_export: import("vue").DefineComponent<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
10
|
+
/**
|
|
11
|
+
* List element type (`ul` or `ol`).
|
|
12
|
+
*/
|
|
13
|
+
listType?: "ul" | "ol";
|
|
14
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
15
|
+
/**
|
|
16
|
+
* List element type (`ul` or `ol`).
|
|
17
|
+
*/
|
|
18
|
+
listType?: "ul" | "ol";
|
|
19
|
+
}> & Readonly<{}>, {
|
|
18
20
|
listType: "ul" | "ol";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
22
|
+
default?: (props: {}) => any;
|
|
23
|
+
}>;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|