@popmenu/common-ui 0.16.0-alpha.0 → 0.16.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/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/index.d.ts +0 -1
- package/build/components/Table/util/makeColumns.d.ts +1 -1
- package/build/components/TableHeaderCell/TableHeaderCellProps.d.ts +3 -1
- package/build/components/ThemeProvider/index.d.ts +1 -0
- package/build/components/Toolbar/index.d.ts +1 -0
- package/build/components/index.d.ts +22 -0
- package/build/index.d.ts +1 -0
- package/build/index.es.js +10 -9
- package/build/index.es.js.map +1 -1
- package/build/index.js +206 -9
- 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 +2 -2
package/build/index.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var Alert = require('@material-ui/lab/Alert');
|
|
6
|
+
var core = require('@material-ui/core');
|
|
6
7
|
var AppBar = require('@material-ui/core/AppBar');
|
|
7
8
|
var React = require('react');
|
|
8
9
|
var MuiAvatar = require('@material-ui/core/Avatar');
|
|
9
10
|
var styles = require('@material-ui/core/styles');
|
|
10
11
|
var Badge = require('@material-ui/core/Badge');
|
|
11
|
-
var core = require('@material-ui/core');
|
|
12
12
|
var MuiButton = require('@material-ui/core/Button');
|
|
13
13
|
var CircularProgress = require('@material-ui/core/CircularProgress');
|
|
14
14
|
var ButtonGroup = require('@material-ui/core/ButtonGroup');
|
|
@@ -6556,8 +6556,7 @@ var TableHeader = function (props) {
|
|
|
6556
6556
|
};
|
|
6557
6557
|
|
|
6558
6558
|
var getWidth = function (props) {
|
|
6559
|
-
var
|
|
6560
|
-
var isActionColumn = column.id === actionColumnId;
|
|
6559
|
+
var isActionColumn = props.column.isActionColumn, fullWidth = props.tableProps.fullWidth;
|
|
6561
6560
|
var width;
|
|
6562
6561
|
if (fullWidth && isActionColumn) {
|
|
6563
6562
|
width = '0.0000000001%';
|
|
@@ -6647,8 +6646,8 @@ var TableHeaderCell = function (props) {
|
|
|
6647
6646
|
var root = useTableHeaderCellStyles(props).root;
|
|
6648
6647
|
var palette = core.useTheme().palette;
|
|
6649
6648
|
//@ts-expect-error @types/react-table issue
|
|
6650
|
-
var canSort = column.canSort, isSorted = column.isSorted, isSortedDesc = column.isSortedDesc;
|
|
6651
|
-
var showSortIndicator = canSort &&
|
|
6649
|
+
var canSort = column.canSort, isSorted = column.isSorted, isSortedDesc = column.isSortedDesc, isActionColumn = column.isActionColumn;
|
|
6650
|
+
var showSortIndicator = canSort && !isActionColumn;
|
|
6652
6651
|
return (React__default['default'].createElement("th", __assign({ className: root }, restProps),
|
|
6653
6652
|
React__default['default'].createElement(Box, { display: "flex", alignItems: "center", gap: 1 },
|
|
6654
6653
|
children,
|
|
@@ -6740,9 +6739,8 @@ var TableActionsCell = function (props) {
|
|
|
6740
6739
|
}))))));
|
|
6741
6740
|
};
|
|
6742
6741
|
|
|
6743
|
-
var actionColumnId = 'table-actions-column';
|
|
6744
6742
|
var makeColumns = function (config) {
|
|
6745
|
-
var columns = config.columns, actions = config.actions;
|
|
6743
|
+
var columns = config.columns, actions = config.actions, actionColumnId = config.actionColumnId;
|
|
6746
6744
|
var actionColumn;
|
|
6747
6745
|
var memoizedColumns = __spreadArray([], columns);
|
|
6748
6746
|
if (actions) {
|
|
@@ -6759,9 +6757,10 @@ var makeColumns = function (config) {
|
|
|
6759
6757
|
|
|
6760
6758
|
/* eslint-disable react/jsx-key */
|
|
6761
6759
|
var Table = function (props) {
|
|
6760
|
+
var actionColumnId = 'table-actions-column';
|
|
6762
6761
|
var rawColumns = props.columns, data = props.data, actions = props.actions, sortable = props.sortable, emptyMessage = props.emptyMessage, EmptyImage = props.EmptyImage, isLoading = props.loading;
|
|
6763
6762
|
var classes = useTableStyles(props);
|
|
6764
|
-
var columns = React.useMemo(function () { return makeColumns({ columns: rawColumns, actions: actions }); }, [rawColumns, actions]);
|
|
6763
|
+
var columns = React.useMemo(function () { return makeColumns({ columns: rawColumns, actions: actions, actionColumnId: actionColumnId }); }, [rawColumns, actions]);
|
|
6765
6764
|
// @ts-expect-error @types/react-table issue
|
|
6766
6765
|
var instance = reactTable.exports.useTable({ columns: columns, data: data, disableSortBy: !sortable }, reactTable.exports.useSortBy, reactTable.exports.usePagination);
|
|
6767
6766
|
// @ts-expect-error @types/react-table issue
|
|
@@ -6776,7 +6775,7 @@ var Table = function (props) {
|
|
|
6776
6775
|
React__default['default'].createElement("table", __assign({ className: classes.table }, getTableProps()),
|
|
6777
6776
|
React__default['default'].createElement(TableHeader, null, headerGroups.map(function (headerGroup) { return (React__default['default'].createElement(TableHeaderRow, __assign({}, headerGroup.getHeaderGroupProps()), headerGroup.headers.map(function (column) { return (React__default['default'].createElement(TableHeaderCell
|
|
6778
6777
|
// @ts-expect-error @types/react-table issue
|
|
6779
|
-
, __assign({}, column.getHeaderProps(column.getSortByToggleProps()), { column: column, tableProps: props }), column.render('Header'))); }))); })),
|
|
6778
|
+
, __assign({}, column.getHeaderProps(column.getSortByToggleProps()), { column: __assign(__assign({}, column), { isActionColumn: column.id === actionColumnId }), tableProps: props }), column.render('Header'))); }))); })),
|
|
6780
6779
|
!isEmpty && !isLoading && (React__default['default'].createElement(TableBody, __assign({}, getTableBodyProps()), page.map(function (row) {
|
|
6781
6780
|
prepareRow(row);
|
|
6782
6781
|
return (React__default['default'].createElement(TableRow, __assign({}, row.getRowProps()), row.cells.map(function (cell) { return (React__default['default'].createElement(TableCell, __assign({}, cell.getCellProps()), cell.render('Cell'))); })));
|
|
@@ -6877,12 +6876,210 @@ Object.defineProperty(exports, 'Alert', {
|
|
|
6877
6876
|
return Alert__default['default'];
|
|
6878
6877
|
}
|
|
6879
6878
|
});
|
|
6879
|
+
Object.defineProperty(exports, 'Accordion', {
|
|
6880
|
+
enumerable: true,
|
|
6881
|
+
get: function () {
|
|
6882
|
+
return core.Accordion;
|
|
6883
|
+
}
|
|
6884
|
+
});
|
|
6885
|
+
Object.defineProperty(exports, 'AccordionActions', {
|
|
6886
|
+
enumerable: true,
|
|
6887
|
+
get: function () {
|
|
6888
|
+
return core.AccordionActions;
|
|
6889
|
+
}
|
|
6890
|
+
});
|
|
6891
|
+
Object.defineProperty(exports, 'AccordionDetails', {
|
|
6892
|
+
enumerable: true,
|
|
6893
|
+
get: function () {
|
|
6894
|
+
return core.AccordionDetails;
|
|
6895
|
+
}
|
|
6896
|
+
});
|
|
6897
|
+
Object.defineProperty(exports, 'AccordionSummary', {
|
|
6898
|
+
enumerable: true,
|
|
6899
|
+
get: function () {
|
|
6900
|
+
return core.AccordionSummary;
|
|
6901
|
+
}
|
|
6902
|
+
});
|
|
6903
|
+
Object.defineProperty(exports, 'Breadcrumbs', {
|
|
6904
|
+
enumerable: true,
|
|
6905
|
+
get: function () {
|
|
6906
|
+
return core.Breadcrumbs;
|
|
6907
|
+
}
|
|
6908
|
+
});
|
|
6909
|
+
Object.defineProperty(exports, 'ButtonBase', {
|
|
6910
|
+
enumerable: true,
|
|
6911
|
+
get: function () {
|
|
6912
|
+
return core.ButtonBase;
|
|
6913
|
+
}
|
|
6914
|
+
});
|
|
6915
|
+
Object.defineProperty(exports, 'ClickAwayListener', {
|
|
6916
|
+
enumerable: true,
|
|
6917
|
+
get: function () {
|
|
6918
|
+
return core.ClickAwayListener;
|
|
6919
|
+
}
|
|
6920
|
+
});
|
|
6921
|
+
Object.defineProperty(exports, 'Fab', {
|
|
6922
|
+
enumerable: true,
|
|
6923
|
+
get: function () {
|
|
6924
|
+
return core.Fab;
|
|
6925
|
+
}
|
|
6926
|
+
});
|
|
6927
|
+
Object.defineProperty(exports, 'GridList', {
|
|
6928
|
+
enumerable: true,
|
|
6929
|
+
get: function () {
|
|
6930
|
+
return core.GridList;
|
|
6931
|
+
}
|
|
6932
|
+
});
|
|
6933
|
+
Object.defineProperty(exports, 'Hidden', {
|
|
6934
|
+
enumerable: true,
|
|
6935
|
+
get: function () {
|
|
6936
|
+
return core.Hidden;
|
|
6937
|
+
}
|
|
6938
|
+
});
|
|
6939
|
+
Object.defineProperty(exports, 'Modal', {
|
|
6940
|
+
enumerable: true,
|
|
6941
|
+
get: function () {
|
|
6942
|
+
return core.Modal;
|
|
6943
|
+
}
|
|
6944
|
+
});
|
|
6945
|
+
Object.defineProperty(exports, 'Popover', {
|
|
6946
|
+
enumerable: true,
|
|
6947
|
+
get: function () {
|
|
6948
|
+
return core.Popover;
|
|
6949
|
+
}
|
|
6950
|
+
});
|
|
6951
|
+
Object.defineProperty(exports, 'Popper', {
|
|
6952
|
+
enumerable: true,
|
|
6953
|
+
get: function () {
|
|
6954
|
+
return core.Popper;
|
|
6955
|
+
}
|
|
6956
|
+
});
|
|
6957
|
+
Object.defineProperty(exports, 'Step', {
|
|
6958
|
+
enumerable: true,
|
|
6959
|
+
get: function () {
|
|
6960
|
+
return core.Step;
|
|
6961
|
+
}
|
|
6962
|
+
});
|
|
6963
|
+
Object.defineProperty(exports, 'StepButton', {
|
|
6964
|
+
enumerable: true,
|
|
6965
|
+
get: function () {
|
|
6966
|
+
return core.StepButton;
|
|
6967
|
+
}
|
|
6968
|
+
});
|
|
6969
|
+
Object.defineProperty(exports, 'StepConnector', {
|
|
6970
|
+
enumerable: true,
|
|
6971
|
+
get: function () {
|
|
6972
|
+
return core.StepConnector;
|
|
6973
|
+
}
|
|
6974
|
+
});
|
|
6975
|
+
Object.defineProperty(exports, 'StepContent', {
|
|
6976
|
+
enumerable: true,
|
|
6977
|
+
get: function () {
|
|
6978
|
+
return core.StepContent;
|
|
6979
|
+
}
|
|
6980
|
+
});
|
|
6981
|
+
Object.defineProperty(exports, 'StepIcon', {
|
|
6982
|
+
enumerable: true,
|
|
6983
|
+
get: function () {
|
|
6984
|
+
return core.StepIcon;
|
|
6985
|
+
}
|
|
6986
|
+
});
|
|
6987
|
+
Object.defineProperty(exports, 'StepLabel', {
|
|
6988
|
+
enumerable: true,
|
|
6989
|
+
get: function () {
|
|
6990
|
+
return core.StepLabel;
|
|
6991
|
+
}
|
|
6992
|
+
});
|
|
6993
|
+
Object.defineProperty(exports, 'Stepper', {
|
|
6994
|
+
enumerable: true,
|
|
6995
|
+
get: function () {
|
|
6996
|
+
return core.Stepper;
|
|
6997
|
+
}
|
|
6998
|
+
});
|
|
6999
|
+
Object.defineProperty(exports, 'ThemeProvider', {
|
|
7000
|
+
enumerable: true,
|
|
7001
|
+
get: function () {
|
|
7002
|
+
return core.ThemeProvider;
|
|
7003
|
+
}
|
|
7004
|
+
});
|
|
7005
|
+
Object.defineProperty(exports, 'Toolbar', {
|
|
7006
|
+
enumerable: true,
|
|
7007
|
+
get: function () {
|
|
7008
|
+
return core.Toolbar;
|
|
7009
|
+
}
|
|
7010
|
+
});
|
|
7011
|
+
Object.defineProperty(exports, 'alpha', {
|
|
7012
|
+
enumerable: true,
|
|
7013
|
+
get: function () {
|
|
7014
|
+
return core.alpha;
|
|
7015
|
+
}
|
|
7016
|
+
});
|
|
7017
|
+
Object.defineProperty(exports, 'createTheme', {
|
|
7018
|
+
enumerable: true,
|
|
7019
|
+
get: function () {
|
|
7020
|
+
return core.createTheme;
|
|
7021
|
+
}
|
|
7022
|
+
});
|
|
7023
|
+
Object.defineProperty(exports, 'darken', {
|
|
7024
|
+
enumerable: true,
|
|
7025
|
+
get: function () {
|
|
7026
|
+
return core.darken;
|
|
7027
|
+
}
|
|
7028
|
+
});
|
|
7029
|
+
Object.defineProperty(exports, 'decomposeColor', {
|
|
7030
|
+
enumerable: true,
|
|
7031
|
+
get: function () {
|
|
7032
|
+
return core.decomposeColor;
|
|
7033
|
+
}
|
|
7034
|
+
});
|
|
7035
|
+
Object.defineProperty(exports, 'getLuminance', {
|
|
7036
|
+
enumerable: true,
|
|
7037
|
+
get: function () {
|
|
7038
|
+
return core.getLuminance;
|
|
7039
|
+
}
|
|
7040
|
+
});
|
|
7041
|
+
Object.defineProperty(exports, 'hexToRgb', {
|
|
7042
|
+
enumerable: true,
|
|
7043
|
+
get: function () {
|
|
7044
|
+
return core.hexToRgb;
|
|
7045
|
+
}
|
|
7046
|
+
});
|
|
7047
|
+
Object.defineProperty(exports, 'lighten', {
|
|
7048
|
+
enumerable: true,
|
|
7049
|
+
get: function () {
|
|
7050
|
+
return core.lighten;
|
|
7051
|
+
}
|
|
7052
|
+
});
|
|
7053
|
+
Object.defineProperty(exports, 'makeStyles', {
|
|
7054
|
+
enumerable: true,
|
|
7055
|
+
get: function () {
|
|
7056
|
+
return core.makeStyles;
|
|
7057
|
+
}
|
|
7058
|
+
});
|
|
7059
|
+
Object.defineProperty(exports, 'recomposeColor', {
|
|
7060
|
+
enumerable: true,
|
|
7061
|
+
get: function () {
|
|
7062
|
+
return core.recomposeColor;
|
|
7063
|
+
}
|
|
7064
|
+
});
|
|
7065
|
+
Object.defineProperty(exports, 'rgbToHex', {
|
|
7066
|
+
enumerable: true,
|
|
7067
|
+
get: function () {
|
|
7068
|
+
return core.rgbToHex;
|
|
7069
|
+
}
|
|
7070
|
+
});
|
|
6880
7071
|
Object.defineProperty(exports, 'AppBar', {
|
|
6881
7072
|
enumerable: true,
|
|
6882
7073
|
get: function () {
|
|
6883
7074
|
return AppBar__default['default'];
|
|
6884
7075
|
}
|
|
6885
7076
|
});
|
|
7077
|
+
Object.defineProperty(exports, 'ServerStyleSheets', {
|
|
7078
|
+
enumerable: true,
|
|
7079
|
+
get: function () {
|
|
7080
|
+
return styles.ServerStyleSheets;
|
|
7081
|
+
}
|
|
7082
|
+
});
|
|
6886
7083
|
Object.defineProperty(exports, 'Badge', {
|
|
6887
7084
|
enumerable: true,
|
|
6888
7085
|
get: function () {
|