@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.
@@ -25,7 +25,7 @@ export declare const Checkbox: (props: CheckboxProps) => React.DOMElement<{
25
25
  children?: React.ReactNode;
26
26
  }>)[];
27
27
  }, Element>;
28
- type CheckboxGroupProps = {
28
+ export type CheckboxGroupProps = {
29
29
  options: Options;
30
30
  onChange: (value: Array<string>) => void;
31
31
  elementsPerCol?: number;
@@ -13,7 +13,7 @@ export declare const QuestionMatrixItem: (props: QuestionMatrixItemProps) => Rea
13
13
  $outlined: boolean;
14
14
  children: string;
15
15
  }, Element>;
16
- type QuestionMatrixProps = {
16
+ export type QuestionMatrixProps = {
17
17
  value: Nullable<number>;
18
18
  minText?: string;
19
19
  colorVariant?: Variants;
@@ -27,7 +27,7 @@ export declare const Radio: (props: RadioProps) => React.DOMElement<{
27
27
  name: string;
28
28
  }, Element>)[];
29
29
  }, Element>;
30
- type CheckboxGroupProps = {
30
+ export type RadioGroupProps = {
31
31
  options: Options;
32
32
  onChange: (value: string) => void;
33
33
  value: Nullable<string>;
@@ -35,7 +35,7 @@ type CheckboxGroupProps = {
35
35
  colorVariant?: Variants;
36
36
  label: string;
37
37
  } & CommonFieldProps;
38
- export declare const RadioGroup: (props: CheckboxGroupProps) => React.DetailedReactHTMLElement<{
38
+ export declare const RadioGroup: (props: RadioGroupProps) => React.DetailedReactHTMLElement<{
39
39
  children: (React.FunctionComponentElement<{
40
40
  variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
41
41
  linear?: boolean;
@@ -9,7 +9,7 @@ type RatingItemProps = {
9
9
  icon?: 'star' | 'star2' | 'heart';
10
10
  };
11
11
  export declare const RatingItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, RatingItemProps>> & string;
12
- type RatingProps = {
12
+ export type RatingProps = {
13
13
  value: number;
14
14
  label: string;
15
15
  onChange: (value: number) => void;
@@ -3,7 +3,7 @@ import { Variants } from '../theme/ThemeProvider';
3
3
  import { CommonFieldProps } from '../types/CommonFieldProps';
4
4
  import { Nullable } from '../types/Nullable';
5
5
  import { Options } from '../types/Option';
6
- type SelectProps = {
6
+ export type SelectProps = {
7
7
  label: string;
8
8
  value: Nullable<string>;
9
9
  colorVariant?: Variants;
@@ -36,4 +36,3 @@ export declare const Select: (props: SelectProps) => React.DetailedReactHTMLElem
36
36
  }, Element>[])[];
37
37
  }, Element>)[];
38
38
  }, HTMLElement>;
39
- export {};
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Variants } from '../theme/ThemeProvider';
3
3
  import { CommonFieldProps } from '../types/CommonFieldProps';
4
4
  import { Nullable } from '../types/Nullable';
5
- type TextareaProps = {
5
+ export type TextareaProps = {
6
6
  value: Nullable<string>;
7
7
  onChange: (value: string) => void;
8
8
  placeholder?: string;
@@ -24,4 +24,3 @@ export declare const Textarea: (props: TextareaProps) => React.DOMElement<{
24
24
  onChange: React.ChangeEventHandler<HTMLTextAreaElement>;
25
25
  }, Element>)[];
26
26
  }, Element>;
27
- export {};
@@ -13,29 +13,7 @@ type Props = {
13
13
  dataField: Nullable<string>;
14
14
  };
15
15
  export declare const Field: (props: Props) => React.DOMElement<{
16
- children: React.FunctionComponentElement<{
17
- value: Nullable<number>;
18
- minText?: string;
19
- colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
20
- maxText?: string;
21
- onChange: (value: number) => void;
22
- label: string;
23
- max: number;
24
- } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<{
25
- options: import("@web-site-utilities/common/types/Option").Options;
26
- onChange: (value: string) => void;
27
- value: Nullable<string>;
28
- elementsPerCol?: number;
29
- colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
30
- label: string;
31
- } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<{
32
- options: import("@web-site-utilities/common/types/Option").Options;
33
- onChange: (value: Array<string>) => void;
34
- elementsPerCol?: number;
35
- colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
36
- value: Array<string>;
37
- label: string;
38
- } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<{
16
+ children: React.FunctionComponentElement<import("@web-site-utilities/common/components/QuestionMatrix").QuestionMatrixProps> | React.FunctionComponentElement<import("@web-site-utilities/common/components/Radio").RadioGroupProps> | React.FunctionComponentElement<import("@web-site-utilities/common/components/Checkbox").CheckboxGroupProps> | React.FunctionComponentElement<{
39
17
  max?: number;
40
18
  min?: number;
41
19
  value: Nullable<number>;
@@ -43,23 +21,6 @@ export declare const Field: (props: Props) => React.DOMElement<{
43
21
  colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
44
22
  label: string;
45
23
  onChange: (value: number) => void;
46
- } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<{
47
- value: number;
48
- label: string;
49
- onChange: (value: number) => void;
50
- max: number;
51
- } & Omit<{
52
- colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
53
- selected: boolean;
54
- size?: "small" | "medium" | "large";
55
- icon?: "star" | "star2" | "heart";
56
- }, "selected"> & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<{
57
- value: Nullable<string>;
58
- onChange: (value: string) => void;
59
- placeholder?: string;
60
- colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
61
- rows?: number;
62
- label: string;
63
- } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | null;
24
+ } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<import("@web-site-utilities/common/components/Rating").RatingProps> | React.FunctionComponentElement<import("@web-site-utilities/common/components/Textarea").TextareaProps> | null;
64
25
  }, Element>;
65
26
  export {};
@@ -2,7 +2,13 @@ import React from 'react';
2
2
  import { InitiateFeedbackModuleOptions, InitiateFeedbackModuleOptionsCmp } from './types/InitiateFeedbackModuleOptions';
3
3
  import { InPlaceFormProps } from "./features/InPlaceForm/InPlaceForm";
4
4
  import { PopupFormProps } from "./features/PopupForm/PopupForm";
5
- import { Variants } from "@web-site-utilities/common/theme/ThemeProvider";
5
+ import { theme, Variants } from "@web-site-utilities/common/theme/ThemeProvider";
6
+ import { CheckboxGroupProps } from "@web-site-utilities/common/components/Checkbox";
7
+ import { QuestionMatrixProps } from "@web-site-utilities/common/components/QuestionMatrix";
8
+ import { RadioGroupProps } from "@web-site-utilities/common/components/Radio";
9
+ import { RatingProps } from "@web-site-utilities/common/components/Rating";
10
+ import { SelectProps } from "@web-site-utilities/common/components/Select";
11
+ import { TextareaProps } from "@web-site-utilities/common/components/Textarea";
6
12
  export declare const initiateFeedbackModule: (options: InitiateFeedbackModuleOptions) => void;
7
13
  export declare const renderFeedbackModule: (options: InitiateFeedbackModuleOptionsCmp) => React.FunctionComponentElement<{
8
14
  formId: string;
@@ -14,179 +20,51 @@ export declare const FeedbackModule: (options: InitiateFeedbackModuleOptionsCmp)
14
20
  export declare const PreviewInPlaceForm: (props: InPlaceFormProps & {
15
21
  variant: Variants;
16
22
  }) => React.FunctionComponentElement<{
17
- theme: typeof import("@web-site-utilities/common/theme/ThemeProvider").theme;
23
+ theme: typeof theme;
18
24
  selectedVariant?: Variants;
19
25
  children: React.ReactNode;
20
26
  }>;
21
27
  export declare const PreviewPopupForm: (props: PopupFormProps & {
22
28
  variant: Variants;
23
29
  }) => React.FunctionComponentElement<{
24
- theme: typeof import("@web-site-utilities/common/theme/ThemeProvider").theme;
30
+ theme: typeof theme;
25
31
  selectedVariant?: Variants;
26
32
  children: React.ReactNode;
27
33
  }>;
34
+ export type SurveyFormComponentsProps<T> = {
35
+ formTheme: typeof theme;
36
+ formVariant: Variants;
37
+ cmpProps: T;
38
+ };
28
39
  export declare const SurveyFormComponents: {
29
- Checkbox: (props: {
30
- options: import("@web-site-utilities/common/types/Option").Options;
31
- onChange: (value: Array<string>) => void;
32
- elementsPerCol?: number;
33
- colorVariant?: Variants;
34
- value: Array<string>;
35
- label: string;
36
- } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps) => React.DetailedReactHTMLElement<{
37
- children: (React.FunctionComponentElement<{
38
- variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
39
- linear?: boolean;
40
- children?: React.ReactNode;
41
- }> | React.DOMElement<{
42
- children: React.DOMElement<{
43
- key: number;
44
- children: React.FunctionComponentElement<{
45
- label: string;
46
- onSelect: (value: Array<string>) => void;
47
- value: Array<string>;
48
- id: string;
49
- colorVariant?: Variants | undefined;
50
- name: string;
51
- }>[];
52
- }, Element>[];
53
- }, Element> | React.FunctionComponentElement<{
54
- errors?: import("@web-site-utilities/common/types/FormError").FormError[];
55
- }>)[];
56
- }, HTMLElement>;
57
- QuestionMatrix: (props: {
58
- value: import("@web-site-utilities/common/types/Nullable").Nullable<number>;
59
- minText?: string;
60
- colorVariant?: Variants;
61
- maxText?: string;
62
- onChange: (value: number) => void;
63
- label: string;
64
- max: number;
65
- } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps) => React.DetailedReactHTMLElement<{
66
- children: (React.FunctionComponentElement<{
67
- variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
68
- linear?: boolean;
69
- children?: React.ReactNode;
70
- }> | React.FunctionComponentElement<{
71
- errors?: import("@web-site-utilities/common/types/FormError").FormError[];
72
- }> | React.DOMElement<{
73
- withText: string | undefined;
74
- children: (React.DOMElement<{
75
- min: boolean;
76
- children: string;
77
- }, Element> | React.FunctionComponentElement<{
78
- onChange: () => void;
79
- colorVariant?: Variants;
80
- label: string;
81
- selected: boolean;
82
- }>[] | null)[];
83
- }, Element>)[];
84
- }, HTMLElement>;
85
- Radio: (props: {
86
- options: import("@web-site-utilities/common/types/Option").Options;
87
- onChange: (value: string) => void;
88
- value: import("@web-site-utilities/common/types/Nullable").Nullable<string>;
89
- elementsPerCol?: number;
90
- colorVariant?: Variants;
91
- label: string;
92
- } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps) => React.DetailedReactHTMLElement<{
93
- children: (React.FunctionComponentElement<{
94
- variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
95
- linear?: boolean;
96
- children?: React.ReactNode;
97
- }> | React.FunctionComponentElement<{
98
- errors?: import("@web-site-utilities/common/types/FormError").FormError[];
99
- }> | React.DOMElement<{
100
- children: React.DOMElement<{
101
- children: React.FunctionComponentElement<{
102
- label: string;
103
- onSelect: (value: string) => void;
104
- colorVariant?: Variants | undefined;
105
- value: import("@web-site-utilities/common/types/Nullable").Nullable<string>;
106
- id: string;
107
- name: string;
108
- }>[];
109
- }, Element>[];
110
- }, Element>)[];
111
- }, HTMLElement>;
112
- Rating: ({ value, max, errors, label, onChange }: {
113
- value: number;
114
- label: string;
115
- onChange: (value: number) => void;
116
- max: number;
117
- } & Omit<{
118
- colorVariant?: Variants;
119
- selected: boolean;
120
- size?: "small" | "medium" | "large";
121
- icon?: "star" | "star2" | "heart";
122
- }, "selected"> & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps) => React.DOMElement<{
123
- value: number;
124
- max: number;
125
- children: (React.FunctionComponentElement<{
126
- variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
127
- linear?: boolean;
128
- children?: React.ReactNode;
129
- }> | React.FunctionComponentElement<{
130
- errors?: import("@web-site-utilities/common/types/FormError").FormError[];
131
- }> | React.DOMElement<{
132
- selected: boolean;
133
- name: string;
134
- key: string;
135
- onChange: () => void;
136
- type: string;
137
- }, Element>[])[];
138
- }, Element>;
139
- Select: (props: {
140
- label: string;
141
- value: import("@web-site-utilities/common/types/Nullable").Nullable<string>;
142
- colorVariant?: Variants;
143
- onChange: (value: string) => void;
144
- options: import("@web-site-utilities/common/types/Option").Options;
145
- } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps) => React.DetailedReactHTMLElement<{
146
- children: (React.FunctionComponentElement<{
147
- variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
148
- linear?: boolean;
149
- children?: React.ReactNode;
150
- }> | React.FunctionComponentElement<{
151
- errors?: import("@web-site-utilities/common/types/FormError").FormError[];
152
- }> | React.DOMElement<{
153
- colorVariant: Variants | undefined;
154
- value: string | null;
155
- defaultChecked: boolean;
156
- defaultValue: null;
157
- onChange: React.ChangeEventHandler<HTMLSelectElement>;
158
- children: (React.DOMElement<{
159
- value: string;
160
- selected: boolean;
161
- children: string;
162
- key: string;
163
- }, Element> | React.DOMElement<{
164
- value: string;
165
- selected: boolean;
166
- children: string;
167
- key: string;
168
- }, Element>[])[];
169
- }, Element>)[];
170
- }, HTMLElement>;
171
- Textarea: (props: {
172
- value: import("@web-site-utilities/common/types/Nullable").Nullable<string>;
173
- onChange: (value: string) => void;
174
- placeholder?: string;
175
- colorVariant?: Variants;
176
- rows?: number;
177
- label: string;
178
- } & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps) => React.DOMElement<{
179
- children: (React.FunctionComponentElement<{
180
- variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
181
- linear?: boolean;
182
- children?: React.ReactNode;
183
- }> | React.FunctionComponentElement<{
184
- errors?: import("@web-site-utilities/common/types/FormError").FormError[];
185
- }> | React.DOMElement<{
186
- value: string;
187
- useThemeColors: Variants | undefined;
188
- rows: number;
189
- onChange: React.ChangeEventHandler<HTMLTextAreaElement>;
190
- }, Element>)[];
191
- }, Element>;
40
+ Checkbox: (props: SurveyFormComponentsProps<CheckboxGroupProps>) => React.FunctionComponentElement<{
41
+ theme: typeof theme;
42
+ selectedVariant?: Variants;
43
+ children: React.ReactNode;
44
+ }>;
45
+ QuestionMatrix: (props: SurveyFormComponentsProps<QuestionMatrixProps>) => React.FunctionComponentElement<{
46
+ theme: typeof theme;
47
+ selectedVariant?: Variants;
48
+ children: React.ReactNode;
49
+ }>;
50
+ Radio: (props: SurveyFormComponentsProps<RadioGroupProps>) => React.FunctionComponentElement<{
51
+ theme: typeof theme;
52
+ selectedVariant?: Variants;
53
+ children: React.ReactNode;
54
+ }>;
55
+ Rating: (props: SurveyFormComponentsProps<RatingProps>) => React.FunctionComponentElement<{
56
+ theme: typeof theme;
57
+ selectedVariant?: Variants;
58
+ children: React.ReactNode;
59
+ }>;
60
+ Select: (props: SurveyFormComponentsProps<SelectProps>) => React.FunctionComponentElement<{
61
+ theme: typeof theme;
62
+ selectedVariant?: Variants;
63
+ children: React.ReactNode;
64
+ }>;
65
+ Textarea: (props: SurveyFormComponentsProps<TextareaProps>) => React.FunctionComponentElement<{
66
+ theme: typeof theme;
67
+ selectedVariant?: Variants;
68
+ children: React.ReactNode;
69
+ }>;
192
70
  };