@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.es.js CHANGED
@@ -6,11 +6,10 @@ import { useSortBy } from 'react-table/src/plugin-hooks/useSortBy.js';
6
6
  import { useGlobalFilter } from 'react-table/src/plugin-hooks/useGlobalFilter.js';
7
7
  import { Pagination } from '@material-ui/lab';
8
8
  import '@material-ui/lab/Alert';
9
- import { makeStyles, Typography as Typography$1, Paper as Paper$1, Link as Link$1, Box, useTheme as useTheme$1, TextField, InputAdornment } from '@material-ui/core';
9
+ import { makeStyles, Typography as Typography$1, Link as Link$1, Paper as Paper$1, Box, useTheme as useTheme$1, TextField, InputAdornment } from '@material-ui/core';
10
10
  import '@material-ui/core/AppBar';
11
- import MuiIconButton from '@material-ui/core/IconButton';
12
- import { makeStyles as makeStyles$1, useTheme } from '@material-ui/core/styles';
13
11
  import MuiAvatar from '@material-ui/core/Avatar';
12
+ import { makeStyles as makeStyles$1, useTheme } from '@material-ui/core/styles';
14
13
  import '@material-ui/core/Badge';
15
14
  import MuiButton from '@material-ui/core/Button';
16
15
  import CircularProgress from '@material-ui/core/CircularProgress';
@@ -32,6 +31,7 @@ import '@material-ui/core/DialogTitle';
32
31
  import '@material-ui/core/Drawer';
33
32
  import '@material-ui/core/FormControl';
34
33
  import '@material-ui/core/Grid';
34
+ import MuiIconButton from '@material-ui/core/IconButton';
35
35
  import '@material-ui/core/InputAdornment';
36
36
  import '@material-ui/core/LinearProgress';
37
37
  import '@material-ui/core/List';
@@ -137,12 +137,12 @@ function __rest(s, e) {
137
137
  return t;
138
138
  }
139
139
 
140
- var _path$3k;
140
+ var _path$2P;
141
141
 
142
- 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); }
142
+ 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); }
143
143
 
144
144
  function SvgUser(props) {
145
- return /*#__PURE__*/React.createElement("svg", _extends$3B({
145
+ return /*#__PURE__*/React.createElement("svg", _extends$33({
146
146
  viewBox: "0 0 16 16",
147
147
  strokeLinecap: "round",
148
148
  strokeLinejoin: "round",
@@ -150,11 +150,47 @@ function SvgUser(props) {
150
150
  width: "1em",
151
151
  height: "1em",
152
152
  fill: "none"
153
- }, props), _path$3k || (_path$3k = /*#__PURE__*/React.createElement("path", {
153
+ }, props), _path$2P || (_path$2P = /*#__PURE__*/React.createElement("path", {
154
154
  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"
155
155
  })));
156
156
  }
157
157
 
158
+ var useIconStyles = makeStyles(function (_a) {
159
+ var spacing = _a.spacing, palette = _a.palette;
160
+ var getFontSize = function (_a) {
161
+ var size = _a.size;
162
+ var sizes = {
163
+ inherit: 'inherit',
164
+ small: spacing(1.5),
165
+ medium: spacing(2),
166
+ large: spacing(2.5),
167
+ 'extra-large': spacing(3),
168
+ };
169
+ return size ? sizes[size] : 'inherit';
170
+ };
171
+ var getColor = function (props) {
172
+ var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
173
+ var value = 'inherit';
174
+ if (props.color) {
175
+ if (semanticColors.includes(props.color.split('.')[0])) {
176
+ var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
177
+ value = palette[color][variant];
178
+ }
179
+ else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
180
+ value = props.color;
181
+ }
182
+ }
183
+ return value;
184
+ };
185
+ return {
186
+ root: {
187
+ color: getColor,
188
+ fontSize: getFontSize,
189
+ strokeWidth: '1.3px',
190
+ },
191
+ };
192
+ });
193
+
158
194
  var classnames = {exports: {}};
159
195
 
160
196
  /*!
@@ -215,42 +251,6 @@ var classnames = {exports: {}};
215
251
 
216
252
  var classNames = classnames.exports;
217
253
 
218
- var useIconStyles = makeStyles(function (_a) {
219
- var spacing = _a.spacing, palette = _a.palette;
220
- var getFontSize = function (_a) {
221
- var size = _a.size;
222
- var sizes = {
223
- inherit: 'inherit',
224
- small: spacing(1.5),
225
- medium: spacing(2),
226
- large: spacing(2.5),
227
- 'extra-large': spacing(3),
228
- };
229
- return size ? sizes[size] : 'inherit';
230
- };
231
- var getColor = function (props) {
232
- var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
233
- var value = 'inherit';
234
- if (props.color) {
235
- if (semanticColors.includes(props.color.split('.')[0])) {
236
- var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
237
- value = palette[color][variant];
238
- }
239
- else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
240
- value = props.color;
241
- }
242
- }
243
- return value;
244
- };
245
- return {
246
- root: {
247
- color: getColor,
248
- fontSize: getFontSize,
249
- strokeWidth: '1.3px',
250
- },
251
- };
252
- });
253
-
254
254
  var iconStaticClassName = 'pop-icon';
255
255
  var Icon = function (props) {
256
256
  var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
@@ -269,103 +269,6 @@ Icon.defaultProps = {
269
269
  };
270
270
  Icon.displayName = 'Icon';
271
271
 
272
- var IconButton = forwardRef(function (props, ref) {
273
- return React__default.createElement(MuiIconButton, __assign({ ref: ref }, props));
274
- });
275
- IconButton.displayName = 'IconButton';
276
- IconButton.defaultProps = {
277
- color: 'secondary',
278
- };
279
-
280
- var useTypographyStyles = makeStyles$1(function () { return ({
281
- root: function (_a) {
282
- var _b;
283
- var weight = _a.weight;
284
- return (__assign((_b = {}, _b["& ." + iconStaticClassName] = {
285
- position: 'relative',
286
- top: '0.125em',
287
- padding: '0 0.125em',
288
- boxSizing: 'content-box',
289
- }, _b), (weight && { fontWeight: (weight === 'semi-bold' && 600) || (weight === 'bold' && 700) || 400 })));
290
- },
291
- caption: {
292
- display: 'inline',
293
- },
294
- overline: {
295
- display: 'inline',
296
- },
297
- }); });
298
-
299
- var Typography = forwardRef(function (props, ref) {
300
- props.weight; var restProps = __rest(props, ["weight"]);
301
- var classes = useTypographyStyles(props);
302
- return React__default.createElement(Typography$1, __assign({ ref: ref, classes: classes }, restProps));
303
- });
304
- Typography.displayName = 'Typography';
305
-
306
- var useStyles$1 = makeStyles(function (_a) {
307
- var spacing = _a.spacing;
308
- return ({
309
- root: {
310
- '&:last-child': {
311
- marginBottom: 0,
312
- },
313
- marginBottom: spacing(4),
314
- padding: spacing(4),
315
- },
316
- });
317
- });
318
- var Paper = forwardRef(function (props, ref) {
319
- var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
320
- var classes = useStyles$1(props);
321
- return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
322
- });
323
- Paper.displayName = 'Paper';
324
- Paper.defaultProps = {
325
- legacyStyles: false,
326
- };
327
-
328
- var AUDIO_PLAYER_EVENT_TYPES;
329
- (function (AUDIO_PLAYER_EVENT_TYPES) {
330
- AUDIO_PLAYER_EVENT_TYPES["TOGGLE_PLAYBACK"] = "TOGGLE_PLAYBACK";
331
- AUDIO_PLAYER_EVENT_TYPES["TOGGLE_VOLUME_CONTROL"] = "TOGGLE_VOLUME_CONTROL";
332
- AUDIO_PLAYER_EVENT_TYPES["TOGGLE_MUTE"] = "TOGGLE_MUTE";
333
- AUDIO_PLAYER_EVENT_TYPES["VOLUME_CHANGE"] = "VOLUME_CHANGE";
334
- AUDIO_PLAYER_EVENT_TYPES["TIME_CHANGE"] = "TIME_CHANGE";
335
- AUDIO_PLAYER_EVENT_TYPES["DURATION_CHANGE"] = "DURATION_CHANGE";
336
- AUDIO_PLAYER_EVENT_TYPES["SET_TIME"] = "SET_TIME";
337
- AUDIO_PLAYER_EVENT_TYPES["CAN_PLAY"] = "CAN_PLAY";
338
- AUDIO_PLAYER_EVENT_TYPES["RESET"] = "RESET";
339
- })(AUDIO_PLAYER_EVENT_TYPES || (AUDIO_PLAYER_EVENT_TYPES = {}));
340
- var PLAYBACK_STATES;
341
- (function (PLAYBACK_STATES) {
342
- PLAYBACK_STATES["NONE"] = "NONE";
343
- PLAYBACK_STATES["PAUSED"] = "PAUSED";
344
- PLAYBACK_STATES["PLAYING"] = "PLAYING";
345
- })(PLAYBACK_STATES || (PLAYBACK_STATES = {}));
346
- var CONTROL_LABELS;
347
- (function (CONTROL_LABELS) {
348
- CONTROL_LABELS["PAUSE"] = "PAUSE";
349
- CONTROL_LABELS["PLAY"] = "PLAY";
350
- CONTROL_LABELS["MUTE"] = "MUTE";
351
- CONTROL_LABELS["UNMUTE"] = "UNMUTE";
352
- })(CONTROL_LABELS || (CONTROL_LABELS = {}));
353
- var VOLUME_CONTROL_STATES;
354
- (function (VOLUME_CONTROL_STATES) {
355
- VOLUME_CONTROL_STATES["SHOW"] = "SHOW";
356
- VOLUME_CONTROL_STATES["HIDE"] = "HIDE";
357
- })(VOLUME_CONTROL_STATES || (VOLUME_CONTROL_STATES = {}));
358
-
359
- ({
360
- playback: PLAYBACK_STATES.NONE,
361
- volumeControls: VOLUME_CONTROL_STATES.HIDE,
362
- context: {
363
- volume: 100,
364
- playbackButtonLabel: CONTROL_LABELS.PLAY,
365
- volumeButtonLabel: CONTROL_LABELS.MUTE,
366
- },
367
- });
368
-
369
272
  var LoadingStatus;
370
273
  (function (LoadingStatus) {
371
274
  LoadingStatus["ERROR"] = "ERROR";
@@ -479,6 +382,32 @@ var Checkbox = forwardRef(function (props, ref) {
479
382
  });
480
383
  Checkbox.displayName = 'Checkbox';
481
384
 
385
+ var useTypographyStyles = makeStyles$1(function () { return ({
386
+ root: function (_a) {
387
+ var _b;
388
+ var weight = _a.weight;
389
+ return (__assign((_b = {}, _b["& ." + iconStaticClassName] = {
390
+ position: 'relative',
391
+ top: '0.125em',
392
+ padding: '0 0.125em',
393
+ boxSizing: 'content-box',
394
+ }, _b), (weight && { fontWeight: (weight === 'semi-bold' && 600) || (weight === 'bold' && 700) || 400 })));
395
+ },
396
+ caption: {
397
+ display: 'inline',
398
+ },
399
+ overline: {
400
+ display: 'inline',
401
+ },
402
+ }); });
403
+
404
+ var Typography = forwardRef(function (props, ref) {
405
+ props.weight; var restProps = __rest(props, ["weight"]);
406
+ var classes = useTypographyStyles(props);
407
+ return React__default.createElement(Typography$1, __assign({ ref: ref, classes: classes }, restProps));
408
+ });
409
+ Typography.displayName = 'Typography';
410
+
482
411
  var getFadeStop = function (_a, typographyVariant) {
483
412
  var typography = _a.typography;
484
413
  return !isNaN(Number(typography[typographyVariant].lineHeight))
@@ -542,6 +471,14 @@ makeStyles(function (theme) { return ({
542
471
  },
543
472
  }); });
544
473
 
474
+ var IconButton = forwardRef(function (props, ref) {
475
+ return React__default.createElement(MuiIconButton, __assign({ ref: ref }, props));
476
+ });
477
+ IconButton.displayName = 'IconButton';
478
+ IconButton.defaultProps = {
479
+ color: 'secondary',
480
+ };
481
+
545
482
  var useLinkStyles = makeStyles$1(function (theme) { return ({
546
483
  root: function (props) {
547
484
  var _a;
@@ -561,6 +498,28 @@ Link.defaultProps = {
561
498
  };
562
499
  Link.displayName = 'Link';
563
500
 
501
+ var useStyles = makeStyles(function (_a) {
502
+ var spacing = _a.spacing;
503
+ return ({
504
+ root: {
505
+ '&:last-child': {
506
+ marginBottom: 0,
507
+ },
508
+ marginBottom: spacing(4),
509
+ padding: spacing(4),
510
+ },
511
+ });
512
+ });
513
+ var Paper = forwardRef(function (props, ref) {
514
+ var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
515
+ var classes = useStyles(props);
516
+ return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
517
+ });
518
+ Paper.displayName = 'Paper';
519
+ Paper.defaultProps = {
520
+ legacyStyles: false,
521
+ };
522
+
564
523
  var Radio = forwardRef(function (props, ref) {
565
524
  var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
566
525
  var control = React__default.createElement(MuiRadio, __assign({ disabled: label ? undefined : disabled }, muiProps));
@@ -715,12 +674,12 @@ var TableHeader = function (props) {
715
674
  return React__default.createElement("thead", __assign$1({}, restProps), children);
716
675
  };
717
676
 
718
- var _path$3K;
677
+ var _path$4x;
719
678
 
720
- 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); }
679
+ 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); }
721
680
 
722
- function SvgMore(props) {
723
- return /*#__PURE__*/React.createElement("svg", _extends$3$({
681
+ function SvgChevronDown(props) {
682
+ return /*#__PURE__*/React.createElement("svg", _extends$4N({
724
683
  viewBox: "0 0 16 16",
725
684
  strokeLinecap: "round",
726
685
  strokeLinejoin: "round",
@@ -728,17 +687,17 @@ function SvgMore(props) {
728
687
  width: "1em",
729
688
  height: "1em",
730
689
  fill: "none"
731
- }, props), _path$3K || (_path$3K = /*#__PURE__*/React.createElement("path", {
732
- 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"
690
+ }, props), _path$4x || (_path$4x = /*#__PURE__*/React.createElement("path", {
691
+ d: "M4 6l4 4 4-4"
733
692
  })));
734
693
  }
735
694
 
736
- var _path$3A;
695
+ var _path$4w;
737
696
 
738
- 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); }
697
+ 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); }
739
698
 
740
- function SvgSearch(props) {
741
- return /*#__PURE__*/React.createElement("svg", _extends$3R({
699
+ function SvgChevronUp(props) {
700
+ return /*#__PURE__*/React.createElement("svg", _extends$4M({
742
701
  viewBox: "0 0 16 16",
743
702
  strokeLinecap: "round",
744
703
  strokeLinejoin: "round",
@@ -746,17 +705,17 @@ function SvgSearch(props) {
746
705
  width: "1em",
747
706
  height: "1em",
748
707
  fill: "none"
749
- }, props), _path$3A || (_path$3A = /*#__PURE__*/React.createElement("path", {
750
- d: "M7.333 12.667A5.333 5.333 0 107.333 2a5.333 5.333 0 000 10.667zM14 14l-2.9-2.9"
708
+ }, props), _path$4w || (_path$4w = /*#__PURE__*/React.createElement("path", {
709
+ d: "M12 10L8 6l-4 4"
751
710
  })));
752
711
  }
753
712
 
754
- var _path$2X;
713
+ var _path$3d;
755
714
 
756
- 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); }
715
+ 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); }
757
716
 
758
- function SvgChevronDown(props) {
759
- return /*#__PURE__*/React.createElement("svg", _extends$3b({
717
+ function SvgMore(props) {
718
+ return /*#__PURE__*/React.createElement("svg", _extends$3t({
760
719
  viewBox: "0 0 16 16",
761
720
  strokeLinecap: "round",
762
721
  strokeLinejoin: "round",
@@ -764,17 +723,17 @@ function SvgChevronDown(props) {
764
723
  width: "1em",
765
724
  height: "1em",
766
725
  fill: "none"
767
- }, props), _path$2X || (_path$2X = /*#__PURE__*/React.createElement("path", {
768
- d: "M4 6l4 4 4-4"
726
+ }, props), _path$3d || (_path$3d = /*#__PURE__*/React.createElement("path", {
727
+ 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"
769
728
  })));
770
729
  }
771
730
 
772
- var _path$2W;
731
+ var _path$33;
773
732
 
774
- 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); }
733
+ 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); }
775
734
 
776
- function SvgChevronUp(props) {
777
- return /*#__PURE__*/React.createElement("svg", _extends$3a({
735
+ function SvgSearch(props) {
736
+ return /*#__PURE__*/React.createElement("svg", _extends$3j({
778
737
  viewBox: "0 0 16 16",
779
738
  strokeLinecap: "round",
780
739
  strokeLinejoin: "round",
@@ -782,8 +741,8 @@ function SvgChevronUp(props) {
782
741
  width: "1em",
783
742
  height: "1em",
784
743
  fill: "none"
785
- }, props), _path$2W || (_path$2W = /*#__PURE__*/React.createElement("path", {
786
- d: "M12 10L8 6l-4 4"
744
+ }, props), _path$33 || (_path$33 = /*#__PURE__*/React.createElement("path", {
745
+ d: "M7.333 12.667A5.333 5.333 0 107.333 2a5.333 5.333 0 000 10.667zM14 14l-2.9-2.9"
787
746
  })));
788
747
  }
789
748