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

View File

@@ -0,0 +1,137 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { TypographyProps } from '../Typography';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '..';
import { CardHeaderClasses } from './cardHeaderClasses';
export interface CardHeaderOwnProps<
TitleTypographyComponent extends React.ElementType = 'span',
SubheaderTypographyComponent extends React.ElementType = 'span',
> {
/**
* The action to display in the card header.
*/
action?: React.ReactNode;
/**
* The Avatar element to display.
*/
avatar?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<CardHeaderClasses>;
/**
* If `true`, `subheader` and `title` won't be wrapped by a Typography component.
* This can be useful to render an alternative Typography variant by wrapping
* the `title` text, and optional `subheader` text
* with the Typography component.
* @default false
*/
disableTypography?: boolean;
/**
* The content of the component.
*/
subheader?: React.ReactNode;
/**
* These props will be forwarded to the subheader
* (as long as disableTypography is not `true`).
*/
subheaderTypographyProps?: TypographyProps<
SubheaderTypographyComponent,
{
component?: SubheaderTypographyComponent;
}
>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
/**
* The content of the component.
*/
title?: React.ReactNode;
/**
* These props will be forwarded to the title
* (as long as disableTypography is not `true`).
*/
titleTypographyProps?: TypographyProps<
TitleTypographyComponent,
{
component?: TitleTypographyComponent;
}
>;
}
export interface CardHeaderTypeMap<
AdditionalProps = {},
RootComponent extends React.ElementType = 'div',
TitleTypographyComponent extends React.ElementType = 'span',
SubheaderTypographyComponent extends React.ElementType = 'span',
> {
props: AdditionalProps &
CardHeaderOwnProps<TitleTypographyComponent, SubheaderTypographyComponent>;
defaultComponent: RootComponent;
}
/**
*
* Demos:
*
* - [Card](https://mui.com/material-ui/react-card/)
*
* API:
*
* - [CardHeader API](https://mui.com/material-ui/api/card-header/)
*/
declare const CardHeader: OverridableCardHeader;
export interface OverridableCardHeader extends OverridableComponent<CardHeaderTypeMap> {
<
RootComponent extends React.ElementType = CardHeaderTypeMap['defaultComponent'],
AdditionalProps = {},
TitleTypographyComponent extends React.ElementType = 'span',
SubheaderTypographyComponent extends React.ElementType = 'span',
>(
props: CardHeaderPropsWithComponent<
RootComponent,
AdditionalProps,
TitleTypographyComponent,
SubheaderTypographyComponent
>,
): React.JSX.Element;
}
export type CardHeaderProps<
RootComponent extends React.ElementType = CardHeaderTypeMap['defaultComponent'],
AdditionalProps = {},
TitleTypographyComponent extends React.ElementType = 'span',
SubheaderTypographyComponent extends React.ElementType = 'span',
> = OverrideProps<
CardHeaderTypeMap<
AdditionalProps,
RootComponent,
TitleTypographyComponent,
SubheaderTypographyComponent
>,
RootComponent
>;
export type CardHeaderPropsWithComponent<
RootComponent extends React.ElementType = CardHeaderTypeMap['defaultComponent'],
AdditionalProps = {},
TitleTypographyComponent extends React.ElementType = 'span',
SubheaderTypographyComponent extends React.ElementType = 'span',
> = {
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
*/
component?: RootComponent;
} & CardHeaderProps<
RootComponent,
AdditionalProps,
TitleTypographyComponent,
SubheaderTypographyComponent
>;
export default CardHeader;

View File

@@ -0,0 +1,196 @@
'use client';
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
const _excluded = ["action", "avatar", "className", "component", "disableTypography", "subheader", "subheaderTypographyProps", "title", "titleTypographyProps"];
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import composeClasses from '@mui/utils/composeClasses';
import Typography from '../Typography';
import { useDefaultProps } from '../DefaultPropsProvider';
import styled from '../styles/styled';
import cardHeaderClasses, { getCardHeaderUtilityClass } from './cardHeaderClasses';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
const useUtilityClasses = ownerState => {
const {
classes
} = ownerState;
const slots = {
root: ['root'],
avatar: ['avatar'],
action: ['action'],
content: ['content'],
title: ['title'],
subheader: ['subheader']
};
return composeClasses(slots, getCardHeaderUtilityClass, classes);
};
const CardHeaderRoot = styled('div', {
name: 'MuiCardHeader',
slot: 'Root',
overridesResolver: (props, styles) => _extends({
[`& .${cardHeaderClasses.title}`]: styles.title,
[`& .${cardHeaderClasses.subheader}`]: styles.subheader
}, styles.root)
})({
display: 'flex',
alignItems: 'center',
padding: 16
});
const CardHeaderAvatar = styled('div', {
name: 'MuiCardHeader',
slot: 'Avatar',
overridesResolver: (props, styles) => styles.avatar
})({
display: 'flex',
flex: '0 0 auto',
marginRight: 16
});
const CardHeaderAction = styled('div', {
name: 'MuiCardHeader',
slot: 'Action',
overridesResolver: (props, styles) => styles.action
})({
flex: '0 0 auto',
alignSelf: 'flex-start',
marginTop: -4,
marginRight: -8,
marginBottom: -4
});
const CardHeaderContent = styled('div', {
name: 'MuiCardHeader',
slot: 'Content',
overridesResolver: (props, styles) => styles.content
})({
flex: '1 1 auto'
});
const CardHeader = /*#__PURE__*/React.forwardRef(function CardHeader(inProps, ref) {
const props = useDefaultProps({
props: inProps,
name: 'MuiCardHeader'
});
const {
action,
avatar,
className,
component = 'div',
disableTypography = false,
subheader: subheaderProp,
subheaderTypographyProps,
title: titleProp,
titleTypographyProps
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
const ownerState = _extends({}, props, {
component,
disableTypography
});
const classes = useUtilityClasses(ownerState);
let title = titleProp;
if (title != null && title.type !== Typography && !disableTypography) {
title = /*#__PURE__*/_jsx(Typography, _extends({
variant: avatar ? 'body2' : 'h5',
className: classes.title,
component: "span",
display: "block"
}, titleTypographyProps, {
children: title
}));
}
let subheader = subheaderProp;
if (subheader != null && subheader.type !== Typography && !disableTypography) {
subheader = /*#__PURE__*/_jsx(Typography, _extends({
variant: avatar ? 'body2' : 'body1',
className: classes.subheader,
color: "text.secondary",
component: "span",
display: "block"
}, subheaderTypographyProps, {
children: subheader
}));
}
return /*#__PURE__*/_jsxs(CardHeaderRoot, _extends({
className: clsx(classes.root, className),
as: component,
ref: ref,
ownerState: ownerState
}, other, {
children: [avatar && /*#__PURE__*/_jsx(CardHeaderAvatar, {
className: classes.avatar,
ownerState: ownerState,
children: avatar
}), /*#__PURE__*/_jsxs(CardHeaderContent, {
className: classes.content,
ownerState: ownerState,
children: [title, subheader]
}), action && /*#__PURE__*/_jsx(CardHeaderAction, {
className: classes.action,
ownerState: ownerState,
children: action
})]
}));
});
process.env.NODE_ENV !== "production" ? CardHeader.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`. │
// └─────────────────────────────────────────────────────────────────────┘
/**
* The action to display in the card header.
*/
action: PropTypes.node,
/**
* The Avatar element to display.
*/
avatar: PropTypes.node,
/**
* @ignore
*/
children: PropTypes.node,
/**
* Override or extend the styles applied to the component.
*/
classes: PropTypes.object,
/**
* @ignore
*/
className: PropTypes.string,
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
*/
component: PropTypes.elementType,
/**
* If `true`, `subheader` and `title` won't be wrapped by a Typography component.
* This can be useful to render an alternative Typography variant by wrapping
* the `title` text, and optional `subheader` text
* with the Typography component.
* @default false
*/
disableTypography: PropTypes.bool,
/**
* The content of the component.
*/
subheader: PropTypes.node,
/**
* These props will be forwarded to the subheader
* (as long as disableTypography is not `true`).
*/
subheaderTypographyProps: PropTypes.object,
/**
* 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 content of the component.
*/
title: PropTypes.node,
/**
* These props will be forwarded to the title
* (as long as disableTypography is not `true`).
*/
titleTypographyProps: PropTypes.object
} : void 0;
export default CardHeader;

View File

@@ -0,0 +1,18 @@
export interface CardHeaderClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the avatar element. */
avatar: string;
/** Styles applied to the action element. */
action: string;
/** Styles applied to the content wrapper element. */
content: string;
/** Styles applied to the title Typography element. */
title: string;
/** Styles applied to the subheader Typography element. */
subheader: string;
}
export type CardHeaderClassKey = keyof CardHeaderClasses;
export declare function getCardHeaderUtilityClass(slot: string): string;
declare const cardHeaderClasses: CardHeaderClasses;
export default cardHeaderClasses;

View File

@@ -0,0 +1,7 @@
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
import generateUtilityClass from '@mui/utils/generateUtilityClass';
export function getCardHeaderUtilityClass(slot) {
return generateUtilityClass('MuiCardHeader', slot);
}
const cardHeaderClasses = generateUtilityClasses('MuiCardHeader', ['root', 'avatar', 'action', 'content', 'title', 'subheader']);
export default cardHeaderClasses;

View File

@@ -0,0 +1,5 @@
export { default } from './CardHeader';
export * from './CardHeader';
export { default as cardHeaderClasses } from './cardHeaderClasses';
export * from './cardHeaderClasses';

View File

@@ -0,0 +1,5 @@
'use client';
export { default } from './CardHeader';
export { default as cardHeaderClasses } from './cardHeaderClasses';
export * from './cardHeaderClasses';

View File

@@ -0,0 +1,6 @@
{
"sideEffects": false,
"module": "./index.js",
"main": "../node/CardHeader/index.js",
"types": "./index.d.ts"
}