@astral/ui 0.31.0 → 0.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +41 -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 +73 -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 +39 -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 +70 -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
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
export declare type DropdownButtonProps = Omit<ButtonProps, 'endIcon' | 'loading'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Название кнопки
|
|
6
|
+
*/
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const DropdownButton: import("react").ForwardRefExoticComponent<Pick<DropdownButtonProps, "disabled" | "component" | "href" | "onFocusVisible" | "tabIndex" | "type" | "action" | "children" | "form" | "slot" | "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" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "fullWidth" | "startIcon" | "loadingIndicator" | "loadingPosition"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.DropdownButton = void 0;
|
|
26
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
+
var material_1 = require("@mui/material");
|
|
28
|
+
var react_1 = require("react");
|
|
29
|
+
var icons_1 = require("@astral/icons");
|
|
30
|
+
var hooks_1 = require("../hooks");
|
|
31
|
+
var Menu_1 = require("../Menu");
|
|
32
|
+
var styles_1 = require("./styles");
|
|
33
|
+
exports.DropdownButton = (0, react_1.forwardRef)(function (_a, ref) {
|
|
34
|
+
var children = _a.children, name = _a.name, props = __rest(_a, ["children", "name"]);
|
|
35
|
+
var _b = (0, hooks_1.useMenu)(), open = _b.open, anchorRef = _b.anchorRef, handleOpenMenu = _b.handleOpenMenu, handleCloseMenu = _b.handleCloseMenu;
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, __assign({ ref: ref, onClickAway: handleCloseMenu }, { children: (0, jsx_runtime_1.jsx)(styles_1.DropdownButtonWrapper, __assign({}, props, { ref: anchorRef, onClick: handleOpenMenu, selected: open, endIcon: (0, jsx_runtime_1.jsx)(icons_1.ChevronDOutlineMd, {}, void 0) }, { children: name }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(Menu_1.Menu, __assign({ open: open, anchorEl: anchorRef.current }, { children: children }), void 0)] }, void 0));
|
|
37
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DropdownButton';
|
|
@@ -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("./DropdownButton"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
export declare const DropdownButtonWrapper: import("@emotion/styled").StyledComponent<Pick<ButtonProps, "disabled" | "component" | "href" | "onFocusVisible" | "tabIndex" | "type" | "action" | "children" | "form" | "slot" | "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" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon" | "loading" | "loadingIndicator" | "loadingPosition"> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
} & Omit<import("@mui/lab").LoadingButtonProps<"button", {}>, "color" | "variant"> & {
|
|
6
|
+
variant?: "link" | "light" | "contained" | "text" | undefined;
|
|
7
|
+
color?: "primary" | "error" | "success" | "warning" | undefined;
|
|
8
|
+
component?: import("react").ElementType<any> | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
selected: boolean;
|
|
11
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DropdownButtonWrapper = void 0;
|
|
8
|
+
var styles_1 = require("../styles");
|
|
9
|
+
var Button_1 = require("../Button");
|
|
10
|
+
exports.DropdownButtonWrapper = (0, styles_1.styled)(Button_1.Button, {
|
|
11
|
+
shouldForwardProp: function (prop) { return prop !== 'selected'; },
|
|
12
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n\n background-color: ", ";\n\n .MuiButton-endIcon {\n transform: rotate(", ");\n\n transition: ", ";\n }\n"], ["\n color: ", ";\n\n background-color: ", ";\n\n .MuiButton-endIcon {\n transform: rotate(", ");\n\n transition: ", ";\n }\n"])), function (_a) {
|
|
13
|
+
var selected = _a.selected, theme = _a.theme;
|
|
14
|
+
return selected ? theme.palette.primary.contrastText : 'default';
|
|
15
|
+
}, function (_a) {
|
|
16
|
+
var selected = _a.selected, theme = _a.theme;
|
|
17
|
+
return selected ? theme.palette.grey['900'] : 'default';
|
|
18
|
+
}, function (_a) {
|
|
19
|
+
var selected = _a.selected;
|
|
20
|
+
return (selected ? '180deg' : '0');
|
|
21
|
+
}, function (_a) {
|
|
22
|
+
var theme = _a.theme;
|
|
23
|
+
return theme.transitions.create('transform', {
|
|
24
|
+
easing: theme.transitions.easing.easeOut,
|
|
25
|
+
duration: theme.transitions.duration.shorter,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var templateObject_1;
|
|
@@ -34,6 +34,17 @@ var GlobalStyles = function (_a) {
|
|
|
34
34
|
html: {
|
|
35
35
|
fontSize: theme.typography.htmlFontSize,
|
|
36
36
|
},
|
|
37
|
+
'*': {
|
|
38
|
+
scrollbarWidth: 'thin',
|
|
39
|
+
},
|
|
40
|
+
'*::-webkit-scrollbar': {
|
|
41
|
+
width: 4,
|
|
42
|
+
height: 4,
|
|
43
|
+
},
|
|
44
|
+
'*::-webkit-scrollbar-thumb': {
|
|
45
|
+
borderRadius: theme.shape.small,
|
|
46
|
+
backgroundColor: theme.palette.grey[300],
|
|
47
|
+
},
|
|
37
48
|
} }, void 0)] }, void 0));
|
|
38
49
|
};
|
|
39
50
|
exports.GlobalStyles = GlobalStyles;
|
|
@@ -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>>;
|
package/IconButton/IconButton.js
CHANGED
|
@@ -24,9 +24,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.IconButton = void 0;
|
|
26
26
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
+
var react_1 = require("react");
|
|
27
28
|
var styled_1 = require("./styled");
|
|
28
|
-
|
|
29
|
+
exports.IconButton = (0, react_1.forwardRef)(function (_a, ref) {
|
|
29
30
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
30
|
-
return (0, jsx_runtime_1.jsx)(styled_1.StyledIconButton, __assign({}, props, { children: children }), void 0);
|
|
31
|
-
};
|
|
32
|
-
exports.IconButton = IconButton;
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(styled_1.StyledIconButton, __assign({}, props, { ref: ref }, { children: children }), void 0));
|
|
32
|
+
});
|
package/IconButton/styled.d.ts
CHANGED
|
@@ -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,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.IconDropdownButton = void 0;
|
|
26
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
+
var material_1 = require("@mui/material");
|
|
28
|
+
var react_1 = require("react");
|
|
29
|
+
var hooks_1 = require("../hooks");
|
|
30
|
+
var Menu_1 = require("../Menu");
|
|
31
|
+
var styles_1 = require("./styles");
|
|
32
|
+
exports.IconDropdownButton = (0, react_1.forwardRef)(function (_a, ref) {
|
|
33
|
+
var children = _a.children, icon = _a.icon, props = __rest(_a, ["children", "icon"]);
|
|
34
|
+
var _b = (0, hooks_1.useMenu)(), open = _b.open, anchorRef = _b.anchorRef, handleOpenMenu = _b.handleOpenMenu, handleCloseMenu = _b.handleCloseMenu;
|
|
35
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, __assign({ ref: ref, onClickAway: handleCloseMenu }, { children: (0, jsx_runtime_1.jsx)(styles_1.IconDropdownButtonWrapper, __assign({}, props, { ref: anchorRef, onClick: handleOpenMenu, selected: open }, { children: icon }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(Menu_1.Menu, __assign({ open: open, anchorEl: anchorRef.current }, { children: children }), void 0)] }, void 0));
|
|
36
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IconDropdownButton';
|
|
@@ -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("./IconDropdownButton"), exports);
|
|
@@ -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,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.IconDropdownButtonWrapper = void 0;
|
|
8
|
+
var styles_1 = require("../styles");
|
|
9
|
+
var IconButton_1 = require("../IconButton");
|
|
10
|
+
exports.IconDropdownButtonWrapper = (0, styles_1.styled)(IconButton_1.IconButton, {
|
|
11
|
+
shouldForwardProp: function (prop) { return prop !== 'selected'; },
|
|
12
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n\n background-color: ", ";\n"], ["\n color: ", ";\n\n background-color: ", ";\n"])), function (_a) {
|
|
13
|
+
var selected = _a.selected, theme = _a.theme;
|
|
14
|
+
return selected ? theme.palette.primary.contrastText : 'default';
|
|
15
|
+
}, function (_a) {
|
|
16
|
+
var selected = _a.selected, theme = _a.theme;
|
|
17
|
+
return selected ? theme.palette.grey['900'] : 'default';
|
|
18
|
+
});
|
|
19
|
+
var templateObject_1;
|
package/MaskField/MaskField.d.ts
CHANGED
|
@@ -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 {};
|
package/MaskField/MaskField.js
CHANGED
|
@@ -32,9 +32,12 @@ var MaskedTextField = (0, react_imask_1.IMaskMixin)(function (_a) {
|
|
|
32
32
|
return (0, jsx_runtime_1.jsx)(TextField_1.TextField, __assign({ inputRef: inputRef }, textFieldProps), void 0);
|
|
33
33
|
});
|
|
34
34
|
var MaskField = function (_a) {
|
|
35
|
-
var onChange = _a.onChange, props = __rest(_a, ["onChange"]);
|
|
35
|
+
var onChange = _a.onChange, onAccept = _a.onAccept, props = __rest(_a, ["onChange", "onAccept"]);
|
|
36
36
|
var maskFieldProps = props;
|
|
37
|
-
var handleMaskFieldAccept = function (value) {
|
|
37
|
+
var handleMaskFieldAccept = function (value, maskRef, e) {
|
|
38
|
+
if (onAccept) {
|
|
39
|
+
return onAccept(value, maskRef, e, onChange);
|
|
40
|
+
}
|
|
38
41
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
39
42
|
};
|
|
40
43
|
return ((0, jsx_runtime_1.jsx)(MaskedTextField, __assign({}, maskFieldProps, { onAccept: handleMaskFieldAccept }), void 0));
|
package/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/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/Menu/Menu.js
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
3
|
exports.Menu = void 0;
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var Menu = function (props) {
|
|
21
|
-
return (0, jsx_runtime_1.jsx)(Menu_1.default, __assign({}, props), void 0);
|
|
22
|
-
};
|
|
23
|
-
exports.Menu = Menu;
|
|
4
|
+
var material_1 = require("@mui/material");
|
|
5
|
+
Object.defineProperty(exports, "Menu", { enumerable: true, get: function () { return material_1.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> & {
|
package/Placeholder/styled.js
CHANGED
|
@@ -15,7 +15,7 @@ exports.StyledContainer = styles_1.styled.div(templateObject_1 || (templateObjec
|
|
|
15
15
|
return theme.palette.background.paper;
|
|
16
16
|
});
|
|
17
17
|
exports.StyledInnerContainer = styles_1.styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n max-width: 384px;\n"], ["\n max-width: 384px;\n"])));
|
|
18
|
-
exports.StyledImage = styles_1.styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: 100%;\n
|
|
18
|
+
exports.StyledImage = styles_1.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) {
|
|
19
19
|
var theme = _a.theme;
|
|
20
20
|
return theme.spacing(8);
|
|
21
21
|
});
|
package/Profile/Profile.js
CHANGED
|
@@ -15,22 +15,11 @@ exports.Profile = void 0;
|
|
|
15
15
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
16
|
var react_1 = require("react");
|
|
17
17
|
var material_1 = require("@mui/material");
|
|
18
|
+
var hooks_1 = require("../hooks");
|
|
18
19
|
var styled_1 = require("./styled");
|
|
19
20
|
exports.Profile = (0, react_1.forwardRef)(function (props, ref) {
|
|
20
21
|
var displayName = props.displayName, annotation = props.annotation, _a = props.avatar, avatar = _a === void 0 ? {} : _a, Menu = props.menu;
|
|
21
|
-
var _b = (0,
|
|
22
|
-
|
|
23
|
-
var handleClick = (0, react_1.useCallback)(function () {
|
|
24
|
-
setOpen(function (prevValue) {
|
|
25
|
-
return !prevValue;
|
|
26
|
-
});
|
|
27
|
-
}, []);
|
|
28
|
-
var handleClickAway = (0, react_1.useCallback)(function () {
|
|
29
|
-
setOpen(false);
|
|
30
|
-
}, []);
|
|
31
|
-
var handleClose = (0, react_1.useCallback)(function () {
|
|
32
|
-
setOpen(false);
|
|
33
|
-
}, []);
|
|
34
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, __assign({ ref: ref, onClickAway: handleClickAway }, { children: (0, jsx_runtime_1.jsxs)(styled_1.ProfileRoot, __assign({ ref: anchorRef, variant: "text", onClick: handleClick }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ProfileUser, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ProfileCredentials, { children: [(0, jsx_runtime_1.jsx)(styled_1.ProfileDisplayName, { children: displayName }, void 0), (0, jsx_runtime_1.jsx)(styled_1.ProfileAnnotation, { children: annotation }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)(material_1.Avatar, __assign({}, avatar), void 0)] }, void 0), (0, jsx_runtime_1.jsx)(styled_1.ProfileChevron, { open: open }, void 0)] }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(Menu, { open: open, anchorEl: anchorRef.current, onClose: handleClose }, void 0)] }, void 0));
|
|
22
|
+
var _b = (0, hooks_1.useMenu)(), open = _b.open, anchorRef = _b.anchorRef, handleOpenMenu = _b.handleOpenMenu, handleCloseMenu = _b.handleCloseMenu;
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, __assign({ ref: ref, onClickAway: handleCloseMenu }, { children: (0, jsx_runtime_1.jsxs)(styled_1.ProfileRoot, __assign({ ref: anchorRef, variant: "text", onClick: handleOpenMenu }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ProfileUser, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ProfileCredentials, { children: [(0, jsx_runtime_1.jsx)(styled_1.ProfileDisplayName, { children: displayName }, void 0), (0, jsx_runtime_1.jsx)(styled_1.ProfileAnnotation, { children: annotation }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)(material_1.Avatar, __assign({}, avatar), void 0)] }, void 0), (0, jsx_runtime_1.jsx)(styled_1.ProfileChevron, { open: open }, void 0)] }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(Menu, { open: open, anchorEl: anchorRef.current, onClose: handleCloseMenu }, void 0)] }, void 0));
|
|
35
24
|
});
|
|
36
25
|
exports.default = exports.Profile;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseButtonProps } from './types';
|
|
3
|
-
export declare const ButtonBase: (
|
|
3
|
+
export declare const ButtonBase: 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,9 +21,10 @@ 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 { ButtonColors, ButtonVariants } from './constants';
|
|
25
26
|
import { StyledButtonBase } from './styled';
|
|
26
|
-
export var ButtonBase = function (_a) {
|
|
27
|
+
export var ButtonBase = forwardRef(function (_a, ref) {
|
|
27
28
|
var children = _a.children, _b = _a.variant, variant = _b === void 0 ? ButtonVariants.CONTAINED : _b, _c = _a.color, color = _c === void 0 ? ButtonColors.PRIMARY : _c, props = __rest(_a, ["children", "variant", "color"]);
|
|
28
|
-
return (_jsx(StyledButtonBase, __assign({}, props, { customColor: color, customVariant: variant }, { children: children }), void 0));
|
|
29
|
-
};
|
|
29
|
+
return (_jsx(StyledButtonBase, __assign({ ref: ref }, props, { customColor: color, customVariant: variant }, { children: children }), void 0));
|
|
30
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PlaceholderProps } from '../Placeholder/types';
|
|
3
|
+
import { ContentStateErrorProps } from './types';
|
|
4
|
+
declare type ContentStateProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Флаг состояния загрузки
|
|
7
|
+
*/
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Элемент для отображения состояния загрузки
|
|
11
|
+
*/
|
|
12
|
+
loadingContent?: JSX.Element | string;
|
|
13
|
+
/**
|
|
14
|
+
* Флаг состояния ошибки
|
|
15
|
+
*/
|
|
16
|
+
isError?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Параметры для отображения состояния ошибки
|
|
19
|
+
*/
|
|
20
|
+
errorState?: ContentStateErrorProps;
|
|
21
|
+
/**
|
|
22
|
+
* Флаг для отображения custom состояния ошибки
|
|
23
|
+
*/
|
|
24
|
+
isCustom?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Параметры для отображения custom состояния ошибки
|
|
27
|
+
*/
|
|
28
|
+
customState?: PlaceholderProps;
|
|
29
|
+
/**
|
|
30
|
+
* Элементы для отображения состояния "Успех"
|
|
31
|
+
*/
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
};
|
|
34
|
+
export declare const ContentState: (props: ContentStateProps) => JSX.Element;
|
|
35
|
+
export default ContentState;
|