@web-site-utilities/feedback 0.0.6 → 0.0.7

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/index.d.ts CHANGED
@@ -1,8 +1,12 @@
1
+ import { CommonFieldProps } from '@web-site-utilities/common/types/CommonFieldProps';
1
2
  import { Container } from 'react-dom/client';
2
3
  import { default as default_2 } from 'react';
3
4
  import { FormConfigTheme } from '@web-site-utilities/common/types/FormConfig';
5
+ import { FormError } from '@web-site-utilities/common/types/FormError';
4
6
  import { InlineForm } from '@web-site-utilities/common/types/FormConfig';
5
7
  import { Locale } from '@web-site-utilities/common/types/Locale';
8
+ import { Nullable } from '@web-site-utilities/common/types/Nullable';
9
+ import { Options } from '@web-site-utilities/common/types/Option';
6
10
  import { PopupForm } from '@web-site-utilities/common/types/FormConfig';
7
11
  import { theme } from '@web-site-utilities/common/theme/ThemeProvider';
8
12
  import { Variants } from '@web-site-utilities/common/theme/ThemeProvider';
@@ -56,6 +60,172 @@ export declare const renderFeedbackModule: (options: InitiateFeedbackModuleOptio
56
60
  locale?: Locale;
57
61
  }> | null;
58
62
 
63
+ export declare const SurveyFormComponents: {
64
+ Checkbox: (props: {
65
+ options: Options;
66
+ onChange: (value: Array<string>) => void;
67
+ elementsPerCol?: number;
68
+ colorVariant?: Variants;
69
+ value: Array<string>;
70
+ label: string;
71
+ } & CommonFieldProps) => default_2.DetailedReactHTMLElement<{
72
+ children: (default_2.FunctionComponentElement<{
73
+ variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
74
+ linear?: boolean;
75
+ children?: default_2.ReactNode;
76
+ }> | default_2.DOMElement<{
77
+ children: default_2.DOMElement<{
78
+ key: number;
79
+ children: default_2.FunctionComponentElement<{
80
+ label: string;
81
+ onSelect: (value: Array<string>) => void;
82
+ value: Array<string>;
83
+ id: string;
84
+ colorVariant?: Variants | undefined;
85
+ name: string;
86
+ }>[];
87
+ }, Element>[];
88
+ }, Element> | default_2.FunctionComponentElement<{
89
+ errors?: FormError[];
90
+ }>)[];
91
+ }, HTMLElement>;
92
+ QuestionMatrix: (props: {
93
+ value: Nullable<number>;
94
+ minText?: string;
95
+ colorVariant?: Variants;
96
+ maxText?: string;
97
+ onChange: (value: number) => void;
98
+ label: string;
99
+ max: number;
100
+ } & CommonFieldProps) => default_2.DetailedReactHTMLElement<{
101
+ children: (default_2.FunctionComponentElement<{
102
+ variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
103
+ linear?: boolean;
104
+ children?: default_2.ReactNode;
105
+ }> | default_2.FunctionComponentElement<{
106
+ errors?: FormError[];
107
+ }> | default_2.DOMElement<{
108
+ withText: string | undefined;
109
+ children: (default_2.DOMElement<{
110
+ min: boolean;
111
+ children: string;
112
+ }, Element> | default_2.FunctionComponentElement<{
113
+ onChange: () => void;
114
+ colorVariant?: Variants;
115
+ label: string;
116
+ selected: boolean;
117
+ }>[] | null)[];
118
+ }, Element>)[];
119
+ }, HTMLElement>;
120
+ Radio: (props: {
121
+ options: Options;
122
+ onChange: (value: string) => void;
123
+ value: Nullable<string>;
124
+ elementsPerCol?: number;
125
+ colorVariant?: Variants;
126
+ label: string;
127
+ } & CommonFieldProps) => default_2.DetailedReactHTMLElement<{
128
+ children: (default_2.FunctionComponentElement<{
129
+ variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
130
+ linear?: boolean;
131
+ children?: default_2.ReactNode;
132
+ }> | default_2.FunctionComponentElement<{
133
+ errors?: FormError[];
134
+ }> | default_2.DOMElement<{
135
+ children: default_2.DOMElement<{
136
+ children: default_2.FunctionComponentElement<{
137
+ label: string;
138
+ onSelect: (value: string) => void;
139
+ colorVariant?: Variants | undefined;
140
+ value: Nullable<string>;
141
+ id: string;
142
+ name: string;
143
+ }>[];
144
+ }, Element>[];
145
+ }, Element>)[];
146
+ }, HTMLElement>;
147
+ Rating: ({ value, max, errors, label, onChange }: {
148
+ value: number;
149
+ label: string;
150
+ onChange: (value: number) => void;
151
+ max: number;
152
+ } & Omit<{
153
+ colorVariant?: Variants;
154
+ selected: boolean;
155
+ size?: "small" | "medium" | "large";
156
+ icon?: "star" | "star2" | "heart";
157
+ }, "selected"> & CommonFieldProps) => default_2.DOMElement<{
158
+ value: number;
159
+ max: number;
160
+ children: (default_2.FunctionComponentElement<{
161
+ variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
162
+ linear?: boolean;
163
+ children?: default_2.ReactNode;
164
+ }> | default_2.FunctionComponentElement<{
165
+ errors?: FormError[];
166
+ }> | default_2.DOMElement<{
167
+ selected: boolean;
168
+ name: string;
169
+ key: string;
170
+ onChange: () => void;
171
+ type: string;
172
+ }, Element>[])[];
173
+ }, Element>;
174
+ Select: (props: {
175
+ label: string;
176
+ value: Nullable<string>;
177
+ colorVariant?: Variants;
178
+ onChange: (value: string) => void;
179
+ options: Options;
180
+ } & CommonFieldProps) => default_2.DetailedReactHTMLElement<{
181
+ children: (default_2.FunctionComponentElement<{
182
+ variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
183
+ linear?: boolean;
184
+ children?: default_2.ReactNode;
185
+ }> | default_2.FunctionComponentElement<{
186
+ errors?: FormError[];
187
+ }> | default_2.DOMElement<{
188
+ colorVariant: Variants | undefined;
189
+ value: string | null;
190
+ defaultChecked: boolean;
191
+ defaultValue: null;
192
+ onChange: default_2.ChangeEventHandler<HTMLSelectElement>;
193
+ children: (default_2.DOMElement<{
194
+ value: string;
195
+ selected: boolean;
196
+ children: string;
197
+ key: string;
198
+ }, Element> | default_2.DOMElement<{
199
+ value: string;
200
+ selected: boolean;
201
+ children: string;
202
+ key: string;
203
+ }, Element>[])[];
204
+ }, Element>)[];
205
+ }, HTMLElement>;
206
+ Textarea: (props: {
207
+ value: Nullable<string>;
208
+ onChange: (value: string) => void;
209
+ placeholder?: string;
210
+ colorVariant?: Variants;
211
+ rows?: number;
212
+ label: string;
213
+ } & CommonFieldProps) => default_2.DOMElement<{
214
+ children: (default_2.FunctionComponentElement<{
215
+ variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
216
+ linear?: boolean;
217
+ children?: default_2.ReactNode;
218
+ }> | default_2.FunctionComponentElement<{
219
+ errors?: FormError[];
220
+ }> | default_2.DOMElement<{
221
+ value: string;
222
+ useThemeColors: Variants | undefined;
223
+ rows: number;
224
+ onChange: default_2.ChangeEventHandler<HTMLTextAreaElement>;
225
+ }, Element>)[];
226
+ }, Element>;
227
+ };
228
+
59
229
  export { }
60
230
 
61
231