@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.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';
@@ -155,6 +155,42 @@ function SvgUser(props) {
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));