@popmenu/table 0.24.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);
@@ -178,12 +178,12 @@ function __rest(s, e) {
178
178
  return t;
179
179
  }
180
180
 
181
- var _path$3k;
181
+ var _path$2P;
182
182
 
183
- function _extends$3B() { _extends$3B = 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$3B.apply(this, arguments); }
183
+ function _extends$33() { _extends$33 = 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$33.apply(this, arguments); }
184
184
 
185
185
  function SvgUser(props) {
186
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3B({
186
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$33({
187
187
  viewBox: "0 0 16 16",
188
188
  strokeLinecap: "round",
189
189
  strokeLinejoin: "round",
@@ -191,11 +191,47 @@ function SvgUser(props) {
191
191
  width: "1em",
192
192
  height: "1em",
193
193
  fill: "none"
194
- }, props), _path$3k || (_path$3k = /*#__PURE__*/React__namespace.createElement("path", {
194
+ }, props), _path$2P || (_path$2P = /*#__PURE__*/React__namespace.createElement("path", {
195
195
  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"
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));
@@ -756,12 +715,12 @@ var TableHeader = function (props) {
756
715
  return React__default['default'].createElement("thead", __assign$1({}, restProps), children);
757
716
  };
758
717
 
759
- var _path$3K;
718
+ var _path$4x;
760
719
 
761
- function _extends$3$() { _extends$3$ = 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$3$.apply(this, arguments); }
720
+ function _extends$4N() { _extends$4N = 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$4N.apply(this, arguments); }
762
721
 
763
- function SvgMore(props) {
764
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3$({
722
+ function SvgChevronDown(props) {
723
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4N({
765
724
  viewBox: "0 0 16 16",
766
725
  strokeLinecap: "round",
767
726
  strokeLinejoin: "round",
@@ -769,17 +728,17 @@ function SvgMore(props) {
769
728
  width: "1em",
770
729
  height: "1em",
771
730
  fill: "none"
772
- }, props), _path$3K || (_path$3K = /*#__PURE__*/React__namespace.createElement("path", {
773
- d: "M8 8.667a.667.667 0 100-1.334.667.667 0 000 1.334zM8 4a.667.667 0 100-1.333A.667.667 0 008 4zm0 9.333A.667.667 0 108 12a.667.667 0 000 1.333z"
731
+ }, props), _path$4x || (_path$4x = /*#__PURE__*/React__namespace.createElement("path", {
732
+ d: "M4 6l4 4 4-4"
774
733
  })));
775
734
  }
776
735
 
777
- var _path$3A;
736
+ var _path$4w;
778
737
 
779
- function _extends$3R() { _extends$3R = 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$3R.apply(this, arguments); }
738
+ function _extends$4M() { _extends$4M = 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$4M.apply(this, arguments); }
780
739
 
781
- function SvgSearch(props) {
782
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3R({
740
+ function SvgChevronUp(props) {
741
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4M({
783
742
  viewBox: "0 0 16 16",
784
743
  strokeLinecap: "round",
785
744
  strokeLinejoin: "round",
@@ -787,17 +746,17 @@ function SvgSearch(props) {
787
746
  width: "1em",
788
747
  height: "1em",
789
748
  fill: "none"
790
- }, props), _path$3A || (_path$3A = /*#__PURE__*/React__namespace.createElement("path", {
791
- d: "M7.333 12.667A5.333 5.333 0 107.333 2a5.333 5.333 0 000 10.667zM14 14l-2.9-2.9"
749
+ }, props), _path$4w || (_path$4w = /*#__PURE__*/React__namespace.createElement("path", {
750
+ d: "M12 10L8 6l-4 4"
792
751
  })));
793
752
  }
794
753
 
795
- var _path$2X;
754
+ var _path$3d;
796
755
 
797
- function _extends$3b() { _extends$3b = 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$3b.apply(this, arguments); }
756
+ 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); }
798
757
 
799
- function SvgChevronDown(props) {
800
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3b({
758
+ function SvgMore(props) {
759
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3t({
801
760
  viewBox: "0 0 16 16",
802
761
  strokeLinecap: "round",
803
762
  strokeLinejoin: "round",
@@ -805,17 +764,17 @@ function SvgChevronDown(props) {
805
764
  width: "1em",
806
765
  height: "1em",
807
766
  fill: "none"
808
- }, props), _path$2X || (_path$2X = /*#__PURE__*/React__namespace.createElement("path", {
809
- d: "M4 6l4 4 4-4"
767
+ }, props), _path$3d || (_path$3d = /*#__PURE__*/React__namespace.createElement("path", {
768
+ d: "M8 8.667a.667.667 0 100-1.334.667.667 0 000 1.334zM8 4a.667.667 0 100-1.334A.667.667 0 008 4zm0 9.333A.667.667 0 108 12a.667.667 0 000 1.333z"
810
769
  })));
811
770
  }
812
771
 
813
- var _path$2W;
772
+ var _path$33;
814
773
 
815
- function _extends$3a() { _extends$3a = 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$3a.apply(this, arguments); }
774
+ function _extends$3j() { _extends$3j = 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$3j.apply(this, arguments); }
816
775
 
817
- function SvgChevronUp(props) {
818
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3a({
776
+ function SvgSearch(props) {
777
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3j({
819
778
  viewBox: "0 0 16 16",
820
779
  strokeLinecap: "round",
821
780
  strokeLinejoin: "round",
@@ -823,8 +782,8 @@ function SvgChevronUp(props) {
823
782
  width: "1em",
824
783
  height: "1em",
825
784
  fill: "none"
826
- }, props), _path$2W || (_path$2W = /*#__PURE__*/React__namespace.createElement("path", {
827
- d: "M12 10L8 6l-4 4"
785
+ }, props), _path$33 || (_path$33 = /*#__PURE__*/React__namespace.createElement("path", {
786
+ d: "M7.333 12.667A5.333 5.333 0 107.333 2a5.333 5.333 0 000 10.667zM14 14l-2.9-2.9"
828
787
  })));
829
788
  }
830
789