@storybook/addon-interactions 6.4.0-beta.14 → 6.4.0-beta.18

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/cjs/Panel.js CHANGED
@@ -23,12 +23,6 @@ Object.defineProperty(exports, "__esModule", {
23
23
  });
24
24
  exports.Panel = void 0;
25
25
 
26
- require("core-js/modules/es.array.includes.js");
27
-
28
- require("core-js/modules/es.object.assign.js");
29
-
30
- require("core-js/modules/es.string.starts-with.js");
31
-
32
26
  require("core-js/modules/es.map.js");
33
27
 
34
28
  require("core-js/modules/es.object.to-string.js");
@@ -41,12 +35,16 @@ require("core-js/modules/web.dom-collections.iterator.js");
41
35
 
42
36
  require("core-js/modules/es.array.map.js");
43
37
 
38
+ require("core-js/modules/es.object.assign.js");
39
+
44
40
  require("core-js/modules/es.array.slice.js");
45
41
 
46
42
  require("core-js/modules/es.string.split.js");
47
43
 
48
44
  require("core-js/modules/es.regexp.exec.js");
49
45
 
46
+ require("core-js/modules/es.array.includes.js");
47
+
50
48
  require("core-js/modules/es.string.includes.js");
51
49
 
52
50
  var _global = _interopRequireDefault(require("global"));
@@ -65,16 +63,12 @@ var _instrumenter = require("@storybook/instrumenter");
65
63
 
66
64
  var _theming = require("@storybook/theming");
67
65
 
68
- var _polished = require("polished");
69
-
70
- var _MatcherResult = require("./components/MatcherResult");
71
-
72
- var _MethodCall = require("./components/MethodCall");
73
-
74
66
  var _StatusIcon = require("./components/StatusIcon/StatusIcon");
75
67
 
76
68
  var _Subnav = require("./components/Subnav/Subnav");
77
69
 
70
+ var _Interaction = require("./components/Interaction/Interaction");
71
+
78
72
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
79
73
 
80
74
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -105,93 +99,6 @@ var TabIcon = (0, _theming.styled)(_StatusIcon.StatusIcon)({
105
99
  marginLeft: 5
106
100
  });
107
101
 
108
- var MethodCallWrapper = _theming.styled.div(function (_ref) {
109
- var theme = _ref.theme;
110
- return {
111
- fontFamily: _theming.typography.fonts.mono,
112
- fontSize: _theming.typography.size.s1
113
- };
114
- });
115
-
116
- var RowContainer = (0, _theming.styled)('div', {
117
- shouldForwardProp: function shouldForwardProp(prop) {
118
- return !['call'].includes(prop);
119
- }
120
- })(function (_ref2) {
121
- var theme = _ref2.theme,
122
- call = _ref2.call;
123
- return Object.assign({
124
- display: 'flex',
125
- flexDirection: 'column',
126
- borderBottom: "1px solid ".concat(theme.appBorderColor),
127
- fontFamily: _theming.typography.fonts.base,
128
- fontSize: 13
129
- }, call.state === _instrumenter.CallStates.ERROR && {
130
- backgroundColor: theme.base === 'dark' ? (0, _polished.transparentize)(0.93, theme.color.negative) : theme.background.warning
131
- });
132
- });
133
- var RowLabel = (0, _theming.styled)('button', {
134
- shouldForwardProp: function shouldForwardProp(prop) {
135
- return !['call'].includes(prop);
136
- }
137
- })(function (_ref3) {
138
- var theme = _ref3.theme,
139
- disabled = _ref3.disabled,
140
- call = _ref3.call;
141
- return {
142
- display: 'grid',
143
- background: 'none',
144
- border: 0,
145
- gridTemplateColumns: '15px 1fr',
146
- alignItems: 'center',
147
- minHeight: 40,
148
- margin: 0,
149
- padding: '8px 15px',
150
- textAlign: 'start',
151
- cursor: disabled || call.state === _instrumenter.CallStates.ERROR ? 'default' : 'pointer',
152
- '&:hover': {
153
- background: theme.base === 'dark' ? (0, _polished.transparentize)(0.9, theme.color.secondary) : '#F3FAFF'
154
- },
155
- '&:focus-visible': {
156
- outline: 0,
157
- boxShadow: "inset 3px 0 0 0 ".concat(call.state === _instrumenter.CallStates.ERROR ? theme.color.warning : theme.color.secondary),
158
- background: call.state === _instrumenter.CallStates.ERROR ? 'transparent' : '#F3FAFF'
159
- },
160
- '& > div': {
161
- opacity: call.state === _instrumenter.CallStates.WAITING ? 0.5 : 1
162
- }
163
- };
164
- });
165
- var RowMessage = (0, _theming.styled)('pre')({
166
- margin: 0,
167
- padding: '8px 10px 8px 30px',
168
- fontSize: _theming.typography.size.s1
169
- });
170
-
171
- var Interaction = function Interaction(_ref4) {
172
- var call = _ref4.call,
173
- callsById = _ref4.callsById,
174
- onClick = _ref4.onClick,
175
- isDisabled = _ref4.isDisabled;
176
- return /*#__PURE__*/React.createElement(RowContainer, {
177
- call: call
178
- }, /*#__PURE__*/React.createElement(RowLabel, {
179
- call: call,
180
- onClick: onClick,
181
- disabled: isDisabled
182
- }, /*#__PURE__*/React.createElement(_StatusIcon.StatusIcon, {
183
- status: call.state
184
- }), /*#__PURE__*/React.createElement(MethodCallWrapper, {
185
- style: {
186
- marginLeft: 6,
187
- marginBottom: 1
188
- }
189
- }, /*#__PURE__*/React.createElement(_MethodCall.MethodCall, {
190
- call: call,
191
- callsById: callsById
192
- }))), call.state === _instrumenter.CallStates.ERROR && call.exception && (call.exception.message.startsWith('expect(') ? /*#__PURE__*/React.createElement(_MatcherResult.MatcherResult, call.exception) : /*#__PURE__*/React.createElement(RowMessage, null, call.exception.message)));
193
- };
194
-
195
102
  var Panel = function Panel(props) {
196
103
  var _useChannel;
197
104
 
@@ -212,9 +119,9 @@ var Panel = function Panel(props) {
212
119
 
213
120
  var calls = React.useRef(new Map());
214
121
 
215
- var setCall = function setCall(_ref5) {
216
- var state = _ref5.state,
217
- call = _objectWithoutProperties(_ref5, ["state"]);
122
+ var setCall = function setCall(_ref) {
123
+ var state = _ref.state,
124
+ call = _objectWithoutProperties(_ref, ["state"]);
218
125
 
219
126
  return calls.current.set(call.id, call);
220
127
  };
@@ -224,18 +131,18 @@ var Panel = function Panel(props) {
224
131
  log = _React$useState8[0],
225
132
  setLog = _React$useState8[1];
226
133
 
227
- var interactions = log.map(function (_ref6) {
228
- var callId = _ref6.callId,
229
- state = _ref6.state;
134
+ var interactions = log.map(function (_ref2) {
135
+ var callId = _ref2.callId,
136
+ state = _ref2.state;
230
137
  return Object.assign({}, calls.current.get(callId), {
231
138
  state: state
232
139
  });
233
140
  });
234
141
  var endRef = React.useRef();
235
142
  React.useEffect(function () {
236
- var observer = new _global.default.window.IntersectionObserver(function (_ref7) {
237
- var _ref8 = _slicedToArray(_ref7, 1),
238
- end = _ref8[0];
143
+ var observer = new _global.default.window.IntersectionObserver(function (_ref3) {
144
+ var _ref4 = _slicedToArray(_ref3, 1),
145
+ end = _ref4[0];
239
146
 
240
147
  return setScrollTarget(end.isIntersecting ? undefined : end.target);
241
148
  }, {
@@ -246,8 +153,8 @@ var Panel = function Panel(props) {
246
153
  return observer.disconnect();
247
154
  };
248
155
  }, []);
249
- var emit = (0, _api.useChannel)((_useChannel = {}, _defineProperty(_useChannel, _instrumenter.EVENTS.CALL, setCall), _defineProperty(_useChannel, _instrumenter.EVENTS.SYNC, setLog), _defineProperty(_useChannel, _instrumenter.EVENTS.LOCK, setLock), _defineProperty(_useChannel, _coreEvents.STORY_RENDER_PHASE_CHANGED, function (_ref9) {
250
- var newPhase = _ref9.newPhase;
156
+ var emit = (0, _api.useChannel)((_useChannel = {}, _defineProperty(_useChannel, _instrumenter.EVENTS.CALL, setCall), _defineProperty(_useChannel, _instrumenter.EVENTS.SYNC, setLog), _defineProperty(_useChannel, _instrumenter.EVENTS.LOCK, setLock), _defineProperty(_useChannel, _coreEvents.STORY_RENDER_PHASE_CHANGED, function (_ref5) {
157
+ var newPhase = _ref5.newPhase;
251
158
  setLock(false);
252
159
  setPlaying(newPhase === 'playing');
253
160
  }), _useChannel));
@@ -318,7 +225,7 @@ var Panel = function Panel(props) {
318
225
  },
319
226
  onScrollToEnd: scrollTarget && scrollToTarget
320
227
  }), interactions.map(function (call) {
321
- return /*#__PURE__*/React.createElement(Interaction, {
228
+ return /*#__PURE__*/React.createElement(_Interaction.Interaction, {
322
229
  key: call.id,
323
230
  call: call,
324
231
  callsById: calls.current,
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ require("core-js/modules/es.symbol.js");
6
+
7
+ require("core-js/modules/es.symbol.description.js");
8
+
9
+ require("core-js/modules/es.object.to-string.js");
10
+
11
+ require("core-js/modules/es.symbol.iterator.js");
12
+
13
+ require("core-js/modules/es.string.iterator.js");
14
+
15
+ require("core-js/modules/es.array.iterator.js");
16
+
17
+ require("core-js/modules/web.dom-collections.iterator.js");
18
+
19
+ require("core-js/modules/es.array.slice.js");
20
+
21
+ require("core-js/modules/es.function.name.js");
22
+
23
+ require("core-js/modules/es.array.from.js");
24
+
25
+ require("core-js/modules/es.weak-map.js");
26
+
27
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
28
+
29
+ Object.defineProperty(exports, "__esModule", {
30
+ value: true
31
+ });
32
+ exports.Interaction = void 0;
33
+
34
+ require("core-js/modules/es.array.includes.js");
35
+
36
+ require("core-js/modules/es.object.assign.js");
37
+
38
+ require("core-js/modules/es.string.starts-with.js");
39
+
40
+ var React = _interopRequireWildcard(require("react"));
41
+
42
+ var _instrumenter = require("@storybook/instrumenter");
43
+
44
+ var _theming = require("@storybook/theming");
45
+
46
+ var _polished = require("polished");
47
+
48
+ var _MatcherResult = require("../MatcherResult");
49
+
50
+ var _MethodCall = require("../MethodCall");
51
+
52
+ var _StatusIcon = require("../StatusIcon/StatusIcon");
53
+
54
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
55
+
56
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
57
+
58
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
59
+
60
+ 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."); }
61
+
62
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
63
+
64
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
65
+
66
+ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
67
+
68
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
69
+
70
+ var MethodCallWrapper = _theming.styled.div(function () {
71
+ return {
72
+ fontFamily: _theming.typography.fonts.mono,
73
+ fontSize: _theming.typography.size.s1
74
+ };
75
+ });
76
+
77
+ var RowContainer = (0, _theming.styled)('div', {
78
+ shouldForwardProp: function shouldForwardProp(prop) {
79
+ return !['call'].includes(prop);
80
+ }
81
+ })(function (_ref) {
82
+ var theme = _ref.theme,
83
+ call = _ref.call;
84
+ return Object.assign({
85
+ display: 'flex',
86
+ flexDirection: 'column',
87
+ borderBottom: "1px solid ".concat(theme.appBorderColor),
88
+ fontFamily: _theming.typography.fonts.base,
89
+ fontSize: 13
90
+ }, call.state === _instrumenter.CallStates.ERROR && {
91
+ backgroundColor: theme.base === 'dark' ? (0, _polished.transparentize)(0.93, theme.color.negative) : theme.background.warning
92
+ });
93
+ });
94
+ var RowLabel = (0, _theming.styled)('button', {
95
+ shouldForwardProp: function shouldForwardProp(prop) {
96
+ return !['call'].includes(prop);
97
+ }
98
+ })(function (_ref2) {
99
+ var theme = _ref2.theme,
100
+ disabled = _ref2.disabled,
101
+ call = _ref2.call;
102
+ return {
103
+ display: 'grid',
104
+ background: 'none',
105
+ border: 0,
106
+ gridTemplateColumns: '15px 1fr',
107
+ alignItems: 'center',
108
+ minHeight: 40,
109
+ margin: 0,
110
+ padding: '8px 15px',
111
+ textAlign: 'start',
112
+ cursor: disabled || call.state === _instrumenter.CallStates.ERROR ? 'default' : 'pointer',
113
+ '&:hover': {
114
+ background: theme.background.hoverable
115
+ },
116
+ '&:focus-visible': {
117
+ outline: 0,
118
+ boxShadow: "inset 3px 0 0 0 ".concat(call.state === _instrumenter.CallStates.ERROR ? theme.color.warning : theme.color.secondary),
119
+ background: call.state === _instrumenter.CallStates.ERROR ? 'transparent' : theme.background.hoverable
120
+ },
121
+ '& > div': {
122
+ opacity: call.state === _instrumenter.CallStates.WAITING ? 0.5 : 1
123
+ }
124
+ };
125
+ });
126
+ var RowMessage = (0, _theming.styled)('pre')({
127
+ margin: 0,
128
+ padding: '8px 10px 8px 30px',
129
+ fontSize: _theming.typography.size.s1
130
+ });
131
+
132
+ var Interaction = function Interaction(_ref3) {
133
+ var call = _ref3.call,
134
+ callsById = _ref3.callsById,
135
+ onClick = _ref3.onClick,
136
+ isDisabled = _ref3.isDisabled;
137
+
138
+ var _React$useState = React.useState(false),
139
+ _React$useState2 = _slicedToArray(_React$useState, 2),
140
+ isHovered = _React$useState2[0],
141
+ setIsHovered = _React$useState2[1];
142
+
143
+ return /*#__PURE__*/React.createElement(RowContainer, {
144
+ call: call
145
+ }, /*#__PURE__*/React.createElement(RowLabel, {
146
+ call: call,
147
+ onClick: onClick,
148
+ onMouseEnter: function onMouseEnter() {
149
+ return setIsHovered(true);
150
+ },
151
+ onMouseLeave: function onMouseLeave() {
152
+ return setIsHovered(false);
153
+ },
154
+ disabled: isDisabled
155
+ }, /*#__PURE__*/React.createElement(_StatusIcon.StatusIcon, {
156
+ status: isHovered ? _instrumenter.CallStates.ACTIVE : call.state
157
+ }), /*#__PURE__*/React.createElement(MethodCallWrapper, {
158
+ style: {
159
+ marginLeft: 6,
160
+ marginBottom: 1
161
+ }
162
+ }, /*#__PURE__*/React.createElement(_MethodCall.MethodCall, {
163
+ call: call,
164
+ callsById: callsById
165
+ }))), call.state === _instrumenter.CallStates.ERROR && call.exception && (call.exception.message.startsWith('expect(') ? /*#__PURE__*/React.createElement(_MatcherResult.MatcherResult, call.exception) : /*#__PURE__*/React.createElement(RowMessage, null, call.exception.message)));
166
+ };
167
+
168
+ exports.Interaction = Interaction;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.promise.js");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Hovered = exports.Disabled = exports.Done = exports.Failed = exports.Waiting = exports.Active = exports.default = void 0;
9
+
10
+ require("regenerator-runtime/runtime.js");
11
+
12
+ require("core-js/modules/es.map.js");
13
+
14
+ require("core-js/modules/es.object.to-string.js");
15
+
16
+ require("core-js/modules/es.string.iterator.js");
17
+
18
+ require("core-js/modules/es.array.iterator.js");
19
+
20
+ require("core-js/modules/web.dom-collections.iterator.js");
21
+
22
+ require("core-js/modules/es.object.assign.js");
23
+
24
+ var _jest = require("@storybook/jest");
25
+
26
+ var _instrumenter = require("@storybook/instrumenter");
27
+
28
+ var _testingLibrary = require("@storybook/testing-library");
29
+
30
+ var _Interaction = require("./Interaction");
31
+
32
+ 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); } }
33
+
34
+ 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); }); }; }
35
+
36
+ var _default = {
37
+ title: 'Addons/Interactions/Interaction',
38
+ component: _Interaction.Interaction,
39
+ args: {
40
+ callsById: new Map(),
41
+ isDisabled: false
42
+ }
43
+ };
44
+ exports.default = _default;
45
+
46
+ var getCallMock = function getCallMock(state) {
47
+ var defaultData = {
48
+ id: 'addons-interactions-accountform--standard-email-filled [3] change',
49
+ path: ['fireEvent'],
50
+ method: 'change',
51
+ storyId: 'addons-interactions-accountform--standard-email-filled',
52
+ args: [{
53
+ __callId__: 'addons-interactions-accountform--standard-email-filled [2] getByTestId',
54
+ retain: false
55
+ }, {
56
+ target: {
57
+ value: 'michael@chromatic.com'
58
+ }
59
+ }],
60
+ interceptable: true,
61
+ retain: false,
62
+ state: state
63
+ };
64
+ var overrides = _instrumenter.CallStates.ERROR ? {
65
+ exception: {
66
+ callId: '',
67
+ stack: '',
68
+ message: "Things didn't work!"
69
+ }
70
+ } : {};
71
+ return Object.assign({}, defaultData, overrides);
72
+ };
73
+
74
+ var Active = {
75
+ args: {
76
+ call: getCallMock(_instrumenter.CallStates.ACTIVE)
77
+ }
78
+ };
79
+ exports.Active = Active;
80
+ var Waiting = {
81
+ args: {
82
+ call: getCallMock(_instrumenter.CallStates.WAITING)
83
+ }
84
+ };
85
+ exports.Waiting = Waiting;
86
+ var Failed = {
87
+ args: {
88
+ call: getCallMock(_instrumenter.CallStates.ERROR)
89
+ }
90
+ };
91
+ exports.Failed = Failed;
92
+ var Done = {
93
+ args: {
94
+ call: getCallMock(_instrumenter.CallStates.DONE)
95
+ }
96
+ };
97
+ exports.Done = Done;
98
+ var Disabled = {
99
+ args: Object.assign({}, Done.args, {
100
+ isDisabled: true
101
+ })
102
+ };
103
+ exports.Disabled = Disabled;
104
+ var Hovered = Object.assign({}, Done, {
105
+ parameters: {
106
+ // Set light theme to avoid stacked theme in chromatic
107
+ theme: 'light'
108
+ },
109
+ play: function () {
110
+ var _play = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
111
+ var canvasElement, canvas;
112
+ return regeneratorRuntime.wrap(function _callee$(_context) {
113
+ while (1) {
114
+ switch (_context.prev = _context.next) {
115
+ case 0:
116
+ canvasElement = _ref.canvasElement;
117
+ canvas = (0, _testingLibrary.within)(canvasElement);
118
+ _context.next = 4;
119
+ return _testingLibrary.userEvent.hover(canvas.getByRole('button'));
120
+
121
+ case 4:
122
+ _context.next = 6;
123
+ return (0, _jest.expect)(canvas.getByTestId('icon-active')).not.toBeNull();
124
+
125
+ case 6:
126
+ case "end":
127
+ return _context.stop();
128
+ }
129
+ }
130
+ }, _callee);
131
+ }));
132
+
133
+ function play(_x) {
134
+ return _play.apply(this, arguments);
135
+ }
136
+
137
+ return play;
138
+ }()
139
+ });
140
+ exports.Hovered = Hovered;
@@ -42,6 +42,7 @@ var StatusIcon = function StatusIcon(_ref2) {
42
42
  var status = _ref2.status;
43
43
  var icon = (_CallStates$DONE$Call2 = {}, _defineProperty(_CallStates$DONE$Call2, _instrumenter.CallStates.DONE, 'check'), _defineProperty(_CallStates$DONE$Call2, _instrumenter.CallStates.ERROR, 'stopalt'), _defineProperty(_CallStates$DONE$Call2, _instrumenter.CallStates.ACTIVE, 'play'), _defineProperty(_CallStates$DONE$Call2, _instrumenter.CallStates.WAITING, 'circle'), _CallStates$DONE$Call2)[status];
44
44
  return /*#__PURE__*/_react.default.createElement(StyledStatusIcon, {
45
+ "data-testid": "icon-".concat(status),
45
46
  status: status,
46
47
  icon: icon
47
48
  });
@@ -13,8 +13,6 @@ var _instrumenter = require("@storybook/instrumenter");
13
13
 
14
14
  var _theming = require("@storybook/theming");
15
15
 
16
- var _polished = require("polished");
17
-
18
16
  var _StatusBadge = require("../StatusBadge/StatusBadge");
19
17
 
20
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -61,7 +59,7 @@ var StyledIconButton = (0, _theming.styled)(StyledButton)(function (_ref4) {
61
59
  margin: '0 3px',
62
60
  '&:not(:disabled)': {
63
61
  '&:hover,&:focus-visible': {
64
- background: (0, _polished.transparentize)(0.9, theme.color.secondary)
62
+ background: theme.background.hoverable
65
63
  }
66
64
  }
67
65
  };