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
53
web/node_modules/@material-ui/core/Tab/Tab.d.ts
generated
vendored
Normal file
53
web/node_modules/@material-ui/core/Tab/Tab.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
import * as React from 'react';
|
||||
import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
|
||||
import { OverrideProps } from '../OverridableComponent';
|
||||
|
||||
export type TabTypeMap<P = {}, D extends React.ElementType = 'div'> = ExtendButtonBaseTypeMap<{
|
||||
props: P & {
|
||||
disableFocusRipple?: boolean;
|
||||
fullWidth?: boolean;
|
||||
icon?: string | React.ReactElement;
|
||||
label?: React.ReactNode;
|
||||
onChange?: (event: React.ChangeEvent<{ checked: boolean }>, value: any) => void;
|
||||
onClick?: React.EventHandler<any>;
|
||||
selected?: boolean;
|
||||
style?: React.CSSProperties;
|
||||
textColor?: string | 'secondary' | 'primary' | 'inherit';
|
||||
value?: any;
|
||||
wrapped?: boolean;
|
||||
};
|
||||
defaultComponent: D;
|
||||
classKey: TabClassKey;
|
||||
}>;
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Tabs](https://material-ui.com/components/tabs/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Tab API](https://material-ui.com/api/tab/)
|
||||
* - inherits [ButtonBase API](https://material-ui.com/api/button-base/)
|
||||
*/
|
||||
declare const Tab: ExtendButtonBase<TabTypeMap>;
|
||||
|
||||
export type TabClassKey =
|
||||
| 'root'
|
||||
| 'labelIcon'
|
||||
| 'textColorInherit'
|
||||
| 'textColorPrimary'
|
||||
| 'textColorSecondary'
|
||||
| 'selected'
|
||||
| 'disabled'
|
||||
| 'fullWidth'
|
||||
| 'wrapped'
|
||||
| 'wrapper';
|
||||
|
||||
export type TabProps<
|
||||
D extends React.ElementType = TabTypeMap['defaultComponent'],
|
||||
P = {}
|
||||
> = OverrideProps<TabTypeMap<P, D>, D>;
|
||||
|
||||
export default Tab;
|
284
web/node_modules/@material-ui/core/Tab/Tab.js
generated
vendored
Normal file
284
web/node_modules/@material-ui/core/Tab/Tab.js
generated
vendored
Normal file
|
@ -0,0 +1,284 @@
|
|||
"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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
||||
|
||||
var _extends3 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
|
||||
var _clsx = _interopRequireDefault(require("clsx"));
|
||||
|
||||
var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
|
||||
|
||||
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
||||
|
||||
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
||||
|
||||
var _unsupportedProp = _interopRequireDefault(require("../utils/unsupportedProp"));
|
||||
|
||||
var styles = function styles(theme) {
|
||||
var _extends2;
|
||||
|
||||
return {
|
||||
/* Styles applied to the root element. */
|
||||
root: (0, _extends3.default)({}, theme.typography.button, (_extends2 = {
|
||||
maxWidth: 264,
|
||||
minWidth: 72,
|
||||
position: 'relative',
|
||||
boxSizing: 'border-box',
|
||||
minHeight: 48,
|
||||
flexShrink: 0,
|
||||
padding: '6px 12px'
|
||||
}, (0, _defineProperty2.default)(_extends2, theme.breakpoints.up('sm'), {
|
||||
padding: '6px 24px'
|
||||
}), (0, _defineProperty2.default)(_extends2, "overflow", 'hidden'), (0, _defineProperty2.default)(_extends2, "whiteSpace", 'normal'), (0, _defineProperty2.default)(_extends2, "textAlign", 'center'), (0, _defineProperty2.default)(_extends2, theme.breakpoints.up('sm'), {
|
||||
minWidth: 160
|
||||
}), _extends2)),
|
||||
|
||||
/* Styles applied to the root element if both `icon` and `label` are provided. */
|
||||
labelIcon: {
|
||||
minHeight: 72,
|
||||
paddingTop: 9,
|
||||
'& $wrapper > *:first-child': {
|
||||
marginBottom: 6
|
||||
}
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor="inherit"`. */
|
||||
textColorInherit: {
|
||||
color: 'inherit',
|
||||
opacity: 0.7,
|
||||
'&$selected': {
|
||||
opacity: 1
|
||||
},
|
||||
'&$disabled': {
|
||||
opacity: 0.5
|
||||
}
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor="primary"`. */
|
||||
textColorPrimary: {
|
||||
color: theme.palette.text.secondary,
|
||||
'&$selected': {
|
||||
color: theme.palette.primary.main
|
||||
},
|
||||
'&$disabled': {
|
||||
color: theme.palette.text.disabled
|
||||
}
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor="secondary"`. */
|
||||
textColorSecondary: {
|
||||
color: theme.palette.text.secondary,
|
||||
'&$selected': {
|
||||
color: theme.palette.secondary.main
|
||||
},
|
||||
'&$disabled': {
|
||||
color: theme.palette.text.disabled
|
||||
}
|
||||
},
|
||||
|
||||
/* Pseudo-class applied to the root element if `selected={true}` (controlled by the Tabs component). */
|
||||
selected: {},
|
||||
|
||||
/* Pseudo-class applied to the root element if `disabled={true}` (controlled by the Tabs component). */
|
||||
disabled: {},
|
||||
|
||||
/* Styles applied to the root element if `fullWidth={true}` (controlled by the Tabs component). */
|
||||
fullWidth: {
|
||||
flexShrink: 1,
|
||||
flexGrow: 1,
|
||||
flexBasis: 0,
|
||||
maxWidth: 'none'
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `wrapped={true}`. */
|
||||
wrapped: {
|
||||
fontSize: theme.typography.pxToRem(12),
|
||||
lineHeight: 1.5
|
||||
},
|
||||
|
||||
/* Styles applied to the `icon` and `label`'s wrapper element. */
|
||||
wrapper: {
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
width: '100%',
|
||||
flexDirection: 'column'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
exports.styles = styles;
|
||||
var Tab = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
||||
var classes = props.classes,
|
||||
className = props.className,
|
||||
_props$disabled = props.disabled,
|
||||
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
||||
_props$disableFocusRi = props.disableFocusRipple,
|
||||
disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,
|
||||
fullWidth = props.fullWidth,
|
||||
icon = props.icon,
|
||||
indicator = props.indicator,
|
||||
label = props.label,
|
||||
onChange = props.onChange,
|
||||
onClick = props.onClick,
|
||||
onFocus = props.onFocus,
|
||||
selected = props.selected,
|
||||
selectionFollowsFocus = props.selectionFollowsFocus,
|
||||
_props$textColor = props.textColor,
|
||||
textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,
|
||||
value = props.value,
|
||||
_props$wrapped = props.wrapped,
|
||||
wrapped = _props$wrapped === void 0 ? false : _props$wrapped,
|
||||
other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "disabled", "disableFocusRipple", "fullWidth", "icon", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"]);
|
||||
|
||||
var handleClick = function handleClick(event) {
|
||||
if (onChange) {
|
||||
onChange(event, value);
|
||||
}
|
||||
|
||||
if (onClick) {
|
||||
onClick(event);
|
||||
}
|
||||
};
|
||||
|
||||
var handleFocus = function handleFocus(event) {
|
||||
if (selectionFollowsFocus && !selected && onChange) {
|
||||
onChange(event, value);
|
||||
}
|
||||
|
||||
if (onFocus) {
|
||||
onFocus(event);
|
||||
}
|
||||
};
|
||||
|
||||
return /*#__PURE__*/React.createElement(_ButtonBase.default, (0, _extends3.default)({
|
||||
focusRipple: !disableFocusRipple,
|
||||
className: (0, _clsx.default)(classes.root, classes["textColor".concat((0, _capitalize.default)(textColor))], className, disabled && classes.disabled, selected && classes.selected, label && icon && classes.labelIcon, fullWidth && classes.fullWidth, wrapped && classes.wrapped),
|
||||
ref: ref,
|
||||
role: "tab",
|
||||
"aria-selected": selected,
|
||||
disabled: disabled,
|
||||
onClick: handleClick,
|
||||
onFocus: handleFocus,
|
||||
tabIndex: selected ? 0 : -1
|
||||
}, other), /*#__PURE__*/React.createElement("span", {
|
||||
className: classes.wrapper
|
||||
}, icon, label), indicator);
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Tab.propTypes = {
|
||||
/**
|
||||
* This prop isn't supported.
|
||||
* Use the `component` prop if you need to change the children structure.
|
||||
*/
|
||||
children: _unsupportedProp.default,
|
||||
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
* See [CSS API](#css) below for more details.
|
||||
*/
|
||||
classes: _propTypes.default.object.isRequired,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes.default.string,
|
||||
|
||||
/**
|
||||
* If `true`, the tab will be disabled.
|
||||
*/
|
||||
disabled: _propTypes.default.bool,
|
||||
|
||||
/**
|
||||
* If `true`, the keyboard focus ripple will be disabled.
|
||||
*/
|
||||
disableFocusRipple: _propTypes.default.bool,
|
||||
|
||||
/**
|
||||
* If `true`, the ripple effect will be disabled.
|
||||
*/
|
||||
disableRipple: _propTypes.default.bool,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
fullWidth: _propTypes.default.bool,
|
||||
|
||||
/**
|
||||
* The icon element.
|
||||
*/
|
||||
icon: _propTypes.default.node,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
* For server-side rendering consideration, we let the selected tab
|
||||
* render the indicator.
|
||||
*/
|
||||
indicator: _propTypes.default.node,
|
||||
|
||||
/**
|
||||
* The label element.
|
||||
*/
|
||||
label: _propTypes.default.node,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
onChange: _propTypes.default.func,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
onClick: _propTypes.default.func,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
onFocus: _propTypes.default.func,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
selected: _propTypes.default.bool,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
selectionFollowsFocus: _propTypes.default.bool,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
textColor: _propTypes.default.oneOf(['secondary', 'primary', 'inherit']),
|
||||
|
||||
/**
|
||||
* You can provide your own value. Otherwise, we fallback to the child position index.
|
||||
*/
|
||||
value: _propTypes.default.any,
|
||||
|
||||
/**
|
||||
* Tab labels appear in a single row.
|
||||
* They can use a second line if needed.
|
||||
*/
|
||||
wrapped: _propTypes.default.bool
|
||||
} : void 0;
|
||||
|
||||
var _default = (0, _withStyles.default)(styles, {
|
||||
name: 'MuiTab'
|
||||
})(Tab);
|
||||
|
||||
exports.default = _default;
|
2
web/node_modules/@material-ui/core/Tab/index.d.ts
generated
vendored
Normal file
2
web/node_modules/@material-ui/core/Tab/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
export { default } from './Tab';
|
||||
export * from './Tab';
|
15
web/node_modules/@material-ui/core/Tab/index.js
generated
vendored
Normal file
15
web/node_modules/@material-ui/core/Tab/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 _Tab.default;
|
||||
}
|
||||
});
|
||||
|
||||
var _Tab = _interopRequireDefault(require("./Tab"));
|
5
web/node_modules/@material-ui/core/Tab/package.json
generated
vendored
Normal file
5
web/node_modules/@material-ui/core/Tab/package.json
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"sideEffects": false,
|
||||
"module": "../esm/Tab/index.js",
|
||||
"typings": "./index.d.ts"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue