@popmenu/table 0.26.0 → 0.27.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.js CHANGED
@@ -11,9 +11,8 @@ var lab = require('@material-ui/lab');
11
11
  require('@material-ui/lab/Alert');
12
12
  var core = require('@material-ui/core');
13
13
  require('@material-ui/core/AppBar');
14
- var MuiIconButton = require('@material-ui/core/IconButton');
15
- var styles = require('@material-ui/core/styles');
16
14
  var MuiAvatar = require('@material-ui/core/Avatar');
15
+ var styles = require('@material-ui/core/styles');
17
16
  require('@material-ui/core/Badge');
18
17
  var MuiButton = require('@material-ui/core/Button');
19
18
  var CircularProgress = require('@material-ui/core/CircularProgress');
@@ -35,6 +34,7 @@ require('@material-ui/core/DialogTitle');
35
34
  require('@material-ui/core/Drawer');
36
35
  require('@material-ui/core/FormControl');
37
36
  require('@material-ui/core/Grid');
37
+ var MuiIconButton = require('@material-ui/core/IconButton');
38
38
  require('@material-ui/core/InputAdornment');
39
39
  require('@material-ui/core/LinearProgress');
40
40
  require('@material-ui/core/List');
@@ -78,12 +78,12 @@ function _interopNamespace(e) {
78
78
 
79
79
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
80
80
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
81
- var MuiIconButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiIconButton);
82
81
  var MuiAvatar__default = /*#__PURE__*/_interopDefaultLegacy(MuiAvatar);
83
82
  var MuiButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiButton);
84
83
  var CircularProgress__default = /*#__PURE__*/_interopDefaultLegacy(CircularProgress);
85
84
  var MuiCheckbox__default = /*#__PURE__*/_interopDefaultLegacy(MuiCheckbox);
86
85
  var FormControlLabel__default = /*#__PURE__*/_interopDefaultLegacy(FormControlLabel);
86
+ var MuiIconButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiIconButton);
87
87
  var Menu__default = /*#__PURE__*/_interopDefaultLegacy(Menu);
88
88
  var MenuItem__default = /*#__PURE__*/_interopDefaultLegacy(MenuItem);
89
89
  var MuiRadio__default = /*#__PURE__*/_interopDefaultLegacy(MuiRadio);
@@ -196,6 +196,42 @@ function SvgUser(props) {
196
196
  })));
197
197
  }
198
198
 
199
+ var useIconStyles = core.makeStyles(function (_a) {
200
+ var spacing = _a.spacing, palette = _a.palette;
201
+ var getFontSize = function (_a) {
202
+ var size = _a.size;
203
+ var sizes = {
204
+ inherit: 'inherit',
205
+ small: spacing(1.5),
206
+ medium: spacing(2),
207
+ large: spacing(2.5),
208
+ 'extra-large': spacing(3),
209
+ };
210
+ return size ? sizes[size] : 'inherit';
211
+ };
212
+ var getColor = function (props) {
213
+ var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
214
+ var value = 'inherit';
215
+ if (props.color) {
216
+ if (semanticColors.includes(props.color.split('.')[0])) {
217
+ var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
218
+ value = palette[color][variant];
219
+ }
220
+ else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
221
+ value = props.color;
222
+ }
223
+ }
224
+ return value;
225
+ };
226
+ return {
227
+ root: {
228
+ color: getColor,
229
+ fontSize: getFontSize,
230
+ strokeWidth: '1.3px',
231
+ },
232
+ };
233
+ });
234
+
199
235
  var classnames = {exports: {}};
200
236
 
201
237
  /*!
@@ -256,42 +292,6 @@ var classnames = {exports: {}};
256
292
 
257
293
  var classNames = classnames.exports;
258
294
 
259
- var useIconStyles = core.makeStyles(function (_a) {
260
- var spacing = _a.spacing, palette = _a.palette;
261
- var getFontSize = function (_a) {
262
- var size = _a.size;
263
- var sizes = {
264
- inherit: 'inherit',
265
- small: spacing(1.5),
266
- medium: spacing(2),
267
- large: spacing(2.5),
268
- 'extra-large': spacing(3),
269
- };
270
- return size ? sizes[size] : 'inherit';
271
- };
272
- var getColor = function (props) {
273
- var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
274
- var value = 'inherit';
275
- if (props.color) {
276
- if (semanticColors.includes(props.color.split('.')[0])) {
277
- var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
278
- value = palette[color][variant];
279
- }
280
- else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
281
- value = props.color;
282
- }
283
- }
284
- return value;
285
- };
286
- return {
287
- root: {
288
- color: getColor,
289
- fontSize: getFontSize,
290
- strokeWidth: '1.3px',
291
- },
292
- };
293
- });
294
-
295
295
  var iconStaticClassName = 'pop-icon';
296
296
  var Icon = function (props) {
297
297
  var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
@@ -310,103 +310,6 @@ Icon.defaultProps = {
310
310
  };
311
311
  Icon.displayName = 'Icon';
312
312
 
313
- var IconButton = React.forwardRef(function (props, ref) {
314
- return React__default['default'].createElement(MuiIconButton__default['default'], __assign({ ref: ref }, props));
315
- });
316
- IconButton.displayName = 'IconButton';
317
- IconButton.defaultProps = {
318
- color: 'secondary',
319
- };
320
-
321
- var useTypographyStyles = styles.makeStyles(function () { return ({
322
- root: function (_a) {
323
- var _b;
324
- var weight = _a.weight;
325
- return (__assign((_b = {}, _b["& ." + iconStaticClassName] = {
326
- position: 'relative',
327
- top: '0.125em',
328
- padding: '0 0.125em',
329
- boxSizing: 'content-box',
330
- }, _b), (weight && { fontWeight: (weight === 'semi-bold' && 600) || (weight === 'bold' && 700) || 400 })));
331
- },
332
- caption: {
333
- display: 'inline',
334
- },
335
- overline: {
336
- display: 'inline',
337
- },
338
- }); });
339
-
340
- var Typography = React.forwardRef(function (props, ref) {
341
- props.weight; var restProps = __rest(props, ["weight"]);
342
- var classes = useTypographyStyles(props);
343
- return React__default['default'].createElement(core.Typography, __assign({ ref: ref, classes: classes }, restProps));
344
- });
345
- Typography.displayName = 'Typography';
346
-
347
- var useStyles$1 = core.makeStyles(function (_a) {
348
- var spacing = _a.spacing;
349
- return ({
350
- root: {
351
- '&:last-child': {
352
- marginBottom: 0,
353
- },
354
- marginBottom: spacing(4),
355
- padding: spacing(4),
356
- },
357
- });
358
- });
359
- var Paper = React.forwardRef(function (props, ref) {
360
- var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
361
- var classes = useStyles$1(props);
362
- return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
363
- });
364
- Paper.displayName = 'Paper';
365
- Paper.defaultProps = {
366
- legacyStyles: false,
367
- };
368
-
369
- var AUDIO_PLAYER_EVENT_TYPES;
370
- (function (AUDIO_PLAYER_EVENT_TYPES) {
371
- AUDIO_PLAYER_EVENT_TYPES["TOGGLE_PLAYBACK"] = "TOGGLE_PLAYBACK";
372
- AUDIO_PLAYER_EVENT_TYPES["TOGGLE_VOLUME_CONTROL"] = "TOGGLE_VOLUME_CONTROL";
373
- AUDIO_PLAYER_EVENT_TYPES["TOGGLE_MUTE"] = "TOGGLE_MUTE";
374
- AUDIO_PLAYER_EVENT_TYPES["VOLUME_CHANGE"] = "VOLUME_CHANGE";
375
- AUDIO_PLAYER_EVENT_TYPES["TIME_CHANGE"] = "TIME_CHANGE";
376
- AUDIO_PLAYER_EVENT_TYPES["DURATION_CHANGE"] = "DURATION_CHANGE";
377
- AUDIO_PLAYER_EVENT_TYPES["SET_TIME"] = "SET_TIME";
378
- AUDIO_PLAYER_EVENT_TYPES["CAN_PLAY"] = "CAN_PLAY";
379
- AUDIO_PLAYER_EVENT_TYPES["RESET"] = "RESET";
380
- })(AUDIO_PLAYER_EVENT_TYPES || (AUDIO_PLAYER_EVENT_TYPES = {}));
381
- var PLAYBACK_STATES;
382
- (function (PLAYBACK_STATES) {
383
- PLAYBACK_STATES["NONE"] = "NONE";
384
- PLAYBACK_STATES["PAUSED"] = "PAUSED";
385
- PLAYBACK_STATES["PLAYING"] = "PLAYING";
386
- })(PLAYBACK_STATES || (PLAYBACK_STATES = {}));
387
- var CONTROL_LABELS;
388
- (function (CONTROL_LABELS) {
389
- CONTROL_LABELS["PAUSE"] = "PAUSE";
390
- CONTROL_LABELS["PLAY"] = "PLAY";
391
- CONTROL_LABELS["MUTE"] = "MUTE";
392
- CONTROL_LABELS["UNMUTE"] = "UNMUTE";
393
- })(CONTROL_LABELS || (CONTROL_LABELS = {}));
394
- var VOLUME_CONTROL_STATES;
395
- (function (VOLUME_CONTROL_STATES) {
396
- VOLUME_CONTROL_STATES["SHOW"] = "SHOW";
397
- VOLUME_CONTROL_STATES["HIDE"] = "HIDE";
398
- })(VOLUME_CONTROL_STATES || (VOLUME_CONTROL_STATES = {}));
399
-
400
- ({
401
- playback: PLAYBACK_STATES.NONE,
402
- volumeControls: VOLUME_CONTROL_STATES.HIDE,
403
- context: {
404
- volume: 100,
405
- playbackButtonLabel: CONTROL_LABELS.PLAY,
406
- volumeButtonLabel: CONTROL_LABELS.MUTE,
407
- },
408
- });
409
-
410
313
  var LoadingStatus;
411
314
  (function (LoadingStatus) {
412
315
  LoadingStatus["ERROR"] = "ERROR";
@@ -520,6 +423,32 @@ var Checkbox = React.forwardRef(function (props, ref) {
520
423
  });
521
424
  Checkbox.displayName = 'Checkbox';
522
425
 
426
+ var useTypographyStyles = styles.makeStyles(function () { return ({
427
+ root: function (_a) {
428
+ var _b;
429
+ var weight = _a.weight;
430
+ return (__assign((_b = {}, _b["& ." + iconStaticClassName] = {
431
+ position: 'relative',
432
+ top: '0.125em',
433
+ padding: '0 0.125em',
434
+ boxSizing: 'content-box',
435
+ }, _b), (weight && { fontWeight: (weight === 'semi-bold' && 600) || (weight === 'bold' && 700) || 400 })));
436
+ },
437
+ caption: {
438
+ display: 'inline',
439
+ },
440
+ overline: {
441
+ display: 'inline',
442
+ },
443
+ }); });
444
+
445
+ var Typography = React.forwardRef(function (props, ref) {
446
+ props.weight; var restProps = __rest(props, ["weight"]);
447
+ var classes = useTypographyStyles(props);
448
+ return React__default['default'].createElement(core.Typography, __assign({ ref: ref, classes: classes }, restProps));
449
+ });
450
+ Typography.displayName = 'Typography';
451
+
523
452
  var getFadeStop = function (_a, typographyVariant) {
524
453
  var typography = _a.typography;
525
454
  return !isNaN(Number(typography[typographyVariant].lineHeight))
@@ -583,6 +512,14 @@ core.makeStyles(function (theme) { return ({
583
512
  },
584
513
  }); });
585
514
 
515
+ var IconButton = React.forwardRef(function (props, ref) {
516
+ return React__default['default'].createElement(MuiIconButton__default['default'], __assign({ ref: ref }, props));
517
+ });
518
+ IconButton.displayName = 'IconButton';
519
+ IconButton.defaultProps = {
520
+ color: 'secondary',
521
+ };
522
+
586
523
  var useLinkStyles = styles.makeStyles(function (theme) { return ({
587
524
  root: function (props) {
588
525
  var _a;
@@ -602,6 +539,28 @@ Link.defaultProps = {
602
539
  };
603
540
  Link.displayName = 'Link';
604
541
 
542
+ var useStyles = core.makeStyles(function (_a) {
543
+ var spacing = _a.spacing;
544
+ return ({
545
+ root: {
546
+ '&:last-child': {
547
+ marginBottom: 0,
548
+ },
549
+ marginBottom: spacing(4),
550
+ padding: spacing(4),
551
+ },
552
+ });
553
+ });
554
+ var Paper = React.forwardRef(function (props, ref) {
555
+ var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
556
+ var classes = useStyles(props);
557
+ return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
558
+ });
559
+ Paper.displayName = 'Paper';
560
+ Paper.defaultProps = {
561
+ legacyStyles: false,
562
+ };
563
+
605
564
  var Radio = React.forwardRef(function (props, ref) {
606
565
  var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
607
566
  var control = React__default['default'].createElement(MuiRadio__default['default'], __assign({ disabled: label ? undefined : disabled }, muiProps));