@popmenu/common-ui 0.25.1 → 0.28.0
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 +194 -456
- package/build/index.es.js.map +1 -1
- package/build/index.js +189 -452
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- 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,12 +155,12 @@ function __rest(s, e) {
|
|
|
155
155
|
return t;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
var _path$
|
|
158
|
+
var _path$3g;
|
|
159
159
|
|
|
160
|
-
function _extends$
|
|
160
|
+
function _extends$3x() { _extends$3x = 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$3x.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$3x({
|
|
164
164
|
viewBox: "0 0 16 16",
|
|
165
165
|
strokeLinecap: "round",
|
|
166
166
|
strokeLinejoin: "round",
|
|
@@ -168,17 +168,17 @@ function SvgMinusCircle(props) {
|
|
|
168
168
|
width: "1em",
|
|
169
169
|
height: "1em",
|
|
170
170
|
fill: "none"
|
|
171
|
-
}, props), _path$
|
|
172
|
-
d: "M8 14.667A6.667 6.667 0 108 1.
|
|
171
|
+
}, props), _path$3g || (_path$3g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
172
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM5.333 8h5.334"
|
|
173
173
|
})));
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
var _path$
|
|
176
|
+
var _path$38;
|
|
177
177
|
|
|
178
|
-
function _extends$
|
|
178
|
+
function _extends$3p() { _extends$3p = 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$3p.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$3p({
|
|
182
182
|
viewBox: "0 0 16 16",
|
|
183
183
|
strokeLinecap: "round",
|
|
184
184
|
strokeLinejoin: "round",
|
|
@@ -186,17 +186,17 @@ function SvgPlusCircle(props) {
|
|
|
186
186
|
width: "1em",
|
|
187
187
|
height: "1em",
|
|
188
188
|
fill: "none"
|
|
189
|
-
}, props), _path$
|
|
190
|
-
d: "M8 14.667A6.667 6.667 0 108 1.
|
|
189
|
+
}, props), _path$38 || (_path$38 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
190
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-9.334v5.334M5.333 8h5.334"
|
|
191
191
|
})));
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
var _path$
|
|
194
|
+
var _path$2Q;
|
|
195
195
|
|
|
196
|
-
function _extends$
|
|
196
|
+
function _extends$35() { _extends$35 = 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$35.apply(this, arguments); }
|
|
197
197
|
|
|
198
198
|
function SvgUser(props) {
|
|
199
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
199
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$35({
|
|
200
200
|
viewBox: "0 0 16 16",
|
|
201
201
|
strokeLinecap: "round",
|
|
202
202
|
strokeLinejoin: "round",
|
|
@@ -204,118 +204,46 @@ function SvgUser(props) {
|
|
|
204
204
|
width: "1em",
|
|
205
205
|
height: "1em",
|
|
206
206
|
fill: "none"
|
|
207
|
-
}, props), _path$
|
|
207
|
+
}, props), _path$2Q || (_path$2Q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
208
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
209
|
})));
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
var
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
var
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
var _path$10;
|
|
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({
|
|
254
|
-
viewBox: "0 0 16 16",
|
|
255
|
-
strokeLinecap: "round",
|
|
256
|
-
strokeLinejoin: "round",
|
|
257
|
-
stroke: "currentColor",
|
|
258
|
-
width: "1em",
|
|
259
|
-
height: "1em",
|
|
260
|
-
fill: "none"
|
|
261
|
-
}, props), _path$10 || (_path$10 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
262
|
-
d: "M8.999 3.333L5.665 6H3v4h2.666L9 12.667V3.333zm3.026 2.307a3.333 3.333 0 010 4.713"
|
|
263
|
-
})));
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
var _path$$;
|
|
267
|
-
|
|
268
|
-
function _extends$19() { _extends$19 = 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$19.apply(this, arguments); }
|
|
269
|
-
|
|
270
|
-
function SvgVolumeMute(props) {
|
|
271
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$19({
|
|
272
|
-
viewBox: "0 0 16 16",
|
|
273
|
-
strokeLinecap: "round",
|
|
274
|
-
strokeLinejoin: "round",
|
|
275
|
-
stroke: "currentColor",
|
|
276
|
-
width: "1em",
|
|
277
|
-
height: "1em",
|
|
278
|
-
fill: "none"
|
|
279
|
-
}, props), _path$$ || (_path$$ = /*#__PURE__*/React__namespace.createElement("path", {
|
|
280
|
-
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333z"
|
|
281
|
-
})));
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
var _path$_;
|
|
285
|
-
|
|
286
|
-
function _extends$18() { _extends$18 = 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$18.apply(this, arguments); }
|
|
287
|
-
|
|
288
|
-
function SvgVolumeOff(props) {
|
|
289
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$18({
|
|
290
|
-
viewBox: "0 0 16 16",
|
|
291
|
-
strokeLinecap: "round",
|
|
292
|
-
strokeLinejoin: "round",
|
|
293
|
-
stroke: "currentColor",
|
|
294
|
-
width: "1em",
|
|
295
|
-
height: "1em",
|
|
296
|
-
fill: "none"
|
|
297
|
-
}, props), _path$_ || (_path$_ = /*#__PURE__*/React__namespace.createElement("path", {
|
|
298
|
-
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm8 2.667l-4 4m0-4l4 4"
|
|
299
|
-
})));
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
var _path$Z;
|
|
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$Z || (_path$Z = /*#__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,111 @@ 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 classes = useTypographyStyles(props);
|
|
539
|
+
var component = variantMap[variant];
|
|
540
|
+
return React__default['default'].createElement(core.Typography, __assign({ component: component, ref: ref, classes: classes }, restProps, { variant: "inherit" }));
|
|
541
|
+
});
|
|
542
|
+
Typography.displayName = 'Typography';
|
|
543
|
+
|
|
836
544
|
var getFadeStop = function (_a, typographyVariant) {
|
|
837
545
|
var typography = _a.typography;
|
|
838
546
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
@@ -891,7 +599,7 @@ var SemanticColors;
|
|
|
891
599
|
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
892
600
|
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
893
601
|
})(SemanticColors || (SemanticColors = {}));
|
|
894
|
-
var useStyles = core.makeStyles(function (theme) { return ({
|
|
602
|
+
var useStyles$1 = core.makeStyles(function (theme) { return ({
|
|
895
603
|
dividerRoot: {
|
|
896
604
|
gap: theme.spacing(2),
|
|
897
605
|
},
|
|
@@ -929,7 +637,7 @@ var useStyles = core.makeStyles(function (theme) { return ({
|
|
|
929
637
|
}); });
|
|
930
638
|
var Divider = function (props) {
|
|
931
639
|
var className = props.className, text = props.text, textTransform = props.textTransform, TypographyProps = props.TypographyProps;
|
|
932
|
-
var classes = useStyles(props);
|
|
640
|
+
var classes = useStyles$1(props);
|
|
933
641
|
var casingOffset = textTransform === 'lowercase' ? '.25rem' : 'unset';
|
|
934
642
|
return (React__default['default'].createElement(core.Box, { className: classNames([classes.dividerRoot, className]), display: "flex", alignItems: "center" },
|
|
935
643
|
React__default['default'].createElement(core.Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset }),
|
|
@@ -942,6 +650,14 @@ Divider.defaultProps = {
|
|
|
942
650
|
textTransform: 'lowercase',
|
|
943
651
|
};
|
|
944
652
|
|
|
653
|
+
var IconButton = React.forwardRef(function (props, ref) {
|
|
654
|
+
return React__default['default'].createElement(MuiIconButton__default['default'], __assign({ ref: ref }, props));
|
|
655
|
+
});
|
|
656
|
+
IconButton.displayName = 'IconButton';
|
|
657
|
+
IconButton.defaultProps = {
|
|
658
|
+
color: 'secondary',
|
|
659
|
+
};
|
|
660
|
+
|
|
945
661
|
var useLinkStyles = styles.makeStyles(function (theme) { return ({
|
|
946
662
|
root: function (props) {
|
|
947
663
|
var _a;
|
|
@@ -961,6 +677,28 @@ Link.defaultProps = {
|
|
|
961
677
|
};
|
|
962
678
|
Link.displayName = 'Link';
|
|
963
679
|
|
|
680
|
+
var useStyles = core.makeStyles(function (_a) {
|
|
681
|
+
var spacing = _a.spacing;
|
|
682
|
+
return ({
|
|
683
|
+
root: {
|
|
684
|
+
'&:last-child': {
|
|
685
|
+
marginBottom: 0,
|
|
686
|
+
},
|
|
687
|
+
marginBottom: spacing(4),
|
|
688
|
+
padding: spacing(4),
|
|
689
|
+
},
|
|
690
|
+
});
|
|
691
|
+
});
|
|
692
|
+
var Paper = React.forwardRef(function (props, ref) {
|
|
693
|
+
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
694
|
+
var classes = useStyles(props);
|
|
695
|
+
return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
696
|
+
});
|
|
697
|
+
Paper.displayName = 'Paper';
|
|
698
|
+
Paper.defaultProps = {
|
|
699
|
+
legacyStyles: false,
|
|
700
|
+
};
|
|
701
|
+
|
|
964
702
|
var PaperContent = function (props) {
|
|
965
703
|
var children = props.children;
|
|
966
704
|
return React__default['default'].createElement(core.Box, { padding: 4 }, children);
|
|
@@ -1585,7 +1323,6 @@ Object.defineProperty(exports, 'Tabs', {
|
|
|
1585
1323
|
return Tabs__default['default'];
|
|
1586
1324
|
}
|
|
1587
1325
|
});
|
|
1588
|
-
exports.AudioPlayer = AudioPlayer;
|
|
1589
1326
|
exports.Avatar = Avatar;
|
|
1590
1327
|
exports.Button = Button;
|
|
1591
1328
|
exports.Checkbox = Checkbox;
|