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

+68
View File
@@ -0,0 +1,68 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from "../index.js";
import { InputProps } from "../Input/index.js";
import { NativeSelectInputProps } from "./NativeSelectInput.js";
import { NativeSelectClasses } from "./nativeSelectClasses.js";
export interface NativeSelectProps extends StandardProps<InputProps, 'inputProps' | 'value' | 'onChange'> {
/**
* The option elements to populate the select with.
* Can be some `<option>` elements.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
* @default {}
*/
classes?: Partial<NativeSelectClasses>;
/**
* The icon that displays the arrow.
* @default ArrowDropDownIcon
*/
IconComponent?: React.ElementType;
/**
* An `Input` element; does not have to be a material-ui specific `Input`.
* @default <Input />
*/
input?: React.ReactElement<unknown, any>;
/**
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attributes) applied to the `select` element.
*/
inputProps?: Partial<NativeSelectInputProps>;
/**
* Callback fired when a menu item is selected.
*
* @param {React.ChangeEvent<HTMLSelectElement>} event The event source of the callback.
* You can pull out the new value by accessing `event.target.value` (string).
*/
onChange?: NativeSelectInputProps['onChange'];
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
/**
* The `input` value. The DOM API casts this to a string.
*/
value?: unknown;
/**
* The variant to use.
*/
variant?: 'standard' | 'outlined' | 'filled';
}
/**
* An alternative to `<Select native />` with a much smaller bundle size footprint.
*
* Demos:
*
* - [Select](https://mui.com/material-ui/react-select/)
*
* API:
*
* - [NativeSelect API](https://mui.com/material-ui/api/native-select/)
* - inherits [Input API](https://mui.com/material-ui/api/input/)
*/
declare const NativeSelect: ((props: NativeSelectProps) => React.JSX.Element) & {
muiName: string;
};
export default NativeSelect;
+13
View File
@@ -0,0 +1,13 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from "../index.js";
export interface NativeSelectInputProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
disabled?: boolean;
IconComponent: React.ElementType;
inputRef?: React.Ref<HTMLSelectElement>;
variant?: 'standard' | 'outlined' | 'filled';
error?: boolean;
sx?: SxProps<Theme>;
}
declare const NativeSelectInput: React.JSXElementConstructor<NativeSelectInputProps>;
export default NativeSelectInput;
+4
View File
@@ -0,0 +1,4 @@
export { default } from "./NativeSelect.js";
export * from "./NativeSelect.js";
export { default as nativeSelectClasses } from "./nativeSelectClasses.js";
export * from "./nativeSelectClasses.js";
@@ -0,0 +1,34 @@
export interface NativeSelectClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the select component `select` class. */
select: string;
/** Styles applied to the select component if `multiple={true}`. */
multiple: string;
/** Styles applied to the select component if `variant="filled"`. */
filled: string;
/** Styles applied to the select component if `variant="outlined"`. */
outlined: string;
/** Styles applied to the select component if `variant="standard"`. */
standard: string;
/** State class applied to the select component `disabled` class. */
disabled: string;
/** Styles applied to the icon component. */
icon: string;
/** Styles applied to the icon component if the popup is open. */
iconOpen: string;
/** Styles applied to the icon component if `variant="filled"`. */
iconFilled: string;
/** Styles applied to the icon component if `variant="outlined"`. */
iconOutlined: string;
/** Styles applied to the icon component if `variant="standard"`. */
iconStandard: string;
/** Styles applied to the underlying native input component. */
nativeInput: string;
/** State class applied to the select component `error` class. */
error: string;
}
export type NativeSelectClassKey = keyof NativeSelectClasses;
export declare function getNativeSelectUtilityClasses(slot: string): string;
declare const nativeSelectClasses: NativeSelectClasses;
export default nativeSelectClasses;