@popmenu/common-ui 0.26.0 → 0.28.1
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 +205 -466
- package/build/index.es.js.map +1 -1
- package/build/index.js +200 -462
- package/build/index.js.map +1 -1
- package/package.json +3 -2
- package/CHANGELOG.md +0 -415
- 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,167 +89,95 @@ function __rest(s, e) {
|
|
|
89
89
|
return t;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
var _path$
|
|
92
|
+
var _path$2g;
|
|
93
93
|
|
|
94
|
-
function _extends$
|
|
94
|
+
function _extends$3t() { _extends$3t = 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$3t.apply(this, arguments); }
|
|
95
95
|
|
|
96
96
|
function SvgMinusCircle(props) {
|
|
97
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
97
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3t({
|
|
98
98
|
viewBox: "0 0 16 16",
|
|
99
|
+
fill: "none",
|
|
99
100
|
strokeLinecap: "round",
|
|
100
101
|
strokeLinejoin: "round",
|
|
101
|
-
stroke: "currentColor",
|
|
102
102
|
width: "1em",
|
|
103
|
-
height: "1em"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
height: "1em"
|
|
104
|
+
}, props), _path$2g || (_path$2g = /*#__PURE__*/React.createElement("path", {
|
|
105
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM5.333 8h5.334",
|
|
106
|
+
stroke: "currentColor"
|
|
107
107
|
})));
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
var _path$
|
|
110
|
+
var _path$28;
|
|
111
111
|
|
|
112
|
-
function _extends$
|
|
112
|
+
function _extends$3l() { _extends$3l = 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$3l.apply(this, arguments); }
|
|
113
113
|
|
|
114
114
|
function SvgPlusCircle(props) {
|
|
115
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
115
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3l({
|
|
116
116
|
viewBox: "0 0 16 16",
|
|
117
|
+
fill: "none",
|
|
117
118
|
strokeLinecap: "round",
|
|
118
119
|
strokeLinejoin: "round",
|
|
119
|
-
stroke: "currentColor",
|
|
120
120
|
width: "1em",
|
|
121
|
-
height: "1em"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
height: "1em"
|
|
122
|
+
}, props), _path$28 || (_path$28 = /*#__PURE__*/React.createElement("path", {
|
|
123
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-9.334v5.334M5.333 8h5.334",
|
|
124
|
+
stroke: "currentColor"
|
|
125
125
|
})));
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
var _path$
|
|
128
|
+
var _path$1W;
|
|
129
129
|
|
|
130
|
-
function _extends$
|
|
130
|
+
function _extends$31() { _extends$31 = 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$31.apply(this, arguments); }
|
|
131
131
|
|
|
132
132
|
function SvgUser(props) {
|
|
133
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
134
|
-
viewBox: "0 0 16 16",
|
|
135
|
-
strokeLinecap: "round",
|
|
136
|
-
strokeLinejoin: "round",
|
|
137
|
-
stroke: "currentColor",
|
|
138
|
-
width: "1em",
|
|
139
|
-
height: "1em",
|
|
140
|
-
fill: "none"
|
|
141
|
-
}, props), _path$2P || (_path$2P = /*#__PURE__*/React.createElement("path", {
|
|
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
|
-
})));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
var _path$1l;
|
|
147
|
-
|
|
148
|
-
function _extends$1p() { _extends$1p = 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$1p.apply(this, arguments); }
|
|
149
|
-
|
|
150
|
-
function SvgPause(props) {
|
|
151
|
-
return /*#__PURE__*/React.createElement("svg", _extends$1p({
|
|
152
|
-
viewBox: "0 0 16 16",
|
|
153
|
-
strokeLinecap: "round",
|
|
154
|
-
strokeLinejoin: "round",
|
|
155
|
-
stroke: "currentColor",
|
|
156
|
-
width: "1em",
|
|
157
|
-
height: "1em",
|
|
158
|
-
fill: "none"
|
|
159
|
-
}, props), _path$1l || (_path$1l = /*#__PURE__*/React.createElement("path", {
|
|
160
|
-
d: "M6.667 2.667H4v10.666h2.667V2.666zm5.333 0H9.333v10.666H12V2.666z"
|
|
161
|
-
})));
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
var _path$1j;
|
|
165
|
-
|
|
166
|
-
function _extends$1n() { _extends$1n = 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$1n.apply(this, arguments); }
|
|
167
|
-
|
|
168
|
-
function SvgPlay(props) {
|
|
169
|
-
return /*#__PURE__*/React.createElement("svg", _extends$1n({
|
|
170
|
-
viewBox: "0 0 16 16",
|
|
171
|
-
strokeLinecap: "round",
|
|
172
|
-
strokeLinejoin: "round",
|
|
173
|
-
stroke: "currentColor",
|
|
174
|
-
width: "1em",
|
|
175
|
-
height: "1em",
|
|
176
|
-
fill: "none"
|
|
177
|
-
}, props), _path$1j || (_path$1j = /*#__PURE__*/React.createElement("path", {
|
|
178
|
-
d: "M3.333 2l9.334 6-9.334 6V2z"
|
|
179
|
-
})));
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
var _path$16;
|
|
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$16 || (_path$16 = /*#__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.714"
|
|
197
|
-
})));
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
var _path$15;
|
|
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({
|
|
133
|
+
return /*#__PURE__*/React.createElement("svg", _extends$31({
|
|
206
134
|
viewBox: "0 0 16 16",
|
|
135
|
+
fill: "none",
|
|
207
136
|
strokeLinecap: "round",
|
|
208
137
|
strokeLinejoin: "round",
|
|
209
|
-
stroke: "currentColor",
|
|
210
138
|
width: "1em",
|
|
211
|
-
height: "1em"
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
139
|
+
height: "1em"
|
|
140
|
+
}, props), _path$1W || (_path$1W = /*#__PURE__*/React.createElement("path", {
|
|
141
|
+
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",
|
|
142
|
+
stroke: "currentColor"
|
|
215
143
|
})));
|
|
216
144
|
}
|
|
217
145
|
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
var
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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,112 @@ 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 validatedVariant = Object.keys(variantMap).includes(variant) ? variant : 'body1';
|
|
473
|
+
var classes = useTypographyStyles(__assign(__assign({}, props), { variant: validatedVariant }));
|
|
474
|
+
var component = variantMap[validatedVariant];
|
|
475
|
+
return React__default.createElement(Typography$1, __assign({ component: component, ref: ref, classes: classes }, restProps, { variant: "inherit" }));
|
|
476
|
+
});
|
|
477
|
+
Typography.displayName = 'Typography';
|
|
478
|
+
|
|
770
479
|
var getFadeStop = function (_a, typographyVariant) {
|
|
771
480
|
var typography = _a.typography;
|
|
772
481
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
@@ -789,7 +498,7 @@ var CollapsibleText = function (props) {
|
|
|
789
498
|
var collapseState = useState(false);
|
|
790
499
|
var typographyRef = useRef(null);
|
|
791
500
|
var classes = useCollapsibleTextStyles(__assign(__assign({}, props), { previewLines: previewLines, typographyVariant: typographyVariant }));
|
|
792
|
-
var theme = useTheme();
|
|
501
|
+
var theme = useTheme$1();
|
|
793
502
|
var _c = props.collapseState ? props.collapseState : collapseState, collapsible = _c[0], setCollapsible = _c[1];
|
|
794
503
|
var typographyEntryLineHeightRem = parseFloat(theme.typography[typographyVariant].lineHeight);
|
|
795
504
|
var collapsedSizeRem = previewLines * typographyEntryLineHeightRem;
|
|
@@ -825,7 +534,7 @@ var SemanticColors;
|
|
|
825
534
|
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
826
535
|
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
827
536
|
})(SemanticColors || (SemanticColors = {}));
|
|
828
|
-
var useStyles = makeStyles(function (theme) { return ({
|
|
537
|
+
var useStyles$1 = makeStyles(function (theme) { return ({
|
|
829
538
|
dividerRoot: {
|
|
830
539
|
gap: theme.spacing(2),
|
|
831
540
|
},
|
|
@@ -863,7 +572,7 @@ var useStyles = makeStyles(function (theme) { return ({
|
|
|
863
572
|
}); });
|
|
864
573
|
var Divider = function (props) {
|
|
865
574
|
var className = props.className, text = props.text, textTransform = props.textTransform, TypographyProps = props.TypographyProps;
|
|
866
|
-
var classes = useStyles(props);
|
|
575
|
+
var classes = useStyles$1(props);
|
|
867
576
|
var casingOffset = textTransform === 'lowercase' ? '.25rem' : 'unset';
|
|
868
577
|
return (React__default.createElement(Box, { className: classNames([classes.dividerRoot, className]), display: "flex", alignItems: "center" },
|
|
869
578
|
React__default.createElement(Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset }),
|
|
@@ -876,6 +585,14 @@ Divider.defaultProps = {
|
|
|
876
585
|
textTransform: 'lowercase',
|
|
877
586
|
};
|
|
878
587
|
|
|
588
|
+
var IconButton = forwardRef(function (props, ref) {
|
|
589
|
+
return React__default.createElement(MuiIconButton, __assign({ ref: ref }, props));
|
|
590
|
+
});
|
|
591
|
+
IconButton.displayName = 'IconButton';
|
|
592
|
+
IconButton.defaultProps = {
|
|
593
|
+
color: 'secondary',
|
|
594
|
+
};
|
|
595
|
+
|
|
879
596
|
var useLinkStyles = makeStyles$1(function (theme) { return ({
|
|
880
597
|
root: function (props) {
|
|
881
598
|
var _a;
|
|
@@ -895,6 +612,28 @@ Link.defaultProps = {
|
|
|
895
612
|
};
|
|
896
613
|
Link.displayName = 'Link';
|
|
897
614
|
|
|
615
|
+
var useStyles = makeStyles(function (_a) {
|
|
616
|
+
var spacing = _a.spacing;
|
|
617
|
+
return ({
|
|
618
|
+
root: {
|
|
619
|
+
'&:last-child': {
|
|
620
|
+
marginBottom: 0,
|
|
621
|
+
},
|
|
622
|
+
marginBottom: spacing(4),
|
|
623
|
+
padding: spacing(4),
|
|
624
|
+
},
|
|
625
|
+
});
|
|
626
|
+
});
|
|
627
|
+
var Paper = forwardRef(function (props, ref) {
|
|
628
|
+
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
629
|
+
var classes = useStyles(props);
|
|
630
|
+
return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
631
|
+
});
|
|
632
|
+
Paper.displayName = 'Paper';
|
|
633
|
+
Paper.defaultProps = {
|
|
634
|
+
legacyStyles: false,
|
|
635
|
+
};
|
|
636
|
+
|
|
898
637
|
var PaperContent = function (props) {
|
|
899
638
|
var children = props.children;
|
|
900
639
|
return React__default.createElement(Box, { padding: 4 }, children);
|
|
@@ -1117,5 +856,5 @@ var useTabs = function (options) {
|
|
|
1117
856
|
};
|
|
1118
857
|
};
|
|
1119
858
|
|
|
1120
|
-
export {
|
|
859
|
+
export { Avatar, Button, Checkbox, CollapsibleText, Divider, Icon, IconButton, Link, NumberField, Paper, PaperContent, Radio, SplitInput, Switch, TabPanel, ToggleButton, ToggleButtonGroup, Tooltip, Typography, useCollapsibleText, useTabs };
|
|
1121
860
|
//# sourceMappingURL=index.es.js.map
|