@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.es.js
CHANGED
|
@@ -132,109 +132,109 @@ var classnames$1 = {exports: {}};
|
|
|
132
132
|
|
|
133
133
|
var classNames$1 = classnames$1.exports;
|
|
134
134
|
|
|
135
|
-
var _path$
|
|
135
|
+
var _path$i;
|
|
136
136
|
|
|
137
|
-
function _extends$
|
|
137
|
+
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); }
|
|
138
138
|
|
|
139
139
|
function SvgPause(props) {
|
|
140
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
140
|
+
return /*#__PURE__*/React.createElement("svg", _extends$E({
|
|
141
141
|
viewBox: "0 0 16 16",
|
|
142
142
|
fill: "none",
|
|
143
143
|
strokeLinecap: "round",
|
|
144
144
|
strokeLinejoin: "round",
|
|
145
145
|
width: "1em",
|
|
146
146
|
height: "1em"
|
|
147
|
-
}, props), _path$
|
|
147
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
|
|
148
148
|
d: "M6.667 2.667H4v10.666h2.667V2.666zm5.333 0H9.333v10.666H12V2.666z",
|
|
149
149
|
stroke: "currentColor"
|
|
150
150
|
})));
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
var _path$
|
|
153
|
+
var _path$h;
|
|
154
154
|
|
|
155
|
-
function _extends$
|
|
155
|
+
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); }
|
|
156
156
|
|
|
157
157
|
function SvgPlay(props) {
|
|
158
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
158
|
+
return /*#__PURE__*/React.createElement("svg", _extends$D({
|
|
159
159
|
viewBox: "0 0 16 16",
|
|
160
160
|
fill: "none",
|
|
161
161
|
strokeLinecap: "round",
|
|
162
162
|
strokeLinejoin: "round",
|
|
163
163
|
width: "1em",
|
|
164
164
|
height: "1em"
|
|
165
|
-
}, props), _path$
|
|
165
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
|
|
166
166
|
d: "M3.333 2l9.334 6-9.334 6V2z",
|
|
167
167
|
stroke: "currentColor"
|
|
168
168
|
})));
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
var _path$
|
|
171
|
+
var _path$f;
|
|
172
172
|
|
|
173
|
-
function _extends$
|
|
173
|
+
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); }
|
|
174
174
|
|
|
175
175
|
function SvgVolumeDown(props) {
|
|
176
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
176
|
+
return /*#__PURE__*/React.createElement("svg", _extends$A({
|
|
177
177
|
viewBox: "0 0 16 16",
|
|
178
178
|
fill: "none",
|
|
179
179
|
strokeLinecap: "round",
|
|
180
180
|
strokeLinejoin: "round",
|
|
181
181
|
width: "1em",
|
|
182
182
|
height: "1em"
|
|
183
|
-
}, props), _path$
|
|
183
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
|
|
184
184
|
d: "M8.999 3.333L5.665 6H3v4h2.666L9 12.667V3.333zm3.026 2.307a3.333 3.333 0 010 4.714",
|
|
185
185
|
stroke: "currentColor"
|
|
186
186
|
})));
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
var _path$
|
|
189
|
+
var _path$e;
|
|
190
190
|
|
|
191
|
-
function _extends$
|
|
191
|
+
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); }
|
|
192
192
|
|
|
193
193
|
function SvgVolumeMute(props) {
|
|
194
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
194
|
+
return /*#__PURE__*/React.createElement("svg", _extends$z({
|
|
195
195
|
viewBox: "0 0 16 16",
|
|
196
196
|
fill: "none",
|
|
197
197
|
strokeLinecap: "round",
|
|
198
198
|
strokeLinejoin: "round",
|
|
199
199
|
width: "1em",
|
|
200
200
|
height: "1em"
|
|
201
|
-
}, props), _path$
|
|
201
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
|
|
202
202
|
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333z",
|
|
203
203
|
stroke: "currentColor"
|
|
204
204
|
})));
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
var _path$
|
|
207
|
+
var _path$d;
|
|
208
208
|
|
|
209
|
-
function _extends$
|
|
209
|
+
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); }
|
|
210
210
|
|
|
211
211
|
function SvgVolumeOff(props) {
|
|
212
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
212
|
+
return /*#__PURE__*/React.createElement("svg", _extends$y({
|
|
213
213
|
viewBox: "0 0 16 16",
|
|
214
214
|
fill: "none",
|
|
215
215
|
strokeLinecap: "round",
|
|
216
216
|
strokeLinejoin: "round",
|
|
217
217
|
width: "1em",
|
|
218
218
|
height: "1em"
|
|
219
|
-
}, props), _path$
|
|
219
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
|
|
220
220
|
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm8 2.667l-4 4m0-4l4 4",
|
|
221
221
|
stroke: "currentColor"
|
|
222
222
|
})));
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
var _path$
|
|
225
|
+
var _path$c;
|
|
226
226
|
|
|
227
|
-
function _extends$
|
|
227
|
+
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); }
|
|
228
228
|
|
|
229
229
|
function SvgVolumeUp(props) {
|
|
230
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
230
|
+
return /*#__PURE__*/React.createElement("svg", _extends$x({
|
|
231
231
|
viewBox: "0 0 16 16",
|
|
232
232
|
fill: "none",
|
|
233
233
|
strokeLinecap: "round",
|
|
234
234
|
strokeLinejoin: "round",
|
|
235
235
|
width: "1em",
|
|
236
236
|
height: "1em"
|
|
237
|
-
}, props), _path$
|
|
237
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
|
|
238
238
|
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",
|
|
239
239
|
stroke: "currentColor"
|
|
240
240
|
})));
|
|
@@ -278,19 +278,19 @@ function __rest(s, e) {
|
|
|
278
278
|
return t;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
var _path$
|
|
281
|
+
var _path$F;
|
|
282
282
|
|
|
283
|
-
function _extends$
|
|
283
|
+
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); }
|
|
284
284
|
|
|
285
285
|
function SvgUser(props) {
|
|
286
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
286
|
+
return /*#__PURE__*/React.createElement("svg", _extends$19({
|
|
287
287
|
viewBox: "0 0 16 16",
|
|
288
288
|
fill: "none",
|
|
289
289
|
strokeLinecap: "round",
|
|
290
290
|
strokeLinejoin: "round",
|
|
291
291
|
width: "1em",
|
|
292
292
|
height: "1em"
|
|
293
|
-
}, props), _path$
|
|
293
|
+
}, props), _path$F || (_path$F = /*#__PURE__*/React.createElement("path", {
|
|
294
294
|
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",
|
|
295
295
|
stroke: "currentColor"
|
|
296
296
|
})));
|
|
@@ -523,48 +523,35 @@ var Checkbox = forwardRef(function (props, ref) {
|
|
|
523
523
|
});
|
|
524
524
|
Checkbox.displayName = 'Checkbox';
|
|
525
525
|
|
|
526
|
+
var defaultTypographyProps = {
|
|
527
|
+
variant: 'body1',
|
|
528
|
+
};
|
|
529
|
+
|
|
526
530
|
var weights = {
|
|
527
531
|
regular: 400,
|
|
532
|
+
medium: 500,
|
|
528
533
|
'semi-bold': 600,
|
|
529
534
|
bold: 700,
|
|
530
535
|
};
|
|
531
|
-
var
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
'info.light',
|
|
550
|
-
'info.dark',
|
|
551
|
-
'success.light',
|
|
552
|
-
'success.dark',
|
|
553
|
-
'error.light',
|
|
554
|
-
'error.dark',
|
|
555
|
-
'warning.light',
|
|
556
|
-
'warning.dark',
|
|
557
|
-
].includes(color)) {
|
|
558
|
-
var _a = color.split('.'), paletteKey = _a[0], variant = _a[1];
|
|
559
|
-
return theme.palette[paletteKey][variant];
|
|
536
|
+
var getCustomColor = function (theme, color) {
|
|
537
|
+
var isCommonColor = color && ['white', 'black'].includes(color);
|
|
538
|
+
var isGreyColor = color && color.match(/^grey\.\d{3}/);
|
|
539
|
+
var isSemanticColor = color && color.match(/(primary|secondary|info|success|error|warning).?(light|dark)?/);
|
|
540
|
+
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
541
|
+
switch (true) {
|
|
542
|
+
case isCommonColor:
|
|
543
|
+
return theme.palette.common[color];
|
|
544
|
+
case Boolean(isGreyColor):
|
|
545
|
+
var scale = color.split('.')[1];
|
|
546
|
+
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
547
|
+
case Boolean(isSemanticColor):
|
|
548
|
+
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
549
|
+
return theme.palette[paletteKey][variant];
|
|
550
|
+
case isTextColor:
|
|
551
|
+
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
552
|
+
default:
|
|
553
|
+
return undefined;
|
|
560
554
|
}
|
|
561
|
-
if (['success', 'info', 'error', 'warning', 'primary', 'secondary'].includes(color)) {
|
|
562
|
-
return theme.palette[color].main;
|
|
563
|
-
}
|
|
564
|
-
if (['textPrimary', 'textSecondary'].includes(color)) {
|
|
565
|
-
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
566
|
-
}
|
|
567
|
-
return undefined;
|
|
568
555
|
};
|
|
569
556
|
var useTypographyStyles = makeStyles$1(function (theme) {
|
|
570
557
|
var _a;
|
|
@@ -579,21 +566,24 @@ var useTypographyStyles = makeStyles$1(function (theme) {
|
|
|
579
566
|
_a.fontFamily = theme.typography.fontFamily,
|
|
580
567
|
_a.fontWeight = function (_a) {
|
|
581
568
|
var variant = _a.variant, weight = _a.weight;
|
|
582
|
-
return (weight ? weights[weight] : theme.typography[variant
|
|
569
|
+
return (weight ? weights[weight] : theme.typography[variant].fontWeight);
|
|
583
570
|
},
|
|
584
571
|
_a.fontSize = function (_a) {
|
|
585
572
|
var variant = _a.variant;
|
|
586
|
-
return theme.typography[variant
|
|
573
|
+
return theme.typography[variant].fontSize;
|
|
587
574
|
},
|
|
588
575
|
_a.lineHeight = function (_a) {
|
|
589
576
|
var variant = _a.variant;
|
|
590
|
-
return theme.typography[variant
|
|
577
|
+
return theme.typography[variant].lineHeight;
|
|
591
578
|
},
|
|
592
579
|
_a.textTransform = function (_a) {
|
|
593
580
|
var variant = _a.variant;
|
|
594
|
-
return theme.typography[variant
|
|
581
|
+
return theme.typography[variant].textTransform;
|
|
582
|
+
},
|
|
583
|
+
_a.color = function (_a) {
|
|
584
|
+
var color = _a.color, variant = _a.variant;
|
|
585
|
+
return (color && getCustomColor(theme, color)) || theme.typography[variant].color;
|
|
595
586
|
},
|
|
596
|
-
_a.color = function (props) { return getColor(theme, props); },
|
|
597
587
|
_a),
|
|
598
588
|
caption: {
|
|
599
589
|
display: 'inline',
|
|
@@ -604,29 +594,14 @@ var useTypographyStyles = makeStyles$1(function (theme) {
|
|
|
604
594
|
});
|
|
605
595
|
});
|
|
606
596
|
|
|
607
|
-
var variantMap = {
|
|
608
|
-
h1: 'h1',
|
|
609
|
-
h2: 'h2',
|
|
610
|
-
h3: 'h3',
|
|
611
|
-
h4: 'h4',
|
|
612
|
-
h5: 'h5',
|
|
613
|
-
h6: 'h6',
|
|
614
|
-
h7: 'h6',
|
|
615
|
-
body1: 'p',
|
|
616
|
-
body2: 'p',
|
|
617
|
-
subtitle1: 'h6',
|
|
618
|
-
subtitle2: 'h6',
|
|
619
|
-
caption: 'span',
|
|
620
|
-
overline: 'span',
|
|
621
|
-
};
|
|
622
|
-
|
|
623
597
|
var Typography = forwardRef(function (props, ref) {
|
|
624
|
-
props.weight;
|
|
625
|
-
var classes = useTypographyStyles(props);
|
|
626
|
-
var
|
|
627
|
-
return React__default.createElement(Typography$1, __assign({
|
|
598
|
+
props.weight; props.color; var restProps = __rest(props, ["weight", "color"]);
|
|
599
|
+
var classes = useTypographyStyles(__assign({}, props));
|
|
600
|
+
var variantMapping = { subtitle1: 'p' };
|
|
601
|
+
return React__default.createElement(Typography$1, __assign({ ref: ref, classes: classes, variantMapping: variantMapping }, restProps));
|
|
628
602
|
});
|
|
629
|
-
Typography.displayName = 'Typography';
|
|
603
|
+
Typography.displayName = 'Typography';
|
|
604
|
+
Typography.defaultProps = defaultTypographyProps;
|
|
630
605
|
|
|
631
606
|
var getFadeStop = function (_a, typographyVariant) {
|
|
632
607
|
var typography = _a.typography;
|