@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.es.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export { default as Alert } from '@material-ui/lab/Alert';
|
|
2
|
-
import { makeStyles, Typography as Typography$1,
|
|
2
|
+
import { makeStyles, Typography as Typography$1, useTheme as useTheme$1, Box, Link as Link$1, Paper as Paper$1, TextField as TextField$1 } from '@material-ui/core';
|
|
3
3
|
export { Accordion, AccordionActions, AccordionDetails, AccordionSummary, Box, Breadcrumbs, ButtonBase, ClickAwayListener, Fab, GridList, Hidden, Modal, Popover, Popper, Step, StepButton, StepConnector, StepContent, StepIcon, StepLabel, Stepper, ThemeProvider, Toolbar, alpha, createTheme, darken, decomposeColor, getLuminance, hexToRgb, lighten, makeStyles, recomposeColor, rgbToHex } from '@material-ui/core';
|
|
4
4
|
export { default as AppBar } from '@material-ui/core/AppBar';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import React__default, { createElement, forwardRef,
|
|
7
|
-
import MuiIconButton from '@material-ui/core/IconButton';
|
|
8
|
-
import { makeStyles as makeStyles$1, useTheme as useTheme$1 } from '@material-ui/core/styles';
|
|
9
|
-
export { ServerStyleSheets } from '@material-ui/core/styles';
|
|
6
|
+
import React__default, { createElement, forwardRef, useState, useRef, useEffect } from 'react';
|
|
10
7
|
import MuiAvatar from '@material-ui/core/Avatar';
|
|
8
|
+
import { makeStyles as makeStyles$1, useTheme } from '@material-ui/core/styles';
|
|
9
|
+
export { ServerStyleSheets } from '@material-ui/core/styles';
|
|
11
10
|
export { default as Badge } from '@material-ui/core/Badge';
|
|
12
11
|
import MuiButton from '@material-ui/core/Button';
|
|
13
12
|
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
@@ -31,6 +30,7 @@ export { default as DialogTitle } from '@material-ui/core/DialogTitle';
|
|
|
31
30
|
export { default as Drawer } from '@material-ui/core/Drawer';
|
|
32
31
|
export { default as FormControl } from '@material-ui/core/FormControl';
|
|
33
32
|
export { default as Grid } from '@material-ui/core/Grid';
|
|
33
|
+
import MuiIconButton from '@material-ui/core/IconButton';
|
|
34
34
|
export { default as InputAdornment } from '@material-ui/core/InputAdornment';
|
|
35
35
|
export { default as LinearProgress } from '@material-ui/core/LinearProgress';
|
|
36
36
|
export { default as List } from '@material-ui/core/List';
|
|
@@ -89,12 +89,12 @@ function __rest(s, e) {
|
|
|
89
89
|
return t;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
var _path$
|
|
92
|
+
var _path$3g;
|
|
93
93
|
|
|
94
|
-
function _extends$
|
|
94
|
+
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); }
|
|
95
95
|
|
|
96
96
|
function SvgMinusCircle(props) {
|
|
97
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
97
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3x({
|
|
98
98
|
viewBox: "0 0 16 16",
|
|
99
99
|
strokeLinecap: "round",
|
|
100
100
|
strokeLinejoin: "round",
|
|
@@ -102,17 +102,17 @@ function SvgMinusCircle(props) {
|
|
|
102
102
|
width: "1em",
|
|
103
103
|
height: "1em",
|
|
104
104
|
fill: "none"
|
|
105
|
-
}, props), _path$
|
|
106
|
-
d: "M8 14.667A6.667 6.667 0 108 1.
|
|
105
|
+
}, props), _path$3g || (_path$3g = /*#__PURE__*/React.createElement("path", {
|
|
106
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM5.333 8h5.334"
|
|
107
107
|
})));
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
var _path$
|
|
110
|
+
var _path$38;
|
|
111
111
|
|
|
112
|
-
function _extends$
|
|
112
|
+
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); }
|
|
113
113
|
|
|
114
114
|
function SvgPlusCircle(props) {
|
|
115
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
115
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3p({
|
|
116
116
|
viewBox: "0 0 16 16",
|
|
117
117
|
strokeLinecap: "round",
|
|
118
118
|
strokeLinejoin: "round",
|
|
@@ -120,17 +120,17 @@ function SvgPlusCircle(props) {
|
|
|
120
120
|
width: "1em",
|
|
121
121
|
height: "1em",
|
|
122
122
|
fill: "none"
|
|
123
|
-
}, props), _path$
|
|
124
|
-
d: "M8 14.667A6.667 6.667 0 108 1.
|
|
123
|
+
}, props), _path$38 || (_path$38 = /*#__PURE__*/React.createElement("path", {
|
|
124
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-9.334v5.334M5.333 8h5.334"
|
|
125
125
|
})));
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
var _path$
|
|
128
|
+
var _path$2Q;
|
|
129
129
|
|
|
130
|
-
function _extends$
|
|
130
|
+
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); }
|
|
131
131
|
|
|
132
132
|
function SvgUser(props) {
|
|
133
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
133
|
+
return /*#__PURE__*/React.createElement("svg", _extends$35({
|
|
134
134
|
viewBox: "0 0 16 16",
|
|
135
135
|
strokeLinecap: "round",
|
|
136
136
|
strokeLinejoin: "round",
|
|
@@ -138,118 +138,46 @@ function SvgUser(props) {
|
|
|
138
138
|
width: "1em",
|
|
139
139
|
height: "1em",
|
|
140
140
|
fill: "none"
|
|
141
|
-
}, props), _path$
|
|
141
|
+
}, props), _path$2Q || (_path$2Q = /*#__PURE__*/React.createElement("path", {
|
|
142
142
|
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"
|
|
143
143
|
})));
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
var _path$10;
|
|
183
|
-
|
|
184
|
-
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); }
|
|
185
|
-
|
|
186
|
-
function SvgVolumeDown(props) {
|
|
187
|
-
return /*#__PURE__*/React.createElement("svg", _extends$1a({
|
|
188
|
-
viewBox: "0 0 16 16",
|
|
189
|
-
strokeLinecap: "round",
|
|
190
|
-
strokeLinejoin: "round",
|
|
191
|
-
stroke: "currentColor",
|
|
192
|
-
width: "1em",
|
|
193
|
-
height: "1em",
|
|
194
|
-
fill: "none"
|
|
195
|
-
}, props), _path$10 || (_path$10 = /*#__PURE__*/React.createElement("path", {
|
|
196
|
-
d: "M8.999 3.333L5.665 6H3v4h2.666L9 12.667V3.333zm3.026 2.307a3.333 3.333 0 010 4.713"
|
|
197
|
-
})));
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
var _path$$;
|
|
201
|
-
|
|
202
|
-
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); }
|
|
203
|
-
|
|
204
|
-
function SvgVolumeMute(props) {
|
|
205
|
-
return /*#__PURE__*/React.createElement("svg", _extends$19({
|
|
206
|
-
viewBox: "0 0 16 16",
|
|
207
|
-
strokeLinecap: "round",
|
|
208
|
-
strokeLinejoin: "round",
|
|
209
|
-
stroke: "currentColor",
|
|
210
|
-
width: "1em",
|
|
211
|
-
height: "1em",
|
|
212
|
-
fill: "none"
|
|
213
|
-
}, props), _path$$ || (_path$$ = /*#__PURE__*/React.createElement("path", {
|
|
214
|
-
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333z"
|
|
215
|
-
})));
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
var _path$_;
|
|
219
|
-
|
|
220
|
-
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); }
|
|
221
|
-
|
|
222
|
-
function SvgVolumeOff(props) {
|
|
223
|
-
return /*#__PURE__*/React.createElement("svg", _extends$18({
|
|
224
|
-
viewBox: "0 0 16 16",
|
|
225
|
-
strokeLinecap: "round",
|
|
226
|
-
strokeLinejoin: "round",
|
|
227
|
-
stroke: "currentColor",
|
|
228
|
-
width: "1em",
|
|
229
|
-
height: "1em",
|
|
230
|
-
fill: "none"
|
|
231
|
-
}, props), _path$_ || (_path$_ = /*#__PURE__*/React.createElement("path", {
|
|
232
|
-
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm8 2.667l-4 4m0-4l4 4"
|
|
233
|
-
})));
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
var _path$Z;
|
|
237
|
-
|
|
238
|
-
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); }
|
|
239
|
-
|
|
240
|
-
function SvgVolumeUp(props) {
|
|
241
|
-
return /*#__PURE__*/React.createElement("svg", _extends$17({
|
|
242
|
-
viewBox: "0 0 16 16",
|
|
243
|
-
strokeLinecap: "round",
|
|
244
|
-
strokeLinejoin: "round",
|
|
245
|
-
stroke: "currentColor",
|
|
246
|
-
width: "1em",
|
|
247
|
-
height: "1em",
|
|
248
|
-
fill: "none"
|
|
249
|
-
}, props), _path$Z || (_path$Z = /*#__PURE__*/React.createElement("path", {
|
|
250
|
-
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"
|
|
251
|
-
})));
|
|
252
|
-
}
|
|
146
|
+
var useIconStyles = makeStyles(function (_a) {
|
|
147
|
+
var spacing = _a.spacing, palette = _a.palette;
|
|
148
|
+
var getFontSize = function (_a) {
|
|
149
|
+
var size = _a.size;
|
|
150
|
+
var sizes = {
|
|
151
|
+
inherit: 'inherit',
|
|
152
|
+
small: spacing(1.5),
|
|
153
|
+
medium: spacing(2),
|
|
154
|
+
large: spacing(2.5),
|
|
155
|
+
'extra-large': spacing(3),
|
|
156
|
+
};
|
|
157
|
+
return size ? sizes[size] : 'inherit';
|
|
158
|
+
};
|
|
159
|
+
var getColor = function (props) {
|
|
160
|
+
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
161
|
+
var value = 'inherit';
|
|
162
|
+
if (props.color) {
|
|
163
|
+
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
164
|
+
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
165
|
+
value = palette[color][variant];
|
|
166
|
+
}
|
|
167
|
+
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
168
|
+
value = props.color;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return value;
|
|
172
|
+
};
|
|
173
|
+
return {
|
|
174
|
+
root: {
|
|
175
|
+
color: getColor,
|
|
176
|
+
fontSize: getFontSize,
|
|
177
|
+
strokeWidth: '1.3px',
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
});
|
|
253
181
|
|
|
254
182
|
var classnames = {exports: {}};
|
|
255
183
|
|
|
@@ -311,42 +239,6 @@ var classnames = {exports: {}};
|
|
|
311
239
|
|
|
312
240
|
var classNames = classnames.exports;
|
|
313
241
|
|
|
314
|
-
var useIconStyles = makeStyles(function (_a) {
|
|
315
|
-
var spacing = _a.spacing, palette = _a.palette;
|
|
316
|
-
var getFontSize = function (_a) {
|
|
317
|
-
var size = _a.size;
|
|
318
|
-
var sizes = {
|
|
319
|
-
inherit: 'inherit',
|
|
320
|
-
small: spacing(1.5),
|
|
321
|
-
medium: spacing(2),
|
|
322
|
-
large: spacing(2.5),
|
|
323
|
-
'extra-large': spacing(3),
|
|
324
|
-
};
|
|
325
|
-
return size ? sizes[size] : 'inherit';
|
|
326
|
-
};
|
|
327
|
-
var getColor = function (props) {
|
|
328
|
-
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
329
|
-
var value = 'inherit';
|
|
330
|
-
if (props.color) {
|
|
331
|
-
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
332
|
-
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
333
|
-
value = palette[color][variant];
|
|
334
|
-
}
|
|
335
|
-
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
336
|
-
value = props.color;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
return value;
|
|
340
|
-
};
|
|
341
|
-
return {
|
|
342
|
-
root: {
|
|
343
|
-
color: getColor,
|
|
344
|
-
fontSize: getFontSize,
|
|
345
|
-
strokeWidth: '1.3px',
|
|
346
|
-
},
|
|
347
|
-
};
|
|
348
|
-
});
|
|
349
|
-
|
|
350
242
|
var iconStaticClassName = 'pop-icon';
|
|
351
243
|
var Icon = function (props) {
|
|
352
244
|
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
@@ -365,295 +257,6 @@ Icon.defaultProps = {
|
|
|
365
257
|
};
|
|
366
258
|
Icon.displayName = 'Icon';
|
|
367
259
|
|
|
368
|
-
var IconButton = forwardRef(function (props, ref) {
|
|
369
|
-
return React__default.createElement(MuiIconButton, __assign({ ref: ref }, props));
|
|
370
|
-
});
|
|
371
|
-
IconButton.displayName = 'IconButton';
|
|
372
|
-
IconButton.defaultProps = {
|
|
373
|
-
color: 'secondary',
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
var useTypographyStyles = makeStyles$1(function () { return ({
|
|
377
|
-
root: function (_a) {
|
|
378
|
-
var _b;
|
|
379
|
-
var weight = _a.weight;
|
|
380
|
-
return (__assign((_b = {}, _b["& ." + iconStaticClassName] = {
|
|
381
|
-
position: 'relative',
|
|
382
|
-
top: '0.125em',
|
|
383
|
-
padding: '0 0.125em',
|
|
384
|
-
boxSizing: 'content-box',
|
|
385
|
-
}, _b), (weight && { fontWeight: (weight === 'semi-bold' && 600) || (weight === 'bold' && 700) || 400 })));
|
|
386
|
-
},
|
|
387
|
-
caption: {
|
|
388
|
-
display: 'inline',
|
|
389
|
-
},
|
|
390
|
-
overline: {
|
|
391
|
-
display: 'inline',
|
|
392
|
-
},
|
|
393
|
-
}); });
|
|
394
|
-
|
|
395
|
-
var Typography = forwardRef(function (props, ref) {
|
|
396
|
-
props.weight; var restProps = __rest(props, ["weight"]);
|
|
397
|
-
var classes = useTypographyStyles(props);
|
|
398
|
-
return React__default.createElement(Typography$1, __assign({ ref: ref, classes: classes }, restProps));
|
|
399
|
-
});
|
|
400
|
-
Typography.displayName = 'Typography';
|
|
401
|
-
|
|
402
|
-
var useStyles$1 = makeStyles(function (_a) {
|
|
403
|
-
var spacing = _a.spacing;
|
|
404
|
-
return ({
|
|
405
|
-
root: {
|
|
406
|
-
'&:last-child': {
|
|
407
|
-
marginBottom: 0,
|
|
408
|
-
},
|
|
409
|
-
marginBottom: spacing(4),
|
|
410
|
-
padding: spacing(4),
|
|
411
|
-
},
|
|
412
|
-
});
|
|
413
|
-
});
|
|
414
|
-
var Paper = forwardRef(function (props, ref) {
|
|
415
|
-
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
416
|
-
var classes = useStyles$1(props);
|
|
417
|
-
return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
418
|
-
});
|
|
419
|
-
Paper.displayName = 'Paper';
|
|
420
|
-
Paper.defaultProps = {
|
|
421
|
-
legacyStyles: false,
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
var AUDIO_PLAYER_EVENT_TYPES;
|
|
425
|
-
(function (AUDIO_PLAYER_EVENT_TYPES) {
|
|
426
|
-
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_PLAYBACK"] = "TOGGLE_PLAYBACK";
|
|
427
|
-
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_VOLUME_CONTROL"] = "TOGGLE_VOLUME_CONTROL";
|
|
428
|
-
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_MUTE"] = "TOGGLE_MUTE";
|
|
429
|
-
AUDIO_PLAYER_EVENT_TYPES["VOLUME_CHANGE"] = "VOLUME_CHANGE";
|
|
430
|
-
AUDIO_PLAYER_EVENT_TYPES["TIME_CHANGE"] = "TIME_CHANGE";
|
|
431
|
-
AUDIO_PLAYER_EVENT_TYPES["DURATION_CHANGE"] = "DURATION_CHANGE";
|
|
432
|
-
AUDIO_PLAYER_EVENT_TYPES["SET_TIME"] = "SET_TIME";
|
|
433
|
-
AUDIO_PLAYER_EVENT_TYPES["CAN_PLAY"] = "CAN_PLAY";
|
|
434
|
-
AUDIO_PLAYER_EVENT_TYPES["RESET"] = "RESET";
|
|
435
|
-
})(AUDIO_PLAYER_EVENT_TYPES || (AUDIO_PLAYER_EVENT_TYPES = {}));
|
|
436
|
-
var PLAYBACK_STATES;
|
|
437
|
-
(function (PLAYBACK_STATES) {
|
|
438
|
-
PLAYBACK_STATES["NONE"] = "NONE";
|
|
439
|
-
PLAYBACK_STATES["PAUSED"] = "PAUSED";
|
|
440
|
-
PLAYBACK_STATES["PLAYING"] = "PLAYING";
|
|
441
|
-
})(PLAYBACK_STATES || (PLAYBACK_STATES = {}));
|
|
442
|
-
var CONTROL_LABELS;
|
|
443
|
-
(function (CONTROL_LABELS) {
|
|
444
|
-
CONTROL_LABELS["PAUSE"] = "PAUSE";
|
|
445
|
-
CONTROL_LABELS["PLAY"] = "PLAY";
|
|
446
|
-
CONTROL_LABELS["MUTE"] = "MUTE";
|
|
447
|
-
CONTROL_LABELS["UNMUTE"] = "UNMUTE";
|
|
448
|
-
})(CONTROL_LABELS || (CONTROL_LABELS = {}));
|
|
449
|
-
var VOLUME_CONTROL_STATES;
|
|
450
|
-
(function (VOLUME_CONTROL_STATES) {
|
|
451
|
-
VOLUME_CONTROL_STATES["SHOW"] = "SHOW";
|
|
452
|
-
VOLUME_CONTROL_STATES["HIDE"] = "HIDE";
|
|
453
|
-
})(VOLUME_CONTROL_STATES || (VOLUME_CONTROL_STATES = {}));
|
|
454
|
-
|
|
455
|
-
var initialAudioPlayerState = {
|
|
456
|
-
playback: PLAYBACK_STATES.NONE,
|
|
457
|
-
volumeControls: VOLUME_CONTROL_STATES.HIDE,
|
|
458
|
-
context: {
|
|
459
|
-
volume: 100,
|
|
460
|
-
playbackButtonLabel: CONTROL_LABELS.PLAY,
|
|
461
|
-
volumeButtonLabel: CONTROL_LABELS.MUTE,
|
|
462
|
-
},
|
|
463
|
-
};
|
|
464
|
-
var getPlayback = function (_a) {
|
|
465
|
-
var audio = _a.current;
|
|
466
|
-
var playback = PLAYBACK_STATES.NONE;
|
|
467
|
-
if (audio) {
|
|
468
|
-
var paused = audio.paused, readyState = audio.readyState;
|
|
469
|
-
if (readyState === 0) {
|
|
470
|
-
playback = PLAYBACK_STATES.NONE;
|
|
471
|
-
}
|
|
472
|
-
else if (paused) {
|
|
473
|
-
playback = PLAYBACK_STATES.PAUSED;
|
|
474
|
-
}
|
|
475
|
-
else {
|
|
476
|
-
playback = PLAYBACK_STATES.PLAYING;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
return playback;
|
|
480
|
-
};
|
|
481
|
-
var audioPlayerReducer = function (state, event) {
|
|
482
|
-
var _a, _b;
|
|
483
|
-
var audioRef = state.context.audioRef;
|
|
484
|
-
var nextState = __assign({}, state);
|
|
485
|
-
switch (state.playback) {
|
|
486
|
-
case PLAYBACK_STATES.NONE:
|
|
487
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.CAN_PLAY) {
|
|
488
|
-
nextState.playback = getPlayback(audioRef);
|
|
489
|
-
return nextState;
|
|
490
|
-
}
|
|
491
|
-
break;
|
|
492
|
-
case PLAYBACK_STATES.PAUSED:
|
|
493
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK) {
|
|
494
|
-
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
|
495
|
-
nextState.playback = getPlayback(audioRef);
|
|
496
|
-
nextState.context.playbackButtonLabel = CONTROL_LABELS.PAUSE;
|
|
497
|
-
return nextState;
|
|
498
|
-
}
|
|
499
|
-
break;
|
|
500
|
-
case PLAYBACK_STATES.PLAYING:
|
|
501
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK) {
|
|
502
|
-
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.pause();
|
|
503
|
-
nextState.playback = getPlayback(audioRef);
|
|
504
|
-
nextState.context.playbackButtonLabel = CONTROL_LABELS.PLAY;
|
|
505
|
-
return nextState;
|
|
506
|
-
}
|
|
507
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TIME_CHANGE) {
|
|
508
|
-
return nextState;
|
|
509
|
-
}
|
|
510
|
-
break;
|
|
511
|
-
}
|
|
512
|
-
switch (state.volumeControls) {
|
|
513
|
-
case VOLUME_CONTROL_STATES.SHOW:
|
|
514
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL) {
|
|
515
|
-
nextState.volumeControls = VOLUME_CONTROL_STATES.HIDE;
|
|
516
|
-
return nextState;
|
|
517
|
-
}
|
|
518
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.VOLUME_CHANGE) {
|
|
519
|
-
if (nextState.context.volume !== event.context.volume) {
|
|
520
|
-
nextState.context.volume = event.context.volume;
|
|
521
|
-
if (audioRef.current) {
|
|
522
|
-
audioRef.current.volume = event.context.volume;
|
|
523
|
-
}
|
|
524
|
-
return nextState;
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
break;
|
|
528
|
-
case VOLUME_CONTROL_STATES.HIDE:
|
|
529
|
-
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL) {
|
|
530
|
-
nextState.volumeControls = VOLUME_CONTROL_STATES.SHOW;
|
|
531
|
-
return nextState;
|
|
532
|
-
}
|
|
533
|
-
break;
|
|
534
|
-
}
|
|
535
|
-
switch (event.type) {
|
|
536
|
-
case AUDIO_PLAYER_EVENT_TYPES.TOGGLE_MUTE:
|
|
537
|
-
if (audioRef.current) {
|
|
538
|
-
audioRef.current.muted = !audioRef.current.muted;
|
|
539
|
-
return nextState;
|
|
540
|
-
}
|
|
541
|
-
break;
|
|
542
|
-
case AUDIO_PLAYER_EVENT_TYPES.SET_TIME:
|
|
543
|
-
if (audioRef.current) {
|
|
544
|
-
audioRef.current.currentTime = event.context.time;
|
|
545
|
-
return nextState;
|
|
546
|
-
}
|
|
547
|
-
break;
|
|
548
|
-
case AUDIO_PLAYER_EVENT_TYPES.RESET:
|
|
549
|
-
if (audioRef.current) {
|
|
550
|
-
audioRef.current.currentTime = 0;
|
|
551
|
-
nextState.playback = getPlayback(audioRef);
|
|
552
|
-
return nextState;
|
|
553
|
-
}
|
|
554
|
-
break;
|
|
555
|
-
}
|
|
556
|
-
return state;
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
var useVolumeIcon = function (state) {
|
|
560
|
-
var volumeIcon = SvgVolumeUp;
|
|
561
|
-
if (state.context.volume >= 0.5) {
|
|
562
|
-
volumeIcon = SvgVolumeUp;
|
|
563
|
-
}
|
|
564
|
-
else if (state.context.volume < 0.5 && state.context.volume > 0) {
|
|
565
|
-
volumeIcon = SvgVolumeDown;
|
|
566
|
-
}
|
|
567
|
-
else if (state.context.volume === 0) {
|
|
568
|
-
volumeIcon = SvgVolumeMute;
|
|
569
|
-
}
|
|
570
|
-
if (state.context.audioRef.current) {
|
|
571
|
-
if (state.context.audioRef.current.muted) {
|
|
572
|
-
volumeIcon = SvgVolumeOff;
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
return volumeIcon;
|
|
576
|
-
};
|
|
577
|
-
|
|
578
|
-
var appendZero = function (num) { return (num < 10 ? "0" + num : num); };
|
|
579
|
-
var formatTime = function (time, remaning) {
|
|
580
|
-
if (remaning === void 0) { remaning = false; }
|
|
581
|
-
var dateTime = new Date(0, 0, 0, 0, 0, time, 0);
|
|
582
|
-
var dateTimeH = appendZero(dateTime.getHours());
|
|
583
|
-
var dateTimeM = appendZero(dateTime.getMinutes());
|
|
584
|
-
var dateTimeS = appendZero(dateTime.getSeconds());
|
|
585
|
-
var minus = remaning ? '-' : '';
|
|
586
|
-
return dateTimeH > 0 ? "" + minus + dateTimeH + ":" + dateTimeM + ":" + dateTimeS : "" + minus + dateTimeM + ":" + dateTimeS;
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
var setupAudioRef = function (config) { return function () {
|
|
590
|
-
var _a, _b, _c, _d;
|
|
591
|
-
var audioRef = config.audioRef, send = config.send;
|
|
592
|
-
var handleDurationChange = function (event) {
|
|
593
|
-
var duration = event.target.duration;
|
|
594
|
-
send({ type: AUDIO_PLAYER_EVENT_TYPES.DURATION_CHANGE, context: { duration: duration } });
|
|
595
|
-
};
|
|
596
|
-
var handleTimeUpdate = function (event) {
|
|
597
|
-
var currentTime = event.target.currentTime;
|
|
598
|
-
send({ type: AUDIO_PLAYER_EVENT_TYPES.TIME_CHANGE, context: { currentTime: currentTime } });
|
|
599
|
-
};
|
|
600
|
-
var handleCanPlay = function () {
|
|
601
|
-
send({ type: AUDIO_PLAYER_EVENT_TYPES.CAN_PLAY });
|
|
602
|
-
};
|
|
603
|
-
var handleEnded = function () {
|
|
604
|
-
send({ type: AUDIO_PLAYER_EVENT_TYPES.RESET });
|
|
605
|
-
};
|
|
606
|
-
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('durationchange', handleDurationChange);
|
|
607
|
-
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('timeupdate', handleTimeUpdate);
|
|
608
|
-
(_c = audioRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('canplay', handleCanPlay);
|
|
609
|
-
(_d = audioRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('ended', handleEnded);
|
|
610
|
-
return function () {
|
|
611
|
-
var _a, _b, _c, _d;
|
|
612
|
-
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('durationchange', handleDurationChange);
|
|
613
|
-
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('timeupdate', handleTimeUpdate);
|
|
614
|
-
(_c = audioRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('canplay', handleCanPlay);
|
|
615
|
-
(_d = audioRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('ended', handleEnded);
|
|
616
|
-
};
|
|
617
|
-
}; };
|
|
618
|
-
|
|
619
|
-
var AudioPlayer = function (props) {
|
|
620
|
-
var _a, _b, _c, _d, _f;
|
|
621
|
-
var src = props.src, _g = props.classes, classes = _g === void 0 ? {} : _g;
|
|
622
|
-
var volumeRef = useRef(null);
|
|
623
|
-
var audioRef = useRef(null);
|
|
624
|
-
var spacing = useTheme().spacing;
|
|
625
|
-
var _h = useState(false), disableRipple = _h[0], setDisableRipple = _h[1];
|
|
626
|
-
var _j = useReducer(audioPlayerReducer, __assign(__assign({}, initialAudioPlayerState), { context: __assign(__assign({}, initialAudioPlayerState.context), { audioRef: audioRef }) })), state = _j[0], send = _j[1];
|
|
627
|
-
useEffect(setupAudioRef({ audioRef: audioRef, send: send }), [audioRef]);
|
|
628
|
-
var PlaybackIcon = state.playback !== PLAYBACK_STATES.PAUSED ? SvgPause : SvgPlay;
|
|
629
|
-
var VolumeIcon = useMemo(function () { return useVolumeIcon(state); }, [state.context.volume, (_a = state.context.audioRef.current) === null || _a === void 0 ? void 0 : _a.muted]);
|
|
630
|
-
var togglePlayback = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK }); };
|
|
631
|
-
var toggleVolumeControl = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL }); };
|
|
632
|
-
var toggleMute = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_MUTE }); };
|
|
633
|
-
var setTime = function (_e, time) { return send({ type: AUDIO_PLAYER_EVENT_TYPES.SET_TIME, context: { time: time } }); };
|
|
634
|
-
var setVolume = function (_e, volume) { return send({ type: AUDIO_PLAYER_EVENT_TYPES.VOLUME_CHANGE, context: { volume: volume } }); };
|
|
635
|
-
return (React__default.createElement(Box, { display: "flex", alignItems: "center", gridGap: spacing(1), className: classNames([classes.root]) },
|
|
636
|
-
React__default.createElement("audio", { ref: audioRef, src: src }),
|
|
637
|
-
React__default.createElement(Box, null,
|
|
638
|
-
React__default.createElement(IconButton, { classes: { root: classes.playbackToggle }, "aria-label": state.context.playbackButtonLabel, disabled: state.playback === PLAYBACK_STATES.NONE, onClick: togglePlayback },
|
|
639
|
-
React__default.createElement(Icon, { icon: PlaybackIcon })),
|
|
640
|
-
React__default.createElement(IconButton, { classes: { root: classes.volumeToggle }, "aria-label": state.context.volumeButtonLabel, ref: volumeRef, onClick: toggleMute, onMouseEnter: toggleVolumeControl, onMouseLeave: toggleVolumeControl, disableRipple: disableRipple },
|
|
641
|
-
React__default.createElement(Icon, { icon: VolumeIcon }),
|
|
642
|
-
React__default.createElement(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) {
|
|
643
|
-
var TransitionProps = _a.TransitionProps;
|
|
644
|
-
return (React__default.createElement(Grow, __assign({}, TransitionProps),
|
|
645
|
-
React__default.createElement(Paper, { elevation: 1 },
|
|
646
|
-
React__default.createElement(Box, { py: 1, height: 80 },
|
|
647
|
-
React__default.createElement(Slider, { color: "secondary", orientation: "vertical", value: state.context.volume, onChange: setVolume, max: 1, step: 0.01 })))));
|
|
648
|
-
}))),
|
|
649
|
-
React__default.createElement(Box, { display: "flex", flexGrow: 1, alignItems: "center", gridGap: spacing(1) },
|
|
650
|
-
React__default.createElement(Box, { flexBasis: 60, flexShrink: 0 },
|
|
651
|
-
React__default.createElement(Typography, { classes: { root: classes.playbackText } }, formatTime(((_b = state.context.audioRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0))),
|
|
652
|
-
React__default.createElement(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 }),
|
|
653
|
-
React__default.createElement(Box, { flexBasis: 60, flexShrink: 0, textAlign: "end" },
|
|
654
|
-
React__default.createElement(Typography, { classes: { root: classes.lengthText } }, formatTime(((_f = state.context.audioRef.current) === null || _f === void 0 ? void 0 : _f.duration) || 0))))));
|
|
655
|
-
};
|
|
656
|
-
|
|
657
260
|
var LoadingStatus;
|
|
658
261
|
(function (LoadingStatus) {
|
|
659
262
|
LoadingStatus["ERROR"] = "ERROR";
|
|
@@ -751,7 +354,7 @@ var Button = forwardRef(function (props, ref) {
|
|
|
751
354
|
props.textTransform; var loading = props.loading, classesOverride = props.classes, className = props.className, muiProps = __rest(props, ["textTransform", "loading", "classes", "className"]);
|
|
752
355
|
props.classes; var styleProps = __rest(props, ["classes"]);
|
|
753
356
|
var classes = useButtonStyles(styleProps);
|
|
754
|
-
var typography = useTheme
|
|
357
|
+
var typography = useTheme().typography;
|
|
755
358
|
var loadingIndicator = {
|
|
756
359
|
startIcon: React__default.createElement(CircularProgress, { color: "inherit", size: typography.button.fontSize }),
|
|
757
360
|
disabled: true,
|
|
@@ -767,6 +370,111 @@ var Checkbox = forwardRef(function (props, ref) {
|
|
|
767
370
|
});
|
|
768
371
|
Checkbox.displayName = 'Checkbox';
|
|
769
372
|
|
|
373
|
+
var weights = {
|
|
374
|
+
regular: 400,
|
|
375
|
+
'semi-bold': 600,
|
|
376
|
+
bold: 700,
|
|
377
|
+
};
|
|
378
|
+
var getColor = function (theme, props) {
|
|
379
|
+
var color = props.color;
|
|
380
|
+
if (color === undefined) {
|
|
381
|
+
return undefined;
|
|
382
|
+
}
|
|
383
|
+
if (['white', 'black'].includes(color)) {
|
|
384
|
+
return theme.palette.common[color];
|
|
385
|
+
}
|
|
386
|
+
if (color.match(/^grey\.\d{3}/)) {
|
|
387
|
+
var scale = color.split('.')[1];
|
|
388
|
+
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
389
|
+
}
|
|
390
|
+
if ([
|
|
391
|
+
'primary.light',
|
|
392
|
+
'primary.dark',
|
|
393
|
+
'secondary.light',
|
|
394
|
+
'secondary',
|
|
395
|
+
'secondary.dark',
|
|
396
|
+
'info.light',
|
|
397
|
+
'info.dark',
|
|
398
|
+
'success.light',
|
|
399
|
+
'success.dark',
|
|
400
|
+
'error.light',
|
|
401
|
+
'error.dark',
|
|
402
|
+
'warning.light',
|
|
403
|
+
'warning.dark',
|
|
404
|
+
].includes(color)) {
|
|
405
|
+
var _a = color.split('.'), paletteKey = _a[0], variant = _a[1];
|
|
406
|
+
return theme.palette[paletteKey][variant];
|
|
407
|
+
}
|
|
408
|
+
if (['success', 'info', 'error', 'warning', 'primary', 'secondary'].includes(color)) {
|
|
409
|
+
return theme.palette[color].main;
|
|
410
|
+
}
|
|
411
|
+
if (['textPrimary', 'textSecondary'].includes(color)) {
|
|
412
|
+
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
413
|
+
}
|
|
414
|
+
return undefined;
|
|
415
|
+
};
|
|
416
|
+
var useTypographyStyles = makeStyles$1(function (theme) {
|
|
417
|
+
var _a;
|
|
418
|
+
return ({
|
|
419
|
+
root: (_a = {},
|
|
420
|
+
_a["& ." + iconStaticClassName] = {
|
|
421
|
+
position: 'relative',
|
|
422
|
+
top: '0.125em',
|
|
423
|
+
padding: '0 0.125em',
|
|
424
|
+
boxSizing: 'content-box',
|
|
425
|
+
},
|
|
426
|
+
_a.fontFamily = theme.typography.fontFamily,
|
|
427
|
+
_a.fontWeight = function (_a) {
|
|
428
|
+
var variant = _a.variant, weight = _a.weight;
|
|
429
|
+
return (weight ? weights[weight] : theme.typography[variant || 'body1'].fontWeight);
|
|
430
|
+
},
|
|
431
|
+
_a.fontSize = function (_a) {
|
|
432
|
+
var variant = _a.variant;
|
|
433
|
+
return theme.typography[variant || 'body1'].fontSize;
|
|
434
|
+
},
|
|
435
|
+
_a.lineHeight = function (_a) {
|
|
436
|
+
var variant = _a.variant;
|
|
437
|
+
return theme.typography[variant || 'body1'].lineHeight;
|
|
438
|
+
},
|
|
439
|
+
_a.textTransform = function (_a) {
|
|
440
|
+
var variant = _a.variant;
|
|
441
|
+
return theme.typography[variant || 'body1'].textTransform;
|
|
442
|
+
},
|
|
443
|
+
_a.color = function (props) { return getColor(theme, props); },
|
|
444
|
+
_a),
|
|
445
|
+
caption: {
|
|
446
|
+
display: 'inline',
|
|
447
|
+
},
|
|
448
|
+
overline: {
|
|
449
|
+
display: 'inline',
|
|
450
|
+
},
|
|
451
|
+
});
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
var variantMap = {
|
|
455
|
+
h1: 'h1',
|
|
456
|
+
h2: 'h2',
|
|
457
|
+
h3: 'h3',
|
|
458
|
+
h4: 'h4',
|
|
459
|
+
h5: 'h5',
|
|
460
|
+
h6: 'h6',
|
|
461
|
+
h7: 'h6',
|
|
462
|
+
body1: 'p',
|
|
463
|
+
body2: 'p',
|
|
464
|
+
subtitle1: 'h6',
|
|
465
|
+
subtitle2: 'h6',
|
|
466
|
+
caption: 'span',
|
|
467
|
+
overline: 'span',
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
var Typography = forwardRef(function (props, ref) {
|
|
471
|
+
props.weight; var _a = props.variant, variant = _a === void 0 ? 'body1' : _a; props.color; var restProps = __rest(props, ["weight", "variant", "color"]);
|
|
472
|
+
var classes = useTypographyStyles(props);
|
|
473
|
+
var component = variantMap[variant];
|
|
474
|
+
return React__default.createElement(Typography$1, __assign({ component: component, ref: ref, classes: classes }, restProps, { variant: "inherit" }));
|
|
475
|
+
});
|
|
476
|
+
Typography.displayName = 'Typography';
|
|
477
|
+
|
|
770
478
|
var getFadeStop = function (_a, typographyVariant) {
|
|
771
479
|
var typography = _a.typography;
|
|
772
480
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
@@ -789,7 +497,7 @@ var CollapsibleText = function (props) {
|
|
|
789
497
|
var collapseState = useState(false);
|
|
790
498
|
var typographyRef = useRef(null);
|
|
791
499
|
var classes = useCollapsibleTextStyles(__assign(__assign({}, props), { previewLines: previewLines, typographyVariant: typographyVariant }));
|
|
792
|
-
var theme = useTheme();
|
|
500
|
+
var theme = useTheme$1();
|
|
793
501
|
var _c = props.collapseState ? props.collapseState : collapseState, collapsible = _c[0], setCollapsible = _c[1];
|
|
794
502
|
var typographyEntryLineHeightRem = parseFloat(theme.typography[typographyVariant].lineHeight);
|
|
795
503
|
var collapsedSizeRem = previewLines * typographyEntryLineHeightRem;
|
|
@@ -825,7 +533,7 @@ var SemanticColors;
|
|
|
825
533
|
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
826
534
|
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
827
535
|
})(SemanticColors || (SemanticColors = {}));
|
|
828
|
-
var useStyles = makeStyles(function (theme) { return ({
|
|
536
|
+
var useStyles$1 = makeStyles(function (theme) { return ({
|
|
829
537
|
dividerRoot: {
|
|
830
538
|
gap: theme.spacing(2),
|
|
831
539
|
},
|
|
@@ -863,7 +571,7 @@ var useStyles = makeStyles(function (theme) { return ({
|
|
|
863
571
|
}); });
|
|
864
572
|
var Divider = function (props) {
|
|
865
573
|
var className = props.className, text = props.text, textTransform = props.textTransform, TypographyProps = props.TypographyProps;
|
|
866
|
-
var classes = useStyles(props);
|
|
574
|
+
var classes = useStyles$1(props);
|
|
867
575
|
var casingOffset = textTransform === 'lowercase' ? '.25rem' : 'unset';
|
|
868
576
|
return (React__default.createElement(Box, { className: classNames([classes.dividerRoot, className]), display: "flex", alignItems: "center" },
|
|
869
577
|
React__default.createElement(Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset }),
|
|
@@ -876,6 +584,14 @@ Divider.defaultProps = {
|
|
|
876
584
|
textTransform: 'lowercase',
|
|
877
585
|
};
|
|
878
586
|
|
|
587
|
+
var IconButton = forwardRef(function (props, ref) {
|
|
588
|
+
return React__default.createElement(MuiIconButton, __assign({ ref: ref }, props));
|
|
589
|
+
});
|
|
590
|
+
IconButton.displayName = 'IconButton';
|
|
591
|
+
IconButton.defaultProps = {
|
|
592
|
+
color: 'secondary',
|
|
593
|
+
};
|
|
594
|
+
|
|
879
595
|
var useLinkStyles = makeStyles$1(function (theme) { return ({
|
|
880
596
|
root: function (props) {
|
|
881
597
|
var _a;
|
|
@@ -895,6 +611,28 @@ Link.defaultProps = {
|
|
|
895
611
|
};
|
|
896
612
|
Link.displayName = 'Link';
|
|
897
613
|
|
|
614
|
+
var useStyles = makeStyles(function (_a) {
|
|
615
|
+
var spacing = _a.spacing;
|
|
616
|
+
return ({
|
|
617
|
+
root: {
|
|
618
|
+
'&:last-child': {
|
|
619
|
+
marginBottom: 0,
|
|
620
|
+
},
|
|
621
|
+
marginBottom: spacing(4),
|
|
622
|
+
padding: spacing(4),
|
|
623
|
+
},
|
|
624
|
+
});
|
|
625
|
+
});
|
|
626
|
+
var Paper = forwardRef(function (props, ref) {
|
|
627
|
+
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
628
|
+
var classes = useStyles(props);
|
|
629
|
+
return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
630
|
+
});
|
|
631
|
+
Paper.displayName = 'Paper';
|
|
632
|
+
Paper.defaultProps = {
|
|
633
|
+
legacyStyles: false,
|
|
634
|
+
};
|
|
635
|
+
|
|
898
636
|
var PaperContent = function (props) {
|
|
899
637
|
var children = props.children;
|
|
900
638
|
return React__default.createElement(Box, { padding: 4 }, children);
|
|
@@ -1117,5 +855,5 @@ var useTabs = function (options) {
|
|
|
1117
855
|
};
|
|
1118
856
|
};
|
|
1119
857
|
|
|
1120
|
-
export {
|
|
858
|
+
export { Avatar, Button, Checkbox, CollapsibleText, Divider, Icon, IconButton, Link, NumberField, Paper, PaperContent, Radio, SplitInput, Switch, TabPanel, ToggleButton, ToggleButtonGroup, Tooltip, Typography, useCollapsibleText, useTabs };
|
|
1121
859
|
//# sourceMappingURL=index.es.js.map
|