@max-ts/components 0.7.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/lib/components/Checkbox/Checkbox.d.ts +2 -7
  2. package/lib/components/CheckboxField/CheckboxField.d.ts +4 -0
  3. package/lib/components/CheckboxField/styles.d.ts +1 -1
  4. package/lib/components/DashboardLayout/DashboardContext.d.ts +4 -0
  5. package/lib/components/DashboardLayout/DashboardLayout.d.ts +13 -0
  6. package/lib/components/DashboardLayout/Main/Main.d.ts +6 -0
  7. package/lib/components/DashboardLayout/Sidebar/Sidebar.d.ts +11 -0
  8. package/lib/components/DashboardLayout/Sidebar/constants.d.ts +2 -0
  9. package/lib/components/DashboardLayout/Sidebar/styles.d.ts +8 -0
  10. package/lib/components/DashboardLayout/constants.d.ts +1 -0
  11. package/lib/components/DashboardLayout/index.d.ts +1 -0
  12. package/lib/components/DashboardLayout/styles.d.ts +1 -0
  13. package/lib/components/DataGridPagination/useLogic/useLogic.d.ts +1 -1
  14. package/lib/components/FormLabel/styles.d.ts +1 -1
  15. package/lib/components/ListItemButton/ListItemButton.d.ts +3 -4
  16. package/lib/components/Profile/Profile.d.ts +1 -0
  17. package/lib/components/SidebarNav/MenuItem/MenuItem.d.ts +4 -0
  18. package/lib/components/SidebarNav/MenuItem/index.d.ts +1 -0
  19. package/lib/components/SidebarNav/MenuItem/styles.d.ts +11 -0
  20. package/lib/components/SidebarNav/SidebarNav.d.ts +6 -0
  21. package/lib/components/{Layout/Sidebar/SidebarNav → SidebarNav}/index.d.ts +1 -0
  22. package/lib/components/SidebarNav/styles.d.ts +1 -0
  23. package/lib/components/SidebarNav/types.d.ts +9 -0
  24. package/lib/components/SidebarProduct/SidebarProduct.d.ts +6 -0
  25. package/lib/components/SidebarProduct/index.d.ts +1 -0
  26. package/lib/components/SidebarProduct/styles.d.ts +25 -0
  27. package/lib/components/Tag/styles.d.ts +1 -1
  28. package/lib/components/index.d.ts +3 -4
  29. package/lib/index.mjs +3719 -4139
  30. package/package.json +6 -6
  31. package/lib/components/Checkbox/icons.d.ts +0 -4
  32. package/lib/components/Checkbox/styles.d.ts +0 -5
  33. package/lib/components/Layout/Header/Header.d.ts +0 -8
  34. package/lib/components/Layout/Header/index.d.ts +0 -1
  35. package/lib/components/Layout/Header/styles.d.ts +0 -3
  36. package/lib/components/Layout/Layout.d.ts +0 -13
  37. package/lib/components/Layout/LayoutContext/LayoutContext.d.ts +0 -6
  38. package/lib/components/Layout/LayoutContext/index.d.ts +0 -1
  39. package/lib/components/Layout/Main/Main.d.ts +0 -10
  40. package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -26
  41. package/lib/components/Layout/Sidebar/SidebarNav/SidebarNav.d.ts +0 -5
  42. package/lib/components/Layout/Sidebar/SidebarNav/styles.d.ts +0 -1
  43. package/lib/components/Layout/Sidebar/Toggler/ToggleButton/ToggleButton.d.ts +0 -5
  44. package/lib/components/Layout/Sidebar/Toggler/ToggleButton/index.d.ts +0 -1
  45. package/lib/components/Layout/Sidebar/Toggler/ToggleButton/styles.d.ts +0 -10
  46. package/lib/components/Layout/Sidebar/Toggler/Toggler.d.ts +0 -5
  47. package/lib/components/Layout/Sidebar/Toggler/index.d.ts +0 -1
  48. package/lib/components/Layout/Sidebar/Toggler/styles.d.ts +0 -12
  49. package/lib/components/Layout/Sidebar/constants.d.ts +0 -1
  50. package/lib/components/Layout/Sidebar/styles.d.ts +0 -6
  51. package/lib/components/Layout/constants.d.ts +0 -3
  52. package/lib/components/Layout/hooks/index.d.ts +0 -1
  53. package/lib/components/Layout/hooks/useSidebar/index.d.ts +0 -1
  54. package/lib/components/Layout/hooks/useSidebar/useSidebar.d.ts +0 -7
  55. package/lib/components/Layout/index.d.ts +0 -3
  56. package/lib/components/Layout/styles.d.ts +0 -5
  57. package/lib/components/NavMenu/Item/Item.d.ts +0 -16
  58. package/lib/components/NavMenu/Item/ItemButton/ItemButton.d.ts +0 -11
  59. package/lib/components/NavMenu/Item/ItemButton/index.d.ts +0 -1
  60. package/lib/components/NavMenu/Item/List/List.d.ts +0 -13
  61. package/lib/components/NavMenu/Item/List/index.d.ts +0 -1
  62. package/lib/components/NavMenu/Item/index.d.ts +0 -1
  63. package/lib/components/NavMenu/NavMenu.d.ts +0 -15
  64. package/lib/components/NavMenu/index.d.ts +0 -1
  65. package/lib/components/Product/Product.d.ts +0 -6
  66. package/lib/components/Product/index.d.ts +0 -1
  67. package/lib/components/Product/styles.d.ts +0 -9
  68. package/lib/components/SidebarButton/SidebarButton.d.ts +0 -2
  69. package/lib/components/SidebarButton/index.d.ts +0 -1
  70. package/lib/components/SidebarButton/styles.d.ts +0 -11
  71. package/lib/theme/components/MuiListItemButton.d.ts +0 -3
  72. /package/lib/components/{Layout → DashboardLayout}/Main/index.d.ts +0 -0
  73. /package/lib/components/{Layout → DashboardLayout}/Main/styles.d.ts +0 -0
  74. /package/lib/components/{Layout → DashboardLayout}/Sidebar/index.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@max-ts/components",
3
- "version": "0.7.0",
3
+ "version": "1.0.1",
4
4
  "browser": "./src/index.ts",
5
5
  "main": "./lib/index.mjs",
6
6
  "module": "./lib/index.mjs",
@@ -21,16 +21,16 @@
21
21
  "@emotion/react": "^11.14.0",
22
22
  "@emotion/styled": "^11.14.0",
23
23
  "@fontsource-variable/roboto": "^5.2.5",
24
- "@mui/material": "^7.0.2",
25
- "@mui/system": "^7.0.2",
24
+ "@mui/material": "^7.1.0",
25
+ "@mui/system": "^7.1.0",
26
26
  "@react-input/mask": "^2.0.4",
27
27
  "clsx": "^2.1.1",
28
28
  "input-otp": "^1.4.2",
29
- "lucide-react": "^0.488.0",
29
+ "lucide-react": "^0.508.0",
30
30
  "react": "^19.1.0",
31
31
  "react-day-picker": "^9.6.7",
32
32
  "react-dom": "^19.1.0",
33
- "react-hook-form": "^7.55.0",
33
+ "react-hook-form": "^7.56.2",
34
34
  "react-use": "^17.6.0",
35
35
  "remeda": "^2.21.3"
36
36
  },
@@ -45,7 +45,7 @@
45
45
  "@storybook/react": "^8.6.12",
46
46
  "@storybook/react-vite": "^8.6.12",
47
47
  "@storybook/test": "^8.6.12",
48
- "@types/react": "^19.1.2",
48
+ "@types/react": "^19.1.3",
49
49
  "prop-types": "^15.8.1",
50
50
  "storybook": "^8.6.12"
51
51
  },
@@ -1,4 +0,0 @@
1
- import { SvgIconProps } from '@mui/material';
2
- export declare const DefaultIcon: React.FunctionComponent<SvgIconProps>;
3
- export declare const CheckedIcon: React.FunctionComponent<SvgIconProps>;
4
- export declare const IndeterminateIcon: React.FunctionComponent<SvgIconProps>;
@@ -1,5 +0,0 @@
1
- type CheckboxStyledProps = {
2
- isError?: boolean;
3
- };
4
- export declare const StyledCheckbox: import('@emotion/styled').StyledComponent<import('@mui/material').CheckboxProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & CheckboxStyledProps, {}, {}>;
5
- export {};
@@ -1,8 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { ProductProps, ProfileProps } from '../..';
3
- export type HeaderProps = {
4
- profile?: ProfileProps;
5
- product?: ProductProps;
6
- children?: ReactNode;
7
- };
8
- export declare const Header: (props: HeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './Header';
@@ -1,3 +0,0 @@
1
- export declare const Wrapper: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
2
- isFocusedMode: boolean;
3
- }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, keyof import('react').HTMLAttributes<HTMLElement> | keyof import('react').ClassAttributes<HTMLElement>>, {}>;
@@ -1,13 +0,0 @@
1
- export type LayoutProps = {
2
- children: React.ReactNode;
3
- isFocusedMode?: boolean;
4
- };
5
- export declare const Layout: {
6
- ({ children, isFocusedMode }: LayoutProps): import("react/jsx-runtime").JSX.Element;
7
- Header: (props: import('./Header').HeaderProps) => import("react/jsx-runtime").JSX.Element;
8
- Sidebar: (props: import('./Sidebar').SidebarProps) => import("react/jsx-runtime").JSX.Element;
9
- Main: ({ children }: {
10
- children: import('react').ReactNode;
11
- }) => import("react/jsx-runtime").JSX.Element;
12
- Alert: ({ children, title, closeText, isVisible, actions, onClose, ...props }: import('..').AlertProps) => import("react/jsx-runtime").JSX.Element;
13
- };
@@ -1,6 +0,0 @@
1
- export type LayoutContextProps = {
2
- isFocusedMode: boolean;
3
- collapsedIn: boolean;
4
- onToggleSidebar: () => void;
5
- };
6
- export declare const LayoutContext: import('react').Context<LayoutContextProps>;
@@ -1 +0,0 @@
1
- export * from './LayoutContext';
@@ -1,10 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export type MainProps = {
3
- children: ReactNode;
4
- };
5
- /**
6
- * Основной контент приложения
7
- */
8
- export declare const Main: ({ children }: {
9
- children: ReactNode;
10
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,26 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { NavMenuProps } from '../..';
3
- export type SidebarProps = {
4
- /**
5
- * Название класса, применяется к корневому компоненту
6
- */
7
- className?: string;
8
- /**
9
- * Пропс для передачи контента в заголовок сайдбара
10
- * @example <Sidebar header={<SidebarButton />>} >
11
- */
12
- header?: ReactNode;
13
- /**
14
- * Описание меню
15
- */
16
- menu: {
17
- /**
18
- * Пункты меню
19
- */
20
- items: NavMenuProps['items'];
21
- };
22
- };
23
- /**
24
- * Основной sidebar приложения
25
- */
26
- export declare const Sidebar: (props: SidebarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { ReactElement } from 'react';
2
- export type SidebarNavProps = {
3
- menu: ReactElement;
4
- };
5
- export declare const SidebarNav: (props: SidebarNavProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const Navigation: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
@@ -1,5 +0,0 @@
1
- import { ButtonProps } from '../../../..';
2
- export type TogglerButtonProps = ButtonProps<'button'> & {
3
- collapsedIn: boolean;
4
- };
5
- export declare const ToggleButton: (props: TogglerButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './ToggleButton';
@@ -1,10 +0,0 @@
1
- export declare const TogglerButtonRoot: import('@emotion/styled').StyledComponent<Omit<import('../../../../types').WithoutEmotionSpecific<import('@mui/material').ButtonProps<import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements>>>, "color" | "variant"> & {
2
- variant?: `${import('../../../..').ButtonVariants}`;
3
- loading?: boolean;
4
- loadingIndicator?: import('react').ReactNode;
5
- loadingPosition?: "start" | "end" | "center";
6
- color?: `${import('../../../..').ButtonColors}`;
7
- component?: import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
8
- selected?: boolean;
9
- } & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
10
- export declare const TogglerIconWrapper: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,5 +0,0 @@
1
- export type TogglerProps = {
2
- collapsedIn: boolean;
3
- onToggle: () => void;
4
- };
5
- export declare const Toggler: (props: TogglerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './Toggler';
@@ -1,12 +0,0 @@
1
- export declare const TogglerRoot: import('@emotion/styled').StyledComponent<Omit<import('../../../types').WithoutEmotionSpecific<import('@mui/material').ButtonProps<"button">>, "color" | "variant"> & {
2
- variant?: `${import('../../..').ButtonVariants}`;
3
- loading?: boolean;
4
- loadingIndicator?: import('react').ReactNode;
5
- loadingPosition?: "start" | "end" | "center";
6
- color?: `${import('../../..').ButtonColors}`;
7
- component?: "button" | undefined;
8
- selected?: boolean;
9
- } & {
10
- collapsedIn: boolean;
11
- } & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
12
- export declare const TogglerContent: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1 +0,0 @@
1
- export declare const LAYOUT_SIDEBAR_CLASSNAME = "layout-sidebar";
@@ -1,6 +0,0 @@
1
- export declare const SidebarRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
2
- $collapsedIn: boolean;
3
- }, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
4
- export declare const SidebarHeader: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
5
- export declare const SidebarContent: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
- export declare const SidebarFooter: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
@@ -1,3 +0,0 @@
1
- export declare const HEADER_HEIGHT = "60px";
2
- export declare const LAYOUT_CLASSNAME = "app-layout";
3
- export declare const LOCAL_STORAGE_KEY = "sidebar::collapsedIn";
@@ -1 +0,0 @@
1
- export * from './useSidebar';
@@ -1 +0,0 @@
1
- export * from './useSidebar';
@@ -1,7 +0,0 @@
1
- type ReturnedSidebarHook = {
2
- collapsedIn: boolean;
3
- onToggleSidebar: () => void;
4
- };
5
- type UseSidebarHook = (localStorageKey: string, isFocusedMode: boolean) => ReturnedSidebarHook;
6
- export declare const useSidebar: UseSidebarHook;
7
- export {};
@@ -1,3 +0,0 @@
1
- export * from './Layout';
2
- export * from './LayoutContext';
3
- export type { SidebarProps } from './Sidebar';
@@ -1,5 +0,0 @@
1
- import { Alert } from '../Alert';
2
- export declare const Wrapper: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
3
- isFocusedMode: boolean;
4
- }, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
- export declare const StyledAlert: typeof Alert;
@@ -1,16 +0,0 @@
1
- import { ElementType, ReactElement, ReactNode } from 'react';
2
- import { ListProps } from './List';
3
- export type ItemProps<TComponent extends ElementType = ElementType> = {
4
- collapsedIn: boolean;
5
- item: [
6
- key: string,
7
- value: {
8
- icon: ReactElement;
9
- text: ReactNode;
10
- active?: boolean;
11
- items?: ListProps['items'];
12
- component?: TComponent;
13
- }
14
- ];
15
- };
16
- export declare const Item: <TComponent extends ElementType>(props: ItemProps<TComponent>) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { ElementType, ReactElement, ReactNode } from 'react';
2
- import { ListItemButtonProps } from '../../../ListItemButton';
3
- export type NavMenuItemButtonProps<RootComponent extends ElementType = ElementType> = ListItemButtonProps<RootComponent> & {
4
- opened?: boolean;
5
- collapsedIn: boolean;
6
- selected?: boolean;
7
- text: ReactNode;
8
- icon: ReactElement;
9
- component?: RootComponent;
10
- };
11
- export declare const ItemButton: (props: NavMenuItemButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './ItemButton';
@@ -1,13 +0,0 @@
1
- import { ElementType, ReactNode } from 'react';
2
- export type ListProps = {
3
- collapsedIn: boolean;
4
- items: Array<[
5
- key: string,
6
- value: {
7
- text: ReactNode;
8
- active: boolean;
9
- component: ElementType;
10
- }
11
- ]>;
12
- };
13
- export declare const List: (props: ListProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './List';
@@ -1 +0,0 @@
1
- export * from './Item';
@@ -1,15 +0,0 @@
1
- import { ElementType } from 'react';
2
- import { ItemProps } from './Item';
3
- export type NavMenuProps<TComponent extends ElementType = ElementType> = {
4
- /**
5
- * Состояние свернуто/развернуто меню по горизонтали
6
- */
7
- collapsedIn?: boolean;
8
- items: [
9
- key: ItemProps['item'][0],
10
- value: ItemProps['item'][1] & {
11
- component?: TComponent;
12
- }
13
- ][];
14
- };
15
- export declare const NavMenu: <TComponent extends ElementType>(props: NavMenuProps<TComponent>) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './NavMenu';
@@ -1,6 +0,0 @@
1
- import { ButtonProps } from '../Button';
2
- export type ProductProps = ButtonProps<'button'> & {
3
- logo: () => React.ReactNode;
4
- name: string;
5
- };
6
- export declare const Product: (props: ProductProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './Product';
@@ -1,9 +0,0 @@
1
- export declare const StyledButton: import('@emotion/styled').StyledComponent<Omit<import('../types').WithoutEmotionSpecific<import('@mui/material').ButtonProps<import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements>>>, "color" | "variant"> & {
2
- variant?: `${import('../Button').ButtonVariants}`;
3
- loading?: boolean;
4
- loadingIndicator?: import('react').ReactNode;
5
- loadingPosition?: "start" | "end" | "center";
6
- color?: `${import('../Button').ButtonColors}`;
7
- component?: import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
8
- selected?: boolean;
9
- } & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
@@ -1,2 +0,0 @@
1
- import { ButtonProps } from '../Button';
2
- export declare const SidebarButton: <RootComponent extends React.ElementType>(props: ButtonProps<RootComponent>) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './SidebarButton';
@@ -1,11 +0,0 @@
1
- export declare const SidebarButton: import('@emotion/styled').StyledComponent<Omit<import('../types').WithoutEmotionSpecific<import('@mui/material').ButtonProps<import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements>>>, "color" | "variant"> & {
2
- variant?: `${import('..').ButtonVariants}`;
3
- loading?: boolean;
4
- loadingIndicator?: import('react').ReactNode;
5
- loadingPosition?: "start" | "end" | "center";
6
- color?: `${import('..').ButtonColors}`;
7
- component?: import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
8
- selected?: boolean;
9
- } & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
10
- $isOpen?: boolean;
11
- }, {}, {}>;
@@ -1,3 +0,0 @@
1
- import { Components } from '@mui/material';
2
- import { Theme } from '../types';
3
- export declare const MuiListItemButton: Components<Theme>['MuiListItemButton'];