@astral/ui 4.61.3 → 4.62.1-rc.0
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.
- package/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +1 -1
- package/components/Autocomplete/styles.d.ts +1 -1
- package/components/CopyTypography/useLogic/useLogic.d.ts +2 -1
- package/components/DataGridMinimalisticPagination/styles.d.ts +3 -0
- package/components/DataGridMinimalisticPagination/styles.js +5 -0
- package/components/Description/Value/styles.d.ts +2 -1
- package/components/HintIcon/HintIcon.d.ts +1 -1
- package/components/HintIcon/HintIcon.js +2 -2
- package/components/HintIcon/Icon/Icon.d.ts +1 -1
- package/components/HintIcon/Icon/Icon.js +2 -2
- package/components/HintIcon/types.d.ts +5 -1
- package/components/JsonViewer/NodeValue/styles.d.ts +6 -3
- package/components/MenuOrganization/OrganizationItem/styles.d.ts +1 -1
- package/components/NavMenu/Item/ItemButton/styles.d.ts +2 -1
- package/components/NotificationList/SettingsButton/styled.d.ts +5 -0
- package/components/NotificationList/SettingsButton/styled.js +8 -0
- package/components/OverflowTypography/OverflowTypography.d.ts +2 -1
- package/components/ProductSwitcher/Content/styles.d.ts +1 -1
- package/components/Profile/MenuList/styles.d.ts +1 -1
- package/components/Profile/Profile.js +4 -16
- package/components/Profile/useLogic/index.d.ts +1 -0
- package/components/Profile/useLogic/index.js +1 -0
- package/components/Profile/useLogic/useLogic.d.ts +11 -0
- package/components/Profile/useLogic/useLogic.js +37 -0
- package/components/Select/styles.d.ts +1 -1
- package/components/TagsList/public.d.ts +2 -0
- package/components/TagsList/public.js +2 -0
- package/components/TextField/styles.d.ts +1 -1
- package/components/Tooltip/Tooltip.js +11 -2
- package/components/Tooltip/constants.d.ts +4 -0
- package/components/Tooltip/constants.js +4 -0
- package/components/Tooltip/styles.js +23 -8
- package/components/Tooltip/types.d.ts +5 -0
- package/components/Tooltip/useLogic/useLogic.d.ts +4 -4
- package/components/Tooltip/useLogic/useLogic.js +7 -1
- package/components/Tree/TreeItem/styles.d.ts +2 -1
- package/components/fileUploading/FileInfo/styles.d.ts +2 -1
- package/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +3 -3
- package/components/fileUploading/index.d.ts +8 -0
- package/components/fileUploading/index.js +8 -0
- package/components/placeholders/index.d.ts +4 -0
- package/components/placeholders/index.js +4 -0
- package/components/transitions/index.d.ts +4 -0
- package/components/transitions/index.js +4 -0
- package/components/types/index.d.ts +4 -0
- package/components/types/index.js +4 -0
- package/components/utils/index.d.ts +16 -0
- package/components/utils/index.js +16 -0
- package/hook-form/external.d.ts +1 -0
- package/hook-form/external.js +1 -0
- package/node/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +1 -1
- package/node/components/Autocomplete/styles.d.ts +1 -1
- package/node/components/CopyTypography/useLogic/useLogic.d.ts +2 -1
- package/node/components/DataGridMinimalisticPagination/styles.d.ts +3 -0
- package/node/components/DataGridMinimalisticPagination/styles.js +8 -0
- package/node/components/Description/Value/styles.d.ts +2 -1
- package/node/components/HintIcon/HintIcon.d.ts +1 -1
- package/node/components/HintIcon/HintIcon.js +2 -2
- package/node/components/HintIcon/Icon/Icon.d.ts +1 -1
- package/node/components/HintIcon/Icon/Icon.js +2 -2
- package/node/components/HintIcon/types.d.ts +5 -1
- package/node/components/JsonViewer/NodeValue/styles.d.ts +6 -3
- package/node/components/MenuOrganization/OrganizationItem/styles.d.ts +1 -1
- package/node/components/NavMenu/Item/ItemButton/styles.d.ts +2 -1
- package/node/components/NotificationList/SettingsButton/styled.d.ts +5 -0
- package/node/components/NotificationList/SettingsButton/styled.js +11 -0
- package/node/components/OverflowTypography/OverflowTypography.d.ts +2 -1
- package/node/components/ProductSwitcher/Content/styles.d.ts +1 -1
- package/node/components/Profile/MenuList/styles.d.ts +1 -1
- package/node/components/Profile/Profile.js +4 -19
- package/node/components/Profile/useLogic/index.d.ts +1 -0
- package/node/components/Profile/useLogic/index.js +17 -0
- package/node/components/Profile/useLogic/useLogic.d.ts +11 -0
- package/node/components/Profile/useLogic/useLogic.js +41 -0
- package/node/components/Select/styles.d.ts +1 -1
- package/node/components/TagsList/public.d.ts +2 -0
- package/node/components/TagsList/public.js +18 -0
- package/node/components/TextField/styles.d.ts +1 -1
- package/node/components/Tooltip/Tooltip.js +11 -2
- package/node/components/Tooltip/constants.d.ts +4 -0
- package/node/components/Tooltip/constants.js +4 -0
- package/node/components/Tooltip/styles.js +25 -30
- package/node/components/Tooltip/types.d.ts +5 -0
- package/node/components/Tooltip/useLogic/useLogic.d.ts +4 -4
- package/node/components/Tooltip/useLogic/useLogic.js +7 -1
- package/node/components/Tree/TreeItem/styles.d.ts +2 -1
- package/node/components/fileUploading/FileInfo/styles.d.ts +2 -1
- package/node/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +3 -3
- package/node/components/fileUploading/index.d.ts +8 -0
- package/node/components/fileUploading/index.js +21 -0
- package/node/components/placeholders/index.d.ts +4 -0
- package/node/components/placeholders/index.js +12 -0
- package/node/components/transitions/index.d.ts +4 -0
- package/node/components/transitions/index.js +11 -0
- package/node/components/types/index.d.ts +4 -0
- package/node/components/types/index.js +20 -0
- package/node/components/utils/index.d.ts +16 -0
- package/node/components/utils/index.js +32 -0
- package/node/hook-form/external.d.ts +1 -0
- package/node/hook-form/external.js +8 -0
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type UsePreviewFileUploaderParams } from '../hooks/usePreviewFileUploader';
|
|
3
3
|
export type PreviewFileUploaderProps = UsePreviewFileUploaderParams;
|
|
4
|
-
export declare const PreviewFileUploader: import("react").ForwardRefExoticComponent<Pick<import("
|
|
5
|
-
value: import("
|
|
4
|
+
export declare const PreviewFileUploader: import("react").ForwardRefExoticComponent<Pick<import("..").FileUploaderProps, "className" | "label" | "name" | "placeholder" | "isDisabled" | "isError" | "inputRef" | "helperText" | "maxFileSize" | "onUploadFile" | "getErrorMessage" | "restrictions" | "notify" | "onDeleteFile" | "onView" | "generateDownloadLink"> & {
|
|
5
|
+
value: import("..").UploadFile | null | undefined;
|
|
6
6
|
accept?: string[] | undefined;
|
|
7
7
|
placeholderImgSrc?: string | undefined;
|
|
8
8
|
isHidePersonalData?: boolean | undefined;
|
|
9
9
|
PdfViewer?: import("react").LazyExoticComponent<(props: import("../../PdfViewer").PdfViewerProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>> | ((props: import("../../PdfViewer").PdfViewerProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>) | undefined;
|
|
10
|
-
onChange: (value: import("
|
|
10
|
+
onChange: (value: import("..").UploadFile | null) => void;
|
|
11
11
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { type RestrictionFn, type RestrictionFnResult, type UploadedFileData, type UploadFile, type FileUploaderNotify, type FileUploaderProps, type FileId, FileUploader, } from './FileUploader';
|
|
2
|
+
export { type FileUploaderDropZoneProps, FileUploaderDropzone, } from './FileUploaderDropzone';
|
|
3
|
+
export { FileUploaderFile, type FileUploaderFileProps, } from './FileUploaderFile';
|
|
4
|
+
export { type UseFileUploaderParams, type UsePreviewFileUploaderParams, useFileUploader, usePreviewFileUploader, } from './hooks';
|
|
5
|
+
export { PreviewFileUploader, type PreviewFileUploaderProps, } from './PreviewFileUploader';
|
|
6
|
+
export { PreviewFileUploaderDropZone, type PreviewFileUploaderDropZoneProps, } from './PreviewFileUploaderDropZone';
|
|
7
|
+
export { PreviewFileUploaderFile, type PreviewFileUploaderFileProps, } from './PreviewFileUploaderFile';
|
|
8
|
+
export { fileUploaderClassnames, previewFileUploaderClassnames, } from './constants';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { FileUploader, } from './FileUploader';
|
|
2
|
+
export { FileUploaderDropzone, } from './FileUploaderDropzone';
|
|
3
|
+
export { FileUploaderFile, } from './FileUploaderFile';
|
|
4
|
+
export { useFileUploader, usePreviewFileUploader, } from './hooks';
|
|
5
|
+
export { PreviewFileUploader, } from './PreviewFileUploader';
|
|
6
|
+
export { PreviewFileUploaderDropZone, } from './PreviewFileUploaderDropZone';
|
|
7
|
+
export { PreviewFileUploaderFile, } from './PreviewFileUploaderFile';
|
|
8
|
+
export { fileUploaderClassnames, previewFileUploaderClassnames, } from './constants';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { InternalErrorPlaceholder } from './InternalErrorPlaceholder';
|
|
2
|
+
export { LoadingPlaceholder, loadingPlaceholderClassnames, } from './LoadingPlaceholder';
|
|
3
|
+
export { OutdatedReleasePlaceholder } from './OutdatedReleasePlaceholder';
|
|
4
|
+
export { type PlaceholderImageProps, Placeholder, type PlaceholderProps, type PlaceholderSize, } from './Placeholder';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { InternalErrorPlaceholder } from './InternalErrorPlaceholder';
|
|
2
|
+
export { LoadingPlaceholder, loadingPlaceholderClassnames, } from './LoadingPlaceholder';
|
|
3
|
+
export { OutdatedReleasePlaceholder } from './OutdatedReleasePlaceholder';
|
|
4
|
+
export { Placeholder, } from './Placeholder';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './classNames';
|
|
2
|
+
export * from './createUIKitClassname';
|
|
3
|
+
export * from './mergeDeep';
|
|
4
|
+
export * from './prop';
|
|
5
|
+
export * from './uniqBy';
|
|
6
|
+
export * from './uniqueBy';
|
|
7
|
+
export * from './generateLocalStorageKey';
|
|
8
|
+
export * from './getNodeText';
|
|
9
|
+
export * from './redirectToLink';
|
|
10
|
+
export * from './checkIsDeepEqual';
|
|
11
|
+
export * from './differenceWith';
|
|
12
|
+
export * from './isEmpty';
|
|
13
|
+
export * from './mergeDeep';
|
|
14
|
+
export * from './prop';
|
|
15
|
+
export * from './uniqBy';
|
|
16
|
+
export * from './uniqueBy';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './classNames';
|
|
2
|
+
export * from './createUIKitClassname';
|
|
3
|
+
export * from './mergeDeep';
|
|
4
|
+
export * from './prop';
|
|
5
|
+
export * from './uniqBy';
|
|
6
|
+
export * from './uniqueBy';
|
|
7
|
+
export * from './generateLocalStorageKey';
|
|
8
|
+
export * from './getNodeText';
|
|
9
|
+
export * from './redirectToLink';
|
|
10
|
+
export * from './checkIsDeepEqual';
|
|
11
|
+
export * from './differenceWith';
|
|
12
|
+
export * from './isEmpty';
|
|
13
|
+
export * from './mergeDeep';
|
|
14
|
+
export * from './prop';
|
|
15
|
+
export * from './uniqBy';
|
|
16
|
+
export * from './uniqueBy';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Controller as FormController, type ControllerProps as FormControllerProps, type Field as FormField, type FieldArray as FormFieldArray, type FieldArrayPath as FormFieldArrayPath, type FieldArrayWithId as FormFieldArrayWithId, type FieldError as FormFieldError, type FieldErrors as FormFieldErrors, type FieldPath as FormFieldPath, type FieldValues as FormFieldValues, type Path as FormPath, type RegisterOptions as FormRegisterOptions, type Resolver as FormResolver, type UseControllerProps as UseFormControllerProps, type UseFormGetValues, type UseWatchProps as UseFormWatchProps, useController as useFormController, useFieldArray as useFormFieldArray, useWatch as useFormWatch, } from 'react-hook-form';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Controller as FormController, useController as useFormController, useFieldArray as useFormFieldArray, useWatch as useFormWatch, } from 'react-hook-form';
|
|
@@ -315,7 +315,7 @@ export declare const useMainActions: <TMainActionComponent extends ElementType>(
|
|
|
315
315
|
divider?: boolean | undefined;
|
|
316
316
|
disabledReason?: string | undefined;
|
|
317
317
|
note?: string | undefined;
|
|
318
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
318
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
319
319
|
component?: ElementType | undefined;
|
|
320
320
|
href?: string | undefined;
|
|
321
321
|
css?: import("@emotion/serialize").Interpolation<import("@emotion/react").Theme>;
|
|
@@ -3,7 +3,7 @@ import MuiAutocomplete from '@mui/material/Autocomplete';
|
|
|
3
3
|
export declare const StyledMenuItem: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("..").WithoutEmotionSpecific<Omit<import("@mui/material").MenuItemProps, "component">> & {
|
|
4
4
|
disabledReason?: string | undefined;
|
|
5
5
|
note?: string | undefined;
|
|
6
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
6
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
7
7
|
component?: import("react").ElementType | undefined;
|
|
8
8
|
href?: string | undefined;
|
|
9
9
|
} & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement> & {
|
|
@@ -589,6 +589,7 @@ export declare const useLogic: ({ children, copyPosition, copyText, isShowCopyTe
|
|
|
589
589
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
590
590
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
591
591
|
open?: boolean | undefined;
|
|
592
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
592
593
|
size?: import("../..").TooltipSize | undefined;
|
|
593
594
|
componentsProps?: {
|
|
594
595
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -626,7 +627,7 @@ export declare const useLogic: ({ children, copyPosition, copyText, isShowCopyTe
|
|
|
626
627
|
leaveDelay?: number | undefined;
|
|
627
628
|
leaveTouchDelay?: number | undefined;
|
|
628
629
|
onOpen?: ((event: SyntheticEvent<Element, Event>) => void) | undefined;
|
|
629
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
630
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
630
631
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
631
632
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
632
633
|
withoutContainer?: boolean | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledMinimalisticPagination = void 0;
|
|
4
|
+
const MinimalisticPagination_1 = require("../MinimalisticPagination");
|
|
5
|
+
const styled_1 = require("../styled");
|
|
6
|
+
exports.StyledMinimalisticPagination = (0, styled_1.styled)(MinimalisticPagination_1.MinimalisticPagination) `
|
|
7
|
+
justify-content: end;
|
|
8
|
+
`;
|
|
@@ -321,6 +321,7 @@ export declare const StyledCopyTypography: import("@emotion/styled/dist/declarat
|
|
|
321
321
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
322
322
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
323
323
|
open?: boolean | undefined;
|
|
324
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
324
325
|
size?: import("../..").TooltipSize | undefined;
|
|
325
326
|
componentsProps?: {
|
|
326
327
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -358,7 +359,7 @@ export declare const StyledCopyTypography: import("@emotion/styled/dist/declarat
|
|
|
358
359
|
leaveDelay?: number | undefined;
|
|
359
360
|
leaveTouchDelay?: number | undefined;
|
|
360
361
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
361
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
362
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
362
363
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
363
364
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
364
365
|
withoutContainer?: boolean | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type HintIconProps } from './types';
|
|
2
|
-
export declare const HintIcon: ({ variant, title, note, iconOption, tooltipPlacement, renderIcon, }: HintIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const HintIcon: ({ variant, title, note, iconOption, tooltipPlacement, renderIcon, tooltipWidth, }: HintIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,8 +6,8 @@ const BottomDrawer_1 = require("../BottomDrawer");
|
|
|
6
6
|
const Icon_1 = require("./Icon");
|
|
7
7
|
const styles_1 = require("./styles");
|
|
8
8
|
const useLogic_1 = require("./useLogic");
|
|
9
|
-
const HintIcon = ({ variant, title, note, iconOption, tooltipPlacement = 'bottom', renderIcon, }) => {
|
|
9
|
+
const HintIcon = ({ variant, title, note, iconOption, tooltipPlacement = 'bottom', renderIcon, tooltipWidth, }) => {
|
|
10
10
|
const { handleClose, handleOpen, open } = (0, useLogic_1.useLogic)();
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { onClick: handleOpen, variant: variant, iconOption: iconOption, note: note, tooltipPlacement: tooltipPlacement, renderIcon: renderIcon }), (0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { title: title, open: open, onClose: handleClose, children: (0, jsx_runtime_1.jsx)(styles_1.DrawerContent, { children: note }) })] }));
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { onClick: handleOpen, variant: variant, iconOption: iconOption, note: note, tooltipPlacement: tooltipPlacement, renderIcon: renderIcon, tooltipWidth: tooltipWidth }), (0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { title: title, open: open, onClose: handleClose, children: (0, jsx_runtime_1.jsx)(styles_1.DrawerContent, { children: note }) })] }));
|
|
12
12
|
};
|
|
13
13
|
exports.HintIcon = HintIcon;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SyntheticEvent } from 'react';
|
|
2
2
|
import type { HintIconProps, TooltipPlacement } from '../types';
|
|
3
|
-
export type IconProps = Pick<HintIconProps, 'variant' | 'iconOption' | 'note' | 'renderIcon'> & {
|
|
3
|
+
export type IconProps = Pick<HintIconProps, 'variant' | 'iconOption' | 'note' | 'renderIcon' | 'tooltipWidth'> & {
|
|
4
4
|
onClick: (e: SyntheticEvent) => void;
|
|
5
5
|
tooltipPlacement: TooltipPlacement;
|
|
6
6
|
};
|
|
@@ -8,7 +8,7 @@ const styles_1 = require("./styles");
|
|
|
8
8
|
const useLogic_1 = require("./useLogic");
|
|
9
9
|
const Icon = (props) => {
|
|
10
10
|
const { getIcon, iconColor } = (0, useLogic_1.useLogic)(props);
|
|
11
|
-
const { onClick, note, tooltipPlacement } = props;
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: note, placement: tooltipPlacement, children: (0, jsx_runtime_1.jsx)(styles_1.IconWrapper, { onClick: onClick, "$color": iconColor, className: constants_1.hintIconClassnames.iconWrapper, children: getIcon() }) }));
|
|
11
|
+
const { onClick, note, tooltipPlacement, tooltipWidth } = props;
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: note, placement: tooltipPlacement, width: tooltipWidth, children: (0, jsx_runtime_1.jsx)(styles_1.IconWrapper, { onClick: onClick, "$color": iconColor, className: constants_1.hintIconClassnames.iconWrapper, children: getIcon() }) }));
|
|
13
13
|
};
|
|
14
14
|
exports.Icon = Icon;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
export type TooltipPlacement = 'left' | 'top' | 'right' | 'bottom';
|
|
3
3
|
export type HintIconProps = {
|
|
4
4
|
/**
|
|
@@ -36,4 +36,8 @@ export type HintIconProps = {
|
|
|
36
36
|
* Задание кастомной иконки
|
|
37
37
|
*/
|
|
38
38
|
renderIcon?: () => ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Задает ширину тултипа
|
|
41
|
+
*/
|
|
42
|
+
tooltipWidth?: CSSProperties['width'];
|
|
39
43
|
};
|
|
@@ -290,6 +290,7 @@ export declare const Value: import("@emotion/styled/dist/declarations/src/types"
|
|
|
290
290
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
291
291
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
292
292
|
open?: boolean | undefined;
|
|
293
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
293
294
|
size?: import("../..").TooltipSize | undefined;
|
|
294
295
|
componentsProps?: {
|
|
295
296
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -327,7 +328,7 @@ export declare const Value: import("@emotion/styled/dist/declarations/src/types"
|
|
|
327
328
|
leaveDelay?: number | undefined;
|
|
328
329
|
leaveTouchDelay?: number | undefined;
|
|
329
330
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
330
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
331
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
331
332
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
332
333
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
333
334
|
withoutContainer?: boolean | undefined;
|
|
@@ -651,6 +652,7 @@ export declare const CopyWrapper: import("@emotion/styled/dist/declarations/src/
|
|
|
651
652
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
652
653
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
653
654
|
open?: boolean | undefined;
|
|
655
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
654
656
|
size?: import("../..").TooltipSize | undefined;
|
|
655
657
|
componentsProps?: {
|
|
656
658
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -688,7 +690,7 @@ export declare const CopyWrapper: import("@emotion/styled/dist/declarations/src/
|
|
|
688
690
|
leaveDelay?: number | undefined;
|
|
689
691
|
leaveTouchDelay?: number | undefined;
|
|
690
692
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
691
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
693
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
692
694
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
693
695
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
694
696
|
withoutContainer?: boolean | undefined;
|
|
@@ -988,6 +990,7 @@ export declare const GuidValue: import("@emotion/styled/dist/declarations/src/ty
|
|
|
988
990
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
989
991
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
990
992
|
open?: boolean | undefined;
|
|
993
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
991
994
|
size?: import("../..").TooltipSize | undefined;
|
|
992
995
|
componentsProps?: {
|
|
993
996
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -1025,7 +1028,7 @@ export declare const GuidValue: import("@emotion/styled/dist/declarations/src/ty
|
|
|
1025
1028
|
leaveDelay?: number | undefined;
|
|
1026
1029
|
leaveTouchDelay?: number | undefined;
|
|
1027
1030
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
1028
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
1031
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
1029
1032
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
1030
1033
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
1031
1034
|
withoutContainer?: boolean | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const StyledMenuItem: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../..").WithoutEmotionSpecific<Omit<import("@mui/material/MenuItem").MenuItemProps, "component">> & {
|
|
3
3
|
disabledReason?: string | undefined;
|
|
4
4
|
note?: string | undefined;
|
|
5
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
5
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
6
6
|
component?: import("react").ElementType | undefined;
|
|
7
7
|
href?: string | undefined;
|
|
8
8
|
} & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement> & {
|
|
@@ -579,6 +579,7 @@ export declare const NavMenuItemButtonText: import("@emotion/styled/dist/declara
|
|
|
579
579
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
580
580
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
581
581
|
open?: boolean | undefined;
|
|
582
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
582
583
|
size?: import("../../..").TooltipSize | undefined;
|
|
583
584
|
componentsProps?: {
|
|
584
585
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -616,7 +617,7 @@ export declare const NavMenuItemButtonText: import("@emotion/styled/dist/declara
|
|
|
616
617
|
leaveDelay?: number | undefined;
|
|
617
618
|
leaveTouchDelay?: number | undefined;
|
|
618
619
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
619
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
620
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
620
621
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
621
622
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
622
623
|
withoutContainer?: boolean | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Wrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Wrapper = void 0;
|
|
4
|
+
const styled_1 = require("../../styled");
|
|
5
|
+
exports.Wrapper = styled_1.styled.div `
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: ${({ theme }) => theme.spacing(3)};
|
|
8
|
+
|
|
9
|
+
height: 100%;
|
|
10
|
+
margin-right: ${({ theme }) => theme.spacing(1)};
|
|
11
|
+
`;
|
|
@@ -291,6 +291,7 @@ export declare const OverflowTypography: import("react").ForwardRefExoticCompone
|
|
|
291
291
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
292
292
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
293
293
|
open?: boolean | undefined;
|
|
294
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
294
295
|
size?: import("../Tooltip").TooltipSize | undefined;
|
|
295
296
|
componentsProps?: {
|
|
296
297
|
popper?: (Partial<import("@mui/material").PopperProps> & import("@mui/material").TooltipComponentsPropsOverrides) | undefined;
|
|
@@ -328,7 +329,7 @@ export declare const OverflowTypography: import("react").ForwardRefExoticCompone
|
|
|
328
329
|
leaveDelay?: number | undefined;
|
|
329
330
|
leaveTouchDelay?: number | undefined;
|
|
330
331
|
onOpen?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
|
|
331
|
-
placement?: "bottom" | "left" | "right" | "top" | "
|
|
332
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
332
333
|
PopperComponent?: import("react").JSXElementConstructor<import("@mui/material").PopperProps> | undefined;
|
|
333
334
|
PopperProps?: Partial<import("@mui/material").PopperProps> | undefined;
|
|
334
335
|
withoutContainer?: boolean | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const ProductItem: <TComponent extends import("react").ElementType>(props: import("../..").WithoutEmotionSpecific<Omit<import("@mui/material/MenuItem").MenuItemProps, "component">> & {
|
|
3
3
|
disabledReason?: string | undefined;
|
|
4
4
|
note?: string | undefined;
|
|
5
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
5
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
6
6
|
component?: TComponent | undefined;
|
|
7
7
|
href?: string | undefined;
|
|
8
8
|
} & import("react").ComponentPropsWithRef<import("react").ElementType extends TComponent ? "li" : TComponent> & import("react").RefAttributes<HTMLLIElement>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
|
|
@@ -7,7 +7,7 @@ export declare const StyledMenu: import("@emotion/styled/dist/declarations/src/t
|
|
|
7
7
|
export declare const ExitMenuItem: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../..").WithoutEmotionSpecific<Omit<import("@mui/material").MenuItemProps, "component">> & {
|
|
8
8
|
disabledReason?: string | undefined;
|
|
9
9
|
note?: string | undefined;
|
|
10
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
10
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
11
11
|
component?: import("react").ElementType | undefined;
|
|
12
12
|
href?: string | undefined;
|
|
13
13
|
} & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement> & {
|
|
@@ -1,35 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.Profile = void 0;
|
|
7
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const ClickAwayListener_1 = __importDefault(require("@mui/material/ClickAwayListener"));
|
|
9
|
-
const react_1 = require("react");
|
|
10
|
-
const personalDataSecurity_1 = require("../personalDataSecurity");
|
|
11
5
|
const Typography_1 = require("../Typography");
|
|
12
|
-
const useMenu_1 = require("../useMenu");
|
|
13
6
|
const constants_1 = require("./constants");
|
|
14
7
|
const MenuList_1 = require("./MenuList");
|
|
15
8
|
const ProfileSkeleton_1 = require("./ProfileSkeleton");
|
|
16
9
|
const styles_1 = require("./styles");
|
|
10
|
+
const useLogic_1 = require("./useLogic");
|
|
17
11
|
const Profile = (props) => {
|
|
18
|
-
const { displayName, annotation, avatar = {}, menu: Menu, menuList, exitButton,
|
|
19
|
-
const { open, anchorRef, handleOpenMenu, handleCloseMenu } = (0,
|
|
20
|
-
(0, react_1.useEffect)(() => {
|
|
21
|
-
if (!Menu && !menuList && !exitButton) {
|
|
22
|
-
// biome-ignore lint/suspicious/noConsole: Ошибка для интеграторов
|
|
23
|
-
console.error('Profile должен иметь один из следующих props: menu, menuList, exitButton');
|
|
24
|
-
}
|
|
25
|
-
}, []);
|
|
26
|
-
const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
|
|
27
|
-
isEnabled: isHidePersonalData,
|
|
28
|
-
});
|
|
12
|
+
const { displayName, annotation, avatar = {}, menu: Menu, menuList, exitButton, isLoading, } = props;
|
|
13
|
+
const { open, anchorRef, handleOpenMenu, handleCloseMenu, hidePersonalDataClassname, } = (0, useLogic_1.useLogic)(props);
|
|
29
14
|
if (isLoading) {
|
|
30
15
|
return (0, jsx_runtime_1.jsx)(ProfileSkeleton_1.ProfileSkeleton, {});
|
|
31
16
|
}
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(styles_1.ProfileRoot, { ref: anchorRef, variant: "text", onClick: handleOpenMenu, className: constants_1.profileClassnames.button, children: [(0, jsx_runtime_1.jsx)(styles_1.StyledAvatar, { ...avatar, className: constants_1.profileClassnames.avatar }), (0, jsx_runtime_1.jsxs)(styles_1.User, { className: constants_1.profileClassnames.user, children: [(0, jsx_runtime_1.jsxs)(styles_1.Credentials, { className: hidePersonalDataClassname, children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "body1", className: constants_1.profileClassnames.credentials, children: displayName }), (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "textSecondary", className: constants_1.profileClassnames.credentials, children: annotation })] }), (0, jsx_runtime_1.jsx)(styles_1.StyledChevron, { isActive: open })] })] }), Menu ? ((0, jsx_runtime_1.jsx)(Menu, { open: open, anchorEl: anchorRef.current, onClose: handleCloseMenu, anchorOrigin: {
|
|
33
18
|
vertical: 'bottom',
|
|
34
19
|
horizontal: 'right',
|
|
35
20
|
}, transformOrigin: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./useLogic"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type ProfileProps } from '../types';
|
|
3
|
+
type UseLogicParams = ProfileProps;
|
|
4
|
+
export declare const useLogic: ({ menuList, menu: Menu, exitButton, isHidePersonalData, }: UseLogicParams) => {
|
|
5
|
+
open: boolean;
|
|
6
|
+
anchorRef: import("react").MutableRefObject<HTMLButtonElement | null>;
|
|
7
|
+
handleOpenMenu: () => void;
|
|
8
|
+
handleCloseMenu: () => void;
|
|
9
|
+
hidePersonalDataClassname: string;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const personalDataSecurity_1 = require("../../personalDataSecurity");
|
|
6
|
+
const useMenu_1 = require("../../useMenu");
|
|
7
|
+
const useLogic = ({ menuList, menu: Menu, exitButton, isHidePersonalData, }) => {
|
|
8
|
+
const { open, anchorRef, handleOpenMenu, handleCloseMenu } = (0, useMenu_1.useMenu)();
|
|
9
|
+
(0, react_1.useEffect)(() => {
|
|
10
|
+
if (!open) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const timer = setTimeout(() => {
|
|
14
|
+
const popover = document.querySelector('[role="presentation"]');
|
|
15
|
+
if (popover) {
|
|
16
|
+
const menuItems = popover.querySelectorAll('[role="menuitem"]');
|
|
17
|
+
menuItems.forEach((item) => {
|
|
18
|
+
item.onclick = handleCloseMenu;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}, 0);
|
|
22
|
+
return () => clearTimeout(timer);
|
|
23
|
+
}, [open, handleCloseMenu]);
|
|
24
|
+
(0, react_1.useEffect)(() => {
|
|
25
|
+
if (!Menu && !menuList && !exitButton) {
|
|
26
|
+
// biome-ignore lint/suspicious/noConsole: Ошибка для интеграторов
|
|
27
|
+
console.error('Profile должен иметь один из следующих props: menu, menuList, exitButton');
|
|
28
|
+
}
|
|
29
|
+
}, []);
|
|
30
|
+
const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
|
|
31
|
+
isEnabled: isHidePersonalData,
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
open,
|
|
35
|
+
anchorRef,
|
|
36
|
+
handleOpenMenu,
|
|
37
|
+
handleCloseMenu,
|
|
38
|
+
hidePersonalDataClassname,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
exports.useLogic = useLogic;
|
|
@@ -10,7 +10,7 @@ export declare const EndAdornmentWrapper: import("@emotion/styled/dist/declarati
|
|
|
10
10
|
export declare const Placeholder: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("..").WithoutEmotionSpecific<Omit<import("@mui/material").MenuItemProps, "component">> & {
|
|
11
11
|
disabledReason?: string | undefined;
|
|
12
12
|
note?: string | undefined;
|
|
13
|
-
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "
|
|
13
|
+
tooltipPlacement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
14
14
|
component?: import("react").ElementType | undefined;
|
|
15
15
|
href?: string | undefined;
|
|
16
16
|
} & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement> & {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./TagsList"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const StyledTextField: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
2
2
|
variant?: import("@mui/material/TextField").TextFieldVariants | undefined;
|
|
3
|
-
} & Omit<import("@mui/material/TextField").OutlinedTextFieldProps | import("@mui/material/TextField").
|
|
3
|
+
} & Omit<import("@mui/material/TextField").OutlinedTextFieldProps | import("@mui/material/TextField").FilledTextFieldProps | import("@mui/material/TextField").StandardTextFieldProps, "variant"> & {
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
}, {}, {}>;
|
|
@@ -3,10 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Tooltip = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const classNames_1 = require("../utils/classNames");
|
|
7
|
+
const cva_1 = require("../utils/cva");
|
|
6
8
|
const constants_1 = require("./constants");
|
|
7
9
|
const styles_1 = require("./styles");
|
|
8
10
|
const useLogic_1 = require("./useLogic");
|
|
11
|
+
const tooltipCva = (0, cva_1.cva)(constants_1.tooltipClassnames.root, {
|
|
12
|
+
variants: {
|
|
13
|
+
withoutMaxWidth: {
|
|
14
|
+
true: constants_1.tooltipClassnames.withoutMaxWidth,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
});
|
|
9
18
|
exports.Tooltip = (0, react_1.forwardRef)((props, ref) => {
|
|
10
|
-
const { title, placement = 'top', size = 'medium', withoutContainer = true, children, className, ...restProps } = (0, useLogic_1.useLogic)(props);
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.StyledTooltip, { ref: ref, title: title, size: size, placement: placement, arrow: true, className: className, ...restProps, children: withoutContainer ? (children) : ((0, jsx_runtime_1.jsx)(styles_1.ContentWrapper, { className: constants_1.tooltipClassnames.contentWrapper, children: children })) }));
|
|
19
|
+
const { title, placement = 'top', size = 'medium', withoutContainer = true, children, className, tooltipStyle, width, ...restProps } = (0, useLogic_1.useLogic)(props);
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledTooltip, { ref: ref, title: title, size: size, placement: placement, arrow: true, className: (0, classNames_1.classNames)(className, tooltipCva({ withoutMaxWidth: Boolean(width) })), style: tooltipStyle, ...restProps, children: withoutContainer ? (children) : ((0, jsx_runtime_1.jsx)(styles_1.ContentWrapper, { className: constants_1.tooltipClassnames.contentWrapper, children: children })) }));
|
|
12
21
|
});
|