Začetni commit projekta rezervacije

This commit is contained in:
Mark Poljanšek committed 2025-04-23 20:19:33 +02:00
commit 328731b32f
56062 files changed
+2485242

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
/**
*
* Demos:
*
* - [Grid (Joy UI)](https://mui.com/joy-ui/react-grid/)
* - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
*
* API:
*
* - [Grid API](https://mui.com/system/api/grid/)
*/
declare const Grid: import("@mui/types").OverridableComponent<import("./GridProps.js").GridTypeMap<{}, "div">>;
export default Grid;
+103
View File
@@ -0,0 +1,103 @@
import * as React from 'react';
import { OverrideProps, PartiallyRequired } from '@mui/types';
import { SxProps } from "../styleFunctionSx/index.js";
import { Theme, Breakpoint } from "../createTheme/index.js";
import { SystemProps } from "../Box/index.js";
type ResponsiveStyleValue<T> = T | Array<T | null> | { [key in Breakpoint]?: T | null };
export type GridDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
export type GridSpacing = number | string;
export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
export type GridSize = 'auto' | 'grow' | number | false;
export type GridOffset = 'auto' | number;
export interface GridBaseProps {
/**
* The content of the component.
*/
children?: React.ReactNode;
/**
* The number of columns.
* @default 12
*/
columns?: ResponsiveStyleValue<number>;
/**
* Defines the horizontal space between the type `item` components.
* It overrides the value of the `spacing` prop.
*/
columnSpacing?: ResponsiveStyleValue<GridSpacing>;
/**
* If `true`, the component will have the flex *container* behavior.
* You should be wrapping *items* with a *container*.
* @default false
*/
container?: boolean;
/**
* Defines the `flex-direction` style property.
* It is applied for all screen sizes.
* @default 'row'
*/
direction?: ResponsiveStyleValue<GridDirection>;
/**
* Defines the offset value for the type `item` components.
*/
offset?: ResponsiveStyleValue<GridOffset>;
/**
* @internal
* The level of the grid starts from `0` and increases when the grid nests
* inside another grid. Nesting is defined as a container Grid being a direct
* child of a container Grid.
*
* ```js
* <Grid container> // level 0
* <Grid container> // level 1
* <Grid container> // level 2
* ```
*
* Only consecutive grid is considered nesting. A grid container will start at
* `0` if there are non-Grid container element above it.
*
* ```js
* <Grid container> // level 0
* <div>
* <Grid container> // level 0
* ```
*
* ```js
* <Grid container> // level 0
* <Grid>
* <Grid container> // level 0
* ```
*/
unstable_level?: number;
/**
* Defines the vertical space between the type `item` components.
* It overrides the value of the `spacing` prop.
*/
rowSpacing?: ResponsiveStyleValue<GridSpacing>;
/**
* Defines the size of the the type `item` components.
*/
size?: ResponsiveStyleValue<GridSize>;
/**
* Defines the space between the type `item` components.
* It can only be used on a type `container` component.
* @default 0
*/
spacing?: ResponsiveStyleValue<GridSpacing> | undefined;
/**
* Defines the `flex-wrap` style property.
* It's applied for all screen sizes.
* @default 'wrap'
*/
wrap?: GridWrap;
}
export type GridOwnerState = PartiallyRequired<GridBaseProps, 'size' | 'offset' | 'unstable_level'>;
export interface GridTypeMap<AdditionalProps = {}, DefaultComponent extends React.ElementType = 'div'> {
props: AdditionalProps & GridBaseProps & {
sx?: SxProps<Theme>;
} & SystemProps<Theme>;
defaultComponent: DefaultComponent;
}
export type GridProps<RootComponent extends React.ElementType = GridTypeMap['defaultComponent'], AdditionalProps = {
component?: React.ElementType;
}> = OverrideProps<GridTypeMap<AdditionalProps, RootComponent>, RootComponent>;
export {};
+13
View File
@@ -0,0 +1,13 @@
import * as React from 'react';
import { OverridableComponent } from '@mui/types';
import useThemeSystem from "../useTheme/index.js";
import { GridTypeMap } from "./GridProps.js";
declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled/index.js").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
declare function useThemePropsDefault<T extends {}>(props: T): T;
export default function createGrid(options?: {
createStyledComponent?: typeof defaultCreateStyledComponent;
useThemeProps?: typeof useThemePropsDefault;
useTheme?: typeof useThemeSystem;
componentName?: string;
}): OverridableComponent<GridTypeMap<{}, "div">>;
export {};
+11
View File
@@ -0,0 +1,11 @@
import { Breakpoint, Breakpoints } from "../createTheme/index.js";
/**
* Deletes the legacy Grid component props from the `props` object and warns once about them if found.
*
* @param {object} props The props object to remove the legacy Grid props from.
* @param {Breakpoints} breakpoints The breakpoints object.
*/
export default function deleteLegacyGridProps(props: {
item?: boolean;
zeroMinWidth?: boolean;
} & Partial<Record<Breakpoint, 'auto' | number | boolean>> & Record<string, any>, breakpoints: Breakpoints): void;
+20
View File
@@ -0,0 +1,20 @@
export interface GridClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the root element if `container={true}`. */
container: string;
/** Styles applied to the root element if `direction="column"`. */
'direction-xs-column': string;
/** Styles applied to the root element if `direction="column-reverse"`. */
'direction-xs-column-reverse': string;
/** Styles applied to the root element if `direction="row-reverse"`. */
'direction-xs-row-reverse': string;
/** Styles applied to the root element if `wrap="nowrap"`. */
'wrap-xs-nowrap': string;
/** Styles applied to the root element if `wrap="reverse"`. */
'wrap-xs-wrap-reverse': string;
}
export type GridClassKey = keyof GridClasses;
export declare function getGridUtilityClass(slot: string): string;
declare const gridClasses: GridClasses;
export default gridClasses;
+42
View File
@@ -0,0 +1,42 @@
import { Breakpoints } from "../createBreakpoints/createBreakpoints.js";
import { Spacing } from "../createTheme/createSpacing.js";
import { ResponsiveStyleValue } from "../styleFunctionSx/index.js";
import { GridDirection, GridOwnerState } from "./GridProps.js";
interface Props {
theme: {
breakpoints: Breakpoints;
spacing?: Spacing;
};
ownerState: GridOwnerState;
}
export declare const generateGridSizeStyles: ({
theme,
ownerState
}: Props) => {};
export declare const generateGridOffsetStyles: ({
theme,
ownerState
}: Props) => {};
export declare const generateGridColumnsStyles: ({
theme,
ownerState
}: Props) => {};
export declare const generateGridRowSpacingStyles: ({
theme,
ownerState
}: Props) => {};
export declare const generateGridColumnSpacingStyles: ({
theme,
ownerState
}: Props) => {};
export declare const generateGridDirectionStyles: ({
theme,
ownerState
}: Props) => {};
export declare const generateGridStyles: ({
ownerState
}: Props) => {};
export declare const generateSizeClassNames: (size: GridOwnerState["size"]) => string[];
export declare const generateSpacingClassNames: (spacing: GridOwnerState["spacing"], smallestBreakpoint?: string) => string[];
export declare const generateDirectionClasses: (direction: ResponsiveStyleValue<GridDirection> | undefined) => string[];
export {};
+7
View File
@@ -0,0 +1,7 @@
export { default } from "./Grid.js";
export { default as createGrid } from "./createGrid.js";
export * from "./GridProps.js";
export { default as gridClasses } from "./gridClasses.js";
export * from "./gridClasses.js";
export { traverseBreakpoints as unstable_traverseBreakpoints } from "./traverseBreakpoints.js";
export { generateDirectionClasses as unstable_generateDirectionClasses, generateSizeClassNames as unstable_generateSizeClassNames, generateSpacingClassNames as unstable_generateSpacingClassNames } from "./gridGenerator.js";
+7
View File
@@ -0,0 +1,7 @@
import { Breakpoints, Breakpoint } from "../createBreakpoints/createBreakpoints.js";
export declare const filterBreakpointKeys: (breakpointsKeys: Breakpoint[], responsiveKeys: string[]) => Breakpoint[];
interface Iterator<T> {
(appendStyle: (responsiveStyles: Record<string, any>, style: object) => void, value: T): void;
}
export declare const traverseBreakpoints: <T = unknown>(breakpoints: Breakpoints, responsive: T | T[] | Record<string, any> | undefined, iterator: Iterator<T>) => void;
export {};