@pedidopago/ui 1.0.8 → 1.1.2

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.
Files changed (133) hide show
  1. package/dist/components/Alert/alert.test.js +9 -1
  2. package/dist/components/Alert/index.js +47 -35
  3. package/dist/components/Avatar/avatar.test.js +9 -1
  4. package/dist/components/Avatar/index.js +47 -27
  5. package/dist/components/Avatar/styles.d.ts.map +1 -1
  6. package/dist/components/Avatar/styles.js +4 -4
  7. package/dist/components/Badge/badge.test.js +9 -1
  8. package/dist/components/Badge/index.js +24 -15
  9. package/dist/components/Button/Button.test.js +19 -7
  10. package/dist/components/Button/index.js +28 -16
  11. package/dist/components/Card/ButtonCard/index.js +24 -10
  12. package/dist/components/Card/Expansion/index.js +24 -17
  13. package/dist/components/Card/card.test.js +9 -1
  14. package/dist/components/Card/index.js +43 -19
  15. package/dist/components/CheckboxInput/checkbox-input.test.js +9 -1
  16. package/dist/components/CheckboxInput/components/MultipleCheckbox.js +58 -43
  17. package/dist/components/CheckboxInput/index.js +29 -18
  18. package/dist/components/ColorPicker/colorpicker.test.js +9 -1
  19. package/dist/components/ColorPicker/components/ColorHue.js +17 -10
  20. package/dist/components/ColorPicker/components/ColorInput.js +3 -1
  21. package/dist/components/ColorPicker/components/ColorPickerBox.js +13 -9
  22. package/dist/components/ColorPicker/components/ColorPointer.js +3 -1
  23. package/dist/components/ColorPicker/components/ColorSelector.js +8 -2
  24. package/dist/components/ColorPicker/index.js +44 -34
  25. package/dist/components/DatePicker/components/DatePickerContent.js +113 -79
  26. package/dist/components/DatePicker/components/DateYearPicker.js +45 -32
  27. package/dist/components/DatePicker/datepicker.test.js +9 -1
  28. package/dist/components/DatePicker/index.js +40 -29
  29. package/dist/components/Dialog/dialog-example.js +21 -13
  30. package/dist/components/Dialog/dialog.test.js +5 -1
  31. package/dist/components/Dialog/index.js +59 -46
  32. package/dist/components/Dropzone/dropzone.test.js +9 -1
  33. package/dist/components/Dropzone/index.js +122 -97
  34. package/dist/components/Flex/flex.test.js +128 -14
  35. package/dist/components/Flex/index.js +11 -3
  36. package/dist/components/Grid/grid.test.js +86 -81
  37. package/dist/components/Grid/index.js +11 -3
  38. package/dist/components/Icon/icon.test.js +3 -3
  39. package/dist/components/Icon/index.js +8 -2
  40. package/dist/components/IconItem/IconItem.test.js +9 -1
  41. package/dist/components/IconItem/index.js +33 -18
  42. package/dist/components/ImageItem/imageFake.js +13 -9
  43. package/dist/components/ImageItem/index.js +36 -24
  44. package/dist/components/ImageItem/input.test.js +10 -7
  45. package/dist/components/Input/index.js +67 -40
  46. package/dist/components/Input/input.test.js +4 -4
  47. package/dist/components/Label/index.js +12 -9
  48. package/dist/components/Label/input.test.js +3 -1
  49. package/dist/components/List/index.js +15 -4
  50. package/dist/components/List/list.test.js +36 -18
  51. package/dist/components/Menu/components/Submenu.d.ts.map +1 -1
  52. package/dist/components/Menu/components/Submenu.js +49 -26
  53. package/dist/components/Menu/index.d.ts.map +1 -1
  54. package/dist/components/Menu/index.js +19 -10
  55. package/dist/components/Menu/menu.test.js +14 -14
  56. package/dist/components/Menu/styles.d.ts +1 -0
  57. package/dist/components/Menu/styles.d.ts.map +1 -1
  58. package/dist/components/Menu/styles.js +19 -15
  59. package/dist/components/Modal/index.js +24 -19
  60. package/dist/components/Modal/modal.test.js +44 -12
  61. package/dist/components/Pagination/index.js +54 -45
  62. package/dist/components/Pagination/pagination.test.js +13 -11
  63. package/dist/components/Progress/Circle/index.js +38 -29
  64. package/dist/components/Progress/Linear/index.js +24 -17
  65. package/dist/components/Progress/index.js +4 -2
  66. package/dist/components/Progress/progress.test.js +9 -1
  67. package/dist/components/RadioInput/components/ChoiceList/index.js +28 -20
  68. package/dist/components/RadioInput/index.js +27 -22
  69. package/dist/components/RadioInput/radio-input.test.js +118 -87
  70. package/dist/components/Rating/components/GradientIcon/index.js +24 -17
  71. package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.js +24 -22
  72. package/dist/components/Rating/components/RatingWithSingleValue/RatingWithSingleValue.js +21 -17
  73. package/dist/components/Rating/index.js +29 -26
  74. package/dist/components/Rating/rating.test.js +3 -1
  75. package/dist/components/SelectInput/components/OptionsArea/index.js +37 -32
  76. package/dist/components/SelectInput/components/SelectArea/index.js +46 -34
  77. package/dist/components/SelectInput/index.js +26 -23
  78. package/dist/components/SelectInput/selectInput.test.js +10 -4
  79. package/dist/components/Skeleton/index.js +11 -1
  80. package/dist/components/Skeleton/skeleton.test.js +3 -1
  81. package/dist/components/Slider/components/SliderPointer.d.ts.map +1 -1
  82. package/dist/components/Slider/components/SliderPointer.js +23 -8
  83. package/dist/components/Slider/components/SliderRail.js +8 -2
  84. package/dist/components/Slider/components/SliderSelector.js +86 -78
  85. package/dist/components/Slider/index.js +28 -16
  86. package/dist/components/Slider/slider.test.js +9 -1
  87. package/dist/components/Spinner/index.js +3 -1
  88. package/dist/components/Spinner/spinner.test.js +9 -1
  89. package/dist/components/Steps/index.js +25 -17
  90. package/dist/components/Steps/steps.test.js +3 -1
  91. package/dist/components/Switch/index.js +23 -17
  92. package/dist/components/Switch/input.test.js +3 -1
  93. package/dist/components/Table/components/MenuItem.js +16 -13
  94. package/dist/components/Table/index.js +139 -99
  95. package/dist/components/Table/table.test.js +3 -1
  96. package/dist/components/Tabs/TabsExample.js +37 -23
  97. package/dist/components/Tabs/components/Tab.js +12 -3
  98. package/dist/components/Tabs/components/TabPanel.js +8 -3
  99. package/dist/components/Tabs/components/Tabs.js +33 -23
  100. package/dist/components/Tabs/tabs.test.js +103 -83
  101. package/dist/components/Tag/index.js +21 -16
  102. package/dist/components/Tag/tag.test.js +9 -7
  103. package/dist/components/TextAreaInput/index.js +25 -15
  104. package/dist/components/TextAreaInput/text-area-input.test.js +8 -2
  105. package/dist/components/Thumbnail/index.js +71 -60
  106. package/dist/components/Thumbnail/thumbnail.test.js +9 -1
  107. package/dist/components/Timeline/components/Timeline.js +9 -5
  108. package/dist/components/Timeline/components/TimelineContent.js +31 -15
  109. package/dist/components/Timeline/components/TimelineItem.js +11 -1
  110. package/dist/components/Timeline/components/TimelineSeparator.js +9 -4
  111. package/dist/components/Timeline/timeline.test.js +105 -76
  112. package/dist/components/Toast/button-example.js +10 -5
  113. package/dist/components/Toast/components/Toast.js +16 -11
  114. package/dist/components/Toast/contexts/ToastProvider.js +6 -3
  115. package/dist/components/Toast/index.js +90 -62
  116. package/dist/components/Toast/toast.test.js +11 -1
  117. package/dist/components/Tooltip/componenteTeste.js +42 -14
  118. package/dist/components/Tooltip/index.js +56 -46
  119. package/dist/components/Tooltip/tooltip.test.js +13 -8
  120. package/dist/components/Typography/index.js +11 -3
  121. package/dist/components/Typography/typography.test.js +3 -1
  122. package/dist/shared/components/FocusLock/index.js +11 -4
  123. package/dist/shared/tests/test-utils.js +6 -3
  124. package/dist/shared/theme/button-example.js +6 -3
  125. package/dist/shared/theme/contexts/ThemeContext.d.ts.map +1 -1
  126. package/dist/shared/theme/contexts/ThemeContext.js +12 -29
  127. package/dist/shared/theme/theme.test.js +25 -11
  128. package/package.json +1 -1
  129. package/dist/components/Slider/icons/pointer.js +0 -15
  130. package/dist/shared/logos/pp_logo_horizontal.js +0 -51
  131. package/dist/shared/logos/pp_logo_horizontal_dark_mode.js +0 -51
  132. package/dist/shared/logos/pp_logo_vertical.js +0 -51
  133. package/dist/shared/logos/pp_logo_vertical_dark_mode.js +0 -51
@@ -14,6 +14,8 @@ var _Circle = require("./Circle");
14
14
 
15
15
  var _Linear = require("./Linear");
16
16
 
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+
17
19
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
20
 
19
21
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -48,7 +50,7 @@ function Progress(_ref) {
48
50
  setGrayColor((0, _colorToGray.convertColor)(color));
49
51
  }
50
52
  }, [color]);
51
- return type === 'circle' ? /*#__PURE__*/React.createElement(_Circle.CircleProgress, {
53
+ return type === 'circle' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Circle.CircleProgress, {
52
54
  percent: percent,
53
55
  size: size,
54
56
  isAnimated: isAnimated,
@@ -58,7 +60,7 @@ function Progress(_ref) {
58
60
  circleBody: circleBody,
59
61
  showValue: showValue,
60
62
  steps: steps
61
- }) : /*#__PURE__*/React.createElement(_Linear.LinearProgress, {
63
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Linear.LinearProgress, {
62
64
  percent: percent,
63
65
  height: height,
64
66
  isAnimated: isAnimated,
@@ -8,8 +8,16 @@ var _ = require(".");
8
8
 
9
9
  var _getSteps = require("./getSteps");
10
10
 
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+
13
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
+
15
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
+
17
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
+
11
19
  var setup = function setup(props) {
12
- var utils = (0, _testUtils.render)( /*#__PURE__*/React.createElement(_.Progress, props));
20
+ var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Progress, _objectSpread({}, props)));
13
21
  return utils;
14
22
  };
15
23
 
@@ -17,6 +17,8 @@ var _getColorsProps = require("../../utils/get-colors-props");
17
17
 
18
18
  var _styles = require("../../styles");
19
19
 
20
+ var _jsxRuntime = require("react/jsx-runtime");
21
+
20
22
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
21
23
 
22
24
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -73,26 +75,32 @@ var ChoiceList = function ChoiceList(_ref) {
73
75
  onChange(e.currentTarget.value);
74
76
  };
75
77
 
76
- return /*#__PURE__*/React.createElement(_react2.ThemeProvider, {
77
- theme: theme
78
- }, /*#__PURE__*/React.createElement(RadioGroup.Provider, {
79
- value: {
80
- handleRadioClick: handleRadioClick,
81
- isRadioSelected: isRadioSelected,
82
- groupColor: color || theme.colors.primary.default,
83
- groupName: name,
84
- groupFormRegister: formRegister,
85
- isDisabled: isDisabled
86
- }
87
- }, /*#__PURE__*/React.createElement(_styles.ChoiceWrapper, {
88
- role: "radiogroup"
89
- }, label && /*#__PURE__*/React.createElement(_styles.ChoiceLabel, {
90
- colorProps: colors
91
- }, label), /*#__PURE__*/React.createElement(_styles.ListWrapper, {
92
- alignDirection: alignDirection
93
- }, children), helpText && /*#__PURE__*/React.createElement(_styles.HelpText, {
94
- textColor: colors.black
95
- }, helpText))));
78
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.ThemeProvider, {
79
+ theme: theme,
80
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(RadioGroup.Provider, {
81
+ value: {
82
+ handleRadioClick: handleRadioClick,
83
+ isRadioSelected: isRadioSelected,
84
+ groupColor: color || theme.colors.primary.default,
85
+ groupName: name,
86
+ groupFormRegister: formRegister,
87
+ isDisabled: isDisabled
88
+ },
89
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ChoiceWrapper, {
90
+ role: "radiogroup",
91
+ children: [label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ChoiceLabel, {
92
+ colorProps: colors,
93
+ children: label
94
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ListWrapper, {
95
+ alignDirection: alignDirection,
96
+ children: children
97
+ }), helpText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.HelpText, {
98
+ textColor: colors.black,
99
+ children: helpText
100
+ })]
101
+ })
102
+ })
103
+ });
96
104
  };
97
105
 
98
106
  var _default = ChoiceList;
@@ -17,9 +17,9 @@ var _getColorsProps = require("./utils/get-colors-props");
17
17
 
18
18
  var _styles = require("./styles");
19
19
 
20
- var _excluded = ["isDisabled", "id", "name", "value", "children", "color", "defaultChecked", "onChange"];
20
+ var _jsxRuntime = require("react/jsx-runtime");
21
21
 
22
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
22
+ var _excluded = ["isDisabled", "id", "name", "value", "children", "color", "defaultChecked", "onChange"];
23
23
 
24
24
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
25
25
 
@@ -80,26 +80,31 @@ var RadioInput = function RadioInput(_ref) {
80
80
  checkedColor = _useMemo.checkedColor,
81
81
  colors = _useMemo.colors;
82
82
 
83
- return /*#__PURE__*/React.createElement(_styles.Wrapper, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_styles.Input, _extends({
84
- disabled: ctx.isDisabled || isDisabled,
85
- type: "radio",
86
- id: id,
87
- color: checkedColor,
88
- colorProps: colors,
89
- name: ctx !== null && ctx !== void 0 && ctx.groupName ? ctx.groupName : name,
90
- value: value,
91
- checked: ctx !== null && ctx !== void 0 && ctx.isRadioSelected ? ctx.isRadioSelected(value) : radioValue,
92
- onChange: function onChange(e) {
93
- if (ctx !== null && ctx !== void 0 && ctx.handleRadioClick) {
94
- ctx.handleRadioClick(e);
95
- } else {
96
- setRadioValue(true);
97
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(e.currentTarget.value);
98
- }
99
- }
100
- }, rest, ctx && ctx.groupFormRegister ? _objectSpread({}, ctx.groupFormRegister) : _objectSpread({}, rest.formRegister))), /*#__PURE__*/React.createElement(_styles.Label, {
101
- htmlFor: id
102
- }, children)));
83
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Wrapper, {
84
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
85
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Input, _objectSpread(_objectSpread({
86
+ disabled: ctx.isDisabled || isDisabled,
87
+ type: "radio",
88
+ id: id,
89
+ color: checkedColor,
90
+ colorProps: colors,
91
+ name: ctx !== null && ctx !== void 0 && ctx.groupName ? ctx.groupName : name,
92
+ value: value,
93
+ checked: ctx !== null && ctx !== void 0 && ctx.isRadioSelected ? ctx.isRadioSelected(value) : radioValue,
94
+ onChange: function onChange(e) {
95
+ if (ctx !== null && ctx !== void 0 && ctx.handleRadioClick) {
96
+ ctx.handleRadioClick(e);
97
+ } else {
98
+ setRadioValue(true);
99
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(e.currentTarget.value);
100
+ }
101
+ }
102
+ }, rest), ctx && ctx.groupFormRegister ? _objectSpread({}, ctx.groupFormRegister) : _objectSpread({}, rest.formRegister))), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Label, {
103
+ htmlFor: id,
104
+ children: children
105
+ })]
106
+ })
107
+ });
103
108
  };
104
109
 
105
110
  var _default = RadioInput;
@@ -10,17 +10,20 @@ var _ChoiceList = _interopRequireDefault(require("./components/ChoiceList"));
10
10
 
11
11
  var _ = _interopRequireDefault(require("."));
12
12
 
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+
13
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
16
 
15
17
  describe('Radio Input', function () {
16
18
  it('should render input', function () {
17
19
  var fn = jest.fn();
18
20
 
19
- var _render = (0, _testUtils.render)( /*#__PURE__*/React.createElement(_.default, {
21
+ var _render = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
20
22
  onChange: fn,
21
23
  value: "test",
22
- id: "test"
23
- }, "Radio Test")),
24
+ id: "test",
25
+ children: "Radio Test"
26
+ })),
24
27
  container = _render.container;
25
28
 
26
29
  var radio = container.querySelector('input[type="radio"]');
@@ -29,11 +32,12 @@ describe('Radio Input', function () {
29
32
  it('should check input on Click on input', function () {
30
33
  var fn = jest.fn();
31
34
 
32
- var _render2 = (0, _testUtils.render)( /*#__PURE__*/React.createElement(_.default, {
35
+ var _render2 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
33
36
  onChange: fn,
34
37
  value: "test",
35
- id: "test"
36
- }, "Radio Test")),
38
+ id: "test",
39
+ children: "Radio Test"
40
+ })),
37
41
  container = _render2.container;
38
42
 
39
43
  var radio = container.querySelector('input[type="radio"]');
@@ -45,11 +49,12 @@ describe('Radio Input', function () {
45
49
  it('should check input on Click label', function () {
46
50
  var fn = jest.fn();
47
51
 
48
- var _render3 = (0, _testUtils.render)( /*#__PURE__*/React.createElement(_.default, {
52
+ var _render3 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
49
53
  onChange: fn,
50
54
  value: "test",
51
- id: "test"
52
- }, "Radio Test")),
55
+ id: "test",
56
+ children: "Radio Test"
57
+ })),
53
58
  container = _render3.container,
54
59
  getByText = _render3.getByText;
55
60
 
@@ -63,12 +68,13 @@ describe('Radio Input', function () {
63
68
  it('should checked input if defaultChecked is provided', function () {
64
69
  var fn = jest.fn();
65
70
 
66
- var _render4 = (0, _testUtils.render)( /*#__PURE__*/React.createElement(_.default, {
71
+ var _render4 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
67
72
  onChange: fn,
68
73
  value: "test",
69
74
  id: "test",
70
- defaultChecked: true
71
- }, "Radio Test")),
75
+ defaultChecked: true,
76
+ children: "Radio Test"
77
+ })),
72
78
  container = _render4.container;
73
79
 
74
80
  var radio = container.querySelector('input[type="radio"]');
@@ -77,11 +83,12 @@ describe('Radio Input', function () {
77
83
  it('should call onChange on Click input', function () {
78
84
  var fn = jest.fn();
79
85
 
80
- var _render5 = (0, _testUtils.render)( /*#__PURE__*/React.createElement(_.default, {
86
+ var _render5 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
81
87
  onChange: fn,
82
88
  value: "test",
83
- id: "test"
84
- }, "Radio Test")),
89
+ id: "test",
90
+ children: "Radio Test"
91
+ })),
85
92
  container = _render5.container;
86
93
 
87
94
  var radio = container.querySelector('input[type="radio"]');
@@ -92,20 +99,24 @@ describe('Radio Input', function () {
92
99
  });
93
100
  it('should ChoiceList control radio childrens', function () {
94
101
  var fn = jest.fn();
95
- (0, _testUtils.render)( /*#__PURE__*/React.createElement(_ChoiceList.default, {
102
+ (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
96
103
  onChange: fn,
97
104
  value: "test1",
98
- name: "test-name"
99
- }, /*#__PURE__*/React.createElement(_.default, {
100
- value: "test1",
101
- id: "test"
102
- }, "Radio Test 1"), /*#__PURE__*/React.createElement(_.default, {
103
- value: "test2",
104
- id: "test"
105
- }, "Radio Test 2"), /*#__PURE__*/React.createElement(_.default, {
106
- value: "test3",
107
- id: "test"
108
- }, "Radio Test 3")));
105
+ name: "test-name",
106
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
107
+ value: "test1",
108
+ id: "test",
109
+ children: "Radio Test 1"
110
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
111
+ value: "test2",
112
+ id: "test",
113
+ children: "Radio Test 2"
114
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
115
+ value: "test3",
116
+ id: "test",
117
+ children: "Radio Test 3"
118
+ })]
119
+ }));
109
120
 
110
121
  var sut = _react.screen.getAllByRole('radio');
111
122
 
@@ -115,21 +126,25 @@ describe('Radio Input', function () {
115
126
  });
116
127
  it('Should ChoiceList change checked radio children is defaultValue is provided', function () {
117
128
  var fn = jest.fn();
118
- (0, _testUtils.render)( /*#__PURE__*/React.createElement(_ChoiceList.default, {
129
+ (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
119
130
  onChange: fn,
120
131
  value: "",
121
132
  name: "test-name",
122
- defaultValue: "test3"
123
- }, /*#__PURE__*/React.createElement(_.default, {
124
- value: "test1",
125
- id: "test"
126
- }, "Radio Test 1"), /*#__PURE__*/React.createElement(_.default, {
127
- value: "test2",
128
- id: "test"
129
- }, "Radio Test 2"), /*#__PURE__*/React.createElement(_.default, {
130
- value: "test3",
131
- id: "test"
132
- }, "Radio Test 3")));
133
+ defaultValue: "test3",
134
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
135
+ value: "test1",
136
+ id: "test",
137
+ children: "Radio Test 1"
138
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
139
+ value: "test2",
140
+ id: "test",
141
+ children: "Radio Test 2"
142
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
143
+ value: "test3",
144
+ id: "test",
145
+ children: "Radio Test 3"
146
+ })]
147
+ }));
133
148
 
134
149
  var sut = _react.screen.getAllByRole('radio');
135
150
 
@@ -144,22 +159,26 @@ describe('Radio Input', function () {
144
159
  });
145
160
  it('Should ChoiceList disabled radio children is isDisabled is provided', function () {
146
161
  var fn = jest.fn();
147
- (0, _testUtils.render)( /*#__PURE__*/React.createElement(_ChoiceList.default, {
162
+ (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
148
163
  onChange: fn,
149
164
  value: "",
150
165
  isDisabled: true,
151
166
  name: "test-name",
152
- defaultValue: "test3"
153
- }, /*#__PURE__*/React.createElement(_.default, {
154
- value: "test1",
155
- id: "test"
156
- }, "Radio Test 1"), /*#__PURE__*/React.createElement(_.default, {
157
- value: "test2",
158
- id: "test"
159
- }, "Radio Test 2"), /*#__PURE__*/React.createElement(_.default, {
160
- value: "test3",
161
- id: "test"
162
- }, "Radio Test 3")));
167
+ defaultValue: "test3",
168
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
169
+ value: "test1",
170
+ id: "test",
171
+ children: "Radio Test 1"
172
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
173
+ value: "test2",
174
+ id: "test",
175
+ children: "Radio Test 2"
176
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
177
+ value: "test3",
178
+ id: "test",
179
+ children: "Radio Test 3"
180
+ })]
181
+ }));
163
182
 
164
183
  var sut = _react.screen.getAllByRole('radio');
165
184
 
@@ -169,63 +188,75 @@ describe('Radio Input', function () {
169
188
  });
170
189
  it('should render helpText if helpText is provided', function () {
171
190
  var fn = jest.fn();
172
- (0, _testUtils.render)( /*#__PURE__*/React.createElement(_ChoiceList.default, {
191
+ (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
173
192
  onChange: fn,
174
193
  value: "",
175
194
  name: "test-name",
176
195
  defaultValue: "test3",
177
- helpText: "Help Text"
178
- }, /*#__PURE__*/React.createElement(_.default, {
179
- value: "test1",
180
- id: "test"
181
- }, "Radio Test 1"), /*#__PURE__*/React.createElement(_.default, {
182
- value: "test2",
183
- id: "test"
184
- }, "Radio Test 2"), /*#__PURE__*/React.createElement(_.default, {
185
- value: "test3",
186
- id: "test"
187
- }, "Radio Test 3")));
196
+ helpText: "Help Text",
197
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
198
+ value: "test1",
199
+ id: "test",
200
+ children: "Radio Test 1"
201
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
202
+ value: "test2",
203
+ id: "test",
204
+ children: "Radio Test 2"
205
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
206
+ value: "test3",
207
+ id: "test",
208
+ children: "Radio Test 3"
209
+ })]
210
+ }));
188
211
  expect(_react.screen.getByText('Help Text')).toBeInTheDocument();
189
212
  });
190
213
  it('should render label if label is provided', function () {
191
214
  var fn = jest.fn();
192
- (0, _testUtils.render)( /*#__PURE__*/React.createElement(_ChoiceList.default, {
215
+ (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
193
216
  onChange: fn,
194
217
  value: "",
195
218
  label: "any_label",
196
219
  name: "test-name",
197
220
  defaultValue: "test3",
198
- helpText: "Help Text"
199
- }, /*#__PURE__*/React.createElement(_.default, {
200
- value: "test1",
201
- id: "test"
202
- }, "Radio Test 1"), /*#__PURE__*/React.createElement(_.default, {
203
- value: "test2",
204
- id: "test"
205
- }, "Radio Test 2"), /*#__PURE__*/React.createElement(_.default, {
206
- value: "test3",
207
- id: "test"
208
- }, "Radio Test 3")));
221
+ helpText: "Help Text",
222
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
223
+ value: "test1",
224
+ id: "test",
225
+ children: "Radio Test 1"
226
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
227
+ value: "test2",
228
+ id: "test",
229
+ children: "Radio Test 2"
230
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
231
+ value: "test3",
232
+ id: "test",
233
+ children: "Radio Test 3"
234
+ })]
235
+ }));
209
236
  expect(_react.screen.getByRole('radiogroup').children[0].tagName.toLowerCase()).toBe('label');
210
237
  });
211
238
  it('should not render label if label not provided', function () {
212
239
  var fn = jest.fn();
213
- (0, _testUtils.render)( /*#__PURE__*/React.createElement(_ChoiceList.default, {
240
+ (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
214
241
  onChange: fn,
215
242
  value: "",
216
243
  name: "test-name",
217
244
  defaultValue: "test3",
218
- helpText: "Help Text"
219
- }, /*#__PURE__*/React.createElement(_.default, {
220
- value: "test1",
221
- id: "test"
222
- }, "Radio Test 1"), /*#__PURE__*/React.createElement(_.default, {
223
- value: "test2",
224
- id: "test"
225
- }, "Radio Test 2"), /*#__PURE__*/React.createElement(_.default, {
226
- value: "test3",
227
- id: "test"
228
- }, "Radio Test 3")));
245
+ helpText: "Help Text",
246
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
247
+ value: "test1",
248
+ id: "test",
249
+ children: "Radio Test 1"
250
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
251
+ value: "test2",
252
+ id: "test",
253
+ children: "Radio Test 2"
254
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
255
+ value: "test3",
256
+ id: "test",
257
+ children: "Radio Test 3"
258
+ })]
259
+ }));
229
260
  expect(_react.screen.getByRole('radiogroup').children[0].tagName.toLowerCase()).not.toBe('label');
230
261
  });
231
262
  });
@@ -15,9 +15,15 @@ var _theme = require("../../../../shared/theme");
15
15
 
16
16
  var _allIcons = require("./utils/allIcons");
17
17
 
18
+ var _jsxRuntime = require("react/jsx-runtime");
19
+
18
20
  var _excluded = ["name", "fillState", "primaryColor", "secondaryColor", "strokeColor", "size", "disabled"];
19
21
 
20
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
22
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23
+
24
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25
+
26
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
27
 
22
28
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
23
29
 
@@ -52,22 +58,23 @@ var Icon = function Icon(_ref) {
52
58
  var htmlParsedPrimaryColor = html.replace(/#133113/g, primaryColor);
53
59
  var htmlParsedSecondaryColor = htmlParsedPrimaryColor.replace(/#311331/g, secondaryColor);
54
60
  var parsedHtml = htmlParsedSecondaryColor;
55
- return /*#__PURE__*/React.createElement(_react.ThemeProvider, {
56
- theme: theme
57
- }, /*#__PURE__*/React.createElement(_styles.IconComponent, _extends({
58
- style: {
59
- fill: fillState === 'filled' ? primaryColor : fillState === 'halfFilled' ? "url(#".concat(name, "_gradient)") : secondaryColor
60
- },
61
- strokeColor: strokeColor,
62
- xmlns: xmlns,
63
- name: name,
64
- viewBox: viewBox,
65
- width: size || width,
66
- height: size || height,
67
- dangerouslySetInnerHTML: {
68
- __html: parsedHtml
69
- }
70
- }, rest)));
61
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.ThemeProvider, {
62
+ theme: theme,
63
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.IconComponent, _objectSpread({
64
+ style: {
65
+ fill: fillState === 'filled' ? primaryColor : fillState === 'halfFilled' ? "url(#".concat(name, "_gradient)") : secondaryColor
66
+ },
67
+ strokeColor: strokeColor,
68
+ xmlns: xmlns,
69
+ name: name,
70
+ viewBox: viewBox,
71
+ width: size || width,
72
+ height: size || height,
73
+ dangerouslySetInnerHTML: {
74
+ __html: parsedHtml
75
+ }
76
+ }, rest))
77
+ });
71
78
  };
72
79
 
73
80
  var _default = Icon;
@@ -15,6 +15,8 @@ var _GradientIcon = _interopRequireDefault(require("../GradientIcon"));
15
15
 
16
16
  var _svgDataTratamentFunction = require("../../utils/svgDataTratamentFunction");
17
17
 
18
+ var _jsxRuntime = require("react/jsx-runtime");
19
+
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
21
 
20
22
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -111,29 +113,29 @@ function RatingWithMultipleValues(_ref) {
111
113
  }
112
114
  }
113
115
 
114
- return /*#__PURE__*/React.createElement(_styles.RatingWrapper, {
116
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.RatingWrapper, {
115
117
  disabled: disabled,
116
118
  onMouseLeave: RatingWrapperMouseLeave,
117
119
  ref: RatingWrapperRef,
118
- "data-testid": "rating-wrapper"
119
- }, icons.map(function (icon) {
120
- return /*#__PURE__*/React.createElement(_GradientIcon.default, {
121
- size: size,
122
- "data-testid": "rating-icon-".concat(icon.id),
123
- name: name,
124
- primaryColor: primaryColor,
125
- secondaryColor: secondaryColor,
126
- strokeColor: strokeColor,
127
- key: icon.id,
128
- onMouseMove: function onMouseMove(e) {
129
- return handleMouseMove(e, icon.id);
130
- },
131
- onMouseLeave: function onMouseLeave(e) {
132
- return handleMouseMove(e, icon.id);
133
- },
134
- onClick: handleClick,
135
- fillState: icon.fillState,
136
- disabled: disabled
137
- });
138
- }));
120
+ "data-testid": "rating-wrapper",
121
+ children: icons.map(function (icon) {
122
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientIcon.default, {
123
+ size: size,
124
+ "data-testid": "rating-icon-".concat(icon.id),
125
+ name: name,
126
+ primaryColor: primaryColor,
127
+ secondaryColor: secondaryColor,
128
+ strokeColor: strokeColor,
129
+ onMouseMove: function onMouseMove(e) {
130
+ return handleMouseMove(e, icon.id);
131
+ },
132
+ onMouseLeave: function onMouseLeave(e) {
133
+ return handleMouseMove(e, icon.id);
134
+ },
135
+ onClick: handleClick,
136
+ fillState: icon.fillState,
137
+ disabled: disabled
138
+ }, icon.id);
139
+ })
140
+ });
139
141
  }