mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 21:52:19 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
89
web/node_modules/@material-ui/core/TableCell/TableCell.d.ts
generated
vendored
Normal file
89
web/node_modules/@material-ui/core/TableCell/TableCell.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,89 @@
|
|||
import * as React from 'react';
|
||||
import { StandardProps } from '..';
|
||||
import { Padding, Size } from '../Table';
|
||||
|
||||
export { Padding, Size };
|
||||
|
||||
/**
|
||||
* `<TableCell>` will be rendered as an `<th>`or `<td>` depending
|
||||
* on the context it is used in. Where context literally is the
|
||||
* React `context`.
|
||||
*
|
||||
* Since it is not decided via prop, we have create loose typings
|
||||
* here.
|
||||
*/
|
||||
export interface TableCellProps
|
||||
extends StandardProps<TableCellBaseProps, TableCellClassKey, 'align'> {
|
||||
/**
|
||||
* Set the text-align on the table cell content.
|
||||
*
|
||||
* Monetary or generally number fields **should be right aligned** as that allows
|
||||
* you to add them up quickly in your head without having to worry about decimals.
|
||||
*/
|
||||
align?: 'inherit' | 'left' | 'center' | 'right' | 'justify';
|
||||
/**
|
||||
* The table cell contents.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component?: React.ElementType<TableCellBaseProps>;
|
||||
/**
|
||||
* Sets the padding applied to the cell.
|
||||
* By default, the Table parent component set the value (`normal`).
|
||||
* `default` is deprecated, use `normal` instead.
|
||||
*/
|
||||
padding?: Padding;
|
||||
/**
|
||||
* Set scope attribute.
|
||||
*/
|
||||
scope?: TableCellBaseProps['scope'];
|
||||
/**
|
||||
* Specify the size of the cell.
|
||||
* By default, the Table parent component set the value (`medium`).
|
||||
*/
|
||||
size?: Size;
|
||||
/**
|
||||
* Set aria-sort direction.
|
||||
*/
|
||||
sortDirection?: SortDirection;
|
||||
/**
|
||||
* Specify the cell type.
|
||||
* By default, the TableHead, TableBody or TableFooter parent component set the value.
|
||||
*/
|
||||
variant?: 'head' | 'body' | 'footer';
|
||||
}
|
||||
|
||||
export type TableCellBaseProps = React.ThHTMLAttributes<HTMLTableHeaderCellElement> &
|
||||
React.TdHTMLAttributes<HTMLTableDataCellElement>;
|
||||
|
||||
export type SortDirection = 'asc' | 'desc' | false;
|
||||
|
||||
export type TableCellClassKey =
|
||||
| 'root'
|
||||
| 'head'
|
||||
| 'body'
|
||||
| 'footer'
|
||||
| 'alignLeft'
|
||||
| 'alignCenter'
|
||||
| 'alignRight'
|
||||
| 'alignJustify'
|
||||
| 'sizeSmall'
|
||||
| 'paddingCheckbox'
|
||||
| 'paddingNone'
|
||||
| 'stickyHeader';
|
||||
|
||||
/**
|
||||
* The component renders a `<th>` element when the parent context is a header
|
||||
* or otherwise a `<td>` element.
|
||||
* Demos:
|
||||
*
|
||||
* - [Tables](https://material-ui.com/components/tables/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [TableCell API](https://material-ui.com/api/table-cell/)
|
||||
*/
|
||||
export default function TableCell(props: TableCellProps): JSX.Element;
|
264
web/node_modules/@material-ui/core/TableCell/TableCell.js
generated
vendored
Normal file
264
web/node_modules/@material-ui/core/TableCell/TableCell.js
generated
vendored
Normal file
|
@ -0,0 +1,264 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.styles = void 0;
|
||||
|
||||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
||||
|
||||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
|
||||
var _clsx = _interopRequireDefault(require("clsx"));
|
||||
|
||||
var _utils = require("@material-ui/utils");
|
||||
|
||||
var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
|
||||
|
||||
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
||||
|
||||
var _colorManipulator = require("../styles/colorManipulator");
|
||||
|
||||
var _TableContext = _interopRequireDefault(require("../Table/TableContext"));
|
||||
|
||||
var _Tablelvl2Context = _interopRequireDefault(require("../Table/Tablelvl2Context"));
|
||||
|
||||
var styles = function styles(theme) {
|
||||
return {
|
||||
/* Styles applied to the root element. */
|
||||
root: (0, _extends2.default)({}, theme.typography.body2, {
|
||||
display: 'table-cell',
|
||||
verticalAlign: 'inherit',
|
||||
// Workaround for a rendering bug with spanned columns in Chrome 62.0.
|
||||
// Removes the alpha (sets it to 1), and lightens or darkens the theme color.
|
||||
borderBottom: "1px solid\n ".concat(theme.palette.type === 'light' ? (0, _colorManipulator.lighten)((0, _colorManipulator.alpha)(theme.palette.divider, 1), 0.88) : (0, _colorManipulator.darken)((0, _colorManipulator.alpha)(theme.palette.divider, 1), 0.68)),
|
||||
textAlign: 'left',
|
||||
padding: 16
|
||||
}),
|
||||
|
||||
/* Styles applied to the root element if `variant="head"` or `context.table.head`. */
|
||||
head: {
|
||||
color: theme.palette.text.primary,
|
||||
lineHeight: theme.typography.pxToRem(24),
|
||||
fontWeight: theme.typography.fontWeightMedium
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `variant="body"` or `context.table.body`. */
|
||||
body: {
|
||||
color: theme.palette.text.primary
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `variant="footer"` or `context.table.footer`. */
|
||||
footer: {
|
||||
color: theme.palette.text.secondary,
|
||||
lineHeight: theme.typography.pxToRem(21),
|
||||
fontSize: theme.typography.pxToRem(12)
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `size="small"`. */
|
||||
sizeSmall: {
|
||||
padding: '6px 24px 6px 16px',
|
||||
'&:last-child': {
|
||||
paddingRight: 16
|
||||
},
|
||||
'&$paddingCheckbox': {
|
||||
width: 24,
|
||||
// prevent the checkbox column from growing
|
||||
padding: '0 12px 0 16px',
|
||||
'&:last-child': {
|
||||
paddingLeft: 12,
|
||||
paddingRight: 16
|
||||
},
|
||||
'& > *': {
|
||||
padding: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `padding="checkbox"`. */
|
||||
paddingCheckbox: {
|
||||
width: 48,
|
||||
// prevent the checkbox column from growing
|
||||
padding: '0 0 0 4px',
|
||||
'&:last-child': {
|
||||
paddingLeft: 0,
|
||||
paddingRight: 4
|
||||
}
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `padding="none"`. */
|
||||
paddingNone: {
|
||||
padding: 0,
|
||||
'&:last-child': {
|
||||
padding: 0
|
||||
}
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `align="left"`. */
|
||||
alignLeft: {
|
||||
textAlign: 'left'
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `align="center"`. */
|
||||
alignCenter: {
|
||||
textAlign: 'center'
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `align="right"`. */
|
||||
alignRight: {
|
||||
textAlign: 'right',
|
||||
flexDirection: 'row-reverse'
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `align="justify"`. */
|
||||
alignJustify: {
|
||||
textAlign: 'justify'
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `context.table.stickyHeader={true}`. */
|
||||
stickyHeader: {
|
||||
position: 'sticky',
|
||||
top: 0,
|
||||
left: 0,
|
||||
zIndex: 2,
|
||||
backgroundColor: theme.palette.background.default
|
||||
}
|
||||
};
|
||||
};
|
||||
/**
|
||||
* The component renders a `<th>` element when the parent context is a header
|
||||
* or otherwise a `<td>` element.
|
||||
*/
|
||||
|
||||
|
||||
exports.styles = styles;
|
||||
var TableCell = /*#__PURE__*/React.forwardRef(function TableCell(props, ref) {
|
||||
var _props$align = props.align,
|
||||
align = _props$align === void 0 ? 'inherit' : _props$align,
|
||||
classes = props.classes,
|
||||
className = props.className,
|
||||
component = props.component,
|
||||
paddingProp = props.padding,
|
||||
scopeProp = props.scope,
|
||||
sizeProp = props.size,
|
||||
sortDirection = props.sortDirection,
|
||||
variantProp = props.variant,
|
||||
other = (0, _objectWithoutProperties2.default)(props, ["align", "classes", "className", "component", "padding", "scope", "size", "sortDirection", "variant"]);
|
||||
var table = React.useContext(_TableContext.default);
|
||||
var tablelvl2 = React.useContext(_Tablelvl2Context.default);
|
||||
var isHeadCell = tablelvl2 && tablelvl2.variant === 'head';
|
||||
var role;
|
||||
var Component;
|
||||
|
||||
if (component) {
|
||||
Component = component;
|
||||
role = isHeadCell ? 'columnheader' : 'cell';
|
||||
} else {
|
||||
Component = isHeadCell ? 'th' : 'td';
|
||||
}
|
||||
|
||||
var scope = scopeProp;
|
||||
|
||||
if (!scope && isHeadCell) {
|
||||
scope = 'col';
|
||||
}
|
||||
|
||||
var padding = paddingProp || (table && table.padding ? table.padding : 'normal');
|
||||
var size = sizeProp || (table && table.size ? table.size : 'medium');
|
||||
var variant = variantProp || tablelvl2 && tablelvl2.variant;
|
||||
var ariaSort = null;
|
||||
|
||||
if (sortDirection) {
|
||||
ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement(Component, (0, _extends2.default)({
|
||||
ref: ref,
|
||||
className: (0, _clsx.default)(classes.root, classes[variant], className, align !== 'inherit' && classes["align".concat((0, _capitalize.default)(align))], padding !== 'normal' && classes["padding".concat((0, _capitalize.default)(padding))], size !== 'medium' && classes["size".concat((0, _capitalize.default)(size))], variant === 'head' && table && table.stickyHeader && classes.stickyHeader),
|
||||
"aria-sort": ariaSort,
|
||||
role: role,
|
||||
scope: scope
|
||||
}, other));
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? TableCell.propTypes = {
|
||||
/**
|
||||
* Set the text-align on the table cell content.
|
||||
*
|
||||
* Monetary or generally number fields **should be right aligned** as that allows
|
||||
* you to add them up quickly in your head without having to worry about decimals.
|
||||
*/
|
||||
align: _propTypes.default.oneOf(['center', 'inherit', 'justify', 'left', 'right']),
|
||||
|
||||
/**
|
||||
* The table cell contents.
|
||||
*/
|
||||
children: _propTypes.default.node,
|
||||
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
* See [CSS API](#css) below for more details.
|
||||
*/
|
||||
classes: _propTypes.default.object,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes.default.string,
|
||||
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component: _propTypes.default
|
||||
/* @typescript-to-proptypes-ignore */
|
||||
.elementType,
|
||||
|
||||
/**
|
||||
* Sets the padding applied to the cell.
|
||||
* By default, the Table parent component set the value (`normal`).
|
||||
* `default` is deprecated, use `normal` instead.
|
||||
*/
|
||||
padding: (0, _utils.chainPropTypes)(_propTypes.default.oneOf(['normal', 'checkbox', 'none', 'default']), function (props) {
|
||||
if (props.padding === 'default') {
|
||||
return new Error('Material-UI: padding="default" was renamed to padding="normal" for consistency.');
|
||||
}
|
||||
|
||||
return null;
|
||||
}),
|
||||
|
||||
/**
|
||||
* Set scope attribute.
|
||||
*/
|
||||
scope: _propTypes.default.string,
|
||||
|
||||
/**
|
||||
* Specify the size of the cell.
|
||||
* By default, the Table parent component set the value (`medium`).
|
||||
*/
|
||||
size: _propTypes.default.oneOf(['medium', 'small']),
|
||||
|
||||
/**
|
||||
* Set aria-sort direction.
|
||||
*/
|
||||
sortDirection: _propTypes.default.oneOf(['asc', 'desc', false]),
|
||||
|
||||
/**
|
||||
* Specify the cell type.
|
||||
* By default, the TableHead, TableBody or TableFooter parent component set the value.
|
||||
*/
|
||||
variant: _propTypes.default.oneOf(['body', 'footer', 'head'])
|
||||
} : void 0;
|
||||
|
||||
var _default = (0, _withStyles.default)(styles, {
|
||||
name: 'MuiTableCell'
|
||||
})(TableCell);
|
||||
|
||||
exports.default = _default;
|
2
web/node_modules/@material-ui/core/TableCell/index.d.ts
generated
vendored
Normal file
2
web/node_modules/@material-ui/core/TableCell/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
export { default } from './TableCell';
|
||||
export * from './TableCell';
|
15
web/node_modules/@material-ui/core/TableCell/index.js
generated
vendored
Normal file
15
web/node_modules/@material-ui/core/TableCell/index.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _TableCell.default;
|
||||
}
|
||||
});
|
||||
|
||||
var _TableCell = _interopRequireDefault(require("./TableCell"));
|
5
web/node_modules/@material-ui/core/TableCell/package.json
generated
vendored
Normal file
5
web/node_modules/@material-ui/core/TableCell/package.json
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"sideEffects": false,
|
||||
"module": "../esm/TableCell/index.js",
|
||||
"typings": "./index.d.ts"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue