@max-ts/kit 0.0.2

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 (180) hide show
  1. package/lib/components/Button/Button.d.ts +11 -0
  2. package/lib/components/Button/button.css.d.ts +5 -0
  3. package/lib/components/Button/index.d.ts +1 -0
  4. package/lib/components/Button/types.d.ts +2 -0
  5. package/lib/components/ButtonGroup/ButtonGroup.d.ts +17 -0
  6. package/lib/components/ButtonGroup/buttonGroup.css.d.ts +3 -0
  7. package/lib/components/ButtonGroup/index.d.ts +1 -0
  8. package/lib/components/Card/Card.d.ts +8 -0
  9. package/lib/components/Card/card.css.d.ts +6 -0
  10. package/lib/components/Card/index.d.ts +1 -0
  11. package/lib/components/Checkbox/Checkbox.d.ts +3 -0
  12. package/lib/components/Checkbox/checkbox.css.d.ts +3 -0
  13. package/lib/components/Checkbox/index.d.ts +1 -0
  14. package/lib/components/CircularProgress/CircularProgress.d.ts +10 -0
  15. package/lib/components/CircularProgress/index.d.ts +1 -0
  16. package/lib/components/CircularProgress/styles.css.d.ts +5 -0
  17. package/lib/components/ConfirmAction/ConfirmAction.d.ts +39 -0
  18. package/lib/components/ConfirmAction/index.d.ts +1 -0
  19. package/lib/components/ConfirmAction/styles.css.d.ts +4 -0
  20. package/lib/components/ConfirmAction/useLogic.d.ts +9 -0
  21. package/lib/components/ContentState/ContentState.d.ts +34 -0
  22. package/lib/components/ContentState/index.d.ts +2 -0
  23. package/lib/components/ContentState/styles.css.d.ts +1 -0
  24. package/lib/components/ContentState/types.d.ts +24 -0
  25. package/lib/components/CopyTypography/CopyTypography.d.ts +17 -0
  26. package/lib/components/CopyTypography/enums.d.ts +5 -0
  27. package/lib/components/CopyTypography/index.d.ts +1 -0
  28. package/lib/components/CopyTypography/styles.css.d.ts +2 -0
  29. package/lib/components/CopyTypography/useLogic/index.d.ts +1 -0
  30. package/lib/components/CopyTypography/useLogic/useLogic.d.ts +12 -0
  31. package/lib/components/DataGrid/Body/Body.d.ts +5 -0
  32. package/lib/components/DataGrid/Body/index.d.ts +1 -0
  33. package/lib/components/DataGrid/Body/styles.css.d.ts +1 -0
  34. package/lib/components/DataGrid/Cell/Cell.d.ts +8 -0
  35. package/lib/components/DataGrid/Cell/index.d.ts +1 -0
  36. package/lib/components/DataGrid/Cell/styles.css.d.ts +2 -0
  37. package/lib/components/DataGrid/DataGrid.d.ts +23 -0
  38. package/lib/components/DataGrid/Footer/Footer.d.ts +5 -0
  39. package/lib/components/DataGrid/Footer/index.d.ts +1 -0
  40. package/lib/components/DataGrid/Footer/styles.css.d.ts +1 -0
  41. package/lib/components/DataGrid/Header/Header.d.ts +9 -0
  42. package/lib/components/DataGrid/Header/index.d.ts +1 -0
  43. package/lib/components/DataGrid/Header/styles.css.d.ts +1 -0
  44. package/lib/components/DataGrid/HeaderCell/HeaderCell.d.ts +8 -0
  45. package/lib/components/DataGrid/HeaderCell/index.d.ts +1 -0
  46. package/lib/components/DataGrid/HeaderCell/styles.css.d.ts +1 -0
  47. package/lib/components/DataGrid/Row/Row.d.ts +11 -0
  48. package/lib/components/DataGrid/Row/index.d.ts +1 -0
  49. package/lib/components/DataGrid/Row/styles.css.d.ts +2 -0
  50. package/lib/components/DataGrid/State/State.d.ts +10 -0
  51. package/lib/components/DataGrid/State/index.d.ts +1 -0
  52. package/lib/components/DataGrid/State/styles.css.d.ts +2 -0
  53. package/lib/components/DataGrid/constants.d.ts +1 -0
  54. package/lib/components/DataGrid/index.d.ts +2 -0
  55. package/lib/components/DataGrid/styles.css.d.ts +5 -0
  56. package/lib/components/DataGrid/types.d.ts +24 -0
  57. package/lib/components/DataGridActionCell/DataGridActionCell.d.ts +22 -0
  58. package/lib/components/DataGridActionCell/MainAction/MainAction.d.ts +22 -0
  59. package/lib/components/DataGridActionCell/MainAction/MainIconButton/MainIconButton.d.ts +21 -0
  60. package/lib/components/DataGridActionCell/MainAction/MainIconButton/index.d.ts +1 -0
  61. package/lib/components/DataGridActionCell/MainAction/MainIconButton/useLogic/index.d.ts +1 -0
  62. package/lib/components/DataGridActionCell/MainAction/MainIconButton/useLogic/useLogic.d.ts +10 -0
  63. package/lib/components/DataGridActionCell/MainAction/index.d.ts +1 -0
  64. package/lib/components/DataGridActionCell/SecondaryAction/SecondaryAction.d.ts +22 -0
  65. package/lib/components/DataGridActionCell/SecondaryAction/index.d.ts +1 -0
  66. package/lib/components/DataGridActionCell/index.d.ts +1 -0
  67. package/lib/components/DataGridActionCell/styles.css.d.ts +1 -0
  68. package/lib/components/DataGridActionCell/types.d.ts +100 -0
  69. package/lib/components/DataGridActionCell/useLogic/index.d.ts +1 -0
  70. package/lib/components/DataGridActionCell/useLogic/useLogic.d.ts +10 -0
  71. package/lib/components/DataGridSortHeader/DataGridSortHeader.d.ts +9 -0
  72. package/lib/components/DataGridSortHeader/index.d.ts +2 -0
  73. package/lib/components/DataGridSortHeader/styles.css.d.ts +2 -0
  74. package/lib/components/DataGridSortHeader/types.d.ts +4 -0
  75. package/lib/components/DataList/DataList.d.ts +55 -0
  76. package/lib/components/DataList/EndData/EndData.d.ts +5 -0
  77. package/lib/components/DataList/EndData/constants.d.ts +1 -0
  78. package/lib/components/DataList/EndData/index.d.ts +1 -0
  79. package/lib/components/DataList/EndData/styles.css.d.ts +1 -0
  80. package/lib/components/DataList/ErrorState/ErrorState.d.ts +5 -0
  81. package/lib/components/DataList/ErrorState/constants.d.ts +1 -0
  82. package/lib/components/DataList/ErrorState/index.d.ts +1 -0
  83. package/lib/components/DataList/ErrorState/styles.css.d.ts +1 -0
  84. package/lib/components/DataList/Loader/Loader.d.ts +1 -0
  85. package/lib/components/DataList/Loader/index.d.ts +1 -0
  86. package/lib/components/DataList/Loader/styles.css.d.ts +1 -0
  87. package/lib/components/DataList/NoData/NoData.d.ts +5 -0
  88. package/lib/components/DataList/NoData/constants.d.ts +1 -0
  89. package/lib/components/DataList/NoData/index.d.ts +1 -0
  90. package/lib/components/DataList/ScrollToTopButton/ScrollToTopButton.d.ts +5 -0
  91. package/lib/components/DataList/ScrollToTopButton/index.d.ts +1 -0
  92. package/lib/components/DataList/ScrollToTopButton/styles.css.d.ts +2 -0
  93. package/lib/components/DataList/constants.d.ts +2 -0
  94. package/lib/components/DataList/index.d.ts +1 -0
  95. package/lib/components/DataList/styles.css.d.ts +2 -0
  96. package/lib/components/Description/Description.d.ts +34 -0
  97. package/lib/components/Description/DescriptionContext/DescriptionContext.d.ts +6 -0
  98. package/lib/components/Description/DescriptionContext/DescriptionContextProvider/DescriptionContextProvider.d.ts +7 -0
  99. package/lib/components/Description/DescriptionContext/DescriptionContextProvider/index.d.ts +1 -0
  100. package/lib/components/Description/DescriptionContext/index.d.ts +2 -0
  101. package/lib/components/Description/Name/Name.d.ts +3 -0
  102. package/lib/components/Description/Name/index.d.ts +1 -0
  103. package/lib/components/Description/Name/styles.css.d.ts +3 -0
  104. package/lib/components/Description/Value/Value.d.ts +22 -0
  105. package/lib/components/Description/Value/index.d.ts +1 -0
  106. package/lib/components/Description/Value/styles.css.d.ts +3 -0
  107. package/lib/components/Description/Value/useLogic/index.d.ts +1 -0
  108. package/lib/components/Description/Value/useLogic/useLogic.d.ts +9 -0
  109. package/lib/components/Description/constants.d.ts +3 -0
  110. package/lib/components/Description/index.d.ts +2 -0
  111. package/lib/components/Description/styles.css.d.ts +3 -0
  112. package/lib/components/Description/useLogic/index.d.ts +1 -0
  113. package/lib/components/Description/useLogic/useLogic.d.ts +9 -0
  114. package/lib/components/Dialog/Dialog.d.ts +10 -0
  115. package/lib/components/Dialog/index.d.ts +1 -0
  116. package/lib/components/Dialog/styles.css.d.ts +9 -0
  117. package/lib/components/DropdownMenu/DropdownMenu.d.ts +24 -0
  118. package/lib/components/DropdownMenu/index.d.ts +1 -0
  119. package/lib/components/DropdownMenu/styles.css.d.ts +12 -0
  120. package/lib/components/ImageCarousel/ImageCarousel.d.ts +10 -0
  121. package/lib/components/ImageCarousel/index.d.ts +1 -0
  122. package/lib/components/ImageCarousel/styles.css.d.ts +9 -0
  123. package/lib/components/Input/Input.d.ts +11 -0
  124. package/lib/components/Input/index.d.ts +1 -0
  125. package/lib/components/Input/styles.css.d.ts +12 -0
  126. package/lib/components/Label/Label.d.ts +5 -0
  127. package/lib/components/Label/index.d.ts +1 -0
  128. package/lib/components/Label/label.css.d.ts +2 -0
  129. package/lib/components/Placeholder/Image/Image.d.ts +6 -0
  130. package/lib/components/Placeholder/Image/index.d.ts +1 -0
  131. package/lib/components/Placeholder/Image/styles.css.d.ts +3 -0
  132. package/lib/components/Placeholder/Placeholder.d.ts +40 -0
  133. package/lib/components/Placeholder/constants.d.ts +22 -0
  134. package/lib/components/Placeholder/index.d.ts +3 -0
  135. package/lib/components/Placeholder/styles.css.d.ts +6 -0
  136. package/lib/components/Placeholder/types.d.ts +1 -0
  137. package/lib/components/Popover/Popover.d.ts +2 -0
  138. package/lib/components/Popover/PopoverContent.d.ts +3 -0
  139. package/lib/components/Popover/index.d.ts +2 -0
  140. package/lib/components/Popover/styles.css.d.ts +1 -0
  141. package/lib/components/RangeInput/RangeInput.d.ts +16 -0
  142. package/lib/components/RangeInput/index.d.ts +1 -0
  143. package/lib/components/RangeInput/styles.css.d.ts +7 -0
  144. package/lib/components/ScrollTopButton/ScrollTopButton.d.ts +4 -0
  145. package/lib/components/ScrollTopButton/index.d.ts +1 -0
  146. package/lib/components/ScrollTopButton/styles.css.d.ts +2 -0
  147. package/lib/components/Select/Select.d.ts +19 -0
  148. package/lib/components/Select/index.d.ts +1 -0
  149. package/lib/components/Select/styles.css.d.ts +10 -0
  150. package/lib/components/Slider/Slider.d.ts +3 -0
  151. package/lib/components/Slider/index.d.ts +1 -0
  152. package/lib/components/Slider/styles.css.d.ts +4 -0
  153. package/lib/components/Tabs/Tabs.d.ts +1 -0
  154. package/lib/components/Tabs/TabsContent.d.ts +3 -0
  155. package/lib/components/Tabs/TabsList.d.ts +3 -0
  156. package/lib/components/Tabs/TabsTrigger.d.ts +3 -0
  157. package/lib/components/Tabs/index.d.ts +4 -0
  158. package/lib/components/Tabs/styles.css.d.ts +3 -0
  159. package/lib/components/TextField/TextField.d.ts +7 -0
  160. package/lib/components/TextField/index.d.ts +1 -0
  161. package/lib/components/TextField/styles.css.d.ts +5 -0
  162. package/lib/components/Tooltip/Tooltip.d.ts +13 -0
  163. package/lib/components/Tooltip/index.d.ts +1 -0
  164. package/lib/components/Tooltip/styles.css.d.ts +3 -0
  165. package/lib/components/Typography/Typography.d.ts +15 -0
  166. package/lib/components/Typography/index.d.ts +1 -0
  167. package/lib/components/Typography/styles.css.d.ts +9 -0
  168. package/lib/components/Typography/types.d.ts +3 -0
  169. package/lib/components/index.d.ts +28 -0
  170. package/lib/hooks/index.d.ts +1 -0
  171. package/lib/hooks/useToggle/index.d.ts +1 -0
  172. package/lib/hooks/useToggle/useToggle.d.ts +43 -0
  173. package/lib/index.d.ts +2 -0
  174. package/lib/index.mjs +1 -0
  175. package/lib/styles/index.d.ts +3 -0
  176. package/lib/styles/reset.css.d.ts +1 -0
  177. package/lib/styles/theme.css.d.ts +136 -0
  178. package/lib/styles.css +1 -0
  179. package/package.json +53 -0
  180. package/src/index.ts +2 -0
@@ -0,0 +1,11 @@
1
+ import { buttonSizes, buttonVariants } from './button.css';
2
+ import type { ButtonSize, ButtonVariant } from './types';
3
+ export type ButtonProps = React.ComponentProps<'button'> & {
4
+ asChild?: boolean;
5
+ isLoading?: boolean;
6
+ fullWidth?: boolean;
7
+ variant?: ButtonVariant;
8
+ size?: ButtonSize;
9
+ };
10
+ declare const Button: ({ className, variant, size, asChild, isLoading, fullWidth, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
11
+ export { Button, buttonSizes, buttonVariants };
@@ -0,0 +1,5 @@
1
+ import type { ButtonSize, ButtonVariant } from './types';
2
+ export declare const loading: string;
3
+ export declare const fullWidthStyle: string;
4
+ export declare const buttonVariants: Record<ButtonVariant, string>;
5
+ export declare const buttonSizes: Record<ButtonSize, string>;
@@ -0,0 +1 @@
1
+ export * from './Button';
@@ -0,0 +1,2 @@
1
+ export type ButtonVariant = 'default' | 'destructive' | 'outline' | 'ghost' | 'link';
2
+ export type ButtonSize = 'md' | 'sm' | 'lg' | 'icon' | 'iconSm';
@@ -0,0 +1,17 @@
1
+ type Value = string | number;
2
+ type Option<T extends Value> = {
3
+ value: T;
4
+ label: string | React.ReactNode;
5
+ disabled?: boolean;
6
+ };
7
+ type ButtonGroupProps<TValue extends Value, Multiple extends boolean = false> = {
8
+ options: Option<TValue>[];
9
+ value: Multiple extends true ? TValue[] : TValue;
10
+ onChange: (value: Multiple extends true ? TValue[] : TValue) => void;
11
+ size?: 'sm' | 'lg' | 'md' | 'icon';
12
+ className?: string;
13
+ label?: string;
14
+ multiple?: Multiple;
15
+ };
16
+ export declare const ButtonGroup: <T extends Value, Multiple extends boolean = false>({ value, onChange, options, size, className, label, multiple, }: ButtonGroupProps<T, Multiple>) => import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const containerClass: string;
2
+ export declare const buttonClass: string;
3
+ export declare const labelClass: string;
@@ -0,0 +1 @@
1
+ export * from './ButtonGroup';
@@ -0,0 +1,8 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ declare const Card: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
3
+ declare const CardHeader: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const CardTitle: ({ className, ...props }: HTMLAttributes<HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
5
+ declare const CardDescription: ({ className, ...props }: HTMLAttributes<HTMLParagraphElement>) => import("react/jsx-runtime").JSX.Element;
6
+ declare const CardContent: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const CardFooter: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
8
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, };
@@ -0,0 +1,6 @@
1
+ export declare const card: string;
2
+ export declare const cardHeader: string;
3
+ export declare const cardTitle: string;
4
+ export declare const cardDescription: string;
5
+ export declare const cardContent: string;
6
+ export declare const cardFooter: string;
@@ -0,0 +1 @@
1
+ export * from './Card';
@@ -0,0 +1,3 @@
1
+ import { type CheckboxProps as CheckboxPrimitiveProps } from '@radix-ui/react-checkbox';
2
+ export type CheckboxProps = CheckboxPrimitiveProps;
3
+ export declare const Checkbox: ({ className, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const root: string;
2
+ export declare const indicator: string;
3
+ export declare const icon: string;
@@ -0,0 +1 @@
1
+ export * from './Checkbox';
@@ -0,0 +1,10 @@
1
+ type CircularProgressProps = {
2
+ size?: number;
3
+ thickness?: number;
4
+ color?: 'primary' | 'secondary' | 'inherit';
5
+ value?: number;
6
+ variant?: 'indeterminate' | 'determinate';
7
+ className?: string;
8
+ };
9
+ export declare const CircularProgress: React.FC<CircularProgressProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export * from './CircularProgress';
@@ -0,0 +1,5 @@
1
+ export declare const root: string;
2
+ export declare const svg: string;
3
+ export declare const circle: string;
4
+ export declare const variants: Record<"determinate" | "indeterminate", string>;
5
+ export declare const colors: Record<"primary" | "secondary" | "inherit", string>;
@@ -0,0 +1,39 @@
1
+ import type { ReactNode, SyntheticEvent } from 'react';
2
+ import { type PopoverContentProps } from '../Popover';
3
+ export type ActionComponentParams = {
4
+ onClick: (event: SyntheticEvent) => void;
5
+ };
6
+ export type ConfirmActionProps = {
7
+ /**
8
+ * Поясняющий текст
9
+ */
10
+ text?: string;
11
+ /**
12
+ * Параметры кнопки подтверждения действия
13
+ */
14
+ confirmButtonProps?: {
15
+ /**
16
+ * Текст кнопки
17
+ */
18
+ text?: string;
19
+ /**
20
+ * Если `true`, кнопка будет иметь акцент на критичность действия. Стоит использовать для важных действий, например при удалении.
21
+ * @default 'false'
22
+ */
23
+ isAccented?: boolean;
24
+ };
25
+ skipConfirm?: boolean;
26
+ popoverProps?: {
27
+ side: PopoverContentProps['side'];
28
+ align: PopoverContentProps['align'];
29
+ };
30
+ /**
31
+ * Кнопка, действие которой необходимо подтвердить
32
+ */
33
+ actionComponent: (params: ActionComponentParams) => ReactNode;
34
+ /**
35
+ * Целевое действие, которое должно произойти после подтверждения
36
+ */
37
+ onConfirm: () => void;
38
+ };
39
+ export declare const ConfirmAction: (props: ConfirmActionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './ConfirmAction';
@@ -0,0 +1,4 @@
1
+ export declare const actionsClass: string;
2
+ export declare const wrapperClass: string;
3
+ export declare const popoverClass: string;
4
+ export declare const hasTextClass: string;
@@ -0,0 +1,9 @@
1
+ import type { ButtonProps } from '../Button';
2
+ import type { ConfirmActionProps } from './ConfirmAction';
3
+ export declare const useLogic: ({ skipConfirm, onConfirm, confirmButtonProps: externalConfirmButtonProps, }: ConfirmActionProps) => {
4
+ open: boolean;
5
+ onActionComponentClick: () => void;
6
+ confirmButtonProps: Partial<ButtonProps>;
7
+ onCancel: () => void;
8
+ onOpenChange: (open: boolean) => void;
9
+ };
@@ -0,0 +1,34 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ import { type PlaceholderProps } from '../Placeholder';
3
+ import type { ContentStateErrorProps } from './types';
4
+ export type ContentStateProps = {
5
+ /**
6
+ * Флаг состояния загрузки
7
+ */
8
+ isLoading?: boolean;
9
+ /**
10
+ * Элемент для отображения состояния загрузки
11
+ */
12
+ loadingContent?: ReactElement | string;
13
+ /**
14
+ * Флаг состояния ошибки
15
+ */
16
+ isError?: boolean;
17
+ /**
18
+ * Параметры для отображения состояния ошибки
19
+ */
20
+ errorState?: ContentStateErrorProps;
21
+ /**
22
+ * Флаг для отображения custom состояния ошибки
23
+ */
24
+ isCustom?: boolean;
25
+ /**
26
+ * Параметры для отображения custom состояния ошибки
27
+ */
28
+ customState?: PlaceholderProps;
29
+ /**
30
+ * Элементы для отображения состояния "Успех"
31
+ */
32
+ children: ReactNode;
33
+ };
34
+ export declare const ContentState: ({ isLoading, isError, isCustom, errorState, customState, children, loadingContent: LoadingContent, }: ContentStateProps) => string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
@@ -0,0 +1,2 @@
1
+ export * from './ContentState';
2
+ export * from './types';
@@ -0,0 +1 @@
1
+ export declare const loadingContainer: string;
@@ -0,0 +1,24 @@
1
+ import type { ReactNode } from 'react';
2
+ export type ContentStateErrorProps = {
3
+ /**
4
+ * Название ошибки
5
+ */
6
+ title?: string;
7
+ imgSrc?: string;
8
+ /**
9
+ * Alt атрибут для изображения
10
+ */
11
+ imgAlt?: string;
12
+ /**
13
+ * Список ошибок для отображения
14
+ */
15
+ errorList: string[];
16
+ /**
17
+ * Элементы кнопок для дальнейших действий
18
+ */
19
+ actions?: ReactNode;
20
+ /**
21
+ * Функция для повторного действия
22
+ */
23
+ onRetry: () => void;
24
+ };
@@ -0,0 +1,17 @@
1
+ import { type TypographyProps } from '../Typography';
2
+ export type CopyTypographyProps = TypographyProps & {
3
+ /**
4
+ * Текст, который будет скопирован. Перекрывает обычное копирование если children является строкой
5
+ */
6
+ copyText?: string;
7
+ /**
8
+ * Отображает иконку слева или справа от текста
9
+ * @default right
10
+ */
11
+ copyPosition?: 'right' | 'left';
12
+ /**
13
+ * Если `true`, в тултипе будет отображаться текст, который будет скопирован при нажатии
14
+ */
15
+ isShowCopyText?: boolean;
16
+ };
17
+ export declare const CopyTypography: (props: CopyTypographyProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare enum CopyStatus {
2
+ Copied = "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E",
3
+ Error = "\u041E\u0448\u0438\u0431\u043A\u0430 \u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F",
4
+ CanCopy = "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C"
5
+ }
@@ -0,0 +1 @@
1
+ export * from './CopyTypography';
@@ -0,0 +1,2 @@
1
+ export declare const wrapper: string;
2
+ export declare const copyIconClass: string;
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1,12 @@
1
+ import { type SyntheticEvent } from 'react';
2
+ import type { CopyTypographyProps } from '../CopyTypography';
3
+ type UseLogicParams = CopyTypographyProps;
4
+ export declare const useLogic: ({ children, copyText, isShowCopyText, copyPosition, }: UseLogicParams) => {
5
+ handleMouseLeave: () => void;
6
+ handleClick: (event: SyntheticEvent<HTMLElement>) => void;
7
+ tooltipTitle: string;
8
+ isIconOnLeft: boolean;
9
+ tooltipOpen: boolean;
10
+ handleMouseEnter: () => void;
11
+ };
12
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { DataGridProps } from '../DataGrid';
2
+ export type BodyProps<TRow> = Pick<DataGridProps<TRow>, 'emptyState' | 'errorState' | 'isLoading' | 'isError' | 'columns' | 'rows' | 'onRowClick' | 'keyId' | 'onRetry'> & {
3
+ rowHeight: number;
4
+ };
5
+ export declare function Body<TRow>({ isError, isLoading, emptyState, errorState, columns, rows, rowHeight, keyId, onRowClick, }: BodyProps<TRow>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Body';
@@ -0,0 +1 @@
1
+ export declare const container: string;
@@ -0,0 +1,8 @@
1
+ import type { DataGridColumn } from '../types';
2
+ export type CellProps<TRow> = {
3
+ row: TRow;
4
+ column: DataGridColumn<TRow>;
5
+ rowIndex: number;
6
+ height: number;
7
+ };
8
+ export declare function Cell<TRow>({ row, column, rowIndex, height }: CellProps<TRow>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Cell';
@@ -0,0 +1,2 @@
1
+ export declare const cellClass: string;
2
+ export declare const disabledClass: string;
@@ -0,0 +1,23 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import type { DataGridColumn, DataGridState } from './types';
3
+ export type DataGridProps<TRow> = {
4
+ rows: TRow[];
5
+ columns: DataGridColumn<TRow>[];
6
+ className?: string;
7
+ height?: CSSProperties['height'];
8
+ rowHeight?: number;
9
+ headerHeight?: number;
10
+ keyId: keyof TRow;
11
+ isLoading?: boolean;
12
+ isDisabled?: boolean;
13
+ isError?: boolean;
14
+ stickyHeader?: boolean;
15
+ emptyState?: DataGridState;
16
+ errorState?: DataGridState;
17
+ onSelectRow?: (row: TRow[]) => void;
18
+ onRowClick?: (row: TRow) => void;
19
+ onRetry?: () => void;
20
+ title?: string;
21
+ footer?: ReactNode;
22
+ };
23
+ export declare function DataGrid<TRow>({ rows, columns, height, className, rowHeight, headerHeight, keyId, onRowClick, isLoading, isDisabled, isError, emptyState, errorState, footer, title, stickyHeader, onRetry, }: DataGridProps<TRow>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare function Footer({ children, columnsLength, className, }: {
2
+ children: React.ReactNode;
3
+ columnsLength: number;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Footer';
@@ -0,0 +1 @@
1
+ export declare const footerClass: string;
@@ -0,0 +1,9 @@
1
+ import type { CSSProperties } from 'react';
2
+ import type { DataGridColumn } from '../types';
3
+ type HeaderProps<TData> = {
4
+ columns: DataGridColumn<TData>[];
5
+ height: CSSProperties['height'];
6
+ sticky?: boolean;
7
+ };
8
+ export declare function Header<TData>({ columns, height, sticky }: HeaderProps<TData>): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Header';
@@ -0,0 +1 @@
1
+ export declare const stickyClass: string;
@@ -0,0 +1,8 @@
1
+ import type { CSSProperties } from 'react';
2
+ import type { DataGridColumn } from '../types';
3
+ export type HeaderCellProps<T> = {
4
+ column: DataGridColumn<T>;
5
+ height?: CSSProperties['height'];
6
+ width?: CSSProperties['width'];
7
+ };
8
+ export declare function HeaderCell<TData>({ column, height, width, }: HeaderCellProps<TData>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './HeaderCell';
@@ -0,0 +1 @@
1
+ export declare const headerCellClass: string;
@@ -0,0 +1,11 @@
1
+ import type { DataGridColumn } from '../types';
2
+ type RowProps<TRow> = {
3
+ row: TRow;
4
+ columns: DataGridColumn<TRow>[];
5
+ rowIndex: number;
6
+ rowId: string;
7
+ rowHeight: number;
8
+ onRowClick?: (row: TRow) => void;
9
+ };
10
+ export declare function Row<TRow>({ row, rowHeight, onRowClick, columns, rowIndex, rowId, }: RowProps<TRow>): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Row';
@@ -0,0 +1,2 @@
1
+ export declare const rowClass: string;
2
+ export declare const selectableClass: string;
@@ -0,0 +1,10 @@
1
+ import type { DataGridState } from '../types';
2
+ export declare function State({ isLoading, isEmpty, columnsLength, emptyState, errorState, isError, onRetry, }: {
3
+ isLoading?: boolean;
4
+ isEmpty?: boolean;
5
+ isError?: boolean;
6
+ columnsLength: number;
7
+ errorState?: DataGridState;
8
+ emptyState?: DataGridState;
9
+ onRetry?: () => void;
10
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export * from './State';
@@ -0,0 +1,2 @@
1
+ export declare const container: string;
2
+ export declare const loader: string;
@@ -0,0 +1 @@
1
+ export declare const ROW_HEIGHT = 40;
@@ -0,0 +1,2 @@
1
+ export * from './DataGrid';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ export declare const container: string;
2
+ export declare const table: string;
3
+ export declare const disabled: string;
4
+ export declare const loading: string;
5
+ export declare const titleClass: string;
@@ -0,0 +1,24 @@
1
+ import type { ReactNode } from 'react';
2
+ export type DataGridColumn<TRow> = {
3
+ title: string;
4
+ field?: keyof TRow;
5
+ width?: number | string;
6
+ align?: 'left' | 'center' | 'right' | 'justify';
7
+ isDisabled?: boolean;
8
+ color?: string;
9
+ renderHeaderCell?: (column: Omit<DataGridColumn<TRow>, 'renderHeaderCell' | 'renderCell' | 'format' | 'cellClassName' | 'cellColor'>) => ReactNode;
10
+ renderCell?: (row: TRow, index: number) => ReactNode;
11
+ format?: (row: TRow) => string | number | null | undefined;
12
+ cellClassName?: (row: TRow) => string;
13
+ cellColor?: (row: TRow) => string;
14
+ };
15
+ export type DataGridColumns<TRow> = DataGridColumn<TRow>[];
16
+ export type AlignVariant = 'left' | 'center' | 'right' | 'justify';
17
+ export type DataGridState = {
18
+ text: string;
19
+ imgSrc?: string;
20
+ imgAlt?: string;
21
+ actions?: ReactNode;
22
+ errorList?: string[];
23
+ onRetry?: () => void;
24
+ };
@@ -0,0 +1,22 @@
1
+ import type { MainActionKind, SecondaryActionKind } from './types';
2
+ export type DataGridActions<TAction> = {
3
+ /**
4
+ * Основные действия
5
+ */
6
+ main: MainActionKind<TAction>[];
7
+ /**
8
+ * Вторичные действия
9
+ */
10
+ secondary?: SecondaryActionKind<TAction>[];
11
+ };
12
+ export type DataGridActionCellProps<TRow> = {
13
+ /**
14
+ * Действия
15
+ */
16
+ actions: DataGridActions<TRow>;
17
+ /**
18
+ * Данные строки
19
+ */
20
+ row: TRow;
21
+ };
22
+ export declare const DataGridActionCell: <TRow>(props: DataGridActionCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { type TooltipProps } from '../../Tooltip';
2
+ import type { ActionCellHandler, MainActionKind } from '../types';
3
+ type MainActionProps<TAction> = {
4
+ /**
5
+ * Основные действия
6
+ */
7
+ action: MainActionKind<TAction>;
8
+ /**
9
+ * Обработчик клика на действие
10
+ */
11
+ onActionClick: ActionCellHandler<TAction>;
12
+ /**
13
+ * Если true, action не доступен
14
+ */
15
+ isDisabled?: boolean;
16
+ /**
17
+ * Положение тултипа
18
+ */
19
+ tooltipPlacement?: TooltipProps['side'];
20
+ };
21
+ export declare const MainAction: <TAction>({ action, onActionClick, isDisabled, tooltipPlacement, }: MainActionProps<TAction>) => import("react/jsx-runtime").JSX.Element;
22
+ export {};
@@ -0,0 +1,21 @@
1
+ import { type TooltipProps } from '../../../Tooltip';
2
+ import type { ActionCellHandler, SingleAction } from '../../types';
3
+ export type MainIconButtonProps<TAction> = {
4
+ action: SingleAction<TAction> & {
5
+ disabled?: boolean;
6
+ isLoading?: boolean;
7
+ };
8
+ /**
9
+ * Обработчик клика на действие
10
+ */
11
+ onActionClick: ActionCellHandler<TAction>;
12
+ /**
13
+ * Если true, action не доступен
14
+ */
15
+ isDisabled?: boolean;
16
+ /**
17
+ * Положение тултипа
18
+ */
19
+ tooltipPlacement?: TooltipProps['side'];
20
+ };
21
+ export declare const MainIconButton: <TAction>(props: MainIconButtonProps<TAction>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './MainIconButton';
@@ -0,0 +1,10 @@
1
+ import type { MainIconButtonProps } from '../MainIconButton';
2
+ type UseLogicParam<TAction> = MainIconButtonProps<TAction>;
3
+ export declare const useLogic: <TAction>({ action }: UseLogicParam<TAction>) => {
4
+ tooltipProps: {
5
+ text: string;
6
+ open: boolean;
7
+ onOpenChange: (open: boolean) => void;
8
+ };
9
+ };
10
+ export {};
@@ -0,0 +1 @@
1
+ export * from './MainAction';
@@ -0,0 +1,22 @@
1
+ import { type TooltipProps } from '../../Tooltip';
2
+ import type { ActionCellHandler, SecondaryActionKind } from '../types';
3
+ type SecondaryActionProps<TAction> = {
4
+ /**
5
+ * Вторичные действия
6
+ */
7
+ actions: SecondaryActionKind<TAction>[];
8
+ /**
9
+ * Обработчик нажатия на действие
10
+ */
11
+ onActionClick: ActionCellHandler<TAction>;
12
+ /**
13
+ * Если true, action не доступен
14
+ */
15
+ isDisabled?: boolean;
16
+ /**
17
+ * Положение тултипа
18
+ */
19
+ tooltipPlacement?: TooltipProps['side'];
20
+ };
21
+ export declare const SecondaryActions: <TAction>({ actions, onActionClick, tooltipPlacement, isDisabled, }: SecondaryActionProps<TAction>) => import("react/jsx-runtime").JSX.Element;
22
+ export {};
@@ -0,0 +1 @@
1
+ export * from './SecondaryAction';
@@ -0,0 +1 @@
1
+ export * from './DataGridActionCell';
@@ -0,0 +1 @@
1
+ export declare const wrapper: string;