@web-site-utilities/feedback 0.0.7 → 0.0.9

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