@arquimedes.co/eureka-forms 2.0.93 → 2.0.95

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.
@@ -50,7 +50,7 @@ function RatingStep(_a) {
50
50
  };
51
51
  return (_jsxs(React.Fragment, { children: [_jsxs("div", __assign({ className: styles.container, style: {
52
52
  paddingBottom: step.description || step.required ? 0 : 15,
53
- } }, { children: [_jsx("div", __assign({ className: styles.labelLabel }, { children: step.label + (step.required ? ' *' : '') })), _jsx("div", __assign({ className: styles.ratingContainer }, { children: _jsx(Rating, { name: step.id, type: step.ratingType, isMobile: widthStats.isMobile, focusColor: (_b = formStyle.primaryColor) !== null && _b !== void 0 ? _b : '#3d5a7f', unSelectedColor: (_c = formStyle.outlineColor) !== null && _c !== void 0 ? _c : '#b8b8b8', disabled: !editable || postview, value: value, onChange: onChange, inputRef: ref }) })), (step.description || step.required) && (_jsx("div", __assign({ className: styles.stepDescriptionLabel, style: {
53
+ } }, { children: [_jsx("div", __assign({ className: styles.labelLabel }, { children: step.label + (step.required ? ' *' : '') })), _jsx("div", __assign({ className: styles.ratingContainer }, { children: _jsx(Rating, { type: step.ratingType, isMobile: widthStats.isMobile, focusColor: (_b = formStyle.primaryColor) !== null && _b !== void 0 ? _b : '#3d5a7f', unSelectedColor: (_c = formStyle.outlineColor) !== null && _c !== void 0 ? _c : '#b8b8b8', disabled: !editable || postview, value: value, onChange: onChange, inputRef: ref }) })), (step.description || step.required) && (_jsx("div", __assign({ className: styles.stepDescriptionLabel, style: {
54
54
  color: !!error && value === null
55
55
  ? (_d = formStyle.errorColor) !== null && _d !== void 0 ? _d : '#cc2936'
56
56
  : (_e = formStyle.descriptionTextColor) !== null && _e !== void 0 ? _e : '#989898',
@@ -2,7 +2,6 @@
2
2
  import { RatingTypes } from '../../constants/FormStepTypes';
3
3
  export interface RatingProps {
4
4
  disabled?: boolean;
5
- name: string;
6
5
  isMobile?: boolean;
7
6
  value: any;
8
7
  onChange: (value: number | null) => void;
@@ -9,7 +9,6 @@ export default meta;
9
9
  export var ScaleRating = {
10
10
  args: {
11
11
  type: RatingTypes.SCALE,
12
- name: 'Rating',
13
12
  focusColor: '#3d5a7f',
14
13
  unSelectedColor: '#d8d8d8',
15
14
  },
@@ -17,7 +16,6 @@ export var ScaleRating = {
17
16
  export var ScaleRatingWidthValue = {
18
17
  args: {
19
18
  type: RatingTypes.SCALE,
20
- name: 'Rating',
21
19
  focusColor: '#3d5a7f',
22
20
  unSelectedColor: '#d8d8d8',
23
21
  value: 4,
@@ -26,7 +24,6 @@ export var ScaleRatingWidthValue = {
26
24
  export var LikeRating = {
27
25
  args: {
28
26
  type: RatingTypes.LIKE,
29
- name: 'Rating',
30
27
  focusColor: '#3d5a7f',
31
28
  unSelectedColor: '#d8d8d8',
32
29
  },
@@ -34,7 +31,6 @@ export var LikeRating = {
34
31
  export var LikeRatingWithValue = {
35
32
  args: {
36
33
  type: RatingTypes.LIKE,
37
- name: 'Rating',
38
34
  focusColor: '#3d5a7f',
39
35
  unSelectedColor: '#d8d8d8',
40
36
  value: 1,
@@ -43,7 +39,6 @@ export var LikeRatingWithValue = {
43
39
  export var SatisfactionRating = {
44
40
  args: {
45
41
  type: RatingTypes.SATISFACTION,
46
- name: 'Rating',
47
42
  focusColor: '#3d5a7f',
48
43
  unSelectedColor: '#d8d8d8',
49
44
  },
@@ -51,7 +46,6 @@ export var SatisfactionRating = {
51
46
  export var SatisfactionRatingWidthValue = {
52
47
  args: {
53
48
  type: RatingTypes.SATISFACTION,
54
- name: 'Rating',
55
49
  focusColor: '#3d5a7f',
56
50
  unSelectedColor: '#d8d8d8',
57
51
  value: 3,
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { RatingProps } from '../Rating';
3
- declare function ScaleRating({ value, name, inputRef, disabled, onChange, isMobile, focusColor, unSelectedColor, }: RatingProps): JSX.Element;
3
+ declare function ScaleRating({ value, inputRef, disabled, onChange, isMobile, focusColor, unSelectedColor, }: RatingProps): JSX.Element;
4
4
  export default ScaleRating;
@@ -41,7 +41,7 @@ var useRatingStyles = function (props) {
41
41
  });
42
42
  };
43
43
  function ScaleRating(_a) {
44
- var value = _a.value, name = _a.name, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, isMobile = _a.isMobile, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
44
+ var value = _a.value, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, isMobile = _a.isMobile, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
45
45
  var ratingClasses = useRatingStyles({
46
46
  unSelectedColor: unSelectedColor,
47
47
  focusColor: focusColor,
@@ -49,7 +49,7 @@ function ScaleRating(_a) {
49
49
  return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx(Rating, { value: value, onChange: function (_event, newValue) {
50
50
  if (!disabled)
51
51
  onChange(newValue);
52
- }, disabled: disabled, classes: ratingClasses, name: name, size: "large", defaultValue: 0, getLabelText: function (value) { return value + '/5'; }, max: 5, IconContainerComponent: isMobile ? SmallIconContainer : IconContainer })] }));
52
+ }, disabled: disabled, classes: ratingClasses, size: "large", defaultValue: 0, getLabelText: function (value) { return value + '/5'; }, max: 5, IconContainerComponent: isMobile ? SmallIconContainer : IconContainer })] }));
53
53
  }
54
54
  function IconContainer(_a) {
55
55
  var value = _a.value, other = __rest(_a, ["value"]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version": "2.0.93",
4
+ "version": "2.0.95",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",