Initial commit: Crypto trader application

This commit is contained in:
2025-12-25 20:20:40 -05:00
commit 07a04c1bb8
47895 changed files with 2042266 additions and 0 deletions
+124
View File
@@ -0,0 +1,124 @@
import * as React from 'react';
import { OverridableStringUnion } from '@mui/types';
import { SxProps } from '@mui/system';
import { OverridableComponent, OverrideProps } from '@mui/material/OverridableComponent';
import { Theme } from '../styles';
import { UsePaginationItem } from '../usePagination/usePagination';
import { PaginationItemClasses } from './paginationItemClasses';
export interface PaginationItemPropsVariantOverrides {}
export interface PaginationItemPropsSizeOverrides {}
export interface PaginationItemPropsColorOverrides {}
export interface PaginationItemOwnProps {
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<PaginationItemClasses>;
/**
* The active color.
* It supports both default and custom theme colors, which can be added as shown in the
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
* @default 'standard'
*/
color?: OverridableStringUnion<
'standard' | 'primary' | 'secondary',
PaginationItemPropsColorOverrides
>;
/**
* The components used for each slot inside.
*
* This prop is an alias for the `slots` prop.
* It's recommended to use the `slots` prop instead.
*
* @default {}
*/
components?: {
first?: React.ElementType;
last?: React.ElementType;
next?: React.ElementType;
previous?: React.ElementType;
};
/**
* If `true`, the component is disabled.
* @default false
*/
disabled?: boolean;
/**
* The current page number.
*/
page?: React.ReactNode;
/**
* If `true` the pagination item is selected.
* @default false
*/
selected?: boolean;
/**
* The shape of the pagination item.
* @default 'circular'
*/
shape?: 'circular' | 'rounded';
/**
* The size of the component.
* @default 'medium'
*/
size?: OverridableStringUnion<'small' | 'medium' | 'large', PaginationItemPropsSizeOverrides>;
/**
* The components used for each slot inside.
*
* This prop is an alias for the `components` prop, which will be deprecated in the future.
*
* @default {}
*/
slots?: {
first?: React.ElementType;
last?: React.ElementType;
next?: React.ElementType;
previous?: React.ElementType;
};
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
/**
* The type of pagination item.
* @default 'page'
*/
type?: UsePaginationItem['type'];
/**
* The variant to use.
* @default 'text'
*/
variant?: OverridableStringUnion<'text' | 'outlined', PaginationItemPropsVariantOverrides>;
}
export interface PaginationItemTypeMap<
AdditionalProps = {},
RootComponent extends React.ElementType = 'div',
> {
props: AdditionalProps & PaginationItemOwnProps;
defaultComponent: RootComponent;
}
/**
*
* Demos:
*
* - [Pagination](https://mui.com/material-ui/react-pagination/)
*
* API:
*
* - [PaginationItem API](https://mui.com/material-ui/api/pagination-item/)
*/
declare const PaginationItem: OverridableComponent<PaginationItemTypeMap>;
export type PaginationItemProps<
RootComponent extends React.ElementType = PaginationItemTypeMap['defaultComponent'],
AdditionalProps = {},
> = OverrideProps<PaginationItemTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
component?: React.ElementType;
};
export default PaginationItem;
+365
View File
@@ -0,0 +1,365 @@
'use client';
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
const _excluded = ["className", "color", "component", "components", "disabled", "page", "selected", "shape", "size", "slots", "type", "variant"];
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import composeClasses from '@mui/utils/composeClasses';
import { alpha } from '@mui/system/colorManipulator';
import { useRtl } from '@mui/system/RtlProvider';
import { useDefaultProps } from '../DefaultPropsProvider';
import paginationItemClasses, { getPaginationItemUtilityClass } from './paginationItemClasses';
import ButtonBase from '../ButtonBase';
import capitalize from '../utils/capitalize';
import FirstPageIcon from '../internal/svg-icons/FirstPage';
import LastPageIcon from '../internal/svg-icons/LastPage';
import NavigateBeforeIcon from '../internal/svg-icons/NavigateBefore';
import NavigateNextIcon from '../internal/svg-icons/NavigateNext';
import styled from '../styles/styled';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
const overridesResolver = (props, styles) => {
const {
ownerState
} = props;
return [styles.root, styles[ownerState.variant], styles[`size${capitalize(ownerState.size)}`], ownerState.variant === 'text' && styles[`text${capitalize(ownerState.color)}`], ownerState.variant === 'outlined' && styles[`outlined${capitalize(ownerState.color)}`], ownerState.shape === 'rounded' && styles.rounded, ownerState.type === 'page' && styles.page, (ownerState.type === 'start-ellipsis' || ownerState.type === 'end-ellipsis') && styles.ellipsis, (ownerState.type === 'previous' || ownerState.type === 'next') && styles.previousNext, (ownerState.type === 'first' || ownerState.type === 'last') && styles.firstLast];
};
const useUtilityClasses = ownerState => {
const {
classes,
color,
disabled,
selected,
size,
shape,
type,
variant
} = ownerState;
const slots = {
root: ['root', `size${capitalize(size)}`, variant, shape, color !== 'standard' && `color${capitalize(color)}`, color !== 'standard' && `${variant}${capitalize(color)}`, disabled && 'disabled', selected && 'selected', {
page: 'page',
first: 'firstLast',
last: 'firstLast',
'start-ellipsis': 'ellipsis',
'end-ellipsis': 'ellipsis',
previous: 'previousNext',
next: 'previousNext'
}[type]],
icon: ['icon']
};
return composeClasses(slots, getPaginationItemUtilityClass, classes);
};
const PaginationItemEllipsis = styled('div', {
name: 'MuiPaginationItem',
slot: 'Root',
overridesResolver
})(({
theme,
ownerState
}) => _extends({}, theme.typography.body2, {
borderRadius: 32 / 2,
textAlign: 'center',
boxSizing: 'border-box',
minWidth: 32,
padding: '0 6px',
margin: '0 3px',
color: (theme.vars || theme).palette.text.primary,
height: 'auto',
[`&.${paginationItemClasses.disabled}`]: {
opacity: (theme.vars || theme).palette.action.disabledOpacity
}
}, ownerState.size === 'small' && {
minWidth: 26,
borderRadius: 26 / 2,
margin: '0 1px',
padding: '0 4px'
}, ownerState.size === 'large' && {
minWidth: 40,
borderRadius: 40 / 2,
padding: '0 10px',
fontSize: theme.typography.pxToRem(15)
}));
const PaginationItemPage = styled(ButtonBase, {
name: 'MuiPaginationItem',
slot: 'Root',
overridesResolver
})(({
theme,
ownerState
}) => _extends({}, theme.typography.body2, {
borderRadius: 32 / 2,
textAlign: 'center',
boxSizing: 'border-box',
minWidth: 32,
height: 32,
padding: '0 6px',
margin: '0 3px',
color: (theme.vars || theme).palette.text.primary,
[`&.${paginationItemClasses.focusVisible}`]: {
backgroundColor: (theme.vars || theme).palette.action.focus
},
[`&.${paginationItemClasses.disabled}`]: {
opacity: (theme.vars || theme).palette.action.disabledOpacity
},
transition: theme.transitions.create(['color', 'background-color'], {
duration: theme.transitions.duration.short
}),
'&:hover': {
backgroundColor: (theme.vars || theme).palette.action.hover,
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
backgroundColor: 'transparent'
}
},
[`&.${paginationItemClasses.selected}`]: {
backgroundColor: (theme.vars || theme).palette.action.selected,
'&:hover': {
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
backgroundColor: (theme.vars || theme).palette.action.selected
}
},
[`&.${paginationItemClasses.focusVisible}`]: {
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
},
[`&.${paginationItemClasses.disabled}`]: {
opacity: 1,
color: (theme.vars || theme).palette.action.disabled,
backgroundColor: (theme.vars || theme).palette.action.selected
}
}
}, ownerState.size === 'small' && {
minWidth: 26,
height: 26,
borderRadius: 26 / 2,
margin: '0 1px',
padding: '0 4px'
}, ownerState.size === 'large' && {
minWidth: 40,
height: 40,
borderRadius: 40 / 2,
padding: '0 10px',
fontSize: theme.typography.pxToRem(15)
}, ownerState.shape === 'rounded' && {
borderRadius: (theme.vars || theme).shape.borderRadius
}), ({
theme,
ownerState
}) => _extends({}, ownerState.variant === 'text' && {
[`&.${paginationItemClasses.selected}`]: _extends({}, ownerState.color !== 'standard' && {
color: (theme.vars || theme).palette[ownerState.color].contrastText,
backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
'&:hover': {
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
}
},
[`&.${paginationItemClasses.focusVisible}`]: {
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
}
}, {
[`&.${paginationItemClasses.disabled}`]: {
color: (theme.vars || theme).palette.action.disabled
}
})
}, ownerState.variant === 'outlined' && {
border: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
[`&.${paginationItemClasses.selected}`]: _extends({}, ownerState.color !== 'standard' && {
color: (theme.vars || theme).palette[ownerState.color].main,
border: `1px solid ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : alpha(theme.palette[ownerState.color].main, 0.5)}`,
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.activatedOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity),
'&:hover': {
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / calc(${theme.vars.palette.action.activatedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity + theme.palette.action.focusOpacity),
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
backgroundColor: 'transparent'
}
},
[`&.${paginationItemClasses.focusVisible}`]: {
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / calc(${theme.vars.palette.action.activatedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity + theme.palette.action.focusOpacity)
}
}, {
[`&.${paginationItemClasses.disabled}`]: {
borderColor: (theme.vars || theme).palette.action.disabledBackground,
color: (theme.vars || theme).palette.action.disabled
}
})
}));
const PaginationItemPageIcon = styled('div', {
name: 'MuiPaginationItem',
slot: 'Icon',
overridesResolver: (props, styles) => styles.icon
})(({
theme,
ownerState
}) => _extends({
fontSize: theme.typography.pxToRem(20),
margin: '0 -8px'
}, ownerState.size === 'small' && {
fontSize: theme.typography.pxToRem(18)
}, ownerState.size === 'large' && {
fontSize: theme.typography.pxToRem(22)
}));
const PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem(inProps, ref) {
const props = useDefaultProps({
props: inProps,
name: 'MuiPaginationItem'
});
const {
className,
color = 'standard',
component,
components = {},
disabled = false,
page,
selected = false,
shape = 'circular',
size = 'medium',
slots = {},
type = 'page',
variant = 'text'
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
const ownerState = _extends({}, props, {
color,
disabled,
selected,
shape,
size,
type,
variant
});
const isRtl = useRtl();
const classes = useUtilityClasses(ownerState);
const normalizedIcons = isRtl ? {
previous: slots.next || components.next || NavigateNextIcon,
next: slots.previous || components.previous || NavigateBeforeIcon,
last: slots.first || components.first || FirstPageIcon,
first: slots.last || components.last || LastPageIcon
} : {
previous: slots.previous || components.previous || NavigateBeforeIcon,
next: slots.next || components.next || NavigateNextIcon,
first: slots.first || components.first || FirstPageIcon,
last: slots.last || components.last || LastPageIcon
};
const Icon = normalizedIcons[type];
return type === 'start-ellipsis' || type === 'end-ellipsis' ? /*#__PURE__*/_jsx(PaginationItemEllipsis, {
ref: ref,
ownerState: ownerState,
className: clsx(classes.root, className),
children: "\u2026"
}) : /*#__PURE__*/_jsxs(PaginationItemPage, _extends({
ref: ref,
ownerState: ownerState,
component: component,
disabled: disabled,
className: clsx(classes.root, className)
}, other, {
children: [type === 'page' && page, Icon ? /*#__PURE__*/_jsx(PaginationItemPageIcon, {
as: Icon,
ownerState: ownerState,
className: classes.icon
}) : null]
}));
});
process.env.NODE_ENV !== "production" ? PaginationItem.propTypes /* remove-proptypes */ = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
// │ These PropTypes are generated from the TypeScript type definitions. │
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
// └─────────────────────────────────────────────────────────────────────┘
/**
* @ignore
*/
children: PropTypes.node,
/**
* Override or extend the styles applied to the component.
*/
classes: PropTypes.object,
/**
* @ignore
*/
className: PropTypes.string,
/**
* The active color.
* It supports both default and custom theme colors, which can be added as shown in the
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
* @default 'standard'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'standard']), PropTypes.string]),
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
*/
component: PropTypes.elementType,
/**
* The components used for each slot inside.
*
* This prop is an alias for the `slots` prop.
* It's recommended to use the `slots` prop instead.
*
* @default {}
*/
components: PropTypes.shape({
first: PropTypes.elementType,
last: PropTypes.elementType,
next: PropTypes.elementType,
previous: PropTypes.elementType
}),
/**
* If `true`, the component is disabled.
* @default false
*/
disabled: PropTypes.bool,
/**
* The current page number.
*/
page: PropTypes.node,
/**
* If `true` the pagination item is selected.
* @default false
*/
selected: PropTypes.bool,
/**
* The shape of the pagination item.
* @default 'circular'
*/
shape: PropTypes.oneOf(['circular', 'rounded']),
/**
* The size of the component.
* @default 'medium'
*/
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),
/**
* The components used for each slot inside.
*
* This prop is an alias for the `components` prop, which will be deprecated in the future.
*
* @default {}
*/
slots: PropTypes.shape({
first: PropTypes.elementType,
last: PropTypes.elementType,
next: PropTypes.elementType,
previous: PropTypes.elementType
}),
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
/**
* The type of pagination item.
* @default 'page'
*/
type: PropTypes.oneOf(['end-ellipsis', 'first', 'last', 'next', 'page', 'previous', 'start-ellipsis']),
/**
* The variant to use.
* @default 'text'
*/
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['outlined', 'text']), PropTypes.string])
} : void 0;
export default PaginationItem;
+5
View File
@@ -0,0 +1,5 @@
export { default } from './PaginationItem';
export * from './PaginationItem';
export { default as paginationItemClasses } from './paginationItemClasses';
export * from './paginationItemClasses';
+5
View File
@@ -0,0 +1,5 @@
'use client';
export { default } from './PaginationItem';
export { default as paginationItemClasses } from './paginationItemClasses';
export * from './paginationItemClasses';
+6
View File
@@ -0,0 +1,6 @@
{
"sideEffects": false,
"module": "./index.js",
"main": "../node/PaginationItem/index.js",
"types": "./index.d.ts"
}
@@ -0,0 +1,54 @@
export interface PaginationItemClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the root element if `type="page"`. */
page: string;
/** Styles applied to the root element if `size="small"`. */
sizeSmall: string;
/** Styles applied to the root element if `size="large"`. */
sizeLarge: string;
/** Styles applied to the root element if `variant="text"`. */
text: string;
/** Styles applied to the root element if `variant="text"` and `color="primary"`.
* @deprecated Combine the [.MuiPaginationItem-text](/material-ui/api/pagination-item/#pagination-item-classes-text) and [.MuiPaginationItem-colorPrimary](/material-ui/api/pagination-item/#pagination-item-classes-colorPrimary) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
*/
textPrimary: string;
/** Styles applied to the root element if `variant="text"` and `color="secondary"`.
* @deprecated Combine the [.MuiPaginationItem-text](/material-ui/api/pagination-item/#pagination-item-classes-text) and [.MuiPaginationItem-colorSecondary](/material-ui/api/pagination-item/#pagination-item-classes-colorSecondary) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
*/
textSecondary: string;
/** Styles applied to the root element if `variant="outlined"`. */
outlined: string;
/** Styles applied to the root element if `variant="outlined"` and `color="primary"`.
* @deprecated Combine the [.MuiPaginationItem-outlined](/material-ui/api/pagination-item/#pagination-item-classes-outlined) and [.MuiPaginationItem-colorPrimary](/material-ui/api/pagination-item/#pagination-item-classes-colorPrimary) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
*/
outlinedPrimary: string;
/** Styles applied to the root element if `variant="outlined"` and `color="secondary"`.
* @deprecated Combine the [.MuiPaginationItem-outlined](/material-ui/api/pagination-item/#pagination-item-classes-outlined) and [.MuiPaginationItem-colorSecondary](/material-ui/api/pagination-item/#pagination-item-classes-colorSecondary) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
*/
outlinedSecondary: string;
/** Styles applied to the root element if `rounded="true"`. */
rounded: string;
/** Styles applied to the root element if `type="start-ellipsis"` or `type="end-ellipsis"`. */
ellipsis: string;
/** Styles applied to the root element if `type="first"` or type="last". */
firstLast: string;
/** Styles applied to the root element if `type="previous"` or type="next". */
previousNext: string;
/** State class applied to the root element if keyboard focused. */
focusVisible: string;
/** State class applied to the root element if `disabled={true}`. */
disabled: string;
/** State class applied to the root element if `selected={true}`. */
selected: string;
/** Styles applied to the icon to display. */
icon: string;
/** Styles applied to the root element if `color="primary"`. */
colorPrimary: string;
/** Styles applied to the root element if `color="secondary"`. */
colorSecondary: string;
}
export type PaginationItemClassKey = keyof PaginationItemClasses;
export declare function getPaginationItemUtilityClass(slot: string): string;
declare const paginationItemClasses: PaginationItemClasses;
export default paginationItemClasses;
@@ -0,0 +1,7 @@
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
import generateUtilityClass from '@mui/utils/generateUtilityClass';
export function getPaginationItemUtilityClass(slot) {
return generateUtilityClass('MuiPaginationItem', slot);
}
const paginationItemClasses = generateUtilityClasses('MuiPaginationItem', ['root', 'page', 'sizeSmall', 'sizeLarge', 'text', 'textPrimary', 'textSecondary', 'outlined', 'outlinedPrimary', 'outlinedSecondary', 'rounded', 'ellipsis', 'firstLast', 'previousNext', 'focusVisible', 'disabled', 'selected', 'icon', 'colorPrimary', 'colorSecondary']);
export default paginationItemClasses;