@popmenu/audio-player 0.30.0 → 0.33.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/index.es.js +65 -90
- package/build/index.es.js.map +1 -1
- package/build/index.js +65 -90
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -171,109 +171,109 @@ var classnames$1 = {exports: {}};
|
|
|
171
171
|
|
|
172
172
|
var classNames$1 = classnames$1.exports;
|
|
173
173
|
|
|
174
|
-
var _path$
|
|
174
|
+
var _path$i;
|
|
175
175
|
|
|
176
|
-
function _extends$
|
|
176
|
+
function _extends$E() { _extends$E = 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$E.apply(this, arguments); }
|
|
177
177
|
|
|
178
178
|
function SvgPause(props) {
|
|
179
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
179
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$E({
|
|
180
180
|
viewBox: "0 0 16 16",
|
|
181
181
|
fill: "none",
|
|
182
182
|
strokeLinecap: "round",
|
|
183
183
|
strokeLinejoin: "round",
|
|
184
184
|
width: "1em",
|
|
185
185
|
height: "1em"
|
|
186
|
-
}, props), _path$
|
|
186
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
187
187
|
d: "M6.667 2.667H4v10.666h2.667V2.666zm5.333 0H9.333v10.666H12V2.666z",
|
|
188
188
|
stroke: "currentColor"
|
|
189
189
|
})));
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
var _path$
|
|
192
|
+
var _path$h;
|
|
193
193
|
|
|
194
|
-
function _extends$
|
|
194
|
+
function _extends$D() { _extends$D = 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$D.apply(this, arguments); }
|
|
195
195
|
|
|
196
196
|
function SvgPlay(props) {
|
|
197
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
197
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$D({
|
|
198
198
|
viewBox: "0 0 16 16",
|
|
199
199
|
fill: "none",
|
|
200
200
|
strokeLinecap: "round",
|
|
201
201
|
strokeLinejoin: "round",
|
|
202
202
|
width: "1em",
|
|
203
203
|
height: "1em"
|
|
204
|
-
}, props), _path$
|
|
204
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
205
205
|
d: "M3.333 2l9.334 6-9.334 6V2z",
|
|
206
206
|
stroke: "currentColor"
|
|
207
207
|
})));
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
var _path$
|
|
210
|
+
var _path$f;
|
|
211
211
|
|
|
212
|
-
function _extends$
|
|
212
|
+
function _extends$A() { _extends$A = 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$A.apply(this, arguments); }
|
|
213
213
|
|
|
214
214
|
function SvgVolumeDown(props) {
|
|
215
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
215
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$A({
|
|
216
216
|
viewBox: "0 0 16 16",
|
|
217
217
|
fill: "none",
|
|
218
218
|
strokeLinecap: "round",
|
|
219
219
|
strokeLinejoin: "round",
|
|
220
220
|
width: "1em",
|
|
221
221
|
height: "1em"
|
|
222
|
-
}, props), _path$
|
|
222
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
223
223
|
d: "M8.999 3.333L5.665 6H3v4h2.666L9 12.667V3.333zm3.026 2.307a3.333 3.333 0 010 4.714",
|
|
224
224
|
stroke: "currentColor"
|
|
225
225
|
})));
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
var _path$
|
|
228
|
+
var _path$e;
|
|
229
229
|
|
|
230
|
-
function _extends$
|
|
230
|
+
function _extends$z() { _extends$z = 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$z.apply(this, arguments); }
|
|
231
231
|
|
|
232
232
|
function SvgVolumeMute(props) {
|
|
233
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
233
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
|
|
234
234
|
viewBox: "0 0 16 16",
|
|
235
235
|
fill: "none",
|
|
236
236
|
strokeLinecap: "round",
|
|
237
237
|
strokeLinejoin: "round",
|
|
238
238
|
width: "1em",
|
|
239
239
|
height: "1em"
|
|
240
|
-
}, props), _path$
|
|
240
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
241
241
|
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333z",
|
|
242
242
|
stroke: "currentColor"
|
|
243
243
|
})));
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
var _path$
|
|
246
|
+
var _path$d;
|
|
247
247
|
|
|
248
|
-
function _extends$
|
|
248
|
+
function _extends$y() { _extends$y = 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$y.apply(this, arguments); }
|
|
249
249
|
|
|
250
250
|
function SvgVolumeOff(props) {
|
|
251
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
251
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
252
252
|
viewBox: "0 0 16 16",
|
|
253
253
|
fill: "none",
|
|
254
254
|
strokeLinecap: "round",
|
|
255
255
|
strokeLinejoin: "round",
|
|
256
256
|
width: "1em",
|
|
257
257
|
height: "1em"
|
|
258
|
-
}, props), _path$
|
|
258
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
259
259
|
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm8 2.667l-4 4m0-4l4 4",
|
|
260
260
|
stroke: "currentColor"
|
|
261
261
|
})));
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
var _path$
|
|
264
|
+
var _path$c;
|
|
265
265
|
|
|
266
|
-
function _extends$
|
|
266
|
+
function _extends$x() { _extends$x = 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$x.apply(this, arguments); }
|
|
267
267
|
|
|
268
268
|
function SvgVolumeUp(props) {
|
|
269
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
269
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
270
270
|
viewBox: "0 0 16 16",
|
|
271
271
|
fill: "none",
|
|
272
272
|
strokeLinecap: "round",
|
|
273
273
|
strokeLinejoin: "round",
|
|
274
274
|
width: "1em",
|
|
275
275
|
height: "1em"
|
|
276
|
-
}, props), _path$
|
|
276
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
277
277
|
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",
|
|
278
278
|
stroke: "currentColor"
|
|
279
279
|
})));
|
|
@@ -317,19 +317,19 @@ function __rest(s, e) {
|
|
|
317
317
|
return t;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
var _path$
|
|
320
|
+
var _path$F;
|
|
321
321
|
|
|
322
|
-
function _extends$
|
|
322
|
+
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); }
|
|
323
323
|
|
|
324
324
|
function SvgUser(props) {
|
|
325
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
325
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$19({
|
|
326
326
|
viewBox: "0 0 16 16",
|
|
327
327
|
fill: "none",
|
|
328
328
|
strokeLinecap: "round",
|
|
329
329
|
strokeLinejoin: "round",
|
|
330
330
|
width: "1em",
|
|
331
331
|
height: "1em"
|
|
332
|
-
}, props), _path$
|
|
332
|
+
}, props), _path$F || (_path$F = /*#__PURE__*/React__namespace.createElement("path", {
|
|
333
333
|
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",
|
|
334
334
|
stroke: "currentColor"
|
|
335
335
|
})));
|
|
@@ -562,48 +562,35 @@ var Checkbox = React.forwardRef(function (props, ref) {
|
|
|
562
562
|
});
|
|
563
563
|
Checkbox.displayName = 'Checkbox';
|
|
564
564
|
|
|
565
|
+
var defaultTypographyProps = {
|
|
566
|
+
variant: 'body1',
|
|
567
|
+
};
|
|
568
|
+
|
|
565
569
|
var weights = {
|
|
566
570
|
regular: 400,
|
|
571
|
+
medium: 500,
|
|
567
572
|
'semi-bold': 600,
|
|
568
573
|
bold: 700,
|
|
569
574
|
};
|
|
570
|
-
var
|
|
571
|
-
var
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
'info.light',
|
|
589
|
-
'info.dark',
|
|
590
|
-
'success.light',
|
|
591
|
-
'success.dark',
|
|
592
|
-
'error.light',
|
|
593
|
-
'error.dark',
|
|
594
|
-
'warning.light',
|
|
595
|
-
'warning.dark',
|
|
596
|
-
].includes(color)) {
|
|
597
|
-
var _a = color.split('.'), paletteKey = _a[0], variant = _a[1];
|
|
598
|
-
return theme.palette[paletteKey][variant];
|
|
575
|
+
var getCustomColor = function (theme, color) {
|
|
576
|
+
var isCommonColor = color && ['white', 'black'].includes(color);
|
|
577
|
+
var isGreyColor = color && color.match(/^grey\.\d{3}/);
|
|
578
|
+
var isSemanticColor = color && color.match(/(primary|secondary|info|success|error|warning).?(light|dark)?/);
|
|
579
|
+
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
580
|
+
switch (true) {
|
|
581
|
+
case isCommonColor:
|
|
582
|
+
return theme.palette.common[color];
|
|
583
|
+
case Boolean(isGreyColor):
|
|
584
|
+
var scale = color.split('.')[1];
|
|
585
|
+
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
586
|
+
case Boolean(isSemanticColor):
|
|
587
|
+
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
588
|
+
return theme.palette[paletteKey][variant];
|
|
589
|
+
case isTextColor:
|
|
590
|
+
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
591
|
+
default:
|
|
592
|
+
return undefined;
|
|
599
593
|
}
|
|
600
|
-
if (['success', 'info', 'error', 'warning', 'primary', 'secondary'].includes(color)) {
|
|
601
|
-
return theme.palette[color].main;
|
|
602
|
-
}
|
|
603
|
-
if (['textPrimary', 'textSecondary'].includes(color)) {
|
|
604
|
-
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
605
|
-
}
|
|
606
|
-
return undefined;
|
|
607
594
|
};
|
|
608
595
|
var useTypographyStyles = styles.makeStyles(function (theme) {
|
|
609
596
|
var _a;
|
|
@@ -618,21 +605,24 @@ var useTypographyStyles = styles.makeStyles(function (theme) {
|
|
|
618
605
|
_a.fontFamily = theme.typography.fontFamily,
|
|
619
606
|
_a.fontWeight = function (_a) {
|
|
620
607
|
var variant = _a.variant, weight = _a.weight;
|
|
621
|
-
return (weight ? weights[weight] : theme.typography[variant
|
|
608
|
+
return (weight ? weights[weight] : theme.typography[variant].fontWeight);
|
|
622
609
|
},
|
|
623
610
|
_a.fontSize = function (_a) {
|
|
624
611
|
var variant = _a.variant;
|
|
625
|
-
return theme.typography[variant
|
|
612
|
+
return theme.typography[variant].fontSize;
|
|
626
613
|
},
|
|
627
614
|
_a.lineHeight = function (_a) {
|
|
628
615
|
var variant = _a.variant;
|
|
629
|
-
return theme.typography[variant
|
|
616
|
+
return theme.typography[variant].lineHeight;
|
|
630
617
|
},
|
|
631
618
|
_a.textTransform = function (_a) {
|
|
632
619
|
var variant = _a.variant;
|
|
633
|
-
return theme.typography[variant
|
|
620
|
+
return theme.typography[variant].textTransform;
|
|
621
|
+
},
|
|
622
|
+
_a.color = function (_a) {
|
|
623
|
+
var color = _a.color, variant = _a.variant;
|
|
624
|
+
return (color && getCustomColor(theme, color)) || theme.typography[variant].color;
|
|
634
625
|
},
|
|
635
|
-
_a.color = function (props) { return getColor(theme, props); },
|
|
636
626
|
_a),
|
|
637
627
|
caption: {
|
|
638
628
|
display: 'inline',
|
|
@@ -643,29 +633,14 @@ var useTypographyStyles = styles.makeStyles(function (theme) {
|
|
|
643
633
|
});
|
|
644
634
|
});
|
|
645
635
|
|
|
646
|
-
var variantMap = {
|
|
647
|
-
h1: 'h1',
|
|
648
|
-
h2: 'h2',
|
|
649
|
-
h3: 'h3',
|
|
650
|
-
h4: 'h4',
|
|
651
|
-
h5: 'h5',
|
|
652
|
-
h6: 'h6',
|
|
653
|
-
h7: 'h6',
|
|
654
|
-
body1: 'p',
|
|
655
|
-
body2: 'p',
|
|
656
|
-
subtitle1: 'h6',
|
|
657
|
-
subtitle2: 'h6',
|
|
658
|
-
caption: 'span',
|
|
659
|
-
overline: 'span',
|
|
660
|
-
};
|
|
661
|
-
|
|
662
636
|
var Typography = React.forwardRef(function (props, ref) {
|
|
663
|
-
props.weight;
|
|
664
|
-
var classes = useTypographyStyles(props);
|
|
665
|
-
var
|
|
666
|
-
return React__default['default'].createElement(core.Typography, __assign({
|
|
637
|
+
props.weight; props.color; var restProps = __rest(props, ["weight", "color"]);
|
|
638
|
+
var classes = useTypographyStyles(__assign({}, props));
|
|
639
|
+
var variantMapping = { subtitle1: 'p' };
|
|
640
|
+
return React__default['default'].createElement(core.Typography, __assign({ ref: ref, classes: classes, variantMapping: variantMapping }, restProps));
|
|
667
641
|
});
|
|
668
|
-
Typography.displayName = 'Typography';
|
|
642
|
+
Typography.displayName = 'Typography';
|
|
643
|
+
Typography.defaultProps = defaultTypographyProps;
|
|
669
644
|
|
|
670
645
|
var getFadeStop = function (_a, typographyVariant) {
|
|
671
646
|
var typography = _a.typography;
|