@web-site-utilities/feedback 0.0.7 → 0.0.8

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,13 +1,15 @@
1
- import { CommonFieldProps } from '@web-site-utilities/common/types/CommonFieldProps';
1
+ import { CheckboxGroupProps } from '@web-site-utilities/common/components/Checkbox';
2
2
  import { Container } from 'react-dom/client';
3
3
  import { default as default_2 } from 'react';
4
4
  import { FormConfigTheme } from '@web-site-utilities/common/types/FormConfig';
5
- import { FormError } from '@web-site-utilities/common/types/FormError';
6
5
  import { InlineForm } from '@web-site-utilities/common/types/FormConfig';
7
6
  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';
10
7
  import { PopupForm } from '@web-site-utilities/common/types/FormConfig';
8
+ import { QuestionMatrixProps } from '@web-site-utilities/common/components/QuestionMatrix';
9
+ import { RadioGroupProps } from '@web-site-utilities/common/components/Radio';
10
+ import { RatingProps } from '@web-site-utilities/common/components/Rating';
11
+ import { SelectProps } from '@web-site-utilities/common/components/Select';
12
+ import { TextareaProps } from '@web-site-utilities/common/components/Textarea';
11
13
  import { theme } from '@web-site-utilities/common/theme/ThemeProvider';
12
14
  import { Variants } from '@web-site-utilities/common/theme/ThemeProvider';
13
15
 
@@ -42,7 +44,7 @@ declare type PopupFormProps = {
42
44
  export declare const PreviewInPlaceForm: (props: InPlaceFormProps & {
43
45
  variant: Variants;
44
46
  }) => default_2.FunctionComponentElement<{
45
- theme: theme;
47
+ theme: typeof theme;
46
48
  selectedVariant?: Variants;
47
49
  children: default_2.ReactNode;
48
50
  }>;
@@ -50,7 +52,7 @@ export declare const PreviewInPlaceForm: (props: InPlaceFormProps & {
50
52
  export declare const PreviewPopupForm: (props: PopupFormProps & {
51
53
  variant: Variants;
52
54
  }) => default_2.FunctionComponentElement<{
53
- theme: theme;
55
+ theme: typeof theme;
54
56
  selectedVariant?: Variants;
55
57
  children: default_2.ReactNode;
56
58
  }>;
@@ -61,169 +63,42 @@ export declare const renderFeedbackModule: (options: InitiateFeedbackModuleOptio
61
63
  }> | null;
62
64
 
63
65
  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>;
66
+ Checkbox: (props: SurveyFormComponentsProps<CheckboxGroupProps>) => default_2.FunctionComponentElement<{
67
+ theme: typeof theme;
68
+ selectedVariant?: Variants;
69
+ children: default_2.ReactNode;
70
+ }>;
71
+ QuestionMatrix: (props: SurveyFormComponentsProps<QuestionMatrixProps>) => default_2.FunctionComponentElement<{
72
+ theme: typeof theme;
73
+ selectedVariant?: Variants;
74
+ children: default_2.ReactNode;
75
+ }>;
76
+ Radio: (props: SurveyFormComponentsProps<RadioGroupProps>) => default_2.FunctionComponentElement<{
77
+ theme: typeof theme;
78
+ selectedVariant?: Variants;
79
+ children: default_2.ReactNode;
80
+ }>;
81
+ Rating: (props: SurveyFormComponentsProps<RatingProps>) => default_2.FunctionComponentElement<{
82
+ theme: typeof theme;
83
+ selectedVariant?: Variants;
84
+ children: default_2.ReactNode;
85
+ }>;
86
+ Select: (props: SurveyFormComponentsProps<SelectProps>) => default_2.FunctionComponentElement<{
87
+ theme: typeof theme;
88
+ selectedVariant?: Variants;
89
+ children: default_2.ReactNode;
90
+ }>;
91
+ Textarea: (props: SurveyFormComponentsProps<TextareaProps>) => default_2.FunctionComponentElement<{
92
+ theme: typeof theme;
93
+ selectedVariant?: Variants;
94
+ children: default_2.ReactNode;
95
+ }>;
96
+ };
97
+
98
+ export declare type SurveyFormComponentsProps<T> = {
99
+ formTheme: typeof theme;
100
+ formVariant: Variants;
101
+ cmpProps: T;
227
102
  };
228
103
 
229
104
  export { }