@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.
- package/dist/components/Alert/alert.test.js +9 -1
- package/dist/components/Alert/index.js +47 -35
- package/dist/components/Avatar/avatar.test.js +9 -1
- package/dist/components/Avatar/index.js +47 -27
- package/dist/components/Avatar/styles.d.ts.map +1 -1
- package/dist/components/Avatar/styles.js +4 -4
- package/dist/components/Badge/badge.test.js +9 -1
- package/dist/components/Badge/index.js +24 -15
- package/dist/components/Button/Button.test.js +19 -7
- package/dist/components/Button/index.js +28 -16
- package/dist/components/Card/ButtonCard/index.js +24 -10
- package/dist/components/Card/Expansion/index.js +24 -17
- package/dist/components/Card/card.test.js +9 -1
- package/dist/components/Card/index.js +43 -19
- package/dist/components/CheckboxInput/checkbox-input.test.js +9 -1
- package/dist/components/CheckboxInput/components/MultipleCheckbox.js +58 -43
- package/dist/components/CheckboxInput/index.js +29 -18
- package/dist/components/ColorPicker/colorpicker.test.js +9 -1
- package/dist/components/ColorPicker/components/ColorHue.js +17 -10
- package/dist/components/ColorPicker/components/ColorInput.js +3 -1
- package/dist/components/ColorPicker/components/ColorPickerBox.js +13 -9
- package/dist/components/ColorPicker/components/ColorPointer.js +3 -1
- package/dist/components/ColorPicker/components/ColorSelector.js +8 -2
- package/dist/components/ColorPicker/index.js +44 -34
- package/dist/components/DatePicker/components/DatePickerContent.js +113 -79
- package/dist/components/DatePicker/components/DateYearPicker.js +45 -32
- package/dist/components/DatePicker/datepicker.test.js +9 -1
- package/dist/components/DatePicker/index.js +40 -29
- package/dist/components/Dialog/dialog-example.js +21 -13
- package/dist/components/Dialog/dialog.test.js +5 -1
- package/dist/components/Dialog/index.js +59 -46
- package/dist/components/Dropzone/dropzone.test.js +9 -1
- package/dist/components/Dropzone/index.js +122 -97
- package/dist/components/Flex/flex.test.js +128 -14
- package/dist/components/Flex/index.js +11 -3
- package/dist/components/Grid/grid.test.js +86 -81
- package/dist/components/Grid/index.js +11 -3
- package/dist/components/Icon/icon.test.js +3 -3
- package/dist/components/Icon/index.js +8 -2
- package/dist/components/IconItem/IconItem.test.js +9 -1
- package/dist/components/IconItem/index.js +33 -18
- package/dist/components/ImageItem/imageFake.js +13 -9
- package/dist/components/ImageItem/index.js +36 -24
- package/dist/components/ImageItem/input.test.js +10 -7
- package/dist/components/Input/index.js +67 -40
- package/dist/components/Input/input.test.js +4 -4
- package/dist/components/Label/index.js +12 -9
- package/dist/components/Label/input.test.js +3 -1
- package/dist/components/List/index.js +15 -4
- package/dist/components/List/list.test.js +36 -18
- package/dist/components/Menu/components/Submenu.d.ts.map +1 -1
- package/dist/components/Menu/components/Submenu.js +49 -26
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +19 -10
- package/dist/components/Menu/menu.test.js +14 -14
- package/dist/components/Menu/styles.d.ts +1 -0
- package/dist/components/Menu/styles.d.ts.map +1 -1
- package/dist/components/Menu/styles.js +19 -15
- package/dist/components/Modal/index.js +24 -19
- package/dist/components/Modal/modal.test.js +44 -12
- package/dist/components/Pagination/index.js +54 -45
- package/dist/components/Pagination/pagination.test.js +13 -11
- package/dist/components/Progress/Circle/index.js +38 -29
- package/dist/components/Progress/Linear/index.js +24 -17
- package/dist/components/Progress/index.js +4 -2
- package/dist/components/Progress/progress.test.js +9 -1
- package/dist/components/RadioInput/components/ChoiceList/index.js +28 -20
- package/dist/components/RadioInput/index.js +27 -22
- package/dist/components/RadioInput/radio-input.test.js +118 -87
- package/dist/components/Rating/components/GradientIcon/index.js +24 -17
- package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.js +24 -22
- package/dist/components/Rating/components/RatingWithSingleValue/RatingWithSingleValue.js +21 -17
- package/dist/components/Rating/index.js +29 -26
- package/dist/components/Rating/rating.test.js +3 -1
- package/dist/components/SelectInput/components/OptionsArea/index.js +37 -32
- package/dist/components/SelectInput/components/SelectArea/index.js +46 -34
- package/dist/components/SelectInput/index.js +26 -23
- package/dist/components/SelectInput/selectInput.test.js +10 -4
- package/dist/components/Skeleton/index.js +11 -1
- package/dist/components/Skeleton/skeleton.test.js +3 -1
- package/dist/components/Slider/components/SliderPointer.d.ts.map +1 -1
- package/dist/components/Slider/components/SliderPointer.js +23 -8
- package/dist/components/Slider/components/SliderRail.js +8 -2
- package/dist/components/Slider/components/SliderSelector.js +86 -78
- package/dist/components/Slider/index.js +28 -16
- package/dist/components/Slider/slider.test.js +9 -1
- package/dist/components/Spinner/index.js +3 -1
- package/dist/components/Spinner/spinner.test.js +9 -1
- package/dist/components/Steps/index.js +25 -17
- package/dist/components/Steps/steps.test.js +3 -1
- package/dist/components/Switch/index.js +23 -17
- package/dist/components/Switch/input.test.js +3 -1
- package/dist/components/Table/components/MenuItem.js +16 -13
- package/dist/components/Table/index.js +139 -99
- package/dist/components/Table/table.test.js +3 -1
- package/dist/components/Tabs/TabsExample.js +37 -23
- package/dist/components/Tabs/components/Tab.js +12 -3
- package/dist/components/Tabs/components/TabPanel.js +8 -3
- package/dist/components/Tabs/components/Tabs.js +33 -23
- package/dist/components/Tabs/tabs.test.js +103 -83
- package/dist/components/Tag/index.js +21 -16
- package/dist/components/Tag/tag.test.js +9 -7
- package/dist/components/TextAreaInput/index.js +25 -15
- package/dist/components/TextAreaInput/text-area-input.test.js +8 -2
- package/dist/components/Thumbnail/index.js +71 -60
- package/dist/components/Thumbnail/thumbnail.test.js +9 -1
- package/dist/components/Timeline/components/Timeline.js +9 -5
- package/dist/components/Timeline/components/TimelineContent.js +31 -15
- package/dist/components/Timeline/components/TimelineItem.js +11 -1
- package/dist/components/Timeline/components/TimelineSeparator.js +9 -4
- package/dist/components/Timeline/timeline.test.js +105 -76
- package/dist/components/Toast/button-example.js +10 -5
- package/dist/components/Toast/components/Toast.js +16 -11
- package/dist/components/Toast/contexts/ToastProvider.js +6 -3
- package/dist/components/Toast/index.js +90 -62
- package/dist/components/Toast/toast.test.js +11 -1
- package/dist/components/Tooltip/componenteTeste.js +42 -14
- package/dist/components/Tooltip/index.js +56 -46
- package/dist/components/Tooltip/tooltip.test.js +13 -8
- package/dist/components/Typography/index.js +11 -3
- package/dist/components/Typography/typography.test.js +3 -1
- package/dist/shared/components/FocusLock/index.js +11 -4
- package/dist/shared/tests/test-utils.js +6 -3
- package/dist/shared/theme/button-example.js +6 -3
- package/dist/shared/theme/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/shared/theme/contexts/ThemeContext.js +12 -29
- package/dist/shared/theme/theme.test.js +25 -11
- package/package.json +1 -1
- package/dist/components/Slider/icons/pointer.js +0 -15
- package/dist/shared/logos/pp_logo_horizontal.js +0 -51
- package/dist/shared/logos/pp_logo_horizontal_dark_mode.js +0 -51
- package/dist/shared/logos/pp_logo_vertical.js +0 -51
- package/dist/shared/logos/pp_logo_vertical_dark_mode.js +0 -51
|
@@ -8,10 +8,20 @@ var _buttonExample = _interopRequireDefault(require("./button-example"));
|
|
|
8
8
|
|
|
9
9
|
var _ToastProvider = _interopRequireDefault(require("./contexts/ToastProvider"));
|
|
10
10
|
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
|
|
11
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
14
|
|
|
15
|
+
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; }
|
|
16
|
+
|
|
17
|
+
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; }
|
|
18
|
+
|
|
19
|
+
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; }
|
|
20
|
+
|
|
13
21
|
var setup = function setup(props) {
|
|
14
|
-
return (0, _testUtils.render)( /*#__PURE__*/
|
|
22
|
+
return (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToastProvider.default, {
|
|
23
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_buttonExample.default, _objectSpread({}, props))
|
|
24
|
+
}));
|
|
15
25
|
};
|
|
16
26
|
|
|
17
27
|
describe('Toast', function () {
|
|
@@ -8,32 +8,60 @@ exports.TesteComponent = TesteComponent;
|
|
|
8
8
|
|
|
9
9
|
var _Input = _interopRequireDefault(require("../Input"));
|
|
10
10
|
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
|
|
11
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
14
|
|
|
13
15
|
function TesteComponent(_ref) {
|
|
14
16
|
var theme = _ref.theme;
|
|
15
|
-
return /*#__PURE__*/
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
16
18
|
style: {
|
|
17
19
|
padding: 10,
|
|
18
20
|
width: 200,
|
|
19
21
|
color: 'white'
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
22
|
+
},
|
|
23
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
24
|
+
children: "Estat\xEDsticas das transa\xE7\xF5es \xE9 dividida em duas partes:"
|
|
25
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
|
|
26
|
+
style: {
|
|
27
|
+
color: theme.colors.primary.default
|
|
28
|
+
},
|
|
29
|
+
children: "\xCDndice de convers\xE3o"
|
|
30
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
31
|
+
children: "\xC9 a raz\xE3o entre o n\xFAmero de visitantes de uma loja e a quantidade de compras, efetivamente separadas por."
|
|
32
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
|
|
33
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
34
|
+
children: "Convers\xE3o no cr\xE9tido"
|
|
35
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
36
|
+
children: "Convers\xE3o no pix"
|
|
37
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
38
|
+
children: "Convers\xE3o no boleto"
|
|
39
|
+
})]
|
|
40
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
|
|
41
|
+
style: {
|
|
42
|
+
color: theme.colors.primary.default
|
|
43
|
+
},
|
|
44
|
+
children: "Forma de pagamento"
|
|
45
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
46
|
+
children: "Trata-se apenas das porcentagens entre:"
|
|
47
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
|
|
48
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
49
|
+
children: "Convers\xE3o no cr\xE9tido"
|
|
50
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
51
|
+
children: "Convers\xE3o no pix"
|
|
52
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
53
|
+
children: "Convers\xE3o no boleto"
|
|
54
|
+
})]
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
30
57
|
}
|
|
31
58
|
|
|
32
59
|
function ComponentTeste() {
|
|
33
|
-
return /*#__PURE__*/
|
|
60
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
34
61
|
style: {
|
|
35
62
|
margin: '0 auto',
|
|
36
63
|
width: 200
|
|
37
|
-
}
|
|
38
|
-
|
|
64
|
+
},
|
|
65
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, {})
|
|
66
|
+
});
|
|
39
67
|
}
|
|
@@ -17,6 +17,8 @@ var _framerMotion = require("framer-motion");
|
|
|
17
17
|
|
|
18
18
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
19
19
|
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
20
22
|
var _excluded = ["position", "heightToExpand", "maxWidth", "label", "labelColor", "expandable", "hasArrow", "isOpen", "isExpanded", "animationDuration", "backgroundColor", "width", "children"];
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -75,55 +77,63 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
75
77
|
expanded = _useState4[0],
|
|
76
78
|
setExpanded = _useState4[1];
|
|
77
79
|
|
|
78
|
-
return /*#__PURE__*/
|
|
80
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.TooltipComponentWrapper, {
|
|
79
81
|
hasArrow: hasArrow,
|
|
80
82
|
position: position,
|
|
81
|
-
backgroundColor: backgroundColor
|
|
82
|
-
}, /*#__PURE__*/React.createElement(_styles.TooltipTarget, {
|
|
83
|
-
onMouseEnter: function onMouseEnter() {
|
|
84
|
-
return setShowTooltip(true);
|
|
85
|
-
},
|
|
86
|
-
onMouseLeave: function onMouseLeave() {
|
|
87
|
-
return setShowTooltip(false);
|
|
88
|
-
},
|
|
89
|
-
"data-testid": "tooltip-target"
|
|
90
|
-
}, children || /*#__PURE__*/React.createElement(_componenteTeste.ComponentTeste, null)), /*#__PURE__*/React.createElement(_framerMotion.AnimatePresence, null, (showTooltip || isExpanded || expanded || isOpen) && /*#__PURE__*/React.createElement(_styles.MotionDiv, {
|
|
91
|
-
initial: {
|
|
92
|
-
height: expandable ? expanded ? 'max-content' : heightToExpand : '',
|
|
93
|
-
opacity: 0
|
|
94
|
-
},
|
|
95
|
-
animate: {
|
|
96
|
-
height: expandable ? expanded || isExpanded ? 'max-content' : heightToExpand : '',
|
|
97
|
-
opacity: 1
|
|
98
|
-
},
|
|
99
|
-
exit: {
|
|
100
|
-
opacity: 0
|
|
101
|
-
},
|
|
102
|
-
transition: {
|
|
103
|
-
duration: animationDuration
|
|
104
|
-
},
|
|
105
|
-
onMouseEnter: function onMouseEnter() {
|
|
106
|
-
return setExpanded(true);
|
|
107
|
-
},
|
|
108
|
-
onMouseLeave: function onMouseLeave() {
|
|
109
|
-
return setExpanded(false);
|
|
110
|
-
},
|
|
111
|
-
className: "TooltipArea",
|
|
112
|
-
"data-testid": "tooltip-area",
|
|
113
|
-
position: position,
|
|
114
83
|
backgroundColor: backgroundColor,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
84
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TooltipTarget, {
|
|
85
|
+
onMouseEnter: function onMouseEnter() {
|
|
86
|
+
return setShowTooltip(true);
|
|
87
|
+
},
|
|
88
|
+
onMouseLeave: function onMouseLeave() {
|
|
89
|
+
return setShowTooltip(false);
|
|
90
|
+
},
|
|
91
|
+
"data-testid": "tooltip-target",
|
|
92
|
+
children: children || /*#__PURE__*/(0, _jsxRuntime.jsx)(_componenteTeste.ComponentTeste, {})
|
|
93
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_framerMotion.AnimatePresence, {
|
|
94
|
+
children: (showTooltip || isExpanded || expanded || isOpen) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.MotionDiv, {
|
|
95
|
+
initial: {
|
|
96
|
+
height: expandable ? expanded ? 'max-content' : heightToExpand : '',
|
|
97
|
+
opacity: 0
|
|
98
|
+
},
|
|
99
|
+
animate: {
|
|
100
|
+
height: expandable ? expanded || isExpanded ? 'max-content' : heightToExpand : '',
|
|
101
|
+
opacity: 1
|
|
102
|
+
},
|
|
103
|
+
exit: {
|
|
104
|
+
opacity: 0
|
|
105
|
+
},
|
|
106
|
+
transition: {
|
|
107
|
+
duration: animationDuration
|
|
108
|
+
},
|
|
109
|
+
onMouseEnter: function onMouseEnter() {
|
|
110
|
+
return setExpanded(true);
|
|
111
|
+
},
|
|
112
|
+
onMouseLeave: function onMouseLeave() {
|
|
113
|
+
return setExpanded(false);
|
|
114
|
+
},
|
|
115
|
+
className: "TooltipArea",
|
|
116
|
+
"data-testid": "tooltip-area",
|
|
117
|
+
position: position,
|
|
118
|
+
backgroundColor: backgroundColor,
|
|
119
|
+
isLabelString: typeof label === 'string' && label.length > 0,
|
|
120
|
+
width: width,
|
|
121
|
+
maxWidth: maxWidth,
|
|
122
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TooltipWrapper, {
|
|
123
|
+
labelColor: labelColor,
|
|
124
|
+
children: label || /*#__PURE__*/(0, _jsxRuntime.jsx)(_componenteTeste.TesteComponent, {
|
|
125
|
+
theme: theme
|
|
126
|
+
})
|
|
127
|
+
}), expandable && !isExpanded && !expanded && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TooltipDots, {
|
|
128
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
129
|
+
name: "chevron-down",
|
|
130
|
+
size: "40px",
|
|
131
|
+
color: "neutral.white"
|
|
132
|
+
})
|
|
133
|
+
})]
|
|
134
|
+
})
|
|
135
|
+
})]
|
|
136
|
+
});
|
|
127
137
|
};
|
|
128
138
|
|
|
129
139
|
var _default = Tooltip;
|
|
@@ -8,6 +8,8 @@ require("@testing-library/jest-dom/extend-expect");
|
|
|
8
8
|
|
|
9
9
|
var _ = _interopRequireDefault(require("."));
|
|
10
10
|
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
|
|
11
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
14
|
|
|
13
15
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
@@ -21,7 +23,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
21
23
|
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; }
|
|
22
24
|
|
|
23
25
|
var setup = function setup(props) {
|
|
24
|
-
var utils = (0, _testUtils.render)( /*#__PURE__*/
|
|
26
|
+
var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, _objectSpread({}, props)));
|
|
25
27
|
var TooltipTarget = utils.getByTestId('tooltip-target');
|
|
26
28
|
|
|
27
29
|
var getTooltipMotion = function getTooltipMotion() {
|
|
@@ -35,11 +37,14 @@ var setup = function setup(props) {
|
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
function MockComponent() {
|
|
38
|
-
return /*#__PURE__*/
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
39
41
|
style: {
|
|
40
42
|
height: 600
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
+
},
|
|
44
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
45
|
+
children: "Mocked"
|
|
46
|
+
})
|
|
47
|
+
});
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
describe('Tooltip', function () {
|
|
@@ -51,7 +56,7 @@ describe('Tooltip', function () {
|
|
|
51
56
|
switch (_context.prev = _context.next) {
|
|
52
57
|
case 0:
|
|
53
58
|
_setup = setup({
|
|
54
|
-
children: /*#__PURE__*/
|
|
59
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MockComponent, {})
|
|
55
60
|
}), findByText = _setup.findByText;
|
|
56
61
|
_context.next = 3;
|
|
57
62
|
return findByText('Mocked');
|
|
@@ -75,7 +80,7 @@ describe('Tooltip', function () {
|
|
|
75
80
|
switch (_context2.prev = _context2.next) {
|
|
76
81
|
case 0:
|
|
77
82
|
_setup2 = setup({
|
|
78
|
-
children: /*#__PURE__*/
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MockComponent, {}),
|
|
79
84
|
label: 'MockLabel'
|
|
80
85
|
}), findByText = _setup2.findByText, TooltipTarget = _setup2.TooltipTarget;
|
|
81
86
|
|
|
@@ -103,7 +108,7 @@ describe('Tooltip', function () {
|
|
|
103
108
|
switch (_context3.prev = _context3.next) {
|
|
104
109
|
case 0:
|
|
105
110
|
_setup3 = setup({
|
|
106
|
-
children: /*#__PURE__*/
|
|
111
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MockComponent, {}),
|
|
107
112
|
label: 'MockLabel',
|
|
108
113
|
isOpen: true
|
|
109
114
|
}), findByText = _setup3.findByText;
|
|
@@ -129,7 +134,7 @@ describe('Tooltip', function () {
|
|
|
129
134
|
switch (_context4.prev = _context4.next) {
|
|
130
135
|
case 0:
|
|
131
136
|
_setup4 = setup({
|
|
132
|
-
children: /*#__PURE__*/
|
|
137
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MockComponent, {}),
|
|
133
138
|
label: 'Mock label boladíssima',
|
|
134
139
|
width: '100px'
|
|
135
140
|
}), getTooltipMotion = _setup4.getTooltipMotion, TooltipTarget = _setup4.TooltipTarget;
|
|
@@ -11,9 +11,15 @@ var _getColorValue = require("../../utils/getColorValue");
|
|
|
11
11
|
|
|
12
12
|
var _styles = require("./styles");
|
|
13
13
|
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
14
16
|
var _excluded = ["variant", "color", "children"];
|
|
15
17
|
|
|
16
|
-
function
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
17
23
|
|
|
18
24
|
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; }
|
|
19
25
|
|
|
@@ -32,10 +38,12 @@ var Typography = function Typography(_ref) {
|
|
|
32
38
|
colorMode = _useColorMode.colorMode;
|
|
33
39
|
|
|
34
40
|
var textColor = (0, _getColorValue.getColorValue)(color || (colorMode === 'dark' ? 'neutral.white' : 'neutral.black'), theme);
|
|
35
|
-
return /*#__PURE__*/
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledText, _objectSpread(_objectSpread({
|
|
36
42
|
as: variant,
|
|
37
43
|
textColor: textColor
|
|
38
|
-
}, rest),
|
|
44
|
+
}, rest), {}, {
|
|
45
|
+
children: children
|
|
46
|
+
}));
|
|
39
47
|
};
|
|
40
48
|
|
|
41
49
|
var _default = Typography;
|
|
@@ -6,6 +6,8 @@ require("@testing-library/jest-dom");
|
|
|
6
6
|
|
|
7
7
|
var _ = _interopRequireDefault(require("."));
|
|
8
8
|
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
|
|
9
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
12
|
|
|
11
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; }
|
|
@@ -15,7 +17,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
15
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; }
|
|
16
18
|
|
|
17
19
|
var setup = function setup(props) {
|
|
18
|
-
var utils = (0, _testUtils.render)( /*#__PURE__*/
|
|
20
|
+
var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, _objectSpread({}, props)));
|
|
19
21
|
return _objectSpread({}, utils);
|
|
20
22
|
};
|
|
21
23
|
|
|
@@ -7,9 +7,15 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
|
|
10
12
|
var _excluded = ["isLocked", "children"];
|
|
11
13
|
|
|
12
|
-
function
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
13
19
|
|
|
14
20
|
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; }
|
|
15
21
|
|
|
@@ -83,9 +89,10 @@ var FocusLock = function FocusLock(_ref) {
|
|
|
83
89
|
window.removeEventListener('keydown', handleKeyPress);
|
|
84
90
|
};
|
|
85
91
|
}, [isLocked, focusableItems]);
|
|
86
|
-
return /*#__PURE__*/
|
|
87
|
-
ref: rootNode
|
|
88
|
-
|
|
92
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
93
|
+
ref: rootNode,
|
|
94
|
+
children: children
|
|
95
|
+
}));
|
|
89
96
|
};
|
|
90
97
|
|
|
91
98
|
var _default = FocusLock;
|
|
@@ -11,6 +11,8 @@ var _useTheme2 = require("../theme/hooks/useTheme");
|
|
|
11
11
|
|
|
12
12
|
var _react = require("@testing-library/react");
|
|
13
13
|
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
14
16
|
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; }
|
|
15
17
|
|
|
16
18
|
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; }
|
|
@@ -23,10 +25,11 @@ var AllTheProviders = function AllTheProviders(_ref) {
|
|
|
23
25
|
var _useTheme = (0, _useTheme2.useTheme)(),
|
|
24
26
|
theme = _useTheme.theme;
|
|
25
27
|
|
|
26
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeContext.PPUIThemeProvider, {
|
|
27
29
|
initialColorMode: "light",
|
|
28
|
-
theme: theme
|
|
29
|
-
|
|
30
|
+
theme: theme,
|
|
31
|
+
children: children
|
|
32
|
+
});
|
|
30
33
|
};
|
|
31
34
|
|
|
32
35
|
function customRender(ui, options) {
|
|
@@ -9,6 +9,8 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
|
9
9
|
|
|
10
10
|
var _ = require(".");
|
|
11
11
|
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
|
|
12
14
|
var _templateObject;
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -28,11 +30,12 @@ var Button = function Button() {
|
|
|
28
30
|
|
|
29
31
|
var colorBg = (0, _.useColorModeValue)('rgba(0, 0, 0, .1)', '#000');
|
|
30
32
|
var colorText = (0, _.useColorModeValue)('#000', '#fff');
|
|
31
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledButton, {
|
|
32
34
|
colorBg: colorBg,
|
|
33
35
|
colorText: colorText,
|
|
34
|
-
onClick: switchColorMode
|
|
35
|
-
|
|
36
|
+
onClick: switchColorMode,
|
|
37
|
+
children: ["Toggle ", colorMode === 'light' ? 'dark' : 'light', " Mode"]
|
|
38
|
+
});
|
|
36
39
|
};
|
|
37
40
|
|
|
38
41
|
exports.Button = Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAuB,MAAM,OAAO,CAAC;AAQtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,aAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,aAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAAyC,CAAC;AAEnE,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAuB,MAAM,OAAO,CAAC;AAQtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,aAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,aAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAAyC,CAAC;AAEnE,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eA8B1F"}
|
|
@@ -16,6 +16,8 @@ var _ = require("..");
|
|
|
16
16
|
|
|
17
17
|
var _localStorageController = require("../utils/localStorageController");
|
|
18
18
|
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
|
|
19
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
22
|
|
|
21
23
|
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; }
|
|
@@ -57,29 +59,6 @@ function PPUIThemeProvider(_ref) {
|
|
|
57
59
|
}
|
|
58
60
|
}, [setColorMode]);
|
|
59
61
|
|
|
60
|
-
if (process.env.DEV_MODE) {
|
|
61
|
-
var module = require('@storybook/addons');
|
|
62
|
-
|
|
63
|
-
var addons = module.addons; // only for storybook
|
|
64
|
-
|
|
65
|
-
var channel;
|
|
66
|
-
|
|
67
|
-
if (addons.hasChannel()) {
|
|
68
|
-
channel = addons.getChannel();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (channel) {
|
|
72
|
-
(0, _react.useEffect)(function () {
|
|
73
|
-
if (!channel) return;
|
|
74
|
-
channel.on('DARK_MODE', setColorMode);
|
|
75
|
-
return function () {
|
|
76
|
-
if (!channel) return;
|
|
77
|
-
channel.off('DARK_MODE', setColorMode);
|
|
78
|
-
};
|
|
79
|
-
}, [channel, setColorMode]);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
62
|
function switchColorMode() {
|
|
84
63
|
var newColorMode = !colorMode;
|
|
85
64
|
|
|
@@ -88,15 +67,19 @@ function PPUIThemeProvider(_ref) {
|
|
|
88
67
|
setColorMode(newColorMode);
|
|
89
68
|
}
|
|
90
69
|
|
|
91
|
-
return /*#__PURE__*/
|
|
70
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ThemeContext.Provider, {
|
|
92
71
|
value: {
|
|
93
72
|
theme: theme || _.defaultTheme,
|
|
94
73
|
colorMode: colorMode,
|
|
95
74
|
switchColorMode: switchColorMode
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
75
|
+
},
|
|
76
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.ThemeProvider, {
|
|
77
|
+
theme: _objectSpread(_objectSpread({}, theme || _.defaultTheme), {}, {
|
|
78
|
+
colorMode: colorMode ? 'dark' : 'light'
|
|
79
|
+
}),
|
|
80
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToastProvider.default, {
|
|
81
|
+
children: children
|
|
82
|
+
})
|
|
100
83
|
})
|
|
101
|
-
}
|
|
84
|
+
});
|
|
102
85
|
}
|
|
@@ -6,12 +6,22 @@ require("@testing-library/jest-dom");
|
|
|
6
6
|
|
|
7
7
|
var _ = require(".");
|
|
8
8
|
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
|
|
9
11
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
10
12
|
|
|
11
13
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
12
14
|
|
|
15
|
+
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; }
|
|
16
|
+
|
|
17
|
+
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; }
|
|
18
|
+
|
|
19
|
+
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; }
|
|
20
|
+
|
|
13
21
|
var setup = function setup(props) {
|
|
14
|
-
var utils = (0, _react.render)( /*#__PURE__*/
|
|
22
|
+
var utils = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.PPUIThemeProvider, _objectSpread(_objectSpread({}, props), {}, {
|
|
23
|
+
children: props.children
|
|
24
|
+
})));
|
|
15
25
|
return utils;
|
|
16
26
|
};
|
|
17
27
|
|
|
@@ -32,12 +42,14 @@ describe('Theme', function () {
|
|
|
32
42
|
var _useTheme = (0, _.useTheme)(),
|
|
33
43
|
theme = _useTheme.theme;
|
|
34
44
|
|
|
35
|
-
return /*#__PURE__*/
|
|
45
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
46
|
+
children: theme.colors.primary
|
|
47
|
+
});
|
|
36
48
|
};
|
|
37
49
|
|
|
38
50
|
utils = setup({
|
|
39
51
|
theme: newTheme,
|
|
40
|
-
children: /*#__PURE__*/
|
|
52
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TestComponent, {})
|
|
41
53
|
});
|
|
42
54
|
_context.t0 = expect;
|
|
43
55
|
_context.next = 6;
|
|
@@ -60,14 +72,15 @@ describe('Theme', function () {
|
|
|
60
72
|
colorMode = _useColorMode.colorMode,
|
|
61
73
|
switchColorMode = _useColorMode.switchColorMode;
|
|
62
74
|
|
|
63
|
-
return /*#__PURE__*/
|
|
75
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
64
76
|
"data-testid": "button-child",
|
|
65
|
-
onClick: switchColorMode
|
|
66
|
-
|
|
77
|
+
onClick: switchColorMode,
|
|
78
|
+
children: colorMode === 'light' ? 'Light mode' : 'Dark mode'
|
|
79
|
+
});
|
|
67
80
|
};
|
|
68
81
|
|
|
69
82
|
var utils = setup({
|
|
70
|
-
children: /*#__PURE__*/
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChildComponent, {})
|
|
71
84
|
});
|
|
72
85
|
expect(utils.getByTestId('button-child')).toHaveTextContent('Light mode');
|
|
73
86
|
|
|
@@ -83,14 +96,15 @@ describe('Theme', function () {
|
|
|
83
96
|
switchColorMode = _useColorMode2.switchColorMode;
|
|
84
97
|
|
|
85
98
|
var color = (0, _.useColorModeValue)('#ff0000', '#0000ff');
|
|
86
|
-
return /*#__PURE__*/
|
|
99
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
87
100
|
"data-testid": "button-child",
|
|
88
|
-
onClick: switchColorMode
|
|
89
|
-
|
|
101
|
+
onClick: switchColorMode,
|
|
102
|
+
children: color
|
|
103
|
+
});
|
|
90
104
|
};
|
|
91
105
|
|
|
92
106
|
var utils = setup({
|
|
93
|
-
children: /*#__PURE__*/
|
|
107
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChildComponent, {})
|
|
94
108
|
});
|
|
95
109
|
expect(utils.getByTestId('button-child')).toHaveTextContent('#ff0000');
|
|
96
110
|
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/*#__PURE__*/
|
|
4
|
-
React.createElement("svg", {
|
|
5
|
-
width: "40",
|
|
6
|
-
height: "50",
|
|
7
|
-
viewBox: "0 0 40 50",
|
|
8
|
-
fill: "inherit",
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
11
|
-
"fill-rule": "evenodd",
|
|
12
|
-
"clip-rule": "evenodd",
|
|
13
|
-
d: "M40 29.6552C39.998 29.6004 39.9958 29.5457 39.9934 29.491C39.9724 28.6775 39.901 27.8763 39.7824 27.0903C37.9437 13.2559 25.8236 3.35911 19.6491 0C13.632 3.39038 1.76695 13.4408 0.163142 27.4777C0.0775457 28.1344 0.0249225 28.8012 0.00695625 29.4765C0.00444922 29.536 0.00213009 29.5956 0 29.6552H0.00301594C0.00100805 29.7699 0 29.8848 0 30C0 40.8553 8.95431 49.6552 20 49.6552C31.0457 49.6552 40 40.8553 40 30C40 29.8848 39.999 29.7699 39.997 29.6552H40Z",
|
|
14
|
-
fill: "inherit"
|
|
15
|
-
}));
|