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,62 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { PaperProps } from '../Paper';
import { LinearProgressProps } from '../LinearProgress';
import { MobileStepperClasses } from './mobileStepperClasses';
export interface MobileStepperProps extends StandardProps<PaperProps, 'children' | 'variant'> {
/**
* Set the active step (zero based index).
* Defines which dot is highlighted when the variant is 'dots'.
* @default 0
*/
activeStep?: number;
/**
* A back button element. For instance, it can be a `Button` or an `IconButton`.
*/
backButton: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<MobileStepperClasses>;
/**
* Props applied to the `LinearProgress` element.
*/
LinearProgressProps?: Partial<LinearProgressProps>;
/**
* A next button element. For instance, it can be a `Button` or an `IconButton`.
*/
nextButton: React.ReactNode;
/**
* Set the positioning type.
* @default 'bottom'
*/
position?: 'bottom' | 'top' | 'static';
/**
* The total steps.
*/
steps: number;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
/**
* The variant to use.
* @default 'dots'
*/
variant?: 'text' | 'dots' | 'progress';
}
/**
*
* Demos:
*
* - [Stepper](https://mui.com/material-ui/react-stepper/)
*
* API:
*
* - [MobileStepper API](https://mui.com/material-ui/api/mobile-stepper/)
* - inherits [Paper API](https://mui.com/material-ui/api/paper/)
*/
export default function MobileStepper(props: MobileStepperProps): React.JSX.Element;

View File

@@ -0,0 +1,215 @@
'use client';
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
const _excluded = ["activeStep", "backButton", "className", "LinearProgressProps", "nextButton", "position", "steps", "variant"];
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import integerPropType from '@mui/utils/integerPropType';
import composeClasses from '@mui/utils/composeClasses';
import Paper from '../Paper';
import capitalize from '../utils/capitalize';
import LinearProgress from '../LinearProgress';
import { useDefaultProps } from '../DefaultPropsProvider';
import styled, { slotShouldForwardProp } from '../styles/styled';
import { getMobileStepperUtilityClass } from './mobileStepperClasses';
import { jsxs as _jsxs } from "react/jsx-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
const useUtilityClasses = ownerState => {
const {
classes,
position
} = ownerState;
const slots = {
root: ['root', `position${capitalize(position)}`],
dots: ['dots'],
dot: ['dot'],
dotActive: ['dotActive'],
progress: ['progress']
};
return composeClasses(slots, getMobileStepperUtilityClass, classes);
};
const MobileStepperRoot = styled(Paper, {
name: 'MuiMobileStepper',
slot: 'Root',
overridesResolver: (props, styles) => {
const {
ownerState
} = props;
return [styles.root, styles[`position${capitalize(ownerState.position)}`]];
}
})(({
theme,
ownerState
}) => _extends({
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
background: (theme.vars || theme).palette.background.default,
padding: 8
}, ownerState.position === 'bottom' && {
position: 'fixed',
bottom: 0,
left: 0,
right: 0,
zIndex: (theme.vars || theme).zIndex.mobileStepper
}, ownerState.position === 'top' && {
position: 'fixed',
top: 0,
left: 0,
right: 0,
zIndex: (theme.vars || theme).zIndex.mobileStepper
}));
const MobileStepperDots = styled('div', {
name: 'MuiMobileStepper',
slot: 'Dots',
overridesResolver: (props, styles) => styles.dots
})(({
ownerState
}) => _extends({}, ownerState.variant === 'dots' && {
display: 'flex',
flexDirection: 'row'
}));
const MobileStepperDot = styled('div', {
name: 'MuiMobileStepper',
slot: 'Dot',
shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'dotActive',
overridesResolver: (props, styles) => {
const {
dotActive
} = props;
return [styles.dot, dotActive && styles.dotActive];
}
})(({
theme,
ownerState,
dotActive
}) => _extends({}, ownerState.variant === 'dots' && _extends({
transition: theme.transitions.create('background-color', {
duration: theme.transitions.duration.shortest
}),
backgroundColor: (theme.vars || theme).palette.action.disabled,
borderRadius: '50%',
width: 8,
height: 8,
margin: '0 2px'
}, dotActive && {
backgroundColor: (theme.vars || theme).palette.primary.main
})));
const MobileStepperProgress = styled(LinearProgress, {
name: 'MuiMobileStepper',
slot: 'Progress',
overridesResolver: (props, styles) => styles.progress
})(({
ownerState
}) => _extends({}, ownerState.variant === 'progress' && {
width: '50%'
}));
const MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(inProps, ref) {
const props = useDefaultProps({
props: inProps,
name: 'MuiMobileStepper'
});
const {
activeStep = 0,
backButton,
className,
LinearProgressProps,
nextButton,
position = 'bottom',
steps,
variant = 'dots'
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
const ownerState = _extends({}, props, {
activeStep,
position,
variant
});
let value;
if (variant === 'progress') {
if (steps === 1) {
value = 100;
} else {
value = Math.ceil(activeStep / (steps - 1) * 100);
}
}
const classes = useUtilityClasses(ownerState);
return /*#__PURE__*/_jsxs(MobileStepperRoot, _extends({
square: true,
elevation: 0,
className: clsx(classes.root, className),
ref: ref,
ownerState: ownerState
}, other, {
children: [backButton, variant === 'text' && /*#__PURE__*/_jsxs(React.Fragment, {
children: [activeStep + 1, " / ", steps]
}), variant === 'dots' && /*#__PURE__*/_jsx(MobileStepperDots, {
ownerState: ownerState,
className: classes.dots,
children: [...new Array(steps)].map((_, index) => /*#__PURE__*/_jsx(MobileStepperDot, {
className: clsx(classes.dot, index === activeStep && classes.dotActive),
ownerState: ownerState,
dotActive: index === activeStep
}, index))
}), variant === 'progress' && /*#__PURE__*/_jsx(MobileStepperProgress, _extends({
ownerState: ownerState,
className: classes.progress,
variant: "determinate",
value: value
}, LinearProgressProps)), nextButton]
}));
});
process.env.NODE_ENV !== "production" ? MobileStepper.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`. │
// └─────────────────────────────────────────────────────────────────────┘
/**
* Set the active step (zero based index).
* Defines which dot is highlighted when the variant is 'dots'.
* @default 0
*/
activeStep: integerPropType,
/**
* A back button element. For instance, it can be a `Button` or an `IconButton`.
*/
backButton: PropTypes.node,
/**
* Override or extend the styles applied to the component.
*/
classes: PropTypes.object,
/**
* @ignore
*/
className: PropTypes.string,
/**
* Props applied to the `LinearProgress` element.
*/
LinearProgressProps: PropTypes.object,
/**
* A next button element. For instance, it can be a `Button` or an `IconButton`.
*/
nextButton: PropTypes.node,
/**
* Set the positioning type.
* @default 'bottom'
*/
position: PropTypes.oneOf(['bottom', 'static', 'top']),
/**
* The total steps.
*/
steps: integerPropType.isRequired,
/**
* 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 variant to use.
* @default 'dots'
*/
variant: PropTypes.oneOf(['dots', 'progress', 'text'])
} : void 0;
export default MobileStepper;

View File

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

View File

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

View File

@@ -0,0 +1,22 @@
export interface MobileStepperClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the root element if `position="bottom"`. */
positionBottom: string;
/** Styles applied to the root element if `position="top"`. */
positionTop: string;
/** Styles applied to the root element if `position="static"`. */
positionStatic: string;
/** Styles applied to the dots container if `variant="dots"`. */
dots: string;
/** Styles applied to each dot if `variant="dots"`. */
dot: string;
/** Styles applied to a dot if `variant="dots"` and this is the active step. */
dotActive: string;
/** Styles applied to the Linear Progress component if `variant="progress"`. */
progress: string;
}
export type MobileStepperClassKey = keyof MobileStepperClasses;
export declare function getMobileStepperUtilityClass(slot: string): string;
declare const mobileStepperClasses: MobileStepperClasses;
export default mobileStepperClasses;

View File

@@ -0,0 +1,7 @@
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
import generateUtilityClass from '@mui/utils/generateUtilityClass';
export function getMobileStepperUtilityClass(slot) {
return generateUtilityClass('MuiMobileStepper', slot);
}
const mobileStepperClasses = generateUtilityClasses('MuiMobileStepper', ['root', 'positionBottom', 'positionTop', 'positionStatic', 'dots', 'dot', 'dotActive', 'progress']);
export default mobileStepperClasses;

View File

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