@illinois-grad/grad-vue 2.5.0 → 2.5.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.
Files changed (41) hide show
  1. package/custom-elements.json +539 -1
  2. package/dist/components/GButton.vue.d.ts +9 -0
  3. package/dist/components/GCheckboxGroup.vue.d.ts +120 -0
  4. package/dist/components/GCurrencyInput.vue.d.ts +15 -2
  5. package/dist/components/GDateInput.vue.d.ts +15 -2
  6. package/dist/components/GDateRangeInput.vue.d.ts +15 -2
  7. package/dist/components/GEmailInput.vue.d.ts +2 -2
  8. package/dist/components/GFileInput.vue.d.ts +138 -0
  9. package/dist/components/GForm.vue.d.ts +13 -0
  10. package/dist/components/GHamburgerMenu.vue.d.ts +13 -0
  11. package/dist/components/GModal.vue.d.ts +0 -6
  12. package/dist/components/GPopover.vue.d.ts +24 -8
  13. package/dist/components/GSelect.vue.d.ts +14 -1
  14. package/dist/components/GSelectButton.vue.d.ts +14 -1
  15. package/dist/components/GSidebar.vue.d.ts +14 -0
  16. package/dist/components/GSubmitButton.vue.d.ts +15 -0
  17. package/dist/components/GTextInput.vue.d.ts +15 -2
  18. package/dist/components/GTextarea.vue.d.ts +170 -0
  19. package/dist/components/GTooltip.vue.d.ts +37 -0
  20. package/dist/compose/tooltipDom.d.ts +6 -0
  21. package/dist/compose/useCustomElementAttrs.d.ts +14 -0
  22. package/dist/compose/useFormField.d.ts +4 -0
  23. package/dist/compose/useOverlayFocus.d.ts +1 -1
  24. package/dist/compose/useWebComponentForm.d.ts +2 -0
  25. package/dist/compose/useWebComponentSidebar.d.ts +9 -0
  26. package/dist/grad-vue-_KJazv6D.js +3829 -0
  27. package/dist/grad-vue-_KJazv6D.js.map +1 -0
  28. package/dist/grad-vue-elements.css +2 -1
  29. package/dist/grad-vue-elements.d.ts +12 -0
  30. package/dist/grad-vue-elements.js +8435 -9418
  31. package/dist/grad-vue-elements.js.map +1 -1
  32. package/dist/grad-vue.css +2 -1
  33. package/dist/grad-vue.d.ts +8 -1
  34. package/dist/grad-vue.js +2 -240
  35. package/dist/plugin.d.ts +4 -1
  36. package/dist/plugin.js +9 -12
  37. package/dist/plugin.js.map +1 -1
  38. package/package.json +1 -1
  39. package/dist/grad-vue.js.map +0 -1
  40. package/dist/main-D8BC78tE.js +0 -3394
  41. package/dist/main-D8BC78tE.js.map +0 -1
@@ -5,6 +5,10 @@
5
5
  * - Show a loading state during form submission
6
6
  * - Be disabled when specified
7
7
  *
8
+ * In standard Vue usage, this resolves the nearest parent `GForm` via
9
+ * injection. In custom-elements mode, use matching `form-key` values to pair
10
+ * with a `GForm`.
11
+ *
8
12
  * @example
9
13
  * <GForm v-model="formData" @submit="handleSubmit">
10
14
  * <GTextInput name="email" label="Email" />
@@ -29,6 +33,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
29
33
  * @demo
30
34
  */
31
35
  variant?: "primary" | "secondary" | "danger";
36
+ /**
37
+ * Form channel key for custom elements mode
38
+ * @demo
39
+ */
40
+ formKey?: string;
32
41
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
33
42
  /**
34
43
  * Disabled state
@@ -45,7 +54,13 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
45
54
  * @demo
46
55
  */
47
56
  variant?: "primary" | "secondary" | "danger";
57
+ /**
58
+ * Form channel key for custom elements mode
59
+ * @demo
60
+ */
61
+ formKey?: string;
48
62
  }> & Readonly<{}>, {
63
+ formKey: string;
49
64
  disabled: boolean;
50
65
  variant: "primary" | "secondary" | "danger";
51
66
  loadingText: string;
@@ -5,6 +5,10 @@
5
5
  * All non-prop attributes are passed through to the input element, including
6
6
  * `id`.
7
7
  *
8
+ * In standard Vue usage, this registers with the nearest parent `GForm` via
9
+ * injection. In custom-elements mode, use matching `form-key` values to pair
10
+ * with a `GForm`.
11
+ *
8
12
  * Errors are provided as an array of strings or computed values.
9
13
  * Multiple errors will all be displayed.
10
14
  */
@@ -54,6 +58,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
54
58
  * Name for form registration
55
59
  */
56
60
  name?: string;
61
+ /**
62
+ * Form channel key for custom elements mode
63
+ */
64
+ formKey?: string;
57
65
  } & {
58
66
  modelValue?: string | null;
59
67
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -106,6 +114,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
106
114
  * Name for form registration
107
115
  */
108
116
  name?: string;
117
+ /**
118
+ * Form channel key for custom elements mode
119
+ */
120
+ formKey?: string;
109
121
  } & {
110
122
  modelValue?: string | null;
111
123
  }> & Readonly<{
@@ -118,9 +130,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
118
130
  label: string;
119
131
  placeholder: string;
120
132
  name: string;
121
- disabled: boolean;
122
- errors: string[];
123
133
  instructions: string;
134
+ errors: string[];
135
+ formKey: string;
136
+ disabled: boolean;
124
137
  prefix: string;
125
138
  suffix: string;
126
139
  debounce: number;
@@ -0,0 +1,170 @@
1
+ /**
2
+ * A multi-line plain text input with styling for a label, instructions,
3
+ * and error messages.
4
+ *
5
+ * If `label` is omitted, an accessible label must be provided some other way.
6
+ * All non-prop attributes are passed through to the textarea element, including
7
+ * `id`.
8
+ *
9
+ * In standard Vue usage, this registers with the nearest parent `GForm` via
10
+ * injection. In custom-elements mode, use matching `form-key` values to pair
11
+ * with a `GForm`.
12
+ *
13
+ * Errors are provided as an array of strings or computed values.
14
+ * Multiple errors will all be displayed.
15
+ */
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
19
+ /**
20
+ * Label
21
+ * @demo Example Label
22
+ */
23
+ label?: string;
24
+ /**
25
+ * Placeholder text
26
+ * @demo
27
+ */
28
+ placeholder?: string;
29
+ /**
30
+ * Disabled
31
+ * @demo
32
+ */
33
+ disabled?: boolean;
34
+ /**
35
+ * Read-only
36
+ * @demo
37
+ */
38
+ readonly?: boolean;
39
+ /**
40
+ * Required
41
+ * @demo
42
+ */
43
+ required?: boolean;
44
+ /**
45
+ * Error messages array (supports multiple validation errors)
46
+ */
47
+ errors?: string[];
48
+ /**
49
+ * Instructions
50
+ * @demo
51
+ */
52
+ instructions?: string;
53
+ /**
54
+ * Number of visible text rows
55
+ * @demo
56
+ */
57
+ rows?: number;
58
+ /**
59
+ * Maximum number of characters allowed
60
+ * @demo
61
+ */
62
+ maxlength?: number;
63
+ /**
64
+ * Automatically grow the textarea height to fit content
65
+ * @demo
66
+ */
67
+ autoGrow?: boolean;
68
+ /**
69
+ * Name for form registration
70
+ */
71
+ name?: string;
72
+ /**
73
+ * Form channel key for custom elements mode
74
+ */
75
+ formKey?: string;
76
+ } & {
77
+ modelValue?: string | null;
78
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
79
+ "update:modelValue": (value: string | null | undefined) => any;
80
+ change: (args_0: {
81
+ was: string | null | undefined;
82
+ to: string | null;
83
+ }) => any;
84
+ }, string, import("vue").PublicProps, Readonly<{
85
+ /**
86
+ * Label
87
+ * @demo Example Label
88
+ */
89
+ label?: string;
90
+ /**
91
+ * Placeholder text
92
+ * @demo
93
+ */
94
+ placeholder?: string;
95
+ /**
96
+ * Disabled
97
+ * @demo
98
+ */
99
+ disabled?: boolean;
100
+ /**
101
+ * Read-only
102
+ * @demo
103
+ */
104
+ readonly?: boolean;
105
+ /**
106
+ * Required
107
+ * @demo
108
+ */
109
+ required?: boolean;
110
+ /**
111
+ * Error messages array (supports multiple validation errors)
112
+ */
113
+ errors?: string[];
114
+ /**
115
+ * Instructions
116
+ * @demo
117
+ */
118
+ instructions?: string;
119
+ /**
120
+ * Number of visible text rows
121
+ * @demo
122
+ */
123
+ rows?: number;
124
+ /**
125
+ * Maximum number of characters allowed
126
+ * @demo
127
+ */
128
+ maxlength?: number;
129
+ /**
130
+ * Automatically grow the textarea height to fit content
131
+ * @demo
132
+ */
133
+ autoGrow?: boolean;
134
+ /**
135
+ * Name for form registration
136
+ */
137
+ name?: string;
138
+ /**
139
+ * Form channel key for custom elements mode
140
+ */
141
+ formKey?: string;
142
+ } & {
143
+ modelValue?: string | null;
144
+ }> & Readonly<{
145
+ "onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
146
+ onChange?: ((args_0: {
147
+ was: string | null | undefined;
148
+ to: string | null;
149
+ }) => any) | undefined;
150
+ }>, {
151
+ label: string;
152
+ placeholder: string;
153
+ name: string;
154
+ instructions: string;
155
+ errors: string[];
156
+ required: boolean;
157
+ formKey: string;
158
+ disabled: boolean;
159
+ readonly: boolean;
160
+ rows: number;
161
+ maxlength: number;
162
+ autoGrow: boolean;
163
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
164
+ instructions?: (props: {}) => any;
165
+ }>;
166
+ type __VLS_WithSlots<T, S> = T & {
167
+ new (): {
168
+ $slots: S;
169
+ };
170
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Tooltip for concise contextual help text.
3
+ *
4
+ * The `trigger` slot is optional. Without a trigger slot, the tooltip anchors
5
+ * to the previous sibling element and can still be controlled via exposed
6
+ * methods.
7
+ */
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
10
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
11
+ /**
12
+ * Tooltip text
13
+ * @demo
14
+ */
15
+ text: string;
16
+ }, {
17
+ show: () => void;
18
+ hide: () => void;
19
+ toggle: () => void;
20
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ "tooltip-hide": (...args: any[]) => void;
22
+ }, string, import("vue").PublicProps, Readonly<{
23
+ /**
24
+ * Tooltip text
25
+ * @demo
26
+ */
27
+ text: string;
28
+ }> & Readonly<{
29
+ "onTooltip-hide"?: ((...args: any[]) => any) | undefined;
30
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
31
+ trigger?: (props: {}) => any;
32
+ }>;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,6 @@
1
+ export declare function nextTooltipId(prefix?: string): string;
2
+ export declare function resolveTooltipId(el: HTMLElement, prefix?: string): string;
3
+ export declare function createTooltipEl(text: string, id: string): HTMLDivElement;
4
+ export declare function appendTooltipEl(tooltip: HTMLElement): void;
5
+ export declare function showTooltip(anchor: HTMLElement, tooltip: HTMLElement): void;
6
+ export declare function hideTooltip(tooltip: HTMLElement): void;
@@ -0,0 +1,14 @@
1
+ type UseCustomElementAttrsOptions = {
2
+ omitInCustomElement?: string[];
3
+ };
4
+ export declare function isCustomElementMode(): boolean;
5
+ export declare function useCustomElementAttrs(options?: UseCustomElementAttrsOptions): {
6
+ attrs: {
7
+ [x: string]: unknown;
8
+ };
9
+ isCustomElement: boolean;
10
+ forwardedAttrs: import("vue").ComputedRef<{
11
+ [x: string]: unknown;
12
+ }>;
13
+ };
14
+ export {};
@@ -12,6 +12,10 @@ export interface UseFormFieldOptions {
12
12
  * Error messages from props (optional) - should be a reactive reference
13
13
  */
14
14
  errors?: Ref<string[]> | ComputedRef<string[]>;
15
+ /**
16
+ * Form channel key for custom elements mode
17
+ */
18
+ formKey?: string;
15
19
  }
16
20
  export interface UseFormFieldReturn {
17
21
  /**
@@ -1,6 +1,6 @@
1
1
  import { Ref } from "vue";
2
2
  export declare function useOverlayFocus(element: Ref<HTMLElement | null>, isTop: Ref<boolean>, clickOutsideDeactivates?: boolean): {
3
- activate: (opts?: import("focus-trap").ActivateOptions) => void;
3
+ activate: () => void;
4
4
  deactivate: (opts?: import("focus-trap").DeactivateOptions) => void;
5
5
  pause: import("@vueuse/shared").Fn;
6
6
  unpause: import("@vueuse/shared").Fn;
@@ -0,0 +1,2 @@
1
+ import { UseFormReturn } from "./useForm";
2
+ export declare function useWebComponentForm(key?: string): UseFormReturn;
@@ -0,0 +1,9 @@
1
+ import { Ref } from "vue";
2
+ type SidebarChannel = {
3
+ id: string;
4
+ open: Ref<boolean>;
5
+ isCollapsible: Ref<boolean>;
6
+ toggle: () => void;
7
+ };
8
+ export declare function useWebComponentSidebar(key?: string, breakpoint?: Ref<string> | string): SidebarChannel;
9
+ export {};