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

@@ -0,0 +1,82 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableStringUnion } from '@mui/types';
import { InternalStandardProps as StandardProps } from "../index.js";
import { Theme } from "../styles/index.js";
import { ToggleButtonGroupClasses } from "./toggleButtonGroupClasses.js";
export interface ToggleButtonGroupPropsSizeOverrides {}
export interface ToggleButtonGroupPropsColorOverrides {}
export interface ToggleButtonGroupProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'children'> {
/**
* The content of the component.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<ToggleButtonGroupClasses>;
/**
* The color of the button when it is selected.
* It supports both default and custom theme colors, which can be added as shown in the
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
* @default 'standard'
*/
color?: OverridableStringUnion<'standard' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning', ToggleButtonGroupPropsColorOverrides>;
/**
* If `true`, only allow one of the child ToggleButton values to be selected.
* @default false
*/
exclusive?: boolean;
/**
* If `true`, the component is disabled. This implies that all ToggleButton children will be disabled.
* @default false
*/
disabled?: boolean;
/**
* If `true`, the button group will take up the full width of its container.
* @default false
*/
fullWidth?: boolean;
/**
* Callback fired when the value changes.
*
* @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
* @param {any} value of the selected buttons. When `exclusive` is true
* this is a single value; when false an array of selected values. If no value
* is selected and `exclusive` is true the value is null; when false an empty array.
*/
onChange?: (event: React.MouseEvent<HTMLElement>, value: any) => void;
/**
* The component orientation (layout flow direction).
* @default 'horizontal'
*/
orientation?: 'horizontal' | 'vertical';
/**
* The size of the component.
* @default 'medium'
*/
size?: OverridableStringUnion<'small' | 'medium' | 'large', ToggleButtonGroupPropsSizeOverrides>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
/**
* The currently selected value within the group or an array of selected
* values when `exclusive` is false.
*
* The value must have reference equality with the option in order to be selected.
*/
value?: any;
}
/**
*
* Demos:
*
* - [Toggle Button](https://mui.com/material-ui/react-toggle-button/)
*
* API:
*
* - [ToggleButtonGroup API](https://mui.com/material-ui/api/toggle-button-group/)
*/
export default function ToggleButtonGroup(props: ToggleButtonGroupProps): React.JSX.Element;
@@ -0,0 +1,6 @@
import * as React from 'react';
/**
* @ignore - internal component.
*/
declare const ToggleButtonGroupButtonContext: React.Context<string | undefined>;
export default ToggleButtonGroupButtonContext;
@@ -0,0 +1,16 @@
import * as React from 'react';
import type { ToggleButtonGroupProps } from "./ToggleButtonGroup.js";
interface ToggleButtonGroupContextType {
className?: string;
onChange?: ToggleButtonGroupProps['onChange'];
value?: ToggleButtonGroupProps['value'];
size?: ToggleButtonGroupProps['size'];
fullWidth?: ToggleButtonGroupProps['fullWidth'];
color?: ToggleButtonGroupProps['color'];
disabled?: ToggleButtonGroupProps['disabled'];
}
/**
* @ignore - internal component.
*/
declare const ToggleButtonGroupContext: React.Context<ToggleButtonGroupContextType>;
export default ToggleButtonGroupContext;
+4
View File
@@ -0,0 +1,4 @@
export { default } from "./ToggleButtonGroup.js";
export * from "./ToggleButtonGroup.js";
export { default as toggleButtonGroupClasses } from "./toggleButtonGroupClasses.js";
export * from "./toggleButtonGroupClasses.js";
@@ -0,0 +1,34 @@
export interface ToggleButtonGroupClasses {
/** Styles applied to the root element. */
root: string;
/** State class applied to the root element if `selected={true}`. */
selected: string;
/** Styles applied to the root element if `orientation="horizontal"`. */
horizontal: string;
/** Styles applied to the root element if `orientation="vertical"`. */
vertical: string;
/** State class applied to the root element if `disabled={true}`. */
disabled: string;
/** Styles applied to the children. */
grouped: string;
/** Styles applied to the children if `orientation="horizontal"`.
* @deprecated Combine the [.MuiToggleButtonGroup-horizontal](/material-ui/api/toggle-button-group/#toggle-button-group-classes-horizontal) and [.MuiToggleButtonGroup-grouped](/material-ui/api/toggle-button-group/#toggle-button-group-classes-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
*/
groupedHorizontal: string;
/** Styles applied to the children if `orientation="vertical"`.
* @deprecated Combine the [.MuiToggleButtonGroup-vertical](/material-ui/api/toggle-button-group/#toggle-button-group-classes-vertical) and [.MuiToggleButtonGroup-grouped](/material-ui/api/toggle-button-group/#toggle-button-group-classes-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
*/
groupedVertical: string;
/** Styles applied to the root element if `fullWidth={true}`. */
fullWidth: string;
/** Styles applied to the first button in the toggle button group. */
firstButton: string;
/** Styles applied to the last button in the toggle button group. */
lastButton: string;
/** Styles applied to buttons in the middle of the toggle button group. */
middleButton: string;
}
export type ToggleButtonGroupClassKey = keyof ToggleButtonGroupClasses;
export declare function getToggleButtonGroupUtilityClass(slot: string): string;
declare const toggleButtonGroupClasses: ToggleButtonGroupClasses;
export default toggleButtonGroupClasses;