@popmenu/audio-player 0.28.0 → 0.31.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 +104 -118
- package/build/index.es.js.map +1 -1
- package/build/index.js +104 -118
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.es.js
CHANGED
|
@@ -132,111 +132,111 @@ var classnames$1 = {exports: {}};
|
|
|
132
132
|
|
|
133
133
|
var classNames$1 = classnames$1.exports;
|
|
134
134
|
|
|
135
|
-
var _path$
|
|
135
|
+
var _path$h;
|
|
136
136
|
|
|
137
|
-
function _extends$
|
|
137
|
+
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); }
|
|
138
138
|
|
|
139
139
|
function SvgPause(props) {
|
|
140
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
140
|
+
return /*#__PURE__*/React.createElement("svg", _extends$A({
|
|
141
141
|
viewBox: "0 0 16 16",
|
|
142
|
+
fill: "none",
|
|
142
143
|
strokeLinecap: "round",
|
|
143
144
|
strokeLinejoin: "round",
|
|
144
|
-
stroke: "currentColor",
|
|
145
145
|
width: "1em",
|
|
146
|
-
height: "1em"
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
height: "1em"
|
|
147
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
|
|
148
|
+
d: "M6.667 2.667H4v10.666h2.667V2.666zm5.333 0H9.333v10.666H12V2.666z",
|
|
149
|
+
stroke: "currentColor"
|
|
150
150
|
})));
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
var _path$
|
|
153
|
+
var _path$g;
|
|
154
154
|
|
|
155
|
-
function _extends$
|
|
155
|
+
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); }
|
|
156
156
|
|
|
157
157
|
function SvgPlay(props) {
|
|
158
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
158
|
+
return /*#__PURE__*/React.createElement("svg", _extends$z({
|
|
159
159
|
viewBox: "0 0 16 16",
|
|
160
|
+
fill: "none",
|
|
160
161
|
strokeLinecap: "round",
|
|
161
162
|
strokeLinejoin: "round",
|
|
162
|
-
stroke: "currentColor",
|
|
163
163
|
width: "1em",
|
|
164
|
-
height: "1em"
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
height: "1em"
|
|
165
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
|
|
166
|
+
d: "M3.333 2l9.334 6-9.334 6V2z",
|
|
167
|
+
stroke: "currentColor"
|
|
168
168
|
})));
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
var _path$
|
|
171
|
+
var _path$e;
|
|
172
172
|
|
|
173
|
-
function _extends$
|
|
173
|
+
function _extends$w() { _extends$w = 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$w.apply(this, arguments); }
|
|
174
174
|
|
|
175
175
|
function SvgVolumeDown(props) {
|
|
176
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
176
|
+
return /*#__PURE__*/React.createElement("svg", _extends$w({
|
|
177
177
|
viewBox: "0 0 16 16",
|
|
178
|
+
fill: "none",
|
|
178
179
|
strokeLinecap: "round",
|
|
179
180
|
strokeLinejoin: "round",
|
|
180
|
-
stroke: "currentColor",
|
|
181
181
|
width: "1em",
|
|
182
|
-
height: "1em"
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
height: "1em"
|
|
183
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
|
|
184
|
+
d: "M8.999 3.333L5.665 6H3v4h2.666L9 12.667V3.333zm3.026 2.307a3.333 3.333 0 010 4.714",
|
|
185
|
+
stroke: "currentColor"
|
|
186
186
|
})));
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
var _path$
|
|
189
|
+
var _path$d;
|
|
190
190
|
|
|
191
|
-
function _extends$
|
|
191
|
+
function _extends$v() { _extends$v = 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$v.apply(this, arguments); }
|
|
192
192
|
|
|
193
193
|
function SvgVolumeMute(props) {
|
|
194
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
194
|
+
return /*#__PURE__*/React.createElement("svg", _extends$v({
|
|
195
195
|
viewBox: "0 0 16 16",
|
|
196
|
+
fill: "none",
|
|
196
197
|
strokeLinecap: "round",
|
|
197
198
|
strokeLinejoin: "round",
|
|
198
|
-
stroke: "currentColor",
|
|
199
199
|
width: "1em",
|
|
200
|
-
height: "1em"
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
height: "1em"
|
|
201
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
|
|
202
|
+
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333z",
|
|
203
|
+
stroke: "currentColor"
|
|
204
204
|
})));
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
var _path$
|
|
207
|
+
var _path$c;
|
|
208
208
|
|
|
209
|
-
function _extends$
|
|
209
|
+
function _extends$u() { _extends$u = 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$u.apply(this, arguments); }
|
|
210
210
|
|
|
211
211
|
function SvgVolumeOff(props) {
|
|
212
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
212
|
+
return /*#__PURE__*/React.createElement("svg", _extends$u({
|
|
213
213
|
viewBox: "0 0 16 16",
|
|
214
|
+
fill: "none",
|
|
214
215
|
strokeLinecap: "round",
|
|
215
216
|
strokeLinejoin: "round",
|
|
216
|
-
stroke: "currentColor",
|
|
217
217
|
width: "1em",
|
|
218
|
-
height: "1em"
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
height: "1em"
|
|
219
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
|
|
220
|
+
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm8 2.667l-4 4m0-4l4 4",
|
|
221
|
+
stroke: "currentColor"
|
|
222
222
|
})));
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
var _path$
|
|
225
|
+
var _path$b;
|
|
226
226
|
|
|
227
|
-
function _extends$
|
|
227
|
+
function _extends$t() { _extends$t = 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$t.apply(this, arguments); }
|
|
228
228
|
|
|
229
229
|
function SvgVolumeUp(props) {
|
|
230
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
230
|
+
return /*#__PURE__*/React.createElement("svg", _extends$t({
|
|
231
231
|
viewBox: "0 0 16 16",
|
|
232
|
+
fill: "none",
|
|
232
233
|
strokeLinecap: "round",
|
|
233
234
|
strokeLinejoin: "round",
|
|
234
|
-
stroke: "currentColor",
|
|
235
235
|
width: "1em",
|
|
236
|
-
height: "1em"
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
height: "1em"
|
|
237
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
|
|
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
|
+
stroke: "currentColor"
|
|
240
240
|
})));
|
|
241
241
|
}
|
|
242
242
|
|
|
@@ -278,21 +278,21 @@ function __rest(s, e) {
|
|
|
278
278
|
return t;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
var _path$
|
|
281
|
+
var _path$D;
|
|
282
282
|
|
|
283
|
-
function _extends$
|
|
283
|
+
function _extends$16() { _extends$16 = 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$16.apply(this, arguments); }
|
|
284
284
|
|
|
285
285
|
function SvgUser(props) {
|
|
286
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
286
|
+
return /*#__PURE__*/React.createElement("svg", _extends$16({
|
|
287
287
|
viewBox: "0 0 16 16",
|
|
288
|
+
fill: "none",
|
|
288
289
|
strokeLinecap: "round",
|
|
289
290
|
strokeLinejoin: "round",
|
|
290
|
-
stroke: "currentColor",
|
|
291
291
|
width: "1em",
|
|
292
|
-
height: "1em"
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
292
|
+
height: "1em"
|
|
293
|
+
}, props), _path$D || (_path$D = /*#__PURE__*/React.createElement("path", {
|
|
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
|
+
stroke: "currentColor"
|
|
296
296
|
})));
|
|
297
297
|
}
|
|
298
298
|
|
|
@@ -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,25 @@ 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
|
-
|
|
598
|
+
props.weight; props.color; var restProps = __rest(props, ["weight", "color"]);
|
|
599
|
+
var classes = useTypographyStyles(__assign({}, props));
|
|
600
|
+
var variantMapping = {
|
|
601
|
+
h1: 'h1',
|
|
602
|
+
h2: 'h2',
|
|
603
|
+
h3: 'h3',
|
|
604
|
+
h4: 'h4',
|
|
605
|
+
h5: 'h5',
|
|
606
|
+
h6: 'h6',
|
|
607
|
+
subtitle1: 'p',
|
|
608
|
+
subtitle2: 'p',
|
|
609
|
+
body1: 'p',
|
|
610
|
+
body2: 'p',
|
|
611
|
+
};
|
|
612
|
+
return React__default.createElement(Typography$1, __assign({ ref: ref, classes: classes, variantMapping: variantMapping }, restProps));
|
|
628
613
|
});
|
|
629
|
-
Typography.displayName = 'Typography';
|
|
614
|
+
Typography.displayName = 'Typography';
|
|
615
|
+
Typography.defaultProps = defaultTypographyProps;
|
|
630
616
|
|
|
631
617
|
var getFadeStop = function (_a, typographyVariant) {
|
|
632
618
|
var typography = _a.typography;
|