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
+81
View File
@@ -0,0 +1,81 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '../styles';
import { PaperProps } from '../Paper';
import { StepperClasses } from './stepperClasses';
export type Orientation = 'horizontal' | 'vertical';
export interface StepperOwnProps extends Pick<PaperProps, 'elevation' | 'square' | 'variant'> {
/**
* Set the active step (zero based index).
* Set to -1 to disable all the steps.
* @default 0
*/
activeStep?: number;
/**
* If set to 'true' and orientation is horizontal,
* then the step label will be positioned under the icon.
* @default false
*/
alternativeLabel?: boolean;
/**
* Two or more `<Step />` components.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<StepperClasses>;
/**
* An element to be placed between each step.
* @default <StepConnector />
*/
connector?: React.ReactElement<any, any> | null;
/**
* If set the `Stepper` will not assist in controlling steps for linear flow.
* @default false
*/
nonLinear?: boolean;
/**
* The component orientation (layout flow direction).
* @default 'horizontal'
*/
orientation?: Orientation;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
}
export interface StepperTypeMap<
AdditionalProps = {},
RootComponent extends React.ElementType = 'div',
> {
props: AdditionalProps & StepperOwnProps;
defaultComponent: RootComponent;
}
export type StepperProps<
RootComponent extends React.ElementType = StepperTypeMap['defaultComponent'],
AdditionalProps = { component?: React.ElementType },
> = OverrideProps<StepperTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
component?: React.ElementType;
};
export type StepperClasskey = keyof NonNullable<StepperProps['classes']>;
/**
*
* Demos:
*
* - [Stepper](https://mui.com/material-ui/react-stepper/)
*
* API:
*
* - [Stepper API](https://mui.com/material-ui/api/stepper/)
*/
declare const Stepper: OverridableComponent<StepperTypeMap>;
export default Stepper;
+154
View File
@@ -0,0 +1,154 @@
'use client';
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
const _excluded = ["activeStep", "alternativeLabel", "children", "className", "component", "connector", "nonLinear", "orientation"];
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 { useDefaultProps } from '../DefaultPropsProvider';
import styled from '../styles/styled';
import { getStepperUtilityClass } from './stepperClasses';
import StepConnector from '../StepConnector';
import StepperContext from './StepperContext';
import { jsx as _jsx } from "react/jsx-runtime";
const useUtilityClasses = ownerState => {
const {
orientation,
nonLinear,
alternativeLabel,
classes
} = ownerState;
const slots = {
root: ['root', orientation, nonLinear && 'nonLinear', alternativeLabel && 'alternativeLabel']
};
return composeClasses(slots, getStepperUtilityClass, classes);
};
const StepperRoot = styled('div', {
name: 'MuiStepper',
slot: 'Root',
overridesResolver: (props, styles) => {
const {
ownerState
} = props;
return [styles.root, styles[ownerState.orientation], ownerState.alternativeLabel && styles.alternativeLabel, ownerState.nonLinear && styles.nonLinear];
}
})(({
ownerState
}) => _extends({
display: 'flex'
}, ownerState.orientation === 'horizontal' && {
flexDirection: 'row',
alignItems: 'center'
}, ownerState.orientation === 'vertical' && {
flexDirection: 'column'
}, ownerState.alternativeLabel && {
alignItems: 'flex-start'
}));
const defaultConnector = /*#__PURE__*/_jsx(StepConnector, {});
const Stepper = /*#__PURE__*/React.forwardRef(function Stepper(inProps, ref) {
const props = useDefaultProps({
props: inProps,
name: 'MuiStepper'
});
const {
activeStep = 0,
alternativeLabel = false,
children,
className,
component = 'div',
connector = defaultConnector,
nonLinear = false,
orientation = 'horizontal'
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
const ownerState = _extends({}, props, {
nonLinear,
alternativeLabel,
orientation,
component
});
const classes = useUtilityClasses(ownerState);
const childrenArray = React.Children.toArray(children).filter(Boolean);
const steps = childrenArray.map((step, index) => {
return /*#__PURE__*/React.cloneElement(step, _extends({
index,
last: index + 1 === childrenArray.length
}, step.props));
});
const contextValue = React.useMemo(() => ({
activeStep,
alternativeLabel,
connector,
nonLinear,
orientation
}), [activeStep, alternativeLabel, connector, nonLinear, orientation]);
return /*#__PURE__*/_jsx(StepperContext.Provider, {
value: contextValue,
children: /*#__PURE__*/_jsx(StepperRoot, _extends({
as: component,
ownerState: ownerState,
className: clsx(classes.root, className),
ref: ref
}, other, {
children: steps
}))
});
});
process.env.NODE_ENV !== "production" ? Stepper.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).
* Set to -1 to disable all the steps.
* @default 0
*/
activeStep: integerPropType,
/**
* If set to 'true' and orientation is horizontal,
* then the step label will be positioned under the icon.
* @default false
*/
alternativeLabel: PropTypes.bool,
/**
* Two or more `<Step />` components.
*/
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,
/**
* An element to be placed between each step.
* @default <StepConnector />
*/
connector: PropTypes.element,
/**
* If set the `Stepper` will not assist in controlling steps for linear flow.
* @default false
*/
nonLinear: PropTypes.bool,
/**
* The component orientation (layout flow direction).
* @default 'horizontal'
*/
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
/**
* 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])
} : void 0;
export default Stepper;
+18
View File
@@ -0,0 +1,18 @@
import * as React from 'react';
export interface StepperContextType {
activeStep: number;
alternativeLabel: boolean;
connector: React.ReactNode;
nonLinear: boolean;
orientation: 'horizontal' | 'vertical';
}
/**
* Provides information about the current step in Stepper.
*/
declare const StepperContext: React.Context<{} | StepperContextType>;
/**
* Returns the current StepperContext or an empty object if no StepperContext
* has been defined in the component tree.
*/
export declare function useStepperContext(): StepperContextType | {};
export default StepperContext;
+17
View File
@@ -0,0 +1,17 @@
import * as React from 'react';
/**
* Provides information about the current step in Stepper.
*/
const StepperContext = /*#__PURE__*/React.createContext({});
if (process.env.NODE_ENV !== 'production') {
StepperContext.displayName = 'StepperContext';
}
/**
* Returns the current StepperContext or an empty object if no StepperContext
* has been defined in the component tree.
*/
export function useStepperContext() {
return React.useContext(StepperContext);
}
export default StepperContext;
+8
View File
@@ -0,0 +1,8 @@
export { default } from './Stepper';
export * from './Stepper';
export { default as stepperClasses } from './stepperClasses';
export * from './stepperClasses';
export { default as StepperContext } from './StepperContext';
export * from './StepperContext';
+7
View File
@@ -0,0 +1,7 @@
'use client';
export { default } from './Stepper';
export { default as stepperClasses } from './stepperClasses';
export * from './stepperClasses';
export { default as StepperContext } from './StepperContext';
export * from './StepperContext';
+6
View File
@@ -0,0 +1,6 @@
{
"sideEffects": false,
"module": "./index.js",
"main": "../node/Stepper/index.js",
"types": "./index.d.ts"
}
+16
View File
@@ -0,0 +1,16 @@
export interface StepperClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the root element if `orientation="horizontal"`. */
horizontal: string;
/** Styles applied to the root element if `orientation="vertical"`. */
vertical: string;
/** Styles applied to the root element if `nonLinear={true}`. */
nonLinear: string;
/** Styles applied to the root element if `alternativeLabel={true}`. */
alternativeLabel: string;
}
export type StepperClassKey = keyof StepperClasses;
export declare function getStepperUtilityClass(slot: string): string;
declare const stepperClasses: StepperClasses;
export default stepperClasses;
+7
View File
@@ -0,0 +1,7 @@
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
import generateUtilityClass from '@mui/utils/generateUtilityClass';
export function getStepperUtilityClass(slot) {
return generateUtilityClass('MuiStepper', slot);
}
const stepperClasses = generateUtilityClasses('MuiStepper', ['root', 'horizontal', 'vertical', 'nonLinear', 'alternativeLabel']);
export default stepperClasses;