@expressms/smartapp-ui 0.0.8 → 1.0.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/build/main/assets/icons/arrow-back.svg +1 -1
- package/build/main/assets/icons/cancel-cross.svg +1 -1
- package/build/main/assets/icons/check-mark.svg +1 -1
- package/build/main/assets/icons/close-stories.svg +4 -0
- package/build/main/assets/icons/close.svg +1 -1
- package/build/main/assets/icons/download.svg +2 -2
- package/build/main/assets/icons/error.svg +3 -3
- package/build/main/assets/icons/file.svg +1 -1
- package/build/main/assets/icons/logout.svg +2 -2
- package/build/main/assets/icons/order.svg +3 -3
- package/build/main/assets/icons/plus.svg +2 -2
- package/build/main/constants/constants.d.ts +13 -0
- package/build/main/constants/constants.js +14 -0
- package/build/main/constants/index.d.ts +1 -0
- package/build/main/constants/index.js +1 -0
- package/build/main/helpers/index.d.ts +1 -0
- package/build/main/helpers/index.js +3 -0
- package/build/main/styles/stories.module.scss +189 -105
- package/build/main/styles/styles.min.css +1 -85
- package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +1 -1
- package/build/main//321/201omponents/ActionModal/ActionModal.js +10 -7
- package/build/main//321/201omponents/ActionModal/types.d.ts +2 -1
- package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +2 -2
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js +13 -8
- package/build/main//321/201omponents/AttachedFile/types.d.ts +4 -1
- package/build/main//321/201omponents/Avatar/Avatar.d.ts +2 -2
- package/build/main//321/201omponents/Avatar/Avatar.js +2 -2
- package/build/main//321/201omponents/Avatar/types.d.ts +2 -2
- package/build/main//321/201omponents/Button/Button.d.ts +1 -1
- package/build/main//321/201omponents/Button/Button.js +5 -4
- package/build/main//321/201omponents/Button/types.d.ts +10 -3
- package/build/main//321/201omponents/Button/types.js +11 -1
- package/build/main//321/201omponents/Calendar/Calendar.d.ts +2 -2
- package/build/main//321/201omponents/Calendar/Calendar.js +5 -7
- package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +1 -1
- package/build/main//321/201omponents/Checkbox/Checkbox.js +7 -4
- package/build/main//321/201omponents/Checkbox/types.d.ts +2 -1
- package/build/main//321/201omponents/Chips/Chips.d.ts +1 -1
- package/build/main//321/201omponents/Chips/Chips.js +8 -6
- package/build/main//321/201omponents/Chips/types.d.ts +1 -0
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +1 -1
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +6 -5
- package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +2 -2
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js +4 -3
- package/build/main//321/201omponents/CustomSelect/types.d.ts +1 -1
- package/build/main//321/201omponents/CustomSelectPriority/CustomSelectPriority.d.ts +2 -2
- package/build/main//321/201omponents/CustomSelectPriority/CustomSelectPriority.js +16 -17
- package/build/main//321/201omponents/CustomSelectPriority/types.d.ts +1 -1
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +2 -2
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +16 -17
- package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +3 -2
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +2 -2
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +8 -7
- package/build/main//321/201omponents/DragAndDrop/types.d.ts +5 -2
- package/build/main//321/201omponents/Error/Error.d.ts +1 -1
- package/build/main//321/201omponents/Error/Error.js +6 -4
- package/build/main//321/201omponents/Error/types.d.ts +3 -0
- package/build/main//321/201omponents/Header/Header.d.ts +1 -1
- package/build/main//321/201omponents/Header/Header.js +8 -6
- package/build/main//321/201omponents/Input/Input.d.ts +2 -2
- package/build/main//321/201omponents/Input/Input.js +3 -3
- package/build/main//321/201omponents/Input/types.d.ts +1 -1
- package/build/main//321/201omponents/Loader/Loader.d.ts +1 -1
- package/build/main//321/201omponents/Loader/Loader.js +2 -2
- package/build/main//321/201omponents/Profile/Profile.d.ts +1 -1
- package/build/main//321/201omponents/Profile/Profile.js +11 -6
- package/build/main//321/201omponents/Profile/types.d.ts +3 -0
- package/build/main//321/201omponents/Stories/Stories.d.ts +4 -0
- package/build/main//321/201omponents/Stories/Stories.js +167 -0
- package/build/main//321/201omponents/Stories/index.d.ts +1 -0
- package/build/main//321/201omponents/Stories/index.js +1 -0
- package/build/main//321/201omponents/Stories/types.d.ts +34 -0
- package/build/main//321/201omponents/Stories/types.js +5 -0
- package/build/main//321/201omponents/Switcher/Switcher.d.ts +1 -1
- package/build/main//321/201omponents/Switcher/Switcher.js +4 -4
- package/build/main//321/201omponents/Switcher/types.d.ts +6 -4
- package/build/main//321/201omponents/Toggle/Toggle.d.ts +1 -1
- package/build/main//321/201omponents/Toggle/Toggle.js +4 -4
- package/build/main//321/201omponents/Toggle/types.d.ts +3 -3
- package/build/main//321/201omponents/index.d.ts +1 -0
- package/build/main//321/201omponents/index.js +1 -0
- package/package.json +15 -4
- package/build/main/assets/icons/calendar.svg +0 -4
- package/build/main/styles/aac6c83b0a358f7f0f6a.svg +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IActionModalProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare
|
|
3
|
+
declare const ActionModal: ({ isModalOpen, title, buttonName, confirmButtonFunction, cancelButtonFunction, placeholder, defaultValue, iconColor, }: IActionModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default ActionModal;
|
|
@@ -11,13 +11,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useEffect, useRef, useState } from 'react';
|
|
14
|
-
import { ReactComponent as CancelCross } from '../../assets/icons/cancel-cross.svg';
|
|
15
14
|
import Popup from 'reactjs-popup';
|
|
16
|
-
import {
|
|
17
|
-
import '
|
|
15
|
+
import { ReactComponent as CancelIcon } from '../../assets/icons/cancel-cross.svg';
|
|
16
|
+
import Button from '../Button';
|
|
18
17
|
import Input from '../Input';
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
import { TButtonColor, TButtonType } from '../Button/types';
|
|
19
|
+
import { getIconColor } from '../../helpers';
|
|
20
|
+
import { DEFAULT_GRAY_ICON_COLOR } from '../../constants';
|
|
21
|
+
import '../../styles/stories.module.scss';
|
|
22
|
+
var ActionModal = function (_a) {
|
|
23
|
+
var isModalOpen = _a.isModalOpen, title = _a.title, buttonName = _a.buttonName, confirmButtonFunction = _a.confirmButtonFunction, cancelButtonFunction = _a.cancelButtonFunction, placeholder = _a.placeholder, _b = _a.defaultValue, defaultValue = _b === void 0 ? '' : _b, iconColor = _a.iconColor;
|
|
21
24
|
var _c = useState(defaultValue), value = _c[0], setValue = _c[1];
|
|
22
25
|
var ref = useRef();
|
|
23
26
|
useEffect(function () {
|
|
@@ -34,6 +37,6 @@ function ActionModal(_a) {
|
|
|
34
37
|
var onChange = function (value) {
|
|
35
38
|
setValue(value);
|
|
36
39
|
};
|
|
37
|
-
return (_jsx(Popup, __assign({ closeOnDocumentClick: true, modal: true, open: isModalOpen }, { children: _jsx("div", __assign({ ref: ref, className: "smartapp-action-modal" }, { children: _jsxs("div", __assign({ className: "smartapp-action-modal__content" }, { children: [_jsx("p", __assign({ className: "smartapp-action-modal__content--title" }, { children: title })), _jsx("div", __assign({ onClick: cancelButtonFunction, className: "smartapp-action-modal__content__cancel-cross" }, { children: _jsx(
|
|
38
|
-
}
|
|
40
|
+
return (_jsx(Popup, __assign({ closeOnDocumentClick: true, modal: true, open: isModalOpen }, { children: _jsx("div", __assign({ ref: ref, className: "smartapp-action-modal" }, { children: _jsxs("div", __assign({ className: "smartapp-action-modal__content" }, { children: [_jsx("p", __assign({ className: "smartapp-action-modal__content--title" }, { children: title })), _jsx("div", __assign({ onClick: cancelButtonFunction, className: "smartapp-action-modal__content__cancel-cross" }, { children: _jsx(CancelIcon, { style: { color: getIconColor(iconColor, DEFAULT_GRAY_ICON_COLOR) } }) })), _jsx("div", __assign({ className: "smartapp-action-modal__content--input" }, { children: _jsx(Input, { defaultValue: value, placeholder: placeholder, onChange: onChange }) })), _jsx("div", __assign({ className: "smartapp-action-modal__content--buttons" }, { children: _jsx(Button, { title: buttonName, typeButton: TButtonType.low, color: TButtonColor.blue, onClickFunction: function () { return confirmButtonFunction(value); } }) }))] })) })) })));
|
|
41
|
+
};
|
|
39
42
|
export default ActionModal;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export interface IActionModalProps {
|
|
2
|
+
isModalOpen: boolean;
|
|
2
3
|
title: string;
|
|
3
4
|
buttonName: string;
|
|
4
5
|
confirmButtonFunction: (str?: string) => void;
|
|
5
|
-
isModalOpen: boolean;
|
|
6
6
|
cancelButtonFunction: () => void;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
defaultValue?: string;
|
|
9
|
+
iconColor?: string;
|
|
9
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAttachedFileProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare
|
|
3
|
+
declare const AttachedFile: ({ fileName, weight, weightType, isSpaceBetween, onClickDownloadFile, onClickRemoveFile, isRemoveFile, isDownloadFile, width, fileColor, downloadColor, removeColor, }: IAttachedFileProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default AttachedFile;
|
|
@@ -10,13 +10,18 @@ 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 { ReactComponent as File } from '../../assets/icons/file.svg';
|
|
14
|
-
import { ReactComponent as Close } from '../../assets/icons/close.svg';
|
|
15
|
-
import { ReactComponent as Download } from '../../assets/icons/download.svg';
|
|
16
|
-
import '../../styles/stories.module.scss';
|
|
17
13
|
import classNames from 'classnames';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
14
|
+
import { ReactComponent as FileIcon } from '../../assets/icons/file.svg';
|
|
15
|
+
import { ReactComponent as RemoveIcon } from '../../assets/icons/close.svg';
|
|
16
|
+
import { ReactComponent as DownloadIcon } from '../../assets/icons/download.svg';
|
|
17
|
+
import { getIconColor } from '../../helpers';
|
|
18
|
+
import { DEFAULT_BLUE_ICON_COLOR, DEFAULT_GRAY_ICON_COLOR } from '../../constants';
|
|
19
|
+
import '../../styles/stories.module.scss';
|
|
20
|
+
var AttachedFile = function (_a) {
|
|
21
|
+
var fileName = _a.fileName, weight = _a.weight, weightType = _a.weightType, _b = _a.isSpaceBetween, isSpaceBetween = _b === void 0 ? false : _b, _c = _a.onClickDownloadFile, onClickDownloadFile = _c === void 0 ? undefined : _c, _d = _a.onClickRemoveFile, onClickRemoveFile = _d === void 0 ? undefined : _d, _e = _a.isRemoveFile, isRemoveFile = _e === void 0 ? false : _e, _f = _a.isDownloadFile, isDownloadFile = _f === void 0 ? false : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, fileColor = _a.fileColor, downloadColor = _a.downloadColor, removeColor = _a.removeColor;
|
|
22
|
+
return (_jsxs("div", __assign({ style: { width: "".concat(width, "%") }, className: "smartapp-attached-file" }, { children: [_jsx("div", __assign({ className: "smartapp-attached-file--icon" }, { children: _jsx(FileIcon, { style: { color: getIconColor(fileColor, DEFAULT_GRAY_ICON_COLOR) } }) })), _jsxs("div", __assign({ className: classNames({
|
|
23
|
+
'smartapp-attached-file__value': true,
|
|
24
|
+
'justify-space-between': isSpaceBetween,
|
|
25
|
+
}) }, { children: [_jsxs("div", __assign({ className: "smartapp-attached-file__value--info" }, { children: [_jsx("p", __assign({ className: "smartapp-attached-file__value--info__name" }, { children: fileName })), _jsx("p", __assign({ className: "smartapp-attached-file__value--info__weight" }, { children: "".concat(weight, " ").concat(weightType) }))] })), _jsxs("div", __assign({ className: "smartapp-attached-file__value--icons" }, { children: [onClickRemoveFile && isRemoveFile && (_jsx("div", __assign({ onClick: function () { return onClickRemoveFile(fileName); }, className: "smartapp-attached-file__value--icons__close" }, { children: _jsx(RemoveIcon, { style: { color: getIconColor(removeColor, DEFAULT_BLUE_ICON_COLOR) } }) }))), onClickDownloadFile && isDownloadFile && (_jsx("div", __assign({ onClick: function () { return onClickDownloadFile(fileName); }, className: "smartapp-attached-file__value--icons__download" }, { children: _jsx(DownloadIcon, { style: { color: getIconColor(downloadColor, DEFAULT_BLUE_ICON_COLOR) } }) })))] }))] }))] }), weight));
|
|
26
|
+
};
|
|
22
27
|
export default AttachedFile;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IntRange } from '../types';
|
|
2
|
-
export interface
|
|
2
|
+
export interface IAttachedFileProps {
|
|
3
3
|
fileName: string;
|
|
4
4
|
weight: number;
|
|
5
5
|
weightType: string;
|
|
@@ -9,4 +9,7 @@ export interface IAttachedFile {
|
|
|
9
9
|
isRemoveFile?: boolean;
|
|
10
10
|
isDownloadFile?: boolean;
|
|
11
11
|
width?: IntRange<1, 101>;
|
|
12
|
+
fileColor?: string;
|
|
13
|
+
downloadColor?: string;
|
|
14
|
+
removeColor?: string;
|
|
12
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAvatarProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare
|
|
3
|
+
declare const Avatar: ({ username, onClick, widthHeight }: IAvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default Avatar;
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { AvatarFontSizes } from './types';
|
|
14
14
|
import '../../styles/stories.module.scss';
|
|
15
|
-
function
|
|
15
|
+
var Avatar = function (_a) {
|
|
16
16
|
var _b, _c, _d;
|
|
17
17
|
var username = _a.username, _e = _a.onClick, onClick = _e === void 0 ? function () { return undefined; } : _e, _f = _a.widthHeight, widthHeight = _f === void 0 ? 44 : _f;
|
|
18
18
|
var initials = (username === null || username === void 0 ? void 0 : username.split(' ').length) <= 2
|
|
@@ -35,5 +35,5 @@ function Avatar(_a) {
|
|
|
35
35
|
return AvatarFontSizes.high;
|
|
36
36
|
};
|
|
37
37
|
return (_jsx("div", __assign({ style: { width: "".concat(widthHeight, "px"), height: "".concat(widthHeight, "px"), fontSize: getFontSizeAvatar() }, onClick: onClick, className: "smartapp-avatar" }, { children: initials })));
|
|
38
|
-
}
|
|
38
|
+
};
|
|
39
39
|
export default Avatar;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IButtonProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare const Button: (
|
|
3
|
+
declare const Button: ({ title, isDisabled, typeButton, color, width, onClickFunction }: IButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default Button;
|
|
@@ -10,10 +10,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { TButtonType, TButtonColor } from './types';
|
|
14
15
|
import '../../styles/stories.module.scss';
|
|
15
|
-
var Button = function (
|
|
16
|
-
var title =
|
|
17
|
-
return (_jsx("button", __assign({
|
|
16
|
+
var Button = function (_a) {
|
|
17
|
+
var title = _a.title, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = _a.typeButton, typeButton = _c === void 0 ? TButtonType.standard : _c, _d = _a.color, color = _d === void 0 ? TButtonColor.white : _d, _e = _a.width, width = _e === void 0 ? 100 : _e, _f = _a.onClickFunction, onClickFunction = _f === void 0 ? function () { return undefined; } : _f;
|
|
18
|
+
return (_jsx("button", __assign({ className: classNames(typeButton ? 'smartapp-button__' + typeButton : null, color ? 'smartapp-button__color--' + color : null, isDisabled && 'smartapp-button__disabled'), style: { width: "".concat(width, "%") }, onClick: onClickFunction }, { children: title })));
|
|
18
19
|
};
|
|
19
20
|
export default Button;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { IntRange } from '../types';
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export declare enum TButtonType {
|
|
3
|
+
standard = "standard",
|
|
4
|
+
low = "low"
|
|
5
|
+
}
|
|
6
|
+
export declare enum TButtonColor {
|
|
7
|
+
white = "white",
|
|
8
|
+
blue = "blue",
|
|
9
|
+
red = "red"
|
|
10
|
+
}
|
|
4
11
|
export interface IButtonProps {
|
|
5
12
|
title: string;
|
|
6
13
|
isDisabled?: boolean;
|
|
7
|
-
typeButton
|
|
14
|
+
typeButton?: TButtonType;
|
|
8
15
|
color?: TButtonColor;
|
|
9
16
|
onClickFunction?: () => void;
|
|
10
17
|
width?: IntRange<1, 101>;
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var TButtonType;
|
|
2
|
+
(function (TButtonType) {
|
|
3
|
+
TButtonType["standard"] = "standard";
|
|
4
|
+
TButtonType["low"] = "low";
|
|
5
|
+
})(TButtonType || (TButtonType = {}));
|
|
6
|
+
export var TButtonColor;
|
|
7
|
+
(function (TButtonColor) {
|
|
8
|
+
TButtonColor["white"] = "white";
|
|
9
|
+
TButtonColor["blue"] = "blue";
|
|
10
|
+
TButtonColor["red"] = "red";
|
|
11
|
+
})(TButtonColor || (TButtonColor = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../styles/stories.module.scss';
|
|
2
1
|
import { ICalendarProps } from './types';
|
|
3
|
-
|
|
2
|
+
import '../../styles/stories.module.scss';
|
|
3
|
+
declare const CalendarDatepicker: ({ placeholder, initialCurrentDate, initialCurrentDateRange, minDate, onChangeCurrentDate, onChangeCurrentDateRange, calendarComponentClassName, calendarInputClassName, isRange, width, }: ICalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default CalendarDatepicker;
|
|
@@ -11,15 +11,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { useState } from 'react';
|
|
14
|
+
import classNames from 'classnames';
|
|
14
15
|
import DatePicker, { registerLocale } from 'react-datepicker';
|
|
15
16
|
import ru from 'date-fns/locale/ru';
|
|
16
17
|
import en from 'date-fns/locale/en-US';
|
|
17
18
|
import '../../styles/stories.module.scss';
|
|
18
|
-
import classNames from 'classnames';
|
|
19
19
|
registerLocale('ru', ru);
|
|
20
20
|
registerLocale('en', en);
|
|
21
|
-
function
|
|
22
|
-
var _b = _a.placeholder, placeholder = _b === void 0 ? 'Введите дату' : _b, initialCurrentDate = _a.initialCurrentDate, initialCurrentDateRange = _a.initialCurrentDateRange, _c = _a.minDate, minDate = _c === void 0 ? null : _c, _d = _a.onChangeCurrentDate, onChangeCurrentDate = _d === void 0 ? function (
|
|
21
|
+
var CalendarDatepicker = function (_a) {
|
|
22
|
+
var _b = _a.placeholder, placeholder = _b === void 0 ? 'Введите дату' : _b, initialCurrentDate = _a.initialCurrentDate, initialCurrentDateRange = _a.initialCurrentDateRange, _c = _a.minDate, minDate = _c === void 0 ? null : _c, _d = _a.onChangeCurrentDate, onChangeCurrentDate = _d === void 0 ? function () { return undefined; } : _d, _e = _a.onChangeCurrentDateRange, onChangeCurrentDateRange = _e === void 0 ? function () { return undefined; } : _e, calendarComponentClassName = _a.calendarComponentClassName, calendarInputClassName = _a.calendarInputClassName, _f = _a.isRange, isRange = _f === void 0 ? false : _f, width = _a.width;
|
|
23
23
|
var _g = useState(initialCurrentDate ? initialCurrentDate : null), currentDate = _g[0], setCurrentDate = _g[1];
|
|
24
24
|
var _h = useState(initialCurrentDateRange ? initialCurrentDateRange : [null, null]), currentDateRange = _h[0], setCurrentDateRange = _h[1];
|
|
25
25
|
var startDate = currentDateRange[0], endDate = currentDateRange[1];
|
|
@@ -42,8 +42,6 @@ function CalendarDatepicker(_a) {
|
|
|
42
42
|
}), onChange: function (period) { return onChangeDateRange(period); } })) : (_jsx(DatePicker, { selected: currentDate, dateFormat: "dd.MM.yyyy", locale: ru, placeholderText: placeholder, minDate: minDate, className: classNames({
|
|
43
43
|
'smartapp-calendar-input': !calendarComponentClassName,
|
|
44
44
|
calendarComponentClassName: calendarComponentClassName,
|
|
45
|
-
}), onChange: function (date) {
|
|
46
|
-
|
|
47
|
-
} })) })));
|
|
48
|
-
}
|
|
45
|
+
}), onChange: function (date) { return onChangeDate(date); } })) })));
|
|
46
|
+
};
|
|
49
47
|
export default CalendarDatepicker;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ICheckBoxProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare
|
|
3
|
+
declare const CheckBox: ({ id, disabled, checked, iconColor, onChange }: ICheckBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default CheckBox;
|
|
@@ -10,9 +10,12 @@ 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 { ReactComponent as CheckIcon } from '../../assets/icons/check-mark.svg';
|
|
14
|
+
import { getIconColor } from '../../helpers';
|
|
15
|
+
import { DEFAULT_BLUE_ICON_COLOR } from '../../constants';
|
|
13
16
|
import '../../styles/stories.module.scss';
|
|
14
|
-
function
|
|
15
|
-
var id = _a.id, _b = _a.
|
|
16
|
-
return (_jsx("div", __assign({ className: "smartapp-check-box" }, { children:
|
|
17
|
-
}
|
|
17
|
+
var CheckBox = function (_a) {
|
|
18
|
+
var id = _a.id, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.checked, checked = _c === void 0 ? false : _c, iconColor = _a.iconColor, _d = _a.onChange, onChange = _d === void 0 ? function () { return undefined; } : _d;
|
|
19
|
+
return (_jsx("div", __assign({ className: "smartapp-check-box" }, { children: _jsxs("label", __assign({ htmlFor: "cb-".concat(id) }, { children: [_jsx("input", { id: "cb-".concat(id), type: "checkbox", className: "smartapp-check-box__custom-check-box", disabled: disabled, checked: checked, onChange: onChange }), checked ? _jsx(CheckIcon, { style: { color: getIconColor(iconColor, DEFAULT_BLUE_ICON_COLOR) } }) : _jsx("span", { className: "checkmark" })] })) })));
|
|
20
|
+
};
|
|
18
21
|
export default CheckBox;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IChipsProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare
|
|
3
|
+
declare const Chips: ({ name, iconColor, onCancelFunction }: IChipsProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default Chips;
|
|
@@ -10,11 +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 { ReactComponent as
|
|
14
|
-
import '../../styles/stories.module.scss';
|
|
13
|
+
import { ReactComponent as CancelIcon } from '../../assets/icons/cancel-cross.svg';
|
|
15
14
|
import Avatar from '../Avatar';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
import { getIconColor } from '../../helpers';
|
|
16
|
+
import { DEFAULT_GRAY_ICON_COLOR } from '../../constants';
|
|
17
|
+
import '../../styles/stories.module.scss';
|
|
18
|
+
var Chips = function (_a) {
|
|
19
|
+
var name = _a.name, iconColor = _a.iconColor, _b = _a.onCancelFunction, onCancelFunction = _b === void 0 ? function () { return undefined; } : _b;
|
|
20
|
+
return (_jsxs("div", __assign({ className: "smartapp-chips" }, { children: [_jsxs("div", __assign({ className: "smartapp-chips__info" }, { children: [_jsx(Avatar, { username: name, widthHeight: 24 }), _jsx("p", __assign({ className: "smartapp-chips__info--name" }, { children: name }))] })), _jsx("div", __assign({ onClick: function () { return onCancelFunction(name); }, className: "smartapp-chips__cancel-icon" }, { children: _jsx(CancelIcon, { style: { color: getIconColor(iconColor, DEFAULT_GRAY_ICON_COLOR) } }) }))] })));
|
|
21
|
+
};
|
|
20
22
|
export default Chips;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IConfirmationModalProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare
|
|
3
|
+
declare const ConfirmationModal: ({ title, text, cancelButtonName, confirmButtonName, cancelButtonFunction, confirmButtonFunction, isModalOpen, }: IConfirmationModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default ConfirmationModal;
|
|
@@ -12,10 +12,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useEffect, useRef } from 'react';
|
|
14
14
|
import Popup from 'reactjs-popup';
|
|
15
|
-
import
|
|
15
|
+
import Button from '../Button';
|
|
16
|
+
import { TButtonColor, TButtonType } from '../Button/types';
|
|
16
17
|
import '../../styles/stories.module.scss';
|
|
17
|
-
function
|
|
18
|
-
var title = _a.title, text = _a.text, cancelButtonName = _a.cancelButtonName, confirmButtonName = _a.confirmButtonName,
|
|
18
|
+
var ConfirmationModal = function (_a) {
|
|
19
|
+
var title = _a.title, text = _a.text, cancelButtonName = _a.cancelButtonName, confirmButtonName = _a.confirmButtonName, cancelButtonFunction = _a.cancelButtonFunction, confirmButtonFunction = _a.confirmButtonFunction, isModalOpen = _a.isModalOpen;
|
|
19
20
|
var ref = useRef();
|
|
20
21
|
useEffect(function () {
|
|
21
22
|
var checkIfClickedOutside = function (e) {
|
|
@@ -28,6 +29,6 @@ function ConfirmationModal(_a) {
|
|
|
28
29
|
document === null || document === void 0 ? void 0 : document.removeEventListener('click', checkIfClickedOutside, true);
|
|
29
30
|
};
|
|
30
31
|
}, [isModalOpen, cancelButtonFunction]);
|
|
31
|
-
return (_jsx(Popup, __assign({ closeOnDocumentClick: true, modal: true, open: isModalOpen }, { children: _jsx("div", __assign({ ref: ref, className: "smartapp-confirmation-modal" }, { children: _jsxs("div", __assign({ className: "smartapp-confirmation-modal__content" }, { children: [_jsx("p", __assign({ className: "smartapp-confirmation-modal__content--title" }, { children: title })), _jsx("p", __assign({ className: "smartapp-confirmation-modal__content--text" }, { children: text })), _jsxs("div", __assign({ className: "smartapp-confirmation-modal__content--buttons" }, { children: [_jsx(Button, { width: 50, title: cancelButtonName, typeButton:
|
|
32
|
-
}
|
|
32
|
+
return (_jsx(Popup, __assign({ closeOnDocumentClick: true, modal: true, open: isModalOpen }, { children: _jsx("div", __assign({ ref: ref, className: "smartapp-confirmation-modal" }, { children: _jsxs("div", __assign({ className: "smartapp-confirmation-modal__content" }, { children: [_jsx("p", __assign({ className: "smartapp-confirmation-modal__content--title" }, { children: title })), _jsx("p", __assign({ className: "smartapp-confirmation-modal__content--text" }, { children: text })), _jsxs("div", __assign({ className: "smartapp-confirmation-modal__content--buttons" }, { children: [_jsx(Button, { width: 50, title: cancelButtonName, typeButton: TButtonType.low, onClickFunction: cancelButtonFunction, color: TButtonColor.white }), _jsx(Button, { width: 50, title: confirmButtonName, typeButton: TButtonType.low, onClickFunction: confirmButtonFunction, color: TButtonColor.red })] }))] })) })) })));
|
|
33
|
+
};
|
|
33
34
|
export default ConfirmationModal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ICustomSelectProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare
|
|
3
|
+
declare const CustomSelect: ({ options, defaultValue, placeholder, onChange, width }: ICustomSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default CustomSelect;
|
|
@@ -12,7 +12,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import Select from 'react-select';
|
|
14
14
|
import '../../styles/stories.module.scss';
|
|
15
|
-
function
|
|
15
|
+
var IndicatorSeparator = function () { return null; };
|
|
16
|
+
var CustomSelect = function (_a) {
|
|
16
17
|
var options = _a.options, defaultValue = _a.defaultValue, placeholder = _a.placeholder, onChange = _a.onChange, _b = _a.width, width = _b === void 0 ? 100 : _b;
|
|
17
18
|
var customStyles = {
|
|
18
19
|
option: function (provided, state) { return (__assign(__assign({}, provided), { cursor: 'pointer', background: '#ffffff', color: (state === null || state === void 0 ? void 0 : state.isSelected) ? '#4799E3' : '#000000', width: "".concat(width, "%"), textOverflow: 'ellipsis', '&:focus': {
|
|
@@ -31,6 +32,6 @@ function CustomSelect(_a) {
|
|
|
31
32
|
/* @ts-ignore */
|
|
32
33
|
, {
|
|
33
34
|
/* @ts-ignore */
|
|
34
|
-
onChange: function (option) { return onChange(option); }, options: options, defaultValue: defaultValue, styles: customStyles, placeholder: _jsx("div", __assign({ className: "smartapp-custom-select__placeholder" }, { children: placeholder })), components: { IndicatorSeparator:
|
|
35
|
-
}
|
|
35
|
+
onChange: function (option) { return onChange(option); }, options: options, defaultValue: defaultValue, styles: customStyles, placeholder: _jsx("div", __assign({ className: "smartapp-custom-select__placeholder" }, { children: placeholder })), components: { IndicatorSeparator: IndicatorSeparator } }) })));
|
|
36
|
+
};
|
|
36
37
|
export default CustomSelect;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ICustomSelectPriorityProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare
|
|
3
|
+
declare const CustomSelectPriority: ({ options, defaultValue, placeholder, onChange, width }: ICustomSelectPriorityProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default CustomSelectPriority;
|
|
@@ -22,9 +22,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import Select, { components } from 'react-select';
|
|
25
|
-
import { ReactComponent as
|
|
25
|
+
import { ReactComponent as EllipseIcon } from '../../assets/icons/ellipse.svg';
|
|
26
26
|
import '../../styles/stories.module.scss';
|
|
27
|
-
function
|
|
27
|
+
var Control = function (_a) {
|
|
28
|
+
var _b, _c, _d, _e;
|
|
29
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
|
30
|
+
return (_jsxs(components.Control, __assign({}, props, { children: [((_c = (_b = props === null || props === void 0 ? void 0 : props.selectProps) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.color) && (_jsx(_Fragment, { children: _jsx("span", __assign({ style: { marginLeft: '8px' } }, { children: _jsx(EllipseIcon, { style: { color: (_e = (_d = props === null || props === void 0 ? void 0 : props.selectProps) === null || _d === void 0 ? void 0 : _d.value) === null || _e === void 0 ? void 0 : _e.color } }) })) })), children] })));
|
|
31
|
+
};
|
|
32
|
+
var Option = function (_a) {
|
|
33
|
+
var _b, _c;
|
|
34
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
|
35
|
+
return (_jsxs(components.Option, __assign({}, props, { children: [((_b = props === null || props === void 0 ? void 0 : props.data) === null || _b === void 0 ? void 0 : _b.color) && (_jsx("span", __assign({ style: { marginRight: '8px' } }, { children: _jsx(EllipseIcon, { style: { color: (_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.color, paddingBottom: '1px' } }) }))), children] })));
|
|
36
|
+
};
|
|
37
|
+
var DropdownIndicator = function (props) { return (_jsx(components.DropdownIndicator, __assign({}, props))); };
|
|
38
|
+
var IndicatorSeparator = function () { return null; };
|
|
39
|
+
var CustomSelectPriority = function (_a) {
|
|
28
40
|
var options = _a.options, defaultValue = _a.defaultValue, placeholder = _a.placeholder, onChange = _a.onChange, _b = _a.width, width = _b === void 0 ? 100 : _b;
|
|
29
41
|
var customStyles = {
|
|
30
42
|
option: function (provided, state) {
|
|
@@ -38,23 +50,10 @@ function CustomSelectPriority(_a) {
|
|
|
38
50
|
},
|
|
39
51
|
control: function (provided) { return (__assign(__assign({}, provided), { width: "".concat(width, "%"), textOverflow: 'ellipsis' })); },
|
|
40
52
|
};
|
|
41
|
-
var DropdownIndicator = function (props) {
|
|
42
|
-
return _jsx(components.DropdownIndicator, __assign({}, props));
|
|
43
|
-
};
|
|
44
|
-
var Control = function (_a) {
|
|
45
|
-
var _b, _c, _d, _e;
|
|
46
|
-
var children = _a.children, props = __rest(_a, ["children"]);
|
|
47
|
-
return (_jsxs(components.Control, __assign({}, props, { children: [((_c = (_b = props === null || props === void 0 ? void 0 : props.selectProps) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.color) && (_jsx(_Fragment, { children: _jsx("span", __assign({ style: { marginLeft: '8px' } }, { children: _jsx(Ellipse, { color: (_e = (_d = props === null || props === void 0 ? void 0 : props.selectProps) === null || _d === void 0 ? void 0 : _d.value) === null || _e === void 0 ? void 0 : _e.color }) })) })), children] })));
|
|
48
|
-
};
|
|
49
|
-
var Option = function (_a) {
|
|
50
|
-
var _b, _c;
|
|
51
|
-
var children = _a.children, props = __rest(_a, ["children"]);
|
|
52
|
-
return (_jsxs(components.Option, __assign({}, props, { children: [((_b = props === null || props === void 0 ? void 0 : props.data) === null || _b === void 0 ? void 0 : _b.color) && (_jsx("span", __assign({ style: { marginRight: '8px' } }, { children: _jsx(Ellipse, { style: { paddingBottom: '1px' }, color: (_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.color }) }))), children] })));
|
|
53
|
-
};
|
|
54
53
|
return (_jsx("div", __assign({ className: "smartapp-custom-select" }, { children: _jsx(Select
|
|
55
54
|
/* @ts-ignore */
|
|
56
55
|
, {
|
|
57
56
|
/* @ts-ignore */
|
|
58
|
-
onChange: function (option) { return onChange(option); }, options: options, defaultValue: defaultValue, styles: customStyles, placeholder: _jsx("div", __assign({ className: "smartapp-custom-select__placeholder" }, { children: placeholder })), components: { Option: Option, Control: Control, DropdownIndicator: DropdownIndicator, IndicatorSeparator:
|
|
59
|
-
}
|
|
57
|
+
onChange: function (option) { return onChange(option); }, options: options, defaultValue: defaultValue, styles: customStyles, placeholder: _jsx("div", __assign({ className: "smartapp-custom-select__placeholder" }, { children: placeholder })), components: { Option: Option, Control: Control, DropdownIndicator: DropdownIndicator, IndicatorSeparator: IndicatorSeparator } }) })));
|
|
58
|
+
};
|
|
60
59
|
export default CustomSelectPriority;
|
|
@@ -4,7 +4,7 @@ export type TCustomSelectOptionPriority = {
|
|
|
4
4
|
value: string;
|
|
5
5
|
color: string;
|
|
6
6
|
};
|
|
7
|
-
export interface
|
|
7
|
+
export interface ICustomSelectPriorityProps {
|
|
8
8
|
options: TCustomSelectOptionPriority[];
|
|
9
9
|
onChange: (option: TCustomSelectOptionPriority) => void;
|
|
10
10
|
placeholder: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ICustomSelectProfilesProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare
|
|
3
|
+
declare const CustomSelectPriority: ({ options, defaultValue, placeholder, onChange, width }: ICustomSelectProfilesProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default CustomSelectPriority;
|
|
@@ -22,9 +22,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import Select, { components } from 'react-select';
|
|
25
|
-
import '../../styles/stories.module.scss';
|
|
26
25
|
import Avatar from '../Avatar';
|
|
27
|
-
|
|
26
|
+
import '../../styles/stories.module.scss';
|
|
27
|
+
var Control = function (_a) {
|
|
28
|
+
var _b, _c, _d;
|
|
29
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
|
30
|
+
return (_jsxs(components.Control, __assign({}, props, { children: [((_b = props.selectProps) === null || _b === void 0 ? void 0 : _b.value) && (_jsx("div", __assign({ className: "smartapp-custom-select__control" }, { children: _jsx("span", { children: _jsx(Avatar, { widthHeight: 32, username: (_d = (_c = props === null || props === void 0 ? void 0 : props.selectProps) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.username }) }) }))), children] })));
|
|
31
|
+
};
|
|
32
|
+
var Option = function (_a) {
|
|
33
|
+
var _b, _c, _d;
|
|
34
|
+
var props = __rest(_a, []);
|
|
35
|
+
return (_jsx(components.Option, __assign({}, props, { children: _jsxs("div", __assign({ className: "smartapp-custom-select__option" }, { children: [_jsx("div", __assign({ className: "smartapp-custom-select__option--avatar" }, { children: _jsx(Avatar, { widthHeight: 32, username: (_b = props === null || props === void 0 ? void 0 : props.data) === null || _b === void 0 ? void 0 : _b.username }) })), _jsxs("div", __assign({ className: "smartapp-custom-select__option--info" }, { children: [_jsxs("p", __assign({ className: "smartapp-custom-select__option--info__title" }, { children: [(_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.username, " "] })), _jsxs("p", __assign({ className: "smartapp-custom-select__option--info__email" }, { children: [(_d = props === null || props === void 0 ? void 0 : props.data) === null || _d === void 0 ? void 0 : _d.email, " "] }))] }))] })) })));
|
|
36
|
+
};
|
|
37
|
+
var DropdownIndicator = function (props) { return (_jsx(components.DropdownIndicator, __assign({}, props))); };
|
|
38
|
+
var IndicatorSeparator = function () { return null; };
|
|
39
|
+
var CustomSelectPriority = function (_a) {
|
|
28
40
|
var options = _a.options, defaultValue = _a.defaultValue, placeholder = _a.placeholder, onChange = _a.onChange, _b = _a.width, width = _b === void 0 ? 100 : _b;
|
|
29
41
|
var customStyles = {
|
|
30
42
|
option: function (provided, state) { return (__assign(__assign({}, provided), { cursor: 'pointer', color: '#000000', background: state.isSelected ? 'rgba(71, 153, 227, 0.1)' : '#ffffff', display: 'flex', textOverflow: 'ellipsis', width: "".concat(width, "%"), padding: '10px 0', '&:focus': {
|
|
@@ -35,23 +47,10 @@ function CustomSelectPriority(_a) {
|
|
|
35
47
|
} })); },
|
|
36
48
|
control: function (provided) { return (__assign(__assign({}, provided), { width: "".concat(width, "%"), textOverflow: 'ellipsis', padding: '5px 0 5px 5px' })); },
|
|
37
49
|
};
|
|
38
|
-
var DropdownIndicator = function (props) {
|
|
39
|
-
return _jsx(components.DropdownIndicator, __assign({}, props));
|
|
40
|
-
};
|
|
41
|
-
var Control = function (_a) {
|
|
42
|
-
var _b, _c, _d;
|
|
43
|
-
var children = _a.children, props = __rest(_a, ["children"]);
|
|
44
|
-
return (_jsxs(components.Control, __assign({}, props, { children: [((_b = props.selectProps) === null || _b === void 0 ? void 0 : _b.value) && (_jsx("div", __assign({ className: "smartapp-custom-select__control" }, { children: _jsx("span", { children: _jsx(Avatar, { widthHeight: 32, username: (_d = (_c = props === null || props === void 0 ? void 0 : props.selectProps) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.username }) }) }))), children] })));
|
|
45
|
-
};
|
|
46
|
-
var Option = function (_a) {
|
|
47
|
-
var _b, _c, _d;
|
|
48
|
-
var props = __rest(_a, []);
|
|
49
|
-
return (_jsx(components.Option, __assign({}, props, { children: _jsxs("div", __assign({ className: "smartapp-custom-select__option" }, { children: [_jsx("div", __assign({ className: "smartapp-custom-select__option--avatar" }, { children: _jsx(Avatar, { widthHeight: 32, username: (_b = props === null || props === void 0 ? void 0 : props.data) === null || _b === void 0 ? void 0 : _b.username }) })), _jsxs("div", __assign({ className: "smartapp-custom-select__option--info" }, { children: [_jsxs("p", __assign({ className: "smartapp-custom-select__option--info__title" }, { children: [(_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.username, " "] })), _jsxs("p", __assign({ className: "smartapp-custom-select__option--info__email" }, { children: [(_d = props === null || props === void 0 ? void 0 : props.data) === null || _d === void 0 ? void 0 : _d.email, " "] }))] }))] })) })));
|
|
50
|
-
};
|
|
51
50
|
return (_jsx("div", __assign({ className: "smartapp-custom-select" }, { children: _jsx(Select
|
|
52
51
|
/* @ts-ignore */
|
|
53
52
|
, {
|
|
54
53
|
/* @ts-ignore */
|
|
55
|
-
onChange: function (option) { return onChange(option); }, options: options, defaultValue: defaultValue, styles: customStyles, getOptionLabel: function (option) { return option.username; }, getOptionValue: function (option) { return option.email; }, placeholder: _jsx("div", __assign({ className: "smartapp-custom-select__placeholder" }, { children: placeholder })), components: { Option: Option, Control: Control, DropdownIndicator: DropdownIndicator, IndicatorSeparator:
|
|
56
|
-
}
|
|
54
|
+
onChange: function (option) { return onChange(option); }, options: options, defaultValue: defaultValue, styles: customStyles, getOptionLabel: function (option) { return option.username; }, getOptionValue: function (option) { return option.email; }, placeholder: _jsx("div", __assign({ className: "smartapp-custom-select__placeholder" }, { children: placeholder })), components: { Option: Option, Control: Control, DropdownIndicator: DropdownIndicator, IndicatorSeparator: IndicatorSeparator } }) })));
|
|
55
|
+
};
|
|
57
56
|
export default CustomSelectPriority;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { IntRange } from '../types';
|
|
2
|
-
|
|
2
|
+
type TCustomSelectOptionProfiles = {
|
|
3
3
|
username: string;
|
|
4
4
|
email: string;
|
|
5
5
|
};
|
|
6
|
-
export interface
|
|
6
|
+
export interface ICustomSelectProfilesProps {
|
|
7
7
|
options: TCustomSelectOptionProfiles[];
|
|
8
8
|
onChange: (option: TCustomSelectOptionProfiles) => void;
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
defaultValue?: TCustomSelectOptionProfiles;
|
|
11
11
|
width?: IntRange<1, 101>;
|
|
12
12
|
}
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IDragAndDropProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare
|
|
3
|
+
declare const DragAndDrop: ({ placeholder, options, onDragEndFunction, onChangeIsCompletedOption, onChangeOption, onClickDeleteOption, width, checkboxColor, orderColor, deleteColor, }: IDragAndDropProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default DragAndDrop;
|