@popmenu/common-ui 0.26.0 → 0.28.1
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/build/components/Typography/Typography.d.ts +1 -1
- package/build/components/Typography/TypographyProps.d.ts +6 -1
- package/build/components/Typography/index.d.ts +1 -1
- package/build/components/Typography/variantMap.d.ts +3 -0
- package/build/components/index.d.ts +1 -2
- package/build/index.es.js +205 -466
- package/build/index.es.js.map +1 -1
- package/build/index.js +200 -462
- package/build/index.js.map +1 -1
- package/package.json +3 -2
- package/CHANGELOG.md +0 -415
- package/build/components/AudioPlayer/AudioPlayer.d.ts +0 -3
- package/build/components/AudioPlayer/AudioPlayerProps.d.ts +0 -10
- package/build/components/AudioPlayer/index.d.ts +0 -2
- package/build/components/AudioPlayer/util/audioPlayerReducer.d.ts +0 -11
- package/build/components/AudioPlayer/util/formatTime.d.ts +0 -1
- package/build/components/AudioPlayer/util/index.d.ts +0 -5
- package/build/components/AudioPlayer/util/setupAudioRef.d.ts +0 -8
- package/build/components/AudioPlayer/util/types.d.ts +0 -77
- package/build/components/AudioPlayer/util/useVolumeIcon.d.ts +0 -2
package/build/index.js
CHANGED
|
@@ -6,9 +6,8 @@ var Alert = require('@material-ui/lab/Alert');
|
|
|
6
6
|
var core = require('@material-ui/core');
|
|
7
7
|
var AppBar = require('@material-ui/core/AppBar');
|
|
8
8
|
var React = require('react');
|
|
9
|
-
var MuiIconButton = require('@material-ui/core/IconButton');
|
|
10
|
-
var styles = require('@material-ui/core/styles');
|
|
11
9
|
var MuiAvatar = require('@material-ui/core/Avatar');
|
|
10
|
+
var styles = require('@material-ui/core/styles');
|
|
12
11
|
var Badge = require('@material-ui/core/Badge');
|
|
13
12
|
var MuiButton = require('@material-ui/core/Button');
|
|
14
13
|
var CircularProgress = require('@material-ui/core/CircularProgress');
|
|
@@ -30,6 +29,7 @@ var DialogTitle = require('@material-ui/core/DialogTitle');
|
|
|
30
29
|
var Drawer = require('@material-ui/core/Drawer');
|
|
31
30
|
var FormControl = require('@material-ui/core/FormControl');
|
|
32
31
|
var Grid = require('@material-ui/core/Grid');
|
|
32
|
+
var MuiIconButton = require('@material-ui/core/IconButton');
|
|
33
33
|
var InputAdornment = require('@material-ui/core/InputAdornment');
|
|
34
34
|
var LinearProgress = require('@material-ui/core/LinearProgress');
|
|
35
35
|
var List = require('@material-ui/core/List');
|
|
@@ -75,7 +75,6 @@ var Alert__default = /*#__PURE__*/_interopDefaultLegacy(Alert);
|
|
|
75
75
|
var AppBar__default = /*#__PURE__*/_interopDefaultLegacy(AppBar);
|
|
76
76
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
77
77
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
78
|
-
var MuiIconButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiIconButton);
|
|
79
78
|
var MuiAvatar__default = /*#__PURE__*/_interopDefaultLegacy(MuiAvatar);
|
|
80
79
|
var Badge__default = /*#__PURE__*/_interopDefaultLegacy(Badge);
|
|
81
80
|
var MuiButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiButton);
|
|
@@ -98,6 +97,7 @@ var DialogTitle__default = /*#__PURE__*/_interopDefaultLegacy(DialogTitle);
|
|
|
98
97
|
var Drawer__default = /*#__PURE__*/_interopDefaultLegacy(Drawer);
|
|
99
98
|
var FormControl__default = /*#__PURE__*/_interopDefaultLegacy(FormControl);
|
|
100
99
|
var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
100
|
+
var MuiIconButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiIconButton);
|
|
101
101
|
var InputAdornment__default = /*#__PURE__*/_interopDefaultLegacy(InputAdornment);
|
|
102
102
|
var LinearProgress__default = /*#__PURE__*/_interopDefaultLegacy(LinearProgress);
|
|
103
103
|
var List__default = /*#__PURE__*/_interopDefaultLegacy(List);
|
|
@@ -155,167 +155,95 @@ function __rest(s, e) {
|
|
|
155
155
|
return t;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
var _path$
|
|
158
|
+
var _path$2g;
|
|
159
159
|
|
|
160
|
-
function _extends$
|
|
160
|
+
function _extends$3t() { _extends$3t = 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$3t.apply(this, arguments); }
|
|
161
161
|
|
|
162
162
|
function SvgMinusCircle(props) {
|
|
163
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
163
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3t({
|
|
164
164
|
viewBox: "0 0 16 16",
|
|
165
|
+
fill: "none",
|
|
165
166
|
strokeLinecap: "round",
|
|
166
167
|
strokeLinejoin: "round",
|
|
167
|
-
stroke: "currentColor",
|
|
168
168
|
width: "1em",
|
|
169
|
-
height: "1em"
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
height: "1em"
|
|
170
|
+
}, props), _path$2g || (_path$2g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
171
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM5.333 8h5.334",
|
|
172
|
+
stroke: "currentColor"
|
|
173
173
|
})));
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
var _path$
|
|
176
|
+
var _path$28;
|
|
177
177
|
|
|
178
|
-
function _extends$
|
|
178
|
+
function _extends$3l() { _extends$3l = 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$3l.apply(this, arguments); }
|
|
179
179
|
|
|
180
180
|
function SvgPlusCircle(props) {
|
|
181
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
181
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3l({
|
|
182
182
|
viewBox: "0 0 16 16",
|
|
183
|
+
fill: "none",
|
|
183
184
|
strokeLinecap: "round",
|
|
184
185
|
strokeLinejoin: "round",
|
|
185
|
-
stroke: "currentColor",
|
|
186
186
|
width: "1em",
|
|
187
|
-
height: "1em"
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
height: "1em"
|
|
188
|
+
}, props), _path$28 || (_path$28 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
189
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-9.334v5.334M5.333 8h5.334",
|
|
190
|
+
stroke: "currentColor"
|
|
191
191
|
})));
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
var _path$
|
|
194
|
+
var _path$1W;
|
|
195
195
|
|
|
196
|
-
function _extends$
|
|
196
|
+
function _extends$31() { _extends$31 = 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$31.apply(this, arguments); }
|
|
197
197
|
|
|
198
198
|
function SvgUser(props) {
|
|
199
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
200
|
-
viewBox: "0 0 16 16",
|
|
201
|
-
strokeLinecap: "round",
|
|
202
|
-
strokeLinejoin: "round",
|
|
203
|
-
stroke: "currentColor",
|
|
204
|
-
width: "1em",
|
|
205
|
-
height: "1em",
|
|
206
|
-
fill: "none"
|
|
207
|
-
}, props), _path$2P || (_path$2P = /*#__PURE__*/React__namespace.createElement("path", {
|
|
208
|
-
d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z"
|
|
209
|
-
})));
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
var _path$1l;
|
|
213
|
-
|
|
214
|
-
function _extends$1p() { _extends$1p = 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$1p.apply(this, arguments); }
|
|
215
|
-
|
|
216
|
-
function SvgPause(props) {
|
|
217
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1p({
|
|
218
|
-
viewBox: "0 0 16 16",
|
|
219
|
-
strokeLinecap: "round",
|
|
220
|
-
strokeLinejoin: "round",
|
|
221
|
-
stroke: "currentColor",
|
|
222
|
-
width: "1em",
|
|
223
|
-
height: "1em",
|
|
224
|
-
fill: "none"
|
|
225
|
-
}, props), _path$1l || (_path$1l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
226
|
-
d: "M6.667 2.667H4v10.666h2.667V2.666zm5.333 0H9.333v10.666H12V2.666z"
|
|
227
|
-
})));
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
var _path$1j;
|
|
231
|
-
|
|
232
|
-
function _extends$1n() { _extends$1n = 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$1n.apply(this, arguments); }
|
|
233
|
-
|
|
234
|
-
function SvgPlay(props) {
|
|
235
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1n({
|
|
236
|
-
viewBox: "0 0 16 16",
|
|
237
|
-
strokeLinecap: "round",
|
|
238
|
-
strokeLinejoin: "round",
|
|
239
|
-
stroke: "currentColor",
|
|
240
|
-
width: "1em",
|
|
241
|
-
height: "1em",
|
|
242
|
-
fill: "none"
|
|
243
|
-
}, props), _path$1j || (_path$1j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
244
|
-
d: "M3.333 2l9.334 6-9.334 6V2z"
|
|
245
|
-
})));
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
var _path$16;
|
|
249
|
-
|
|
250
|
-
function _extends$1a() { _extends$1a = 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$1a.apply(this, arguments); }
|
|
251
|
-
|
|
252
|
-
function SvgVolumeDown(props) {
|
|
253
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1a({
|
|
199
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$31({
|
|
254
200
|
viewBox: "0 0 16 16",
|
|
201
|
+
fill: "none",
|
|
255
202
|
strokeLinecap: "round",
|
|
256
203
|
strokeLinejoin: "round",
|
|
257
|
-
stroke: "currentColor",
|
|
258
204
|
width: "1em",
|
|
259
|
-
height: "1em"
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
205
|
+
height: "1em"
|
|
206
|
+
}, props), _path$1W || (_path$1W = /*#__PURE__*/React__namespace.createElement("path", {
|
|
207
|
+
d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z",
|
|
208
|
+
stroke: "currentColor"
|
|
263
209
|
})));
|
|
264
210
|
}
|
|
265
211
|
|
|
266
|
-
var
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
var
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
var _path$13;
|
|
303
|
-
|
|
304
|
-
function _extends$17() { _extends$17 = 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$17.apply(this, arguments); }
|
|
305
|
-
|
|
306
|
-
function SvgVolumeUp(props) {
|
|
307
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$17({
|
|
308
|
-
viewBox: "0 0 16 16",
|
|
309
|
-
strokeLinecap: "round",
|
|
310
|
-
strokeLinejoin: "round",
|
|
311
|
-
stroke: "currentColor",
|
|
312
|
-
width: "1em",
|
|
313
|
-
height: "1em",
|
|
314
|
-
fill: "none"
|
|
315
|
-
}, props), _path$13 || (_path$13 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
316
|
-
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm5.38-.046a6.667 6.667 0 010 9.426M10.36 5.64a3.333 3.333 0 010 4.713"
|
|
317
|
-
})));
|
|
318
|
-
}
|
|
212
|
+
var useIconStyles = core.makeStyles(function (_a) {
|
|
213
|
+
var spacing = _a.spacing, palette = _a.palette;
|
|
214
|
+
var getFontSize = function (_a) {
|
|
215
|
+
var size = _a.size;
|
|
216
|
+
var sizes = {
|
|
217
|
+
inherit: 'inherit',
|
|
218
|
+
small: spacing(1.5),
|
|
219
|
+
medium: spacing(2),
|
|
220
|
+
large: spacing(2.5),
|
|
221
|
+
'extra-large': spacing(3),
|
|
222
|
+
};
|
|
223
|
+
return size ? sizes[size] : 'inherit';
|
|
224
|
+
};
|
|
225
|
+
var getColor = function (props) {
|
|
226
|
+
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
227
|
+
var value = 'inherit';
|
|
228
|
+
if (props.color) {
|
|
229
|
+
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
230
|
+
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
231
|
+
value = palette[color][variant];
|
|
232
|
+
}
|
|
233
|
+
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
234
|
+
value = props.color;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return value;
|
|
238
|
+
};
|
|
239
|
+
return {
|
|
240
|
+
root: {
|
|
241
|
+
color: getColor,
|
|
242
|
+
fontSize: getFontSize,
|
|
243
|
+
strokeWidth: '1.3px',
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
});
|
|
319
247
|
|
|
320
248
|
var classnames = {exports: {}};
|
|
321
249
|
|
|
@@ -377,42 +305,6 @@ var classnames = {exports: {}};
|
|
|
377
305
|
|
|
378
306
|
var classNames = classnames.exports;
|
|
379
307
|
|
|
380
|
-
var useIconStyles = core.makeStyles(function (_a) {
|
|
381
|
-
var spacing = _a.spacing, palette = _a.palette;
|
|
382
|
-
var getFontSize = function (_a) {
|
|
383
|
-
var size = _a.size;
|
|
384
|
-
var sizes = {
|
|
385
|
-
inherit: 'inherit',
|
|
386
|
-
small: spacing(1.5),
|
|
387
|
-
medium: spacing(2),
|
|
388
|
-
large: spacing(2.5),
|
|
389
|
-
'extra-large': spacing(3),
|
|
390
|
-
};
|
|
391
|
-
return size ? sizes[size] : 'inherit';
|
|
392
|
-
};
|
|
393
|
-
var getColor = function (props) {
|
|
394
|
-
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
395
|
-
var value = 'inherit';
|
|
396
|
-
if (props.color) {
|
|
397
|
-
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
398
|
-
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
399
|
-
value = palette[color][variant];
|
|
400
|
-
}
|
|
401
|
-
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
402
|
-
value = props.color;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
return value;
|
|
406
|
-
};
|
|
407
|
-
return {
|
|
408
|
-
root: {
|
|
409
|
-
color: getColor,
|
|
410
|
-
fontSize: getFontSize,
|
|
411
|
-
strokeWidth: '1.3px',
|
|
412
|
-
},
|
|
413
|
-
};
|
|
414
|
-
});
|
|
415
|
-
|
|
416
308
|
var iconStaticClassName = 'pop-icon';
|
|
417
309
|
var Icon = function (props) {
|
|
418
310
|
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
@@ -431,295 +323,6 @@ Icon.defaultProps = {
|
|
|
431
323
|
};
|
|
432
324
|
Icon.displayName = 'Icon';
|
|
433
325
|
|
|
434
|
-
var IconButton = React.forwardRef(function (props, ref) {
|
|
435
|
-
return React__default['default'].createElement(MuiIconButton__default['default'], __assign({ ref: ref }, props));
|
|
436
|
-
});
|
|
437
|
-
IconButton.displayName = 'IconButton';
|
|
438
|
-
IconButton.defaultProps = {
|
|
439
|
-
color: 'secondary',
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
var useTypographyStyles = styles.makeStyles(function () { return ({
|
|
443
|
-
root: function (_a) {
|
|
444
|
-
var _b;
|
|
445
|
-
var weight = _a.weight;
|
|
446
|
-
return (__assign((_b = {}, _b["& ." + iconStaticClassName] = {
|
|
447
|
-
position: 'relative',
|
|
448
|
-
top: '0.125em',
|
|
449
|
-
padding: '0 0.125em',
|
|
450
|
-
boxSizing: 'content-box',
|
|
451
|
-
}, _b), (weight && { fontWeight: (weight === 'semi-bold' && 600) || (weight === 'bold' && 700) || 400 })));
|
|
452
|
-
},
|
|
453
|
-
caption: {
|
|
454
|
-
display: 'inline',
|
|
455
|
-
},
|
|
456
|
-
overline: {
|
|
457
|
-
display: 'inline',
|
|
458
|
-
},
|
|
459
|
-
}); });
|
|
460
|
-
|
|
461
|
-
var Typography = React.forwardRef(function (props, ref) {
|
|
462
|
-
props.weight; var restProps = __rest(props, ["weight"]);
|
|
463
|
-
var classes = useTypographyStyles(props);
|
|
464
|
-
return React__default['default'].createElement(core.Typography, __assign({ ref: ref, classes: classes }, restProps));
|
|
465
|
-
});
|
|
466
|
-
Typography.displayName = 'Typography';
|
|
467
|
-
|
|
468
|
-
var useStyles$1 = core.makeStyles(function (_a) {
|
|
469
|
-
var spacing = _a.spacing;
|
|
470
|
-
return ({
|
|
471
|
-
root: {
|
|
472
|
-
'&:last-child': {
|
|
473
|
-
marginBottom: 0,
|
|
474
|
-
},
|
|
475
|
-
marginBottom: spacing(4),
|
|
476
|
-
padding: spacing(4),
|
|
477
|
-
},
|
|
478
|
-
});
|
|
479
|
-
});
|
|
480
|
-
var Paper = React.forwardRef(function (props, ref) {
|
|
481
|
-
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
482
|
-
var classes = useStyles$1(props);
|
|
483
|
-
return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
484
|
-
});
|
|
485
|
-
Paper.displayName = 'Paper';
|
|
486
|
-
Paper.defaultProps = {
|
|
487
|
-
legacyStyles: false,
|
|
488
|
-
};
|
|
489
|
-
|
|
490
|
-
var AUDIO_PLAYER_EVENT_TYPES;
|
|
491
|
-
(function (AUDIO_PLAYER_EVENT_TYPES) {
|
|
492
|
-
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_PLAYBACK"] = "TOGGLE_PLAYBACK";
|
|
493
|
-
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_VOLUME_CONTROL"] = "TOGGLE_VOLUME_CONTROL";
|
|
494
|
-
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_MUTE"] = "TOGGLE_MUTE";
|
|
495
|
-
AUDIO_PLAYER_EVENT_TYPES["VOLUME_CHANGE"] = "VOLUME_CHANGE";
|
|
496
|
-
AUDIO_PLAYER_EVENT_TYPES["TIME_CHANGE"] = "TIME_CHANGE";
|
|
497
|
-
AUDIO_PLAYER_EVENT_TYPES["DURATION_CHANGE"] = "DURATION_CHANGE";
|
|
498
|
-
AUDIO_PLAYER_EVENT_TYPES["SET_TIME"] = "SET_TIME";
|
|
499
|
-
AUDIO_PLAYER_EVENT_TYPES["CAN_PLAY"] = "CAN_PLAY";
|
|
500
|
-
AUDIO_PLAYER_EVENT_TYPES["RESET"] = "RESET";
|
|
501
|
-
})(AUDIO_PLAYER_EVENT_TYPES || (AUDIO_PLAYER_EVENT_TYPES = {}));
|
|
502
|
-
var PLAYBACK_STATES;
|
|
503
|
-
(function (PLAYBACK_STATES) {
|
|
504
|
-
PLAYBACK_STATES["NONE"] = "NONE";
|
|
505
|
-
PLAYBACK_STATES["PAUSED"] = "PAUSED";
|
|
506
|
-
PLAYBACK_STATES["PLAYING"] = "PLAYING";
|
|
507
|
-
})(PLAYBACK_STATES || (PLAYBACK_STATES = {}));
|
|
508
|
-
var CONTROL_LABELS;
|
|
509
|
-
(function (CONTROL_LABELS) {
|
|
510
|
-
CONTROL_LABELS["PAUSE"] = "PAUSE";
|
|
511
|
-
CONTROL_LABELS["PLAY"] = "PLAY";
|
|
512
|
-
CONTROL_LABELS["MUTE"] = "MUTE";
|
|
513
|
-
CONTROL_LABELS["UNMUTE"] = "UNMUTE";
|
|
514
|
-
})(CONTROL_LABELS || (CONTROL_LABELS = {}));
|
|
515
|
-
var VOLUME_CONTROL_STATES;
|
|
516
|
-
(function (VOLUME_CONTROL_STATES) {
|
|
517
|
-
VOLUME_CONTROL_STATES["SHOW"] = "SHOW";
|
|
518
|
-
VOLUME_CONTROL_STATES["HIDE"] = "HIDE";
|
|
519
|
-
})(VOLUME_CONTROL_STATES || (VOLUME_CONTROL_STATES = {}));
|
|
520
|
-
|
|
521
|
-
var initialAudioPlayerState = {
|
|
522
|
-
playback: PLAYBACK_STATES.NONE,
|
|
523
|
-
volumeControls: VOLUME_CONTROL_STATES.HIDE,
|
|
524
|
-
context: {
|
|
525
|
-
volume: 100,
|
|
526
|
-
playbackButtonLabel: CONTROL_LABELS.PLAY,
|
|
527
|
-
volumeButtonLabel: CONTROL_LABELS.MUTE,
|
|
528
|
-
},
|
|
529
|
-
};
|
|
530
|
-
var getPlayback = function (_a) {
|
|
531
|
-
var audio = _a.current;
|
|
532
|
-
var playback = PLAYBACK_STATES.NONE;
|
|
533
|
-
if (audio) {
|
|
534
|
-
var paused = audio.paused, readyState = audio.readyState;
|
|
535
|
-
if (readyState === 0) {
|
|
536
|
-
playback = PLAYBACK_STATES.NONE;
|
|
537
|
-
}
|
|
538
|
-
else if (paused) {
|
|
539
|
-
playback = PLAYBACK_STATES.PAUSED;
|
|
540
|
-
}
|
|
541
|
-
else {
|
|
542
|
-
playback = PLAYBACK_STATES.PLAYING;
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
return playback;
|
|
546
|
-
};
|
|
547
|
-
var audioPlayerReducer = function (state, event) {
|
|
548
|
-
var _a, _b;
|
|
549
|
-
var audioRef = state.context.audioRef;
|
|
550
|
-
var nextState = __assign({}, state);
|
|
551
|
-
switch (state.playback) {
|
|
552
|
-
case PLAYBACK_STATES.NONE:
|
|
553
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.CAN_PLAY) {
|
|
554
|
-
nextState.playback = getPlayback(audioRef);
|
|
555
|
-
return nextState;
|
|
556
|
-
}
|
|
557
|
-
break;
|
|
558
|
-
case PLAYBACK_STATES.PAUSED:
|
|
559
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK) {
|
|
560
|
-
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
|
561
|
-
nextState.playback = getPlayback(audioRef);
|
|
562
|
-
nextState.context.playbackButtonLabel = CONTROL_LABELS.PAUSE;
|
|
563
|
-
return nextState;
|
|
564
|
-
}
|
|
565
|
-
break;
|
|
566
|
-
case PLAYBACK_STATES.PLAYING:
|
|
567
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK) {
|
|
568
|
-
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.pause();
|
|
569
|
-
nextState.playback = getPlayback(audioRef);
|
|
570
|
-
nextState.context.playbackButtonLabel = CONTROL_LABELS.PLAY;
|
|
571
|
-
return nextState;
|
|
572
|
-
}
|
|
573
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TIME_CHANGE) {
|
|
574
|
-
return nextState;
|
|
575
|
-
}
|
|
576
|
-
break;
|
|
577
|
-
}
|
|
578
|
-
switch (state.volumeControls) {
|
|
579
|
-
case VOLUME_CONTROL_STATES.SHOW:
|
|
580
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL) {
|
|
581
|
-
nextState.volumeControls = VOLUME_CONTROL_STATES.HIDE;
|
|
582
|
-
return nextState;
|
|
583
|
-
}
|
|
584
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.VOLUME_CHANGE) {
|
|
585
|
-
if (nextState.context.volume !== event.context.volume) {
|
|
586
|
-
nextState.context.volume = event.context.volume;
|
|
587
|
-
if (audioRef.current) {
|
|
588
|
-
audioRef.current.volume = event.context.volume;
|
|
589
|
-
}
|
|
590
|
-
return nextState;
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
break;
|
|
594
|
-
case VOLUME_CONTROL_STATES.HIDE:
|
|
595
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL) {
|
|
596
|
-
nextState.volumeControls = VOLUME_CONTROL_STATES.SHOW;
|
|
597
|
-
return nextState;
|
|
598
|
-
}
|
|
599
|
-
break;
|
|
600
|
-
}
|
|
601
|
-
switch (event.type) {
|
|
602
|
-
case AUDIO_PLAYER_EVENT_TYPES.TOGGLE_MUTE:
|
|
603
|
-
if (audioRef.current) {
|
|
604
|
-
audioRef.current.muted = !audioRef.current.muted;
|
|
605
|
-
return nextState;
|
|
606
|
-
}
|
|
607
|
-
break;
|
|
608
|
-
case AUDIO_PLAYER_EVENT_TYPES.SET_TIME:
|
|
609
|
-
if (audioRef.current) {
|
|
610
|
-
audioRef.current.currentTime = event.context.time;
|
|
611
|
-
return nextState;
|
|
612
|
-
}
|
|
613
|
-
break;
|
|
614
|
-
case AUDIO_PLAYER_EVENT_TYPES.RESET:
|
|
615
|
-
if (audioRef.current) {
|
|
616
|
-
audioRef.current.currentTime = 0;
|
|
617
|
-
nextState.playback = getPlayback(audioRef);
|
|
618
|
-
return nextState;
|
|
619
|
-
}
|
|
620
|
-
break;
|
|
621
|
-
}
|
|
622
|
-
return state;
|
|
623
|
-
};
|
|
624
|
-
|
|
625
|
-
var useVolumeIcon = function (state) {
|
|
626
|
-
var volumeIcon = SvgVolumeUp;
|
|
627
|
-
if (state.context.volume >= 0.5) {
|
|
628
|
-
volumeIcon = SvgVolumeUp;
|
|
629
|
-
}
|
|
630
|
-
else if (state.context.volume < 0.5 && state.context.volume > 0) {
|
|
631
|
-
volumeIcon = SvgVolumeDown;
|
|
632
|
-
}
|
|
633
|
-
else if (state.context.volume === 0) {
|
|
634
|
-
volumeIcon = SvgVolumeMute;
|
|
635
|
-
}
|
|
636
|
-
if (state.context.audioRef.current) {
|
|
637
|
-
if (state.context.audioRef.current.muted) {
|
|
638
|
-
volumeIcon = SvgVolumeOff;
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
return volumeIcon;
|
|
642
|
-
};
|
|
643
|
-
|
|
644
|
-
var appendZero = function (num) { return (num < 10 ? "0" + num : num); };
|
|
645
|
-
var formatTime = function (time, remaning) {
|
|
646
|
-
if (remaning === void 0) { remaning = false; }
|
|
647
|
-
var dateTime = new Date(0, 0, 0, 0, 0, time, 0);
|
|
648
|
-
var dateTimeH = appendZero(dateTime.getHours());
|
|
649
|
-
var dateTimeM = appendZero(dateTime.getMinutes());
|
|
650
|
-
var dateTimeS = appendZero(dateTime.getSeconds());
|
|
651
|
-
var minus = remaning ? '-' : '';
|
|
652
|
-
return dateTimeH > 0 ? "" + minus + dateTimeH + ":" + dateTimeM + ":" + dateTimeS : "" + minus + dateTimeM + ":" + dateTimeS;
|
|
653
|
-
};
|
|
654
|
-
|
|
655
|
-
var setupAudioRef = function (config) { return function () {
|
|
656
|
-
var _a, _b, _c, _d;
|
|
657
|
-
var audioRef = config.audioRef, send = config.send;
|
|
658
|
-
var handleDurationChange = function (event) {
|
|
659
|
-
var duration = event.target.duration;
|
|
660
|
-
send({ type: AUDIO_PLAYER_EVENT_TYPES.DURATION_CHANGE, context: { duration: duration } });
|
|
661
|
-
};
|
|
662
|
-
var handleTimeUpdate = function (event) {
|
|
663
|
-
var currentTime = event.target.currentTime;
|
|
664
|
-
send({ type: AUDIO_PLAYER_EVENT_TYPES.TIME_CHANGE, context: { currentTime: currentTime } });
|
|
665
|
-
};
|
|
666
|
-
var handleCanPlay = function () {
|
|
667
|
-
send({ type: AUDIO_PLAYER_EVENT_TYPES.CAN_PLAY });
|
|
668
|
-
};
|
|
669
|
-
var handleEnded = function () {
|
|
670
|
-
send({ type: AUDIO_PLAYER_EVENT_TYPES.RESET });
|
|
671
|
-
};
|
|
672
|
-
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('durationchange', handleDurationChange);
|
|
673
|
-
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('timeupdate', handleTimeUpdate);
|
|
674
|
-
(_c = audioRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('canplay', handleCanPlay);
|
|
675
|
-
(_d = audioRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('ended', handleEnded);
|
|
676
|
-
return function () {
|
|
677
|
-
var _a, _b, _c, _d;
|
|
678
|
-
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('durationchange', handleDurationChange);
|
|
679
|
-
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('timeupdate', handleTimeUpdate);
|
|
680
|
-
(_c = audioRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('canplay', handleCanPlay);
|
|
681
|
-
(_d = audioRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('ended', handleEnded);
|
|
682
|
-
};
|
|
683
|
-
}; };
|
|
684
|
-
|
|
685
|
-
var AudioPlayer = function (props) {
|
|
686
|
-
var _a, _b, _c, _d, _f;
|
|
687
|
-
var src = props.src, _g = props.classes, classes = _g === void 0 ? {} : _g;
|
|
688
|
-
var volumeRef = React.useRef(null);
|
|
689
|
-
var audioRef = React.useRef(null);
|
|
690
|
-
var spacing = core.useTheme().spacing;
|
|
691
|
-
var _h = React.useState(false), disableRipple = _h[0], setDisableRipple = _h[1];
|
|
692
|
-
var _j = React.useReducer(audioPlayerReducer, __assign(__assign({}, initialAudioPlayerState), { context: __assign(__assign({}, initialAudioPlayerState.context), { audioRef: audioRef }) })), state = _j[0], send = _j[1];
|
|
693
|
-
React.useEffect(setupAudioRef({ audioRef: audioRef, send: send }), [audioRef]);
|
|
694
|
-
var PlaybackIcon = state.playback !== PLAYBACK_STATES.PAUSED ? SvgPause : SvgPlay;
|
|
695
|
-
var VolumeIcon = React.useMemo(function () { return useVolumeIcon(state); }, [state.context.volume, (_a = state.context.audioRef.current) === null || _a === void 0 ? void 0 : _a.muted]);
|
|
696
|
-
var togglePlayback = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK }); };
|
|
697
|
-
var toggleVolumeControl = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL }); };
|
|
698
|
-
var toggleMute = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_MUTE }); };
|
|
699
|
-
var setTime = function (_e, time) { return send({ type: AUDIO_PLAYER_EVENT_TYPES.SET_TIME, context: { time: time } }); };
|
|
700
|
-
var setVolume = function (_e, volume) { return send({ type: AUDIO_PLAYER_EVENT_TYPES.VOLUME_CHANGE, context: { volume: volume } }); };
|
|
701
|
-
return (React__default['default'].createElement(core.Box, { display: "flex", alignItems: "center", gridGap: spacing(1), className: classNames([classes.root]) },
|
|
702
|
-
React__default['default'].createElement("audio", { ref: audioRef, src: src }),
|
|
703
|
-
React__default['default'].createElement(core.Box, null,
|
|
704
|
-
React__default['default'].createElement(IconButton, { classes: { root: classes.playbackToggle }, "aria-label": state.context.playbackButtonLabel, disabled: state.playback === PLAYBACK_STATES.NONE, onClick: togglePlayback },
|
|
705
|
-
React__default['default'].createElement(Icon, { icon: PlaybackIcon })),
|
|
706
|
-
React__default['default'].createElement(IconButton, { classes: { root: classes.volumeToggle }, "aria-label": state.context.volumeButtonLabel, ref: volumeRef, onClick: toggleMute, onMouseEnter: toggleVolumeControl, onMouseLeave: toggleVolumeControl, disableRipple: disableRipple },
|
|
707
|
-
React__default['default'].createElement(Icon, { icon: VolumeIcon }),
|
|
708
|
-
React__default['default'].createElement(core.Popper, { onClick: function (e) { return e.stopPropagation(); }, onMouseEnter: function () { return setDisableRipple(true); }, onMouseLeave: function () { return setDisableRipple(false); }, open: state.volumeControls === VOLUME_CONTROL_STATES.SHOW, anchorEl: function () { return volumeRef.current; }, transition: true, placement: "top", className: classNames([classes.volumeSlider]) }, function (_a) {
|
|
709
|
-
var TransitionProps = _a.TransitionProps;
|
|
710
|
-
return (React__default['default'].createElement(core.Grow, __assign({}, TransitionProps),
|
|
711
|
-
React__default['default'].createElement(Paper, { elevation: 1 },
|
|
712
|
-
React__default['default'].createElement(core.Box, { py: 1, height: 80 },
|
|
713
|
-
React__default['default'].createElement(core.Slider, { color: "secondary", orientation: "vertical", value: state.context.volume, onChange: setVolume, max: 1, step: 0.01 })))));
|
|
714
|
-
}))),
|
|
715
|
-
React__default['default'].createElement(core.Box, { display: "flex", flexGrow: 1, alignItems: "center", gridGap: spacing(1) },
|
|
716
|
-
React__default['default'].createElement(core.Box, { flexBasis: 60, flexShrink: 0 },
|
|
717
|
-
React__default['default'].createElement(Typography, { classes: { root: classes.playbackText } }, formatTime(((_b = state.context.audioRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0))),
|
|
718
|
-
React__default['default'].createElement(core.Slider, { classes: { root: classes.playbackSlider }, color: "secondary", value: ((_c = state.context.audioRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) || 0, max: ((_d = state.context.audioRef.current) === null || _d === void 0 ? void 0 : _d.duration) || 1, onChange: setTime, disabled: state.playback === PLAYBACK_STATES.NONE }),
|
|
719
|
-
React__default['default'].createElement(core.Box, { flexBasis: 60, flexShrink: 0, textAlign: "end" },
|
|
720
|
-
React__default['default'].createElement(Typography, { classes: { root: classes.lengthText } }, formatTime(((_f = state.context.audioRef.current) === null || _f === void 0 ? void 0 : _f.duration) || 0))))));
|
|
721
|
-
};
|
|
722
|
-
|
|
723
326
|
var LoadingStatus;
|
|
724
327
|
(function (LoadingStatus) {
|
|
725
328
|
LoadingStatus["ERROR"] = "ERROR";
|
|
@@ -833,6 +436,112 @@ var Checkbox = React.forwardRef(function (props, ref) {
|
|
|
833
436
|
});
|
|
834
437
|
Checkbox.displayName = 'Checkbox';
|
|
835
438
|
|
|
439
|
+
var weights = {
|
|
440
|
+
regular: 400,
|
|
441
|
+
'semi-bold': 600,
|
|
442
|
+
bold: 700,
|
|
443
|
+
};
|
|
444
|
+
var getColor = function (theme, props) {
|
|
445
|
+
var color = props.color;
|
|
446
|
+
if (color === undefined) {
|
|
447
|
+
return undefined;
|
|
448
|
+
}
|
|
449
|
+
if (['white', 'black'].includes(color)) {
|
|
450
|
+
return theme.palette.common[color];
|
|
451
|
+
}
|
|
452
|
+
if (color.match(/^grey\.\d{3}/)) {
|
|
453
|
+
var scale = color.split('.')[1];
|
|
454
|
+
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
455
|
+
}
|
|
456
|
+
if ([
|
|
457
|
+
'primary.light',
|
|
458
|
+
'primary.dark',
|
|
459
|
+
'secondary.light',
|
|
460
|
+
'secondary',
|
|
461
|
+
'secondary.dark',
|
|
462
|
+
'info.light',
|
|
463
|
+
'info.dark',
|
|
464
|
+
'success.light',
|
|
465
|
+
'success.dark',
|
|
466
|
+
'error.light',
|
|
467
|
+
'error.dark',
|
|
468
|
+
'warning.light',
|
|
469
|
+
'warning.dark',
|
|
470
|
+
].includes(color)) {
|
|
471
|
+
var _a = color.split('.'), paletteKey = _a[0], variant = _a[1];
|
|
472
|
+
return theme.palette[paletteKey][variant];
|
|
473
|
+
}
|
|
474
|
+
if (['success', 'info', 'error', 'warning', 'primary', 'secondary'].includes(color)) {
|
|
475
|
+
return theme.palette[color].main;
|
|
476
|
+
}
|
|
477
|
+
if (['textPrimary', 'textSecondary'].includes(color)) {
|
|
478
|
+
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
479
|
+
}
|
|
480
|
+
return undefined;
|
|
481
|
+
};
|
|
482
|
+
var useTypographyStyles = styles.makeStyles(function (theme) {
|
|
483
|
+
var _a;
|
|
484
|
+
return ({
|
|
485
|
+
root: (_a = {},
|
|
486
|
+
_a["& ." + iconStaticClassName] = {
|
|
487
|
+
position: 'relative',
|
|
488
|
+
top: '0.125em',
|
|
489
|
+
padding: '0 0.125em',
|
|
490
|
+
boxSizing: 'content-box',
|
|
491
|
+
},
|
|
492
|
+
_a.fontFamily = theme.typography.fontFamily,
|
|
493
|
+
_a.fontWeight = function (_a) {
|
|
494
|
+
var variant = _a.variant, weight = _a.weight;
|
|
495
|
+
return (weight ? weights[weight] : theme.typography[variant || 'body1'].fontWeight);
|
|
496
|
+
},
|
|
497
|
+
_a.fontSize = function (_a) {
|
|
498
|
+
var variant = _a.variant;
|
|
499
|
+
return theme.typography[variant || 'body1'].fontSize;
|
|
500
|
+
},
|
|
501
|
+
_a.lineHeight = function (_a) {
|
|
502
|
+
var variant = _a.variant;
|
|
503
|
+
return theme.typography[variant || 'body1'].lineHeight;
|
|
504
|
+
},
|
|
505
|
+
_a.textTransform = function (_a) {
|
|
506
|
+
var variant = _a.variant;
|
|
507
|
+
return theme.typography[variant || 'body1'].textTransform;
|
|
508
|
+
},
|
|
509
|
+
_a.color = function (props) { return getColor(theme, props); },
|
|
510
|
+
_a),
|
|
511
|
+
caption: {
|
|
512
|
+
display: 'inline',
|
|
513
|
+
},
|
|
514
|
+
overline: {
|
|
515
|
+
display: 'inline',
|
|
516
|
+
},
|
|
517
|
+
});
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
var variantMap = {
|
|
521
|
+
h1: 'h1',
|
|
522
|
+
h2: 'h2',
|
|
523
|
+
h3: 'h3',
|
|
524
|
+
h4: 'h4',
|
|
525
|
+
h5: 'h5',
|
|
526
|
+
h6: 'h6',
|
|
527
|
+
h7: 'h6',
|
|
528
|
+
body1: 'p',
|
|
529
|
+
body2: 'p',
|
|
530
|
+
subtitle1: 'h6',
|
|
531
|
+
subtitle2: 'h6',
|
|
532
|
+
caption: 'span',
|
|
533
|
+
overline: 'span',
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
var Typography = React.forwardRef(function (props, ref) {
|
|
537
|
+
props.weight; var _a = props.variant, variant = _a === void 0 ? 'body1' : _a; props.color; var restProps = __rest(props, ["weight", "variant", "color"]);
|
|
538
|
+
var validatedVariant = Object.keys(variantMap).includes(variant) ? variant : 'body1';
|
|
539
|
+
var classes = useTypographyStyles(__assign(__assign({}, props), { variant: validatedVariant }));
|
|
540
|
+
var component = variantMap[validatedVariant];
|
|
541
|
+
return React__default['default'].createElement(core.Typography, __assign({ component: component, ref: ref, classes: classes }, restProps, { variant: "inherit" }));
|
|
542
|
+
});
|
|
543
|
+
Typography.displayName = 'Typography';
|
|
544
|
+
|
|
836
545
|
var getFadeStop = function (_a, typographyVariant) {
|
|
837
546
|
var typography = _a.typography;
|
|
838
547
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
@@ -891,7 +600,7 @@ var SemanticColors;
|
|
|
891
600
|
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
892
601
|
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
893
602
|
})(SemanticColors || (SemanticColors = {}));
|
|
894
|
-
var useStyles = core.makeStyles(function (theme) { return ({
|
|
603
|
+
var useStyles$1 = core.makeStyles(function (theme) { return ({
|
|
895
604
|
dividerRoot: {
|
|
896
605
|
gap: theme.spacing(2),
|
|
897
606
|
},
|
|
@@ -929,7 +638,7 @@ var useStyles = core.makeStyles(function (theme) { return ({
|
|
|
929
638
|
}); });
|
|
930
639
|
var Divider = function (props) {
|
|
931
640
|
var className = props.className, text = props.text, textTransform = props.textTransform, TypographyProps = props.TypographyProps;
|
|
932
|
-
var classes = useStyles(props);
|
|
641
|
+
var classes = useStyles$1(props);
|
|
933
642
|
var casingOffset = textTransform === 'lowercase' ? '.25rem' : 'unset';
|
|
934
643
|
return (React__default['default'].createElement(core.Box, { className: classNames([classes.dividerRoot, className]), display: "flex", alignItems: "center" },
|
|
935
644
|
React__default['default'].createElement(core.Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset }),
|
|
@@ -942,6 +651,14 @@ Divider.defaultProps = {
|
|
|
942
651
|
textTransform: 'lowercase',
|
|
943
652
|
};
|
|
944
653
|
|
|
654
|
+
var IconButton = React.forwardRef(function (props, ref) {
|
|
655
|
+
return React__default['default'].createElement(MuiIconButton__default['default'], __assign({ ref: ref }, props));
|
|
656
|
+
});
|
|
657
|
+
IconButton.displayName = 'IconButton';
|
|
658
|
+
IconButton.defaultProps = {
|
|
659
|
+
color: 'secondary',
|
|
660
|
+
};
|
|
661
|
+
|
|
945
662
|
var useLinkStyles = styles.makeStyles(function (theme) { return ({
|
|
946
663
|
root: function (props) {
|
|
947
664
|
var _a;
|
|
@@ -961,6 +678,28 @@ Link.defaultProps = {
|
|
|
961
678
|
};
|
|
962
679
|
Link.displayName = 'Link';
|
|
963
680
|
|
|
681
|
+
var useStyles = core.makeStyles(function (_a) {
|
|
682
|
+
var spacing = _a.spacing;
|
|
683
|
+
return ({
|
|
684
|
+
root: {
|
|
685
|
+
'&:last-child': {
|
|
686
|
+
marginBottom: 0,
|
|
687
|
+
},
|
|
688
|
+
marginBottom: spacing(4),
|
|
689
|
+
padding: spacing(4),
|
|
690
|
+
},
|
|
691
|
+
});
|
|
692
|
+
});
|
|
693
|
+
var Paper = React.forwardRef(function (props, ref) {
|
|
694
|
+
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
695
|
+
var classes = useStyles(props);
|
|
696
|
+
return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
697
|
+
});
|
|
698
|
+
Paper.displayName = 'Paper';
|
|
699
|
+
Paper.defaultProps = {
|
|
700
|
+
legacyStyles: false,
|
|
701
|
+
};
|
|
702
|
+
|
|
964
703
|
var PaperContent = function (props) {
|
|
965
704
|
var children = props.children;
|
|
966
705
|
return React__default['default'].createElement(core.Box, { padding: 4 }, children);
|
|
@@ -1585,7 +1324,6 @@ Object.defineProperty(exports, 'Tabs', {
|
|
|
1585
1324
|
return Tabs__default['default'];
|
|
1586
1325
|
}
|
|
1587
1326
|
});
|
|
1588
|
-
exports.AudioPlayer = AudioPlayer;
|
|
1589
1327
|
exports.Avatar = Avatar;
|
|
1590
1328
|
exports.Button = Button;
|
|
1591
1329
|
exports.Checkbox = Checkbox;
|