@astral/ui 0.31.0 → 0.32.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/ButtonBase/ButtonBase.d.ts +1 -1
- package/ButtonBase/ButtonBase.js +4 -4
- package/ContentState/ContentState.d.ts +35 -0
- package/ContentState/ContentState.js +33 -0
- package/ContentState/index.d.ts +2 -0
- package/ContentState/index.js +14 -0
- package/ContentState/types.d.ts +27 -0
- package/ContentState/types.js +2 -0
- package/DatePicker/DatePicker.d.ts +10 -2
- package/DatePicker/DatePicker.js +40 -38
- package/DatePicker/DatePickerDay/DatePickerDay.d.ts +7 -0
- package/DatePicker/DatePickerDay/DatePickerDay.js +20 -0
- package/DatePicker/DatePickerDay/index.d.ts +1 -0
- package/DatePicker/DatePickerDay/index.js +5 -0
- package/DatePicker/DatePickerDay/styled.d.ts +4 -0
- package/DatePicker/DatePickerDay/styled.js +11 -0
- package/DatePicker/DatePickerHeader/DatePickerHeader.d.ts +3 -0
- package/DatePicker/DatePickerHeader/DatePickerHeader.js +31 -0
- package/DatePicker/DatePickerHeader/index.d.ts +1 -0
- package/DatePicker/DatePickerHeader/index.js +5 -0
- package/DatePicker/DatePickerHeader/styled.d.ts +20 -0
- package/DatePicker/DatePickerHeader/styled.js +12 -0
- package/DatePicker/index.d.ts +1 -0
- package/DatePicker/index.js +1 -0
- package/DatePicker/styled.d.ts +5 -0
- package/DatePicker/styled.js +70 -0
- package/DatePicker/types.d.ts +0 -2
- package/DatePickerProvider/DatePickerProvider.d.ts +13 -0
- package/DatePickerProvider/DatePickerProvider.js +26 -0
- package/DatePickerProvider/index.d.ts +1 -0
- package/DatePickerProvider/index.js +13 -0
- package/DropdownButton/DropdownButton.d.ts +9 -0
- package/DropdownButton/DropdownButton.js +37 -0
- package/DropdownButton/index.d.ts +1 -0
- package/DropdownButton/index.js +13 -0
- package/DropdownButton/styles.d.ts +11 -0
- package/DropdownButton/styles.js +28 -0
- package/GlobalStyles/GlobalStyles.js +11 -0
- package/IconButton/IconButton.d.ts +1 -1
- package/IconButton/IconButton.js +4 -4
- package/IconButton/styled.d.ts +1 -5
- package/IconDropdownButton/IconDropdownButton.d.ts +9 -0
- package/IconDropdownButton/IconDropdownButton.js +36 -0
- package/IconDropdownButton/index.d.ts +1 -0
- package/IconDropdownButton/index.js +13 -0
- package/IconDropdownButton/styles.d.ts +11 -0
- package/IconDropdownButton/styles.js +19 -0
- package/MaskField/MaskField.d.ts +13 -1
- package/MaskField/MaskField.js +5 -2
- package/MaskField/types.d.ts +0 -7
- package/Menu/Menu.d.ts +3 -3
- package/Menu/Menu.js +2 -20
- package/Notification/NotificationTemplate/styled.d.ts +1 -5
- package/Placeholder/styled.js +1 -1
- package/Profile/Profile.js +3 -14
- package/esm/ButtonBase/ButtonBase.d.ts +1 -1
- package/esm/ButtonBase/ButtonBase.js +4 -3
- package/esm/ContentState/ContentState.d.ts +35 -0
- package/esm/ContentState/ContentState.js +29 -0
- package/esm/ContentState/index.d.ts +2 -0
- package/esm/ContentState/index.js +2 -0
- package/esm/ContentState/types.d.ts +27 -0
- package/esm/ContentState/types.js +1 -0
- package/esm/DatePicker/DatePicker.d.ts +10 -2
- package/esm/DatePicker/DatePicker.js +38 -39
- package/esm/DatePicker/DatePickerDay/DatePickerDay.d.ts +7 -0
- package/esm/DatePicker/DatePickerDay/DatePickerDay.js +16 -0
- package/esm/DatePicker/DatePickerDay/index.d.ts +1 -0
- package/esm/DatePicker/DatePickerDay/index.js +1 -0
- package/esm/DatePicker/DatePickerDay/styled.d.ts +4 -0
- package/esm/DatePicker/DatePickerDay/styled.js +8 -0
- package/esm/DatePicker/DatePickerHeader/DatePickerHeader.d.ts +3 -0
- package/esm/DatePicker/DatePickerHeader/DatePickerHeader.js +24 -0
- package/esm/DatePicker/DatePickerHeader/index.d.ts +1 -0
- package/esm/DatePicker/DatePickerHeader/index.js +1 -0
- package/esm/DatePicker/DatePickerHeader/styled.d.ts +20 -0
- package/esm/DatePicker/DatePickerHeader/styled.js +9 -0
- package/esm/DatePicker/index.d.ts +1 -0
- package/esm/DatePicker/index.js +1 -0
- package/esm/DatePicker/styled.d.ts +5 -0
- package/esm/DatePicker/styled.js +67 -0
- package/esm/DatePicker/types.d.ts +0 -2
- package/esm/DatePickerProvider/DatePickerProvider.d.ts +13 -0
- package/esm/DatePickerProvider/DatePickerProvider.js +19 -0
- package/esm/DatePickerProvider/index.d.ts +1 -0
- package/esm/DatePickerProvider/index.js +1 -0
- package/esm/DropdownButton/DropdownButton.d.ts +9 -0
- package/esm/DropdownButton/DropdownButton.js +34 -0
- package/esm/DropdownButton/index.d.ts +1 -0
- package/esm/DropdownButton/index.js +1 -0
- package/esm/DropdownButton/styles.d.ts +11 -0
- package/esm/DropdownButton/styles.js +25 -0
- package/esm/GlobalStyles/GlobalStyles.js +11 -0
- package/esm/IconButton/IconButton.d.ts +1 -1
- package/esm/IconButton/IconButton.js +4 -3
- package/esm/IconButton/styled.d.ts +1 -5
- package/esm/IconDropdownButton/IconDropdownButton.d.ts +9 -0
- package/esm/IconDropdownButton/IconDropdownButton.js +33 -0
- package/esm/IconDropdownButton/index.d.ts +1 -0
- package/esm/IconDropdownButton/index.js +1 -0
- package/esm/IconDropdownButton/styles.d.ts +11 -0
- package/esm/IconDropdownButton/styles.js +16 -0
- package/esm/MaskField/MaskField.d.ts +13 -1
- package/esm/MaskField/MaskField.js +5 -2
- package/esm/MaskField/types.d.ts +0 -7
- package/esm/Menu/Menu.d.ts +3 -3
- package/esm/Menu/Menu.js +2 -16
- package/esm/Notification/NotificationTemplate/styled.d.ts +1 -5
- package/esm/Placeholder/styled.js +1 -1
- package/esm/Profile/Profile.js +4 -15
- package/esm/hooks/index.d.ts +1 -0
- package/esm/hooks/index.js +1 -0
- package/esm/hooks/useMenu.d.ts +21 -0
- package/esm/hooks/useMenu.js +8 -0
- package/esm/index.d.ts +6 -1
- package/esm/index.js +6 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +13 -0
- package/hooks/useMenu.d.ts +21 -0
- package/hooks/useMenu.js +12 -0
- package/index.d.ts +6 -1
- package/index.js +6 -1
- package/package.json +5 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseButtonProps } from '../ButtonBase';
|
|
3
|
-
export declare const IconButton: (
|
|
3
|
+
export declare const IconButton: import("react").ForwardRefExoticComponent<Pick<BaseButtonProps, keyof import("@mui/base").ButtonUnstyledOwnProps | "form" | "slot" | "style" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "variant"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -21,8 +21,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { forwardRef } from 'react';
|
|
24
25
|
import { StyledIconButton } from './styled';
|
|
25
|
-
export var IconButton = function (_a) {
|
|
26
|
+
export var IconButton = forwardRef(function (_a, ref) {
|
|
26
27
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
27
|
-
return _jsx(StyledIconButton, __assign({}, props, { children: children }), void 0);
|
|
28
|
-
};
|
|
28
|
+
return (_jsx(StyledIconButton, __assign({}, props, { ref: ref }, { children: children }), void 0));
|
|
29
|
+
});
|
|
@@ -5,11 +5,7 @@ declare type StyledIconButtonThemeProps = ButtonProps & {
|
|
|
5
5
|
theme: Theme;
|
|
6
6
|
};
|
|
7
7
|
export declare const getButtonHeight: ({ size, }: StyledIconButtonThemeProps) => string;
|
|
8
|
-
export declare const StyledIconButton: import("@emotion/styled").StyledComponent<
|
|
9
|
-
color?: "primary" | "error" | "success" | "warning" | undefined;
|
|
10
|
-
variant?: "link" | "light" | "contained" | "text" | undefined;
|
|
11
|
-
size?: "large" | "medium" | undefined;
|
|
12
|
-
} & {
|
|
8
|
+
export declare const StyledIconButton: import("@emotion/styled").StyledComponent<Pick<import("../ButtonBase").BaseButtonProps, keyof import("@mui/base").ButtonUnstyledOwnProps | "form" | "slot" | "style" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "variant"> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
13
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
14
10
|
} & Omit<import("@mui/lab").LoadingButtonProps<"button", {}>, "color" | "variant"> & {
|
|
15
11
|
variant?: "link" | "light" | "contained" | "text" | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BaseButtonProps } from '../ButtonBase';
|
|
3
|
+
export declare type IconDropdownButtonProps = BaseButtonProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Иконка кнопки
|
|
6
|
+
*/
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare const IconDropdownButton: import("react").ForwardRefExoticComponent<Pick<IconDropdownButtonProps, keyof import("@mui/base").ButtonUnstyledOwnProps | "form" | "slot" | "style" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "icon" | "variant"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { ClickAwayListener } from '@mui/material';
|
|
25
|
+
import { forwardRef } from 'react';
|
|
26
|
+
import { useMenu } from '../hooks';
|
|
27
|
+
import { Menu } from '../Menu';
|
|
28
|
+
import { IconDropdownButtonWrapper } from './styles';
|
|
29
|
+
export var IconDropdownButton = forwardRef(function (_a, ref) {
|
|
30
|
+
var children = _a.children, icon = _a.icon, props = __rest(_a, ["children", "icon"]);
|
|
31
|
+
var _b = useMenu(), open = _b.open, anchorRef = _b.anchorRef, handleOpenMenu = _b.handleOpenMenu, handleCloseMenu = _b.handleCloseMenu;
|
|
32
|
+
return (_jsxs(_Fragment, { children: [_jsx(ClickAwayListener, __assign({ ref: ref, onClickAway: handleCloseMenu }, { children: _jsx(IconDropdownButtonWrapper, __assign({}, props, { ref: anchorRef, onClick: handleOpenMenu, selected: open }, { children: icon }), void 0) }), void 0), _jsx(Menu, __assign({ open: open, anchorEl: anchorRef.current }, { children: children }), void 0)] }, void 0));
|
|
33
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IconDropdownButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IconDropdownButton';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseButtonProps } from '../ButtonBase';
|
|
3
|
+
export declare const IconDropdownButtonWrapper: import("@emotion/styled").StyledComponent<Pick<BaseButtonProps, keyof import("@mui/base").ButtonUnstyledOwnProps | "form" | "slot" | "style" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "variant"> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
} & Omit<import("@mui/base/ButtonUnstyled/ButtonUnstyledProps").default<"button", {}>, "color" | "size" | "variant"> & {
|
|
6
|
+
color?: "primary" | "error" | "success" | "warning" | undefined;
|
|
7
|
+
variant?: "link" | "light" | "contained" | "text" | undefined;
|
|
8
|
+
size?: "large" | "medium" | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
selected: boolean;
|
|
11
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { styled } from '../styles';
|
|
6
|
+
import { IconButton } from '../IconButton';
|
|
7
|
+
export var IconDropdownButtonWrapper = styled(IconButton, {
|
|
8
|
+
shouldForwardProp: function (prop) { return prop !== 'selected'; },
|
|
9
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n\n background-color: ", ";\n"], ["\n color: ", ";\n\n background-color: ", ";\n"])), function (_a) {
|
|
10
|
+
var selected = _a.selected, theme = _a.theme;
|
|
11
|
+
return selected ? theme.palette.primary.contrastText : 'default';
|
|
12
|
+
}, function (_a) {
|
|
13
|
+
var selected = _a.selected, theme = _a.theme;
|
|
14
|
+
return selected ? theme.palette.grey['900'] : 'default';
|
|
15
|
+
});
|
|
16
|
+
var templateObject_1;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { IMask } from 'react-imask';
|
|
3
|
+
import type { IMaskInputProps } from 'react-imask/dist/mixin';
|
|
4
|
+
import { TextFieldProps } from '../TextField';
|
|
5
|
+
declare type MaskProps = IMaskInputProps<IMask.AnyMaskedOptions, boolean, string, HTMLInputElement>;
|
|
6
|
+
export declare type MaskFieldProps = Omit<MaskProps & TextFieldProps, 'onChange' | 'onAccept'> & {
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
onAccept?: (value: string, maskRef: IMask.InputMask<IMask.AnyMaskedOptions>, e?: InputEvent | undefined, onChange?: (value: string) => void) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Автоматически исправляет введенное значение под маску. Если передан 'pad' - подставляет 0 перед цифрами в дате
|
|
11
|
+
*/
|
|
12
|
+
autofix?: boolean | 'pad';
|
|
13
|
+
};
|
|
3
14
|
export declare const MaskField: FC<MaskFieldProps>;
|
|
15
|
+
export {};
|
|
@@ -29,9 +29,12 @@ var MaskedTextField = IMaskMixin(function (_a) {
|
|
|
29
29
|
return _jsx(TextField, __assign({ inputRef: inputRef }, textFieldProps), void 0);
|
|
30
30
|
});
|
|
31
31
|
export var MaskField = function (_a) {
|
|
32
|
-
var onChange = _a.onChange, props = __rest(_a, ["onChange"]);
|
|
32
|
+
var onChange = _a.onChange, onAccept = _a.onAccept, props = __rest(_a, ["onChange", "onAccept"]);
|
|
33
33
|
var maskFieldProps = props;
|
|
34
|
-
var handleMaskFieldAccept = function (value) {
|
|
34
|
+
var handleMaskFieldAccept = function (value, maskRef, e) {
|
|
35
|
+
if (onAccept) {
|
|
36
|
+
return onAccept(value, maskRef, e, onChange);
|
|
37
|
+
}
|
|
35
38
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
36
39
|
};
|
|
37
40
|
return (_jsx(MaskedTextField, __assign({}, maskFieldProps, { onAccept: handleMaskFieldAccept }), void 0));
|
package/esm/MaskField/types.d.ts
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
import type { IMaskInputProps } from 'react-imask/dist/mixin';
|
|
2
|
-
import type { TextFieldProps } from '../TextField/types';
|
|
3
|
-
declare type MaskProps = IMaskInputProps<IMask.AnyMaskedOptions, boolean, string, HTMLInputElement>;
|
|
4
|
-
export declare type MaskFieldProps = Omit<MaskProps & TextFieldProps, 'onChange'> & {
|
|
5
|
-
onChange?: (value: string) => void;
|
|
6
|
-
};
|
|
7
1
|
export declare type MaskFieldValue = string;
|
|
8
|
-
export {};
|
package/esm/Menu/Menu.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { Menu, MenuProps } from '@mui/material';
|
|
2
|
+
export { Menu };
|
|
3
|
+
export type { MenuProps };
|
package/esm/Menu/Menu.js
CHANGED
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import MuiMenu from '@mui/material/Menu';
|
|
14
|
-
export var Menu = function (props) {
|
|
15
|
-
return _jsx(MuiMenu, __assign({}, props), void 0);
|
|
16
|
-
};
|
|
1
|
+
import { Menu } from '@mui/material';
|
|
2
|
+
export { Menu };
|
|
@@ -58,11 +58,7 @@ export declare const NotificationCloseIcon: import("@emotion/styled").StyledComp
|
|
|
58
58
|
} & {
|
|
59
59
|
theme?: import("@emotion/react").Theme | undefined;
|
|
60
60
|
} & NotificationCloseIconProps, {}, {}>;
|
|
61
|
-
export declare const NotificationCloseButton: import("@emotion/styled").StyledComponent<
|
|
62
|
-
color?: "primary" | "error" | "success" | "warning" | undefined;
|
|
63
|
-
variant?: "link" | "light" | "contained" | "text" | undefined;
|
|
64
|
-
size?: "large" | "medium" | undefined;
|
|
65
|
-
} & {
|
|
61
|
+
export declare const NotificationCloseButton: import("@emotion/styled").StyledComponent<Pick<import("../..").BaseButtonProps, keyof import("@mui/base").ButtonUnstyledOwnProps | "form" | "slot" | "style" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "variant"> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
66
62
|
theme?: import("@emotion/react").Theme | undefined;
|
|
67
63
|
} & NotificationCloseButtonProps, {}, {}>;
|
|
68
64
|
export declare const NotificationTitle: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
@@ -12,7 +12,7 @@ export var StyledContainer = styled.div(templateObject_1 || (templateObject_1 =
|
|
|
12
12
|
return theme.palette.background.paper;
|
|
13
13
|
});
|
|
14
14
|
export var StyledInnerContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n max-width: 384px;\n"], ["\n max-width: 384px;\n"])));
|
|
15
|
-
export var StyledImage = styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: 100%;\n
|
|
15
|
+
export var StyledImage = styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto;\n margin-bottom: ", ";\n"], ["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto;\n margin-bottom: ", ";\n"])), function (_a) {
|
|
16
16
|
var theme = _a.theme;
|
|
17
17
|
return theme.spacing(8);
|
|
18
18
|
});
|
package/esm/Profile/Profile.js
CHANGED
|
@@ -10,24 +10,13 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { Fragment, forwardRef
|
|
13
|
+
import { Fragment, forwardRef } from 'react';
|
|
14
14
|
import { Avatar, ClickAwayListener } from '@mui/material';
|
|
15
|
+
import { useMenu } from '../hooks';
|
|
15
16
|
import { ProfileAnnotation, ProfileChevron, ProfileCredentials, ProfileDisplayName, ProfileRoot, ProfileUser, } from './styled';
|
|
16
17
|
export var Profile = forwardRef(function (props, ref) {
|
|
17
18
|
var displayName = props.displayName, annotation = props.annotation, _a = props.avatar, avatar = _a === void 0 ? {} : _a, Menu = props.menu;
|
|
18
|
-
var _b =
|
|
19
|
-
|
|
20
|
-
var handleClick = useCallback(function () {
|
|
21
|
-
setOpen(function (prevValue) {
|
|
22
|
-
return !prevValue;
|
|
23
|
-
});
|
|
24
|
-
}, []);
|
|
25
|
-
var handleClickAway = useCallback(function () {
|
|
26
|
-
setOpen(false);
|
|
27
|
-
}, []);
|
|
28
|
-
var handleClose = useCallback(function () {
|
|
29
|
-
setOpen(false);
|
|
30
|
-
}, []);
|
|
31
|
-
return (_jsxs(Fragment, { children: [_jsx(ClickAwayListener, __assign({ ref: ref, onClickAway: handleClickAway }, { children: _jsxs(ProfileRoot, __assign({ ref: anchorRef, variant: "text", onClick: handleClick }, { children: [_jsxs(ProfileUser, { children: [_jsxs(ProfileCredentials, { children: [_jsx(ProfileDisplayName, { children: displayName }, void 0), _jsx(ProfileAnnotation, { children: annotation }, void 0)] }, void 0), _jsx(Avatar, __assign({}, avatar), void 0)] }, void 0), _jsx(ProfileChevron, { open: open }, void 0)] }), void 0) }), void 0), _jsx(Menu, { open: open, anchorEl: anchorRef.current, onClose: handleClose }, void 0)] }, void 0));
|
|
19
|
+
var _b = useMenu(), open = _b.open, anchorRef = _b.anchorRef, handleOpenMenu = _b.handleOpenMenu, handleCloseMenu = _b.handleCloseMenu;
|
|
20
|
+
return (_jsxs(Fragment, { children: [_jsx(ClickAwayListener, __assign({ ref: ref, onClickAway: handleCloseMenu }, { children: _jsxs(ProfileRoot, __assign({ ref: anchorRef, variant: "text", onClick: handleOpenMenu }, { children: [_jsxs(ProfileUser, { children: [_jsxs(ProfileCredentials, { children: [_jsx(ProfileDisplayName, { children: displayName }, void 0), _jsx(ProfileAnnotation, { children: annotation }, void 0)] }, void 0), _jsx(Avatar, __assign({}, avatar), void 0)] }, void 0), _jsx(ProfileChevron, { open: open }, void 0)] }), void 0) }), void 0), _jsx(Menu, { open: open, anchorEl: anchorRef.current, onClose: handleCloseMenu }, void 0)] }, void 0));
|
|
32
21
|
});
|
|
33
22
|
export default Profile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useMenu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useMenu';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
declare type UseMenuResult = {
|
|
3
|
+
/**
|
|
4
|
+
* Флаг состояния меню (открыто-закрыто)
|
|
5
|
+
*/
|
|
6
|
+
open: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Элемент, к которому привязано меню
|
|
9
|
+
*/
|
|
10
|
+
anchorRef: MutableRefObject<null>;
|
|
11
|
+
/**
|
|
12
|
+
* Обработчик открытия меню
|
|
13
|
+
*/
|
|
14
|
+
handleCloseMenu: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Обработчик закрытия меню
|
|
17
|
+
*/
|
|
18
|
+
handleOpenMenu: () => void;
|
|
19
|
+
};
|
|
20
|
+
export declare function useMenu(): UseMenuResult;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useRef, useState } from 'react';
|
|
2
|
+
export function useMenu() {
|
|
3
|
+
var _a = useState(false), open = _a[0], setOpen = _a[1];
|
|
4
|
+
var anchorRef = useRef(null);
|
|
5
|
+
var handleCloseMenu = function () { return setOpen(false); };
|
|
6
|
+
var handleOpenMenu = function () { return setOpen(true); };
|
|
7
|
+
return { open: open, anchorRef: anchorRef, handleCloseMenu: handleCloseMenu, handleOpenMenu: handleOpenMenu };
|
|
8
|
+
}
|
package/esm/index.d.ts
CHANGED
|
@@ -7,16 +7,21 @@ export * from './CircularProgress';
|
|
|
7
7
|
export * from './DashboardLayout';
|
|
8
8
|
export * from './DataGrid';
|
|
9
9
|
export * from './DataGridPagination';
|
|
10
|
+
export * from './DatePicker';
|
|
11
|
+
export * from './DatePickerProvider';
|
|
10
12
|
export * from './Dialog';
|
|
11
13
|
export * from './DialogActions';
|
|
12
14
|
export * from './DialogContent';
|
|
13
15
|
export * from './DialogContentText';
|
|
14
16
|
export * from './DialogTitle';
|
|
17
|
+
export * from './DropdownButton';
|
|
15
18
|
export * from './FormControlLabel';
|
|
16
19
|
export * from './FormHelperText';
|
|
17
20
|
export * from './GlobalStyles';
|
|
18
21
|
export * from './Grid';
|
|
19
22
|
export * from './IconButton';
|
|
23
|
+
export * from './IconDropdownButton';
|
|
24
|
+
export * from './hooks';
|
|
20
25
|
export * from './List';
|
|
21
26
|
export * from './ListItem';
|
|
22
27
|
export * from './ListItemAvatar';
|
|
@@ -52,6 +57,6 @@ export * from './SideDialogTitle';
|
|
|
52
57
|
export * from './SideDialogActions';
|
|
53
58
|
export * from './SideDialogContent';
|
|
54
59
|
export * from './SideDialogContentText';
|
|
55
|
-
export * from './DatePicker';
|
|
56
60
|
export * from './Notification';
|
|
57
61
|
export * from './LocalizationProvider';
|
|
62
|
+
export * from './ContentState';
|
package/esm/index.js
CHANGED
|
@@ -7,16 +7,21 @@ export * from './CircularProgress';
|
|
|
7
7
|
export * from './DashboardLayout';
|
|
8
8
|
export * from './DataGrid';
|
|
9
9
|
export * from './DataGridPagination';
|
|
10
|
+
export * from './DatePicker';
|
|
11
|
+
export * from './DatePickerProvider';
|
|
10
12
|
export * from './Dialog';
|
|
11
13
|
export * from './DialogActions';
|
|
12
14
|
export * from './DialogContent';
|
|
13
15
|
export * from './DialogContentText';
|
|
14
16
|
export * from './DialogTitle';
|
|
17
|
+
export * from './DropdownButton';
|
|
15
18
|
export * from './FormControlLabel';
|
|
16
19
|
export * from './FormHelperText';
|
|
17
20
|
export * from './GlobalStyles';
|
|
18
21
|
export * from './Grid';
|
|
19
22
|
export * from './IconButton';
|
|
23
|
+
export * from './IconDropdownButton';
|
|
24
|
+
export * from './hooks';
|
|
20
25
|
export * from './List';
|
|
21
26
|
export * from './ListItem';
|
|
22
27
|
export * from './ListItemAvatar';
|
|
@@ -52,6 +57,6 @@ export * from './SideDialogTitle';
|
|
|
52
57
|
export * from './SideDialogActions';
|
|
53
58
|
export * from './SideDialogContent';
|
|
54
59
|
export * from './SideDialogContentText';
|
|
55
|
-
export * from './DatePicker';
|
|
56
60
|
export * from './Notification';
|
|
57
61
|
export * from './LocalizationProvider';
|
|
62
|
+
export * from './ContentState';
|
package/hooks/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useMenu';
|
package/hooks/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./useMenu"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
declare type UseMenuResult = {
|
|
3
|
+
/**
|
|
4
|
+
* Флаг состояния меню (открыто-закрыто)
|
|
5
|
+
*/
|
|
6
|
+
open: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Элемент, к которому привязано меню
|
|
9
|
+
*/
|
|
10
|
+
anchorRef: MutableRefObject<null>;
|
|
11
|
+
/**
|
|
12
|
+
* Обработчик открытия меню
|
|
13
|
+
*/
|
|
14
|
+
handleCloseMenu: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Обработчик закрытия меню
|
|
17
|
+
*/
|
|
18
|
+
handleOpenMenu: () => void;
|
|
19
|
+
};
|
|
20
|
+
export declare function useMenu(): UseMenuResult;
|
|
21
|
+
export {};
|
package/hooks/useMenu.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useMenu = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
function useMenu() {
|
|
6
|
+
var _a = (0, react_1.useState)(false), open = _a[0], setOpen = _a[1];
|
|
7
|
+
var anchorRef = (0, react_1.useRef)(null);
|
|
8
|
+
var handleCloseMenu = function () { return setOpen(false); };
|
|
9
|
+
var handleOpenMenu = function () { return setOpen(true); };
|
|
10
|
+
return { open: open, anchorRef: anchorRef, handleCloseMenu: handleCloseMenu, handleOpenMenu: handleOpenMenu };
|
|
11
|
+
}
|
|
12
|
+
exports.useMenu = useMenu;
|
package/index.d.ts
CHANGED
|
@@ -7,16 +7,21 @@ export * from './CircularProgress';
|
|
|
7
7
|
export * from './DashboardLayout';
|
|
8
8
|
export * from './DataGrid';
|
|
9
9
|
export * from './DataGridPagination';
|
|
10
|
+
export * from './DatePicker';
|
|
11
|
+
export * from './DatePickerProvider';
|
|
10
12
|
export * from './Dialog';
|
|
11
13
|
export * from './DialogActions';
|
|
12
14
|
export * from './DialogContent';
|
|
13
15
|
export * from './DialogContentText';
|
|
14
16
|
export * from './DialogTitle';
|
|
17
|
+
export * from './DropdownButton';
|
|
15
18
|
export * from './FormControlLabel';
|
|
16
19
|
export * from './FormHelperText';
|
|
17
20
|
export * from './GlobalStyles';
|
|
18
21
|
export * from './Grid';
|
|
19
22
|
export * from './IconButton';
|
|
23
|
+
export * from './IconDropdownButton';
|
|
24
|
+
export * from './hooks';
|
|
20
25
|
export * from './List';
|
|
21
26
|
export * from './ListItem';
|
|
22
27
|
export * from './ListItemAvatar';
|
|
@@ -52,6 +57,6 @@ export * from './SideDialogTitle';
|
|
|
52
57
|
export * from './SideDialogActions';
|
|
53
58
|
export * from './SideDialogContent';
|
|
54
59
|
export * from './SideDialogContentText';
|
|
55
|
-
export * from './DatePicker';
|
|
56
60
|
export * from './Notification';
|
|
57
61
|
export * from './LocalizationProvider';
|
|
62
|
+
export * from './ContentState';
|
package/index.js
CHANGED
|
@@ -19,16 +19,21 @@ __exportStar(require("./CircularProgress"), exports);
|
|
|
19
19
|
__exportStar(require("./DashboardLayout"), exports);
|
|
20
20
|
__exportStar(require("./DataGrid"), exports);
|
|
21
21
|
__exportStar(require("./DataGridPagination"), exports);
|
|
22
|
+
__exportStar(require("./DatePicker"), exports);
|
|
23
|
+
__exportStar(require("./DatePickerProvider"), exports);
|
|
22
24
|
__exportStar(require("./Dialog"), exports);
|
|
23
25
|
__exportStar(require("./DialogActions"), exports);
|
|
24
26
|
__exportStar(require("./DialogContent"), exports);
|
|
25
27
|
__exportStar(require("./DialogContentText"), exports);
|
|
26
28
|
__exportStar(require("./DialogTitle"), exports);
|
|
29
|
+
__exportStar(require("./DropdownButton"), exports);
|
|
27
30
|
__exportStar(require("./FormControlLabel"), exports);
|
|
28
31
|
__exportStar(require("./FormHelperText"), exports);
|
|
29
32
|
__exportStar(require("./GlobalStyles"), exports);
|
|
30
33
|
__exportStar(require("./Grid"), exports);
|
|
31
34
|
__exportStar(require("./IconButton"), exports);
|
|
35
|
+
__exportStar(require("./IconDropdownButton"), exports);
|
|
36
|
+
__exportStar(require("./hooks"), exports);
|
|
32
37
|
__exportStar(require("./List"), exports);
|
|
33
38
|
__exportStar(require("./ListItem"), exports);
|
|
34
39
|
__exportStar(require("./ListItemAvatar"), exports);
|
|
@@ -64,6 +69,6 @@ __exportStar(require("./SideDialogTitle"), exports);
|
|
|
64
69
|
__exportStar(require("./SideDialogActions"), exports);
|
|
65
70
|
__exportStar(require("./SideDialogContent"), exports);
|
|
66
71
|
__exportStar(require("./SideDialogContentText"), exports);
|
|
67
|
-
__exportStar(require("./DatePicker"), exports);
|
|
68
72
|
__exportStar(require("./Notification"), exports);
|
|
69
73
|
__exportStar(require("./LocalizationProvider"), exports);
|
|
74
|
+
__exportStar(require("./ContentState"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"browser": "./src/index.ts",
|
|
5
5
|
"jest": {
|
|
6
6
|
"moduleNameMapper": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@astral/icons": "^0.
|
|
11
|
+
"@astral/icons": "^0.32.0",
|
|
12
12
|
"@emotion/cache": "11.7.1",
|
|
13
13
|
"@emotion/react": "11.8.1",
|
|
14
14
|
"@emotion/server": "11.4.0",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"@mui/material": "5.4.3",
|
|
19
19
|
"date-fns": "^2.28.0",
|
|
20
20
|
"lodash-es": "4.17.21",
|
|
21
|
+
"react-datepicker": "4.7.0",
|
|
21
22
|
"react-imask": "^6.4.2",
|
|
22
23
|
"react-toastify": "^9.0.0-rc-2"
|
|
23
24
|
},
|
|
@@ -27,11 +28,11 @@
|
|
|
27
28
|
"exports": {
|
|
28
29
|
".": {
|
|
29
30
|
"import": "./esm/index.js",
|
|
30
|
-
"require": "./
|
|
31
|
+
"require": "./index.js"
|
|
31
32
|
},
|
|
32
33
|
"./server": {
|
|
33
34
|
"import": "./esm/server/index.js",
|
|
34
|
-
"require": "./
|
|
35
|
+
"require": "./server/index.js"
|
|
35
36
|
}
|
|
36
37
|
},
|
|
37
38
|
"author": "Astral.Soft",
|