@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.
Files changed (84) hide show
  1. package/build/main/assets/icons/arrow-back.svg +1 -1
  2. package/build/main/assets/icons/cancel-cross.svg +1 -1
  3. package/build/main/assets/icons/check-mark.svg +1 -1
  4. package/build/main/assets/icons/close-stories.svg +4 -0
  5. package/build/main/assets/icons/close.svg +1 -1
  6. package/build/main/assets/icons/download.svg +2 -2
  7. package/build/main/assets/icons/error.svg +3 -3
  8. package/build/main/assets/icons/file.svg +1 -1
  9. package/build/main/assets/icons/logout.svg +2 -2
  10. package/build/main/assets/icons/order.svg +3 -3
  11. package/build/main/assets/icons/plus.svg +2 -2
  12. package/build/main/constants/constants.d.ts +13 -0
  13. package/build/main/constants/constants.js +14 -0
  14. package/build/main/constants/index.d.ts +1 -0
  15. package/build/main/constants/index.js +1 -0
  16. package/build/main/helpers/index.d.ts +1 -0
  17. package/build/main/helpers/index.js +3 -0
  18. package/build/main/styles/stories.module.scss +189 -105
  19. package/build/main/styles/styles.min.css +1 -85
  20. package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +1 -1
  21. package/build/main//321/201omponents/ActionModal/ActionModal.js +10 -7
  22. package/build/main//321/201omponents/ActionModal/types.d.ts +2 -1
  23. package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +2 -2
  24. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +13 -8
  25. package/build/main//321/201omponents/AttachedFile/types.d.ts +4 -1
  26. package/build/main//321/201omponents/Avatar/Avatar.d.ts +2 -2
  27. package/build/main//321/201omponents/Avatar/Avatar.js +2 -2
  28. package/build/main//321/201omponents/Avatar/types.d.ts +2 -2
  29. package/build/main//321/201omponents/Button/Button.d.ts +1 -1
  30. package/build/main//321/201omponents/Button/Button.js +5 -4
  31. package/build/main//321/201omponents/Button/types.d.ts +10 -3
  32. package/build/main//321/201omponents/Button/types.js +11 -1
  33. package/build/main//321/201omponents/Calendar/Calendar.d.ts +2 -2
  34. package/build/main//321/201omponents/Calendar/Calendar.js +5 -7
  35. package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +1 -1
  36. package/build/main//321/201omponents/Checkbox/Checkbox.js +7 -4
  37. package/build/main//321/201omponents/Checkbox/types.d.ts +2 -1
  38. package/build/main//321/201omponents/Chips/Chips.d.ts +1 -1
  39. package/build/main//321/201omponents/Chips/Chips.js +8 -6
  40. package/build/main//321/201omponents/Chips/types.d.ts +1 -0
  41. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +1 -1
  42. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +6 -5
  43. package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +2 -2
  44. package/build/main//321/201omponents/CustomSelect/CustomSelect.js +4 -3
  45. package/build/main//321/201omponents/CustomSelect/types.d.ts +1 -1
  46. package/build/main//321/201omponents/CustomSelectPriority/CustomSelectPriority.d.ts +2 -2
  47. package/build/main//321/201omponents/CustomSelectPriority/CustomSelectPriority.js +16 -17
  48. package/build/main//321/201omponents/CustomSelectPriority/types.d.ts +1 -1
  49. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +2 -2
  50. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +16 -17
  51. package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +3 -2
  52. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +2 -2
  53. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +8 -7
  54. package/build/main//321/201omponents/DragAndDrop/types.d.ts +5 -2
  55. package/build/main//321/201omponents/Error/Error.d.ts +1 -1
  56. package/build/main//321/201omponents/Error/Error.js +6 -4
  57. package/build/main//321/201omponents/Error/types.d.ts +3 -0
  58. package/build/main//321/201omponents/Header/Header.d.ts +1 -1
  59. package/build/main//321/201omponents/Header/Header.js +8 -6
  60. package/build/main//321/201omponents/Input/Input.d.ts +2 -2
  61. package/build/main//321/201omponents/Input/Input.js +3 -3
  62. package/build/main//321/201omponents/Input/types.d.ts +1 -1
  63. package/build/main//321/201omponents/Loader/Loader.d.ts +1 -1
  64. package/build/main//321/201omponents/Loader/Loader.js +2 -2
  65. package/build/main//321/201omponents/Profile/Profile.d.ts +1 -1
  66. package/build/main//321/201omponents/Profile/Profile.js +11 -6
  67. package/build/main//321/201omponents/Profile/types.d.ts +3 -0
  68. package/build/main//321/201omponents/Stories/Stories.d.ts +4 -0
  69. package/build/main//321/201omponents/Stories/Stories.js +167 -0
  70. package/build/main//321/201omponents/Stories/index.d.ts +1 -0
  71. package/build/main//321/201omponents/Stories/index.js +1 -0
  72. package/build/main//321/201omponents/Stories/types.d.ts +34 -0
  73. package/build/main//321/201omponents/Stories/types.js +5 -0
  74. package/build/main//321/201omponents/Switcher/Switcher.d.ts +1 -1
  75. package/build/main//321/201omponents/Switcher/Switcher.js +4 -4
  76. package/build/main//321/201omponents/Switcher/types.d.ts +6 -4
  77. package/build/main//321/201omponents/Toggle/Toggle.d.ts +1 -1
  78. package/build/main//321/201omponents/Toggle/Toggle.js +4 -4
  79. package/build/main//321/201omponents/Toggle/types.d.ts +3 -3
  80. package/build/main//321/201omponents/index.d.ts +1 -0
  81. package/build/main//321/201omponents/index.js +1 -0
  82. package/package.json +15 -4
  83. package/build/main/assets/icons/calendar.svg +0 -4
  84. 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 function ActionModal({ title, buttonName, confirmButtonFunction, isModalOpen, placeholder, cancelButtonFunction, defaultValue, }: IActionModalProps): import("react/jsx-runtime").JSX.Element;
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 { Button } from '../index';
17
- import '../../styles/stories.module.scss';
15
+ import { ReactComponent as CancelIcon } from '../../assets/icons/cancel-cross.svg';
16
+ import Button from '../Button';
18
17
  import Input from '../Input';
19
- function ActionModal(_a) {
20
- var title = _a.title, buttonName = _a.buttonName, confirmButtonFunction = _a.confirmButtonFunction, isModalOpen = _a.isModalOpen, placeholder = _a.placeholder, cancelButtonFunction = _a.cancelButtonFunction, _b = _a.defaultValue, defaultValue = _b === void 0 ? '' : _b;
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(CancelCross, {}) })), _jsx("div", __assign({ className: "smartapp-action-modal__content--input" }, { children: _jsx(Input, { defaultValue: value, onChange: onChange, placeholder: placeholder }) })), _jsx("div", __assign({ className: "smartapp-action-modal__content--buttons" }, { children: _jsx(Button, { title: buttonName, typeButton: "low", onClickFunction: function () { return confirmButtonFunction(value); }, color: "blue" }) }))] })) })) })));
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 { IAttachedFile } from './types';
1
+ import { IAttachedFileProps } from './types';
2
2
  import '../../styles/stories.module.scss';
3
- declare function AttachedFile({ fileName, weight, weightType, isSpaceBetween, onClickDownloadFile, onClickRemoveFile, isRemoveFile, isDownloadFile, width, }: IAttachedFile): import("react/jsx-runtime").JSX.Element;
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
- function AttachedFile(_a) {
19
- 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;
20
- return (_jsxs("div", __assign({ style: { width: "".concat(width, "%") }, className: "smartapp-attached-file" }, { children: [_jsx("div", __assign({ className: "smartapp-attached-file--icon" }, { children: _jsx(File, {}) })), _jsxs("div", __assign({ className: classNames({ 'smartapp-attached-file__value': true }, { 'justify-space-between': isSpaceBetween }) }, { 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(Close, {}) }))), onClickDownloadFile && isDownloadFile && (_jsx("div", __assign({ onClick: function () { return onClickDownloadFile(fileName); }, className: "smartapp-attached-file__value--icons__download" }, { children: _jsx(Download, {}) })))] }))] }))] }), weight));
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 IAttachedFile {
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 { IAvatar } from './types';
1
+ import { IAvatarProps } from './types';
2
2
  import '../../styles/stories.module.scss';
3
- declare function Avatar({ username, onClick, widthHeight }: IAvatar): import("react/jsx-runtime").JSX.Element;
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 Avatar(_a) {
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,7 +1,7 @@
1
- export interface IAvatar {
1
+ export interface IAvatarProps {
2
2
  username: string;
3
3
  onClick?: () => void;
4
- widthHeight?: 44 | 24 | 32;
4
+ widthHeight?: 24 | 32 | 44;
5
5
  }
6
6
  export declare enum AvatarFontSizes {
7
7
  small = "12px",
@@ -1,4 +1,4 @@
1
1
  import { IButtonProps } from './types';
2
2
  import '../../styles/stories.module.scss';
3
- declare const Button: (props: IButtonProps) => import("react/jsx-runtime").JSX.Element;
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 cn from 'classnames';
13
+ import classNames from 'classnames';
14
+ import { TButtonType, TButtonColor } from './types';
14
15
  import '../../styles/stories.module.scss';
15
- var Button = function (props) {
16
- var title = props.title, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, _b = props.typeButton, typeButton = _b === void 0 ? 'standart' : _b, _c = props.color, color = _c === void 0 ? 'white' : _c, _d = props.width, width = _d === void 0 ? 100 : _d, _e = props.onClickFunction, onClickFunction = _e === void 0 ? function () { return undefined; } : _e;
17
- return (_jsx("button", __assign({ onClick: function () { return onClickFunction(); }, className: cn(typeButton ? 'smartapp-button__' + typeButton : null, color ? 'smartapp-button__color--' + color : null, isDisabled && 'smartapp-button__disabled'), style: { width: "".concat(width, "%") } }, { children: title })));
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 type TButtonType = 'standart' | 'low';
3
- export type TButtonColor = 'white' | 'blue' | 'red';
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: TButtonType;
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
- declare function CalendarDatepicker({ placeholder, initialCurrentDate, initialCurrentDateRange, minDate, onChangeCurrentDate, onChangeCurrentDateRange, calendarComponentClassName, calendarInputClassName, isRange, width, }: ICalendarProps): import("react/jsx-runtime").JSX.Element;
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 CalendarDatepicker(_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 (date) { return undefined; } : _d, _e = _a.onChangeCurrentDateRange, onChangeCurrentDateRange = _e === void 0 ? function (period) { return undefined; } : _e, calendarComponentClassName = _a.calendarComponentClassName, calendarInputClassName = _a.calendarInputClassName, _f = _a.isRange, isRange = _f === void 0 ? false : _f, width = _a.width;
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
- onChangeDate(date);
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 function CheckBox({ id, onChange, disabled, checked }: ICheckBoxProps): import("react/jsx-runtime").JSX.Element;
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 CheckBox(_a) {
15
- var id = _a.id, _b = _a.onChange, onChange = _b === void 0 ? function () { return undefined; } : _b, disabled = _a.disabled, checked = _a.checked;
16
- return (_jsx("div", __assign({ className: "smartapp-check-box" }, { children: _jsx("div", __assign({ className: "smartapp-check-box__container" }, { children: _jsxs("label", __assign({ htmlFor: "cb-".concat(id) }, { children: [_jsx("input", { id: "cb-".concat(id), disabled: disabled, checked: checked, onChange: function () { return onChange(); }, className: "smartapp-check-box__container__custom-check-box", type: "checkbox", name: "marker" }), _jsx("span", { className: "checkmark" })] })) }), "cb-".concat(id, "}")) })));
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,6 +1,7 @@
1
1
  export interface ICheckBoxProps {
2
2
  id: string;
3
- onChange?: () => void;
4
3
  disabled?: boolean;
5
4
  checked?: boolean;
5
+ iconColor?: string;
6
+ onChange?: () => void;
6
7
  }
@@ -1,4 +1,4 @@
1
1
  import { IChipsProps } from './types';
2
2
  import '../../styles/stories.module.scss';
3
- declare function Chips({ name, onCancelFunction }: IChipsProps): import("react/jsx-runtime").JSX.Element;
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 Cancel } from '../../assets/icons/cancel-cross.svg';
14
- import '../../styles/stories.module.scss';
13
+ import { ReactComponent as CancelIcon } from '../../assets/icons/cancel-cross.svg';
15
14
  import Avatar from '../Avatar';
16
- function Chips(_a) {
17
- var name = _a.name, _b = _a.onCancelFunction, onCancelFunction = _b === void 0 ? function () { return undefined; } : _b;
18
- 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(Cancel, {}) }))] })));
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,5 @@
1
1
  export interface IChipsProps {
2
2
  name: string;
3
+ iconColor?: string;
3
4
  onCancelFunction?: (name?: string) => void;
4
5
  }
@@ -1,4 +1,4 @@
1
1
  import { IConfirmationModalProps } from './types';
2
2
  import '../../styles/stories.module.scss';
3
- declare function ConfirmationModal({ title, text, cancelButtonName, confirmButtonName, cancelButtonFunction, confirmButtonFunction, isModalOpen, }: IConfirmationModalProps): import("react/jsx-runtime").JSX.Element;
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 { Button } from '../index';
15
+ import Button from '../Button';
16
+ import { TButtonColor, TButtonType } from '../Button/types';
16
17
  import '../../styles/stories.module.scss';
17
- function ConfirmationModal(_a) {
18
- var title = _a.title, text = _a.text, cancelButtonName = _a.cancelButtonName, confirmButtonName = _a.confirmButtonName, _b = _a.cancelButtonFunction, cancelButtonFunction = _b === void 0 ? function () { return undefined; } : _b, confirmButtonFunction = _a.confirmButtonFunction, isModalOpen = _a.isModalOpen;
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: "low", onClickFunction: cancelButtonFunction, color: "white" }), _jsx(Button, { width: 50, title: confirmButtonName, typeButton: "low", onClickFunction: confirmButtonFunction, color: "red" })] }))] })) })) })));
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 { ICustomSelect } from './types';
1
+ import { ICustomSelectProps } from './types';
2
2
  import '../../styles/stories.module.scss';
3
- declare function CustomSelect({ options, defaultValue, placeholder, onChange, width }: ICustomSelect): import("react/jsx-runtime").JSX.Element;
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 CustomSelect(_a) {
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: function () { return null; } } }) })));
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;
@@ -3,7 +3,7 @@ export type TCustomSelectOption = {
3
3
  label: string;
4
4
  value: string;
5
5
  };
6
- export type ICustomSelect = {
6
+ export type ICustomSelectProps = {
7
7
  options: TCustomSelectOption[];
8
8
  onChange: (option: TCustomSelectOption) => void;
9
9
  placeholder: string;
@@ -1,4 +1,4 @@
1
- import { ICustomSelectPriority } from './types';
1
+ import { ICustomSelectPriorityProps } from './types';
2
2
  import '../../styles/stories.module.scss';
3
- declare function CustomSelectPriority({ options, defaultValue, placeholder, onChange, width }: ICustomSelectPriority): import("react/jsx-runtime").JSX.Element;
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 Ellipse } from '../../assets/icons/ellipse.svg';
25
+ import { ReactComponent as EllipseIcon } from '../../assets/icons/ellipse.svg';
26
26
  import '../../styles/stories.module.scss';
27
- function CustomSelectPriority(_a) {
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: function () { return null; } } }) })));
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 ICustomSelectPriority {
7
+ export interface ICustomSelectPriorityProps {
8
8
  options: TCustomSelectOptionPriority[];
9
9
  onChange: (option: TCustomSelectOptionPriority) => void;
10
10
  placeholder: string;
@@ -1,4 +1,4 @@
1
- import { ICustomSelectProfiles } from './types';
1
+ import { ICustomSelectProfilesProps } from './types';
2
2
  import '../../styles/stories.module.scss';
3
- declare function CustomSelectPriority({ options, defaultValue, placeholder, onChange, width }: ICustomSelectProfiles): import("react/jsx-runtime").JSX.Element;
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
- function CustomSelectPriority(_a) {
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: function () { return null; } } }) })));
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
- export type TCustomSelectOptionProfiles = {
2
+ type TCustomSelectOptionProfiles = {
3
3
  username: string;
4
4
  email: string;
5
5
  };
6
- export interface ICustomSelectProfiles {
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 { IDragAndDrop } from './types';
1
+ import { IDragAndDropProps } from './types';
2
2
  import '../../styles/stories.module.scss';
3
- declare function DragAndDrop({ options, onDragEndFunction, onChangeIsCompletedOption, onChangeOption, onClickDeleteOption, placeholder, width, }: IDragAndDrop): import("react/jsx-runtime").JSX.Element;
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;