@popmenu/common-ui 0.15.0 → 0.18.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/components/Accordion/index.d.ts +1 -0
- package/build/components/AccordionActions/index.d.ts +1 -0
- package/build/components/AccordionDetails/index.d.ts +1 -0
- package/build/components/AccordionSummary/index.d.ts +1 -0
- package/build/components/AudioPlayer/AudioPlayer.d.ts +3 -0
- package/build/components/AudioPlayer/AudioPlayerProps.d.ts +4 -0
- package/build/components/AudioPlayer/index.d.ts +2 -0
- package/build/components/AudioPlayer/util/audioPlayerReducer.d.ts +11 -0
- package/build/components/AudioPlayer/util/formatTime.d.ts +1 -0
- package/build/components/AudioPlayer/util/index.d.ts +5 -0
- package/build/components/AudioPlayer/util/setupAudioRef.d.ts +8 -0
- package/build/components/AudioPlayer/util/types.d.ts +77 -0
- package/build/components/AudioPlayer/util/useVolumeIcon.d.ts +2 -0
- package/build/components/Breadcrumbs/index.d.ts +1 -0
- package/build/components/ButtonBase/index.d.ts +1 -0
- package/build/components/ClickAwayListener/index.d.ts +1 -0
- package/build/components/Fab/index.d.ts +1 -0
- package/build/components/GridList/index.d.ts +1 -0
- package/build/components/Hidden/index.d.ts +1 -0
- package/build/components/Modal/index.d.ts +1 -0
- package/build/components/Popover/index.d.ts +1 -0
- package/build/components/Popper/index.d.ts +1 -0
- package/build/components/Step/index.d.ts +1 -0
- package/build/components/StepButton/index.d.ts +1 -0
- package/build/components/StepConnector/index.d.ts +1 -0
- package/build/components/StepContent/index.d.ts +1 -0
- package/build/components/StepIcon/index.d.ts +1 -0
- package/build/components/StepLabel/index.d.ts +1 -0
- package/build/components/Stepper/index.d.ts +1 -0
- package/build/components/Table/Table.d.ts +3 -0
- package/build/components/Table/TableProps.d.ts +28 -0
- package/build/components/Table/TableStyles.d.ts +2 -0
- package/build/components/Table/index.d.ts +2 -0
- package/build/components/Table/util/makeColumns.d.ts +7 -0
- package/build/components/TableActionsCell/TableActionsCell.d.ts +3 -0
- package/build/components/TableActionsCell/TableActionsCellProps.d.ts +10 -0
- package/build/components/TableActionsCell/index.d.ts +2 -0
- package/build/components/TableBody/TableBody.d.ts +2 -0
- package/build/components/TableBody/index.d.ts +1 -0
- package/build/components/TableCell/TableCell.d.ts +2 -0
- package/build/components/TableCell/TableCellStyles.d.ts +1 -0
- package/build/components/TableCell/index.d.ts +1 -0
- package/build/components/TableFooter/TableFooter.d.ts +2 -0
- package/build/components/TableFooter/index.d.ts +1 -0
- package/build/components/TableHeader/TableHeader.d.ts +2 -0
- package/build/components/TableHeader/index.d.ts +1 -0
- package/build/components/TableHeaderCell/TableHeaderCell.d.ts +3 -0
- package/build/components/TableHeaderCell/TableHeaderCellProps.d.ts +8 -0
- package/build/components/TableHeaderCell/TableHeaderCellStyles.d.ts +2 -0
- package/build/components/TableHeaderCell/index.d.ts +1 -0
- package/build/components/TableHeaderRow/TableHeaderRow.d.ts +2 -0
- package/build/components/TableHeaderRow/index.d.ts +1 -0
- package/build/components/TableRow/TableRow.d.ts +2 -0
- package/build/components/TableRow/TableRowStyles.d.ts +1 -0
- package/build/components/TableRow/index.d.ts +1 -0
- package/build/components/ThemeProvider/index.d.ts +1 -0
- package/build/components/Toolbar/index.d.ts +1 -0
- package/build/components/index.d.ts +24 -0
- package/build/index.d.ts +1 -0
- package/build/index.es.js +5581 -386
- package/build/index.es.js.map +1 -1
- package/build/index.js +5696 -305
- package/build/index.js.map +1 -1
- package/build/util/ServerStyleSheets.d.ts +1 -0
- package/build/util/colors/alpha.d.ts +1 -0
- package/build/util/colors/darken.d.ts +1 -0
- package/build/util/colors/decomposeColor.d.ts +1 -0
- package/build/util/colors/getLuminance.d.ts +1 -0
- package/build/util/colors/hexToRgb.d.ts +1 -0
- package/build/util/colors/index.d.ts +8 -0
- package/build/util/colors/lighten.d.ts +1 -0
- package/build/util/colors/recomposeColor.d.ts +1 -0
- package/build/util/colors/rgbToHex.d.ts +1 -0
- package/build/util/createTheme.d.ts +1 -0
- package/build/util/index.d.ts +4 -0
- package/build/util/makeStyles.d.ts +1 -0
- package/package.json +7 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Accordion as default, AccordionProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AccordionActions as default, AccordionActionsProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AccordionDetails as default, AccordionDetailsProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AccordionSummary as default, AccordionSummaryProps } from '@material-ui/core';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PLAYBACK_STATES, CONTROL_LABELS, AudioPlayerState, AudioPlayerEvent, VOLUME_CONTROL_STATES } from './types';
|
|
2
|
+
export declare const initialAudioPlayerState: {
|
|
3
|
+
playback: PLAYBACK_STATES;
|
|
4
|
+
volumeControls: VOLUME_CONTROL_STATES;
|
|
5
|
+
context: {
|
|
6
|
+
volume: number;
|
|
7
|
+
playbackButtonLabel: CONTROL_LABELS;
|
|
8
|
+
volumeButtonLabel: CONTROL_LABELS;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const audioPlayerReducer: (state: AudioPlayerState, event: AudioPlayerEvent) => AudioPlayerState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatTime: (time: number, remaning?: boolean) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { AudioPlayerEvent } from './types';
|
|
3
|
+
interface Config {
|
|
4
|
+
audioRef: RefObject<HTMLAudioElement>;
|
|
5
|
+
send: (event: AudioPlayerEvent) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const setupAudioRef: (config: Config) => () => (() => void);
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare enum AUDIO_PLAYER_EVENT_TYPES {
|
|
3
|
+
TOGGLE_PLAYBACK = "TOGGLE_PLAYBACK",
|
|
4
|
+
TOGGLE_VOLUME_CONTROL = "TOGGLE_VOLUME_CONTROL",
|
|
5
|
+
TOGGLE_MUTE = "TOGGLE_MUTE",
|
|
6
|
+
VOLUME_CHANGE = "VOLUME_CHANGE",
|
|
7
|
+
TIME_CHANGE = "TIME_CHANGE",
|
|
8
|
+
DURATION_CHANGE = "DURATION_CHANGE",
|
|
9
|
+
SET_TIME = "SET_TIME",
|
|
10
|
+
CAN_PLAY = "CAN_PLAY",
|
|
11
|
+
RESET = "RESET"
|
|
12
|
+
}
|
|
13
|
+
interface SetVolumeEvent {
|
|
14
|
+
type: AUDIO_PLAYER_EVENT_TYPES.VOLUME_CHANGE;
|
|
15
|
+
context: Pick<AudioPlayerExtendState, 'volume'>;
|
|
16
|
+
}
|
|
17
|
+
interface TogglePlaybackEvent {
|
|
18
|
+
type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK;
|
|
19
|
+
}
|
|
20
|
+
interface ToggleVolumeControlEvent {
|
|
21
|
+
type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL;
|
|
22
|
+
}
|
|
23
|
+
interface TimeChangeEvent {
|
|
24
|
+
type: AUDIO_PLAYER_EVENT_TYPES.TIME_CHANGE;
|
|
25
|
+
context: {
|
|
26
|
+
currentTime: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface DurationChangeEvent {
|
|
30
|
+
type: AUDIO_PLAYER_EVENT_TYPES.DURATION_CHANGE;
|
|
31
|
+
context: {
|
|
32
|
+
duration: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
interface ToggleMuteEvent {
|
|
36
|
+
type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_MUTE;
|
|
37
|
+
}
|
|
38
|
+
interface SetTimeEvent {
|
|
39
|
+
type: AUDIO_PLAYER_EVENT_TYPES.SET_TIME;
|
|
40
|
+
context: {
|
|
41
|
+
time: number;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
interface CanPlayEvent {
|
|
45
|
+
type: AUDIO_PLAYER_EVENT_TYPES.CAN_PLAY;
|
|
46
|
+
}
|
|
47
|
+
interface ResetEvent {
|
|
48
|
+
type: AUDIO_PLAYER_EVENT_TYPES.RESET;
|
|
49
|
+
}
|
|
50
|
+
export declare type AudioPlayerEvent = TogglePlaybackEvent | ToggleVolumeControlEvent | SetVolumeEvent | TimeChangeEvent | DurationChangeEvent | ToggleMuteEvent | SetTimeEvent | CanPlayEvent | ResetEvent;
|
|
51
|
+
export declare enum PLAYBACK_STATES {
|
|
52
|
+
NONE = "NONE",
|
|
53
|
+
PAUSED = "PAUSED",
|
|
54
|
+
PLAYING = "PLAYING"
|
|
55
|
+
}
|
|
56
|
+
export declare enum CONTROL_LABELS {
|
|
57
|
+
PAUSE = "PAUSE",
|
|
58
|
+
PLAY = "PLAY",
|
|
59
|
+
MUTE = "MUTE",
|
|
60
|
+
UNMUTE = "UNMUTE"
|
|
61
|
+
}
|
|
62
|
+
export declare enum VOLUME_CONTROL_STATES {
|
|
63
|
+
SHOW = "SHOW",
|
|
64
|
+
HIDE = "HIDE"
|
|
65
|
+
}
|
|
66
|
+
export interface AudioPlayerExtendState {
|
|
67
|
+
volume: number;
|
|
68
|
+
audioRef: RefObject<HTMLAudioElement>;
|
|
69
|
+
playbackButtonLabel: CONTROL_LABELS;
|
|
70
|
+
volumeButtonLabel: CONTROL_LABELS;
|
|
71
|
+
}
|
|
72
|
+
export interface AudioPlayerState {
|
|
73
|
+
playback: PLAYBACK_STATES;
|
|
74
|
+
volumeControls: VOLUME_CONTROL_STATES;
|
|
75
|
+
context: AudioPlayerExtendState;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Breadcrumbs as default, BreadcrumbsProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ButtonBase as default, ButtonBaseProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ClickAwayListener as default, ClickAwayListenerProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Fab as default, FabProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GridList as default, GridListProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Hidden as default, HiddenProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Modal as default, ModalProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Popover as default, PopoverProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Popper as default, PopperProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Step as default, StepProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StepButton as default, StepButtonProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StepConnector as default, StepConnectorProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StepContent as default, StepContentProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StepIcon as default, StepIconProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StepLabel as default, StepLabelProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stepper as default, StepperProps } from '@material-ui/core';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Cell, Column } from 'react-table';
|
|
3
|
+
export interface TableProps {
|
|
4
|
+
/** Configurations for each individual column. */
|
|
5
|
+
columns: Array<Column & {
|
|
6
|
+
accessor: string;
|
|
7
|
+
}>;
|
|
8
|
+
/** A table's data set. */
|
|
9
|
+
data: Array<Record<string, unknown>>;
|
|
10
|
+
/** Actions that can be performed on any given row. */
|
|
11
|
+
actions?: Record<string, {
|
|
12
|
+
icon?: string | React.FC<React.SVGProps<SVGSVGElement>>;
|
|
13
|
+
label: string;
|
|
14
|
+
action: (cell: Cell) => void;
|
|
15
|
+
}>;
|
|
16
|
+
/** Styles the table to not shrink below the height of a full page. */
|
|
17
|
+
enableMinHeight?: boolean;
|
|
18
|
+
/** Styles the table to take up its containers full width. */
|
|
19
|
+
fullWidth?: boolean;
|
|
20
|
+
/** Enables sortability for columns. */
|
|
21
|
+
sortable?: boolean;
|
|
22
|
+
/** Sets loading state. When true, Will render a CircularProgress when true and not rows. */
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
/** A short message for users when the data set does not produce any rows. */
|
|
25
|
+
emptyMessage?: string;
|
|
26
|
+
/** An image to be displayed with the empty message. */
|
|
27
|
+
EmptyImage?: () => React.ReactNode;
|
|
28
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Column } from 'react-table';
|
|
2
|
+
import { TableProps } from '../TableProps';
|
|
3
|
+
interface MakeColumnsConfig extends Pick<TableProps, 'columns' | 'actions'> {
|
|
4
|
+
actionColumnId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const makeColumns: (config: MakeColumnsConfig) => Array<Column>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Cell, TableInstance } from 'react-table';
|
|
3
|
+
export interface TableActionsCellProps extends TableInstance {
|
|
4
|
+
cell: Cell;
|
|
5
|
+
actions: Record<string, {
|
|
6
|
+
icon?: string | React.FC<React.SVGProps<SVGSVGElement>>;
|
|
7
|
+
label: string;
|
|
8
|
+
action: (cell: Cell) => void;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableBody as default } from './TableBody';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTableCellStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableCell as default } from './TableCell';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableFooter as default } from './TableFooter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableHeader as default } from './TableHeader';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableHeaderCell as default } from './TableHeaderCell';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableHeaderRow as default } from './TableHeaderRow';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTableRowStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableRow as default } from './TableRow';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThemeProvider as default, ThemeProviderProps } from '@material-ui/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toolbar as default, ToolbarProps } from '@material-ui/core';
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
export { default as Alert, AlertProps } from './Alert';
|
|
2
|
+
export { default as Accordion, AccordionProps } from './Accordion';
|
|
3
|
+
export { default as AccordionActions, AccordionActionsProps } from './AccordionActions';
|
|
4
|
+
export { default as AccordionDetails, AccordionDetailsProps } from './AccordionDetails';
|
|
5
|
+
export { default as AccordionSummary, AccordionSummaryProps } from './AccordionSummary';
|
|
2
6
|
export { default as AppBar, AppBarProps } from './AppBar';
|
|
7
|
+
export { default as AudioPlayer, AudioPlayerProps } from './AudioPlayer';
|
|
3
8
|
export { default as Avatar, AvatarProps } from './Avatar';
|
|
4
9
|
export { default as Badge, BadgeProps } from './Badge';
|
|
5
10
|
export { default as Box, BoxProps } from './Box';
|
|
11
|
+
export { default as Breadcrumbs, BreadcrumbsProps } from './Breadcrumbs';
|
|
6
12
|
export { default as Button, ButtonProps } from './Button';
|
|
13
|
+
export { default as ButtonBase, ButtonBaseProps } from './ButtonBase';
|
|
7
14
|
export { default as ButtonGroup, ButtonGroupProps } from './ButtonGroup';
|
|
8
15
|
export { default as Card, CardProps } from './Card';
|
|
9
16
|
export { default as CardActionArea, CardActionAreaProps } from './CardActionArea';
|
|
@@ -14,6 +21,7 @@ export { default as CardMedia, CardMediaProps } from './CardMedia';
|
|
|
14
21
|
export { default as Checkbox, CheckboxProps } from './Checkbox';
|
|
15
22
|
export { default as Chip, ChipProps } from './Chip';
|
|
16
23
|
export { default as CircularProgress, CircularProgressProps } from './CircularProgress';
|
|
24
|
+
export { default as ClickAwayListener, ClickAwayListenerProps } from './ClickAwayListener';
|
|
17
25
|
export { default as CollapsibleText, CollapsibleTextProps } from './CollapsibleText';
|
|
18
26
|
export { default as Dialog, DialogProps } from './Dialog';
|
|
19
27
|
export { default as DialogActions, DialogActionsProps } from './DialogActions';
|
|
@@ -21,9 +29,12 @@ export { default as DialogContent, DialogContentProps } from './DialogContent';
|
|
|
21
29
|
export { default as DialogTitle, DialogTitleProps } from './DialogTitle';
|
|
22
30
|
export { default as Divider, DividerProps } from './Divider';
|
|
23
31
|
export { default as Drawer, DrawerProps } from './Drawer';
|
|
32
|
+
export { default as Fab, FabProps } from './Fab';
|
|
24
33
|
export { default as FormControl, FormControlProps } from './FormControl';
|
|
25
34
|
export { default as FormControlLabel, FormControlLabelProps } from './FormControlLabel';
|
|
26
35
|
export { default as Grid, GridProps } from './Grid';
|
|
36
|
+
export { default as GridList, GridListProps } from './GridList';
|
|
37
|
+
export { default as Hidden, HiddenProps } from './Hidden';
|
|
27
38
|
export { default as Icon, IconProps } from './Icon';
|
|
28
39
|
export { default as IconButton, IconButtonProps } from './IconButton';
|
|
29
40
|
export { default as InputAdornment, InputAdornmentProps } from './InputAdornment';
|
|
@@ -37,15 +48,28 @@ export { default as ListItemText, ListItemTextProps } from './ListItemText';
|
|
|
37
48
|
export { default as Menu, MenuProps } from './Menu';
|
|
38
49
|
export { default as MenuItem, MenuItemProps } from './MenuItem';
|
|
39
50
|
export { default as MenuList, MenuListProps } from './MenuList';
|
|
51
|
+
export { default as Modal, ModalProps } from './Modal';
|
|
40
52
|
export { default as Paper, PaperProps } from './Paper';
|
|
41
53
|
export { default as PaperContent } from './PaperContent';
|
|
54
|
+
export { default as Popover, PopoverProps } from './Popover';
|
|
55
|
+
export { default as Popper, PopperProps } from './Popper';
|
|
42
56
|
export { default as Radio, RadioProps } from './Radio';
|
|
57
|
+
export { default as Step, StepProps } from './Step';
|
|
58
|
+
export { default as StepButton, StepButtonProps } from './StepButton';
|
|
59
|
+
export { default as StepConnector, StepConnectorProps } from './StepConnector';
|
|
60
|
+
export { default as StepContent, StepContentProps } from './StepContent';
|
|
61
|
+
export { default as StepIcon, StepIconProps } from './StepIcon';
|
|
62
|
+
export { default as StepLabel, StepLabelProps } from './StepLabel';
|
|
63
|
+
export { default as Stepper, StepperProps } from './Stepper';
|
|
43
64
|
export { default as SplitInput, SplitInputProps } from './SplitInput';
|
|
44
65
|
export { default as Switch, SwitchProps } from './Switch';
|
|
66
|
+
export { default as Table, TableProps } from './Table';
|
|
45
67
|
export { default as Tab, TabProps } from './Tab';
|
|
46
68
|
export { default as Tabs, TabsProps } from './Tabs';
|
|
47
69
|
export { default as TextField, TextFieldProps } from './TextField';
|
|
70
|
+
export { default as ThemeProvider, ThemeProviderProps } from './ThemeProvider';
|
|
48
71
|
export { default as ToggleButton, ToggleButtonProps } from './ToggleButton';
|
|
49
72
|
export { default as ToggleButtonGroup, ToggleButtonGroupProps } from './ToggleButtonGroup';
|
|
73
|
+
export { default as Toolbar, ToolbarProps } from './Toolbar';
|
|
50
74
|
export { default as Tooltip, TooltipProps } from './Tooltip';
|
|
51
75
|
export { default as Typography, TypographyProps } from './Typography';
|
package/build/index.d.ts
CHANGED